@leeoohoo/ui-apps-devkit 0.1.3 → 0.1.4

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.
@@ -1,4 +1,4 @@
1
1
  #!/usr/bin/env node
2
2
  import { runCli } from '../src/cli.js';
3
3
 
4
- runCli(process.argv.slice(2));
4
+ runCli(process.argv);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@leeoohoo/ui-apps-devkit",
3
- "version": "0.1.3",
3
+ "version": "0.1.4",
4
4
  "description": "ChatOS UI Apps DevKit (CLI + templates + sandbox) for building installable ChatOS UI Apps plugins.",
5
5
  "license": "MIT",
6
6
  "type": "module",
package/src/lib/args.js CHANGED
@@ -1,5 +1,20 @@
1
1
  export function parseArgs(argv) {
2
- const raw = Array.isArray(argv) ? argv.slice(2) : [];
2
+ const rawArgs = Array.isArray(argv) ? argv.slice() : [];
3
+ const head = rawArgs[0] || '';
4
+ const second = rawArgs[1] || '';
5
+ const hasRuntimePrefix =
6
+ head.endsWith('node') ||
7
+ head.endsWith('node.exe') ||
8
+ head.includes('/node') ||
9
+ head.includes('\\node') ||
10
+ head.endsWith('bun') ||
11
+ head.endsWith('bun.exe') ||
12
+ head.includes('/bun') ||
13
+ head.includes('\\bun') ||
14
+ second.endsWith('.js') ||
15
+ second.endsWith('.mjs') ||
16
+ second.endsWith('.cjs');
17
+ const raw = hasRuntimePrefix ? rawArgs.slice(2) : rawArgs;
3
18
  const flags = {};
4
19
  const positionals = [];
5
20
 
@@ -46,4 +61,3 @@ export function parseArgs(argv) {
46
61
 
47
62
  return { positionals, flags };
48
63
  }
49
-