Files
miniSCP/package.json
T
JokinandClaude 6c05e39ce1 Re-sign electrobun's CLI binary so the app actually launches
`bun run start` printed nothing and exited 0 without ever opening a window.
electrobun's prebuilt CLI is a Bun single-file executable whose payload is
appended after the linker ad-hoc signed it, so `codesign -v` reports "code or
signature have been modified" and the macOS kernel SIGKILLs it at exec. The
failure was invisible because bin/electrobun.cjs spawns the real binary and
forwards `process.exit(code || 0)` — a signal death has `code === null`.

Confirmed upstream, not local corruption: a fresh download from the GitHub
release hashes identical to the shipped copy and fails the same check. Both
the darwin-arm64 and darwin-x64 CLI tarballs are affected.

scripts/fix-electrobun-cli.ts re-seals the binary with `codesign --force
--sign -`. It runs from postinstall AND ahead of every electrobun invocation,
because the wrapper downloads the CLI lazily on first use rather than at
install time — postinstall alone would no-op on a fresh checkout. When the
binary is missing it provokes that download first, so a clean tree self-heals.
It also fixes .cache/electrobun, which the wrapper restores bin/ from, and
release.ts re-signs the Rosetta x64 CLI on download and on cache reuse.

Idempotent (~0.3s when already valid) and a no-op off macOS. Verified from a
deleted-binary state: `bun run start` downloads, re-signs and launches.

Co-Authored-By: Claude <noreply@anthropic.com>
2026-09-22 13:10:28 +02:00

34 lines
976 B
JSON

{
"name": "miniscp",
"version": "0.1.0",
"private": true,
"type": "module",
"workspaces": [
"ui"
],
"scripts": {
"dev": "bun scripts/gen-version.ts && bun scripts/fix-electrobun-cli.ts && bun scripts/dev.ts",
"dev:ui": "bun run --cwd ui start",
"build:ui": "bun run --cwd ui build",
"build": "bun scripts/gen-version.ts && bun scripts/fix-electrobun-cli.ts && bun run build:ui && bunx electrobun build",
"start": "bun scripts/gen-version.ts && bun scripts/fix-electrobun-cli.ts && bun run build:ui && bunx electrobun dev",
"postinstall": "bun scripts/gen-version.ts && bun scripts/fix-electrobun-cli.ts",
"release": "bun scripts/release.ts"
},
"dependencies": {
"electrobun": "1.18.1",
"ssh-config": "^5.2.0",
"ssh2": "^1.17.0"
},
"devDependencies": {
"@resvg/resvg-js": "^2.6.2",
"@types/bun": "latest",
"@types/ssh2": "^1.15.5",
"png-to-ico": "^3.0.2",
"typescript": "~5.9.3"
},
"trustedDependencies": [
"@parcel/watcher"
]
}