fix CLI management
This commit is contained in:
parent
282b638928
commit
6757ae2dc6
3 changed files with 17 additions and 16 deletions
|
@ -1,6 +1,6 @@
|
|||
{
|
||||
"name": "gancio",
|
||||
"version": "1.4.3",
|
||||
"version": "1.4.4-rc.1",
|
||||
"description": "A shared agenda for local communities",
|
||||
"author": "lesion",
|
||||
"scripts": {
|
||||
|
@ -57,14 +57,14 @@
|
|||
"multer": "^1.4.3",
|
||||
"nuxt-edge": "^2.16.0-27305297.ab1c6cb4",
|
||||
"pg": "^8.6.0",
|
||||
"sequelize": "^6.19.0",
|
||||
"sequelize": "^6.17.0",
|
||||
"sequelize-slugify": "^1.6.0",
|
||||
"sharp": "^0.27.2",
|
||||
"sqlite3": "mapbox/node-sqlite3#918052b",
|
||||
"tiptap": "^1.32.0",
|
||||
"tiptap-extensions": "^1.35.0",
|
||||
"umzug": "^2.3.0",
|
||||
"v-calendar": "2.4.1",
|
||||
"v-calendar": "^2.4.1",
|
||||
"vue": "^2.6.14",
|
||||
"vue-i18n": "^8.26.7",
|
||||
"vue-template-compiler": "^2.6.14",
|
||||
|
|
|
@ -22,16 +22,18 @@ require('yargs')
|
|||
.option('config', {
|
||||
alias: 'c',
|
||||
describe: 'Configuration file',
|
||||
default: path.resolve(process.env.cwd, 'config.json')
|
||||
})
|
||||
.coerce('config', config_path => {
|
||||
const absolute_config_path = path.resolve(process.env.cwd, config_path)
|
||||
process.env.config_path = absolute_config_path
|
||||
return absolute_config_path
|
||||
})
|
||||
.command(['accounts'], 'Manage accounts', accountsCLI)
|
||||
default: path.resolve(process.env.cwd, 'config.json'),
|
||||
coerce: config_path => {
|
||||
const absolute_config_path = path.resolve(process.env.cwd, config_path)
|
||||
process.env.config_path = absolute_config_path
|
||||
return absolute_config_path
|
||||
}})
|
||||
.command(['start', 'run', '$0'], 'Start gancio', {}, start)
|
||||
.command(['accounts'], 'Manage accounts', accountsCLI)
|
||||
.help('h')
|
||||
.alias('h', 'help')
|
||||
.epilog('Made with ❤ by underscore hacklab - https://gancio.org')
|
||||
.recommendCommands()
|
||||
.strict()
|
||||
.demandCommand(1, '')
|
||||
.argv
|
||||
|
|
|
@ -38,8 +38,7 @@ async function list () {
|
|||
console.log()
|
||||
}
|
||||
|
||||
const accountsCLI = yargs => {
|
||||
return yargs
|
||||
const accountsCLI = yargs => yargs
|
||||
.command('list', 'List all accounts', list)
|
||||
.command('modify', 'Modify', {
|
||||
account: {
|
||||
|
@ -48,7 +47,7 @@ const accountsCLI = yargs => {
|
|||
demandOption: true
|
||||
},
|
||||
'reset-password': {
|
||||
describe: 'Resets the password of the given accoun ',
|
||||
describe: 'Resets the password of the given account ',
|
||||
type: 'boolean'
|
||||
}
|
||||
}, modify)
|
||||
|
@ -56,6 +55,6 @@ const accountsCLI = yargs => {
|
|||
.recommendCommands()
|
||||
.strict()
|
||||
.demandCommand(1, '')
|
||||
}
|
||||
.argv
|
||||
|
||||
module.exports = accountsCLI
|
||||
module.exports = accountsCLI
|
Loading…
Reference in a new issue