@@ -46,6 +46,7 @@ commander.version(pkg.version)
4646 . option ( '-l --log [path]' , 'specify log file which gathers both stdout and stderr' )
4747 . option ( '--log-type <type>' , 'specify log output style (raw by default, json optional)' )
4848 . option ( '--log-date-format <date format>' , 'add custom prefix timestamp to logs' )
49+ . option ( '--time' , 'enable time logging' )
4950 . option ( '--disable-logs' , 'disable all logs storage' )
5051 . option ( '--env <environment_name>' , 'specify which set of environment variables from ecosystem file must be injected' )
5152 . option ( '-a --update-env' , 'force an update of the environment with restart/reload (-a <=> apply)' )
@@ -57,6 +58,7 @@ commander.version(pkg.version)
5758 . option ( '--listen-timeout <delay>' , 'listen timeout on application reload' )
5859 . option ( '--max-memory-restart <memory>' , 'Restart the app if an amount of memory is exceeded (in bytes)' )
5960 . option ( '--restart-delay <delay>' , 'specify a delay between restarts (in milliseconds)' )
61+ . option ( '--exp-backoff-restart-delay <delay>' , 'specify a delay between restarts (in milliseconds)' )
6062 . option ( '-x --execute-command' , 'execute a program using fork system' )
6163 . option ( '--max-restarts [count]' , 'only restart the script COUNT times' )
6264 . option ( '-u --user <username>' , 'define user when generating startup script' )
@@ -482,14 +484,14 @@ commander.command('update')
482484 */
483485commander . command ( 'install <module|git:// url>' )
484486 . alias ( 'module:install' )
487+ . option ( '--tarball' , 'is local tarball' )
488+ . option ( '--http' , 'is remote tarball' )
489+ . option ( '--docker' , 'is docker container' )
485490 . option ( '--v1' , 'install module in v1 manner (do not use it)' )
486491 . option ( '--safe [time]' , 'keep module backup, if new module fail = restore with previous' )
487492 . description ( 'install or update a module and run it forever' )
488493 . action ( function ( plugin_name , opts ) {
489- if ( opts . v1 )
490- commander . v1 = true ;
491- if ( opts . safe )
492- commander . safe = opts . safe ;
494+ require ( 'util' ) . _extend ( commander , opts )
493495 pm2 . install ( plugin_name , commander ) ;
494496 } ) ;
495497
@@ -513,12 +515,18 @@ commander.command('uninstall <module>')
513515 pm2 . uninstall ( plugin_name ) ;
514516 } ) ;
515517
518+ commander . command ( 'package [target]' )
519+ . description ( 'Check & Package TAR type module' )
520+ . action ( function ( target ) {
521+ pm2 . package ( target ) ;
522+ } ) ;
516523
517- commander . command ( 'publish' )
524+ commander . command ( 'publish [folder]' )
525+ . option ( '--npm' , 'publish on npm' )
518526 . alias ( 'module:publish' )
519527 . description ( 'Publish the module you are currently on' )
520- . action ( function ( ) {
521- pm2 . publish ( ) ;
528+ . action ( function ( folder , opts ) {
529+ pm2 . publish ( folder , opts ) ;
522530 } ) ;
523531
524532commander . command ( 'set [key] [value]' )
@@ -788,6 +796,12 @@ commander.command('info <id>')
788796 pm2 . describe ( proc_id ) ;
789797 } ) ;
790798
799+ commander . command ( 'env <id>' )
800+ . description ( '(alias) describe all parameters of a process id' )
801+ . action ( function ( proc_id ) {
802+ pm2 . env ( proc_id ) ;
803+ } ) ;
804+
791805commander . command ( 'show <id>' )
792806 . description ( '(alias) describe all parameters of a process id' )
793807 . action ( function ( proc_id ) {
0 commit comments