Files
Kirill Dubovitskiy 16ea2acc73 Split self-host publishing out of the production server package
d2d2f730 renamed packages/happy-server to happy-server-self-host so the
self-host runtime could be published to npm, but that directory is also the
production backend, and the rename left /Dockerfile.server and /Dockerfile
running `pnpm --filter happy-server ...`. pnpm exits 0 on an unmatched filter,
so the production image's build step became a no-op and its CMD became a
container that prints one line and exits 0 instead of serving. Production has
not been redeployed since.

Actually split the two roles:

- packages/happy-server goes back to being private "happy-server", the
  production backend. It is never published, so npm's squatted bare name is
  irrelevant to it.
- packages/happy-server-self-host is a new publishing shell that keeps the
  published name and version. Its build bun-bundles the sibling's
  sources/standalone.ts into dist/ and copies prisma/ in, both of which must
  live inside the package because the runtime resolves migrations from cwd.
  It asserts its dependency list matches the sibling's, since the bundle
  externalizes every dependency and drift would otherwise fail at require time.

Fixing the Docker filters alone was not enough: `build` now also bundles the
npm runtime via bun, which neither image installs, and the full typecheck
includes machinesRoutes.spec.ts, which imports happy-app source that the
builder stage does not copy. Production therefore gets tsconfig.build.json,
which excludes specs, and `build` runs that typecheck only.

Every pnpm filter invocation gets --fail-if-no-match so a future rename fails
the build instead of silently doing nothing, and Dockerfile.server's CMD no
longer depends on the package name at all.

Add .github/workflows/server.yml: the server package had no CI coverage, which
is why this went unnoticed for 74 days. It typechecks and tests the package and
builds both images and boots them, asserting they serve — the only check that
catches a no-op CMD.

Also revert 450f29e9, a hardcoded voice grant for one account that was written
to deploy immediately and never shipped.
2026-08-03 03:15:33 -07:00

61 lines
2.2 KiB
JSON

{
"name": "monorepo",
"private": true,
"scripts": {
"cli": "pnpm --filter happy cli",
"release": "node ./scripts/release.cjs",
"web": "pnpm --filter happy-app web",
"codium": "pnpm --filter codium dev",
"app-logs": "pnpm --filter happy-app-logs start",
"postinstall": "node ./scripts/postinstall.cjs",
"env:new": "tsx environments/environments.ts new",
"env:list": "tsx environments/environments.ts list",
"env:use": "tsx environments/environments.ts use",
"env:remove": "tsx environments/environments.ts remove",
"env:current": "tsx environments/environments.ts current",
"env:server": "tsx environments/environments.ts run server",
"env:web": "tsx environments/environments.ts run web",
"env:ios": "tsx environments/environments.ts run ios",
"env:android": "tsx environments/environments.ts run android",
"env:cli": "tsx environments/environments.ts run cli",
"env:seed": "tsx environments/environments.ts seed",
"env:up": "tsx environments/environments.ts up",
"env:up:authenticated": "pnpm env:up --template authenticated-empty",
"env:down": "tsx environments/environments.ts down",
"env:tailscale": "tsx environments/environments.ts tailscale"
},
"workspaces": {
"packages": [
"packages/happy-app",
"packages/happy-agent",
"packages/happy-cli",
"packages/happy-server",
"packages/happy-server-self-host",
"packages/happy-wire",
"packages/happy-app-logs",
"packages/codium"
]
},
"pnpm": {
"overrides": {
"whatwg-url": "14.2.0",
"parse-path": "7.0.3",
"@types/parse-path": "7.0.3"
},
"onlyBuiltDependencies": [
"@more-tech/react-native-libsodium",
"@prisma/client",
"@prisma/engines",
"@shopify/react-native-skia",
"@tailwindcss/oxide",
"better-sqlite3",
"electron",
"esbuild",
"node-pty",
"prisma",
"sharp"
]
},
"packageManager": "pnpm@10.11.0"
}