File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -704,6 +704,31 @@ program
704704 process . exit ( 0 ) ;
705705 } ) ;
706706
707+ // ── Update/Upgrade subcommand ───────────────────────────────────────────
708+ program
709+ . command ( 'update' )
710+ . description ( 'Check for updates and install if available' )
711+ . option ( '--check' , 'Only check for updates without installing' )
712+ . action ( async ( opts : { check ?: boolean } ) => {
713+ const { runUpdate } = await import ( './commands/update.js' ) ;
714+ await runUpdate ( {
715+ currentVersion : packageJson . version ,
716+ check : opts . check ?? false ,
717+ } ) ;
718+ } ) ;
719+
720+ program
721+ . command ( 'upgrade' )
722+ . description ( 'Check for updates and install if available' )
723+ . option ( '--check' , 'Only check for updates without installing' )
724+ . action ( async ( opts : { check ?: boolean } ) => {
725+ const { runUpdate } = await import ( './commands/update.js' ) ;
726+ await runUpdate ( {
727+ currentVersion : packageJson . version ,
728+ check : opts . check ?? false ,
729+ } ) ;
730+ } ) ;
731+
707732async function runCLI ( options : CLIOptions ) : Promise < void > {
708733 try {
709734 let config = await loadConfig ( options . config ) ;
You can’t perform that action at this time.
0 commit comments