@@ -35,43 +35,43 @@ export default defineCommand({
3535 }
3636
3737 const response = await getDeployment ( config , deployedModel ! ) ;
38- const d = response . output ?? response . data ;
38+ const deployment = response . output ?? response . data ;
3939
40- if ( ! d ) {
40+ if ( ! deployment ) {
4141 emitBare ( `No data returned for ${ deployedModel } ` ) ;
4242 return ;
4343 }
4444
4545 const item : Record < string , unknown > = {
46- deployed_model : d . deployed_model ?? deployedModel ,
47- deployed_name : d . name ?? "" ,
48- model_name : d . model_name ?? "" ,
49- base_model : d . base_model ?? "" ,
50- status : d . status ?? "" ,
51- plan : d . plan ?? "" ,
46+ deployed_model : deployment . deployed_model ?? deployedModel ,
47+ deployed_name : deployment . name ?? "" ,
48+ model_name : deployment . model_name ?? "" ,
49+ base_model : deployment . base_model ?? "" ,
50+ status : deployment . status ?? "" ,
51+ plan : deployment . plan ?? "" ,
5252 } ;
53- if ( d . model_unit_spec ) item . model_unit_spec = d . model_unit_spec ;
54- if ( d . charge_type ) item . charge_type = d . charge_type ;
55- if ( d . capacity !== undefined ) item . capacity = d . capacity ;
56- if ( d . base_capacity !== undefined ) item . base_capacity = d . base_capacity ;
57- if ( d . ready_capacity !== undefined ) item . ready_capacity = d . ready_capacity ;
58- if ( d . rpm_limit !== undefined ) item . rpm_limit = d . rpm_limit ;
59- if ( d . tpm_limit !== undefined ) item . tpm_limit = d . tpm_limit ;
60- if ( d . input_tpm !== undefined ) item . input_tpm = d . input_tpm ;
61- if ( d . output_tpm !== undefined ) item . output_tpm = d . output_tpm ;
62- if ( d . gmt_create ) item . created_at = d . gmt_create ;
63- if ( d . gmt_modified ) item . updated_at = d . gmt_modified ;
53+ if ( deployment . model_unit_spec ) item . model_unit_spec = deployment . model_unit_spec ;
54+ if ( deployment . charge_type ) item . charge_type = deployment . charge_type ;
55+ if ( deployment . capacity !== undefined ) item . capacity = deployment . capacity ;
56+ if ( deployment . base_capacity !== undefined ) item . base_capacity = deployment . base_capacity ;
57+ if ( deployment . ready_capacity !== undefined ) item . ready_capacity = deployment . ready_capacity ;
58+ if ( deployment . rpm_limit !== undefined ) item . rpm_limit = deployment . rpm_limit ;
59+ if ( deployment . tpm_limit !== undefined ) item . tpm_limit = deployment . tpm_limit ;
60+ if ( deployment . input_tpm !== undefined ) item . input_tpm = deployment . input_tpm ;
61+ if ( deployment . output_tpm !== undefined ) item . output_tpm = deployment . output_tpm ;
62+ if ( deployment . gmt_create ) item . created_at = deployment . gmt_create ;
63+ if ( deployment . gmt_modified ) item . updated_at = deployment . gmt_modified ;
6464
6565 if ( format === "json" ) {
6666 emitResult ( item , format ) ;
6767 return ;
6868 }
6969
7070 // text / quiet — fixed-width label column for alignment
71- const label = ( k : string ) => `${ k } :` . padEnd ( 18 ) ;
72- for ( const [ k , v ] of Object . entries ( item ) ) {
73- if ( v === "" || v === undefined ) continue ;
74- emitBare ( `${ label ( k ) } ${ v } ` ) ;
71+ const label = ( key : string ) => `${ key } :` . padEnd ( 18 ) ;
72+ for ( const [ key , value ] of Object . entries ( item ) ) {
73+ if ( value === "" || value === undefined ) continue ;
74+ emitBare ( `${ label ( key ) } ${ value } ` ) ;
7575 }
7676 } ,
7777} ) ;
0 commit comments