-
Notifications
You must be signed in to change notification settings - Fork 79
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
0f5b483
commit 77a5601
Showing
7 changed files
with
15 additions
and
90 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,30 +1,11 @@ | ||
const { | ||
manifestMiddleware, | ||
moduleMiddleware, | ||
environmentMiddleware, | ||
} = require('../middleware') | ||
|
||
const MIDDLEWARES = [ | ||
manifestMiddleware, | ||
moduleMiddleware, | ||
environmentMiddleware, | ||
] | ||
|
||
exports.command = 'apm <command>' | ||
|
||
exports.describe = 'Publish and manage your APM package' | ||
|
||
exports.aliases = ['package'] | ||
|
||
exports.builder = function(yargs) { | ||
const cmd = yargs.commandDir('apm_cmds', { | ||
visit: cmd => { | ||
// Add middlewares | ||
cmd.middlewares = MIDDLEWARES | ||
return cmd | ||
}, | ||
}) | ||
cmd.demandCommand(1, 'You need to specify a command') | ||
|
||
return cmd | ||
return yargs | ||
.commandDir('apm_cmds') | ||
.demandCommand(1, 'You need to specify a command') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,28 +1,11 @@ | ||
const viewCommand = require('./acl_cmds/view') | ||
|
||
const { | ||
manifestMiddleware, | ||
moduleMiddleware, | ||
environmentMiddleware, | ||
} = require('../../middleware') | ||
|
||
const MIDDLEWARES = [ | ||
manifestMiddleware, | ||
moduleMiddleware, | ||
environmentMiddleware, | ||
] | ||
|
||
exports.command = 'acl <dao>' | ||
|
||
exports.describe = 'Shortcut for aragon dao acl view <dao>' | ||
|
||
exports.builder = function(yargs) { | ||
return yargs.commandDir('acl_cmds', { | ||
visit: cmd => { | ||
cmd.middlewares = MIDDLEWARES | ||
return cmd | ||
}, | ||
}) | ||
return yargs.commandDir('acl_cmds') | ||
} | ||
|
||
exports.handler = viewCommand.handler |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,26 +1,9 @@ | ||
const { | ||
manifestMiddleware, | ||
moduleMiddleware, | ||
environmentMiddleware, | ||
} = require('../../middleware') | ||
|
||
const MIDDLEWARES = [ | ||
manifestMiddleware, | ||
moduleMiddleware, | ||
environmentMiddleware, | ||
] | ||
|
||
exports.command = 'token <command>' | ||
|
||
exports.describe = 'Create and interact with MiniMe tokens' | ||
|
||
exports.builder = function(yargs) { | ||
return yargs | ||
.commandDir('token_cmds', { | ||
visit: cmd => { | ||
cmd.middlewares = MIDDLEWARES | ||
return cmd | ||
}, | ||
}) | ||
.commandDir('token_cmds') | ||
.demandCommand(1, 'You need to specify a command') | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters