Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
cli.main(function(args, options){
var tf = new TerraformRunner(options.workdir);
if(cli.command == 'init') {
tf.init();
} else if(cli.command == 'destroy') {
tf.destroy();
} else if(cli.command == 'force-unlock') {
tf.unlock(args[0]);
} else if(cli.command == 'state') {
tf.state(function() {
// test
var testRunner = new TestRunner(options.tests);
testRunner.run();
});
} else if(cli.command == 'apply') {
tf.apply(function(callback) {
if(!options.skipTests) {
// test
var testRunner = new TestRunner(options.tests);
testRunner.run();
} else {
console.log("Skipping tests...");
}
#!/usr/bin/env node
var cli = require('cli');
//The second (optional) argument of cli.parse() is a command list
//Type `./command.js --help` for usage info
//cli enables auto-completion of commands (similiar to npm), e.g. all of
//the following are equivalent and result in "Command is: install":
// $ ./command.js install
// $ ./command.js inst
// $ ./command.js i
cli.parse(null, ['install', 'test', 'edit', 'remove', 'uninstall', 'ls']);
console.log('Command is: ' + cli.command);
#!/usr/bin/env node
var cli = require('cli');
//The second (optional) argument of cli.parse() is a command list
//Type `./command.js --help` for usage info
//cli enables auto-completion of commands (similiar to npm), e.g. all of
//the following are equivalent and result in "Command is: install":
// $ ./command.js install
// $ ./command.js inst
// $ ./command.js i
cli.parse(null, ['install', 'test', 'edit', 'remove', 'uninstall', 'ls']);
console.log('Command is: ' + cli.command);
#!/usr/bin/env node
var cli = require('cli');
//The second (optional) argument of cli.parse() is a command list
//Type `./command.js --help` for usage info
//cli enables auto-completion of commands (similiar to npm), e.g. all of
//the following are equivalent and result in "Command is: install":
// $ ./command.js install
// $ ./command.js inst
// $ ./command.js i
cli.parse(null, ['install', 'test', 'edit', 'remove', 'uninstall', 'ls']);
console.log('Command is: ' + cli.command);
cli.main(function(args, options){
var tf = new TerraformRunner(options.workdir);
if(cli.command == 'init') {
tf.init();
} else if(cli.command == 'destroy') {
tf.destroy();
} else if(cli.command == 'force-unlock') {
tf.unlock(args[0]);
} else if(cli.command == 'state') {
tf.state(function() {
// test
var testRunner = new TestRunner(options.tests);
testRunner.run();
});
} else if(cli.command == 'apply') {
tf.apply(function(callback) {
if(!options.skipTests) {
// test
var testRunner = new TestRunner(options.tests);
#!/usr/bin/env node
var cli = require('cli');
//The second (optional) argument of cli.parse() is a command list
//Type `./command.js --help` for usage info
//cli enables auto-completion of commands (similiar to npm), e.g. all of
//the following are equivalent and result in "Command is: install":
// $ ./command.js install
// $ ./command.js inst
// $ ./command.js i
cli.parse(null, ['install', 'test', 'edit', 'remove', 'uninstall', 'ls']);
console.log('Command is: ' + cli.command);
}
var dev_server = require('dev_server');
var fs = require('fs'),
path = require('path');
try {
require(path.join(process.cwd(), 'express.js')).init(dev_server.app);
util.puts("Loaded express.js");
} catch(e) {}
dev_server.init();
dev_server.app.listen(port, host);
util.puts("Server at http://" + (host || "127.0.0.1") + ":" + port.toString() + "/");
} else if (cli.command == 'build') {
var static_require = require('./static_require');
var file = cli.args[0];
var options = { filePath: cli.args[0], squeeze: cli.options.squeeze };
var code = static_require.require(options);
console.log(code);
}
cli.main(function(args, options) {
checkArgs(args);
if (cli.command == 'publish') {
console.log(options.number + ' clients publishing ' + (options.number * args[2]) + ' messages...\n');
}
var clients = [],
connected = 0;
for (var i = 0; i < options.number; i++) {
var client = new Client(options);
client.on('connection', function() {
if (options.debug) {
cli.info('Client ' + this.clientId + ' connected');
}
if (cli.command == 'subscribe') {
subscribe(args, options, this);
require.paths.unshift(__dirname);
var cli = require('cli'),
options = cli.parse(
{
squeeze: ['s', 'Squeeze output']
}, ['run', 'build']),
util = require('util');
if (cli.command == 'run') {
var pair = cli.args[0],
host = '127.0.0.1',
port = 21119,
matches;
if (pair) {
if (pair.match(/^\d+$/)) {
port = pair;
} else if (matches = pair.match(/^(.*):(\d+)$/)) {
host = matches[1];
port = matches[2];
} else {
host = pair;
}
}
let registry;
if (appDir) {
registry = await registryClient({
logger: nodearch.logger,
config: {
location: nodearch.paths.extensions,
keyword: 'nodearch-extension',
app: appDir
}
});
}
switch (cli.command) {
case 'start':
appDir ? require(path.join(appDir, 'index.js')) : appNotExist();
break;
case 'console':
if (appDir) {
nodearch.on(events.started, () => archConsole());
require(path.join(appDir, 'index.js'));
}
else {
appNotExist();
}
break;
case 'add':
appDir ? await registry.installPackages(cli.args) : appNotExist();
break;
case 'remove':