File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 22
33All notable changes to this project will be documented in this file.
44
5+ ## [ 5.23.0]
6+
7+ - added ` update ` command to self-update the CLI binary in-place
8+ - startup update notification now hints at ` crystallize update ` instead of showing the curl reinstall command
9+
510## [ 5.22.1]
611
712- fix dump mass-operation dump-content-model command when the tenant has no Piece.
Original file line number Diff line number Diff line change 11{
22 "name" : " @crystallize/cli" ,
3- "version" : " 5.22.1 " ,
3+ "version" : " 5.23.0 " ,
44 "description" : " Crystallize CLI" ,
55 "license" : " MIT" ,
66 "contributors" : [
Original file line number Diff line number Diff line change 1+ import { Command } from 'commander' ;
2+ import packageJson from '../../package.json' ;
3+ import type { Updater } from '../core/create-updater' ;
4+
5+ type Deps = {
6+ updater : Updater ;
7+ } ;
8+
9+ export const createUpdateCommand = ( { updater } : Deps ) : Command => {
10+ const command = new Command ( 'update' ) ;
11+ command . description ( 'Update the Crystallize CLI to the latest version.' ) ;
12+ command . action ( async ( ) => {
13+ await updater . update ( packageJson . version ) ;
14+ } ) ;
15+ return command ;
16+ } ;
Original file line number Diff line number Diff line change @@ -4,7 +4,7 @@ _crystallize_completions() {
44 local subcmd=" ${COMP_WORDS[2]} "
55 local subsubcmd=" ${COMP_WORDS[3]} "
66
7- local commands=" help changelog doc boilerplate tenant login whoami mass-operation token image file serve add-mcp add-skills update-skills"
7+ local commands=" help changelog doc boilerplate tenant login whoami mass-operation token image file serve add-mcp add-skills update-skills update "
88 local program_options=" --version"
99 local default_options=" --help"
1010 local i_login_options=" --no-interactive --token_id= --token_secret="
@@ -17,7 +17,7 @@ _crystallize_completions() {
1717 fi
1818
1919 case " ${cmd} " in
20- login|whoami|serve|add-skills|update-skills)
20+ login|whoami|serve|add-skills|update-skills|update )
2121 local options=" ${default_options} "
2222 COMPREPLY=($( compgen -W " ${options} " -- " ${cur} " ) )
2323 return 0
Load Diff This file was deleted.
You can’t perform that action at this time.
0 commit comments