vona-cli 1.0.375 → 1.0.376

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.
Files changed (2) hide show
  1. package/dist/bin/vona.js +19 -6
  2. package/package.json +1 -1
package/dist/bin/vona.js CHANGED
@@ -24,22 +24,35 @@ async function checkPnpm() {
24
24
  }
25
25
  }
26
26
  async function main() {
27
- let args = [];
28
27
  // bootstrapFile
29
28
  let bootstrapFile = path.join(import.meta.dirname, '../bootstrap.ts');
30
29
  if (!fse.existsSync(bootstrapFile)) {
31
30
  bootstrapFile = path.join(import.meta.dirname, '../bootstrap.js');
32
31
  }
32
+ // args
33
+ let args = [];
33
34
  const rawArgv = process.argv.slice(2);
34
35
  const isPlay = rawArgv[0] === 'play';
36
+ const isPlayAttach = isPlay && (rawArgv.includes('-a') || rawArgv.includes('--attach'));
35
37
  if (isPlay) {
38
+ if (!isPlayAttach) {
39
+ args.push(bootstrapFile);
40
+ }
36
41
  args = args.concat([':bin:play']).concat(rawArgv.slice(1)).concat(['--dummy']);
42
+ }
43
+ else {
44
+ args.push(bootstrapFile);
45
+ args = args.concat(rawArgv);
46
+ }
47
+ // run
48
+ if (isPlayAttach) {
37
49
  const command = new VonaCommand(args, true);
38
50
  await command.start();
39
- return;
40
51
  }
41
- args.push(bootstrapFile);
42
- args = args.concat(rawArgv);
43
- await checkPnpm();
44
- processHelper.spawnCmd({ cmd: 'tsx', args });
52
+ else {
53
+ if (!isPlay) {
54
+ await checkPnpm();
55
+ }
56
+ processHelper.spawnCmd({ cmd: 'tsx', args });
57
+ }
45
58
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "vona-cli",
3
3
  "type": "module",
4
- "version": "1.0.375",
4
+ "version": "1.0.376",
5
5
  "description": "vona cli",
6
6
  "publishConfig": {
7
7
  "access": "public"