Skip to content

Commit c4c7408

Browse files
committed
fix args
1 parent 050bc12 commit c4c7408

File tree

1 file changed

+10
-2
lines changed

1 file changed

+10
-2
lines changed

packages/monday-api-mcp/lib/utils/args/args.service.ts

Lines changed: 10 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,14 @@ export function validateArgs(parsedArgs: ParsedArgs): ValidatedArgs {
6363
process.exit(1);
6464
}
6565

66-
// At this point, all required args are present, so we can safely cast
67-
return parsedArgs as unknown as ValidatedArgs;
66+
const typedArgs: Record<string, any> = { ...parsedArgs };
67+
68+
ARG_CONFIGS.forEach((config) => {
69+
if (typeof config.defaultValue === 'boolean' && parsedArgs[config.name] !== undefined) {
70+
const stringValue = parsedArgs[config.name] as string;
71+
typedArgs[config.name] = stringValue.toLowerCase() === 'true';
72+
}
73+
});
74+
75+
return typedArgs as unknown as ValidatedArgs;
6876
}

0 commit comments

Comments
 (0)