]> git.immae.eu Git - perso/Immae/Projets/Nodejs/Surfer.git/blobdiff - cli/surfer.js
do not blindly allow self-signed certs
[perso/Immae/Projets/Nodejs/Surfer.git] / cli / surfer.js
index 8920641896cafd986fb0e1880ee72e50154f091e..7c5ac8aef57d2a528782ea978e28c916ab09edbf 100755 (executable)
@@ -5,9 +5,6 @@
 var program = require('commander'),
     actions = require('./actions');
 
-// Allow self signed certs!
-process.env.NODE_TLS_REJECT_UNAUTHORIZED = '0';
-
 program.version('0.1.0');
 
 program.command('login <url>')
@@ -15,17 +12,18 @@ program.command('login <url>')
     .action(actions.login);
 
 program.command('put <file> [files...]')
-    .option('-d --destination <folder>', 'Destination folder. This is prepended to the relative <file> path')
     .option('-a --all', 'Also include hidden files and folders.', false)
-    .description('Put a file')
+    .description('Put a file, last argument is destination if provided')
     .action(actions.put);
 
 program.command('get [file]')
-    .description('Get a file or directory')
+    .description('Get a file or directory listing')
     .action(actions.get);
 
-program.command('del')
-    .description('Delete a file')
+program.command('del <file>')
+    .option('-r --recursive', 'Recursive delete directories.', false)
+    .option('-d --dry-run', 'Only list files to delete.', false)
+    .description('Delete a file or directory')
     .action(actions.del);
 
 program.parse(process.argv);