vovk-cli 0.0.1-draft.21 → 0.0.1-draft.24

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,7 +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
+ initProgram(program.command('init'));
18
18
  program
19
19
  .command('dev')
20
20
  .description('Start schema watcher (optional flag --next-dev to start it with Next.js)')
@@ -4,8 +4,6 @@ import chalk from 'chalk';
4
4
  import getNPMPackageMetadata from '../utils/getNPMPackageMetadata.mjs';
5
5
  async function updateDeps({ packageJson, packageNames, channel, key, }) {
6
6
  return Promise.all(packageNames.map(async (packageName) => {
7
- if (packageJson[key]?.[packageName])
8
- return; // Skip if already present
9
7
  const metadata = await getNPMPackageMetadata(packageName);
10
8
  const isVovk = packageName.startsWith('vovk');
11
9
  const latestVersion = metadata['dist-tags'][isVovk ? (channel ?? 'latest') : 'latest'];
@@ -1,2 +1,2 @@
1
1
  import { Command } from 'commander';
2
- export default function initProgram(program: Command, command: string, isDefault?: boolean): Command;
2
+ export default function initProgram(program: Command): Command;
@@ -1,8 +1,8 @@
1
1
  import { Init } from './init/index.mjs';
2
2
  // reused at vovk-init
3
- export default function initProgram(program, command, isDefault = false) {
3
+ export default function initProgram(program) {
4
4
  return program
5
- .command(command + '[prefix]', { isDefault })
5
+ .argument('[prefix]', 'Directory to initialize project in', '.')
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.21",
3
+ "version": "0.0.1-draft.24",
4
4
  "bin": {
5
5
  "vovk": "./dist/index.mjs"
6
6
  },