fix(cli): declare node-pty as runtime dep so npx runfusion.ai terminal works on clean install

node-pty was previously only present transitively via the workspace
@fusion/dashboard devDependency, which is stripped at publish time. Fresh
users running `npx runfusion.ai` hit a 503 "PTY module could not be loaded"
when opening the dashboard terminal. Tightened the package-config guard so
this regression is caught next time.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
gsxdsm
2026-05-05 15:02:41 -07:00
parent b41396de4b
commit 61dac2801d
4 changed files with 10 additions and 2 deletions

View File

@@ -0,0 +1,5 @@
---
"@runfusion/fusion": patch
---
fix: declare node-pty as a runtime dependency so `npx runfusion.ai` can start the embedded terminal on a clean install. Previously node-pty was only present transitively via the workspace `@fusion/dashboard` devDependency, which is stripped at publish time — fresh users hit a 503 "PTY module could not be loaded" when opening the dashboard terminal. The package-config test guard has been tightened to catch this regression.

View File

@@ -64,6 +64,7 @@
"ink-text-input": "^6.0.0", "ink-text-input": "^6.0.0",
"ioredis": "^5.6.0", "ioredis": "^5.6.0",
"multer": "^2.1.1", "multer": "^2.1.1",
"node-pty": "npm:@homebridge/node-pty-prebuilt-multiarch@^0.13.1",
"react": "^19.0.0" "react": "^19.0.0"
}, },
"peerDependencies": { "peerDependencies": {

View File

@@ -118,9 +118,8 @@ describe("CLI package.json publishing config", () => {
const TRANSITIVE_EXTERNALS: Record<string, string> = { const TRANSITIVE_EXTERNALS: Record<string, string> = {
ssh2: "transitive dep of dockerode", ssh2: "transitive dep of dockerode",
"cpu-features": "transitive dep of dockerode (via ssh2)", "cpu-features": "transitive dep of dockerode (via ssh2)",
"node-pty": "only loaded by the Bun-compiled binary from dist/runtime/",
"@homebridge/node-pty-prebuilt-multiarch": "@homebridge/node-pty-prebuilt-multiarch":
"only loaded by the Bun-compiled binary from dist/runtime/", "aliased as node-pty in dependencies; the alias entry satisfies the import",
}; };
it("parses externals from tsup.config.ts", () => { it("parses externals from tsup.config.ts", () => {

3
pnpm-lock.yaml generated
View File

@@ -59,6 +59,9 @@ importers:
multer: multer:
specifier: ^2.1.1 specifier: ^2.1.1
version: 2.1.1 version: 2.1.1
node-pty:
specifier: npm:@homebridge/node-pty-prebuilt-multiarch@^0.13.1
version: '@homebridge/node-pty-prebuilt-multiarch@0.13.1'
react: react:
specifier: ^19.0.0 specifier: ^19.0.0
version: 19.2.4 version: 19.2.4