Skip to content

Commit

Permalink
fix: add backwards compatibility for brek/lambdaconf cli, ie "brek" w…
Browse files Browse the repository at this point in the history
…ithout any args still writes typedef file without having to specify command "write"
  • Loading branch information
mhweiner committed Dec 20, 2024
1 parent 2711700 commit 4d3025a
Showing 1 changed file with 2 additions and 5 deletions.
7 changes: 2 additions & 5 deletions bin/cli.js
Original file line number Diff line number Diff line change
Expand Up @@ -4,16 +4,13 @@ const cmd = process.argv[2];

switch (cmd) {

case 'generate-type':
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
require('../dist/writeTypeDef').writeTypeDef();
break;
case 'load':
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
require('../dist/index').loadConf().then(() => console.log('Brek: Config loaded and written to conf.json'));
break;
default:
console.log(`Unknown command: ${cmd}`);
// eslint-disable-next-line @typescript-eslint/no-require-imports, @typescript-eslint/no-var-requires
require('../dist/writeTypeDef').writeTypeDef();
break;

}

0 comments on commit 4d3025a

Please sign in to comment.