File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -41,7 +41,7 @@ export const compileCommand = new Command('compile')
4141 printKV ( 'Load time' , `${ duration } ms` ) ;
4242 }
4343
44- // 2. Normalize map-formatted collections and validate against Protocol
44+ // 2. Normalize map-formatted stack definition and validate against Protocol
4545 if ( ! options . json ) printStep ( 'Validating protocol compliance...' ) ;
4646 const normalized = normalizeStackInput ( config as Record < string , unknown > ) ;
4747 const result = ObjectStackDefinitionSchema . safeParse ( normalized ) ;
Original file line number Diff line number Diff line change @@ -478,7 +478,7 @@ export const doctorCommand = new Command('doctor')
478478 printStep ( 'Loading configuration for analysis...' ) ;
479479 try {
480480 const { config : rawConfig } = await loadConfig ( ) ;
481- const config = normalizeStackInput ( rawConfig as Record < string , unknown > ) ;
481+ const config : any = normalizeStackInput ( rawConfig as Record < string , unknown > ) ;
482482
483483 // Circular dependency detection
484484 if ( Array . isArray ( config . objects ) && config . objects . length > 0 ) {
Original file line number Diff line number Diff line change @@ -28,7 +28,7 @@ export const infoCommand = new Command('info')
2828
2929 try {
3030 const { config : rawConfig , absolutePath, duration } = await loadConfig ( configPath ) ;
31- const config = normalizeStackInput ( rawConfig as Record < string , unknown > ) ;
31+ const config : any = normalizeStackInput ( rawConfig as Record < string , unknown > ) ;
3232 const stats = collectMetadataStats ( config ) ;
3333
3434 if ( options . json ) {
Original file line number Diff line number Diff line change @@ -39,7 +39,7 @@ export const validateCommand = new Command('validate')
3939 printKV ( 'Load time' , `${ duration } ms` ) ;
4040 }
4141
42- // 2. Normalize map-formatted collections and validate against schema
42+ // 2. Normalize map-formatted stack definition and validate against schema
4343 if ( ! options . json ) printStep ( 'Validating against ObjectStack Protocol...' ) ;
4444 const normalized = normalizeStackInput ( config as Record < string , unknown > ) ;
4545 const result = ObjectStackDefinitionSchema . safeParse ( normalized ) ;
Original file line number Diff line number Diff line change @@ -136,7 +136,7 @@ export interface MetadataStats {
136136export function collectMetadataStats ( config : any ) : MetadataStats {
137137 const count = ( val : any ) => {
138138 if ( Array . isArray ( val ) ) return val . length ;
139- if ( val && typeof val === 'object' && ! Array . isArray ( val ) ) return Object . keys ( val ) . length ;
139+ if ( val && typeof val === 'object' ) return Object . keys ( val ) . length ;
140140 return 0 ;
141141 } ;
142142
You can’t perform that action at this time.
0 commit comments