@within-7/minto 0.4.3 → 0.4.5
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/cli.cjs +4 -3
- package/cli.js +1313 -1045
- package/package.json +2 -2
package/cli.cjs
CHANGED
|
@@ -2,8 +2,9 @@
|
|
|
2
2
|
/**
|
|
3
3
|
* Minto CLI Wrapper
|
|
4
4
|
* Priority 1: Pre-compiled native binary (from optionalDependencies)
|
|
5
|
-
* Priority 2:
|
|
6
|
-
* Priority 3:
|
|
5
|
+
* Priority 2: Node.js runtime (cli.js is built with --target node)
|
|
6
|
+
* Priority 3: Bun runtime (fallback — bundled undici SSE streaming
|
|
7
|
+
* may behave differently under Bun)
|
|
7
8
|
*/
|
|
8
9
|
var childProcess = require('child_process');
|
|
9
10
|
var fs = require('fs');
|
|
@@ -46,8 +47,8 @@ function run(command, cmdArgs) {
|
|
|
46
47
|
|
|
47
48
|
var nativeBinary = getNativeBinaryPath();
|
|
48
49
|
if (nativeBinary) { run(nativeBinary, args); }
|
|
49
|
-
else if (fs.existsSync(cliPath) && isAvailable('bun')) { run('bun', ['run', cliPath].concat(args)); }
|
|
50
50
|
else if (fs.existsSync(cliPath) && isAvailable('node')) { run('node', [cliPath].concat(args)); }
|
|
51
|
+
else if (fs.existsSync(cliPath) && isAvailable('bun')) { run('bun', ['run', cliPath].concat(args)); }
|
|
51
52
|
else {
|
|
52
53
|
console.error('');
|
|
53
54
|
console.error('Minto: no runtime found. Install Node.js 20+ or Bun:');
|