program .usage('<command> [options]') .on('--help', () => { console.log(''); console.log('Use cubejs <command> --help for more information about a command.'); console.log(''); });
program .version(version, '-v, --version', 'print version') .usage('[options] <files>') .option('-l, --list-browsers', 'list (effective or --all) browsers') .option('-a, --all', 'test or list all available browsers') .option('-c, --concurrency <n>', 'number of browsers to test concurrently, default 5') .option('-r, --retries <retries>', 'number of retries when running a browser, default 6') .option('-t, --timeout <timeout>', 'how long to wait for test results, default 5m') .option('--coverage', 'enable code coverage analysis') .option('--live', 'keep browsers open to allow repeated test runs') .option('-p, --preset <preset>', 'select a configuration preset') .option('-s, --server <script>', 'path to script that runs a support server') .option('--loopback <hostname>', 'custom hostname that equals or resolves to 127.0.0.1') .option('--verbose', 'enable airtap debug output') .option('--silly', 'enable all debug output') // Can we hide these in help? .option('--local', 'n/a') .option('--open', 'n/a') .option('--electron', 'n/a') .on('--help', function () { console.log() console.log(read('examples.txt')) }) .parse(process.argv)
start(process) { try { const runInInteractiveMode = this._isRunningInInteractiveMode(); const commandMetadataList = this._commandsMetadataService.getCommandsMetadata(); this._initializeCommands(commandMetadataList, runInInteractiveMode); // If there are no arguments, we print SuiteCloud version header if (!process.argv || process.argv.length <= 2) { NodeConsoleLogger.info(NodeTranslationService.getMessage(TITLE, COMPATIBLE_NS_VERSION)); } program .version(CLI_VERSION, '--version') .option(`${INTERACTIVE_ALIAS}, ${INTERACTIVE_OPTION}`, NodeTranslationService.getMessage(INTERACTIVE_OPTION_DESCRIPTION)) .on('command:*', args => { NodeConsoleLogger.error(NodeTranslationService.getMessage(ERRORS.COMMAND_DOES_NOT_EXIST, args[0])); }) .usage(NodeTranslationService.getMessage(USAGE)) .parse(process.argv); } catch (exception) { NodeConsoleLogger.error(unwrapExceptionMessage(exception)); } }
/** * Get Secret */ (async function () { program .usage('[options] <uuid>', 'Display the OpenPGP block a given secret') .option('-u, --fingerprint <fingerprint>', 'The user key fingerprint to authenticate with') .option('-p, --passphrase <passphrase>', 'The key passphrase') .option('-v, --verbose', 'Display additional debug information') .parse(process.argv); const resourceController = new ResourceController(program, process.argv); await resourceController.loginIfNeeded(); try { const data = await resourceController.view(program.args[0]); const view = new GetView(data); view.render(); } catch (err) { resourceController.error(err); } })();
.usage("option") .description(github.description()) .option(
/** * User list */ (async function () { program .usage('[options]', 'Get the list of users') .option('-u, --fingerprint <fingerprint>', 'The user key fingerprint to authenticate with') .option('-p, --passphrase <passphrase>', 'The key passphrase') .option('--columns <items>', 'Coma separated columns to display', Coercion.list) .option('-v, --verbose', 'Display additional debug information') .parse(process.argv); const userController = new UserController(program, process.argv); await userController.loginIfNeeded(); try { const data = await userController.index(); const view = new UserIndexView(data, program.columns); view.render(); } catch (err) { userController.error(err); } })();
.usage("option") .description(commands.migration.description) .option("-a, --add", migration.description(modes.ADD))
.usage("option(s)") .description(commands.copy.description) .option(
.usage("option(s)") .description(commands.nuget.description) .option("-p, --publish <version>", nugetPublish.description())
.usage('[options] [login|logout]', 'Authentication actions, login or logout') .option('-u, --fingerprint <fingerprint>', 'The user key fingerprint to authenticate with') .option('-p, --passphrase <passphrase>', 'The key passphrase')
.usage("option") .description(dotnetTest.description()) .option(
.usage('[options]', 'Get the server key') .option('--fingerprint', 'Display the fingerprint') .option('--armored-key', 'Display the armored block (default)')
/** * User get */ (async function () { program .usage('[options] <uuid>', 'Display the info for a given user') .option('-u, --fingerprint <fingerprint>', 'The user key fingerprint to authenticate with') .option('-p, --passphrase <passphrase>', 'The key passphrase') .option('-v, --verbose', 'Display additional debug information') .parse(process.argv); const userController = new UserController(program, process.argv); await userController.loginIfNeeded(); try { const data = await userController.view(program.args[0]); const view = new UserGetView(data); view.render(); } catch (err) { userController.error(err); } })();
/** * Passbolt Search Command */ (async function () { program .usage('[options]', 'Search and list resources') .option('-u, --fingerprint <fingerprint>', 'The user key fingerprint to authenticate with') .option('-p, --passphrase <passphrase>', 'The key passphrase') .option('--columns <items>', 'Coma separated columns to display', Coercion.list) .option('-v, --verbose', 'Display additional debug information') .parse(process.argv); const resourceController = new ResourceController(program, process.argv); await resourceController.loginIfNeeded(); try { let data = await resourceController.index(); const view = new ResourceIndexView(data, program.columns); view.render(); } catch (err) { resourceController.error(err); } })();
start(process) { try { const runInInteractiveMode = this._isRunningInInteractiveMode(); const commandMetadataList = this._commandsMetadataService.getCommandsMetadata(); this._initializeCommands(commandMetadataList, runInInteractiveMode); // If there are no arguments, we print SuiteCloud version header if (!process.argv || process.argv.length <= 2) { NodeConsoleLogger.info(NodeTranslationService.getMessage(TITLE, COMPATIBLE_NS_VERSION)); } program .version(CLI_VERSION, '--version') .option(`${INTERACTIVE_ALIAS}, ${INTERACTIVE_OPTION}`, NodeTranslationService.getMessage(INTERACTIVE_OPTION_DESCRIPTION)) .on('command:*', args => { NodeConsoleLogger.error(NodeTranslationService.getMessage(ERRORS.COMMAND_DOES_NOT_EXIST, args[0])); }) .usage(NodeTranslationService.getMessage(USAGE)) .parse(process.argv); } catch (exception) { NodeConsoleLogger.error(unwrapExceptionMessage(exception)); } }