From 4d3025a7429be7811d65d03abddb02b747598d81 Mon Sep 17 00:00:00 2001 From: "Marc H. Weiner" Date: Fri, 20 Dec 2024 15:50:38 -0500 Subject: [PATCH] fix: add backwards compatibility for brek/lambdaconf cli, ie "brek" without any args still writes typedef file without having to specify command "write" --- bin/cli.js | 7 ++----- 1 file changed, 2 insertions(+), 5 deletions(-) diff --git a/bin/cli.js b/bin/cli.js index 8d2e3fe..9422c2d 100755 --- a/bin/cli.js +++ b/bin/cli.js @@ -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; }