File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -239,15 +239,15 @@ export class Argv {
239239
240240 // Guard against prototype pollution
241241 if ( dangerousKeys . has ( key ) || dangerousKeys . has ( component ?? "" ) ) return ;
242-
242+
243243 // Try to parse as JSON for arrays/objects/booleans/numbers
244244 let parsedValue ;
245245 try {
246246 parsedValue = JSON . parse ( value ) ;
247247 } catch {
248248 parsedValue = value ;
249249 }
250-
250+
251251 if ( component ) {
252252 // Component-specific input: store under component namespace
253253 if ( ! inputs [ component ] ) inputs [ component ] = { } ;
Original file line number Diff line number Diff line change @@ -58,22 +58,22 @@ export class ParserIncludes {
5858 const { argv, inputs : inputsConfig } = opts ;
5959 const fileInputs = inputsConfig . _file ?? { } ;
6060 const cliInputs = inputsConfig . _cli ?? { } ;
61-
61+
6262 // Extract global CLI inputs (non-component-specific)
6363 const cliGlobalInputs : { [ key : string ] : any } = { } ;
6464 const cliComponentInputs : { [ key : string ] : any } = { } ;
6565 for ( const [ key , value ] of Object . entries ( cliInputs ) ) {
66- if ( typeof value === ' object' && value !== null && ! Array . isArray ( value ) ) {
66+ if ( typeof value === " object" && value !== null && ! Array . isArray ( value ) ) {
6767 // This is a component-specific input (e.g., {deploy: {replicas: 5}})
6868 cliComponentInputs [ key ] = value ;
6969 } else {
7070 // This is a global input
7171 cliGlobalInputs [ key ] = value ;
7272 }
7373 }
74-
74+
7575 // If file has _global key, use structured format; otherwise treat entire file as global
76- const isStructured = fileInputs . _global !== undefined || Object . keys ( fileInputs ) . some ( k => ! k . startsWith ( '_' ) && typeof fileInputs [ k ] === ' object' && fileInputs [ k ] !== null && ! Array . isArray ( fileInputs [ k ] ) ) ;
76+ const isStructured = fileInputs . _global !== undefined || Object . keys ( fileInputs ) . some ( k => ! k . startsWith ( "_" ) && typeof fileInputs [ k ] === " object" && fileInputs [ k ] !== null && ! Array . isArray ( fileInputs [ k ] ) ) ;
7777 const globalInputs = isStructured ? { ...( fileInputs . _global ?? { } ) , ...cliGlobalInputs } : { ...fileInputs , ...cliGlobalInputs } ;
7878 this . count ++ ;
7979 assert (
Original file line number Diff line number Diff line change @@ -254,7 +254,7 @@ export class Parser {
254254 try {
255255 fileInputs = yaml . load ( content ) as { [ key : string ] : any } ?? { } ;
256256 } catch ( e : any ) {
257- throw new Error ( `Failed to parse inputs file ${ inputsFilePath } : ${ e . message } ` ) ;
257+ throw new Error ( `Failed to parse inputs file ${ inputsFilePath } : ${ e . message } ` , { cause : e } ) ;
258258 }
259259 }
260260
You can’t perform that action at this time.
0 commit comments