Files
netris-nestri/package.json
Wanjohi b9b090a620 fix(deploy): stop bun dev when either half dies, not just the API
The issuer ran in the background and nothing watched it. If it failed to
bind, or exited an hour later, the API kept serving and kept reporting
itself ready — while every authenticated request failed, because there was
no issuer to verify a token against. That is the worst shape for a
development failure: the thing you are looking at looks fine.

Both run in the background now, and the script waits for either to stop
before killing the other. The previous form only handled the direction
where the API was the one that exited.
2026-09-05 16:39:08 +03:00

40 lines
1.5 KiB
JSON

{
"name": "nestri",
"private": true,
"license": "Apache-2.0",
"workspaces": {
"packages": [
"apps/*",
"packages/*"
],
"catalog": {
"@cloudflare/workers-types": "^5.20260722.1",
"@tsconfig/node22": "^22.0.5",
"@types/bun": "latest",
"@types/node": "^26.1.1",
"hono": "^4.12.31",
"typescript": "^7.0.1-rc",
"zod": "^4.4.3"
}
},
"type": "module",
"scripts": {
"dev": "wrangler dev -c apps/auth/wrangler.jsonc & issuer=$!; wrangler dev -c apps/api/wrangler.jsonc & api=$!; trap 'kill $issuer $api 2>/dev/null' EXIT INT TERM; while kill -0 $issuer 2>/dev/null && kill -0 $api 2>/dev/null; do sleep 1; done",
"dev:server": "bun run --cwd apps/auth serve & issuer=$!; bun run --cwd apps/api serve & api=$!; trap 'kill $issuer $api 2>/dev/null' EXIT INT TERM; while kill -0 $issuer 2>/dev/null && kill -0 $api 2>/dev/null; do sleep 1; done",
"dev:docker": "docker compose up --build",
"db:migrate": "bun run --cwd packages/core db:migrate",
"db:push": "bun run --cwd packages/core db:push",
"test": "test",
"deploy:sandbox": "wrangler deploy -c apps/auth/wrangler.jsonc -e sandbox && wrangler deploy -c apps/api/wrangler.jsonc -e sandbox",
"deploy:production": "wrangler deploy -c apps/auth/wrangler.jsonc -e production && wrangler deploy -c apps/api/wrangler.jsonc -e production"
},
"devDependencies": {
"oxfmt": "^0.61.0",
"oxlint": "^1.76.0",
"wrangler": "^4.45.0"
},
"peerDependencies": {
"typescript": "catalog:"
}
}