vovk-cli 0.0.1-draft.19 → 0.0.1-draft.20

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.mjs CHANGED
@@ -14,6 +14,7 @@ import initProgram from './initProgram.mjs';
14
14
  const program = new Command();
15
15
  const packageJSON = JSON.parse(readFileSync(path.join(import.meta.dirname, '../package.json'), 'utf-8'));
16
16
  program.name('vovk').description('Vovk CLI').version(packageJSON.version);
17
+ initProgram(program, 'init ');
17
18
  program
18
19
  .command('dev')
19
20
  .description('Start schema watcher (optional flag --next-dev to start it with Next.js)')
@@ -72,7 +73,6 @@ program
72
73
  const schema = (await import(path.join(schemaOutAbsolutePath, 'index.js')));
73
74
  await generateClient(projectInfo, segments, schema.default);
74
75
  });
75
- initProgram(program, 'init ');
76
76
  program
77
77
  .command('new [components...]')
78
78
  .alias('n')
@@ -1,2 +1,2 @@
1
1
  import { Command } from 'commander';
2
- export default function initProgram(program: Command, command: string): Command;
2
+ export default function initProgram(program: Command, command: string, isDefault?: boolean): Command;
@@ -1,8 +1,8 @@
1
- // reused at vovk-init
2
1
  import { Init } from './init/index.mjs';
3
- export default function initProgram(program, command) {
2
+ // reused at vovk-init
3
+ export default function initProgram(program, command, isDefault = false) {
4
4
  return program
5
- .command(command + '[prefix]')
5
+ .command(command + '[prefix]', { isDefault })
6
6
  .description('Initialize Vovk project')
7
7
  .option('-y, --yes', 'Skip all prompts and use default values')
8
8
  .option('--log-level <level>', 'Set log level', 'info')
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "vovk-cli",
3
- "version": "0.0.1-draft.19",
3
+ "version": "0.0.1-draft.20",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },