mirror of
https://github.com/claude-code-best/claude-code.git
synced 2026-06-21 15:55:50 +00:00
Merge branch 'claude-code-best:main' into main
This commit is contained in:
@@ -4,8 +4,16 @@
|
|||||||
* via Bun's -d flag (bunfig.toml [define] doesn't propagate to
|
* via Bun's -d flag (bunfig.toml [define] doesn't propagate to
|
||||||
* dynamically imported modules at runtime).
|
* dynamically imported modules at runtime).
|
||||||
*/
|
*/
|
||||||
|
import { join, dirname } from "node:path";
|
||||||
|
import { fileURLToPath } from "node:url";
|
||||||
import { getMacroDefines } from "./defines.ts";
|
import { getMacroDefines } from "./defines.ts";
|
||||||
|
|
||||||
|
// Resolve project root from this script's location
|
||||||
|
const __filename = fileURLToPath(import.meta.url);
|
||||||
|
const __dirname = dirname(__filename);
|
||||||
|
const projectRoot = join(__dirname, "..");
|
||||||
|
const cliPath = join(projectRoot, "src/entrypoints/cli.tsx");
|
||||||
|
|
||||||
const defines = getMacroDefines();
|
const defines = getMacroDefines();
|
||||||
|
|
||||||
const defineArgs = Object.entries(defines).flatMap(([k, v]) => [
|
const defineArgs = Object.entries(defines).flatMap(([k, v]) => [
|
||||||
@@ -32,8 +40,8 @@ const inspectArgs = process.env.BUN_INSPECT
|
|||||||
: [];
|
: [];
|
||||||
|
|
||||||
const result = Bun.spawnSync(
|
const result = Bun.spawnSync(
|
||||||
["bun", ...inspectArgs, "run", ...defineArgs, ...featureArgs, "src/entrypoints/cli.tsx", ...process.argv.slice(2)],
|
["bun", ...inspectArgs, "run", ...defineArgs, ...featureArgs, cliPath, ...process.argv.slice(2)],
|
||||||
{ stdio: ["inherit", "inherit", "inherit"] },
|
{ stdio: ["inherit", "inherit", "inherit"], cwd: projectRoot },
|
||||||
);
|
);
|
||||||
|
|
||||||
process.exit(result.exitCode ?? 0);
|
process.exit(result.exitCode ?? 0);
|
||||||
|
|||||||
Reference in New Issue
Block a user