-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate lock file from pos-modules.json
- Loading branch information
Showing
6 changed files
with
33 additions
and
16 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,14 +1,21 @@ | ||
#!/usr/bin/env node | ||
|
||
const program = require('commander'); | ||
const logger = require('../lib/logger'); | ||
|
||
program | ||
.name('pos-cli modules') | ||
.command('list [environment]', 'list installed modules on the instance') | ||
.command('pull [environment] <name>', 'pull a module for the instance') | ||
.command('remove [environment] <name>', 'remove module from the instance (removes configuration and data)') | ||
.command('setup', 'initialize module lock file for the instance') | ||
.command('install', 'adds module to pos-modules file and resolve dependencies') | ||
.command('init <name>', 'initialize a module with the starter structure') | ||
.command('version [version] --package', 'create a new version of the module') | ||
.command('push', 'publish module version') | ||
.parse(process.argv); | ||
|
||
const commandList = Object.keys(program._execs); | ||
if (!commandList.includes(program.args[0])) { | ||
program.outputHelp(); | ||
logger.Error(`unknown command: ${program.args[0]}`); | ||
} |
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