Skip to content

Commit fd526ed

Browse files
fix: wizard generated config
1 parent 98782c3 commit fd526ed

File tree

1 file changed

+13
-6
lines changed

1 file changed

+13
-6
lines changed

src/configuration/getConfigFromWizard.ts

Lines changed: 13 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -372,18 +372,25 @@ export default {
372372
// Verbose logging
373373
verbose: ${config.verbose},
374374
// Modify Lambda function list or support custom framework
375-
//getLambdas: async (foundLambdas) => {
376-
// you can customize the list of Lambdas here or create your own
377-
// return foundLambdas;
378-
//},
375+
// getLambdas: async (foundLambdas) => {
376+
// you can customize the list of Lambdas here or create your own
377+
// return foundLambdas;
378+
// },
379379
} satisfies LldConfigTs;
380380
`;
381381

382-
// remove lines that contains undefined or ""
382+
// comment lines that contains undefined or ""
383383
const configContentCleaned = configContent
384384
.trim()
385385
.split('\n')
386-
.filter((l) => !l.includes('undefined') && !l.includes('""'))
386+
.map((l) =>
387+
l.includes('undefined')
388+
? ` // ${l
389+
.replace('"undefined",', '')
390+
.replace('undefined,', '')
391+
.trim()}`
392+
: l,
393+
)
387394
.join('\n');
388395

389396
await fs.writeFile(configFileName, configContentCleaned);

0 commit comments

Comments
 (0)