Skip to content

Commit def5b04

Browse files
author
Gyan Ranjan A
committed
fix: resolve eslint errors (trailing spaces, quote style, preserve-caught-error)
1 parent f823e35 commit def5b04

3 files changed

Lines changed: 7 additions & 7 deletions

File tree

src/argv.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff 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] = {};

src/parser-includes.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff 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(

src/parser.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff 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

0 commit comments

Comments
 (0)