diff --git a/lib/cli.js b/lib/cli.js index f464997e..4fe5b238 100644 --- a/lib/cli.js +++ b/lib/cli.js @@ -9,8 +9,12 @@ program program .command('provider [serial..]') .description('start provider') - .option('-s, --connect-sub ', 'sub endpoint', cliutil.list) - .option('-p, --connect-push ', 'push endpoint', cliutil.list) + .option('-s, --connect-sub ' + , 'sub endpoint' + , cliutil.list) + .option('-p, --connect-push ' + , 'push endpoint' + , cliutil.list) .action(function() { var serials = cliutil.allUnknownArgs(arguments) , options = cliutil.lastArg(arguments) @@ -44,8 +48,12 @@ program program .command('device ') .description('start device worker') - .option('-s, --connect-sub ', 'sub endpoint', cliutil.list) - .option('-p, --connect-push ', 'push endpoint', cliutil.list) + .option('-s, --connect-sub ' + , 'sub endpoint' + , cliutil.list) + .option('-p, --connect-push ' + , 'push endpoint' + , cliutil.list) .action(function(serial, options) { if (!options.connectSub) { this.missingArgument('--connect-sub') @@ -66,10 +74,12 @@ program program .command('coordinator ') .description('start coordinator') - .option('-a, --connect-app-dealer ', 'app dealer endpoint', - cliutil.list) - .option('-d, --connect-dev-dealer ', 'device dealer endpoint', - cliutil.list) + .option('-a, --connect-app-dealer ' + , 'app dealer endpoint' + , cliutil.list) + .option('-d, --connect-dev-dealer ' + , 'device dealer endpoint' + , cliutil.list) .action(function(name, options) { if (!options.connectAppDealer) { this.missingArgument('--connect-app-dealer') @@ -90,12 +100,18 @@ program program .command('triproxy ') .description('start triproxy') - .option('-u, --bind-pub ', 'pub endpoint', - String, 'tcp://*:7111') - .option('-d, --bind-dealer ', 'dealer endpoint', - String, 'tcp://*:7112') - .option('-p, --bind-pull ', 'pull endpoint', - String, 'tcp://*:7113') + .option('-u, --bind-pub ' + , 'pub endpoint' + , String + , 'tcp://*:7111') + .option('-d, --bind-dealer ' + , 'dealer endpoint' + , String + , 'tcp://*:7112') + .option('-p, --bind-pull ' + , 'pull endpoint' + , String + , 'tcp://*:7113') .action(function(name, options) { require('./roles/triproxy')({ name: name @@ -171,8 +187,12 @@ program program .command('console') .description('start console') - .option('-s, --connect-sub ', 'sub endpoint', cliutil.list) - .option('-p, --connect-push ', 'push endpoint', cliutil.list) + .option('-s, --connect-sub ' + , 'sub endpoint' + , cliutil.list) + .option('-p, --connect-push ' + , 'push endpoint' + , cliutil.list) .action(function(options) { if (!options.connectSub) { this.missingArgument('--connect-sub') @@ -192,18 +212,30 @@ program program .command('local [serial..]') .description('start everything locally') - .option('--bind-app-pub ', 'app pub endpoint', - String, 'tcp://127.0.0.1:7111') - .option('--bind-app-dealer ', 'app dealer endpoint', - String, 'tcp://127.0.0.1:7112') - .option('--bind-app-pull ', 'app pull endpoint', - String, 'tcp://127.0.0.1:7113') - .option('--bind-dev-pub ', 'device pub endpoint', - String, 'tcp://127.0.0.1:7114') - .option('--bind-dev-dealer ', 'device dealer endpoint', - String, 'tcp://127.0.0.1:7115') - .option('--bind-dev-pull ', 'device pull endpoint', - String, 'tcp://127.0.0.1:7116') + .option('--bind-app-pub ' + , 'app pub endpoint' + , String + , 'tcp://127.0.0.1:7111') + .option('--bind-app-dealer ' + , 'app dealer endpoint' + , String + , 'tcp://127.0.0.1:7112') + .option('--bind-app-pull ' + , 'app pull endpoint' + , String + , 'tcp://127.0.0.1:7113') + .option('--bind-dev-pub ' + , 'device pub endpoint' + , String + , 'tcp://127.0.0.1:7114') + .option('--bind-dev-dealer ' + , 'device dealer endpoint' + , String + , 'tcp://127.0.0.1:7115') + .option('--bind-dev-pull ' + , 'device pull endpoint' + , String + , 'tcp://127.0.0.1:7116') .action(function() { var options = cliutil.lastArg(arguments) , fork = require('child_process').fork