Files
fusion/package.json
gsxdsm 14e41b0ebe fix(core,cli): make standalone binary actually run
Bun's --compile binary previously crashed at startup because:
  1. node:sqlite isn't implemented in Bun 1.3.8 (require returns
     undefined; import throws "No such built-in module")
  2. ink imports react-devtools-core inside its reconciler; even though
     gated by isDev(), the bundled module path failed to resolve at
     runtime

Fixes:
  - Add packages/core/src/sqlite-adapter.ts: a thin DatabaseSync wrapper
    that picks bun:sqlite under Bun and node:sqlite under Node via
    createRequire (so the bundler doesn't statically pull in either).
    Drop-in for the three core files that import DatabaseSync.
  - Install react-devtools-core as a workspace devDependency so it
    resolves at bundle time. The dev-only code path is still gated by
    DEV=true, so it stays inert in production.
  - Revert the prior --external react-devtools-core flag (no longer
    needed and was causing a different runtime error).
  - Mark node-pty external in tsup so esbuild stops choking on the
    homebridge fork's conditional native require()s
    (build/Release/conpty.node etc.) when bundling for the npm package.
  - Update bundle-output test: the bundle now contains both
    bun:sqlite and node:sqlite specifiers (loaded via createRequire).

Verified end-to-end: dist/fn dashboard -p 0 starts cleanly (no PTY,
sqlite, or devtools errors). Core tests 3038/3038, CLI tests 826/826
(up from 822/826 baseline).

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
2026-04-26 15:25:06 -07:00

70 lines
3.1 KiB
JSON

{
"name": "fusion-workspace",
"version": "0.0.0",
"private": true,
"license": "MIT",
"homepage": "https://github.com/Runfusion/Fusion#readme",
"repository": {
"type": "git",
"url": "https://github.com/Runfusion/Fusion"
},
"bugs": {
"url": "https://github.com/Runfusion/Fusion/issues"
},
"type": "module",
"packageManager": "pnpm@10.33.0",
"scripts": {
"dev": "node scripts/dev-with-memory.mjs",
"dev:ui": "pnpm --filter @fusion/dashboard dev",
"dev:hmr": "node scripts/dev-hmr.mjs",
"lint": "eslint .",
"sync:fusion-skill": "node scripts/sync-fusion-skill-tools.mjs",
"sync:fusion-skill:check": "node scripts/sync-fusion-skill-tools.mjs --check",
"build": "pnpm -r build",
"verify:workspace": "pnpm lint && pnpm test && pnpm build",
"build:exe": "pnpm build && pnpm --filter @runfusion/fusion build:exe",
"build:exe:all": "pnpm build && pnpm --filter @runfusion/fusion build:exe:all",
"test": "pnpm sync:fusion-skill:check && pnpm -r --workspace-concurrency=4 test",
"test:serial": "pnpm -r --workspace-concurrency=1 test",
"test:fast": "pnpm -r --workspace-concurrency=4 test",
"test:build": "pnpm --filter @fusion/dashboard test:build",
"test:isolated": "node scripts/check-test-isolation.mjs --before && pnpm test && node scripts/check-test-isolation.mjs",
"test:check-isolation": "node scripts/check-test-isolation.mjs",
"test:coverage": "pnpm -r --workspace-concurrency=1 exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:core": "pnpm --filter @fusion/core exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:engine": "pnpm --filter @fusion/engine exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:cli": "pnpm --filter @runfusion/fusion exec vitest run --silent=passed-only --reporter=dot --coverage",
"test:coverage:dashboard": "pnpm --filter @fusion/dashboard exec vitest run --silent=passed-only --reporter=dot --coverage",
"typecheck": "pnpm -r typecheck",
"changeset": "changeset",
"version": "changeset version",
"release": "node scripts/release.mjs",
"release:version": "changeset version",
"mobile:build": "pnpm --filter @fusion/dashboard build && pnpm --filter @fusion/mobile cap sync",
"mobile:ios": "pnpm mobile:build && pnpm --filter @fusion/mobile cap open ios",
"mobile:android": "pnpm mobile:build && pnpm --filter @fusion/mobile cap open android",
"mobile:dev:ios": "pnpm --filter @fusion/mobile dev:ios",
"mobile:dev:android": "pnpm --filter @fusion/mobile dev:android",
"mobile:sync": "pnpm --filter @fusion/mobile cap sync",
"build:desktop": "pnpm --filter @fusion/desktop build"
},
"pnpm": {
"onlyBuiltDependencies": [
"@homebridge/node-pty-prebuilt-multiarch",
"electron",
"esbuild",
"koffi",
"protobufjs"
]
},
"devDependencies": {
"@changesets/cli": "^2.30.0",
"@eslint/js": "^9.0.0",
"eslint": "^9.0.0",
"react-devtools-core": "^7.0.1",
"tsx": "^4.19.0",
"typescript": "^5.7.0",
"typescript-eslint": "^8.0.0"
}
}