Skip to content

Commit 8e761a1

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

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
@@ -233,15 +233,15 @@ export class Argv {
233233

234234
// Guard against prototype pollution
235235
if (dangerousKeys.has(key) || dangerousKeys.has(component ?? "")) return;
236-
236+
237237
// Try to parse as JSON for arrays/objects/booleans/numbers
238238
let parsedValue;
239239
try {
240240
parsedValue = JSON.parse(value);
241241
} catch {
242242
parsedValue = value;
243243
}
244-
244+
245245
if (component) {
246246
// Component-specific input: store under component namespace
247247
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)