Two fixes required to repackage the macOS app after the split-grid frontend landed:
- The bundled node_modules is copied from desktop/node_modules, which only mirrored
4 of the 6 server runtime deps. google-auth-library (imported at server startup by
dist/push/fcm.js) and qrcode were missing, so the embedded server crashed on launch
("Cannot find package 'google-auth-library'"). Added both to desktop/package.json so
they're installed + bundled. (The old build predated the FCM code, hiding this.)
- electron-builder died with "ENOENT .bin/asar": node_modules/.bin holds dev-tool
symlinks (asar/tsc/esbuild) into packages the filter excludes, leaving dangling
symlinks in the bundle that electron-builder stat()s. Excluded .bin/** from the copy
(runtime deps load by path, not via .bin).
Verified: dist:mac builds clean (signed, DMG), installed to /Applications, embedded
server serves :3000 (HTTP 200) and the split-grid frontend loads.
36 lines
1.1 KiB
JSON
36 lines
1.1 KiB
JSON
{
|
|
"name": "web-terminal-desktop",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"author": "Yaojia Wang",
|
|
"description": "Electron desktop shell (Mac + Windows) that embeds the web-terminal server + node-pty. All-in-one: a native terminal that is also the LAN server.",
|
|
"main": "build/main.cjs",
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"scripts": {
|
|
"typecheck": "tsc -p tsconfig.json --noEmit",
|
|
"build": "node build.mjs",
|
|
"build:server": "cd .. && npm run build && npm run build:web",
|
|
"build:all": "npm run build:server && npm run build",
|
|
"start": "npm run build:all && electron .",
|
|
"dist:mac": "npm run build:all && electron-builder --mac",
|
|
"dist:win": "npm run build:all && electron-builder --win"
|
|
},
|
|
"dependencies": {
|
|
"express": "^5.2.1",
|
|
"google-auth-library": "^10.9.0",
|
|
"node-pty": "^1.1.0",
|
|
"qrcode": "^1.5.4",
|
|
"web-push": "3.6.7",
|
|
"ws": "^8.21.0"
|
|
},
|
|
"devDependencies": {
|
|
"electron": "^43.0.0",
|
|
"electron-builder": "^26.15.3",
|
|
"esbuild": "^0.28.1",
|
|
"typescript": "^6.0.3"
|
|
}
|
|
}
|