feat(server): add persistent authentication and production build (#6)
Protect HTTP and WebSocket API routes with scrypt password login and signed persistent sessions. Restrict forwarded identity and HTTPS detection to configured proxies, and serve optional web assets with SPA fallback. Add @fastify/static for Fastify-compatible static file handling and esbuild to bundle TypeScript core source while retaining native dependencies externally.
This commit is contained in:
@@ -5,16 +5,20 @@
|
||||
"type": "module",
|
||||
"scripts": {
|
||||
"dev": "tsx watch src/main.ts",
|
||||
"build": "tsc -p tsconfig.json --noEmit",
|
||||
"build": "esbuild src/main.ts src/cli/set-password.ts --bundle --platform=node --target=node22 --format=esm --packages=external --outdir=dist --outbase=src --external:node-pty --alias:@shellbook/core=../../packages/core/src/index.ts",
|
||||
"start": "node dist/main.js",
|
||||
"set-password": "tsx src/cli/set-password.ts",
|
||||
"typecheck": "tsc -p tsconfig.json --noEmit",
|
||||
"test": "vitest run --passWithNoTests"
|
||||
},
|
||||
"dependencies": {
|
||||
"@fastify/static": "^8.0.0",
|
||||
"@fastify/websocket": "^11.0.1",
|
||||
"@shellbook/core": "workspace:*",
|
||||
"fastify": "^5.1.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
"esbuild": "^0.24.2",
|
||||
"tsx": "^4.19.2"
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user