subagent-cli 0.2.5 → 0.2.6
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/cli.cjs +6 -5
- package/package.json +1 -1
package/dist/cli.cjs
CHANGED
|
@@ -6,6 +6,7 @@ const path = require('path');
|
|
|
6
6
|
const libDir = path.resolve(__dirname, '..');
|
|
7
7
|
const entry = path.join(libDir, 'src', 'entrypoints', 'cli.tsx');
|
|
8
8
|
const preload = path.join(libDir, 'stubs', 'globals.ts');
|
|
9
|
+
const tsconfig = path.join(libDir, 'tsconfig.json');
|
|
9
10
|
|
|
10
11
|
// Find Bun
|
|
11
12
|
let bunPath;
|
|
@@ -17,12 +18,12 @@ try {
|
|
|
17
18
|
process.exit(1);
|
|
18
19
|
}
|
|
19
20
|
|
|
20
|
-
// Launch Bun
|
|
21
|
-
//
|
|
22
|
-
|
|
23
|
-
const child = spawn(bunPath, ['run', '--cwd', libDir, '--preload', preload, entry, ...process.argv.slice(2)], {
|
|
21
|
+
// Launch Bun in the USER's cwd (not the package dir).
|
|
22
|
+
// Use --tsconfig-override to resolve src/* path aliases without changing cwd.
|
|
23
|
+
const child = spawn(bunPath, ['run', '--tsconfig-override', tsconfig, '--preload', preload, entry, ...process.argv.slice(2)], {
|
|
24
24
|
stdio: 'inherit',
|
|
25
|
-
|
|
25
|
+
cwd: process.cwd(),
|
|
26
|
+
env: process.env,
|
|
26
27
|
});
|
|
27
28
|
|
|
28
29
|
child.on('exit', (code) => process.exit(code ?? 0));
|