From af331177ac61fae7a2c66888579a5f59933e4786 Mon Sep 17 00:00:00 2001 From: Florian Schmidt Date: Mon, 16 Nov 2026 00:07:18 +0100 Subject: [PATCH 1/2] 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. --- apps/server/package.json | 6 +- apps/server/src/app.ts | 10 +- apps/server/src/auth/credentials.ts | 29 ++ apps/server/src/auth/index.ts | 58 ++++ apps/server/src/auth/session.ts | 24 ++ apps/server/src/cli/set-password.ts | 36 ++ apps/server/src/main.ts | 15 +- apps/server/src/static/index.ts | 15 + apps/server/test/auth.test.ts | 133 ++++++++ pnpm-lock.yaml | 494 ++++++++++++++++++++++++++++ 10 files changed, 817 insertions(+), 3 deletions(-) create mode 100644 apps/server/src/auth/credentials.ts create mode 100644 apps/server/src/auth/index.ts create mode 100644 apps/server/src/auth/session.ts create mode 100644 apps/server/src/cli/set-password.ts create mode 100644 apps/server/src/static/index.ts create mode 100644 apps/server/test/auth.test.ts diff --git a/apps/server/package.json b/apps/server/package.json index 445bd6e..e534cb0 100644 --- a/apps/server/package.json +++ b/apps/server/package.json @@ -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" } } diff --git a/apps/server/src/app.ts b/apps/server/src/app.ts index 183e24a..5b4f655 100644 --- a/apps/server/src/app.ts +++ b/apps/server/src/app.ts @@ -1,8 +1,14 @@ import Fastify, { type FastifyInstance } from "fastify"; import websocket from "@fastify/websocket"; +import { resolve } from "node:path"; +import { registerAuth, type AuthOptions } from "./auth"; +import { registerStatic } from "./static"; export interface AppOptions { logger?: boolean; + auth?: AuthOptions; + trustProxy?: string[]; + staticDir?: string; } /** @@ -13,10 +19,12 @@ export interface AppOptions { * M5 src/auth/ (login, persistent session secret) */ export async function buildApp(options: AppOptions = {}): Promise { - const app = Fastify({ logger: options.logger ?? false }); + const app = Fastify({ logger: options.logger ?? false, trustProxy: options.trustProxy ?? false }); + await registerAuth(app, options.auth ?? { dataDir: resolve(process.env.SHELLBOOK_DATA_DIR ?? "data") }); await app.register(websocket); app.get("/api/health", async () => ({ ok: true })); + await registerStatic(app, options.staticDir ?? resolve("apps/web/dist")); return app; } diff --git a/apps/server/src/auth/credentials.ts b/apps/server/src/auth/credentials.ts new file mode 100644 index 0000000..4df02eb --- /dev/null +++ b/apps/server/src/auth/credentials.ts @@ -0,0 +1,29 @@ +import { randomBytes, scrypt as derive, timingSafeEqual } from "node:crypto"; +import { promisify } from "node:util"; +import { mkdir, readFile, rename, writeFile } from "node:fs/promises"; +import { join } from "node:path"; + +const scrypt = promisify(derive); +export async function hashPassword(password: string): Promise { + if (!password || Buffer.byteLength(password) > 4096) throw new Error("Password must contain 1–4096 bytes"); + const salt = randomBytes(32).toString("hex"); + const hash = await scrypt(password, salt, 64) as Buffer; + return `scrypt:${salt}:${hash.toString("hex")}`; +} +export async function verifyPassword(password: string, encoded: string): Promise { + if (!password || Buffer.byteLength(password) > 4096 || !/^scrypt:[a-f0-9]{64}:[a-f0-9]{128}$/.test(encoded)) return false; + const [, salt, hash] = encoded.split(":"); + const actual = await scrypt(password, salt!, 64) as Buffer; + return timingSafeEqual(actual, Buffer.from(hash!, "hex")); +} +export async function readPasswordHash(dataDir: string): Promise { + try { return (JSON.parse(await readFile(join(dataDir, "auth.json"), "utf8")) as { passwordHash: string }).passwordHash; } + catch (error) { if ((error as NodeJS.ErrnoException).code === "ENOENT") return undefined; throw error; } +} +export async function setPassword(dataDir: string, password: string): Promise { + const passwordHash = await hashPassword(password); + await mkdir(dataDir, { recursive: true, mode: 0o700 }); + const temp = join(dataDir, `auth.${randomBytes(8).toString("hex")}.tmp`); + await writeFile(temp, JSON.stringify({ passwordHash }) + "\n", { mode: 0o600, flag: "wx" }); + await rename(temp, join(dataDir, "auth.json")); +} diff --git a/apps/server/src/auth/index.ts b/apps/server/src/auth/index.ts new file mode 100644 index 0000000..bafd205 --- /dev/null +++ b/apps/server/src/auth/index.ts @@ -0,0 +1,58 @@ +import type { FastifyInstance } from "fastify"; +import { readPasswordHash, verifyPassword } from "./credentials"; +import { loadSessionSecret, signSession, verifySession } from "./session"; + +export interface AuthOptions { + dataDir: string; + sessionMaxAgeSeconds?: number; + forwardAuth?: { header: string; trustedProxyIps: string[] }; + /** Failed attempts permitted per IP per window. */ + maxAttempts?: number; + rateWindowMs?: number; +} +const normalizeIp = (ip: string) => ip.replace(/^::ffff:/, ""); +export async function registerAuth(app: FastifyInstance, options: AuthOptions): Promise { + const secret = loadSessionSecret(options.dataDir); + const maxAge = options.sessionMaxAgeSeconds ?? 30 * 86400; + if (!Number.isSafeInteger(maxAge) || maxAge <= 0) throw new Error("Invalid session lifetime"); + const failures = new Map(); + const cookie = (value: string, secure: boolean, age: number) => + `shellbook_session=${value}; Path=/; HttpOnly; SameSite=Strict; Max-Age=${age}${secure ? "; Secure" : ""}`; + app.addHook("onRequest", async (request, reply) => { + const path = request.url.split("?")[0]!; + if (!(path === "/api" || path.startsWith("/api/"))) return; + // Also protect cookie-bearing WebSocket upgrades against cross-site requests. + const origin = request.headers.origin; + if (origin) { + try { if (new URL(origin).host !== request.headers.host) return reply.code(403).send({ error: "Origin rejected" }); } + catch { return reply.code(403).send({ error: "Origin rejected" }); } + } + if (path === "/api/health" || path === "/api/auth/login") return; + const forward = options.forwardAuth; + const peer = normalizeIp(request.raw.socket?.remoteAddress ?? ""); + if (forward && forward.trustedProxyIps.some(ip => normalizeIp(ip) === peer)) { + const user = request.headers[forward.header.toLowerCase()]; + if (typeof user === "string" && user.trim()) return; + } + const token = request.headers.cookie?.split(";").map(part => part.trim()).find(part => part.startsWith("shellbook_session="))?.slice("shellbook_session=".length); + if (!token || !verifySession(secret, token)) return reply.code(401).send({ error: "Authentication required" }); + }); + app.post("/api/auth/login", { bodyLimit: 8192 }, async (request, reply) => { + const now = Date.now(); + for (const [key, value] of failures) if (value.until <= now) failures.delete(key); + const ip = request.ip; + const entry = failures.get(ip); + if ((entry?.count ?? 0) >= (options.maxAttempts ?? 5) || (!entry && failures.size >= 10000)) { + return reply.header("Retry-After", String(Math.max(1, Math.ceil(((entry?.until ?? now + 60000) - now) / 1000)))).code(429).send({ error: "Try again later" }); + } + // Reserve before scrypt awaits, so parallel attempts cannot bypass the limit. + failures.set(ip, { count: (entry?.count ?? 0) + 1, until: entry?.until ?? now + (options.rateWindowMs ?? 60000) }); + const password = (request.body as { password?: unknown } | null)?.password; + const hash = await readPasswordHash(options.dataDir); + if (typeof password !== "string" || !hash || !await verifyPassword(password, hash)) return reply.code(401).send({ error: "Invalid credentials" }); + failures.delete(ip); + return reply.header("Cache-Control", "no-store").header("Set-Cookie", cookie(signSession(secret, now + maxAge * 1000), request.protocol === "https", maxAge)).code(204).send(); + }); + app.post("/api/auth/logout", async (request, reply) => reply.header("Set-Cookie", cookie("", request.protocol === "https", 0)).code(204).send()); + app.get("/api/auth/me", async (_request, reply) => reply.header("Cache-Control", "no-store").send({ authenticated: true })); +} diff --git a/apps/server/src/auth/session.ts b/apps/server/src/auth/session.ts new file mode 100644 index 0000000..8f657c6 --- /dev/null +++ b/apps/server/src/auth/session.ts @@ -0,0 +1,24 @@ +import { createHmac, randomBytes, timingSafeEqual } from "node:crypto"; +import { mkdirSync, readFileSync, writeFileSync, chmodSync } from "node:fs"; +import { join } from "node:path"; + +export function loadSessionSecret(dataDir: string): Buffer { + mkdirSync(dataDir, { recursive: true, mode: 0o700 }); + const path = join(dataDir, "session-secret"); + try { writeFileSync(path, randomBytes(32), { flag: "wx", mode: 0o600 }); } + catch (error) { if ((error as NodeJS.ErrnoException).code !== "EEXIST") throw error; } + const secret = readFileSync(path); + if (secret.length !== 32) throw new Error("Invalid session-secret (expected 32 bytes)"); + chmodSync(path, 0o600); + return secret; +} +export function signSession(secret: Buffer, expiresAt: number): string { + const payload = String(expiresAt); + return `${payload}.${createHmac("sha256", secret).update(payload).digest("base64url")}`; +} +export function verifySession(secret: Buffer, cookie: string, now = Date.now()): boolean { + if (!/^\d{1,16}\.[A-Za-z0-9_-]{43}$/.test(cookie)) return false; + const [payload, mac] = cookie.split("."); + const expected = signSession(secret, Number(payload)).split(".")[1]!; + return Number(payload) > now && timingSafeEqual(Buffer.from(mac!), Buffer.from(expected)); +} diff --git a/apps/server/src/cli/set-password.ts b/apps/server/src/cli/set-password.ts new file mode 100644 index 0000000..6bfa873 --- /dev/null +++ b/apps/server/src/cli/set-password.ts @@ -0,0 +1,36 @@ +import { createInterface } from "node:readline/promises"; +import { resolve } from "node:path"; +import { setPassword } from "../auth/credentials"; + +// TTY input is hidden; piped input is a single line (never a command-line argument). +async function readPassword(): Promise { + if (!process.stdin.isTTY) { + const reader = createInterface({ input: process.stdin }); + try { for await (const line of reader) return line; return ""; } + finally { reader.close(); } + } + process.stderr.write("New ShellBook password: "); + process.stdin.setRawMode(true); + process.stdin.resume(); + process.stdin.setEncoding("utf8"); + return new Promise((resolvePassword, reject) => { + let password = ""; + const onData = (chunk: string) => { + for (const char of chunk) { + if (char === "\r" || char === "\n" || char === "\u0003") { + process.stdin.off("data", onData); + process.stdin.setRawMode(false); + process.stdin.pause(); + process.stderr.write("\n"); + if (char === "\u0003") reject(new Error("Cancelled")); else resolvePassword(password); + return; + } + if (char === "\u007f" || char === "\b") password = password.slice(0, -1); + else password += char; + } + }; + process.stdin.on("data", onData); + }); +} +await setPassword(resolve(process.env.SHELLBOOK_DATA_DIR ?? "data"), await readPassword()); +console.log("Password saved. Existing sessions remain valid until expiry."); diff --git a/apps/server/src/main.ts b/apps/server/src/main.ts index f67ffeb..9acac6d 100644 --- a/apps/server/src/main.ts +++ b/apps/server/src/main.ts @@ -3,5 +3,18 @@ import { buildApp } from "./app"; const host = process.env.SHELLBOOK_HOST ?? "127.0.0.1"; const port = Number(process.env.SHELLBOOK_PORT ?? 8080); -const app = await buildApp({ logger: true }); +const proxies = process.env.SHELLBOOK_TRUSTED_PROXIES?.split(",").map(ip => ip.trim()).filter(Boolean) ?? []; +const app = await buildApp({ + logger: true, + trustProxy: proxies, + staticDir: process.env.SHELLBOOK_STATIC_DIR, + auth: { + dataDir: process.env.SHELLBOOK_DATA_DIR ?? "data", + sessionMaxAgeSeconds: Number(process.env.SHELLBOOK_SESSION_SECONDS ?? 2592000), + forwardAuth: process.env.SHELLBOOK_FORWARD_AUTH_HEADER ? { + header: process.env.SHELLBOOK_FORWARD_AUTH_HEADER, + trustedProxyIps: proxies, + } : undefined, + }, +}); await app.listen({ host, port }); diff --git a/apps/server/src/static/index.ts b/apps/server/src/static/index.ts new file mode 100644 index 0000000..87c5545 --- /dev/null +++ b/apps/server/src/static/index.ts @@ -0,0 +1,15 @@ +import { existsSync } from "node:fs"; +import { resolve } from "node:path"; +import type { FastifyInstance } from "fastify"; +import fastifyStatic from "@fastify/static"; + +export async function registerStatic(app: FastifyInstance, directory: string): Promise { + const root = resolve(directory); + if (!existsSync(resolve(root, "index.html"))) return; + await app.register(fastifyStatic, { root, wildcard: false }); + app.setNotFoundHandler((request, reply) => { + const path = request.url.split("?")[0]!; + if (path === "/api" || path.startsWith("/api/") || !["GET", "HEAD"].includes(request.method)) return reply.code(404).send({ error: "Not found" }); + return reply.type("text/html").sendFile("index.html"); + }); +} diff --git a/apps/server/test/auth.test.ts b/apps/server/test/auth.test.ts new file mode 100644 index 0000000..710f4ac --- /dev/null +++ b/apps/server/test/auth.test.ts @@ -0,0 +1,133 @@ +import { afterEach, describe, expect, it } from "vitest"; +import { mkdtemp, readFile, rm, stat, writeFile } from "node:fs/promises"; +import { tmpdir } from "node:os"; +import { join } from "node:path"; +import type { FastifyInstance } from "fastify"; +import { buildApp, type AppOptions } from "../src/app"; +import { hashPassword, setPassword, verifyPassword } from "../src/auth/credentials"; +import { loadSessionSecret, signSession, verifySession } from "../src/auth/session"; + +const dirs: string[] = []; +const apps: FastifyInstance[] = []; +async function directory() { const dir = await mkdtemp(join(tmpdir(), "shellbook-auth-")); dirs.push(dir); return dir; } +async function setup(options: AppOptions = {}) { + const dataDir = options.auth?.dataDir ?? await directory(); + await setPassword(dataDir, "test password"); + const app = await buildApp({ ...options, auth: { dataDir, ...options.auth } }); + apps.push(app); + app.get("/api/private", async () => ({ ok: true })); + app.get("/api/ws", { websocket: true }, socket => { socket.send("authenticated"); }); + return { app, dataDir }; +} +async function login(app: FastifyInstance, headers = {}) { + return app.inject({ method: "POST", url: "/api/auth/login", payload: { password: "test password" }, headers }); +} +afterEach(async () => { + for (const app of apps.splice(0)) await app.close(); + for (const dir of dirs.splice(0)) await rm(dir, { recursive: true, force: true }); +}); +describe("passwords and sessions", () => { + it("salts scrypt hashes and compares passwords safely", async () => { + const hash = await hashPassword("secret"); + expect(await hashPassword("secret")).not.toBe(hash); + expect(await verifyPassword("secret", hash)).toBe(true); + expect(await verifyPassword("wrong", hash)).toBe(false); + expect(await verifyPassword("secret", "malformed")).toBe(false); + expect(await verifyPassword("x".repeat(4097), hash)).toBe(false); + await expect(hashPassword("")).rejects.toThrow(); + }); + it("rejects tampering, wrong keys, invalid input and expired cookies", () => { + const key = Buffer.alloc(32, 1); + const token = signSession(key, 2000); + expect(verifySession(key, token, 1000)).toBe(true); + expect(verifySession(key, token, 2000)).toBe(false); + expect(verifySession(key, token.replace("2000", "3000"), 1000)).toBe(false); + expect(verifySession(Buffer.alloc(32, 2), token, 1000)).toBe(false); + for (const bad of ["", "x.y", "99999999999999999.a", token + "x"]) expect(verifySession(key, bad, 1000)).toBe(false); + }); + it("persists a private signing secret and rejects corrupt state", async () => { + const dir = await directory(); + expect(loadSessionSecret(dir)).toEqual(loadSessionSecret(dir)); + if (process.platform !== "win32") expect((await stat(join(dir, "session-secret"))).mode & 0o777).toBe(0o600); + await writeFile(join(dir, "session-secret"), "bad"); + expect(() => loadSessionSecret(dir)).toThrow("Invalid session-secret"); + }); +}); +describe("authentication boundary", () => { + it("protects all API paths, including websocket handshakes, and permits health/login", async () => { + const { app } = await setup(); + for (const url of ["/api", "/api/private", "/api/auth/me", "/api/auth/logout", "/api/unknown", "/api/health/", "/api/ws"]) { + const response = await app.inject({ method: url.endsWith("logout") ? "POST" : "GET", url, headers: { connection: "Upgrade", upgrade: "websocket" } }); + expect(response.statusCode, url).toBe(401); + } + expect((await app.inject("/api/health?check=1")).statusCode).toBe(200); + await expect(app.injectWS("/api/ws")).rejects.toThrow("401"); + expect((await app.inject({ method: "POST", url: "/api/auth/login", payload: { password: "wrong" } })).statusCode).toBe(401); + const response = await login(app); + expect(response.statusCode).toBe(204); + expect(response.headers["set-cookie"]).toContain("HttpOnly; SameSite=Strict; Max-Age=2592000"); + const cookie = String(response.headers["set-cookie"]).split(";")[0]!; + expect((await app.inject({ url: "/api/auth/me", headers: { cookie } })).json()).toEqual({ authenticated: true }); + const ws = await app.injectWS("/api/ws", { headers: { cookie } }); + ws.close(); + const logout = await app.inject({ method: "POST", url: "/api/auth/logout", headers: { cookie } }); + expect(logout.statusCode).toBe(204); + expect(logout.headers["set-cookie"]).toContain("Max-Age=0"); + }); + it("survives app restart using the same data directory", async () => { + const { app, dataDir } = await setup(); + const cookie = String((await login(app)).headers["set-cookie"]).split(";")[0]!; + await app.close(); + apps.splice(apps.indexOf(app), 1); + const second = await buildApp({ auth: { dataDir } }); apps.push(second); + expect((await second.inject({ url: "/api/auth/me", headers: { cookie } })).statusCode).toBe(200); + expect(await readFile(join(dataDir, "auth.json"), "utf8")).not.toContain("test password"); + }); + it("fails closed without configured password and rejects cross-origin requests", async () => { + const app = await buildApp({ auth: { dataDir: await directory() } }); apps.push(app); + expect((await login(app)).statusCode).toBe(401); + expect((await login(app, { origin: "https://evil.test", host: "shellbook.test" })).statusCode).toBe(403); + }); + it("only trusts HTTPS forwarding from configured proxies", async () => { + const { app } = await setup(); + expect((await login(app, { "x-forwarded-proto": "https" })).headers["set-cookie"]).not.toContain("Secure"); + const { app: trusted } = await setup({ trustProxy: ["127.0.0.1"] }); + expect((await login(trusted, { "x-forwarded-proto": "https" })).headers["set-cookie"]).toContain("Secure"); + const { app: other } = await setup({ trustProxy: ["192.0.2.1"] }); + expect((await login(other, { "x-forwarded-proto": "https" })).headers["set-cookie"]).not.toContain("Secure"); + }); + it("limits parallel failures per IP and permits retry after the window", async () => { + const { app } = await setup({ auth: { dataDir: await directory(), maxAttempts: 2, rateWindowMs: 100 } }); + const attempt = () => app.inject({ method: "POST", url: "/api/auth/login", payload: { password: "wrong" } }); + const results = await Promise.all([attempt(), attempt(), attempt()]); + expect(results.map(r => r.statusCode).sort()).toEqual([401, 401, 429]); + await new Promise(resolve => setTimeout(resolve, 120)); + expect((await login(app)).statusCode).toBe(204); + }); + it("accepts identity headers only from configured direct peers, never X-Forwarded-For", async () => { + const dir = await directory(); + const { app } = await setup({ auth: { dataDir: dir, forwardAuth: { header: "Remote-User", trustedProxyIps: ["127.0.0.1"] } } }); + expect((await app.inject({ url: "/api/auth/me", headers: { "remote-user": "admin" } })).statusCode).toBe(200); + expect((await app.inject({ url: "/api/auth/me", headers: { "remote-user": " " } })).statusCode).toBe(401); + const { app: untrusted } = await setup({ auth: { dataDir: await directory(), forwardAuth: { header: "Remote-User", trustedProxyIps: ["192.0.2.1"] } } }); + expect((await untrusted.inject({ url: "/api/auth/me", headers: { "remote-user": "admin", "x-forwarded-for": "192.0.2.1" } })).statusCode).toBe(401); + const { app: disabled } = await setup(); + expect((await disabled.inject({ url: "/api/auth/me", headers: { "remote-user": "admin" } })).statusCode).toBe(401); + }); + it("rejects expired sessions and honors configured lifetime", async () => { + const { app, dataDir } = await setup({ auth: { dataDir: await directory(), sessionMaxAgeSeconds: 60 } }); + expect((await login(app)).headers["set-cookie"]).toContain("Max-Age=60"); + const cookie = `shellbook_session=${signSession(loadSessionSecret(dataDir), Date.now() - 1)}`; + expect((await app.inject({ url: "/api/auth/me", headers: { cookie } })).statusCode).toBe(401); + }); + it("serves static assets and SPA routes without swallowing API misses", async () => { + const root = await directory(); + await writeFile(join(root, "index.html"), "

ShellBook

"); + await writeFile(join(root, "asset.js"), "/* asset */"); + const { app } = await setup({ staticDir: root }); + expect((await app.inject("/notebooks/example")).body).toBe("

ShellBook

"); + expect((await app.inject("/asset.js")).body).toBe("/* asset */"); + const cookie = String((await login(app)).headers["set-cookie"]).split(";")[0]!; + expect((await app.inject({ url: "/api/missing", headers: { cookie } })).statusCode).toBe(404); + }); +}); diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7f4132b..e17a46d 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -20,6 +20,9 @@ importers: apps/server: dependencies: + '@fastify/static': + specifier: ^8.0.0 + version: 8.3.0 '@fastify/websocket': specifier: ^11.0.1 version: 11.3.7 @@ -30,6 +33,9 @@ importers: specifier: ^5.1.0 version: 5.12.8 devDependencies: + esbuild: + specifier: ^0.24.2 + version: 0.24.2 tsx: specifier: ^4.19.2 version: 4.23.15 @@ -44,6 +50,12 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/aix-ppc64@0.24.2': + resolution: {integrity: sha512-thpVCb/rhxE/BnMLQ7GReQLLN8q9qbHmI55F4489/ByVg2aQaQ6kbcLb6FHkocZzQhxc4gx0sCk0tJkKBFzDhA==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/aix-ppc64@0.28.2': resolution: {integrity: sha512-XExcO+dvLKvVtNTibSTBej1NCAbaGhWn9Ww1ZPx80qsahhPFe/8jgWP0IchNe0F3HwkU7n8ejhH8bjonqht8mQ==} engines: {node: '>=18'} @@ -56,6 +68,12 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.24.2': + resolution: {integrity: sha512-cNLgeqCqV8WxfcTIOeL4OAtSmL8JjcN6m09XIgro1Wi7cF4t/THaWEa7eL5CMoMBdjoHOTh/vwTO/o2TRXIyzg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm64@0.28.2': resolution: {integrity: sha512-5YfKeeI8qWfBZIX+u2xZC3Zlb3Os/gLS2sbEKM+I4ZOcsWmHS2WLysCcQZDAFRslDUU5Oiq44gf6PYN1vGwG5A==} engines: {node: '>=18'} @@ -68,6 +86,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.24.2': + resolution: {integrity: sha512-tmwl4hJkCfNHwFB3nBa8z1Uy3ypZpxqxfTQOcHX+xRByyYgunVbZ9MzUUfb0RxaHIMnbHagwAxuTL+tnNM+1/Q==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.28.2': resolution: {integrity: sha512-kXXoiPVVGQcnIYGOeaovwOURpniDBpSq4A03qkQ+BMQqtGG6HYap3xne9C1O1yo4TR3qxlCX5IqqmX6fFo2Lqg==} engines: {node: '>=18'} @@ -80,6 +104,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.24.2': + resolution: {integrity: sha512-B6Q0YQDqMx9D7rvIcsXfmJfvUYLoP722bgfBlO5cGvNVb5V/+Y7nhBE3mHV9OpxBf4eAS2S68KZztiPaWq4XYw==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.28.2': resolution: {integrity: sha512-O387ite7SzUyCcy3JQX4P4bLtEA7bLLkx+esve5JHnyYfNTxcVpXZo9jhdB0lTKN44gztELTdU7nS8Nr16Fs1Q==} engines: {node: '>=18'} @@ -92,6 +122,12 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-arm64@0.24.2': + resolution: {integrity: sha512-kj3AnYWc+CekmZnS5IPu9D+HWtUI49hbnyqk0FLEJDbzCIQt7hg7ucF1SQAilhtYpIujfaHr6O0UHlzzSPdOeA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-arm64@0.28.2': resolution: {integrity: sha512-n4KqkOQrraxHJcgjM1RvwbigfQKIKJVpM7xp+KsxiyUSrRdIXnt73VhrPAx0fV44hgfmIVKjxMN9J1t5jySVkw==} engines: {node: '>=18'} @@ -104,6 +140,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.24.2': + resolution: {integrity: sha512-WeSrmwwHaPkNR5H3yYfowhZcbriGqooyu3zI/3GGpF8AyUdsrrP0X6KumITGA9WOyiJavnGZUwPGvxvwfWPHIA==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.28.2': resolution: {integrity: sha512-uq6suIWYP37qzGddBKPw5QEQPi6HiLGsO7UmkpfyaYNQ3D+rN6w6WfwH+nuqcGXWvawGwxOEroO4YGnFh95azw==} engines: {node: '>=18'} @@ -116,6 +158,12 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.24.2': + resolution: {integrity: sha512-UN8HXjtJ0k/Mj6a9+5u6+2eZ2ERD7Edt1Q9IZiB5UZAIdPnVKDoG7mdTVGhHJIeEml60JteamR3qhsr1r8gXvg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-arm64@0.28.2': resolution: {integrity: sha512-n+I0BTSRIoy+d6RPKnEVwql5UwBJolytvY4mAOIEJorKlqgPII8ix6slVVrfZ5Tnj7glIZvloylbB/EJPMWEXw==} engines: {node: '>=18'} @@ -128,6 +176,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.24.2': + resolution: {integrity: sha512-TvW7wE/89PYW+IevEJXZ5sF6gJRDY/14hyIGFXdIucxCsbRmLUcjseQu1SyTko+2idmCw94TgyaEZi9HUSOe3Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.28.2': resolution: {integrity: sha512-78XJTJkvPs0kz2w61301PJjXl4g7q3JqiYMZ/M/yVI73EHBrCRTgkhu9oqG7vPqq+a/yadEW8aD+agKlk5xrmg==} engines: {node: '>=18'} @@ -140,6 +194,12 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm64@0.24.2': + resolution: {integrity: sha512-7HnAD6074BW43YvvUmE/35Id9/NB7BeX5EoNkK9obndmZBUk8xmJJeU7DwmUeN7tkysslb2eSl6CTrYz6oEMQg==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm64@0.28.2': resolution: {integrity: sha512-pW4AC0P3it8c7do9MVM4p51FzHzdM/TZrerurgRcHJ2WTa1VQ1CIq18xncfpBJw4ojkiZZrKW2yIBWBP92j6Ug==} engines: {node: '>=18'} @@ -152,6 +212,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.24.2': + resolution: {integrity: sha512-n0WRM/gWIdU29J57hJyUdIsk0WarGd6To0s+Y+LwvlC55wt+GT/OgkwoXCXvIue1i1sSNWblHEig00GBWiJgfA==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.28.2': resolution: {integrity: sha512-XlDnu2q5yoqems+xay6wSAcg9DDD7K9RLKZEBOMZm3ckNpJBvOX20tSfby8KfrrhINDyv9V2YVZKY/SpoGJI8w==} engines: {node: '>=18'} @@ -164,6 +230,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.24.2': + resolution: {integrity: sha512-sfv0tGPQhcZOgTKO3oBE9xpHuUqguHvSo4jl+wjnKwFpapx+vUDcawbwPNuBIAYdRAvIDBfZVvXprIj3HA+Ugw==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.28.2': resolution: {integrity: sha512-CYbnj78HsIeA+DhgUKgFCfvNsTHFhMMrinUrMZpDXJXKN8T3XViTZ/+wtHeVxEWY8ewSzTFN+nRmSwO2tZaLUQ==} engines: {node: '>=18'} @@ -176,6 +248,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.24.2': + resolution: {integrity: sha512-CN9AZr8kEndGooS35ntToZLTQLHEjtVB5n7dl8ZcTZMonJ7CCfStrYhrzF97eAecqVbVJ7APOEe18RPI4KLhwQ==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.28.2': resolution: {integrity: sha512-buwkd8nsph4R+ajRvw0qM5Hja/TXQow3ptzWO2EbG/cqcIkHloRrdlBtQlshyYGTNFvfkfJ5tpPLVkY4DtsPfQ==} engines: {node: '>=18'} @@ -188,6 +266,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.24.2': + resolution: {integrity: sha512-iMkk7qr/wl3exJATwkISxI7kTcmHKE+BlymIAbHO8xanq/TjHaaVThFF6ipWzPHryoFsesNQJPE/3wFJw4+huw==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.28.2': resolution: {integrity: sha512-ZVykbDyk7519VwiNb9Lcj9m8XM6v5V9uKPvrEMkkEedVewf+0itkhahp4HDpgERXhwLRpWFypsGbG/J8s0QjJA==} engines: {node: '>=18'} @@ -200,6 +284,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.24.2': + resolution: {integrity: sha512-shsVrgCZ57Vr2L8mm39kO5PPIb+843FStGt7sGGoqiiWYconSxwTiuswC1VJZLCjNiMLAMh34jg4VSEQb+iEbw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.28.2': resolution: {integrity: sha512-CAXl+Dtd9UUuJd8pKKdwh6MLm3MUMiqMPmhZ3tTSXPqfyQ3vDl6R5hZdZ/kYojK4ofXtdfSv1tFq8XzWx3heNQ==} engines: {node: '>=18'} @@ -212,6 +302,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.24.2': + resolution: {integrity: sha512-4eSFWnU9Hhd68fW16GD0TINewo1L6dRrB+oLNNbYyMUAeOD2yCK5KXGK1GH4qD/kT+bTEXjsyTCiJGHPZ3eM9Q==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.28.2': resolution: {integrity: sha512-GeXCej4IQtU1B+QlDV8W/RRvbzI3O/Stss+/bCXv4lZls5WGRtu2a+3JkA3i4qIUlMXpcHebWpF8AkJhATowuA==} engines: {node: '>=18'} @@ -224,6 +320,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.24.2': + resolution: {integrity: sha512-S0Bh0A53b0YHL2XEXC20bHLuGMOhFDO6GN4b3YjRLK//Ep3ql3erpNcPlEFed93hsQAjAQDNsvcK+hV90FubSw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.28.2': resolution: {integrity: sha512-3H1weTYZPxt/WOhByszQZybS9w5lKzUn1FDMsgEChbHWQwHYQQRfBxgCcZvPhjHfKyJjIievvMmEUawJrdY9Dg==} engines: {node: '>=18'} @@ -236,12 +338,24 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.24.2': + resolution: {integrity: sha512-8Qi4nQcCTbLnK9WoMjdC9NiTG6/E38RNICU6sUNqK0QFxCYgoARqVqxdFmWkdonVsvGqWhmm7MO0jyTqLqwj0Q==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.28.2': resolution: {integrity: sha512-4xTZr1FUmSoQW4XIWmit3tzQrUTZM+N3P0XV8xROKYF50XfI7xeO90+1bZvNwxIufQ9hDQVRJH5YhgPVF8A/HQ==} engines: {node: '>=18'} cpu: [x64] os: [linux] + '@esbuild/netbsd-arm64@0.24.2': + resolution: {integrity: sha512-wuLK/VztRRpMt9zyHSazyCVdCXlpHkKm34WUyinD2lzK07FAHTq0KQvZZlXikNWkDGoT6x3TD51jKQ7gMVpopw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [netbsd] + '@esbuild/netbsd-arm64@0.28.2': resolution: {integrity: sha512-sSATRjPeDBg3pdgHoQfoYBob11Kk1FGa9lui5RIHZCoCkJa9QKlvl3/vKz2usCmYYjs7ymJR/2Nnsqe+Hjt5nw==} engines: {node: '>=18'} @@ -254,12 +368,24 @@ packages: cpu: [x64] os: [netbsd] + '@esbuild/netbsd-x64@0.24.2': + resolution: {integrity: sha512-VefFaQUc4FMmJuAxmIHgUmfNiLXY438XrL4GDNV1Y1H/RW3qow68xTwjZKfj/+Plp9NANmzbH5R40Meudu8mmw==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + '@esbuild/netbsd-x64@0.28.2': resolution: {integrity: sha512-lqnzCV+mM0gIADaKihiCg6ifgfU2L3h5E33rNQBN1Y4MaVGnzryzmvvf7UHxprpQdE8hpqLolJ9Rl+SkIRDpyw==} engines: {node: '>=18'} cpu: [x64] os: [netbsd] + '@esbuild/openbsd-arm64@0.24.2': + resolution: {integrity: sha512-YQbi46SBct6iKnszhSvdluqDmxCJA+Pu280Av9WICNwQmMxV7nLRHZfjQzwbPs3jeWnuAhE9Jy0NrnJ12Oz+0A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-arm64@0.28.2': resolution: {integrity: sha512-AL2qJILH7lNjrDmCQDvdxMfAUIv8KMNZOvrwAQ8i8//ntL9FflhOyMJ8OZSMBb8/AWXe3/5v5S20y3zCoZWKoQ==} engines: {node: '>=18'} @@ -272,6 +398,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.24.2': + resolution: {integrity: sha512-+iDS6zpNM6EnJyWv0bMGLWSWeXGN/HTaF/LXHXHwejGsVi+ooqDfMCCTerNFxEkM3wYVcExkeGXNqshc9iMaOA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.28.2': resolution: {integrity: sha512-QtiuPytchRyC4rwUKhexJdQKvDuZ6hWloi3igqPQNUJCS1/v9EiO3UTOXR6A3FoMo4fnAKbWJdqaIwhOzh8qEw==} engines: {node: '>=18'} @@ -290,6 +422,12 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/sunos-x64@0.24.2': + resolution: {integrity: sha512-hTdsW27jcktEvpwNHJU4ZwWFGkz2zRJUz8pvddmXPtXDzVKTTINmlmga3ZzwcuMpUvLw7JkLy9QLKyGpD2Yxig==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/sunos-x64@0.28.2': resolution: {integrity: sha512-GPMSkTOtMnv2U2F8gxe4Io6qmVs+YKyp832Etqqxr0hFngmXQ3rzwytelm3GIn7T4VviRUlf3sOgBOiTdvaf7g==} engines: {node: '>=18'} @@ -302,6 +440,12 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.24.2': + resolution: {integrity: sha512-LihEQ2BBKVFLOC9ZItT9iFprsE9tqjDjnbulhHoFxYQtQfai7qfluVODIYxt1PgdoyQkz23+01rzwNwYfutxUQ==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-arm64@0.28.2': resolution: {integrity: sha512-PIhhEkE9uPBleRBrQEJpUn7MBnibZzbGzYWPmY3x+YoVg/95zbjB4CxPPOQ8l5tYYM4mMaCthF8/1DIfBQQyWQ==} engines: {node: '>=18'} @@ -314,6 +458,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.24.2': + resolution: {integrity: sha512-q+iGUwfs8tncmFC9pcnD5IvRHAzmbwQ3GPS5/ceCyHdjXubwQWI12MKWSNSMYLJMq23/IUCvJMS76PDqXe1fxA==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.28.2': resolution: {integrity: sha512-YmJbfTlvU7Sdn9BB+4PRES4oB6pxgS37MAONj+hBr/cpXS1aBPKXxNnDbu+QCWPj0o9dgyxeq79g6c5P8KeuYA==} engines: {node: '>=18'} @@ -326,12 +476,21 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.24.2': + resolution: {integrity: sha512-7VTgWzgMGvup6aSqDPLiW5zHaxYJGTO4OokMjIlrCtf+VpEL+cXKtCvg723iguPYI5oaUNdS+/V7OU2gvXVWEg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.28.2': resolution: {integrity: sha512-5ebpxr3nWMzrL/rnUI755Jkuee0bHL/Gq0WTF9lvcpv73wAp5eu8MfBUgWK9bhWvZjj7yX8etf/8tI8Ney695g==} engines: {node: '>=18'} cpu: [x64] os: [win32] + '@fastify/accept-negotiator@2.1.2': + resolution: {integrity: sha512-LV7MZqTwXTEt3GxBT6BU8ACztWnv++hSkMEsP3usIHiI0tA4F5EO4THhDCOr5J/ginM9DCnLCmZ6u3JLA9x8Iw==} + '@fastify/ajv-compiler@4.0.7': resolution: {integrity: sha512-VP0yIfwlc1ohj733keYDqyHm1VWeP9VQxYomunhr90jkC4aNNibbkrRiaNgPgqj1ORxUenILR4qzA/ppYBNAtQ==} @@ -353,12 +512,26 @@ packages: '@fastify/proxy-addr@5.1.3': resolution: {integrity: sha512-ptgIgB+abBNTs5lsKNvFaKMCauPaTOE6ZIjxJr3FxCLehmYQQKYGg4srwwNICR9QQlFrYw59jWAo+i9GalVCaw==} + '@fastify/send@4.2.1': + resolution: {integrity: sha512-zOB8L9z444PnGbd1Nd7gNXPz/7bnDR8Z4KNTNSwLVQuE3cTGsU9qUj1N4SjXKK0Tq4cauZYTwB+tqvlqosuKsw==} + + '@fastify/static@8.3.0': + resolution: {integrity: sha512-yKxviR5PH1OKNnisIzZKmgZSus0r2OZb8qCSbqmw34aolT4g3UlzYfeBRym+HJ1J471CR8e2ldNub4PubD1coA==} + '@fastify/websocket@11.3.7': resolution: {integrity: sha512-fkkS87CkAOY/MzvJrB94S729RxvIbLHXv2LNGkPifli4/q4IdeicpcFoxgJ3oVmIRVNSi4W6FZai5AmRhzhhTw==} + '@isaacs/cliui@9.0.0': + resolution: {integrity: sha512-AokJm4tuBHillT+FpMtxQ60n8ObyXBatq7jD2/JA9dxbDDokKQm8KMht5ibGzLVU9IJDIKK4TPKgMHEYMn3lMg==} + engines: {node: '>=18'} + '@jridgewell/sourcemap-codec@1.6.0': resolution: {integrity: sha512-T7jf+5zgsZHwNJ4lvQ7/aezbyk0nNX+zJVWpmHA7VYsEx7a7qr5Rg5IbtJFqkgze5Y2sruq1RUY8Q837Od7iFw==} + '@lukeed/ms@2.0.2': + resolution: {integrity: sha512-9I2Zn6+NJLfaGoz9jN3lpwDgAYvfGeNYdbAIjJOqzs4Tpc+VU3Jqq4IofSUBKajiDS8k9fZIg18/z13mpk1bsA==} + engines: {node: '>=8'} + '@pinojs/redact@0.4.0': resolution: {integrity: sha512-k2ENnmBugE/rzQfEcdWHcCY+/FM3VLzH9cYEsbdsoqrvzAKRhUZeRNhAZvB8OitQJ1TBed3yqWtdjzS6wJKBwg==} @@ -552,6 +725,14 @@ packages: avvio@9.3.1: resolution: {integrity: sha512-QyTKW61/qlba+cUQBm/sT9X8lri4UdomqSDwCnrnj1IvLVDRRiXRkz4CgBRWB+/cmfC7SK5WQc8T1vSdGvaUcQ==} + balanced-match@4.0.4: + resolution: {integrity: sha512-BLrgEcRTwX2o6gGxGOCNyMvGSp35YofuYzw9h1IMTRmKqttAZZVU67bdb9Pr2vUHA8+j3i2tJfjO6C6+4myGTA==} + engines: {node: 18 || 20 || >=22} + + brace-expansion@5.0.13: + resolution: {integrity: sha512-Vh3dmFbc4wZeox7M9I/0L9GfFd83Su4+yCck/OF9Gi/P/dAHn0RT7X4K9R7gMNMhDck3DvhR6QXsnQdjjgwNvQ==} + engines: {node: 20 || >=22} + cac@6.7.14: resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} engines: {node: '>=8'} @@ -564,10 +745,18 @@ packages: resolution: {integrity: sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==} engines: {node: '>= 16'} + content-disposition@0.5.4: + resolution: {integrity: sha512-FveZTNuGw04cxlAiWbzi6zTAL/lhehaWbTtgluJh4/E95DqMwTmha3KZN1aAWA8cFIhHzMZUvLevkw5Rqk+tSQ==} + engines: {node: '>= 0.6'} + cookie@2.0.2: resolution: {integrity: sha512-SL0cVuEdETEp7pN0FuZb01toc3vnODEfVUCooxG1SJN0yIirh7JMb9X9bvfCFf0vzzbT68RdbKDHYTiWy7a7iw==} engines: {node: '>=22'} + cross-spawn@7.0.6: + resolution: {integrity: sha512-uV2QOWP2nWzsy2aMp8aRibhi9dlzF5Hgh5SHaB9OiTGEyDTiJJyx0uy51QXdyWbtAHNua4XJzUKca3OzKUd3vA==} + engines: {node: '>= 8'} + debug@4.4.3: resolution: {integrity: sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==} engines: {node: '>=6.0'} @@ -581,6 +770,10 @@ packages: resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} engines: {node: '>=6'} + depd@2.0.0: + resolution: {integrity: sha512-g7nH6P6dyDioJogAAGprGpCtVImJhpPk/roCzdb3fIh61/s/nPsfR6onyMwkCAR/OlC3yBC0lESvUoQEAssIrw==} + engines: {node: '>= 0.8'} + dequal@2.0.3: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} @@ -599,11 +792,19 @@ packages: engines: {node: '>=12'} hasBin: true + esbuild@0.24.2: + resolution: {integrity: sha512-+9egpBW8I3CD5XPe0n6BfT5fxLzxrlDzqydF3aviG+9ni1lDC/OvMHcxqEFV0+LANZG5R1bFMWfUrjVsdwxJvA==} + engines: {node: '>=18'} + hasBin: true + esbuild@0.28.2: resolution: {integrity: sha512-HKVLS8dvII+xoKW9kmqxbRKrnWEXfJJr/FZhhJmiqIB0e053QNYFqOBouTMO/k5sID4MvCiUCvv8b9M4h32wIA==} engines: {node: '>=18'} hasBin: true + escape-html@1.0.3: + resolution: {integrity: sha512-NiSupZ4OeuGwr68lGIeym/ksIZMJodUGOSCZ/FSnTxcrekbvqrgdUxlJOMpijaKZVjAJrWrGs/6Jy8OMuyj9ow==} + estree-walker@3.0.3: resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} @@ -629,6 +830,9 @@ packages: fast-uri@4.2.3: resolution: {integrity: sha512-I1PXwP5eAhlNlcdpjt9CgB59op2ZvZfxw+BkqGFVIUOgNpCVTcTqp3HhTX7brxj5vsip+nSY4nTvff+eIA76hg==} + fastify-plugin@5.1.0: + resolution: {integrity: sha512-FAIDA8eovSt5qcDgcBvDuX/v0Cjz0ohGhENZ/wpc3y+oZCY2afZ9Baqql3g/lC+OHRnciQol4ww7tuthOb9idw==} + fastify-plugin@6.0.1: resolution: {integrity: sha512-4wW4RxSmvPXLrh5mgQEiu43qU3bw44N2ss4FTkTkQIbprUhE+/s43QX0j/ttcztdWK7PEkHqVthdc5GdEGDvjA==} @@ -642,11 +846,25 @@ packages: resolution: {integrity: sha512-UwbZdEdk59YXIGPW/rbDn/Ayr3mJ5fPH/HJeMPlK8Ez10aUin4iyRwgJvNTSkRfpZ2h8uLX0LbvZm/YUBUpymw==} engines: {node: '>=20'} + foreground-child@3.3.1: + resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} + engines: {node: '>=14'} + fsevents@2.3.3: resolution: {integrity: sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==} engines: {node: ^8.16.0 || ^10.6.0 || >=11.0.0} os: [darwin] + glob@11.1.0: + resolution: {integrity: sha512-vuNwKSaKiqm7g0THUBu2x7ckSs3XJLXE+2ssL7/MfTGPLLcrJQ/4Uq1CjPTtO5cCIiRxqvN6Twy1qOwhL0Xjcw==} + engines: {node: 20 || >=22} + deprecated: Old versions of glob are not supported, and contain widely publicized security vulnerabilities, which have been fixed in the current version. Please update. Support for old versions may be purchased (at exorbitant rates) by contacting i@izs.me + hasBin: true + + http-errors@2.0.1: + resolution: {integrity: sha512-4FbRdAX+bSdmo4AUFuS0WNiPz8NgFt+r8ThgNWmlrjQjt1Q7ZR9+zTlce2859x4KSXrwIsaeTqDoKQmtP8pLmQ==} + engines: {node: '>= 0.8'} + inherits@2.0.4: resolution: {integrity: sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==} @@ -654,6 +872,13 @@ packages: resolution: {integrity: sha512-aq+t5NAc+cS6rZQQVWC2x98CPqGtKKTMDd4Gaodv0wShnItdKg/51djkGJ1hqH+Oy0ivDftCbSLCQob8zso01w==} engines: {node: '>= 10'} + isexe@2.0.0: + resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} + + jackspeak@4.2.3: + resolution: {integrity: sha512-ykkVRwrYvFm1nb2AJfKKYPr0emF6IiXDYUaFx4Zn9ZuIH7MrzEZ3sD5RlqGXNRpHtvUHJyOnCEFxOlNDtGo7wg==} + engines: {node: 20 || >=22} + json-schema-ref-resolver@3.0.1: resolution: {integrity: sha512-w+HwgljXpVwZ3IidoUR1qPZxSOQ+NRQWuVe6a5pe8XbHsNZE4UAwVPUvzZagn7yBKbJtt6UJnRFYbNTRPZI45Q==} @@ -666,9 +891,26 @@ packages: loupe@3.2.1: resolution: {integrity: sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==} + lru-cache@11.5.3: + resolution: {integrity: sha512-U4N8FgzmWxc8k1VH8Kr6lQg18U7Fjvby6wXHVRX/ZZ7IwWbRMgrRbP0Wrb5q5NVinryp4SQampHKdvtecItxUg==} + engines: {node: 20 || >=22} + magic-string@0.30.21: resolution: {integrity: sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==} + mime@3.0.0: + resolution: {integrity: sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==} + engines: {node: '>=10.0.0'} + hasBin: true + + minimatch@10.2.6: + resolution: {integrity: sha512-vpLQEs+VLCr1nU0BXS07maYoFwlDAH0gngQuuttxIwutDFEMHq2blX+8vpgxDdK3J1PwjCJiep77OitTZ4Ll1A==} + engines: {node: 18 || 20 || >=22} + + minipass@7.1.3: + resolution: {integrity: sha512-tEBHqDnIoM/1rXME1zgka9g6Q2lcoCkxHLuc7ODJ5BxbP5d4c2Z5cGgtXAku59200Cx7diuHTOYfSBD8n6mm8A==} + engines: {node: '>=16 || 14 >=14.17'} + ms@2.1.3: resolution: {integrity: sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==} @@ -684,6 +926,17 @@ packages: once@1.4.0: resolution: {integrity: sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==} + package-json-from-dist@1.0.1: + resolution: {integrity: sha512-UEZIS3/by4OC8vL3P2dTXRETpebLI2NiI5vIrjaD/5UtrkFX/tNbwjTSRAGC/+7CAo2pIcBaRgWmcBBHcsaCIw==} + + path-key@3.1.1: + resolution: {integrity: sha512-ojmeN0qd+y0jszEtoY48r0Peq5dwMEkIlCOu6Q5f41lfkswXuKtYrhgoTpLnyIcHm24Uhqx+5Tqm2InSwLhE6Q==} + engines: {node: '>=8'} + + path-scurry@2.0.2: + resolution: {integrity: sha512-3O/iVVsJAPsOnpwWIeD+d6z/7PmqApyQePUtCndjatj/9I5LylHvt5qluFaBT3I5h3r1ejfR056c+FCv+NnNXg==} + engines: {node: 18 || 20 || >=22} + pathe@1.1.2: resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} @@ -763,9 +1016,24 @@ packages: set-cookie-parser@3.2.2: resolution: {integrity: sha512-df017qMeYuXo4emL09nlyMpi2i2MtEIKS/6jtXH3vmjFgIRsOi852/5RmhJ4EkvN3ZF8jXadM/EkTPXgc8yPIw==} + setprototypeof@1.2.0: + resolution: {integrity: sha512-E5LDX7Wrp85Kil5bhZv46j8jOeboKq5JMmYM3gVGdGH8xFpPWXUMsNrlODCrkoxMEeNi/XZIwuRvY4XNwYMJpw==} + + shebang-command@2.0.0: + resolution: {integrity: sha512-kHxr2zZpYtdmrN1qDjrrX/Z1rR1kG8Dx+gkpK1G4eXmvXswmcE1hTWBWYUzlraYw1/yZp6YuDY77YtvbN0dmDA==} + engines: {node: '>=8'} + + shebang-regex@3.0.0: + resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} + engines: {node: '>=8'} + siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@4.1.0: + resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} + engines: {node: '>=14'} + sonic-boom@4.2.1: resolution: {integrity: sha512-w6AxtubXa2wTXAUsZMMWERrsIRAdrK0Sc+FUytWvYAhBJLyuI4llrMIC1DtlNSdI99EI86KZum2MMq3EAZlF9Q==} @@ -780,6 +1048,10 @@ packages: stackback@0.0.2: resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + statuses@2.0.2: + resolution: {integrity: sha512-DvEy55V3DB7uknRo+4iOGT5fP1slR8wQohVdknigZPMpMstaKJQWhwiYBACJE3Ul2pTnATihhBYnRhZQHGBiRw==} + engines: {node: '>= 0.8'} + std-env@3.10.0: resolution: {integrity: sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==} @@ -815,6 +1087,10 @@ packages: resolution: {integrity: sha512-m1TdR/rvT7kgGJZhspNtXdsdYk0fddFpJJFlG5s+UkPFo6lkLoZ3YLOaovPYjq1R75NP5JfeTlSHaOsE09peCg==} engines: {node: '>=20'} + toidentifier@1.0.1: + resolution: {integrity: sha512-o5sSPKEkg/DIQNmH43V0/uerLrpzVedkUh8tGNvaeXpfpuwjKenlSox/2O/BTlZUtEe+JG7s5YhEz608PlAHRA==} + engines: {node: '>=0.6'} + tsx@4.23.15: resolution: {integrity: sha512-Yiex1Ovn8z2xPpOWckIiysV1SSyRMY9BkLF++q0yKiDxCqRhosKfMg3janKkiLBwZ5c/YryloKwGZcrEmtwxKw==} engines: {node: '>=18.0.0'} @@ -892,6 +1168,11 @@ packages: jsdom: optional: true + which@2.0.2: + resolution: {integrity: sha512-BLI3Tl1TW3Pvl70l3yq3Y64i+awpwXqsGBYWkkqMtnbXgrMD+yj7rhW0kuEDxzJaYXGjEW5ogapKNMEKNMjibA==} + engines: {node: '>= 8'} + hasBin: true + why-is-node-running@2.3.0: resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} @@ -917,120 +1198,183 @@ snapshots: '@esbuild/aix-ppc64@0.21.5': optional: true + '@esbuild/aix-ppc64@0.24.2': + optional: true + '@esbuild/aix-ppc64@0.28.2': optional: true '@esbuild/android-arm64@0.21.5': optional: true + '@esbuild/android-arm64@0.24.2': + optional: true + '@esbuild/android-arm64@0.28.2': optional: true '@esbuild/android-arm@0.21.5': optional: true + '@esbuild/android-arm@0.24.2': + optional: true + '@esbuild/android-arm@0.28.2': optional: true '@esbuild/android-x64@0.21.5': optional: true + '@esbuild/android-x64@0.24.2': + optional: true + '@esbuild/android-x64@0.28.2': optional: true '@esbuild/darwin-arm64@0.21.5': optional: true + '@esbuild/darwin-arm64@0.24.2': + optional: true + '@esbuild/darwin-arm64@0.28.2': optional: true '@esbuild/darwin-x64@0.21.5': optional: true + '@esbuild/darwin-x64@0.24.2': + optional: true + '@esbuild/darwin-x64@0.28.2': optional: true '@esbuild/freebsd-arm64@0.21.5': optional: true + '@esbuild/freebsd-arm64@0.24.2': + optional: true + '@esbuild/freebsd-arm64@0.28.2': optional: true '@esbuild/freebsd-x64@0.21.5': optional: true + '@esbuild/freebsd-x64@0.24.2': + optional: true + '@esbuild/freebsd-x64@0.28.2': optional: true '@esbuild/linux-arm64@0.21.5': optional: true + '@esbuild/linux-arm64@0.24.2': + optional: true + '@esbuild/linux-arm64@0.28.2': optional: true '@esbuild/linux-arm@0.21.5': optional: true + '@esbuild/linux-arm@0.24.2': + optional: true + '@esbuild/linux-arm@0.28.2': optional: true '@esbuild/linux-ia32@0.21.5': optional: true + '@esbuild/linux-ia32@0.24.2': + optional: true + '@esbuild/linux-ia32@0.28.2': optional: true '@esbuild/linux-loong64@0.21.5': optional: true + '@esbuild/linux-loong64@0.24.2': + optional: true + '@esbuild/linux-loong64@0.28.2': optional: true '@esbuild/linux-mips64el@0.21.5': optional: true + '@esbuild/linux-mips64el@0.24.2': + optional: true + '@esbuild/linux-mips64el@0.28.2': optional: true '@esbuild/linux-ppc64@0.21.5': optional: true + '@esbuild/linux-ppc64@0.24.2': + optional: true + '@esbuild/linux-ppc64@0.28.2': optional: true '@esbuild/linux-riscv64@0.21.5': optional: true + '@esbuild/linux-riscv64@0.24.2': + optional: true + '@esbuild/linux-riscv64@0.28.2': optional: true '@esbuild/linux-s390x@0.21.5': optional: true + '@esbuild/linux-s390x@0.24.2': + optional: true + '@esbuild/linux-s390x@0.28.2': optional: true '@esbuild/linux-x64@0.21.5': optional: true + '@esbuild/linux-x64@0.24.2': + optional: true + '@esbuild/linux-x64@0.28.2': optional: true + '@esbuild/netbsd-arm64@0.24.2': + optional: true + '@esbuild/netbsd-arm64@0.28.2': optional: true '@esbuild/netbsd-x64@0.21.5': optional: true + '@esbuild/netbsd-x64@0.24.2': + optional: true + '@esbuild/netbsd-x64@0.28.2': optional: true + '@esbuild/openbsd-arm64@0.24.2': + optional: true + '@esbuild/openbsd-arm64@0.28.2': optional: true '@esbuild/openbsd-x64@0.21.5': optional: true + '@esbuild/openbsd-x64@0.24.2': + optional: true + '@esbuild/openbsd-x64@0.28.2': optional: true @@ -1040,27 +1384,41 @@ snapshots: '@esbuild/sunos-x64@0.21.5': optional: true + '@esbuild/sunos-x64@0.24.2': + optional: true + '@esbuild/sunos-x64@0.28.2': optional: true '@esbuild/win32-arm64@0.21.5': optional: true + '@esbuild/win32-arm64@0.24.2': + optional: true + '@esbuild/win32-arm64@0.28.2': optional: true '@esbuild/win32-ia32@0.21.5': optional: true + '@esbuild/win32-ia32@0.24.2': + optional: true + '@esbuild/win32-ia32@0.28.2': optional: true '@esbuild/win32-x64@0.21.5': optional: true + '@esbuild/win32-x64@0.24.2': + optional: true + '@esbuild/win32-x64@0.28.2': optional: true + '@fastify/accept-negotiator@2.1.2': {} + '@fastify/ajv-compiler@4.0.7': dependencies: ajv: 8.20.0 @@ -1086,6 +1444,23 @@ snapshots: '@fastify/forwarded': 3.1.2 ipaddr.js: 2.5.0 + '@fastify/send@4.2.1': + dependencies: + '@lukeed/ms': 2.0.2 + escape-html: 1.0.3 + fast-decode-uri-component: 1.0.1 + http-errors: 2.0.1 + mime: 3.0.0 + + '@fastify/static@8.3.0': + dependencies: + '@fastify/accept-negotiator': 2.1.2 + '@fastify/send': 4.2.1 + content-disposition: 0.5.4 + fastify-plugin: 5.1.0 + fastq: 1.20.3 + glob: 11.1.0 + '@fastify/websocket@11.3.7': dependencies: duplexify: 4.1.3 @@ -1095,8 +1470,12 @@ snapshots: - bufferutil - utf-8-validate + '@isaacs/cliui@9.0.0': {} + '@jridgewell/sourcemap-codec@1.6.0': {} + '@lukeed/ms@2.0.2': {} + '@pinojs/redact@0.4.0': {} '@rollup/rollup-android-arm-eabi@4.68.3': @@ -1245,6 +1624,12 @@ snapshots: '@fastify/error': 4.2.1 fastq: 1.20.3 + balanced-match@4.0.4: {} + + brace-expansion@5.0.13: + dependencies: + balanced-match: 4.0.4 + cac@6.7.14: {} chai@5.3.3: @@ -1257,14 +1642,26 @@ snapshots: check-error@2.1.3: {} + content-disposition@0.5.4: + dependencies: + safe-buffer: 5.2.1 + cookie@2.0.2: {} + cross-spawn@7.0.6: + dependencies: + path-key: 3.1.1 + shebang-command: 2.0.0 + which: 2.0.2 + debug@4.4.3: dependencies: ms: 2.1.3 deep-eql@5.0.2: {} + depd@2.0.0: {} + dequal@2.0.3: {} duplexify@4.1.3: @@ -1306,6 +1703,34 @@ snapshots: '@esbuild/win32-ia32': 0.21.5 '@esbuild/win32-x64': 0.21.5 + esbuild@0.24.2: + optionalDependencies: + '@esbuild/aix-ppc64': 0.24.2 + '@esbuild/android-arm': 0.24.2 + '@esbuild/android-arm64': 0.24.2 + '@esbuild/android-x64': 0.24.2 + '@esbuild/darwin-arm64': 0.24.2 + '@esbuild/darwin-x64': 0.24.2 + '@esbuild/freebsd-arm64': 0.24.2 + '@esbuild/freebsd-x64': 0.24.2 + '@esbuild/linux-arm': 0.24.2 + '@esbuild/linux-arm64': 0.24.2 + '@esbuild/linux-ia32': 0.24.2 + '@esbuild/linux-loong64': 0.24.2 + '@esbuild/linux-mips64el': 0.24.2 + '@esbuild/linux-ppc64': 0.24.2 + '@esbuild/linux-riscv64': 0.24.2 + '@esbuild/linux-s390x': 0.24.2 + '@esbuild/linux-x64': 0.24.2 + '@esbuild/netbsd-arm64': 0.24.2 + '@esbuild/netbsd-x64': 0.24.2 + '@esbuild/openbsd-arm64': 0.24.2 + '@esbuild/openbsd-x64': 0.24.2 + '@esbuild/sunos-x64': 0.24.2 + '@esbuild/win32-arm64': 0.24.2 + '@esbuild/win32-ia32': 0.24.2 + '@esbuild/win32-x64': 0.24.2 + esbuild@0.28.2: optionalDependencies: '@esbuild/aix-ppc64': 0.28.2 @@ -1335,6 +1760,8 @@ snapshots: '@esbuild/win32-ia32': 0.28.2 '@esbuild/win32-x64': 0.28.2 + escape-html@1.0.3: {} + estree-walker@3.0.3: dependencies: '@types/estree': 1.0.10 @@ -1362,6 +1789,8 @@ snapshots: fast-uri@4.2.3: {} + fastify-plugin@5.1.0: {} + fastify-plugin@6.0.1: {} fastify@5.12.8: @@ -1392,13 +1821,41 @@ snapshots: fast-querystring: 1.1.2 safe-regex2: 5.1.2 + foreground-child@3.3.1: + dependencies: + cross-spawn: 7.0.6 + signal-exit: 4.1.0 + fsevents@2.3.3: optional: true + glob@11.1.0: + dependencies: + foreground-child: 3.3.1 + jackspeak: 4.2.3 + minimatch: 10.2.6 + minipass: 7.1.3 + package-json-from-dist: 1.0.1 + path-scurry: 2.0.2 + + http-errors@2.0.1: + dependencies: + depd: 2.0.0 + inherits: 2.0.4 + setprototypeof: 1.2.0 + statuses: 2.0.2 + toidentifier: 1.0.1 + inherits@2.0.4: {} ipaddr.js@2.5.0: {} + isexe@2.0.0: {} + + jackspeak@4.2.3: + dependencies: + '@isaacs/cliui': 9.0.0 + json-schema-ref-resolver@3.0.1: dependencies: dequal: 2.0.3 @@ -1414,10 +1871,20 @@ snapshots: loupe@3.2.1: {} + lru-cache@11.5.3: {} + magic-string@0.30.21: dependencies: '@jridgewell/sourcemap-codec': 1.6.0 + mime@3.0.0: {} + + minimatch@10.2.6: + dependencies: + brace-expansion: 5.0.13 + + minipass@7.1.3: {} + ms@2.1.3: {} nanoid@3.3.20: {} @@ -1428,6 +1895,15 @@ snapshots: dependencies: wrappy: 1.0.2 + package-json-from-dist@1.0.1: {} + + path-key@3.1.1: {} + + path-scurry@2.0.2: + dependencies: + lru-cache: 11.5.3 + minipass: 7.1.3 + pathe@1.1.2: {} pathval@2.0.1: {} @@ -1526,8 +2002,18 @@ snapshots: set-cookie-parser@3.2.2: {} + setprototypeof@1.2.0: {} + + shebang-command@2.0.0: + dependencies: + shebang-regex: 3.0.0 + + shebang-regex@3.0.0: {} + siginfo@2.0.0: {} + signal-exit@4.1.0: {} + sonic-boom@4.2.1: dependencies: atomic-sleep: 1.0.0 @@ -1538,6 +2024,8 @@ snapshots: stackback@0.0.2: {} + statuses@2.0.2: {} + std-env@3.10.0: {} stream-shift@1.0.3: {} @@ -1562,6 +2050,8 @@ snapshots: toad-cache@3.7.4: {} + toidentifier@1.0.1: {} + tsx@4.23.15: dependencies: esbuild: 0.28.2 @@ -1636,6 +2126,10 @@ snapshots: - supports-color - terser + which@2.0.2: + dependencies: + isexe: 2.0.0 + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 From 1f385b6538db890a85c3e17dbfdf54e040aff973 Mon Sep 17 00:00:00 2001 From: Florian Schmidt Date: Mon, 16 Nov 2026 00:07:23 +0100 Subject: [PATCH 2/2] feat(deploy): provision Debian 13 Proxmox containers (#6) Add architecture-filtered template selection, safe CT reuse, TUN passthrough, a service-user installer, updates, and a Traefik example. Verify official Node 22 binaries with SHA-256 checksums and document deployment and credential setup. Cover mixed amd64/arm64 template selection with five bash regression checks. --- deploy/.gitattributes | 1 + deploy/README.md | 63 ++++++++++++++ deploy/install.sh | 127 ++++++++++++++++++++++++++++ deploy/proxmox/create-ct.sh | 68 +++++++++++++++ deploy/proxmox/template-picker.sh | 8 ++ deploy/test/template-picker.test.sh | 15 ++++ deploy/traefik/shellbook.yml | 21 +++++ deploy/update.sh | 6 ++ 8 files changed, 309 insertions(+) create mode 100644 deploy/.gitattributes create mode 100644 deploy/README.md create mode 100755 deploy/install.sh create mode 100755 deploy/proxmox/create-ct.sh create mode 100755 deploy/proxmox/template-picker.sh create mode 100755 deploy/test/template-picker.test.sh create mode 100644 deploy/traefik/shellbook.yml create mode 100755 deploy/update.sh diff --git a/deploy/.gitattributes b/deploy/.gitattributes new file mode 100644 index 0000000..dfdb8b7 --- /dev/null +++ b/deploy/.gitattributes @@ -0,0 +1 @@ +*.sh text eol=lf diff --git a/deploy/README.md b/deploy/README.md new file mode 100644 index 0000000..2475dc9 --- /dev/null +++ b/deploy/README.md @@ -0,0 +1,63 @@ +# Deploy ShellBook (M5 / #6) + +Access is root-equivalent across managed hosts. Restrict CT port 8080 to the +Traefik host with the Proxmox firewall; use HTTPS and limit the router to your +LAN/Tailscale addresses. No password is set initially: API access fails closed. + +1. Copy `deploy/` to the Proxmox VE 9 host. As root run + `bash deploy/proxmox/create-ct.sh`. Defaults: unprivileged Debian 13 CT 501, + 2 cores, 2 GiB RAM, 16 GiB disk, DHCP on vmbr0, onboot, nesting and TUN. + Overrides: `CTID`, `CT_STORAGE`, `TEMPLATE_STORAGE`, `CT_BRIDGE`, `CT_IP` + (Proxmox ip syntax), `CT_HOSTNAME`, `CT_CORES`, `CT_MEMORY`, `CT_DISK_GB`. + Existing CTs must be unprivileged Debian 13 of the host architecture; they + may reboot when TUN passthrough is added. No raw config appending is used. +2. Optionally supply `SHELLBOOK_REPO`, `SHELLBOOK_REF`, `SHELLBOOK_HOST`, + `SHELLBOOK_PORT`, `SHELLBOOK_TRUSTED_PROXIES` (comma-separated proxy IPs), + and `TS_AUTHKEY` in the host environment. Auth keys are transferred in a + mode-0600 temporary file and removed, never stored in the service env. +3. In the CT run the printed password command. It also accepts one password + line on stdin; do not pass passwords as arguments. Source-checkout command: + `SHELLBOOK_DATA_DIR=/var/lib/shellbook pnpm --filter @shellbook/server set-password`. +4. Run `claude` as shellbook and use `/login`. Authorize + `/home/shellbook/.ssh/id_ed25519.pub` on managed hosts. The service user has + no sudo access. Initialize notebooks manually if templates were absent. +5. Install the Traefik example in its file-provider directory and replace the + hostname, CT address, TLS resolver and allowed networks. Set the actual + Traefik peer IP in `/etc/shellbook/env` as `SHELLBOOK_TRUSTED_PROXIES`, then + `systemctl restart shellbook`. Only configured proxies can influence HTTPS + detection (and thus Secure cookies). TLS terminates at Traefik. + +Standalone CT installation: run `bash deploy/install.sh` as root on Debian 13. +The installer can be rerun; it preserves env, password, workspace, SSH key and +session signing secret. It builds the checkout but does not pull on rerun. +Updates: `bash /opt/shellbook/deploy/update.sh` (root). Failure before restart +leaves the running service in place. Check `journalctl -u shellbook`. + +Configuration is `/etc/shellbook/env`; data is `/var/lib/shellbook` (back it up +along with workspace and service-user home). `SHELLBOOK_SESSION_SECONDS` defaults +to 2592000 (30 days). Cookies survive restart. Logout clears the browser cookie; +password changes do not revoke existing cookies. For emergency revocation stop +the service, delete `session-secret` from the data directory and start it again. + +Forward auth is off by default. To enable it set +`SHELLBOOK_FORWARD_AUTH_HEADER=Remote-User` and trusted proxy IPs. The header is +accepted only from an exact direct peer IP on that list (IPv4-mapped IPv6 is +normalized). Traefik must strip incoming identity headers and set its own after +authentication; block direct CT access. Built-in password login remains available. +WebSocket clients must send the same session cookie; cross-origin API requests +are rejected. Custom browser clients must use the public Host header. + +Build choices: esbuild is a well-known TypeScript bundler; it bundles the source +`@shellbook/core` via an explicit alias, while npm dependencies (including native +node-pty) stay external. Production therefore retains installed node_modules. +`@fastify/static` supplies Fastify-compatible static serving and safe file paths; +the static directory is served only when index.html exists, with SPA fallback +outside `/api`. Node 22 comes from nodejs.org's latest-v22.x binary release, +verified with its SHA-256 manifest downloaded over HTTPS. This avoids third-party +apt signing-key compatibility issues on Debian 13. Rerun the installer to update +Node 22 security releases; unattended upgrades cover Debian packages only. +Build tools support node-pty compilation. Claude uses its native installer. + +Local deployment regression: `bash deploy/test/template-picker.test.sh`. +The scripts require bash, use LF endings, and avoid early-consuming pipelines +under pipefail. Proxmox, systemd, Tailscale and SSH require deployment validation. diff --git a/deploy/install.sh b/deploy/install.sh new file mode 100755 index 0000000..8f12480 --- /dev/null +++ b/deploy/install.sh @@ -0,0 +1,127 @@ +#!/usr/bin/env bash +set -euo pipefail +[[ $EUID == 0 ]] || { echo 'Run as root inside Debian 13' >&2; exit 1; } +# shellcheck source=/dev/null +source /etc/os-release +[[ $ID == debian && $VERSION_ID == 13 ]] || { echo 'Debian 13 required' >&2; exit 1; } +export DEBIAN_FRONTEND=noninteractive +apt-get update +apt-get install -y ca-certificates git curl jq tmux build-essential python3 unattended-upgrades openssh-client xz-utils +# Official Node binaries, verified against the SHA-256 manifest over HTTPS. +case $(dpkg --print-architecture) in + amd64) node_arch=x64 ;; + arm64) node_arch=arm64 ;; + *) echo 'Unsupported Node binary architecture' >&2; exit 1 ;; +esac +node_temp=$(mktemp -d) +trap 'rm -rf -- "$node_temp"' EXIT +curl -fsSL https://nodejs.org/dist/latest-v22.x/SHASUMS256.txt -o "$node_temp/SHASUMS256.txt" +node_file=$(awk -v arch="$node_arch" '$2 ~ ("^node-v22\\.[0-9]+\\.[0-9]+-linux-" arch "\\.tar\\.xz$") {print $2}' "$node_temp/SHASUMS256.txt") +[[ -n $node_file && $node_file != *$'\n'* ]] || { echo 'No unique Node 22 binary found' >&2; exit 1; } +curl -fsSL "https://nodejs.org/dist/latest-v22.x/$node_file" -o "$node_temp/$node_file" +awk -v file="$node_file" '$2 == file' "$node_temp/SHASUMS256.txt" > "$node_temp/checksum" +(cd "$node_temp"; sha256sum -c checksum) +mkdir "$node_temp/unpacked" +tar -xJf "$node_temp/$node_file" -C "$node_temp/unpacked" --strip-components=1 +# Replace the executable rather than truncating one a running service uses. +install -m 0755 "$node_temp/unpacked/bin/node" /usr/local/bin/node +rm "$node_temp/unpacked/bin/node" +cp -a "$node_temp/unpacked/." /usr/local/ +rm -rf -- "$node_temp" +trap - EXIT +[[ $(node --version) == v22.* ]] || { echo 'Node 22 required' >&2; exit 1; } +# Pin a current Corepack rather than relying on the binary bundled with Node. +npm install -g corepack@0.34.5 +corepack enable +corepack prepare pnpm@9.15.0 --activate +if ! id shellbook >/dev/null 2>&1; then useradd --create-home --shell /bin/bash shellbook; fi +install -d -m 0700 -o shellbook -g shellbook /var/lib/shellbook /home/shellbook/.ssh +repo=${SHELLBOOK_REPO:-https://git.finalfactory.de/FinalFactory/ShellBook.git} +if [[ ! -e /opt/shellbook ]]; then + install -d -o shellbook -g shellbook /opt/shellbook + runuser -u shellbook -- git clone "$repo" /opt/shellbook +fi +if [[ -n ${SHELLBOOK_REF:-} ]]; then runuser -u shellbook -- git -C /opt/shellbook checkout "$SHELLBOOK_REF"; fi +runuser -u shellbook -- bash -c 'cd /opt/shellbook; pnpm install --frozen-lockfile; pnpm build' +workspace=/home/shellbook/workspace +install -d -o shellbook -g shellbook "$workspace" +if [[ -z $(find "$workspace" -mindepth 1 -maxdepth 1 -print -quit) ]]; then + if [[ -d /opt/shellbook/templates/workspace ]]; then cp -a /opt/shellbook/templates/workspace/. "$workspace/"; fi + chown -R shellbook:shellbook "$workspace" + runuser -u shellbook -- git -C "$workspace" init +fi +if [[ ! -f /home/shellbook/.ssh/id_ed25519 ]]; then + runuser -u shellbook -- ssh-keygen -q -t ed25519 -N '' -f /home/shellbook/.ssh/id_ed25519 -C shellbook +fi +if [[ ! -x /home/shellbook/.local/bin/claude ]]; then + runuser -u shellbook -- env HOME=/home/shellbook bash -o pipefail -c 'curl -fsSL https://claude.ai/install.sh | bash' +fi +install -d -m 0750 /etc/shellbook +if [[ ! -f /etc/shellbook/env ]]; then + host=${SHELLBOOK_HOST:-0.0.0.0} + port=${SHELLBOOK_PORT:-8080} + proxies=${SHELLBOOK_TRUSTED_PROXIES:-} + [[ $host =~ ^[a-zA-Z0-9.:_-]+$ && $port =~ ^[0-9]+$ && $proxies =~ ^[a-zA-Z0-9.,:/_-]*$ ]] || { echo 'Invalid listen/proxy settings' >&2; exit 1; } + cat > /etc/shellbook/env < /etc/systemd/system/shellbook.service <<'EOF' +[Unit] +Description=ShellBook runbook server +After=network-online.target +Wants=network-online.target + +[Service] +Type=simple +User=shellbook +Group=shellbook +WorkingDirectory=/opt/shellbook +EnvironmentFile=/etc/shellbook/env +ExecStart=/usr/local/bin/node /opt/shellbook/apps/server/dist/main.js +Restart=on-failure +RestartSec=5 +UMask=0077 +NoNewPrivileges=true +PrivateTmp=true +ProtectSystem=full +# Home and /var/lib remain writable for workspace, SSH and Claude/tmux state. +# Avoid namespace/device hardening that breaks unprivileged LXC or PTYs. + +[Install] +WantedBy=multi-user.target +EOF +cat > /etc/apt/apt.conf.d/20auto-upgrades <<'EOF' +APT::Periodic::Update-Package-Lists "1"; +APT::Periodic::Unattended-Upgrade "1"; +EOF +if [[ -n ${TS_AUTHKEY:-} ]]; then + curl -fsSL https://tailscale.com/install.sh | sh + key_file=$(mktemp) + trap 'rm -f "$key_file"' EXIT + chmod 600 "$key_file" + printf '%s' "$TS_AUTHKEY" > "$key_file" + tailscale up --auth-key="file:$key_file" + rm -f "$key_file" +fi +systemctl daemon-reload +systemctl enable shellbook +systemctl restart shellbook +cat <<'EOF' +Next steps: +1. Set the password (hidden prompt): + runuser -u shellbook -- env SHELLBOOK_DATA_DIR=/var/lib/shellbook node /opt/shellbook/apps/server/dist/cli/set-password.js +2. Log into Claude as the service user: + runuser -l shellbook -c '/home/shellbook/.local/bin/claude' + Then use /login. +3. Authorize this public SSH key on managed servers: +EOF +cat /home/shellbook/.ssh/id_ed25519.pub +echo '4. Configure Traefik, trusted proxy IPs and the LAN/Tailscale firewall; see deploy/README.md.' diff --git a/deploy/proxmox/create-ct.sh b/deploy/proxmox/create-ct.sh new file mode 100755 index 0000000..fdb7f30 --- /dev/null +++ b/deploy/proxmox/create-ct.sh @@ -0,0 +1,68 @@ +#!/usr/bin/env bash +set -euo pipefail +[[ $EUID == 0 ]] || { echo 'Run on the Proxmox host as root' >&2; exit 1; } +script_dir=$(cd -- "$(dirname -- "${BASH_SOURCE[0]}")" && pwd) +# shellcheck source=deploy/proxmox/template-picker.sh +source "$script_dir/template-picker.sh" +ctid=${CTID:-501} +[[ $ctid =~ ^[0-9]+$ ]] || { echo 'Invalid CTID' >&2; exit 1; } +arch=$(dpkg --print-architecture) +if pct config "$ctid" >/dev/null 2>&1; then + config=$(pct config "$ctid") + [[ $config == *'ostype: debian'* && $config == *"arch: $arch"* && $config == *'unprivileged: 1'* ]] || { + echo 'Refusing to touch a non-Debian, wrong-architecture, or privileged CT' >&2; exit 1; + } + pct start "$ctid" 2>/dev/null || [[ $(pct status "$ctid") == *running* ]] + # These variables must expand inside the CT, not on the host. + # shellcheck disable=SC2016 + pct exec "$ctid" -- sh -c '. /etc/os-release; test "$ID" = debian && test "$VERSION_ID" = 13' || { + echo 'Refusing to touch a CT that is not Debian 13' >&2; exit 1; + } + container_arch=$(pct exec "$ctid" -- dpkg --print-architecture) + [[ $container_arch == "$arch" ]] || { echo 'Container architecture mismatch' >&2; exit 1; } +else + pveam update + available=$(pveam available --section system) + template=$(pick_template "$arch" <<< "$available") + [[ -n $template ]] || { echo "No Debian 13 template for $arch" >&2; exit 1; } + pveam download "${TEMPLATE_STORAGE:-local}" "$template" + pct create "$ctid" "${TEMPLATE_STORAGE:-local}:vztmpl/$template" \ + --hostname "${CT_HOSTNAME:-shellbook}" --ostype debian --arch "$arch" \ + --unprivileged 1 --features nesting=1 --onboot 1 \ + --cores "${CT_CORES:-2}" --memory "${CT_MEMORY:-2048}" --swap 512 \ + --rootfs "${CT_STORAGE:-local-lvm}:${CT_DISK_GB:-16}" \ + --net0 "name=eth0,bridge=${CT_BRIDGE:-vmbr0},ip=${CT_IP:-dhcp}" +fi +# pct manages the active config correctly even when snapshot sections exist. +config=$(pct config "$ctid") +needs_restart=0 +features=$(awk -F': ' '$1 == "features" {print $2}' <<< "$config") +if [[ $features != *nesting=1* ]]; then + features=${features//nesting=0/nesting=1} + [[ $features == *nesting=1* ]] || features="${features:+$features,}nesting=1" + pct set "$ctid" --features "$features" + needs_restart=1 +fi +pct set "$ctid" --onboot 1 +if [[ $config != *'path=/dev/net/tun'* && $config != *'dev0: /dev/net/tun'* ]]; then + [[ $config != *'dev0:'* ]] || { echo 'dev0 already occupied; configure /dev/net/tun passthrough manually' >&2; exit 1; } + pct set "$ctid" --dev0 /dev/net/tun + needs_restart=1 +fi +if [[ $needs_restart == 1 && $(pct status "$ctid") == *running* ]]; then pct shutdown "$ctid" --timeout 60; fi +if [[ $(pct status "$ctid") != *running* ]]; then pct start "$ctid"; fi +# Wait for init/network after creation or reboot. +for ((attempt=0; attempt<60; attempt++)); do + if pct exec "$ctid" -- test -d /run/systemd/system; then break; fi + sleep 1 +done +pct push "$ctid" "$script_dir/../install.sh" /root/shellbook-install.sh --perms 0700 +# Transfer optional settings without exposing TS_AUTHKEY in process arguments. +settings=$(mktemp) +trap 'rm -f "$settings"' EXIT +chmod 600 "$settings" +for key in SHELLBOOK_REPO SHELLBOOK_REF SHELLBOOK_HOST SHELLBOOK_PORT SHELLBOOK_TRUSTED_PROXIES TS_AUTHKEY; do + if [[ -v $key ]]; then printf 'export %s=%q\n' "$key" "${!key}" >> "$settings"; fi +done +pct push "$ctid" "$settings" /root/shellbook-install.env --perms 0600 +pct exec "$ctid" -- bash -c 'trap "rm -f /root/shellbook-install.env" EXIT; source /root/shellbook-install.env; bash /root/shellbook-install.sh' diff --git a/deploy/proxmox/template-picker.sh b/deploy/proxmox/template-picker.sh new file mode 100755 index 0000000..cc8426e --- /dev/null +++ b/deploy/proxmox/template-picker.sh @@ -0,0 +1,8 @@ +#!/usr/bin/env bash +# Input: pveam available output. Filter architecture BEFORE sorting versions. +pick_template() { + local arch=$1 + [[ $arch =~ ^[a-z0-9]+$ ]] || return 1 + awk -v arch="$arch" '$NF ~ ("^debian-13-standard_.*_" arch "\\.tar\\.(zst|xz|gz)$") { print $NF }' | + sort -V | tail -n 1 +} diff --git a/deploy/test/template-picker.test.sh b/deploy/test/template-picker.test.sh new file mode 100755 index 0000000..e473d60 --- /dev/null +++ b/deploy/test/template-picker.test.sh @@ -0,0 +1,15 @@ +#!/usr/bin/env bash +set -euo pipefail +# shellcheck source=deploy/proxmox/template-picker.sh +source "$(dirname "${BASH_SOURCE[0]}")/../proxmox/template-picker.sh" +fixtures='system debian-13-standard_13.0-1_amd64.tar.zst +system debian-13-standard_13.0-9_arm64.tar.zst +system debian-12-standard_12.9-1_amd64.tar.zst +system debian-13-standard_13.0-2_amd64.tar.zst +system debian-13-standard_13.0-10_amd64.tar.zst' +[[ $(pick_template amd64 <<< "$fixtures") == debian-13-standard_13.0-10_amd64.tar.zst ]] +[[ $(pick_template arm64 <<< "$fixtures") == debian-13-standard_13.0-9_arm64.tar.zst ]] +[[ -z $(pick_template riscv64 <<< "$fixtures") ]] +[[ -z $(pick_template amd64 <<< 'system debian-13-standard_13.0-99_arm64.tar.zst') ]] +if pick_template '.*' <<< "$fixtures"; then exit 1; fi +printf '5 template picker checks passed\n' diff --git a/deploy/traefik/shellbook.yml b/deploy/traefik/shellbook.yml new file mode 100644 index 0000000..e9d80e7 --- /dev/null +++ b/deploy/traefik/shellbook.yml @@ -0,0 +1,21 @@ +# Traefik v3 file-provider example. Replace host, CT IP and allowed networks. +http: + routers: + shellbook: + rule: Host(`shellbook.example.net`) + entryPoints: [websecure] + tls: {} # Configure the certificate resolver on the entrypoint or here. + service: shellbook + middlewares: [shellbook-networks] + services: + shellbook: + loadBalancer: + servers: + - url: http://192.168.1.50:8080 + # WebSocket upgrades work without extra headers/middleware. + middlewares: + shellbook-networks: + ipAllowList: + sourceRange: + - 192.168.1.0/24 + - 100.64.0.0/10 diff --git a/deploy/update.sh b/deploy/update.sh new file mode 100755 index 0000000..49f8101 --- /dev/null +++ b/deploy/update.sh @@ -0,0 +1,6 @@ +#!/usr/bin/env bash +set -euo pipefail +[[ $EUID == 0 ]] || { echo 'Run as root' >&2; exit 1; } +runuser -u shellbook -- bash -c 'cd /opt/shellbook; git pull --ff-only; pnpm install --frozen-lockfile; pnpm build' +systemctl restart shellbook +systemctl --no-pager status shellbook