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.
25 lines
800 B
JSON
25 lines
800 B
JSON
{
|
|
"name": "@shellbook/server",
|
|
"version": "0.0.0",
|
|
"private": true,
|
|
"type": "module",
|
|
"scripts": {
|
|
"dev": "tsx watch src/main.ts",
|
|
"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"
|
|
}
|
|
}
|