Files
routstrd/package.json
T
redshift cf1ca5941a feat(update): restart daemons after update
The update command previously only downloaded and installed new
binaries for routstrd and cocod without restarting the running
daemons, so updates would not take effect until a manual restart.

- Add restartDaemonsAfterUpdate() helper that gracefully stops and
  restarts both daemons after a successful update
- routstrd: uses POST /stop (drains active connections), polls for
    shutdown, then calls startDaemon() with configured port/provider
- cocod: runs 'cocod stop', then spawns 'cocod daemon' detached,
    polls 'cocod ping' until it comes back up
- Skips restart for daemons that weren't running
- Skips routstrd daemon restart when using a remote daemon
- Collects and reports failures without rolling back the update
- Bump @routstr/sdk to 0.3.15
- Bump routstrd version to 0.3.7

Closes nostr task: update-restart
2026-07-08 16:39:31 +08:00

38 lines
999 B
JSON

{
"name": "routstrd",
"version": "0.3.7",
"module": "src/index.ts",
"type": "module",
"private": false,
"bin": {
"routstrd": "./dist/index.js"
},
"scripts": {
"start": "bun src/index.ts start",
"monitor": "bun src/index.ts monitor",
"lint": "tsc --noEmit",
"test": "bun test",
"build": "mkdir -p dist/daemon && bun build src/index.ts --target=bun --outfile=dist/index.js && bun build src/daemon/index.ts --target=bun --outfile=dist/daemon/index.js",
"prepublishOnly": "bun run build"
},
"devDependencies": {
"@types/bun": "latest",
"@types/qrcode": "^1.5.6"
},
"peerDependencies": {
"typescript": "^5"
},
"dependencies": {
"@cashu/cashu-ts": "^4.3.0",
"@routstr/sdk": "^0.3.15",
"applesauce-core": "^5.1.0",
"applesauce-relay": "^5.1.0",
"applesauce-wallet-connect": "^6.0.0",
"commander": "^14.0.2",
"nostr-tools": "^2.12.0",
"qrcode": "^1.5.4",
"rxjs": "^7.8.1",
"zustand": "^5.0.5"
}
}