diff --git a/examples/basic/src/tables/collars.ts b/examples/basic/src/tables/collars.ts index f82e8dd..319ffeb 100644 --- a/examples/basic/src/tables/collars.ts +++ b/examples/basic/src/tables/collars.ts @@ -1,5 +1,5 @@ import { db } from "../db"; -import { expose } from "typegres"; +import { expose } from "typegres/core"; import { Int8, Text } from "typegres/postgres"; import { Dogs } from "./dogs"; diff --git a/examples/basic/src/tables/dogs.ts b/examples/basic/src/tables/dogs.ts index 0f8ea15..51ef6ab 100644 --- a/examples/basic/src/tables/dogs.ts +++ b/examples/basic/src/tables/dogs.ts @@ -1,5 +1,5 @@ import { db } from "../db"; -import { expose, sql } from "typegres"; +import { expose, sql } from "typegres/core"; import { Int8, Text, Timestamptz } from "typegres/postgres"; import { Teams } from "./teams"; import { Collars } from "./collars"; diff --git a/examples/basic/src/tables/microchips.ts b/examples/basic/src/tables/microchips.ts index 0ac3039..94b5f51 100644 --- a/examples/basic/src/tables/microchips.ts +++ b/examples/basic/src/tables/microchips.ts @@ -1,5 +1,5 @@ import { db } from "../db"; -import { expose } from "typegres"; +import { expose } from "typegres/core"; import { Int8, Text } from "typegres/postgres"; import { Dogs } from "./dogs"; diff --git a/examples/basic/src/tables/teams.ts b/examples/basic/src/tables/teams.ts index fc61af0..29d78d3 100644 --- a/examples/basic/src/tables/teams.ts +++ b/examples/basic/src/tables/teams.ts @@ -1,5 +1,5 @@ import { db } from "../db"; -import { expose } from "typegres"; +import { expose } from "typegres/core"; import { Int8, Text } from "typegres/postgres"; import { Dogs } from "./dogs"; diff --git a/examples/basic/src/tables/toys.ts b/examples/basic/src/tables/toys.ts index 2dbff67..16eb42d 100644 --- a/examples/basic/src/tables/toys.ts +++ b/examples/basic/src/tables/toys.ts @@ -1,5 +1,5 @@ import { db } from "../db"; -import { expose } from "typegres"; +import { expose } from "typegres/core"; import { Int8, Text } from "typegres/postgres"; import { Dogs } from "./dogs"; diff --git a/examples/chat/.gitignore b/examples/chat/.gitignore new file mode 100644 index 0000000..1e11004 --- /dev/null +++ b/examples/chat/.gitignore @@ -0,0 +1,4 @@ +# Local wrangler dev state (DO SQLite, caches) +.wrangler/ +# Temp sqlite file used by `npm run generate` (tg generate introspection) +.tg-schema.sqlite diff --git a/examples/chat/README.md b/examples/chat/README.md new file mode 100644 index 0000000..fb0e4b4 --- /dev/null +++ b/examples/chat/README.md @@ -0,0 +1,65 @@ +# typegres chat — Durable Object + Cap'n Web + +A chat app whose entire data layer is [typegres](../../) running **inside a +Cloudflare Durable Object's SQLite**. The browser authors typegres queries that +replay server-side over [Cap'n Web](https://github.com/cloudflare/capnweb) RPC — +there is no REST anywhere. + +``` +Browser (React) ──WebSocket / Cap'n Web──▶ Worker ──▶ Durable Object + connect() → ChatApi typegres/core + DoSqliteDriver + doRpc(api => api.userByName(name)) → ctx.storage.sql + doRpc(user => user.rooms() + .select(...).execute(user.conn)) +``` + +- **`typegres/do-sqlite`** — `DoSqliteDriver` over Cloudflare `SqlStorage`. +- **`typegres/core`** — schema/SQL/@expose without node driver peers (so the + worker never resolves `pg` / `better-sqlite3` / pglite). +- **`src/tables/`** — generated table classes (`npm run generate`). +- **`src/migrate.ts`** — DDL applied once per DO on init (and by generate). +- **`src/capabilities.ts`** — `@expose` graph: `ChatApi` → `User` → `Room`. + Reads return query builders the client refines; mutations run server-side. + `@expose` gating is authorization: you only get a `Room` cap when you're a + member. +- **`src/index.ts`** — Worker + Durable Object; serves Cap'n Web on `/ws` and + the React client as static assets. +- **`client/`** — React UI. `api.ts` is transport only (`connect`); the UI + authors queries inline via `doRpc`. + +## Develop + +```sh +npm install +npm run generate # migrate DDL → temp sqlite → tg generate → src/tables +npm run dev # vite (client, watched) + wrangler dev (worker + DO) +``` + +Open the printed `wrangler dev` URL, pick a name, create a room, chat. + +## Deploy + +```sh +npm run deploy # vite build + wrangler deploy +``` + +Requires a Cloudflare account (`wrangler login`). SQLite-backed Durable Objects +are available on the Workers paid plan. + +## Test + +```sh +npm test # vitest in real workerd (@cloudflare/vitest-pool-workers) +``` + +The tests run against a real Durable Object in local workerd — including the +`SqlStorage` contract, the driver, the capability graph, and the full Cap'n Web +round trip over a WebSocket. + +## Notes + +- `SqlStorage` rejects `BigInt` bindings and marshals `INTEGER` results to JS + `number` (lossy above 2^53) — see `test/sqlstorage.probe.test.ts`. Fine for + chat-scale ids; the driver down-converts typegres's boolean `0n/1n`. +- Auth is PoC find-or-create via `ChatApi.userByName(name)`. A real app verifies + a token in that method and never creates users on login. diff --git a/examples/chat/client/App.tsx b/examples/chat/client/App.tsx new file mode 100644 index 0000000..3287d89 --- /dev/null +++ b/examples/chat/client/App.tsx @@ -0,0 +1,260 @@ +import { useEffect, useRef, useState } from "react"; +import { doRpc, type ShimStub } from "typegres/capnweb"; +import type { Room, User } from "../src/capabilities"; +import { connect, type Root } from "./api"; + +type Client = ShimStub; +type RoomInfo = { id: number; name: string }; +type Msg = { id: number; author: string; body: string }; + +export function App() { + const [name, setName] = useState(""); + const [client, setClient] = useState(null); + const [busy, setBusy] = useState(false); + const [error, setError] = useState(null); + + if (!client) { + return ( +
+

typegres chat

+

+ Queries you send run inside a Cloudflare Durable Object's SQLite, over Cap'n Web. +

+
{ + e.preventDefault(); + const n = name.trim(); + if (!n || busy) return; + setBusy(true); + setError(null); + // Root is ChatApi; userByName is on the capability graph (not ?user=). + // A capnweb stub is a callable Proxy — wrap for React setState. + const root: Root = connect(); + void doRpc(root, (api) => api.userByName(n)) + .then((user) => setClient(() => user as unknown as Client)) + .catch((err: unknown) => setError(err instanceof Error ? err.message : String(err))) + .finally(() => setBusy(false)); + }} + > + setName(e.target.value)} + placeholder="your name" + autoFocus + /> + +
+ {error &&

{error}

} +
+ ); + } + return ; +} + +function Chat({ client, me }: { client: Client; me: string }) { + const [rooms, setRooms] = useState([]); // the public directory (all rooms) + const [mine, setMine] = useState>(new Set()); // ids of rooms I've joined + const [roomId, setRoomId] = useState(null); + const [messages, setMessages] = useState([]); + const [draft, setDraft] = useState(""); + const [newRoom, setNewRoom] = useState(""); + // member id → name, filled when a room is opened so the client can label messages + // without a server-side join wrapper (Room.members() + Room.messages() are both + // client-refined builders). + const namesRef = useRef>(new Map()); + + // Client-authored queries: the browser writes the select; it runs in the DO. + const refreshRooms = () => + Promise.all([ + doRpc(client, (u) => + u.allRooms().select(({ rooms }) => ({ id: rooms.id, name: rooms.name })).orderBy(({ rooms }) => rooms.id).execute(u.conn), + ), + doRpc(client, (u) => + u.rooms().select(({ rooms }) => ({ id: rooms.id, name: rooms.name })).orderBy(({ rooms }) => rooms.id).execute(u.conn), + ), + ]).then(([all, joined]) => { + setRooms(all); + setMine(new Set(joined.map((r) => r.id))); + }); + useEffect(() => { + void refreshRooms(); + // eslint-disable-next-line react-hooks/exhaustive-deps + }, []); + + // Load member names once per open room, then poll a client-authored messages query. + useEffect(() => { + if (roomId == null) return; + let alive = true; + + const loadNames = doRpc(client, (u) => + (u.room(roomId) as unknown as Room) + .members() + .select(({ users }) => ({ id: users.id, name: users.name })) + .execute(u.conn), + ).then((rows) => { + if (!alive) return; + namesRef.current = new Map(rows.map((r) => [r.id, r.name])); + }); + + const loadFeed = (): Promise => + doRpc(client, (u) => + (u.room(roomId) as unknown as Room) + .messages() + .select(({ messages }) => ({ id: messages.id, userId: messages.user_id, body: messages.body })) + .orderBy(({ messages }) => messages.id) + .execute(u.conn), + ).then((rows) => { + if (!alive) return; + const names = namesRef.current; + setMessages( + rows.map((r) => ({ + id: r.id, + author: names.get(r.userId) ?? `#${r.userId}`, + body: r.body, + })), + ); + }); + + void loadNames.then(() => loadFeed()).catch(() => {}); + const t = setInterval(() => void loadFeed().catch(() => {}), 1000); + return () => { + alive = false; + clearInterval(t); + }; + }, [client, roomId]); + + // Open a room I'm already a member of (messages/post are authorized by membership). + const open = (id: number) => { + setRoomId(id); + setMessages([]); + }; + + // Join a room from the directory, then open it. + const join = async (id: number) => { + await doRpc(client, (u) => u.joinRoom(id)); + await refreshRooms(); + open(id); + }; + + const send = async (e: React.FormEvent) => { + e.preventDefault(); + if (roomId == null || !draft.trim()) return; + const body = draft.trim(); + await doRpc(client, (u) => (u.room(roomId) as unknown as Room).post(body)); + setDraft(""); + // Immediate re-read with the same client-authored query the poll uses. + const rows = await doRpc(client, (u) => + (u.room(roomId) as unknown as Room) + .messages() + .select(({ messages }) => ({ id: messages.id, userId: messages.user_id, body: messages.body })) + .orderBy(({ messages }) => messages.id) + .execute(u.conn), + ); + const names = namesRef.current; + setMessages( + rows.map((r) => ({ + id: r.id, + author: names.get(r.userId) ?? `#${r.userId}`, + body: r.body, + })), + ); + }; + + const addRoom = async (e: React.FormEvent) => { + e.preventDefault(); + if (!newRoom.trim()) return; + await doRpc(client, (u) => u.createRoom(newRoom.trim())); + setNewRoom(""); + await refreshRooms(); + }; + + return ( +
+ + +
+ {roomId == null ? ( +
pick or create a room
+ ) : ( + <> + +
+ setDraft(e.target.value)} + placeholder="message" + autoFocus + /> + +
+ + )} +
+
+ ); +} + +function Feed({ messages }: { messages: Msg[] }) { + const end = useRef(null); + useEffect(() => { + end.current?.scrollIntoView(); + }, [messages]); + return ( +
+ {messages.map((m) => ( +
+ {m.author} + {m.body} +
+ ))} +
+
+ ); +} diff --git a/examples/chat/client/api.ts b/examples/chat/client/api.ts new file mode 100644 index 0000000..136d84e --- /dev/null +++ b/examples/chat/client/api.ts @@ -0,0 +1,13 @@ +import { newWebSocketRpcSession } from "capnweb"; +import type { ShimStub } from "typegres/capnweb"; +import type { ChatApi } from "../src/capabilities"; + +// Transport only: open a Cap'n Web session whose main capability is ChatApi. +// Auth is ChatApi.userByName(); domain reads are authored inline with doRpc. +export type Root = ShimStub; + +export const connect = (): Root => { + const proto = location.protocol === "https:" ? "wss:" : "ws:"; + const url = `${proto}//${location.host}/ws`; + return newWebSocketRpcSession(url) as unknown as Root; +}; diff --git a/examples/chat/client/index.css b/examples/chat/client/index.css new file mode 100644 index 0000000..e403261 --- /dev/null +++ b/examples/chat/client/index.css @@ -0,0 +1,27 @@ +@import "tailwindcss"; + +@theme { + --color-bg: #0f1115; + --color-panel: #171a21; + --color-line: #262b36; + --color-text: #e6e8ee; + --color-muted: #8a91a0; + --color-accent: #6ea8fe; + --color-accent-ink: #06122b; +} + +@layer base { + body { + @apply m-0 bg-bg text-text antialiased; + font-family: ui-sans-serif, system-ui, -apple-system, sans-serif; + } + input { + @apply bg-bg text-text border border-line rounded-lg px-2.5 py-2 outline-none; + } + button { + @apply bg-accent text-accent-ink border-0 rounded-lg px-3 py-2 cursor-pointer font-semibold; + } + button:hover { + filter: brightness(1.08); + } +} diff --git a/examples/chat/client/index.html b/examples/chat/client/index.html new file mode 100644 index 0000000..bf3d372 --- /dev/null +++ b/examples/chat/client/index.html @@ -0,0 +1,12 @@ + + + + + + typegres chat + + +
+ + + diff --git a/examples/chat/client/main.tsx b/examples/chat/client/main.tsx new file mode 100644 index 0000000..2d79d5f --- /dev/null +++ b/examples/chat/client/main.tsx @@ -0,0 +1,10 @@ +import { StrictMode } from "react"; +import { createRoot } from "react-dom/client"; +import { App } from "./App"; +import "./index.css"; + +createRoot(document.getElementById("root")!).render( + + + , +); diff --git a/examples/chat/package-lock.json b/examples/chat/package-lock.json new file mode 100644 index 0000000..b652864 --- /dev/null +++ b/examples/chat/package-lock.json @@ -0,0 +1,4779 @@ +{ + "name": "typegres-chat", + "version": "0.0.0", + "lockfileVersion": 3, + "requires": true, + "packages": { + "": { + "name": "typegres-chat", + "version": "0.0.0", + "dependencies": { + "capnweb": "file:../../packages/capnweb", + "react": "^19.2.0", + "react-dom": "^19.2.0", + "typegres": "file:../..", + "zod": "^4.4.3" + }, + "devDependencies": { + "@cloudflare/vitest-pool-workers": "^0.12.21", + "@cloudflare/workers-types": "^4.20260310.1", + "@tailwindcss/vite": "^4.3.2", + "@types/better-sqlite3": "^7.6.13", + "@types/react": "^19.2.0", + "@types/react-dom": "^19.2.0", + "@vitejs/plugin-react": "^5.0.4", + "better-sqlite3": "^12.11.1", + "concurrently": "^9.2.1", + "tailwindcss": "^4.3.2", + "typescript": "^6.0.3", + "vite": "^7.3.6", + "vitest": "~3.2.4", + "wrangler": "^4.72.0" + } + }, + "../..": { + "version": "0.2.0", + "dependencies": { + "camelcase": "^9.0.0", + "capnweb": "file:packages/capnweb" + }, + "bin": { + "tg": "dist/cli.mjs" + }, + "devDependencies": { + "@electric-sql/pglite": "^0.4.4", + "@eslint/js": "^10.0.1", + "@standard-schema/spec": "^1.1.0", + "@swc/core": "^1.15.32", + "@types/acorn": "^4.0.6", + "@types/better-sqlite3": "^7.6.13", + "@types/node": "^25.6.0", + "@types/pg": "^8.20.0", + "@typescript-eslint/eslint-plugin": "^8.59.0", + "@typescript-eslint/parser": "^8.59.0", + "@typescript/native-preview": "^7.0.0-dev.20260422.1", + "acorn": "^8.16.0", + "better-sqlite3": "^12.11.1", + "eslint": "^10.2.1", + "fast-check": "^4.9.0", + "pg": "^8.20.0", + "prettier": "^3.8.3", + "secure-json-parse": "^4.1.0", + "tsdown": "^0.21.10", + "typescript": "^6.0.3", + "unplugin-swc": "^1.5.9", + "vitest": "^4.1.5", + "zod": "^4.3.6" + }, + "engines": { + "node": ">=22" + }, + "peerDependencies": { + "@electric-sql/pglite": "^0.4.4", + "better-sqlite3": "^12.11.1", + "pg": "^8.20.0" + }, + "peerDependenciesMeta": { + "@electric-sql/pglite": { + "optional": true + }, + "better-sqlite3": { + "optional": true + }, + "pg": { + "optional": true + } + } + }, + "../../packages/capnweb": { + "version": "0.6.1", + "license": "MIT", + "devDependencies": { + "@changesets/changelog-github": "^0.5.2", + "@changesets/cli": "^2.29.8", + "@cloudflare/vitest-pool-workers": "^0.12.10", + "@cloudflare/workers-types": "^4.20260205.0", + "@types/ws": "^8.18.1", + "@vitest/browser": "^3.2.4", + "pkg-pr-new": "^0.0.60", + "playwright": "^1.56.1", + "tsup": "^8.5.1", + "tsx": "^4.21.0", + "typescript": "^5.9.3", + "vitest": "^3.2.4", + "ws": "^8.19.0" + } + }, + "node_modules/@babel/code-frame": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/code-frame/-/code-frame-7.29.7.tgz", + "integrity": "sha512-Aup7aUOfpbAUg2ROOJN6Iw5f9DMBlzu0mIkm/malLQFN/YQgO48wCj0Kxa3sEHJvPVFg7siR+qRInwXd2qhQKw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-validator-identifier": "^7.29.7", + "js-tokens": "^4.0.0", + "picocolors": "^1.1.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/code-frame/node_modules/js-tokens": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-4.0.0.tgz", + "integrity": "sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/@babel/compat-data": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/compat-data/-/compat-data-7.29.7.tgz", + "integrity": "sha512-locTkQyKvwIEgBzVrn8693ebc97F2U8ZHjbXwDXJ5Fn2TCpNwTlKcaKLkdHop5c/icOFE7qt7Q9JC5hnKNa6Gg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/core": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/core/-/core-7.29.7.tgz", + "integrity": "sha512-RgHBCvtjbOK2gXSNBNIkNoEc9qoVEtau3hj8gEqKQuL3HZAibKarWFEI3Lfm6EYKkLalOh8eSrj9b+ch9H/VBA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-compilation-targets": "^7.29.7", + "@babel/helper-module-transforms": "^7.29.7", + "@babel/helpers": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/remapping": "^2.3.5", + "convert-source-map": "^2.0.0", + "debug": "^4.1.0", + "gensync": "^1.0.0-beta.2", + "json5": "^2.2.3", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/babel" + } + }, + "node_modules/@babel/core/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/generator": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/generator/-/generator-7.29.7.tgz", + "integrity": "sha512-DkXD5OJQaAQIdZ1bt3UZdEnHAn9Imd3IVBdX03UFe+ony9Ojw5pzr9YVKGDY1jt+Gcn/FnGkNf8r+Vj5NOJWtQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7", + "@jridgewell/gen-mapping": "^0.3.12", + "@jridgewell/trace-mapping": "^0.3.28", + "jsesc": "^3.0.2" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/generator/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@babel/helper-compilation-targets": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-compilation-targets/-/helper-compilation-targets-7.29.7.tgz", + "integrity": "sha512-wem6WaBj4NaVYVdNhLPPVacES6ZJ+KBBfSkTMD3YZxbP3rm3Di85tJU5ljaUNhaOynt+Aj0xruhYuzQBt8n71g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/compat-data": "^7.29.7", + "@babel/helper-validator-option": "^7.29.7", + "browserslist": "^4.24.0", + "lru-cache": "^5.1.1", + "semver": "^6.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-compilation-targets/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@babel/helper-globals": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-globals/-/helper-globals-7.29.7.tgz", + "integrity": "sha512-3nQVUAtvkKH9zahfWgw96Jc/uFOmjACE1kQz82E2lqWmHBgjzbNlsC22nuQTfahmWeQtTq5nQ/4Nnd2A1wj4zA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-imports": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-imports/-/helper-module-imports-7.29.7.tgz", + "integrity": "sha512-ejHwrQQYcm9xnTivShn2IDOlIzInN34AXskvq9QicvCtEzq1Vzclu/tKF8Jq1Cg8JG2GL6/EmjgsCT7lXepE3g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/traverse": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-module-transforms": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-module-transforms/-/helper-module-transforms-7.29.7.tgz", + "integrity": "sha512-UPUVSyXbOh627KiCIGQSgwWzGeBKLkaJ9PJEdrngIwMSzxLR4jS4+f1f1jb7VzBbg8nFLaYotvVPFCTqdrmTAg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-module-imports": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7", + "@babel/traverse": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0" + } + }, + "node_modules/@babel/helper-plugin-utils": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-plugin-utils/-/helper-plugin-utils-7.29.7.tgz", + "integrity": "sha512-G7sHYigPY17oO5SYWnfD/0MTBwVR781S/JI643e/JhUYgVgWE/61SoW3NH9KWUKyKq5LVh3npif99Wkt6j86Jw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-string-parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-string-parser/-/helper-string-parser-7.29.7.tgz", + "integrity": "sha512-Pb5ijPrZ89GDH8223L4UP8i6QApWxs04RbPQJTeWDV0/keR2E36MeKnyr6LYmUUvqRRI+Iv87SuF1W6ErINzYw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-identifier": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-identifier/-/helper-validator-identifier-7.29.7.tgz", + "integrity": "sha512-qehxGkRj55h/ff8EMaJ+cYhyaKlHIxqYDn682wQD7RNp9UujOQsHog2uS0r2vzr4pW+sXf90NeeayjcNaX3fFg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helper-validator-option": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helper-validator-option/-/helper-validator-option-7.29.7.tgz", + "integrity": "sha512-N9ZErrD+yW5geCDtBqnOoxmR8+tNKiGuxKlDpuJxfsqpa2dFcexaziGAE/qoHLiDDreVNMupxGmSoNlyvsA3gw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/helpers": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/helpers/-/helpers-7.29.7.tgz", + "integrity": "sha512-1k2lAGRMfHTcwuNYcCNUmaUffmQv8KWMfh2iJUUeRlwlwH4FdNG7mfPI10NPfLHJFThE4Tyr4mv7kTNZOiPuBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/parser": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/parser/-/parser-7.29.7.tgz", + "integrity": "sha512-hnORnjP/1P/zFEndoeX+n+t1RwWRJiJpM/jO7FW32Kn9r5+sJB2JWOdYo4L6k78j15eCwY3Gm/7364B1EMwtNg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.29.7" + }, + "bin": { + "parser": "bin/babel-parser.js" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-self": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-self/-/plugin-transform-react-jsx-self-7.29.7.tgz", + "integrity": "sha512-TL0hMc9xzy86VD31nUiwzd5otRAcyEPcsegCxolO0PvcXuH1v0kECe/UIznYFihpkvU5wg/jk4v0TTEFfm53fw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/plugin-transform-react-jsx-source": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/plugin-transform-react-jsx-source/-/plugin-transform-react-jsx-source-7.29.7.tgz", + "integrity": "sha512-06IyK09H3wi4cGbhDBwp5gUGo0IKtnYa8tyTiephirPCK6fbobVGiXMMI5zLQ4aKEYP3wZ3ArU44o+8KMrSG/Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-plugin-utils": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + }, + "peerDependencies": { + "@babel/core": "^7.0.0-0" + } + }, + "node_modules/@babel/template": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/template/-/template-7.29.7.tgz", + "integrity": "sha512-puq+Gf35oI24FeN11LkoUQFqv9uwNeWpxXZi/Ji3rRIoKAzKnxRaZ+Gkj0vKS9ZCiTESfng1N9LyOyXvo+m+Gg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/types": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/traverse": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/traverse/-/traverse-7.29.7.tgz", + "integrity": "sha512-EhlfNQtZ+NK22w5BM61ciuiq1m58ed33Wr1Xan//ZRTy6hgjnwyCffRYwzsGXdASJSUJ1guZILsErh1eQcl+zw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/code-frame": "^7.29.7", + "@babel/generator": "^7.29.7", + "@babel/helper-globals": "^7.29.7", + "@babel/parser": "^7.29.7", + "@babel/template": "^7.29.7", + "@babel/types": "^7.29.7", + "debug": "^4.3.1" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@babel/types": { + "version": "7.29.7", + "resolved": "https://registry.npmjs.org/@babel/types/-/types-7.29.7.tgz", + "integrity": "sha512-4zBIxpPzowiZpusoFkyGVwakdRJUyuH5PxQ/PrqghfdFWWasvnCdPfQXHrenDai+gyLARulZjZowCOj6fjT4pA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/helper-string-parser": "^7.29.7", + "@babel/helper-validator-identifier": "^7.29.7" + }, + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/@cloudflare/kv-asset-handler": { + "version": "0.4.2", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.4.2.tgz", + "integrity": "sha512-SIOD2DxrRRwQ+jgzlXCqoEFiKOFqaPjhnNTGKXSRLvp1HiOvapLaFG2kEr9dYQTYe8rKrd9uvDUzmAITeNyaHQ==", + "dev": true, + "license": "MIT OR Apache-2.0", + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/@cloudflare/unenv-preset": { + "version": "2.15.0", + "resolved": "https://registry.npmjs.org/@cloudflare/unenv-preset/-/unenv-preset-2.15.0.tgz", + "integrity": "sha512-EGYmJaGZKWl+X8tXxcnx4v2bOZSjQeNI5dWFeXivgX9+YCT69AkzHHwlNbVpqtEUTbew8eQurpyOpeN8fg00nw==", + "dev": true, + "license": "MIT OR Apache-2.0", + "peerDependencies": { + "unenv": "2.0.0-rc.24", + "workerd": "1.20260301.1 || ~1.20260302.1 || ~1.20260303.1 || ~1.20260304.1 || >1.20260305.0 <2.0.0-0" + }, + "peerDependenciesMeta": { + "workerd": { + "optional": true + } + } + }, + "node_modules/@cloudflare/vitest-pool-workers": { + "version": "0.12.21", + "resolved": "https://registry.npmjs.org/@cloudflare/vitest-pool-workers/-/vitest-pool-workers-0.12.21.tgz", + "integrity": "sha512-xqvqVR+qAhekXWaTNY36UtFFmHrz13yGUoWVGOu6LDC2ABiQqI1E1lQ3eUZY8KVB+1FXY/mP5dB6oD07XUGnPg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cjs-module-lexer": "^1.2.3", + "esbuild": "0.27.3", + "miniflare": "4.20260310.0", + "wrangler": "4.72.0" + }, + "peerDependencies": { + "@vitest/runner": "2.0.x - 3.2.x", + "@vitest/snapshot": "2.0.x - 3.2.x", + "vitest": "2.0.x - 3.2.x" + } + }, + "node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20260310.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20260310.1.tgz", + "integrity": "sha512-hF2VpoWaMb1fiGCQJqCY6M8I+2QQqjkyY4LiDYdTL5D/w6C1l5v1zhc0/jrjdD1DXfpJtpcSMSmEPjHse4p9Ig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20260310.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20260310.1.tgz", + "integrity": "sha512-h/Vl3XrYYPI6yFDE27XO1QPq/1G1lKIM8tzZGIWYpntK3IN5XtH3Ee/sLaegpJ49aIJoqhF2mVAZ6Yw+Vk2gJw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-64": { + "version": "1.20260310.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20260310.1.tgz", + "integrity": "sha512-XzQ0GZ8G5P4d74bQYOIP2Su4CLdNPpYidrInaSOuSxMw+HamsHaFrjVsrV2mPy/yk2hi6SY2yMbgKFK9YjA7vw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-arm64": { + "version": "1.20260310.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20260310.1.tgz", + "integrity": "sha512-sxv4CxnN4ZR0uQGTFVGa0V4KTqwdej/czpIc5tYS86G8FQQoGIBiAIs2VvU7b8EROPcandxYHDBPTb+D9HIMPw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-windows-64": { + "version": "1.20260310.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20260310.1.tgz", + "integrity": "sha512-+1ZTViWKJypLfgH/luAHCqkent0DEBjAjvO40iAhOMHRLYP/SPphLvr4Jpi6lb+sIocS8Q1QZL4uM5Etg1Wskg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workers-types": { + "version": "4.20260702.1", + "resolved": "https://registry.npmjs.org/@cloudflare/workers-types/-/workers-types-4.20260702.1.tgz", + "integrity": "sha512-mOhf5TUEB1m2vPrxtqoIGfz0fUC9xyxRDx5gWHy5s+OCo6dcV+g7wI1R7gYCMFohhqF/2y2xeKVwMwCJjfn/WA==", + "dev": true, + "license": "MIT OR Apache-2.0" + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@emnapi/runtime": { + "version": "1.11.2", + "resolved": "https://registry.npmjs.org/@emnapi/runtime/-/runtime-1.11.2.tgz", + "integrity": "sha512-kyOl3X0DuTiT1h2ft8r2fYO8JYtU9a9Xis/zBSiGArNaagCOWx90N1k2wxp18czFDH+OgcWGb5ZP/XMt3dcyPA==", + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "tslib": "^2.4.0" + } + }, + "node_modules/@esbuild/aix-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/aix-ppc64/-/aix-ppc64-0.27.3.tgz", + "integrity": "sha512-9fJMTNFTWZMh5qwrBItuziu834eOCUcEqymSH7pY+zoMVEZg3gcPuBNxH1EvfVYe9h0x/Ptw8KBzv7qxb7l8dg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "aix" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.27.3.tgz", + "integrity": "sha512-i5D1hPY7GIQmXlXhs2w8AWHhenb00+GxjxRncS2ZM7YNVGNfaMxgzSGuO8o8SJzRc/oZwU2bcScvVERk03QhzA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.27.3.tgz", + "integrity": "sha512-YdghPYUmj/FX2SYKJ0OZxf+iaKgMsKHVPF1MAq/P8WirnSpCStzKJFjOjzsW0QQ7oIAiccHdcqjbHmJxRb/dmg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.27.3.tgz", + "integrity": "sha512-IN/0BNTkHtk8lkOM8JWAYFg4ORxBkZQf9zXiEOfERX/CzxW3Vg1ewAhU7QSWQpVIzTW+b8Xy+lGzdYXV6UZObQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.27.3.tgz", + "integrity": "sha512-Re491k7ByTVRy0t3EKWajdLIr0gz2kKKfzafkth4Q8A5n1xTHrkqZgLLjFEHVD+AXdUGgQMq+Godfq45mGpCKg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.27.3.tgz", + "integrity": "sha512-vHk/hA7/1AckjGzRqi6wbo+jaShzRowYip6rt6q7VYEDX4LEy1pZfDpdxCBnGtl+A5zq8iXDcyuxwtv3hNtHFg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.27.3.tgz", + "integrity": "sha512-ipTYM2fjt3kQAYOvo6vcxJx3nBYAzPjgTCk7QEgZG8AUO3ydUhvelmhrbOheMnGOlaSFUoHXB6un+A7q4ygY9w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.27.3.tgz", + "integrity": "sha512-dDk0X87T7mI6U3K9VjWtHOXqwAMJBNN2r7bejDsc+j03SEjtD9HrOl8gVFByeM0aJksoUuUVU9TBaZa2rgj0oA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.27.3.tgz", + "integrity": "sha512-s6nPv2QkSupJwLYyfS+gwdirm0ukyTFNl3KTgZEAiJDd+iHZcbTPPcWCcRYH+WlNbwChgH2QkE9NSlNrMT8Gfw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.27.3.tgz", + "integrity": "sha512-sZOuFz/xWnZ4KH3YfFrKCf1WyPZHakVzTiqji3WDc0BCl2kBwiJLCXpzLzUBLgmp4veFZdvN5ChW4Eq/8Fc2Fg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.27.3.tgz", + "integrity": "sha512-yGlQYjdxtLdh0a3jHjuwOrxQjOZYD/C9PfdbgJJF3TIZWnm/tMd/RcNiLngiu4iwcBAOezdnSLAwQDPqTmtTYg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.27.3.tgz", + "integrity": "sha512-WO60Sn8ly3gtzhyjATDgieJNet/KqsDlX5nRC5Y3oTFcS1l0KWba+SEa9Ja1GfDqSF1z6hif/SkpQJbL63cgOA==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.27.3.tgz", + "integrity": "sha512-APsymYA6sGcZ4pD6k+UxbDjOFSvPWyZhjaiPyl/f79xKxwTnrn5QUnXR5prvetuaSMsb4jgeHewIDCIWljrSxw==", + "cpu": [ + "mips64el" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.27.3.tgz", + "integrity": "sha512-eizBnTeBefojtDb9nSh4vvVQ3V9Qf9Df01PfawPcRzJH4gFSgrObw+LveUyDoKU3kxi5+9RJTCWlj4FjYXVPEA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.27.3.tgz", + "integrity": "sha512-3Emwh0r5wmfm3ssTWRQSyVhbOHvqegUDRd0WhmXKX2mkHJe1SFCMJhagUleMq+Uci34wLSipf8Lagt4LlpRFWQ==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.27.3.tgz", + "integrity": "sha512-pBHUx9LzXWBc7MFIEEL0yD/ZVtNgLytvx60gES28GcWMqil8ElCYR4kvbV2BDqsHOvVDRrOxGySBM9Fcv744hw==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.27.3.tgz", + "integrity": "sha512-Czi8yzXUWIQYAtL/2y6vogER8pvcsOsk5cpwL4Gk5nJqH5UZiVByIY8Eorm5R13gq+DQKYg0+JyQoytLQas4dA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-arm64/-/netbsd-arm64-0.27.3.tgz", + "integrity": "sha512-sDpk0RgmTCR/5HguIZa9n9u+HVKf40fbEUt+iTzSnCaGvY9kFP0YKBWZtJaraonFnqef5SlJ8/TiPAxzyS+UoA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.27.3.tgz", + "integrity": "sha512-P14lFKJl/DdaE00LItAukUdZO5iqNH7+PjoBm+fLQjtxfcfFE20Xf5CrLsmZdq5LFFZzb5JMZ9grUwvtVYzjiA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-arm64/-/openbsd-arm64-0.27.3.tgz", + "integrity": "sha512-AIcMP77AvirGbRl/UZFTq5hjXK+2wC7qFRGoHSDrZ5v5b8DK/GYpXW3CPRL53NkvDqb9D+alBiC/dV0Fb7eJcw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.27.3.tgz", + "integrity": "sha512-DnW2sRrBzA+YnE70LKqnM3P+z8vehfJWHXECbwBmH/CU51z6FiqTQTHFenPlHmo3a8UgpLyH3PT+87OViOh1AQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/openharmony-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/openharmony-arm64/-/openharmony-arm64-0.27.3.tgz", + "integrity": "sha512-NinAEgr/etERPTsZJ7aEZQvvg/A6IsZG/LgZy+81wON2huV7SrK3e63dU0XhyZP4RKGyTm7aOgmQk0bGp0fy2g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.27.3.tgz", + "integrity": "sha512-PanZ+nEz+eWoBJ8/f8HKxTTD172SKwdXebZ0ndd953gt1HRBbhMsaNqjTyYLGLPdoWHy4zLU7bDVJztF5f3BHA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.27.3.tgz", + "integrity": "sha512-B2t59lWWYrbRDw/tjiWOuzSsFh1Y/E95ofKz7rIVYSQkUYBjfSgf6oeYPNWHToFRr2zx52JKApIcAS/D5TUBnA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.27.3.tgz", + "integrity": "sha512-QLKSFeXNS8+tHW7tZpMtjlNb7HKau0QDpwm49u0vUp9y1WOF+PEzkU84y9GqYaAVW8aH8f3GcBck26jh54cX4Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.27.3.tgz", + "integrity": "sha512-4uJGhsxuptu3OcpVAzli+/gWusVGwZZHTlS63hh++ehExkVT8SgiEf7/uC/PclrPPkLhZqGgCTjd0VWLo6xMqA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/colour": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@img/colour/-/colour-1.1.0.tgz", + "integrity": "sha512-Td76q7j57o/tLVdgS746cYARfSyxk8iEfRxewL9h4OMzYhbW4TAcppl0mT4eyqXddh6L/jwoM75mo7ixa/pCeQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/@img/sharp-darwin-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-arm64/-/sharp-darwin-arm64-0.34.5.tgz", + "integrity": "sha512-imtQ3WMJXbMY4fxb/Ndp6HBTNVtWCUI0WdobyheGf5+ad6xX8VIDO8u2xE4qc/fr08CKG/7dDseFtn6M6g/r3w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-arm64": "1.2.4" + } + }, + "node_modules/@img/sharp-darwin-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-darwin-x64/-/sharp-darwin-x64-0.34.5.tgz", + "integrity": "sha512-YNEFAF/4KQ/PeW0N+r+aVVsoIY0/qxxikF2SWdp+NRkmMB7y9LBZAVqQ4yhGCm/H3H270OSykqmQMKLBhBJDEw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-darwin-x64": "1.2.4" + } + }, + "node_modules/@img/sharp-libvips-darwin-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-arm64/-/sharp-libvips-darwin-arm64-1.2.4.tgz", + "integrity": "sha512-zqjjo7RatFfFoP0MkQ51jfuFZBnVE2pRiaydKJ1G/rHZvnsrHAOcQALIi9sA5co5xenQdTugCvtb1cuf78Vf4g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-darwin-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-darwin-x64/-/sharp-libvips-darwin-x64-1.2.4.tgz", + "integrity": "sha512-1IOd5xfVhlGwX+zXv2N93k0yMONvUlANylbJw1eTah8K/Jtpi15KC+WSiaX/nBmbm2HxRM1gZ0nSdjSsrZbGKg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "darwin" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm/-/sharp-libvips-linux-arm-1.2.4.tgz", + "integrity": "sha512-bFI7xcKFELdiNCVov8e44Ia4u2byA+l3XtsAj+Q8tfCwO6BQ8iDojYdvoPMqsKDkuoOo+X6HZA0s0q11ANMQ8A==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-arm64/-/sharp-libvips-linux-arm64-1.2.4.tgz", + "integrity": "sha512-excjX8DfsIcJ10x1Kzr4RcWe1edC9PquDRRPx3YVCvQv+U5p7Yin2s32ftzikXojb1PIFc/9Mt28/y+iRklkrw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-ppc64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-ppc64/-/sharp-libvips-linux-ppc64-1.2.4.tgz", + "integrity": "sha512-FMuvGijLDYG6lW+b/UvyilUWu5Ayu+3r2d1S8notiGCIyYU/76eig1UfMmkZ7vwgOrzKzlQbFSuQfgm7GYUPpA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-riscv64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-riscv64/-/sharp-libvips-linux-riscv64-1.2.4.tgz", + "integrity": "sha512-oVDbcR4zUC0ce82teubSm+x6ETixtKZBh/qbREIOcI3cULzDyb18Sr/Wcyx7NRQeQzOiHTNbZFF1UwPS2scyGA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-s390x": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-s390x/-/sharp-libvips-linux-s390x-1.2.4.tgz", + "integrity": "sha512-qmp9VrzgPgMoGZyPvrQHqk02uyjA0/QrTO26Tqk6l4ZV0MPWIW6LTkqOIov+J1yEu7MbFQaDpwdwJKhbJvuRxQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linux-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linux-x64/-/sharp-libvips-linux-x64-1.2.4.tgz", + "integrity": "sha512-tJxiiLsmHc9Ax1bz3oaOYBURTXGIRDODBqhveVHonrHJ9/+k89qbLl0bcJns+e4t4rvaNBxaEZsFtSfAdquPrw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-arm64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-arm64/-/sharp-libvips-linuxmusl-arm64-1.2.4.tgz", + "integrity": "sha512-FVQHuwx1IIuNow9QAbYUzJ+En8KcVm9Lk5+uGUQJHaZmMECZmOlix9HnH7n1TRkXMS0pGxIJokIVB9SuqZGGXw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-libvips-linuxmusl-x64": { + "version": "1.2.4", + "resolved": "https://registry.npmjs.org/@img/sharp-libvips-linuxmusl-x64/-/sharp-libvips-linuxmusl-x64-1.2.4.tgz", + "integrity": "sha512-+LpyBk7L44ZIXwz/VYfglaX/okxezESc6UxDSoyo2Ks6Jxc4Y7sGjpgU9s4PMgqgjj1gZCylTieNamqA1MF7Dg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "LGPL-3.0-or-later", + "optional": true, + "os": [ + "linux" + ], + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-linux-arm": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm/-/sharp-linux-arm-0.34.5.tgz", + "integrity": "sha512-9dLqsvwtg1uuXBGZKsxem9595+ujv0sJ6Vi8wcTANSFpwV/GONat5eCkzQo/1O6zRIkh0m/8+5BjrRr7jDUSZw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-arm64/-/sharp-linux-arm64-0.34.5.tgz", + "integrity": "sha512-bKQzaJRY/bkPOXyKx5EVup7qkaojECG6NLYswgktOZjaXecSAeCWiZwwiFf3/Y+O1HrauiE3FVsGxFg8c24rZg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-arm64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-ppc64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-ppc64/-/sharp-linux-ppc64-0.34.5.tgz", + "integrity": "sha512-7zznwNaqW6YtsfrGGDA6BRkISKAAE1Jo0QdpNYXNMHu2+0dTrPflTLNkpc8l7MUP5M16ZJcUvysVWWrMefZquA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-ppc64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-riscv64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-riscv64/-/sharp-linux-riscv64-0.34.5.tgz", + "integrity": "sha512-51gJuLPTKa7piYPaVs8GmByo7/U7/7TZOq+cnXJIHZKavIRHAP77e3N2HEl3dgiqdD/w0yUfiJnII77PuDDFdw==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-riscv64": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-s390x": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-s390x/-/sharp-linux-s390x-0.34.5.tgz", + "integrity": "sha512-nQtCk0PdKfho3eC5MrbQoigJ2gd1CgddUMkabUj+rBevs8tZ2cULOx46E7oyX+04WGfABgIwmMC0VqieTiR4jg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-s390x": "1.2.4" + } + }, + "node_modules/@img/sharp-linux-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linux-x64/-/sharp-linux-x64-0.34.5.tgz", + "integrity": "sha512-MEzd8HPKxVxVenwAa+JRPwEC7QFjoPWuS5NZnBt6B3pu7EG2Ge0id1oLHZpPJdn3OQK+BQDiw9zStiHBTJQQQQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linux-x64": "1.2.4" + } + }, + "node_modules/@img/sharp-linuxmusl-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-arm64/-/sharp-linuxmusl-arm64-0.34.5.tgz", + "integrity": "sha512-fprJR6GtRsMt6Kyfq44IsChVZeGN97gTD331weR1ex1c1rypDEABN6Tm2xa1wE6lYb5DdEnk03NZPqA7Id21yg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4" + } + }, + "node_modules/@img/sharp-linuxmusl-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-linuxmusl-x64/-/sharp-linuxmusl-x64-0.34.5.tgz", + "integrity": "sha512-Jg8wNT1MUzIvhBFxViqrEhWDGzqymo3sV7z7ZsaWbZNDLXRJZoRGrjulp60YYtV4wfY8VIKcWidjojlLcWrd8Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-libvips-linuxmusl-x64": "1.2.4" + } + }, + "node_modules/@img/sharp-wasm32": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-wasm32/-/sharp-wasm32-0.34.5.tgz", + "integrity": "sha512-OdWTEiVkY2PHwqkbBI8frFxQQFekHaSSkUIJkwzclWZe64O1X4UlUjqqqLaPbUpMOQk6FBu/HtlGXNblIs0huw==", + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later AND MIT", + "optional": true, + "dependencies": { + "@emnapi/runtime": "^1.7.0" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-arm64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-arm64/-/sharp-win32-arm64-0.34.5.tgz", + "integrity": "sha512-WQ3AgWCWYSb2yt+IG8mnC6Jdk9Whs7O0gxphblsLvdhSpSTtmu69ZG1Gkb6NuvxsNACwiPV6cNSZNzt0KPsw7g==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-ia32": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-ia32/-/sharp-win32-ia32-0.34.5.tgz", + "integrity": "sha512-FV9m/7NmeCmSHDD5j4+4pNI8Cp3aW+JvLoXcTUo0IqyjSfAZJ8dIUmijx1qaJsIiU+Hosw6xM5KijAWRJCSgNg==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@img/sharp-win32-x64": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/@img/sharp-win32-x64/-/sharp-win32-x64-0.34.5.tgz", + "integrity": "sha512-+29YMsqY2/9eFEiW93eqWnuLcWcufowXewwSNIT6UwZdUUCrM3oFjMWH/Z6/TMmb4hlFenmfAVbpWeup2jryCw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "Apache-2.0 AND LGPL-3.0-or-later", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + } + }, + "node_modules/@jridgewell/gen-mapping": { + "version": "0.3.13", + "resolved": "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.13.tgz", + "integrity": "sha512-2kkt/7niJ6MgEPxF0bYdQ6etZaA+fQvDcLKckhy1yIQOzaoKjBBjSj63/aLVjYE3qhRt5dvM+uUyfCg6UKCBbA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.0", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/gen-mapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jridgewell/remapping": { + "version": "2.3.5", + "resolved": "https://registry.npmjs.org/@jridgewell/remapping/-/remapping-2.3.5.tgz", + "integrity": "sha512-LI9u/+laYG4Ds1TDKSJW2YPrIlcVYOwi2fUC6xB43lueCjgxV4lffOCZCtYFiH6TNOX+tQKXx97T4IKHbhyHEQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/gen-mapping": "^0.3.5", + "@jridgewell/trace-mapping": "^0.3.24" + } + }, + "node_modules/@jridgewell/remapping/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.31", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.31.tgz", + "integrity": "sha512-zzNR+SdQSDJzc8joaeP8QQoCQr8NuYx2dIIytl1QeBEZHJ9uW6hebsrYgbz8hJwUQao3TWCMtmfV8Nu1twOLAw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.1.0", + "@jridgewell/sourcemap-codec": "^1.4.14" + } + }, + "node_modules/@jridgewell/resolve-uri": { + "version": "3.1.2", + "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", + "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/@jridgewell/sourcemap-codec": { + "version": "1.5.5", + "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.5.5.tgz", + "integrity": "sha512-cYQ9310grqxueWbl+WuIUIaiUaDcj7WOq5fVhEljNVgRfOUhY9fy2zTvfoqWsnebh8Sl70VScFbICvJnLKB0Og==", + "dev": true, + "license": "MIT" + }, + "node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@poppinss/colors": { + "version": "4.1.6", + "resolved": "https://registry.npmjs.org/@poppinss/colors/-/colors-4.1.6.tgz", + "integrity": "sha512-H9xkIdFswbS8n1d6vmRd8+c10t2Qe+rZITbbDHHkQixH5+2x1FDGmi/0K+WgWiqQFKPSlIYB7jlH6Kpfn6Fleg==", + "dev": true, + "license": "MIT", + "dependencies": { + "kleur": "^4.1.5" + } + }, + "node_modules/@poppinss/dumper": { + "version": "0.6.5", + "resolved": "https://registry.npmjs.org/@poppinss/dumper/-/dumper-0.6.5.tgz", + "integrity": "sha512-NBdYIb90J7LfOI32dOewKI1r7wnkiH6m920puQ3qHUeZkxNkQiFnXVWoE6YtFSv6QOiPPf7ys6i+HWWecDz7sw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/colors": "^4.1.5", + "@sindresorhus/is": "^7.0.2", + "supports-color": "^10.0.0" + } + }, + "node_modules/@poppinss/exception": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/@poppinss/exception/-/exception-1.2.3.tgz", + "integrity": "sha512-dCED+QRChTVatE9ibtoaxc+WkdzOSjYTKi/+uacHWIsfodVfpsueo3+DKpgU5Px8qXjgmXkSvhXvSCz3fnP9lw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rolldown/pluginutils": { + "version": "1.0.0-rc.3", + "resolved": "https://registry.npmjs.org/@rolldown/pluginutils/-/pluginutils-1.0.0-rc.3.tgz", + "integrity": "sha512-eybk3TjzzzV97Dlj5c+XrBFW57eTNhzod66y9HrBlzJ6NsCrWCp/2kaPS3K9wJmurBC0Tdw4yPjXKZqlznim3Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/@rollup/rollup-android-arm-eabi": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.62.2.tgz", + "integrity": "sha512-6o7ZLZK+BeenkZCFNDXqpbjw9bD6nuWonvS/lwQJp7NoVVxm6p3qE7qQ5jGuBjiFsgvqjD8mZAU5oWxTmbOeOg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-android-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.62.2.tgz", + "integrity": "sha512-BaH7BllCACHoH1LguOU56UItGfUWjujlO65kS9LAodViaN4bwIKd7oeW/ZHJ/4ljr/7MIiENnNy3HJ0zXv8Zkw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ] + }, + "node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.62.2.tgz", + "integrity": "sha512-v39RCCvj4He82I9sFmk+M1VZ0PLM9sfsLVikjfx2hYBNALhrrOR2D3JjQA6AhlaSOgcR+RzrKY7e1+bT6SUO/A==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-darwin-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.62.2.tgz", + "integrity": "sha512-yl0y2vq3S3lHeuXhEdss6TWfKW8vkujImO12tn4ZkG/4oghr09LvdYm2RElVjokTQiUvDUGXLGsYeLqUMCKpGA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@rollup/rollup-freebsd-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.62.2.tgz", + "integrity": "sha512-tT4pvt4qXD+vEoezupCWi+a1F0vvDiksiHc+PxRlYTOH1I6/X4id9jPxTP+Fg+545euaFT1jJVs4CEdHZAU1vw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-freebsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.62.2.tgz", + "integrity": "sha512-6nU5F2wCW+qvCBhTn1pdIU3bzsIoF7EUwsCDRxilWGprQR6yd508YnH9+OKFCwpfS8pjZqDUmnCAr7exax0XCg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ] + }, + "node_modules/@rollup/rollup-linux-arm-gnueabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.62.2.tgz", + "integrity": "sha512-n1GJHPOvpIfhi3TmrCeh6S6URt9BFCt0KQE3qvexyGCTAKpR4Lg+eWvNZEqu7epxwus/8ElT3hacYEucm49SZg==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm-musleabihf": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.62.2.tgz", + "integrity": "sha512-JqgflS8wEB+UXV/vS1RpRbifGBeN4D5lz8D8oOFbFZw4vedvdOgCFAjfBmIMdW3yL10XpQQ0Ambepw6MXrhOnA==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.62.2.tgz", + "integrity": "sha512-wnFJkogWvN4jm/hQRF2UBaeUmk20j5+DmHvoyWii2b8HJDyvz1MF2OU/6ynXt2KR63rbZLWkFpoytpdc/yBuSA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-arm64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.62.2.tgz", + "integrity": "sha512-HVu2bp0zhvJ8xHEV9+UUs7S90VadmBSY3LcIMvozbPo4AuMGDWlz3ymHLHZPX4hR67TKTt8Qp5PJ5RBg/i+RMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-gnu/-/rollup-linux-loong64-gnu-4.62.2.tgz", + "integrity": "sha512-mQqqAV8QaoSgr9I2fKDLY2BAVvmKjWoGiu/cSYQonsLvtqwEn1E4QYfnCOcp5zoEqNhsDYin1s6jx/VJmrxlZg==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-loong64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-loong64-musl/-/rollup-linux-loong64-musl-4.62.2.tgz", + "integrity": "sha512-IxKLoxCQ2IWi6bT2akyDUBGsOImDKB+sPp4EsTmwFQ/fMwpCKm8uLSSgP/Kx/QYUgKis6SEZ5/Nlhup0DIA0PQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-gnu/-/rollup-linux-ppc64-gnu-4.62.2.tgz", + "integrity": "sha512-Mk5ha2RQSgyFfmYYLkBpPnUk8D8FriBxesO1u9O75X0mHgXL1UQcH5Itl2lurWL2tj0RxV9b9tJgipac0hRY9A==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-ppc64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-ppc64-musl/-/rollup-linux-ppc64-musl-4.62.2.tgz", + "integrity": "sha512-CjvEnqJL/0/TQ3TXX3OPIJ/kmBellrWd4heXUmHeJlTnmwjKpSJzoehLaL6Xk0ZnMHBu9dZuFADNOrtjF4v+2w==", + "cpu": [ + "ppc64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.62.2.tgz", + "integrity": "sha512-1SiZbzwdkaDURsew/tSOrooKiYy7EQGT6m8ufavAi9NEyQb/6VuIxFXAL1fqa4iZe3g4NbNk4P7J32z2tw5Mgg==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-riscv64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-musl/-/rollup-linux-riscv64-musl-4.62.2.tgz", + "integrity": "sha512-nQts12zJ3NQRoE6uYljOH89v7szzLDvG2JD/vsX+vGXU8w/At1GowTZ5/7qeFQ8m7L55rpR8Okugnuo5bgjy2Q==", + "cpu": [ + "riscv64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-s390x-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.62.2.tgz", + "integrity": "sha512-E9/ll019jhPIJgpzfZoIkBGhcz+kKNgVWYRY0zr9srBdPPFVpvOKW8VaJKUbeK+eZXyQF9ltME+Kk6affeaPgg==", + "cpu": [ + "s390x" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.62.2.tgz", + "integrity": "sha512-5BqxR/pshjey51iliyzTD5Xi3EN0aLmQ2lZ3lvefVV9c82BvrLo2/6OT55iifpWBufs6kdwWbuOKS841DrmK9A==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-linux-x64-musl": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.62.2.tgz", + "integrity": "sha512-uNN83XxQrRAh/w0/pmAfibcwyb6YWt4gP+dpnQKPVJshAloQ785ii8CT8ZCIxkGg9opVsvAlGhFitSm6D1Jjpg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@rollup/rollup-openbsd-x64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openbsd-x64/-/rollup-openbsd-x64-4.62.2.tgz", + "integrity": "sha512-srjEIxSH3LRnJN6THczDHWQplqEMFiAJrTab0msUryh9kwNpkICf3Ea6q6MN/2cZwRFUNx5w+h6Hpi4QuHS6Zg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openbsd" + ] + }, + "node_modules/@rollup/rollup-openharmony-arm64": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-openharmony-arm64/-/rollup-openharmony-arm64-4.62.2.tgz", + "integrity": "sha512-8hOJnxgbyObnCm5AlRA3A931xX19xq80RjVTKgJOvEKWqJruP/Uf12IbAOaDjjEXYRewwHLfmF0YRIdK3OwKWA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "openharmony" + ] + }, + "node_modules/@rollup/rollup-win32-arm64-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.62.2.tgz", + "integrity": "sha512-mmF4AY1i0hG/bLWUctUq59gtmgaSIRa3cu/A3JFRp/sCNEme2bgDEiDS22P9FbnJB8NJNF4jPJiSP5RHQpUTDg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-ia32-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.62.2.tgz", + "integrity": "sha512-DZgkknc6jhHrk46V25vbAM0zZkyP0nSDkJB8/dRkLTxv470dOmWDqGoEJl/9A0dFfS7yE3REOwNDxpHwSLSt0Q==", + "cpu": [ + "ia32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-gnu": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-gnu/-/rollup-win32-x64-gnu-4.62.2.tgz", + "integrity": "sha512-T6xr6ucWSFto+VGajA8YH26LdpHRuP4YLHEKAtCWvJDOlnmWcDZVCI2Jmjr+IFHDlt2zRaTAKE4tfjTaWLgJBg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@rollup/rollup-win32-x64-msvc": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.62.2.tgz", + "integrity": "sha512-BfzEnDJOt9T8M989/lA37EcJgat01wLRnoi5dQf3QzOH7jzpqTAzdDbVfRljVr5r+jzKqpbHeyOfAaXxAd0PAA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, + "node_modules/@sindresorhus/is": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/@sindresorhus/is/-/is-7.2.0.tgz", + "integrity": "sha512-P1Cz1dWaFfR4IR+U13mqqiGsLFf1KbayybWwdd2vfctdV6hDpUkgCY0nKOLLTMSoRd/jJNjtbqzf13K8DCCXQw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/sindresorhus/is?sponsor=1" + } + }, + "node_modules/@speed-highlight/core": { + "version": "1.2.17", + "resolved": "https://registry.npmjs.org/@speed-highlight/core/-/core-1.2.17.tgz", + "integrity": "sha512-Z92FwKpCtfaW1V0jTU/fh3QzYEZN8wDwrzRIBoADCJfn4mJCNcJN/XegifX7BDrQ8/h9Xh/JnbyMchL0FqXrkg==", + "dev": true, + "license": "CC0-1.0" + }, + "node_modules/@tailwindcss/node": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/node/-/node-4.3.2.tgz", + "integrity": "sha512-yWP/sqEcBLaD8JuA6zNwxoYKr75qxTioYwlRwekj5Jr/I5GXnoJfjetH/psLUIv74cYTH2lBUEzBkinthoYcBg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/remapping": "^2.3.5", + "enhanced-resolve": "5.21.6", + "jiti": "^2.7.0", + "lightningcss": "1.32.0", + "magic-string": "^0.30.21", + "source-map-js": "^1.2.1", + "tailwindcss": "4.3.2" + } + }, + "node_modules/@tailwindcss/oxide": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide/-/oxide-4.3.2.tgz", + "integrity": "sha512-z8ZgnzX8gdNoWLBLqBPoh/sjnxkwvf9ZuWjnO0l0yIzbLa5/9S+eC5QxGZKRobVHIC3/1BoMWjHblqWjcgFgag==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 20" + }, + "optionalDependencies": { + "@tailwindcss/oxide-android-arm64": "4.3.2", + "@tailwindcss/oxide-darwin-arm64": "4.3.2", + "@tailwindcss/oxide-darwin-x64": "4.3.2", + "@tailwindcss/oxide-freebsd-x64": "4.3.2", + "@tailwindcss/oxide-linux-arm-gnueabihf": "4.3.2", + "@tailwindcss/oxide-linux-arm64-gnu": "4.3.2", + "@tailwindcss/oxide-linux-arm64-musl": "4.3.2", + "@tailwindcss/oxide-linux-x64-gnu": "4.3.2", + "@tailwindcss/oxide-linux-x64-musl": "4.3.2", + "@tailwindcss/oxide-wasm32-wasi": "4.3.2", + "@tailwindcss/oxide-win32-arm64-msvc": "4.3.2", + "@tailwindcss/oxide-win32-x64-msvc": "4.3.2" + } + }, + "node_modules/@tailwindcss/oxide-android-arm64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-android-arm64/-/oxide-android-arm64-4.3.2.tgz", + "integrity": "sha512-WHxqIuHpvZ5VtdX6GTl1Ik/Vp2YuN42Et+0CdeaVd/frQ9jAvGmvR8vLT+jk3e8/Q3x8kECB9+R17pgpp2BulA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-arm64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-arm64/-/oxide-darwin-arm64-4.3.2.tgz", + "integrity": "sha512-GZypeUY/IDJW3877KeM+O67vbXr3MBnbtEL4aYhNErv/JWZhye2vGSWWG9tB6iiqR2MqRNkY8IOUy4NdSZV26w==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-darwin-x64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-darwin-x64/-/oxide-darwin-x64-4.3.2.tgz", + "integrity": "sha512-UIIzmefR6KO1sDU7MzRqAxC8iBpft/VhkGjTjnhoS6k7Z3rQ9wEgA1ODSiyH/tcSYssulNm4Ci3hOeK1jH7ccQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-freebsd-x64": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-freebsd-x64/-/oxide-freebsd-x64-4.3.2.tgz", + "integrity": "sha512-GN+uAmcI6DNspnCDwtOAZrTz6oukJnp337qZvxqCGLd3BHBzJpO0ZbTLRvJNdztOeAmTzewewGIMPb0tk2R4WA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm-gnueabihf": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm-gnueabihf/-/oxide-linux-arm-gnueabihf-4.3.2.tgz", + "integrity": "sha512-4ABn7qSbdHRwTiDiuWNegCyb5+2FJ4vKIKc3DmKrvAFw7MU1Lm11dIkTPwUaFdTzc7IsOpDbqBrlh0x6y36U/w==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-gnu": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-gnu/-/oxide-linux-arm64-gnu-4.3.2.tgz", + "integrity": "sha512-wDgEIGwoM8w8pufh9LVt1PahDgNdKXrLC2qfAnV3vAmococ9RWbxeAw4pxPttd/TsJfwjyLf90Dg1y9y8I6Emw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-arm64-musl": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-arm64-musl/-/oxide-linux-arm64-musl-4.3.2.tgz", + "integrity": "sha512-J5Nuk0uZQIiMTJj3LEx4sAA9tMFUoXQZFv1J6An+QGYe53HKRJuFDi0rpq/tuouCZeAbOBY3kQ6g8qeD4TUjtA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-gnu": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-gnu/-/oxide-linux-x64-gnu-4.3.2.tgz", + "integrity": "sha512-kqCZpSKOBEJO4mz7OqWoofBZeXTAwaVGPj0ErAj7CojmhKpWVWVOnrt9dE8odoIraZq4oj3ausM37kXi+Tow8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-linux-x64-musl": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-linux-x64-musl/-/oxide-linux-x64-musl-4.3.2.tgz", + "integrity": "sha512-cixpqbh2toJDmkuCRI68nXA8ZxNmdK9Y+9v5h3MC3ZQKy/0BO8AWzlkWyRM7JAFSGBlfig4YVTPsK6MVgqz1uw==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-wasm32-wasi": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-wasm32-wasi/-/oxide-wasm32-wasi-4.3.2.tgz", + "integrity": "sha512-4ec2Z/LOmRsAgU23CS4xeJfcJlmRg94A/XrbGRCF1gyU/zdDfRLYDVsS+ynSZCmGNxQ1jQriQOKMQeQxBA3Isw==", + "bundleDependencies": [ + "@napi-rs/wasm-runtime", + "@emnapi/core", + "@emnapi/runtime", + "@tybys/wasm-util", + "@emnapi/wasi-threads", + "tslib" + ], + "cpu": [ + "wasm32" + ], + "dev": true, + "license": "MIT", + "optional": true, + "dependencies": { + "@emnapi/core": "^1.11.1", + "@emnapi/runtime": "^1.11.1", + "@emnapi/wasi-threads": "^1.2.2", + "@napi-rs/wasm-runtime": "^1.1.4", + "@tybys/wasm-util": "^0.10.2", + "tslib": "^2.8.1" + }, + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/@tailwindcss/oxide-win32-arm64-msvc": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-arm64-msvc/-/oxide-win32-arm64-msvc-4.3.2.tgz", + "integrity": "sha512-Zyr/M0+XcYZu3bZrUytc7TXvrk0ftWfl8gN2MwekNDzhqhKRUucMPSeOzM0o0wH5AWOU49BsKRrfKxI2atCPMQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/oxide-win32-x64-msvc": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/oxide-win32-x64-msvc/-/oxide-win32-x64-msvc-4.3.2.tgz", + "integrity": "sha512-QI9BO7KlNZsp2GuO0jwAAj5jCDABOKXRkCk2XuKTSaNEFSdfzqswYVTtCHBNKHLsqyjFyFkqlDiwkNbTYSssMQ==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 20" + } + }, + "node_modules/@tailwindcss/vite": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/@tailwindcss/vite/-/vite-4.3.2.tgz", + "integrity": "sha512-eHpMeX4JXfVNJDEcsouTeCBubJBTcTLigeaw/NTUW6PB5ATKKXdyonnXgTBX2VuRbjz1hjfz6C5XAhr52ImQXA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@tailwindcss/node": "4.3.2", + "@tailwindcss/oxide": "4.3.2", + "tailwindcss": "4.3.2" + }, + "peerDependencies": { + "vite": "^5.2.0 || ^6 || ^7 || ^8" + } + }, + "node_modules/@types/babel__core": { + "version": "7.20.5", + "resolved": "https://registry.npmjs.org/@types/babel__core/-/babel__core-7.20.5.tgz", + "integrity": "sha512-qoQprZvz5wQFJwMDqeseRXWv3rqMvhgpbXFfVyWhbx9X47POIA6i/+dXefEmZKoAgOaTdaIgNSMqMIU61yRyzA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.20.7", + "@babel/types": "^7.20.7", + "@types/babel__generator": "*", + "@types/babel__template": "*", + "@types/babel__traverse": "*" + } + }, + "node_modules/@types/babel__generator": { + "version": "7.27.0", + "resolved": "https://registry.npmjs.org/@types/babel__generator/-/babel__generator-7.27.0.tgz", + "integrity": "sha512-ufFd2Xi92OAVPYsy+P4n7/U7e68fex0+Ee8gSG9KX7eo084CWiQ4sdxktvdl0bOPupXtVJPY19zk6EwWqUQ8lg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__template": { + "version": "7.4.4", + "resolved": "https://registry.npmjs.org/@types/babel__template/-/babel__template-7.4.4.tgz", + "integrity": "sha512-h/NUaSyG5EyxBIp8YRxo4RMe2/qQgvyowRwVMzhYhBCONbW8PUsg4lkFMrhgZhUe5z3L3MiLDuvyJ/CaPa2A8A==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/parser": "^7.1.0", + "@babel/types": "^7.0.0" + } + }, + "node_modules/@types/babel__traverse": { + "version": "7.28.0", + "resolved": "https://registry.npmjs.org/@types/babel__traverse/-/babel__traverse-7.28.0.tgz", + "integrity": "sha512-8PvcXf70gTDZBgt9ptxJ8elBeBjcLOAcOtoO/mPJjtji1+CdGbHgm77om1GrsPxsiE+uXIpNSK64UYaIwQXd4Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/types": "^7.28.2" + } + }, + "node_modules/@types/better-sqlite3": { + "version": "7.6.13", + "resolved": "https://registry.npmjs.org/@types/better-sqlite3/-/better-sqlite3-7.6.13.tgz", + "integrity": "sha512-NMv9ASNARoKksWtsq/SHakpYAYnhBrQgGD8zkLYk/jaK8jUGn08CfEdTRgYhMypUQAfzSP8W6gNLe0q19/t4VA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/node": "*" + } + }, + "node_modules/@types/chai": { + "version": "5.2.3", + "resolved": "https://registry.npmjs.org/@types/chai/-/chai-5.2.3.tgz", + "integrity": "sha512-Mw558oeA9fFbv65/y4mHtXDs9bPnFMZAL/jxdPFUpOHHIXX91mcgEHbS5Lahr+pwZFR8A7GQleRWeI6cGFC2UA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/deep-eql": "*", + "assertion-error": "^2.0.1" + } + }, + "node_modules/@types/deep-eql": { + "version": "4.0.2", + "resolved": "https://registry.npmjs.org/@types/deep-eql/-/deep-eql-4.0.2.tgz", + "integrity": "sha512-c9h9dVVMigMPc4bwTvC5dxqtqJZwQPePsWjPlpSOnojbor6pGqdk541lfA7AqFQr5pB1BRdq0juY9db81BwyFw==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/estree": { + "version": "1.0.9", + "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.9.tgz", + "integrity": "sha512-GhdPgy1el4/ImP05X05Uw4cw2/M93BCUmnEvWZNStlCzEKME4Fkk+YpoA5OiHNQmoS7Cafb8Xa3Pya8m1Qrzeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/@types/node": { + "version": "26.1.1", + "resolved": "https://registry.npmjs.org/@types/node/-/node-26.1.1.tgz", + "integrity": "sha512-nxAkRSVkN1Y0JC1W8ky/fTfkGsMmcrRsbx+3XoZE+rMOX71kLYTV7fLXpqud1GpbpP5TuffXFqfX7fH2GgZREw==", + "dev": true, + "license": "MIT", + "dependencies": { + "undici-types": "~8.3.0" + } + }, + "node_modules/@types/react": { + "version": "19.2.17", + "resolved": "https://registry.npmjs.org/@types/react/-/react-19.2.17.tgz", + "integrity": "sha512-MXfmqaVPEVgkBT/aY0aGCkRWWtByiYQXo3xdQ8r5RzuFrPiRn8Gar2tQdXSUQ2GKV3bkXckek89V8wQBY2Q/Aw==", + "dev": true, + "license": "MIT", + "dependencies": { + "csstype": "^3.2.2" + } + }, + "node_modules/@types/react-dom": { + "version": "19.2.3", + "resolved": "https://registry.npmjs.org/@types/react-dom/-/react-dom-19.2.3.tgz", + "integrity": "sha512-jp2L/eY6fn+KgVVQAOqYItbF0VY/YApe5Mz2F0aykSO8gx31bYCZyvSeYxCHKvzHG5eZjc+zyaS5BrBWya2+kQ==", + "dev": true, + "license": "MIT", + "peerDependencies": { + "@types/react": "^19.2.0" + } + }, + "node_modules/@vitejs/plugin-react": { + "version": "5.2.0", + "resolved": "https://registry.npmjs.org/@vitejs/plugin-react/-/plugin-react-5.2.0.tgz", + "integrity": "sha512-YmKkfhOAi3wsB1PhJq5Scj3GXMn3WvtQ/JC0xoopuHoXSdmtdStOpFrYaT1kie2YgFBcIe64ROzMYRjCrYOdYw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@babel/core": "^7.29.0", + "@babel/plugin-transform-react-jsx-self": "^7.27.1", + "@babel/plugin-transform-react-jsx-source": "^7.27.1", + "@rolldown/pluginutils": "1.0.0-rc.3", + "@types/babel__core": "^7.20.5", + "react-refresh": "^0.18.0" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "peerDependencies": { + "vite": "^4.2.0 || ^5.0.0 || ^6.0.0 || ^7.0.0 || ^8.0.0" + } + }, + "node_modules/@vitest/expect": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/expect/-/expect-3.2.7.tgz", + "integrity": "sha512-E8eBXaKibuvH2pSZErOjdVb5vF4PbKYcrnluBTYxEk1l/VhhwZg1kZQsdtjq+CsF5CFydf2Rdkz7jDHKSisi3w==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/spy": "3.2.7", + "@vitest/utils": "3.2.7", + "chai": "^5.2.0", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/mocker": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/mocker/-/mocker-3.2.7.tgz", + "integrity": "sha512-Trr0hYO9CM3Wj6ksWHRhK9IZpIY6wTMO5u/MqXurMxT57sWBaOPEtP3Oq60ihZuh5JsiagKfz95OcxdEP6dBrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/spy": "3.2.7", + "estree-walker": "^3.0.3", + "magic-string": "^0.30.17" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "msw": "^2.4.9", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "peerDependenciesMeta": { + "msw": { + "optional": true + }, + "vite": { + "optional": true + } + } + }, + "node_modules/@vitest/pretty-format": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/pretty-format/-/pretty-format-3.2.7.tgz", + "integrity": "sha512-KUHlwqVu0sRlhCdyPdQ/wBoTfRahjUky1MubOmYw9fWfIZy1gNoHpuaaQBPAaMaVYdQYHJLurzj8ECCj5OwTqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/runner": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/runner/-/runner-3.2.7.tgz", + "integrity": "sha512-sB9y4ovltoQP+WaUPwmSxO9WIg9Ig694Di5PalVPsYHklAdE027mehpWF2SQSVq+k6sFgaivbTjTJwZLSHbedA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/utils": "3.2.7", + "pathe": "^2.0.3", + "strip-literal": "^3.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/snapshot": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/snapshot/-/snapshot-3.2.7.tgz", + "integrity": "sha512-7C+MwShwtBSI5Buwoyg3s/iY1eHL9PKAf+O1wVh/TdnjXUtkoL/9YQtre90i4MtNXM6edP1wJ2zOBpfCyhIS7g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.7", + "magic-string": "^0.30.17", + "pathe": "^2.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/spy": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/spy/-/spy-3.2.7.tgz", + "integrity": "sha512-Q2eQGI6d2L/hBtZ0qNuKcAGid68XK6cv1xsoaIma6PaJhHPoqcEJhYpXZ/5myCMqkNgtP6UKuBhbc0nHKnrkuQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "tinyspy": "^4.0.3" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/@vitest/utils": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/@vitest/utils/-/utils-3.2.7.tgz", + "integrity": "sha512-x6BDOd7dyo3PFLY3I9/HJ25X/6OurhGXk2/B9gOZNPF7XDVjeBK4k01lQE5uvDpbuheErh91qYuE1E2OEjK3Rw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@vitest/pretty-format": "3.2.7", + "loupe": "^3.1.4", + "tinyrainbow": "^2.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/ansi-regex": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/ansi-regex/-/ansi-regex-5.0.1.tgz", + "integrity": "sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ansi-styles": { + "version": "4.3.0", + "resolved": "https://registry.npmjs.org/ansi-styles/-/ansi-styles-4.3.0.tgz", + "integrity": "sha512-zbB9rCJAT1rbjiVDb2hqKFHNYLxgtk8NURxZ3IZwD3F6NtxbXZQCnnSi1Lkx+IDohdPlFp222wVALIheZJQSEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-convert": "^2.0.1" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/chalk/ansi-styles?sponsor=1" + } + }, + "node_modules/assertion-error": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/assertion-error/-/assertion-error-2.0.1.tgz", + "integrity": "sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + } + }, + "node_modules/base64-js": { + "version": "1.5.1", + "resolved": "https://registry.npmjs.org/base64-js/-/base64-js-1.5.1.tgz", + "integrity": "sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/baseline-browser-mapping": { + "version": "2.10.43", + "resolved": "https://registry.npmjs.org/baseline-browser-mapping/-/baseline-browser-mapping-2.10.43.tgz", + "integrity": "sha512-AjYpR78kDWAY3Efj+cDTFH9t9SCoL7OoTp1BOb0mQV7S+6CiLwnWM3FyxhJtdPufDFKzmCSFoUncKjWgJEZTCQ==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "baseline-browser-mapping": "dist/cli.cjs" + }, + "engines": { + "node": ">=6.0.0" + } + }, + "node_modules/better-sqlite3": { + "version": "12.11.1", + "resolved": "https://registry.npmjs.org/better-sqlite3/-/better-sqlite3-12.11.1.tgz", + "integrity": "sha512-dq9AtApgg5PGFtBzPFSBl3HZQjHok5gaQCM6zh2Yk0aSmDCs1CbnVI8/HgASQkNKsWFpseIO9beg5xxpYhbIfA==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "dependencies": { + "bindings": "^1.5.0", + "prebuild-install": "^7.1.1" + }, + "engines": { + "node": "20.x || 22.x || 23.x || 24.x || 25.x || 26.x" + } + }, + "node_modules/bindings": { + "version": "1.5.0", + "resolved": "https://registry.npmjs.org/bindings/-/bindings-1.5.0.tgz", + "integrity": "sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "file-uri-to-path": "1.0.0" + } + }, + "node_modules/bl": { + "version": "4.1.0", + "resolved": "https://registry.npmjs.org/bl/-/bl-4.1.0.tgz", + "integrity": "sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "buffer": "^5.5.0", + "inherits": "^2.0.4", + "readable-stream": "^3.4.0" + } + }, + "node_modules/blake3-wasm": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", + "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", + "dev": true, + "license": "MIT" + }, + "node_modules/browserslist": { + "version": "4.28.6", + "resolved": "https://registry.npmjs.org/browserslist/-/browserslist-4.28.6.tgz", + "integrity": "sha512-FQBYNK15VMslhLHpA7+n+n1GOlF1kId2xcCg7/j95f24AOF6VDYMNH4mFxF7KuaTdv627faazpOAjFzMrfJOUw==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "baseline-browser-mapping": "^2.10.42", + "caniuse-lite": "^1.0.30001803", + "electron-to-chromium": "^1.5.389", + "node-releases": "^2.0.51", + "update-browserslist-db": "^1.2.3" + }, + "bin": { + "browserslist": "cli.js" + }, + "engines": { + "node": "^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7" + } + }, + "node_modules/buffer": { + "version": "5.7.1", + "resolved": "https://registry.npmjs.org/buffer/-/buffer-5.7.1.tgz", + "integrity": "sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "base64-js": "^1.3.1", + "ieee754": "^1.1.13" + } + }, + "node_modules/cac": { + "version": "6.7.14", + "resolved": "https://registry.npmjs.org/cac/-/cac-6.7.14.tgz", + "integrity": "sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/caniuse-lite": { + "version": "1.0.30001805", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001805.tgz", + "integrity": "sha512-52noaS3DubycKSXaU30TwPGIp+POyQSUVa5jBEq3vkRkY0kjyb3LQgvhU6WGyCcyXqVLWO0Cw0Q6BSdD0kUfVA==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/caniuse-lite" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "CC-BY-4.0" + }, + "node_modules/capnweb": { + "resolved": "../../packages/capnweb", + "link": true + }, + "node_modules/chai": { + "version": "5.3.3", + "resolved": "https://registry.npmjs.org/chai/-/chai-5.3.3.tgz", + "integrity": "sha512-4zNhdJD/iOjSH0A05ea+Ke6MU5mmpQcbQsSOkgdaUMJ9zTlDTD/GYlwohmIE2u0gaxHYiVHEn1Fw9mZ/ktJWgw==", + "dev": true, + "license": "MIT", + "dependencies": { + "assertion-error": "^2.0.1", + "check-error": "^2.1.1", + "deep-eql": "^5.0.1", + "loupe": "^3.1.0", + "pathval": "^2.0.0" + }, + "engines": { + "node": ">=18" + } + }, + "node_modules/chalk": { + "version": "4.1.2", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-4.1.2.tgz", + "integrity": "sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.1.0", + "supports-color": "^7.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/chalk?sponsor=1" + } + }, + "node_modules/chalk/node_modules/supports-color": { + "version": "7.2.0", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-7.2.0.tgz", + "integrity": "sha512-qpCAvRl9stuOHveKsn7HncJRvv501qIacKzQlO/+Lwxc9+0q2wLyv4Dfvt80/DPn2pqOBsJdDiogXGR9+OvwRw==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/check-error": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/check-error/-/check-error-2.1.3.tgz", + "integrity": "sha512-PAJdDJusoxnwm1VwW07VWwUN1sl7smmC3OKggvndJFadxxDRyFJBX/ggnu/KE4kQAB7a3Dp8f/YXC1FlUprWmA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 16" + } + }, + "node_modules/chownr": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-1.1.4.tgz", + "integrity": "sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==", + "dev": true, + "license": "ISC" + }, + "node_modules/cjs-module-lexer": { + "version": "1.4.3", + "resolved": "https://registry.npmjs.org/cjs-module-lexer/-/cjs-module-lexer-1.4.3.tgz", + "integrity": "sha512-9z8TZaGM1pfswYeXrUpzPrkx8UnWYdhJclsiYMm6x/w5+nN+8Tf/LnAgfLGQCm59qAOxU8WwHEq2vNwF6i4j+Q==", + "dev": true, + "license": "MIT" + }, + "node_modules/cliui": { + "version": "8.0.1", + "resolved": "https://registry.npmjs.org/cliui/-/cliui-8.0.1.tgz", + "integrity": "sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==", + "dev": true, + "license": "ISC", + "dependencies": { + "string-width": "^4.2.0", + "strip-ansi": "^6.0.1", + "wrap-ansi": "^7.0.0" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/color-convert": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/color-convert/-/color-convert-2.0.1.tgz", + "integrity": "sha512-RRECPsj7iu/xb5oKYcsFHSppFNnsj/52OVTRKb4zP5onXwVF3zVmmToNcOfGC+CRDpfK/U584fMg38ZHCaElKQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "color-name": "~1.1.4" + }, + "engines": { + "node": ">=7.0.0" + } + }, + "node_modules/color-name": { + "version": "1.1.4", + "resolved": "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz", + "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", + "dev": true, + "license": "MIT" + }, + "node_modules/concurrently": { + "version": "9.2.4", + "resolved": "https://registry.npmjs.org/concurrently/-/concurrently-9.2.4.tgz", + "integrity": "sha512-TZ0CEhyzvFjgtAvHTusDMgj7wNdihCh7LLLrzdUOXIhdlnL2JBBGA9eJxR24rtqgmdjh3OA3hrN1rCHj6HM8qA==", + "dev": true, + "license": "MIT", + "dependencies": { + "chalk": "4.1.2", + "rxjs": "7.8.2", + "shell-quote": "1.9.0", + "supports-color": "8.1.1", + "tree-kill": "1.2.2", + "yargs": "17.7.2" + }, + "bin": { + "conc": "dist/bin/concurrently.js", + "concurrently": "dist/bin/concurrently.js" + }, + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/open-cli-tools/concurrently?sponsor=1" + } + }, + "node_modules/concurrently/node_modules/supports-color": { + "version": "8.1.1", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz", + "integrity": "sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "has-flag": "^4.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/convert-source-map": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", + "integrity": "sha512-Kvp459HrV2FEJ1CAsi1Ku+MY3kasH19TFykTz2xWmMeq6bk2NU3XXvfJ+Q61m0xktWwt+1HSYf3JZsTms3aRJg==", + "dev": true, + "license": "MIT" + }, + "node_modules/cookie": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/cookie/-/cookie-1.1.1.tgz", + "integrity": "sha512-ei8Aos7ja0weRpFzJnEA9UHJ/7XQmqglbRwnf2ATjcB9Wq874VKH9kfjjirM6UhU2/E5fFYadylyhFldcqSidQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/express" + } + }, + "node_modules/csstype": { + "version": "3.2.3", + "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.2.3.tgz", + "integrity": "sha512-z1HGKcYy2xA8AGQfwrn0PAy+PB7X/GSj3UVJW9qKyn43xWa+gl5nXmU4qqLMRzWVLFC8KusUX8T/0kCiOYpAIQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/debug": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/debug/-/debug-4.4.3.tgz", + "integrity": "sha512-RGwwWnwQvkVfavKVt22FGLw+xYSdzARwm0ru6DhTVA3umU5hZc28V3kO4stgYryrTlLpuvgI9GiijltAjNbcqA==", + "dev": true, + "license": "MIT", + "dependencies": { + "ms": "^2.1.3" + }, + "engines": { + "node": ">=6.0" + }, + "peerDependenciesMeta": { + "supports-color": { + "optional": true + } + } + }, + "node_modules/decompress-response": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz", + "integrity": "sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "mimic-response": "^3.1.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/deep-eql": { + "version": "5.0.2", + "resolved": "https://registry.npmjs.org/deep-eql/-/deep-eql-5.0.2.tgz", + "integrity": "sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/deep-extend": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/deep-extend/-/deep-extend-0.6.0.tgz", + "integrity": "sha512-LOHxIOaPYdHlJRtCQfDIVZtfw/ufM8+rVj649RIHzcm/vGwQRXFt6OPqIFWsm2XEMrNIEtWR64sY1LEKD2vAOA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=4.0.0" + } + }, + "node_modules/detect-libc": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.1.2.tgz", + "integrity": "sha512-Btj2BOOO83o3WyH59e8MgXsxEQVcarkUOpEYrubB0urwnN10yQ364rsiByU11nZlqWYZm05i/of7io4mzihBtQ==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=8" + } + }, + "node_modules/electron-to-chromium": { + "version": "1.5.391", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.391.tgz", + "integrity": "sha512-YmCu4856jkgKT1Nh6fwRdeVrM6Ydf/fBnq51tpmSfX+jOcUMTxh31yH6hjKScRenhB2oDSvA9oooxcpjogPeig==", + "dev": true, + "license": "ISC" + }, + "node_modules/emoji-regex": { + "version": "8.0.0", + "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz", + "integrity": "sha512-MSjYzcWNOA0ewAHpz0MxpYFvwg6yjy1NG3xteoqz644VCo/RPgnr1/GGt+ic3iJTzQ8Eu3TdM14SawnVUmGE6A==", + "dev": true, + "license": "MIT" + }, + "node_modules/end-of-stream": { + "version": "1.4.5", + "resolved": "https://registry.npmjs.org/end-of-stream/-/end-of-stream-1.4.5.tgz", + "integrity": "sha512-ooEGc6HP26xXq/N+GCGOT0JKCLDGrq2bQUZrQ7gyrJiZANJ/8YDTxTpQBXGMn+WbIQXNVpyWymm7KYVICQnyOg==", + "dev": true, + "license": "MIT", + "dependencies": { + "once": "^1.4.0" + } + }, + "node_modules/enhanced-resolve": { + "version": "5.21.6", + "resolved": "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.21.6.tgz", + "integrity": "sha512-aNnGCvbJ/RIyWo1IuhNdVjnNF+EjH9wpzpNHt+ci/m9He9LJvUN8wrCcXjp9cWsGNAuvSpVFTx/vraAFQ8qGjQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "graceful-fs": "^4.2.4", + "tapable": "^2.3.3" + }, + "engines": { + "node": ">=10.13.0" + } + }, + "node_modules/error-stack-parser-es": { + "version": "1.0.5", + "resolved": "https://registry.npmjs.org/error-stack-parser-es/-/error-stack-parser-es-1.0.5.tgz", + "integrity": "sha512-5qucVt2XcuGMcEGgWI7i+yZpmpByQ8J1lHhcL7PwqCwu9FPP3VUXzT4ltHe5i2z9dePwEHcDVOAfSnHsOlCXRA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/es-module-lexer": { + "version": "1.7.0", + "resolved": "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.7.0.tgz", + "integrity": "sha512-jEQoCwk8hyb2AZziIOLhDqpm5+2ww5uIE6lkO/6jcOCusfk6LhMHpXXfBLXTZ7Ydyt0j4VoUQv6uGNYbdW+kBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/esbuild": { + "version": "0.27.3", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.27.3.tgz", + "integrity": "sha512-8VwMnyGCONIs6cWue2IdpHxHnAjzxnw2Zr7MkVxB2vjmQ2ivqGFb4LEG3SMnv0Gb2F/G/2yA8zUaiL1gywDCCg==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "bin": { + "esbuild": "bin/esbuild" + }, + "engines": { + "node": ">=18" + }, + "optionalDependencies": { + "@esbuild/aix-ppc64": "0.27.3", + "@esbuild/android-arm": "0.27.3", + "@esbuild/android-arm64": "0.27.3", + "@esbuild/android-x64": "0.27.3", + "@esbuild/darwin-arm64": "0.27.3", + "@esbuild/darwin-x64": "0.27.3", + "@esbuild/freebsd-arm64": "0.27.3", + "@esbuild/freebsd-x64": "0.27.3", + "@esbuild/linux-arm": "0.27.3", + "@esbuild/linux-arm64": "0.27.3", + "@esbuild/linux-ia32": "0.27.3", + "@esbuild/linux-loong64": "0.27.3", + "@esbuild/linux-mips64el": "0.27.3", + "@esbuild/linux-ppc64": "0.27.3", + "@esbuild/linux-riscv64": "0.27.3", + "@esbuild/linux-s390x": "0.27.3", + "@esbuild/linux-x64": "0.27.3", + "@esbuild/netbsd-arm64": "0.27.3", + "@esbuild/netbsd-x64": "0.27.3", + "@esbuild/openbsd-arm64": "0.27.3", + "@esbuild/openbsd-x64": "0.27.3", + "@esbuild/openharmony-arm64": "0.27.3", + "@esbuild/sunos-x64": "0.27.3", + "@esbuild/win32-arm64": "0.27.3", + "@esbuild/win32-ia32": "0.27.3", + "@esbuild/win32-x64": "0.27.3" + } + }, + "node_modules/escalade": { + "version": "3.2.0", + "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.2.0.tgz", + "integrity": "sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/estree-walker": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-3.0.3.tgz", + "integrity": "sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "^1.0.0" + } + }, + "node_modules/expand-template": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/expand-template/-/expand-template-2.0.3.tgz", + "integrity": "sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==", + "dev": true, + "license": "(MIT OR WTFPL)", + "engines": { + "node": ">=6" + } + }, + "node_modules/expect-type": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/expect-type/-/expect-type-1.4.0.tgz", + "integrity": "sha512-KfYbmpRm0VbLjEvVa9yGwCi9GI34xvi7A/HXYWQO65CSD2u3MczUJSuwXKFIxlGsgBQizV9q5J9NHj4VG0n+pA==", + "dev": true, + "license": "Apache-2.0", + "engines": { + "node": ">=12.0.0" + } + }, + "node_modules/fdir": { + "version": "6.5.0", + "resolved": "https://registry.npmjs.org/fdir/-/fdir-6.5.0.tgz", + "integrity": "sha512-tIbYtZbucOs0BRGqPJkshJUYdL+SDH7dVM8gjy+ERp3WAUjLEFJE+02kanyHtwjWOnwrKYBiwAmM0p4kLJAnXg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12.0.0" + }, + "peerDependencies": { + "picomatch": "^3 || ^4" + }, + "peerDependenciesMeta": { + "picomatch": { + "optional": true + } + } + }, + "node_modules/file-uri-to-path": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/file-uri-to-path/-/file-uri-to-path-1.0.0.tgz", + "integrity": "sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==", + "dev": true, + "license": "MIT" + }, + "node_modules/fs-constants": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/fs-constants/-/fs-constants-1.0.0.tgz", + "integrity": "sha512-y6OAwoSIf7FyjMIv94u+b5rdheZEjzR63GTyZJm5qh4Bi+2YgwLCcI/fPFZkL5PSixOt6ZNKm+w+Hfp/Bciwow==", + "dev": true, + "license": "MIT" + }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, + "node_modules/gensync": { + "version": "1.0.0-beta.2", + "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", + "integrity": "sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6.9.0" + } + }, + "node_modules/get-caller-file": { + "version": "2.0.5", + "resolved": "https://registry.npmjs.org/get-caller-file/-/get-caller-file-2.0.5.tgz", + "integrity": "sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==", + "dev": true, + "license": "ISC", + "engines": { + "node": "6.* || 8.* || >= 10.*" + } + }, + "node_modules/github-from-package": { + "version": "0.0.0", + "resolved": "https://registry.npmjs.org/github-from-package/-/github-from-package-0.0.0.tgz", + "integrity": "sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==", + "dev": true, + "license": "MIT" + }, + "node_modules/graceful-fs": { + "version": "4.2.11", + "resolved": "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz", + "integrity": "sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/has-flag": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/has-flag/-/has-flag-4.0.0.tgz", + "integrity": "sha512-EykJT/Q1KjTWctppgIAgfSO0tKVuZUjhgMr17kqTumMl6Afv3EISleU7qZUzoXDFTAHTDC4NOoG/ZxU3EvlMPQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/ieee754": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", + "integrity": "sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "BSD-3-Clause" + }, + "node_modules/inherits": { + "version": "2.0.4", + "resolved": "https://registry.npmjs.org/inherits/-/inherits-2.0.4.tgz", + "integrity": "sha512-k/vGaX4/Yla3WzyMCvTQOXYeIHvqOKtnqBduzTHpzpQZzAskKMhZ2K+EnBiSM9zGSoIFeMpXKxa4dYeZIQqewQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ini": { + "version": "1.3.8", + "resolved": "https://registry.npmjs.org/ini/-/ini-1.3.8.tgz", + "integrity": "sha512-JV/yugV2uzW5iMRSiZAyDtQd+nxtUnjeLt0acNdw98kKLrvuRVyB80tsREOE7yvGVgalhZ6RNXCmEHkUKBKxew==", + "dev": true, + "license": "ISC" + }, + "node_modules/is-fullwidth-code-point": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/is-fullwidth-code-point/-/is-fullwidth-code-point-3.0.0.tgz", + "integrity": "sha512-zymm5+u+sCsSWyD9qNaejV3DFvhCKclKdizYaJUuHA83RLjb7nSuGnddCHGv0hk+KY7BMAlsWeK4Ueg6EV6XQg==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=8" + } + }, + "node_modules/jiti": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/jiti/-/jiti-2.7.0.tgz", + "integrity": "sha512-AC/7JofJvZGrrneWNaEnJeOLUx+JlGt7tNa0wZiRPT4MY1wmfKjt2+6O2p2uz2+skll8OZZmJMNqeke7kKbNgQ==", + "dev": true, + "license": "MIT", + "bin": { + "jiti": "lib/jiti-cli.mjs" + } + }, + "node_modules/js-tokens": { + "version": "9.0.1", + "resolved": "https://registry.npmjs.org/js-tokens/-/js-tokens-9.0.1.tgz", + "integrity": "sha512-mxa9E9ITFOt0ban3j6L5MpjwegGz6lBQmM1IJkWeBZGcMxto50+eWdjC/52xDbS2vy0k7vIMK0Fe2wfL9OQSpQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/jsesc": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/jsesc/-/jsesc-3.1.0.tgz", + "integrity": "sha512-/sM3dO2FOzXjKQhJuo0Q173wf2KOo8t4I8vHy6lF9poUp7bKT0/NHE8fPX23PwfhnykfqnC2xRxOnVw5XuGIaA==", + "dev": true, + "license": "MIT", + "bin": { + "jsesc": "bin/jsesc" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/json5": { + "version": "2.2.3", + "resolved": "https://registry.npmjs.org/json5/-/json5-2.2.3.tgz", + "integrity": "sha512-XmOWe7eyHYH14cLdVPoyg+GOH3rYX++KpzrylJwSW98t3Nk+U8XOl8FWKOgwtzdb8lXGf6zYwDUzeHMWfxasyg==", + "dev": true, + "license": "MIT", + "bin": { + "json5": "lib/cli.js" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/kleur": { + "version": "4.1.5", + "resolved": "https://registry.npmjs.org/kleur/-/kleur-4.1.5.tgz", + "integrity": "sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + } + }, + "node_modules/lightningcss": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss/-/lightningcss-1.32.0.tgz", + "integrity": "sha512-NXYBzinNrblfraPGyrbPoD19C1h9lfI/1mzgWYvXUTe414Gz/X1FD2XBZSZM7rRTrMA8JL3OtAaGifrIKhQ5yQ==", + "dev": true, + "license": "MPL-2.0", + "dependencies": { + "detect-libc": "^2.0.3" + }, + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + }, + "optionalDependencies": { + "lightningcss-android-arm64": "1.32.0", + "lightningcss-darwin-arm64": "1.32.0", + "lightningcss-darwin-x64": "1.32.0", + "lightningcss-freebsd-x64": "1.32.0", + "lightningcss-linux-arm-gnueabihf": "1.32.0", + "lightningcss-linux-arm64-gnu": "1.32.0", + "lightningcss-linux-arm64-musl": "1.32.0", + "lightningcss-linux-x64-gnu": "1.32.0", + "lightningcss-linux-x64-musl": "1.32.0", + "lightningcss-win32-arm64-msvc": "1.32.0", + "lightningcss-win32-x64-msvc": "1.32.0" + } + }, + "node_modules/lightningcss-android-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-android-arm64/-/lightningcss-android-arm64-1.32.0.tgz", + "integrity": "sha512-YK7/ClTt4kAK0vo6w3X+Pnm0D2cf2vPHbhOXdoNti1Ga0al1P4TBZhwjATvjNwLEBCnKvjJc2jQgHXH0NEwlAg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-arm64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-arm64/-/lightningcss-darwin-arm64-1.32.0.tgz", + "integrity": "sha512-RzeG9Ju5bag2Bv1/lwlVJvBE3q6TtXskdZLLCyfg5pt+HLz9BqlICO7LZM7VHNTTn/5PRhHFBSjk5lc4cmscPQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-darwin-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-darwin-x64/-/lightningcss-darwin-x64-1.32.0.tgz", + "integrity": "sha512-U+QsBp2m/s2wqpUYT/6wnlagdZbtZdndSmut/NJqlCcMLTWp5muCrID+K5UJ6jqD2BFshejCYXniPDbNh73V8w==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-freebsd-x64": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-freebsd-x64/-/lightningcss-freebsd-x64-1.32.0.tgz", + "integrity": "sha512-JCTigedEksZk3tHTTthnMdVfGf61Fky8Ji2E4YjUTEQX14xiy/lTzXnu1vwiZe3bYe0q+SpsSH/CTeDXK6WHig==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm-gnueabihf": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm-gnueabihf/-/lightningcss-linux-arm-gnueabihf-1.32.0.tgz", + "integrity": "sha512-x6rnnpRa2GL0zQOkt6rts3YDPzduLpWvwAF6EMhXFVZXD4tPrBkEFqzGowzCsIWsPjqSK+tyNEODUBXeeVHSkw==", + "cpu": [ + "arm" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-gnu/-/lightningcss-linux-arm64-gnu-1.32.0.tgz", + "integrity": "sha512-0nnMyoyOLRJXfbMOilaSRcLH3Jw5z9HDNGfT/gwCPgaDjnx0i8w7vBzFLFR1f6CMLKF8gVbebmkUN3fa/kQJpQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-arm64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-arm64-musl/-/lightningcss-linux-arm64-musl-1.32.0.tgz", + "integrity": "sha512-UpQkoenr4UJEzgVIYpI80lDFvRmPVg6oqboNHfoH4CQIfNA+HOrZ7Mo7KZP02dC6LjghPQJeBsvXhJod/wnIBg==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-gnu": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-gnu/-/lightningcss-linux-x64-gnu-1.32.0.tgz", + "integrity": "sha512-V7Qr52IhZmdKPVr+Vtw8o+WLsQJYCTd8loIfpDaMRWGUZfBOYEJeyJIkqGIDMZPwPx24pUMfwSxxI8phr/MbOA==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-linux-x64-musl": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-linux-x64-musl/-/lightningcss-linux-x64-musl-1.32.0.tgz", + "integrity": "sha512-bYcLp+Vb0awsiXg/80uCRezCYHNg1/l3mt0gzHnWV9XP1W5sKa5/TCdGWaR/zBM2PeF/HbsQv/j2URNOiVuxWg==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-arm64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-arm64-msvc/-/lightningcss-win32-arm64-msvc-1.32.0.tgz", + "integrity": "sha512-8SbC8BR40pS6baCM8sbtYDSwEVQd4JlFTOlaD3gWGHfThTcABnNDBda6eTZeqbofalIJhFx0qKzgHJmcPTnGdw==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/lightningcss-win32-x64-msvc": { + "version": "1.32.0", + "resolved": "https://registry.npmjs.org/lightningcss-win32-x64-msvc/-/lightningcss-win32-x64-msvc-1.32.0.tgz", + "integrity": "sha512-Amq9B/SoZYdDi1kFrojnoqPLxYhQ4Wo5XiL8EVJrVsB8ARoC1PWW6VGtT0WKCemjy8aC+louJnjS7U18x3b06Q==", + "cpu": [ + "x64" + ], + "dev": true, + "license": "MPL-2.0", + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">= 12.0.0" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/parcel" + } + }, + "node_modules/loupe": { + "version": "3.2.1", + "resolved": "https://registry.npmjs.org/loupe/-/loupe-3.2.1.tgz", + "integrity": "sha512-CdzqowRJCeLU72bHvWqwRBBlLcMEtIvGrlvef74kMnV2AolS9Y8xUv1I0U/MNAWMhBlKIoyuEgoJ0t/bbwHbLQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/lru-cache": { + "version": "5.1.1", + "resolved": "https://registry.npmjs.org/lru-cache/-/lru-cache-5.1.1.tgz", + "integrity": "sha512-KpNARQA3Iwv+jTA0utUVVbrh+Jlrr1Fv0e56GGzAFOXN7dk/FviaDW8LHmK52DlcH4WP2n6gI8vN1aesBFgo9w==", + "dev": true, + "license": "ISC", + "dependencies": { + "yallist": "^3.0.2" + } + }, + "node_modules/magic-string": { + "version": "0.30.21", + "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.30.21.tgz", + "integrity": "sha512-vd2F4YUyEXKGcLHoq+TEyCjxueSeHnFxyyjNp80yg0XV4vUhnDer/lvvlqM/arB5bXQN5K2/3oinyCRyx8T2CQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@jridgewell/sourcemap-codec": "^1.5.5" + } + }, + "node_modules/mimic-response": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/mimic-response/-/mimic-response-3.1.0.tgz", + "integrity": "sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/miniflare": { + "version": "4.20260310.0", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-4.20260310.0.tgz", + "integrity": "sha512-uC5vNPenFpDSj5aUU3wGSABG6UUqMr+Xs1m4AkCrTHo37F4Z6xcQw5BXqViTfPDVT/zcYH1UgTVoXhr1l6ZMXw==", + "dev": true, + "license": "MIT", + "dependencies": { + "@cspotcode/source-map-support": "0.8.1", + "sharp": "^0.34.5", + "undici": "7.18.2", + "workerd": "1.20260310.1", + "ws": "8.18.0", + "youch": "4.1.0-beta.10" + }, + "bin": { + "miniflare": "bootstrap.js" + }, + "engines": { + "node": ">=18.0.0" + } + }, + "node_modules/minimist": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/minimist/-/minimist-1.2.8.tgz", + "integrity": "sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==", + "dev": true, + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/mkdirp-classic": { + "version": "0.5.3", + "resolved": "https://registry.npmjs.org/mkdirp-classic/-/mkdirp-classic-0.5.3.tgz", + "integrity": "sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==", + "dev": true, + "license": "MIT" + }, + "node_modules/ms": { + "version": "2.1.3", + "resolved": "https://registry.npmjs.org/ms/-/ms-2.1.3.tgz", + "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", + "dev": true, + "license": "MIT" + }, + "node_modules/nanoid": { + "version": "3.3.16", + "resolved": "https://registry.npmjs.org/nanoid/-/nanoid-3.3.16.tgz", + "integrity": "sha512-bzlKTyNJ7+LdGIIwy8ijFpIqEQIvafahV7eYykJ8Cvh42EdJeODoJ6gUJXpQJvej1BddH8OqTXZNE/KfbWAu8Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "bin": { + "nanoid": "bin/nanoid.cjs" + }, + "engines": { + "node": "^10 || ^12 || ^13.7 || ^14 || >=15.0.1" + } + }, + "node_modules/napi-build-utils": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/napi-build-utils/-/napi-build-utils-2.0.0.tgz", + "integrity": "sha512-GEbrYkbfF7MoNaoh2iGG84Mnf/WZfB0GdGEsM8wz7Expx/LlWf5U8t9nvJKXSp3qr5IsEbK04cBGhol/KwOsWA==", + "dev": true, + "license": "MIT" + }, + "node_modules/node-abi": { + "version": "3.94.0", + "resolved": "https://registry.npmjs.org/node-abi/-/node-abi-3.94.0.tgz", + "integrity": "sha512-W5ZNO5KRPB5TkYmGVD9F6YqhsglXJzE6etpbmT+f6EQElhiX/UTG551cnsRGvLG3fyZEg9HwaDmNmj5nwJ4z9g==", + "dev": true, + "license": "MIT", + "dependencies": { + "semver": "^7.3.5" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/node-releases": { + "version": "2.0.51", + "resolved": "https://registry.npmjs.org/node-releases/-/node-releases-2.0.51.tgz", + "integrity": "sha512-wRNIrw4DmVLKQlbgOMdkMx27Wrpzes2hh5Jtbi2bjPd+4wJstWIqP5A+lscnqbm0xxmT5Bpg8Lec5ItEBwx6BQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + } + }, + "node_modules/once": { + "version": "1.4.0", + "resolved": "https://registry.npmjs.org/once/-/once-1.4.0.tgz", + "integrity": "sha512-lNaJgI+2Q5URQBkccEKHTQOPaXdUxnZZElQTZY0MFUAuaEqe1E+Nyvgdz/aIyNi6Z9MzO5dv1H8n58/GELp3+w==", + "dev": true, + "license": "ISC", + "dependencies": { + "wrappy": "1" + } + }, + "node_modules/path-to-regexp": { + "version": "6.3.0", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.3.0.tgz", + "integrity": "sha512-Yhpw4T9C6hPpgPeA28us07OJeqZ5EzQTkbfwuhsUg0c237RomFoETJgmp2sa3F/41gfLE6G5cqcYwznmeEeOlQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathe": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/pathe/-/pathe-2.0.3.tgz", + "integrity": "sha512-WUjGcAqP1gQacoQe+OBJsFA7Ld4DyXuUIjZ5cc75cLHvJ7dtNsTugphxIADwspS+AraAUePCKrSVtPLFj/F88w==", + "dev": true, + "license": "MIT" + }, + "node_modules/pathval": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/pathval/-/pathval-2.0.1.tgz", + "integrity": "sha512-//nshmD55c46FuFw26xV/xFAaB5HF9Xdap7HJBBnrKdAd6/GxDBaNA1870O79+9ueg61cZLSVc+OaFlfmObYVQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 14.16" + } + }, + "node_modules/picocolors": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/picocolors/-/picocolors-1.1.1.tgz", + "integrity": "sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==", + "dev": true, + "license": "ISC" + }, + "node_modules/picomatch": { + "version": "4.0.5", + "resolved": "https://registry.npmjs.org/picomatch/-/picomatch-4.0.5.tgz", + "integrity": "sha512-RvwwcruNjI1ncT5xRakeyS9Lf8lcItv34KD+aif+VH9kduAyfYBipGh12274xtenIPZ119/R9BdTBa8gAwSh0A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=12" + }, + "funding": { + "url": "https://github.com/sponsors/jonschlinkert" + } + }, + "node_modules/postcss": { + "version": "8.5.19", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.5.19.tgz", + "integrity": "sha512-Mz8SaolMd8nB+G13WkORcxQKHZ/NE4xXevtkJHVuG+guo9/wYKlIMTKAqGdEmYOXR2ijPjTYNHssizdaVSUNdQ==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/postcss/" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/postcss" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "nanoid": "^3.3.12", + "picocolors": "^1.1.1", + "source-map-js": "^1.2.1" + }, + "engines": { + "node": "^10 || ^12 || >=14" + } + }, + "node_modules/prebuild-install": { + "version": "7.1.3", + "resolved": "https://registry.npmjs.org/prebuild-install/-/prebuild-install-7.1.3.tgz", + "integrity": "sha512-8Mf2cbV7x1cXPUILADGI3wuhfqWvtiLA1iclTDbFRZkgRQS0NqsPZphna9V+HyTEadheuPmjaJMsbzKQFOzLug==", + "deprecated": "No longer maintained. Please contact the author of the relevant native addon; alternatives are available.", + "dev": true, + "license": "MIT", + "dependencies": { + "detect-libc": "^2.0.0", + "expand-template": "^2.0.3", + "github-from-package": "0.0.0", + "minimist": "^1.2.3", + "mkdirp-classic": "^0.5.3", + "napi-build-utils": "^2.0.0", + "node-abi": "^3.3.0", + "pump": "^3.0.0", + "rc": "^1.2.7", + "simple-get": "^4.0.0", + "tar-fs": "^2.0.0", + "tunnel-agent": "^0.6.0" + }, + "bin": { + "prebuild-install": "bin.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/pump": { + "version": "3.0.4", + "resolved": "https://registry.npmjs.org/pump/-/pump-3.0.4.tgz", + "integrity": "sha512-VS7sjc6KR7e1ukRFhQSY5LM2uBWAUPiOPa/A3mkKmiMwSmRFUITt0xuj+/lesgnCv+dPIEYlkzrcyXgquIHMcA==", + "dev": true, + "license": "MIT", + "dependencies": { + "end-of-stream": "^1.1.0", + "once": "^1.3.1" + } + }, + "node_modules/rc": { + "version": "1.2.8", + "resolved": "https://registry.npmjs.org/rc/-/rc-1.2.8.tgz", + "integrity": "sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==", + "dev": true, + "license": "(BSD-2-Clause OR MIT OR Apache-2.0)", + "dependencies": { + "deep-extend": "^0.6.0", + "ini": "~1.3.0", + "minimist": "^1.2.0", + "strip-json-comments": "~2.0.1" + }, + "bin": { + "rc": "cli.js" + } + }, + "node_modules/react": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react/-/react-19.2.7.tgz", + "integrity": "sha512-HNe9WslTbXmFK8o8cmwgAeJFSBvt1bPdHCVKtaaV+WlAN36mpT4hcRpwbf3fY56ar2oIXzsBpOAiIRHAdY0OlQ==", + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/react-dom": { + "version": "19.2.7", + "resolved": "https://registry.npmjs.org/react-dom/-/react-dom-19.2.7.tgz", + "integrity": "sha512-t0BRVXvbiE/o20Hfw669rLbMCDWtYZLvmJigy2f0MxsXF+71pxhR3xOkspmsO8h3ZlNzyibAmtCa3l4lYKk6gQ==", + "license": "MIT", + "dependencies": { + "scheduler": "^0.27.0" + }, + "peerDependencies": { + "react": "^19.2.7" + } + }, + "node_modules/react-refresh": { + "version": "0.18.0", + "resolved": "https://registry.npmjs.org/react-refresh/-/react-refresh-0.18.0.tgz", + "integrity": "sha512-QgT5//D3jfjJb6Gsjxv0Slpj23ip+HtOpnNgnb2S5zU3CB26G/IDPGoy4RJB42wzFE46DRsstbW6tKHoKbhAxw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "license": "MIT", + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, + "node_modules/require-directory": { + "version": "2.1.1", + "resolved": "https://registry.npmjs.org/require-directory/-/require-directory-2.1.1.tgz", + "integrity": "sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/rollup": { + "version": "4.62.2", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.62.2.tgz", + "integrity": "sha512-RFnrW4lhXA3s3eqHDZvN654g8OTjzRfqpIRJYczCGB6HzphckVAi/Qh4tbPUbRuDi7s1Llv8g/NspLkttY3gTA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/estree": "1.0.9" + }, + "bin": { + "rollup": "dist/bin/rollup" + }, + "engines": { + "node": ">=18.0.0", + "npm": ">=8.0.0" + }, + "optionalDependencies": { + "@rollup/rollup-android-arm-eabi": "4.62.2", + "@rollup/rollup-android-arm64": "4.62.2", + "@rollup/rollup-darwin-arm64": "4.62.2", + "@rollup/rollup-darwin-x64": "4.62.2", + "@rollup/rollup-freebsd-arm64": "4.62.2", + "@rollup/rollup-freebsd-x64": "4.62.2", + "@rollup/rollup-linux-arm-gnueabihf": "4.62.2", + "@rollup/rollup-linux-arm-musleabihf": "4.62.2", + "@rollup/rollup-linux-arm64-gnu": "4.62.2", + "@rollup/rollup-linux-arm64-musl": "4.62.2", + "@rollup/rollup-linux-loong64-gnu": "4.62.2", + "@rollup/rollup-linux-loong64-musl": "4.62.2", + "@rollup/rollup-linux-ppc64-gnu": "4.62.2", + "@rollup/rollup-linux-ppc64-musl": "4.62.2", + "@rollup/rollup-linux-riscv64-gnu": "4.62.2", + "@rollup/rollup-linux-riscv64-musl": "4.62.2", + "@rollup/rollup-linux-s390x-gnu": "4.62.2", + "@rollup/rollup-linux-x64-gnu": "4.62.2", + "@rollup/rollup-linux-x64-musl": "4.62.2", + "@rollup/rollup-openbsd-x64": "4.62.2", + "@rollup/rollup-openharmony-arm64": "4.62.2", + "@rollup/rollup-win32-arm64-msvc": "4.62.2", + "@rollup/rollup-win32-ia32-msvc": "4.62.2", + "@rollup/rollup-win32-x64-gnu": "4.62.2", + "@rollup/rollup-win32-x64-msvc": "4.62.2", + "fsevents": "~2.3.2" + } + }, + "node_modules/rxjs": { + "version": "7.8.2", + "resolved": "https://registry.npmjs.org/rxjs/-/rxjs-7.8.2.tgz", + "integrity": "sha512-dhKf903U/PQZY6boNNtAGdWbG85WAbjT/1xYoZIC7FAY0yWapOBQVsVrDl58W86//e1VpMNBtRV4MaXfdMySFA==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "tslib": "^2.1.0" + } + }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/scheduler": { + "version": "0.27.0", + "resolved": "https://registry.npmjs.org/scheduler/-/scheduler-0.27.0.tgz", + "integrity": "sha512-eNv+WrVbKu1f3vbYJT/xtiF5syA5HPIMtf9IgY/nKg0sWqzAUEvqY/xm7OcZc/qafLx/iO9FgOmeSAp4v5ti/Q==", + "license": "MIT" + }, + "node_modules/semver": { + "version": "7.8.5", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.8.5.tgz", + "integrity": "sha512-Y7/KDsb8LjooZpwaqGyulO6DQlksgCncchHGk+sZIY4SBvUocMBEFH5Ur1fI4dV+Jvl0w6cjvucaIi40puRioA==", + "dev": true, + "license": "ISC", + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/sharp": { + "version": "0.34.5", + "resolved": "https://registry.npmjs.org/sharp/-/sharp-0.34.5.tgz", + "integrity": "sha512-Ou9I5Ft9WNcCbXrU9cMgPBcCK8LiwLqcbywW3t4oDV37n1pzpuNLsYiAV8eODnjbtQlSDwZ2cUEeQz4E54Hltg==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "dependencies": { + "@img/colour": "^1.0.0", + "detect-libc": "^2.1.2", + "semver": "^7.7.3" + }, + "engines": { + "node": "^18.17.0 || ^20.3.0 || >=21.0.0" + }, + "funding": { + "url": "https://opencollective.com/libvips" + }, + "optionalDependencies": { + "@img/sharp-darwin-arm64": "0.34.5", + "@img/sharp-darwin-x64": "0.34.5", + "@img/sharp-libvips-darwin-arm64": "1.2.4", + "@img/sharp-libvips-darwin-x64": "1.2.4", + "@img/sharp-libvips-linux-arm": "1.2.4", + "@img/sharp-libvips-linux-arm64": "1.2.4", + "@img/sharp-libvips-linux-ppc64": "1.2.4", + "@img/sharp-libvips-linux-riscv64": "1.2.4", + "@img/sharp-libvips-linux-s390x": "1.2.4", + "@img/sharp-libvips-linux-x64": "1.2.4", + "@img/sharp-libvips-linuxmusl-arm64": "1.2.4", + "@img/sharp-libvips-linuxmusl-x64": "1.2.4", + "@img/sharp-linux-arm": "0.34.5", + "@img/sharp-linux-arm64": "0.34.5", + "@img/sharp-linux-ppc64": "0.34.5", + "@img/sharp-linux-riscv64": "0.34.5", + "@img/sharp-linux-s390x": "0.34.5", + "@img/sharp-linux-x64": "0.34.5", + "@img/sharp-linuxmusl-arm64": "0.34.5", + "@img/sharp-linuxmusl-x64": "0.34.5", + "@img/sharp-wasm32": "0.34.5", + "@img/sharp-win32-arm64": "0.34.5", + "@img/sharp-win32-ia32": "0.34.5", + "@img/sharp-win32-x64": "0.34.5" + } + }, + "node_modules/shell-quote": { + "version": "1.9.0", + "resolved": "https://registry.npmjs.org/shell-quote/-/shell-quote-1.9.0.tgz", + "integrity": "sha512-Iov+JwFv/2HcTpcwNMKd8+IWNb8tboQJNQTkAY/LLVK7gGH9jy+LGkVqPxfekHl+yMmiqXszdGWXgkfml7hjqA==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">= 0.4" + }, + "funding": { + "url": "https://github.com/sponsors/ljharb" + } + }, + "node_modules/siginfo": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/siginfo/-/siginfo-2.0.0.tgz", + "integrity": "sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==", + "dev": true, + "license": "ISC" + }, + "node_modules/simple-concat": { + "version": "1.0.1", + "resolved": "https://registry.npmjs.org/simple-concat/-/simple-concat-1.0.1.tgz", + "integrity": "sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT" + }, + "node_modules/simple-get": { + "version": "4.0.1", + "resolved": "https://registry.npmjs.org/simple-get/-/simple-get-4.0.1.tgz", + "integrity": "sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ], + "license": "MIT", + "dependencies": { + "decompress-response": "^6.0.0", + "once": "^1.3.1", + "simple-concat": "^1.0.0" + } + }, + "node_modules/source-map-js": { + "version": "1.2.1", + "resolved": "https://registry.npmjs.org/source-map-js/-/source-map-js-1.2.1.tgz", + "integrity": "sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==", + "dev": true, + "license": "BSD-3-Clause", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/stackback": { + "version": "0.0.2", + "resolved": "https://registry.npmjs.org/stackback/-/stackback-0.0.2.tgz", + "integrity": "sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==", + "dev": true, + "license": "MIT" + }, + "node_modules/std-env": { + "version": "3.10.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.10.0.tgz", + "integrity": "sha512-5GS12FdOZNliM5mAOxFRg7Ir0pWz8MdpYm6AY6VPkGpbA7ZzmbzNcBJQ0GPvvyWgcY7QAhCgf9Uy89I03faLkg==", + "dev": true, + "license": "MIT" + }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "license": "MIT", + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, + "node_modules/string-width": { + "version": "4.2.3", + "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", + "integrity": "sha512-wKyQRQpjJ0sIp62ErSZdGsjMJWsap5oRNihHhu6G7JVO/9jIB6UyevL+tXuOqrng8j/cxKTWyWUwvSTriiZz/g==", + "dev": true, + "license": "MIT", + "dependencies": { + "emoji-regex": "^8.0.0", + "is-fullwidth-code-point": "^3.0.0", + "strip-ansi": "^6.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-ansi": { + "version": "6.0.1", + "resolved": "https://registry.npmjs.org/strip-ansi/-/strip-ansi-6.0.1.tgz", + "integrity": "sha512-Y38VPSHcqkFrCpFnQ9vuSXmquuv5oXOKpGeT6aGrr3o3Gc9AlVa6JBfUSOCnbxGGZF+/0ooI7KrPuUSztUdU5A==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-regex": "^5.0.1" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/strip-json-comments": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-2.0.1.tgz", + "integrity": "sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=0.10.0" + } + }, + "node_modules/strip-literal": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/strip-literal/-/strip-literal-3.1.0.tgz", + "integrity": "sha512-8r3mkIM/2+PpjHoOtiAW8Rg3jJLHaV7xPwG+YRGrv6FP0wwk/toTpATxWYOW0BKdWwl82VT2tFYi5DlROa0Mxg==", + "dev": true, + "license": "MIT", + "dependencies": { + "js-tokens": "^9.0.1" + }, + "funding": { + "url": "https://github.com/sponsors/antfu" + } + }, + "node_modules/supports-color": { + "version": "10.2.2", + "resolved": "https://registry.npmjs.org/supports-color/-/supports-color-10.2.2.tgz", + "integrity": "sha512-SS+jx45GF1QjgEXQx4NJZV9ImqmO2NPz5FNsIHrsDjh2YsHnawpan7SNQ1o8NuhrbHZy9AZhIoCUiCeaW/C80g==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=18" + }, + "funding": { + "url": "https://github.com/chalk/supports-color?sponsor=1" + } + }, + "node_modules/tailwindcss": { + "version": "4.3.2", + "resolved": "https://registry.npmjs.org/tailwindcss/-/tailwindcss-4.3.2.tgz", + "integrity": "sha512-WtctNNSH8A9jlMIqxzuYumOHU5uGZyRv0Q5svQl+oEPy5w84YpBxdb7MdqyiSPQge5jTJ6zFQLq0PFygdccSBA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tapable": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/tapable/-/tapable-2.3.3.tgz", + "integrity": "sha512-uxc/zpqFg6x7C8vOE7lh6Lbda8eEL9zmVm/PLeTPBRhh1xCgdWaQ+J1CUieGpIfm2HdtsUpRv+HshiasBMcc6A==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=6" + }, + "funding": { + "type": "opencollective", + "url": "https://opencollective.com/webpack" + } + }, + "node_modules/tar-fs": { + "version": "2.1.5", + "resolved": "https://registry.npmjs.org/tar-fs/-/tar-fs-2.1.5.tgz", + "integrity": "sha512-OboTd8mmMhZDNPV+UjQcK9yKAatXu2aJ+r1w4im1Otd4M4fl2hwvdoXUxIYHFTHWK/3y3FarBP70v3vwmGlOxw==", + "dev": true, + "license": "MIT", + "dependencies": { + "chownr": "^1.1.1", + "mkdirp-classic": "^0.5.2", + "pump": "^3.0.0", + "tar-stream": "^2.1.4" + } + }, + "node_modules/tar-stream": { + "version": "2.2.0", + "resolved": "https://registry.npmjs.org/tar-stream/-/tar-stream-2.2.0.tgz", + "integrity": "sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "bl": "^4.0.3", + "end-of-stream": "^1.4.1", + "fs-constants": "^1.0.0", + "inherits": "^2.0.3", + "readable-stream": "^3.1.1" + }, + "engines": { + "node": ">=6" + } + }, + "node_modules/tinybench": { + "version": "2.9.0", + "resolved": "https://registry.npmjs.org/tinybench/-/tinybench-2.9.0.tgz", + "integrity": "sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyexec": { + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/tinyexec/-/tinyexec-0.3.2.tgz", + "integrity": "sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==", + "dev": true, + "license": "MIT" + }, + "node_modules/tinyglobby": { + "version": "0.2.17", + "resolved": "https://registry.npmjs.org/tinyglobby/-/tinyglobby-0.2.17.tgz", + "integrity": "sha512-wXR/dYpcqKmfWpEdZjiKJOwCNFndD0DMnrW/cYjVGttEkBfVgcLFHoNrlj47mjOVic9yyNu65alsgF4NQyTa2g==", + "dev": true, + "license": "MIT", + "dependencies": { + "fdir": "^6.5.0", + "picomatch": "^4.0.4" + }, + "engines": { + "node": ">=12.0.0" + }, + "funding": { + "url": "https://github.com/sponsors/SuperchupuDev" + } + }, + "node_modules/tinypool": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/tinypool/-/tinypool-1.1.1.tgz", + "integrity": "sha512-Zba82s87IFq9A9XmjiX5uZA/ARWDrB03OHlq+Vw1fSdt0I+4/Kutwy8BP4Y/y/aORMo61FQ0vIb5j44vSo5Pkg==", + "dev": true, + "license": "MIT", + "engines": { + "node": "^18.0.0 || >=20.0.0" + } + }, + "node_modules/tinyrainbow": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/tinyrainbow/-/tinyrainbow-2.0.0.tgz", + "integrity": "sha512-op4nsTR47R6p0vMUUoYl/a+ljLFVtlfaXkLQmqfLR1qHma1h/ysYk4hEXZ880bf2CYgTskvTa/e196Vd5dDQXw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tinyspy": { + "version": "4.0.4", + "resolved": "https://registry.npmjs.org/tinyspy/-/tinyspy-4.0.4.tgz", + "integrity": "sha512-azl+t0z7pw/z958Gy9svOTuzqIk6xq+NSheJzn5MMWtWTFywIacg2wUlzKFGtt3cthx0r2SxMK0yzJOR0IES7Q==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=14.0.0" + } + }, + "node_modules/tree-kill": { + "version": "1.2.2", + "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", + "integrity": "sha512-L0Orpi8qGpRG//Nd+H90vFB+3iHnue1zSSGmNOOCh1GLJ7rUKVwV2HvijphGQS2UmhUZewS9VgvxYIdgr+fG1A==", + "dev": true, + "license": "MIT", + "bin": { + "tree-kill": "cli.js" + } + }, + "node_modules/tslib": { + "version": "2.8.1", + "resolved": "https://registry.npmjs.org/tslib/-/tslib-2.8.1.tgz", + "integrity": "sha512-oJFu94HQb+KVduSUQL7wnpmqnfmLsOA/nAh6b6EH0wCEoK0/mPeXU6c3wKDV83MkOuHPRHtSXKKU99IBazS/2w==", + "dev": true, + "license": "0BSD" + }, + "node_modules/tunnel-agent": { + "version": "0.6.0", + "resolved": "https://registry.npmjs.org/tunnel-agent/-/tunnel-agent-0.6.0.tgz", + "integrity": "sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==", + "dev": true, + "license": "Apache-2.0", + "dependencies": { + "safe-buffer": "^5.0.1" + }, + "engines": { + "node": "*" + } + }, + "node_modules/typegres": { + "resolved": "../..", + "link": true + }, + "node_modules/typescript": { + "version": "6.0.3", + "resolved": "https://registry.npmjs.org/typescript/-/typescript-6.0.3.tgz", + "integrity": "sha512-y2TvuxSZPDyQakkFRPZHKFm+KKVqIisdg9/CZwm9ftvKXLP8NRWj38/ODjNbr43SsoXqNuAisEf1GdCxqWcdBw==", + "dev": true, + "license": "Apache-2.0", + "bin": { + "tsc": "bin/tsc", + "tsserver": "bin/tsserver" + }, + "engines": { + "node": ">=14.17" + } + }, + "node_modules/undici": { + "version": "7.18.2", + "resolved": "https://registry.npmjs.org/undici/-/undici-7.18.2.tgz", + "integrity": "sha512-y+8YjDFzWdQlSE9N5nzKMT3g4a5UBX1HKowfdXh0uvAnTaqqwqB92Jt4UXBAeKekDs5IaDKyJFR4X1gYVCgXcw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=20.18.1" + } + }, + "node_modules/undici-types": { + "version": "8.3.0", + "resolved": "https://registry.npmjs.org/undici-types/-/undici-types-8.3.0.tgz", + "integrity": "sha512-j375ScV60dom+YkPFIfTLcOiPxkN/buHz5GobjLhixFuANaNs3C9l4GmrWqejgXWJ7BbJcFYpTEUkS1Ge8bpZQ==", + "dev": true, + "license": "MIT" + }, + "node_modules/unenv": { + "version": "2.0.0-rc.24", + "resolved": "https://registry.npmjs.org/unenv/-/unenv-2.0.0-rc.24.tgz", + "integrity": "sha512-i7qRCmY42zmCwnYlh9H2SvLEypEFGye5iRmEMKjcGi7zk9UquigRjFtTLz0TYqr0ZGLZhaMHl/foy1bZR+Cwlw==", + "dev": true, + "license": "MIT", + "dependencies": { + "pathe": "^2.0.3" + } + }, + "node_modules/update-browserslist-db": { + "version": "1.2.3", + "resolved": "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.2.3.tgz", + "integrity": "sha512-Js0m9cx+qOgDxo0eMiFGEueWztz+d4+M3rGlmKPT+T4IS/jP4ylw3Nwpu6cpTTP8R1MAC1kF4VbdLt3ARf209w==", + "dev": true, + "funding": [ + { + "type": "opencollective", + "url": "https://opencollective.com/browserslist" + }, + { + "type": "tidelift", + "url": "https://tidelift.com/funding/github/npm/browserslist" + }, + { + "type": "github", + "url": "https://github.com/sponsors/ai" + } + ], + "license": "MIT", + "dependencies": { + "escalade": "^3.2.0", + "picocolors": "^1.1.1" + }, + "bin": { + "update-browserslist-db": "cli.js" + }, + "peerDependencies": { + "browserslist": ">= 4.21.0" + } + }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true, + "license": "MIT" + }, + "node_modules/vite": { + "version": "7.3.6", + "resolved": "https://registry.npmjs.org/vite/-/vite-7.3.6.tgz", + "integrity": "sha512-4XP60spRGjSZFf1qYH+dJIkK2znL3zQfl9KkOV9MkkRR/3Dls0dxaBsQPTloEc5BLXWPL9vsOxopxyKoMmDueg==", + "dev": true, + "license": "MIT", + "dependencies": { + "esbuild": "^0.27.0 || ^0.28.0", + "fdir": "^6.5.0", + "picomatch": "^4.0.3", + "postcss": "^8.5.6", + "rollup": "^4.43.0", + "tinyglobby": "^0.2.15" + }, + "bin": { + "vite": "bin/vite.js" + }, + "engines": { + "node": "^20.19.0 || >=22.12.0" + }, + "funding": { + "url": "https://github.com/vitejs/vite?sponsor=1" + }, + "optionalDependencies": { + "fsevents": "~2.3.3" + }, + "peerDependencies": { + "@types/node": "^20.19.0 || >=22.12.0", + "jiti": ">=1.21.0", + "less": "^4.0.0", + "lightningcss": "^1.21.0", + "sass": "^1.70.0", + "sass-embedded": "^1.70.0", + "stylus": ">=0.54.8", + "sugarss": "^5.0.0", + "terser": "^5.16.0", + "tsx": "^4.8.1", + "yaml": "^2.4.2" + }, + "peerDependenciesMeta": { + "@types/node": { + "optional": true + }, + "jiti": { + "optional": true + }, + "less": { + "optional": true + }, + "lightningcss": { + "optional": true + }, + "sass": { + "optional": true + }, + "sass-embedded": { + "optional": true + }, + "stylus": { + "optional": true + }, + "sugarss": { + "optional": true + }, + "terser": { + "optional": true + }, + "tsx": { + "optional": true + }, + "yaml": { + "optional": true + } + } + }, + "node_modules/vite-node": { + "version": "3.2.4", + "resolved": "https://registry.npmjs.org/vite-node/-/vite-node-3.2.4.tgz", + "integrity": "sha512-EbKSKh+bh1E1IFxeO0pg1n4dvoOTt0UDiXMd/qn++r98+jPO1xtJilvXldeuQ8giIB5IkpjCgMleHMNEsGH6pg==", + "dev": true, + "license": "MIT", + "dependencies": { + "cac": "^6.7.14", + "debug": "^4.4.1", + "es-module-lexer": "^1.7.0", + "pathe": "^2.0.3", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0" + }, + "bin": { + "vite-node": "vite-node.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + } + }, + "node_modules/vitest": { + "version": "3.2.7", + "resolved": "https://registry.npmjs.org/vitest/-/vitest-3.2.7.tgz", + "integrity": "sha512-KrxIJ62Fd89gfysR4WotlgZABiz2dqFPgqGzX7s+CwsqLFomRH7777ZcrOD6+WVAh7khPQP41A+BKbpcJFrdEg==", + "dev": true, + "license": "MIT", + "dependencies": { + "@types/chai": "^5.2.2", + "@vitest/expect": "3.2.7", + "@vitest/mocker": "3.2.7", + "@vitest/pretty-format": "^3.2.7", + "@vitest/runner": "3.2.7", + "@vitest/snapshot": "3.2.7", + "@vitest/spy": "3.2.7", + "@vitest/utils": "3.2.7", + "chai": "^5.2.0", + "debug": "^4.4.1", + "expect-type": "^1.2.1", + "magic-string": "^0.30.17", + "pathe": "^2.0.3", + "picomatch": "^4.0.2", + "std-env": "^3.9.0", + "tinybench": "^2.9.0", + "tinyexec": "^0.3.2", + "tinyglobby": "^0.2.14", + "tinypool": "^1.1.1", + "tinyrainbow": "^2.0.0", + "vite": "^5.0.0 || ^6.0.0 || ^7.0.0-0", + "vite-node": "3.2.4", + "why-is-node-running": "^2.3.0" + }, + "bin": { + "vitest": "vitest.mjs" + }, + "engines": { + "node": "^18.0.0 || ^20.0.0 || >=22.0.0" + }, + "funding": { + "url": "https://opencollective.com/vitest" + }, + "peerDependencies": { + "@edge-runtime/vm": "*", + "@types/debug": "^4.1.12", + "@types/node": "^18.0.0 || ^20.0.0 || >=22.0.0", + "@vitest/browser": "3.2.7", + "@vitest/ui": "3.2.7", + "happy-dom": "*", + "jsdom": "*" + }, + "peerDependenciesMeta": { + "@edge-runtime/vm": { + "optional": true + }, + "@types/debug": { + "optional": true + }, + "@types/node": { + "optional": true + }, + "@vitest/browser": { + "optional": true + }, + "@vitest/ui": { + "optional": true + }, + "happy-dom": { + "optional": true + }, + "jsdom": { + "optional": true + } + } + }, + "node_modules/why-is-node-running": { + "version": "2.3.0", + "resolved": "https://registry.npmjs.org/why-is-node-running/-/why-is-node-running-2.3.0.tgz", + "integrity": "sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==", + "dev": true, + "license": "MIT", + "dependencies": { + "siginfo": "^2.0.0", + "stackback": "0.0.2" + }, + "bin": { + "why-is-node-running": "cli.js" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/workerd": { + "version": "1.20260310.1", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20260310.1.tgz", + "integrity": "sha512-yawXhypXXHtArikJj15HOMknNGikpBbSg2ZDe6lddUbqZnJXuCVSkgc/0ArUeVMG1jbbGvpst+REFtKwILvRTQ==", + "dev": true, + "hasInstallScript": true, + "license": "Apache-2.0", + "bin": { + "workerd": "bin/workerd" + }, + "engines": { + "node": ">=16" + }, + "optionalDependencies": { + "@cloudflare/workerd-darwin-64": "1.20260310.1", + "@cloudflare/workerd-darwin-arm64": "1.20260310.1", + "@cloudflare/workerd-linux-64": "1.20260310.1", + "@cloudflare/workerd-linux-arm64": "1.20260310.1", + "@cloudflare/workerd-windows-64": "1.20260310.1" + } + }, + "node_modules/wrangler": { + "version": "4.72.0", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-4.72.0.tgz", + "integrity": "sha512-bKkb8150JGzJZJWiNB2nu/33smVfawmfYiecA6rW4XH7xS23/jqMbgpdelM34W/7a1IhR66qeQGVqTRXROtAZg==", + "dev": true, + "license": "MIT OR Apache-2.0", + "dependencies": { + "@cloudflare/kv-asset-handler": "0.4.2", + "@cloudflare/unenv-preset": "2.15.0", + "blake3-wasm": "2.1.5", + "esbuild": "0.27.3", + "miniflare": "4.20260310.0", + "path-to-regexp": "6.3.0", + "unenv": "2.0.0-rc.24", + "workerd": "1.20260310.1" + }, + "bin": { + "wrangler": "bin/wrangler.js", + "wrangler2": "bin/wrangler.js" + }, + "engines": { + "node": ">=20.0.0" + }, + "optionalDependencies": { + "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@cloudflare/workers-types": "^4.20260310.1" + }, + "peerDependenciesMeta": { + "@cloudflare/workers-types": { + "optional": true + } + } + }, + "node_modules/wrap-ansi": { + "version": "7.0.0", + "resolved": "https://registry.npmjs.org/wrap-ansi/-/wrap-ansi-7.0.0.tgz", + "integrity": "sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==", + "dev": true, + "license": "MIT", + "dependencies": { + "ansi-styles": "^4.0.0", + "string-width": "^4.1.0", + "strip-ansi": "^6.0.0" + }, + "engines": { + "node": ">=10" + }, + "funding": { + "url": "https://github.com/chalk/wrap-ansi?sponsor=1" + } + }, + "node_modules/wrappy": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/wrappy/-/wrappy-1.0.2.tgz", + "integrity": "sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==", + "dev": true, + "license": "ISC" + }, + "node_modules/ws": { + "version": "8.18.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.18.0.tgz", + "integrity": "sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==", + "dev": true, + "license": "MIT", + "engines": { + "node": ">=10.0.0" + }, + "peerDependencies": { + "bufferutil": "^4.0.1", + "utf-8-validate": ">=5.0.2" + }, + "peerDependenciesMeta": { + "bufferutil": { + "optional": true + }, + "utf-8-validate": { + "optional": true + } + } + }, + "node_modules/y18n": { + "version": "5.0.8", + "resolved": "https://registry.npmjs.org/y18n/-/y18n-5.0.8.tgz", + "integrity": "sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=10" + } + }, + "node_modules/yallist": { + "version": "3.1.1", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-3.1.1.tgz", + "integrity": "sha512-a4UGQaWPH59mOXUYnAG2ewncQS4i4F43Tv3JoAM+s2VDAmS9NsK8GpDMLrCHPksFT7h3K6TOoUNn2pb7RoXx4g==", + "dev": true, + "license": "ISC" + }, + "node_modules/yargs": { + "version": "17.7.2", + "resolved": "https://registry.npmjs.org/yargs/-/yargs-17.7.2.tgz", + "integrity": "sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==", + "dev": true, + "license": "MIT", + "dependencies": { + "cliui": "^8.0.1", + "escalade": "^3.1.1", + "get-caller-file": "^2.0.5", + "require-directory": "^2.1.1", + "string-width": "^4.2.3", + "y18n": "^5.0.5", + "yargs-parser": "^21.1.1" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/yargs-parser": { + "version": "21.1.1", + "resolved": "https://registry.npmjs.org/yargs-parser/-/yargs-parser-21.1.1.tgz", + "integrity": "sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==", + "dev": true, + "license": "ISC", + "engines": { + "node": ">=12" + } + }, + "node_modules/youch": { + "version": "4.1.0-beta.10", + "resolved": "https://registry.npmjs.org/youch/-/youch-4.1.0-beta.10.tgz", + "integrity": "sha512-rLfVLB4FgQneDr0dv1oddCVZmKjcJ6yX6mS4pU82Mq/Dt9a3cLZQ62pDBL4AUO+uVrCvtWz3ZFUL2HFAFJ/BXQ==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/colors": "^4.1.5", + "@poppinss/dumper": "^0.6.4", + "@speed-highlight/core": "^1.2.7", + "cookie": "^1.0.2", + "youch-core": "^0.3.3" + } + }, + "node_modules/youch-core": { + "version": "0.3.3", + "resolved": "https://registry.npmjs.org/youch-core/-/youch-core-0.3.3.tgz", + "integrity": "sha512-ho7XuGjLaJ2hWHoK8yFnsUGy2Y5uDpqSTq1FkHLK4/oqKtyUU1AFbOOxY4IpC9f0fTLjwYbslUz0Po5BpD1wrA==", + "dev": true, + "license": "MIT", + "dependencies": { + "@poppinss/exception": "^1.2.2", + "error-stack-parser-es": "^1.0.5" + } + }, + "node_modules/zod": { + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/zod/-/zod-4.4.3.tgz", + "integrity": "sha512-ytENFjIJFl2UwYglde2jchW2Hwm4GJFLDiSXWdTrJQBIN9Fcyp7n4DhxJEiWNAJMV1/BqWfW/kkg71UDcHJyTQ==", + "license": "MIT", + "funding": { + "url": "https://github.com/sponsors/colinhacks" + } + } + } +} diff --git a/examples/chat/package.json b/examples/chat/package.json new file mode 100644 index 0000000..7df0b9d --- /dev/null +++ b/examples/chat/package.json @@ -0,0 +1,38 @@ +{ + "name": "typegres-chat", + "version": "0.0.0", + "private": true, + "type": "module", + "scripts": { + "dev": "concurrently -k -n ui,worker \"vite build --watch --emptyOutDir=false\" \"wrangler dev\"", + "build": "vite build", + "preview": "npm run build && wrangler dev", + "deploy": "npm run build && wrangler deploy", + "test": "vitest run", + "typecheck": "tsc --noEmit", + "generate": "node --experimental-strip-types scripts/generate-schema.ts" + }, + "dependencies": { + "capnweb": "file:../../packages/capnweb", + "react": "^19.2.0", + "react-dom": "^19.2.0", + "typegres": "file:../..", + "zod": "^4.4.3" + }, + "devDependencies": { + "@cloudflare/vitest-pool-workers": "^0.12.21", + "@cloudflare/workers-types": "^4.20260310.1", + "@tailwindcss/vite": "^4.3.2", + "@types/better-sqlite3": "^7.6.13", + "@types/react": "^19.2.0", + "@types/react-dom": "^19.2.0", + "@vitejs/plugin-react": "^5.0.4", + "better-sqlite3": "^12.11.1", + "concurrently": "^9.2.1", + "tailwindcss": "^4.3.2", + "typescript": "^6.0.3", + "vite": "^7.3.6", + "vitest": "~3.2.4", + "wrangler": "^4.72.0" + } +} diff --git a/examples/chat/scripts/generate-schema.ts b/examples/chat/scripts/generate-schema.ts new file mode 100644 index 0000000..c00e099 --- /dev/null +++ b/examples/chat/scripts/generate-schema.ts @@ -0,0 +1,23 @@ +// migrate → temp sqlite file → tg generate. +// Keeps table classes in sync with the DDL in src/migrate.ts without needing +// a live Durable Object / wrangler path to the DO's SQLite. + +import Database from "better-sqlite3"; +import { spawnSync } from "node:child_process"; +import * as fs from "node:fs"; +import * as path from "node:path"; +import { fileURLToPath } from "node:url"; +import { MIGRATE_SQL } from "../src/migrate.ts"; + +const root = path.resolve(path.dirname(fileURLToPath(import.meta.url)), ".."); +const dbPath = path.join(root, ".tg-schema.sqlite"); + +if (fs.existsSync(dbPath)) fs.unlinkSync(dbPath); +const db = new Database(dbPath); +db.pragma("foreign_keys = ON"); +db.exec(MIGRATE_SQL); +db.close(); +console.log(`wrote ${dbPath}`); + +const tg = spawnSync("npx", ["tg", "generate"], { cwd: root, stdio: "inherit", shell: true }); +process.exit(tg.status ?? 1); diff --git a/examples/chat/src/capabilities.ts b/examples/chat/src/capabilities.ts new file mode 100644 index 0000000..87ed8d4 --- /dev/null +++ b/examples/chat/src/capabilities.ts @@ -0,0 +1,155 @@ +import { expose, type Connection } from "typegres/core"; +import z from "zod"; +import { Users } from "./tables/users"; +import { Rooms } from "./tables/rooms"; +import { RoomMembers } from "./tables/room_members"; +import { Messages } from "./tables/messages"; + +// The @expose capability graph. @expose gating is the entire authorization +// story: only exposed members are reachable over Cap'n Web, and a capability +// is only handed out when the server decides you may have it. +// - reads return query builders the client refines and .execute()s +// - mutations (createRoom / joinRoom / post) run server-side + +// A room the current user is authorized for — you only get one via User. +export class Room { + readonly #conn: Connection; + readonly #userId: number; + readonly #id: number; + readonly #name: string; + + constructor(conn: Connection, userId: number, id: number, name: string) { + this.#conn = conn; + this.#userId = userId; + this.#id = id; + this.#name = name; + } + + @expose() get id() { + return this.#id; + } + @expose() get name() { + return this.#name; + } + + // Client-refinable reads: the browser authors the select/order/limit and +// .execute()s them. Holding the Room cap is the authorization — no +// server-side canned read wrappers. + @expose() messages() { + return Messages.from().where(({ messages }) => messages.room_id.eq(this.#id)); + } + @expose() members() { + return Users.from() + .join(RoomMembers, ({ users, room_members }) => users.id.eq(room_members.user_id)) + .where(({ room_members }) => room_members.room_id.eq(this.#id)); + } + + // Mutation: post a message as the current user. + @expose(z.string().min(1)) + async post(body: string) { + const [msg] = await Messages.insert({ room_id: this.#id, user_id: this.#userId, body }) + .returning(({ messages }) => ({ id: messages.id, body: messages.body })) + .execute(this.#conn); + return msg; + } +} + +// An authenticated principal. Obtained via ChatApi.userByName() — not the +// session root itself. +export class User { + readonly #conn: Connection; + readonly #id: number; + readonly #name: string; + + constructor(conn: Connection, id: number, name: string) { + this.#conn = conn; + this.#id = id; + this.#name = name; + } + + @expose() get id() { + return this.#id; + } + @expose() get name() { + return this.#name; + } + // Exposed so client-authored read builders can .execute() against it. + @expose() get conn() { + return this.#conn; + } + + // Client-refinable: the rooms I'm a member of. + @expose() rooms() { + return Rooms.from() + .join(RoomMembers, ({ rooms, room_members }) => rooms.id.eq(room_members.room_id)) + .where(({ room_members }) => room_members.user_id.eq(this.#id)); + } + + // Client-refinable: the public room directory -- every room is joinable, so + // any authenticated user may list them (membership is enforced later, when a + // Room capability is actually handed out). The client diffs this against + // rooms() to know which ones it still needs to join. + @expose() allRooms() { + return Rooms.from(); + } + + @expose(z.string().min(1)) + async createRoom(name: string): Promise { + const [room] = await Rooms.insert({ name, created_by_user_id: this.#id }) + .returning(({ rooms }) => ({ id: rooms.id })) + .execute(this.#conn); + await RoomMembers.insert({ room_id: room!.id, user_id: this.#id }).execute(this.#conn); + return new Room(this.#conn, this.#id, room!.id, name); + } + + @expose(z.number().int()) + async joinRoom(id: number): Promise { + const [room] = await Rooms.from().where(({ rooms }) => rooms.id.eq(id)).select(({ rooms }) => ({ name: rooms.name })).execute(this.#conn); + if (!room) throw new Error(`no such room ${id}`); + // Idempotent join: skip the insert if already a member (the DO is + // single-threaded, so no membership race). typegres has no ON CONFLICT yet. + const [existing] = await RoomMembers.from() + .where(({ room_members }) => room_members.room_id.eq(id).and(room_members.user_id.eq(this.#id))) + .select(({ room_members }) => ({ room_id: room_members.room_id })) + .execute(this.#conn); + if (!existing) { + await RoomMembers.insert({ room_id: id, user_id: this.#id }).execute(this.#conn); + } + return new Room(this.#conn, this.#id, id, room.name); + } + + // Authorization at grant time: only a member gets a Room cap. + @expose(z.number().int()) + async room(id: number): Promise { + const [membership] = await RoomMembers.from() + .where(({ room_members }) => room_members.room_id.eq(id).and(room_members.user_id.eq(this.#id))) + .select(({ room_members }) => ({ room_id: room_members.room_id })) + .execute(this.#conn); + if (!membership) throw new Error(`not a member of room ${id}`); + const [room] = await Rooms.from().where(({ rooms }) => rooms.id.eq(id)).select(({ rooms }) => ({ name: rooms.name })).execute(this.#conn); + return new Room(this.#conn, this.#id, id, room!.name); + } +} + +// Cap'n Web session root. Auth is on the graph (`userByName`), not outside +// it in the DO fetch handler. PoC: find-or-create by name. A real app would +// verify a token here and never create users on login. +export class ChatApi { + readonly #conn: Connection; + + constructor(conn: Connection) { + this.#conn = conn; + } + + @expose(z.string().min(1)) + async userByName(name: string): Promise { + const [existing] = await Users.from() + .where(({ users }) => users.name.eq(name)) + .select(({ users }) => ({ id: users.id })) + .execute(this.#conn); + const id = + existing?.id ?? + (await Users.insert({ name }).returning(({ users }) => ({ id: users.id })).execute(this.#conn))[0]!.id; + return new User(this.#conn, id, name); + } +} diff --git a/examples/chat/src/db.ts b/examples/chat/src/db.ts new file mode 100644 index 0000000..cf63d84 --- /dev/null +++ b/examples/chat/src/db.ts @@ -0,0 +1,5 @@ +import { Database } from "typegres/core"; + +// Dialect + provenance only — no driver. Each Durable Object attaches its +// own DoSqliteDriver via `db.attach(...)` to get a Connection over its storage. +export const db = new Database({ dialect: "sqlite" }); diff --git a/examples/chat/src/index.ts b/examples/chat/src/index.ts new file mode 100644 index 0000000..78ea7f4 --- /dev/null +++ b/examples/chat/src/index.ts @@ -0,0 +1,44 @@ +import { DurableObject } from "cloudflare:workers"; +import { newWorkersWebSocketRpcResponse } from "capnweb"; +import { toRpc } from "typegres/capnweb"; +// Core + do-sqlite entries: no optional node peers (pg / better-sqlite3 / pglite). +import type { Connection } from "typegres/core"; +import { DoSqliteDriver, type SqlStorageLike } from "typegres/do-sqlite"; +import { db } from "./db"; +import { migrate } from "./migrate"; +import { ChatApi } from "./capabilities"; + +export interface Env { + CHAT: DurableObjectNamespace; + ASSETS: Fetcher; +} + +// The single chat Durable Object. Holds one typegres Connection over its own +// SQLite storage, and serves the @expose capability graph to clients over +// Cap'n Web on a WebSocket -- clients author typegres queries that replay here. +export class ChatDo extends DurableObject { + readonly conn: Connection; + + constructor(ctx: DurableObjectState, env: Env) { + super(ctx, env); + this.conn = db.attach(new DoSqliteDriver(ctx.storage.sql as SqlStorageLike)); + ctx.blockConcurrencyWhile(() => migrate(this.conn)); + } + + // WebSocket upgrade -> Cap'n Web session whose main capability is ChatApi. + // Auth is on the graph (ChatApi.userByName), not a ?user= query param. + async fetch(req: Request): Promise { + return newWorkersWebSocketRpcResponse(req, toRpc(new ChatApi(this.conn))); + } +} + +export default { + async fetch(req: Request, env: Env): Promise { + // /ws -> the single chat DO (Cap'n Web WebSocket). Everything else is the + // static React client. + if (new URL(req.url).pathname === "/ws") { + return env.CHAT.get(env.CHAT.idFromName("global")).fetch(req); + } + return env.ASSETS.fetch(req); + }, +}; diff --git a/examples/chat/src/migrate.ts b/examples/chat/src/migrate.ts new file mode 100644 index 0000000..8d5aa34 --- /dev/null +++ b/examples/chat/src/migrate.ts @@ -0,0 +1,56 @@ +import { sql, type Connection } from "typegres/core"; + +// Idempotent schema creation. SqlStorage.exec runs one statement, so each +// CREATE TABLE is issued separately. Run once per DO in its init. +// +// Source of truth for the on-disk shape used by `tg generate` (see +// scripts/generate-schema.mjs): apply this same DDL to a temp better-sqlite3 +// file, then introspect. +export const migrate = async (conn: Connection): Promise => { + await conn.execute(sql`CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL + )`); + await conn.execute(sql`CREATE TABLE IF NOT EXISTS rooms ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL, + created_by_user_id INTEGER NOT NULL REFERENCES users(id) + )`); + await conn.execute(sql`CREATE TABLE IF NOT EXISTS room_members ( + room_id INTEGER NOT NULL REFERENCES rooms(id), + user_id INTEGER NOT NULL REFERENCES users(id), + PRIMARY KEY (room_id, user_id) + )`); + await conn.execute(sql`CREATE TABLE IF NOT EXISTS messages ( + id INTEGER PRIMARY KEY, + room_id INTEGER NOT NULL REFERENCES rooms(id), + user_id INTEGER NOT NULL REFERENCES users(id), + body TEXT NOT NULL, + created_at TEXT NOT NULL DEFAULT (datetime('now')) + )`); +}; + +// Raw SQL for the better-sqlite3 generate path (db.exec accepts multi-statement). +export const MIGRATE_SQL = ` +CREATE TABLE IF NOT EXISTS users ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL +); +CREATE TABLE IF NOT EXISTS rooms ( + id INTEGER PRIMARY KEY, + name TEXT NOT NULL, + created_by_user_id INTEGER NOT NULL REFERENCES users(id) +); +CREATE TABLE IF NOT EXISTS room_members ( + room_id INTEGER NOT NULL REFERENCES rooms(id), + user_id INTEGER NOT NULL REFERENCES users(id), + PRIMARY KEY (room_id, user_id) +); +CREATE TABLE IF NOT EXISTS messages ( + id INTEGER PRIMARY KEY, + room_id INTEGER NOT NULL REFERENCES rooms(id), + user_id INTEGER NOT NULL REFERENCES users(id), + body TEXT NOT NULL, + created_at TEXT NOT NULL DEFAULT (datetime('now')) +); +`; diff --git a/examples/chat/src/tables/messages.ts b/examples/chat/src/tables/messages.ts new file mode 100644 index 0000000..fbfa2a8 --- /dev/null +++ b/examples/chat/src/tables/messages.ts @@ -0,0 +1,18 @@ +import { db } from "../db"; +import { expose, sql } from "typegres/core"; +import { Integer, Text } from "typegres/sqlite"; +import { Users } from "./users"; +import { Rooms } from "./rooms"; + +export class Messages extends db.Table("messages") { + // @generated-start + @expose() id = Integer.column({ nonNull: true, generated: true }); + @expose() room_id = Integer.column({ nonNull: true }); + @expose() user_id = Integer.column({ nonNull: true }); + @expose() body = Text.column({ nonNull: true }); + @expose() created_at = Text.column({ nonNull: true, default: sql`datetime('now')` }); + // relations + @expose() user() { return Users.scope(Messages.contextOf(this)).where(({ users }) => users.id.eq(this.user_id)).cardinality("one"); } + @expose() room() { return Rooms.scope(Messages.contextOf(this)).where(({ rooms }) => rooms.id.eq(this.room_id)).cardinality("one"); } + // @generated-end +} diff --git a/examples/chat/src/tables/room_members.ts b/examples/chat/src/tables/room_members.ts new file mode 100644 index 0000000..a8fd66e --- /dev/null +++ b/examples/chat/src/tables/room_members.ts @@ -0,0 +1,15 @@ +import { db } from "../db"; +import { expose } from "typegres/core"; +import { Integer } from "typegres/sqlite"; +import { Users } from "./users"; +import { Rooms } from "./rooms"; + +export class RoomMembers extends db.Table("room_members") { + // @generated-start + @expose() room_id = Integer.column({ nonNull: true }); + @expose() user_id = Integer.column({ nonNull: true }); + // relations + @expose() user() { return Users.scope(RoomMembers.contextOf(this)).where(({ users }) => users.id.eq(this.user_id)).cardinality("one"); } + @expose() room() { return Rooms.scope(RoomMembers.contextOf(this)).where(({ rooms }) => rooms.id.eq(this.room_id)).cardinality("one"); } + // @generated-end +} diff --git a/examples/chat/src/tables/rooms.ts b/examples/chat/src/tables/rooms.ts new file mode 100644 index 0000000..67c940f --- /dev/null +++ b/examples/chat/src/tables/rooms.ts @@ -0,0 +1,18 @@ +import { db } from "../db"; +import { expose } from "typegres/core"; +import { Integer, Text } from "typegres/sqlite"; +import { Users } from "./users"; +import { Messages } from "./messages"; +import { RoomMembers } from "./room_members"; + +export class Rooms extends db.Table("rooms") { + // @generated-start + @expose() id = Integer.column({ nonNull: true, generated: true }); + @expose() name = Text.column({ nonNull: true }); + @expose() created_by_user_id = Integer.column({ nonNull: true }); + // relations + @expose() created_by_user() { return Users.scope(Rooms.contextOf(this)).where(({ users }) => users.id.eq(this.created_by_user_id)).cardinality("one"); } + @expose() messages() { return Messages.scope(Rooms.contextOf(this)).where(({ messages }) => messages.room_id.eq(this.id)).cardinality("many"); } + @expose() room_members() { return RoomMembers.scope(Rooms.contextOf(this)).where(({ room_members }) => room_members.room_id.eq(this.id)).cardinality("many"); } + // @generated-end +} diff --git a/examples/chat/src/tables/users.ts b/examples/chat/src/tables/users.ts new file mode 100644 index 0000000..adab479 --- /dev/null +++ b/examples/chat/src/tables/users.ts @@ -0,0 +1,17 @@ +import { db } from "../db"; +import { expose } from "typegres/core"; +import { Integer, Text } from "typegres/sqlite"; +import { Messages } from "./messages"; +import { RoomMembers } from "./room_members"; +import { Rooms } from "./rooms"; + +export class Users extends db.Table("users") { + // @generated-start + @expose() id = Integer.column({ nonNull: true, generated: true }); + @expose() name = Text.column({ nonNull: true }); + // relations + @expose() messages() { return Messages.scope(Users.contextOf(this)).where(({ messages }) => messages.user_id.eq(this.id)).cardinality("many"); } + @expose() room_members() { return RoomMembers.scope(Users.contextOf(this)).where(({ room_members }) => room_members.user_id.eq(this.id)).cardinality("many"); } + @expose() rooms() { return Rooms.scope(Users.contextOf(this)).where(({ rooms }) => rooms.created_by_user_id.eq(this.id)).cardinality("many"); } + // @generated-end +} diff --git a/examples/chat/test/capabilities.test.ts b/examples/chat/test/capabilities.test.ts new file mode 100644 index 0000000..d1152dc --- /dev/null +++ b/examples/chat/test/capabilities.test.ts @@ -0,0 +1,59 @@ +import { describe, it, expect } from "vitest"; +import { env, runInDurableObject } from "cloudflare:test"; +import type { ChatDo } from "../src/index"; +import { ChatApi } from "../src/capabilities"; + +// The capability graph, exercised in-process (no wire yet). Proves the +// authorization logic: you only reach a Room through User, and only as a +// member. Cap'n Web then gates the SAME graph over the wire. + +describe("capability graph (in-process)", () => { + it("createRoom + post + read; a non-member is denied a room cap until they join", async () => { + const stub = env.CHAT.get(env.CHAT.idFromName("phase3")); + const result = await runInDurableObject(stub, async (i: ChatDo) => { + const conn = i.conn; + const api = new ChatApi(conn); + const alice = await api.userByName("alice"); + const bob = await api.userByName("bob"); + + const room = await alice.createRoom("general"); + await room.post("hi from alice"); + await room.post("still alice"); + + const aliceView = await room + .messages() + .select(({ messages }) => ({ body: messages.body })) + .orderBy(({ messages }) => messages.id) + .execute(conn); + const aliceRooms = await alice.rooms().select(({ rooms }) => ({ name: rooms.name })).execute(conn); + + // bob is not a member -> room(id) rejects (authorization at grant time) + let bobDenied = false; + try { + await bob.room(room.id); + } catch { + bobDenied = true; + } + + // bob joins, then can post + read + const bobRoom = await bob.joinRoom(room.id); + await bobRoom.post("hi from bob"); + const bobView = await bobRoom + .messages() + .select(({ messages }) => ({ body: messages.body })) + .orderBy(({ messages }) => messages.id) + .execute(conn); + + return { aliceView, aliceRooms, bobDenied, bobView }; + }); + + expect(result.aliceView).toEqual([{ body: "hi from alice" }, { body: "still alice" }]); + expect(result.aliceRooms).toEqual([{ name: "general" }]); + expect(result.bobDenied).toBe(true); + expect(result.bobView).toEqual([ + { body: "hi from alice" }, + { body: "still alice" }, + { body: "hi from bob" }, + ]); + }); +}); diff --git a/examples/chat/test/capnweb.test.ts b/examples/chat/test/capnweb.test.ts new file mode 100644 index 0000000..ce958a2 --- /dev/null +++ b/examples/chat/test/capnweb.test.ts @@ -0,0 +1,110 @@ +import { describe, it, expect } from "vitest"; +import { env } from "cloudflare:test"; +import { newWebSocketRpcSession } from "capnweb"; +import { doRpc, type ShimStub } from "typegres/capnweb"; +import type { ChatApi, Room, User } from "../src/capabilities"; + +// Cap'n Web over a real WebSocket. Client authors typegres queries as +// closures that replay server-side against the DO's SQLite, gated by the +// @expose capability graph. Session root is ChatApi; auth is userByName(). + +const connect = async (doId: string): Promise> => { + const resp = await env.CHAT.get(env.CHAT.idFromName(doId)).fetch("http://chat/", { + headers: { Upgrade: "websocket" }, + }); + const ws = resp.webSocket!; + ws.accept(); + return newWebSocketRpcSession(ws) as unknown as ShimStub; +}; + +const asUser = async (root: ShimStub, name: string): Promise> => + (await doRpc(root, (api) => api.userByName(name))) as unknown as ShimStub; + +describe("Cap'n Web over WebSocket", () => { + it("client authors typegres queries that replay in the DO", async () => { + using root = await connect("room-demo"); + using alice = await asUser(root, "alice"); + + // Hand out a Room capability (createRoom runs server-side in the DO). + using room = await doRpc(alice, (u) => u.createRoom("general")); + + // Post via the Room cap, then read back with a CLIENT-AUTHORED query: + // .rooms().select(...).execute(conn) is one closure, replayed in the DO. + const posted = await room.post("hello from alice"); + expect(posted?.body).toBe("hello from alice"); + + const rooms = await doRpc(alice, (u) => + u.rooms().select(({ rooms }) => ({ name: rooms.name })).execute(u.conn), + ); + expect(rooms).toEqual([{ name: "general" }]); + + const messages = await doRpc(alice, (u) => + u.rooms().select(({ rooms }) => ({ id: rooms.id })).execute(u.conn), + ).then(([r]) => + doRpc(alice, (u) => + // room(id) returns Promise in the type; capnweb pipelines the + // call on the eventual Room, so bridge the type with a cast. + (u.room(r!.id) as unknown as Room) + .messages() + .select(({ messages }) => ({ body: messages.body })) + .execute(u.conn), + ), + ); + expect(messages).toEqual([{ body: "hello from alice" }]); + }); + + it("joinRoom is idempotent: re-joining a room you already belong to doesn't throw", async () => { + using root = await connect("rejoin"); + using alice = await asUser(root, "alice"); + using room = await doRpc(alice, (u) => u.createRoom("general")); + const [{ id }] = await doRpc(alice, (u) => + u.rooms().select(({ rooms }) => ({ id: rooms.id })).execute(u.conn), + ); + // createRoom already made alice a member; joining again must be a no-op, + // not a UNIQUE-constraint failure on room_members. + await expect(doRpc(alice, (u) => u.joinRoom(id))).resolves.toBeDefined(); + void room; + }); + + it("allRooms lists the public directory so another user can discover and join", async () => { + using root = await connect("directory"); + using alice = await asUser(root, "alice"); + using room = await doRpc(alice, (u) => u.createRoom("general")); + await room.post("hi, anyone here?"); + + using bob = await asUser(root, "bob"); + // bob isn't a member, so rooms() is empty but allRooms() shows the room. + const mine = await doRpc(bob, (u) => u.rooms().select(({ rooms }) => ({ id: rooms.id })).execute(u.conn)); + expect(mine).toEqual([]); + const dir = await doRpc(bob, (u) => + u.allRooms().select(({ rooms }) => ({ id: rooms.id, name: rooms.name })).execute(u.conn), + ); + expect(dir).toEqual([{ id: expect.any(Number), name: "general" }]); + + // bob joins the discovered room, then can read its messages with a + // client-authored query (no server-side feed() wrapper). + await doRpc(bob, (u) => u.joinRoom(dir[0]!.id)); + const feed = await doRpc(bob, (u) => + (u.room(dir[0]!.id) as unknown as Room) + .messages() + .select(({ messages }) => ({ body: messages.body })) + .execute(u.conn), + ); + expect(feed).toEqual([{ body: "hi, anyone here?" }]); + }); + + it("@expose gates the surface over the wire: a non-member can't reach a room", async () => { + using root = await connect("gating"); + using alice = await asUser(root, "alice"); + using room = await doRpc(alice, (u) => u.createRoom("private")); + await room.post("secret"); + const [{ id: roomId }] = await doRpc(alice, (u) => + u.rooms().select(({ rooms }) => ({ id: rooms.id })).where(({ rooms }) => rooms.name.eq("private")).execute(u.conn), + ); + + using bob = await asUser(root, "bob"); + // bob is not a member -> room(id) rejects at the server, over the wire. + await expect(doRpc(bob, (u) => u.room(roomId))).rejects.toThrow(/not a member/); + void room; + }); +}); diff --git a/examples/chat/test/do-driver.test.ts b/examples/chat/test/do-driver.test.ts new file mode 100644 index 0000000..66aa1aa --- /dev/null +++ b/examples/chat/test/do-driver.test.ts @@ -0,0 +1,38 @@ +import { describe, it, expect } from "vitest"; +import { env, runInDurableObject } from "cloudflare:test"; +import { Database, sql } from "typegres/core"; +import { DoSqliteDriver } from "typegres/do-sqlite"; +import { Integer, Text } from "typegres/sqlite"; +import type { ChatDo } from "../src/index"; + +// Phase 1 -- typegres queries run against the Durable Object's SQLite through +// the DoSqliteDriver, inside real workerd. + +describe("DoSqliteDriver", () => { + it("runs a typegres-built query against the DO's SQLite", async () => { + const stub = env.CHAT.get(env.CHAT.idFromName("phase1")); + const rows = await runInDurableObject(stub, async (_instance: ChatDo, state) => { + const db = new Database({ dialect: "sqlite" }); + const conn = db.attach(new DoSqliteDriver(state.storage.sql)); + + await conn.execute(sql`CREATE TABLE dogs (id INTEGER PRIMARY KEY, name TEXT NOT NULL)`); + await conn.execute(sql`INSERT INTO dogs (name) VALUES ('Rex'), ('Fido')`); + + class Dogs extends db.Table("dogs") { + id = Integer.column({ nonNull: true, generated: true }); + name = Text.column({ nonNull: true }); + } + + return conn.execute( + Dogs.from() + .select(({ dogs }) => ({ id: dogs.id, name: dogs.name.upper() })) + .orderBy(({ dogs }) => dogs.id), + ); + }); + + expect(rows).toEqual([ + { id: 1, name: "REX" }, + { id: 2, name: "FIDO" }, + ]); + }); +}); diff --git a/examples/chat/test/env.d.ts b/examples/chat/test/env.d.ts new file mode 100644 index 0000000..db77a02 --- /dev/null +++ b/examples/chat/test/env.d.ts @@ -0,0 +1,6 @@ +import type { Env } from "../src/index"; + +// Types the `env` exported from cloudflare:test with our worker's bindings. +declare module "cloudflare:test" { + interface ProvidedEnv extends Env {} +} diff --git a/examples/chat/test/schema.test.ts b/examples/chat/test/schema.test.ts new file mode 100644 index 0000000..1149af7 --- /dev/null +++ b/examples/chat/test/schema.test.ts @@ -0,0 +1,41 @@ +import { describe, it, expect } from "vitest"; +import { env, runInDurableObject } from "cloudflare:test"; +import type { ChatDo } from "../src/index"; +import { Users } from "../src/tables/users"; +import { Rooms } from "../src/tables/rooms"; +import { RoomMembers } from "../src/tables/room_members"; +import { Messages } from "../src/tables/messages"; + +// Phase 2 -- the 4-table chat schema, migrated by the DO on init, exercised +// through typegres inserts + a multi-table join, all inside the DO's SQLite. + +describe("chat schema in the DO", () => { + it("inserts users/rooms/members/messages and joins messages to their authors", async () => { + const stub = env.CHAT.get(env.CHAT.idFromName("phase2")); + const rows = await runInDurableObject(stub, async (instance: ChatDo) => { + const conn = instance.conn; // migrated in the DO constructor + + const [alice] = await Users.insert({ name: "alice" }).returning(({ users }) => ({ id: users.id })).execute(conn); + const [bob] = await Users.insert({ name: "bob" }).returning(({ users }) => ({ id: users.id })).execute(conn); + const [room] = await Rooms.insert({ name: "general", created_by_user_id: alice!.id }).returning(({ rooms }) => ({ id: rooms.id })).execute(conn); + + await RoomMembers.insert({ room_id: room!.id, user_id: alice!.id }, { room_id: room!.id, user_id: bob!.id }).execute(conn); + await Messages.insert( + { room_id: room!.id, user_id: alice!.id, body: "hi" }, + { room_id: room!.id, user_id: bob!.id, body: "yo" }, + ).execute(conn); + + return Messages.from() + .join(Users, ({ messages, users }) => messages.user_id.eq(users.id)) + .where(({ messages }) => messages.room_id.eq(room!.id)) + .select(({ messages, users }) => ({ author: users.name, body: messages.body })) + .orderBy(({ messages }) => messages.id) + .execute(conn); + }); + + expect(rows).toEqual([ + { author: "alice", body: "hi" }, + { author: "bob", body: "yo" }, + ]); + }); +}); diff --git a/examples/chat/test/sqlstorage.probe.test.ts b/examples/chat/test/sqlstorage.probe.test.ts new file mode 100644 index 0000000..f6e2820 --- /dev/null +++ b/examples/chat/test/sqlstorage.probe.test.ts @@ -0,0 +1,115 @@ +import { describe, it, expect } from "vitest"; +import { env, runInDurableObject } from "cloudflare:test"; +import type { ChatDo } from "../src/index"; + +// Phase 0 -- the SqlStorage contract, as a living artifact. +// +// The DoSqliteDriver maps typegres's compiled { text, ?-values } onto +// Cloudflare's SqlStorage. These tests pin the binding/result semantics that +// shape the driver, contrasted with the better-sqlite3 SqliteDriver. +// +// HEADLINE (proven below): +// - Numbers bind as REAL (7/2 = 3.5), SAME as better-sqlite3 -- so the sqlite +// dialect's CAST(? AS INTEGER/REAL) is what makes typed positions correct, +// for both drivers. +// - SqlStorage REJECTS BigInt, the OPPOSITE of better-sqlite3 (which requires +// it for INTEGER). typegres's compile step turns booleans into 0n/1n +// (BigInt), so the DO driver must map BigInt -> Number before exec(). +// - Blobs bind from Uint8Array and come back as ArrayBuffer. + +let n = 0; +const withSql = async (fn: (sql: SqlStorage) => T | Promise): Promise => { + const stub = env.CHAT.get(env.CHAT.idFromName(`probe-${n++}`)); + return runInDurableObject(stub, (_instance: ChatDo, state) => fn(state.storage.sql)); +}; +const one = (sql: SqlStorage, query: string, ...binds: unknown[]): Record => + sql.exec(query, ...binds).toArray()[0] as Record; + +describe("SqlStorage binding semantics", () => { + it("binds every JS number as REAL (like better-sqlite3)", async () => { + const k = await withSql((sql) => ({ + int: one(sql, "SELECT typeof(?) t", 7).t, + frac: one(sql, "SELECT typeof(?) t", 2.5).t, + str: one(sql, "SELECT typeof(?) t", "hi").t, + nul: one(sql, "SELECT typeof(?) t", null).t, + blob: one(sql, "SELECT typeof(?) t", new Uint8Array([1, 2, 3])).t, + })); + expect(k).toEqual({ int: "real", frac: "real", str: "text", nul: "null", blob: "blob" }); + }); + + it("number division is REAL: 7/2 = 3.5 (so integer affinity must come from CAST)", async () => { + const v = await withSql((sql) => one(sql, "SELECT ? / ? AS v", 7, 2).v); + expect(v).toBe(3.5); + }); + + it("CAST(? AS INTEGER) forces integer affinity -- the dialect's mechanism works here too", async () => { + const v = await withSql((sql) => one(sql, "SELECT CAST(? AS INTEGER) / CAST(? AS INTEGER) AS v", 7, 2).v); + expect(v).toBe(3); + }); + + it("REJECTS BigInt bindings (the driver must down-convert typegres's 0n/1n booleans)", async () => { + await expect(withSql((sql) => one(sql, "SELECT typeof(?) t", 7n))).rejects.toThrow(/BigInt/); + }); + + it("plain 0/1 numbers bind fine (what the driver sends instead of 0n/1n)", async () => { + const v = await withSql((sql) => one(sql, "SELECT CAST(? AS INTEGER) AS v", 1).v); + expect(v).toBe(1); + }); +}); + +describe("SqlStorage result value types", () => { + it("returns native JS types per storage class (driver must stringify for deserialize)", async () => { + const row = await withSql((sql) => { + sql.exec("CREATE TABLE t (i INTEGER, r REAL, s TEXT, b BLOB, n INTEGER)"); + sql.exec("INSERT INTO t VALUES (CAST(? AS INTEGER), ?, ?, ?, ?)", 42, 2.5, "hey", new Uint8Array([9, 8]), null); + return one(sql, "SELECT i, r, s, b, n FROM t"); + }); + expect(typeof row.i).toBe("number"); + expect(row.i).toBe(42); + expect(row.r).toBe(2.5); + expect(row.s).toBe("hey"); + expect(row.n).toBeNull(); + // blobs return as ArrayBuffer here (better-sqlite3 gives Buffer/Uint8Array) + expect(row.b).toBeInstanceOf(ArrayBuffer); + expect(new Uint8Array(row.b as ArrayBuffer)).toEqual(new Uint8Array([9, 8])); + }); + + it("INTEGER results are JS number, not bigint (fine for chat-scale ids)", async () => { + const v = await withSql((sql) => { + sql.exec("CREATE TABLE t (v INTEGER)"); + sql.exec("INSERT INTO t VALUES (CAST(? AS INTEGER))", 1000); + return one(sql, "SELECT v FROM t").v; + }); + expect(typeof v).toBe("number"); + expect(v).toBe(1000); + }); + + // int64 precision: SqlStorage always marshals INTEGER results to a JS + // number, never bigint -- so values above 2^53 come back LOSSY (a real + // footgun, worse than better-sqlite3 which can return bigint). It stores + // int64 correctly, though: CAST(col AS TEXT) reads the exact value. So a + // full-precision bigint column would need the driver/dialect to select it + // as text. Chat ids are small autoincrement, so unaffected -- but pinned + // here so the limitation is on record. + it("int64 above 2^53 is LOSSY as a number result", async () => { + const v = await withSql((sql) => { + sql.exec("CREATE TABLE t (v INTEGER)"); + sql.exec("INSERT INTO t VALUES (9223372036854775807)"); // max int64, SQL literal + return one(sql, "SELECT v FROM t").v; + }); + expect(typeof v).toBe("number"); + // Compare as strings: the true value 9223372036854775807 can't even be + // written as a JS number literal (it rounds), so string form shows the loss. + expect(String(v)).toBe("9223372036854776000"); // rounded to the nearest double + expect(String(v)).not.toBe("9223372036854775807"); // the true int64 is lost + }); + + it("CAST(col AS TEXT) preserves int64 precision losslessly (the workaround)", async () => { + const v = await withSql((sql) => { + sql.exec("CREATE TABLE t (v INTEGER)"); + sql.exec("INSERT INTO t VALUES (9223372036854775807)"); + return one(sql, "SELECT CAST(v AS TEXT) AS v FROM t").v; + }); + expect(v).toBe("9223372036854775807"); + }); +}); diff --git a/examples/chat/tsconfig.json b/examples/chat/tsconfig.json new file mode 100644 index 0000000..bfdc503 --- /dev/null +++ b/examples/chat/tsconfig.json @@ -0,0 +1,16 @@ +{ + "compilerOptions": { + "target": "esnext", + "module": "esnext", + "moduleResolution": "bundler", + "lib": ["esnext", "dom", "dom.iterable"], + "types": ["@cloudflare/workers-types", "@cloudflare/vitest-pool-workers"], + "jsx": "react-jsx", + "strict": true, + "noEmit": true, + "skipLibCheck": true, + "verbatimModuleSyntax": true, + "experimentalDecorators": false + }, + "include": ["src", "client", "test", "vite.config.ts", "vitest.config.ts"] +} diff --git a/examples/chat/typegres.config.ts b/examples/chat/typegres.config.ts new file mode 100644 index 0000000..09ffe23 --- /dev/null +++ b/examples/chat/typegres.config.ts @@ -0,0 +1,11 @@ +import type { Config } from "typegres"; + +// Points `tg generate` at a local sqlite file produced by +// `npm run generate` (migrate → temp db → tg generate). Not used at runtime +// by the Durable Object — the DO runs migrate() against its own SqlStorage. +export default { + dialect: "sqlite", + db: "./.tg-schema.sqlite", + tables: "src/tables", + dbImport: "../db", +} satisfies Config; diff --git a/examples/chat/vite.config.ts b/examples/chat/vite.config.ts new file mode 100644 index 0000000..b256454 --- /dev/null +++ b/examples/chat/vite.config.ts @@ -0,0 +1,15 @@ +import { defineConfig } from "vite"; +import react from "@vitejs/plugin-react"; +import tailwindcss from "@tailwindcss/vite"; + +// Builds the browser client (client/) to dist/client, which wrangler serves as +// static assets. The Worker + Durable Object are built/served by wrangler; this +// config is only the frontend. +export default defineConfig({ + root: "client", + plugins: [react(), tailwindcss()], + build: { + outDir: "../dist/client", + emptyOutDir: true, + }, +}); diff --git a/examples/chat/vitest.config.ts b/examples/chat/vitest.config.ts new file mode 100644 index 0000000..b1e69df --- /dev/null +++ b/examples/chat/vitest.config.ts @@ -0,0 +1,17 @@ +import { defineWorkersConfig } from "@cloudflare/vitest-pool-workers/config"; + +// Runs tests inside real workerd (the same runtime the DO ships on), with +// the DO + SQLite storage wired up from wrangler.jsonc. +export default defineWorkersConfig({ + test: { + poolOptions: { + workers: { + // A long-lived Cap'n Web WebSocket keeps the DO's SQLite open, which + // the per-test isolated-storage reset can't snapshot. Disable it; each + // test uses its own DO id instead, so they stay independent. + isolatedStorage: false, + wrangler: { configPath: "./wrangler.jsonc" }, + }, + }, + }, +}); diff --git a/examples/chat/wrangler.jsonc b/examples/chat/wrangler.jsonc new file mode 100644 index 0000000..e58951e --- /dev/null +++ b/examples/chat/wrangler.jsonc @@ -0,0 +1,21 @@ +{ + "name": "typegres-chat", + "main": "src/index.ts", + "compatibility_date": "2026-02-05", + // A single Durable Object holds all chat state; rooms are rows, not + // instances. new_sqlite_classes makes it SQLite-backed so ctx.storage.sql + // is available (typegres runs against it via DoSqliteDriver). + "durable_objects": { + "bindings": [{ "name": "CHAT", "class_name": "ChatDo" }] + }, + "migrations": [{ "tag": "v1", "new_sqlite_classes": ["ChatDo"] }], + // The built React client (vite build -> dist/client), served as static + // assets. run_worker_first routes every request through the Worker, which + // handles the /ws Cap'n Web upgrade and delegates the rest to ASSETS. + "assets": { + "directory": "./dist/client", + "binding": "ASSETS", + "not_found_handling": "single-page-application", + "run_worker_first": true + } +} diff --git a/examples/sqlite/src/tables/dogs.ts b/examples/sqlite/src/tables/dogs.ts index e299e3e..d4934b4 100644 --- a/examples/sqlite/src/tables/dogs.ts +++ b/examples/sqlite/src/tables/dogs.ts @@ -1,5 +1,5 @@ import { db } from "../db"; -import { expose } from "typegres"; +import { expose } from "typegres/core"; import { Integer, Text } from "typegres/sqlite"; import { Teams } from "./teams"; diff --git a/examples/sqlite/src/tables/teams.ts b/examples/sqlite/src/tables/teams.ts index d8b6a8e..8b967b1 100644 --- a/examples/sqlite/src/tables/teams.ts +++ b/examples/sqlite/src/tables/teams.ts @@ -1,5 +1,5 @@ import { db } from "../db"; -import { expose } from "typegres"; +import { expose } from "typegres/core"; import { Integer, Text } from "typegres/sqlite"; import { Dogs } from "./dogs"; diff --git a/guidelines.md b/guidelines.md new file mode 100644 index 0000000..b4a7a6b --- /dev/null +++ b/guidelines.md @@ -0,0 +1,266 @@ +# typegres guidelines (for LLMs and humans) + +How to use typegres correctly. Prefer these patterns over inventing wrappers, +REST façades, or hand-rolled SQL string builders. + +## What typegres is + +- A **typed SQL builder + runtime** for Postgres and SQLite. +- Tables are **classes** bound to a `Database` (dialect + provenance). +- Queries are **values** you compose in TypeScript, then `.execute(conn)`. +- Over Cap'n Web / exoeval, **`@expose` is the capability boundary**: only + decorated members are reachable remotely. Authorization = what caps you hand + out, not ad-hoc checks scattered in handlers. + +## Core objects + +| Object | Role | +|--------|------| +| `Database` | Immutable schema/provenance handle. No I/O. `new Database({ dialect })`. | +| `Connection` | Runtime handle with a `Driver`. Obtained via `db.attach(driver)`. | +| `Driver` | Executes compiled SQL (`PgDriver`, `PgliteDriver`, `SqliteDriver`, `DoSqliteDriver`). | +| `db.Table("name")` | Base for a table class. Columns are typed fields; relations are methods. | +| `QueryBuilder` | Fluent select/where/join/…; terminate with `.execute(conn)` / `.hydrate(conn)`. | +| `@expose` | Marks members callable over RPC / sandboxed eval. | + +**Do not** conflate `Database` and `Connection`. Define tables on `db` at module +load; attach a driver when the process/DO starts. + +```ts +export const db = new Database({ dialect: "sqlite" }); +// later, once per DO / process: +const conn = db.attach(new DoSqliteDriver(ctx.storage.sql)); +``` + +## Package entry points + +| Import | Use when | +|--------|----------| +| `typegres` | Node apps, scripts, playground. May pull optional driver peers. | +| `typegres/core` | Schema, `sql`, `@expose`, `Database`/`Connection` **without** node drivers. Prefer in Cloudflare Workers / Durable Objects. | +| `typegres/do-sqlite` | `DoSqliteDriver` + `SqlStorageLike` only. | +| `typegres/sqlite` / `typegres/postgres` | Column type classes (`Integer`, `Text`, `Int8`, …). | +| `typegres/capnweb` | `toRpc`, `doRpc`, `ShimStub` for Cap'n Web. | +| `typegres/exoeval` | Sandboxed eval RPC (non-capnweb). | + +**Workers rule:** never import the root `typegres` entry from worker/DO code if +it can be avoided. Use `typegres/core` + `typegres/do-sqlite` so bundlers do not +resolve `pg` / `better-sqlite3` / `@electric-sql/pglite`. + +Optional peers (install only what you need): + +- `pg` — `PgDriver` +- `@electric-sql/pglite` — `PgliteDriver` +- `better-sqlite3` — `SqliteDriver` and `tg generate` (sqlite) + +## Schema workflow + +1. **DDL is source of truth** (migrations or `migrate()`). +2. Apply DDL to a real DB (Postgres URL or a sqlite file). +3. Run **`tg generate`** (`typegres.config.ts` → table files with + `@generated-start` / `@generated-end`). Generated files import runtime + helpers from **`typegres/core`** (not the root barrel). +4. Edit only **outside** markers (or re-apply intentional renames after generate). + +### Foreign keys and relation names + +Outbound relations are named by stripping a trailing `_id` from the FK column: + +| FK column | Relation method | OK? | +|-----------|-----------------|-----| +| `team_id` | `team()` | yes | +| `user_id` | `user()` | yes | +| `created_by_user_id` | `created_by_user()` | yes | +| `created_by` | `created_by()` | **no** — same name as the column | + +**Always name FK columns `…_id`.** Bare names (`created_by`, `author`, `owner`) +produce a relation that collides with the column field on the table class. +Codegen only de-duplicates relation names against other relations, not against +columns. + +```ts +// typegres.config.ts +export default { + dialect: "sqlite", + db: "./dev.db", + tables: "src/tables", + dbImport: "../db", +} satisfies Config; +``` + +For Durable Objects: apply the same DDL to a **temp better-sqlite3 file**, then +`tg generate` — do not depend on wrangler’s internal DO sqlite path. + +**Do not** hand-maintain column lists in parallel with DDL without generate. +**Do not** strip `@generated-start`/`@generated-end` markers. + +## Writing queries + +Prefer the builder over string SQL: + +```ts +const rows = await Rooms.from() + .where(({ rooms }) => rooms.id.eq(id)) + .select(({ rooms }) => ({ id: rooms.id, name: rooms.name })) + .orderBy(({ rooms }) => rooms.id) + .execute(conn); +``` + +- Use `.insert` / `.update` / `.delete` builders for mutations. +- Use `sql\`...\`` for DDL and rare dialect-specific fragments. +- SQLite: booleans compile to BigInt `0n`/`1n`; `DoSqliteDriver` converts for + SqlStorage. Prefer generated ids that fit JS `number` on DOs (SqlStorage + returns INTEGER as number; >2^53 is lossy). + +## Capabilities and Cap'n Web (the intended app shape) + +### Session root + +Expose a **small root API**, not a pre-authenticated user: + +```ts +class ChatApi { + @expose(z.string().min(1)) + async userByName(name: string): Promise { /* auth → User cap */ } +} +// DO fetch: +return newWorkersWebSocketRpcResponse(req, toRpc(new ChatApi(conn))); +``` + +**Do not** authenticate in the HTTP handler and set main = `User` unless you +have a strong reason. Keep auth on the graph. + +### Reads vs mutations + +| Kind | Pattern | +|------|---------| +| **Read** | Return a **query builder** (or table-scoped builder). Client refines `.select` / `.where` / `.orderBy` and `.execute(user.conn)`. | +| **Mutation** | `@expose` method runs insert/update/delete **server-side**, validates args (zod on `@expose`), returns data or a new cap. | +| **Grant** | Method that checks authz then `return new Room(...)`. Client only holds caps it was given. | + +```ts +// Good — client-refinable read +@expose() rooms() { + return Rooms.from().join(...).where(...); +} + +// Good — mutation +@expose(z.string().min(1)) +async post(body: string) { ... } + +// Bad — canned read that the client could have authored +@expose() async feed() { + return Messages.from().join(Users, ...).select(...).execute(this.#conn); +} +``` + +### Client code + +- Transport helper only: `connect()` → root stub. +- **Author queries at the call site** with `doRpc`: + +```ts +const rooms = await doRpc(user, (u) => + u.rooms().select(({ rooms }) => ({ id: rooms.id, name: rooms.name })).execute(u.conn), +); +``` + +**Do not** build a REST-shaped `api.listRooms()` / `api.getFeed()` façade that +hides `doRpc` and the builder — that defeats the product demo and the security +model (the server should see client-authored query closures, not opaque named +RPCs for every read). + +### Connection on the wire + +Expose `conn` on the principal if clients must `.execute` builders: + +```ts +@expose() get conn() { return this.#conn; } +``` + +Builders’ `.execute` is `@expose`d and accepts a `Connection`. This matches +typegres’s Cap'n Web tests. Do not invent a separate “runQuery” RPC. + +### Holding caps + +Prefer holding a returned `Room` stub for repeated work. Re-calling +`user.room(id)` every poll re-runs membership checks (fine for demos, wasteful +in production). + +## Authorization checklist + +1. Only `@expose` what remote callers may touch. +2. Hand out nested caps only after checks (`room(id)` verifies membership). +3. Scope builders to the cap (`messages` filtered by `this.#id`). +4. Never trust client-supplied user ids for mutations — use the principal on the + cap (`this.#userId`). +5. Public directory vs private content: listing rows may be open; **content** + still requires a Room cap. + +## Drivers + +| Driver | Environment | +|--------|-------------| +| `PgDriver.create(url)` | Node + Postgres | +| `PgliteDriver.create()` | In-process Postgres (tests, playground) | +| `SqliteDriver.create(path?)` | Node + better-sqlite3 | +| `DoSqliteDriver(sql)` | Cloudflare Durable Object `ctx.storage.sql` | + +Implement `Driver` only if you need a new backend. Share sqlite helpers +(`stripMatchedOuterParens`, row stringification) — do not fork normalize logic +per example. + +## Anti-patterns (do not do these) + +1. **Wrapper APIs for every read** on client or server (“service layer” that only + forwards to builders). Expose builders; let the client compose. +2. **Importing root `typegres` in Workers** and then aliasing `pg` to empty + stubs. Use `typegres/core` + `typegres/do-sqlite` instead. +3. **Hand-written table classes that drift from DDL** when `tg generate` exists. +4. **Auth outside the capability graph** (`?user=` on the WebSocket URL as the + long-term model). +5. **Using TS `Record`** in this repo — use `{ [k: K]: V }` (project + convention; typegres exports a `Record` class). +6. **Comments about deleted code** (“X removed…”). Describe present design only. +7. **React `setState(capnwebStub)`** without wrapping — stubs are callable + Proxies; use `setState(() => stub)`. +8. **Assuming SqlStorage = better-sqlite3** — BigInt rejected; int64→number + lossy; blobs are `ArrayBuffer`. + +## Minimal Durable Object sketch + +```ts +import { Database, expose, sql, type Connection } from "typegres/core"; +import { DoSqliteDriver } from "typegres/do-sqlite"; +import { toRpc } from "typegres/capnweb"; + +const db = new Database({ dialect: "sqlite" }); + +export class MyDo extends DurableObject { + conn: Connection; + constructor(ctx: DurableObjectState, env: Env) { + super(ctx, env); + this.conn = db.attach(new DoSqliteDriver(ctx.storage.sql)); + ctx.blockConcurrencyWhile(() => migrate(this.conn)); + } + fetch(req: Request) { + return newWorkersWebSocketRpcResponse(req, toRpc(new Api(this.conn))); + } +} +``` + +## Testing + +- Prefer real drivers (pglite, better-sqlite3, or workerd pool) over mocks. +- Cap'n Web: exercise **over the wire** (`doRpc` + WebSocket), not only + in-process class calls. +- For DO examples: `@cloudflare/vitest-pool-workers` + unique DO ids per test + when isolated storage is off. + +## When unsure + +1. Can this be a **client-authored builder** from an existing cap? → read path. +2. Does it change state or mint a cap? → `@expose` mutation/grant on the server. +3. Does the worker import a node peer? → switch to `typegres/core` / + `typegres/do-sqlite`. +4. Is the table shape hand-copied from SQL? → `tg generate`. diff --git a/package.json b/package.json index 989506b..7294546 100644 --- a/package.json +++ b/package.json @@ -28,6 +28,18 @@ "./exoeval": { "import": "./dist/exoeval/index.mjs", "types": "./dist/exoeval/index.d.mts" + }, + "./capnweb": { + "import": "./dist/capnweb/shim.mjs", + "types": "./dist/capnweb/shim.d.mts" + }, + "./do-sqlite": { + "import": "./dist/driver-do-sqlite.mjs", + "types": "./dist/driver-do-sqlite.d.mts" + }, + "./core": { + "import": "./dist/core.mjs", + "types": "./dist/core.d.mts" } }, "bin": { @@ -38,12 +50,16 @@ ], "peerDependencies": { "@electric-sql/pglite": "^0.4.4", + "better-sqlite3": "^12.11.1", "pg": "^8.20.0" }, "peerDependenciesMeta": { "@electric-sql/pglite": { "optional": true }, + "better-sqlite3": { + "optional": true + }, "pg": { "optional": true } @@ -54,7 +70,7 @@ "scripts": { "build": "tsdown", "codegen": "node --experimental-strip-types src/types/postgres/emit.ts && node --experimental-strip-types src/types/sqlite/emit.ts", - "codegen:check": "tmp=$(mktemp -d) && node --experimental-strip-types src/types/postgres/emit.ts --out-dir \"$tmp/pg\" && { diff -r \"$tmp/pg\" src/types/postgres/generated || { echo 'src/types/postgres/generated is stale — run `npm run codegen` and commit.' >&2; rm -rf \"$tmp\"; exit 1; }; } && node --experimental-strip-types src/types/sqlite/emit.ts --out-dir \"$tmp/sqlite\" && { diff -r \"$tmp/sqlite/generated\" src/types/sqlite/generated || { echo 'src/types/sqlite/generated is stale — run `npm run codegen` and commit.' >&2; rm -rf \"$tmp\"; exit 1; }; } && rm -rf \"$tmp\"", + "codegen:check": "tmp=$(mktemp -d) && node --experimental-strip-types src/types/postgres/emit.ts --out-dir \"$tmp/pg\" && { diff -r \"$tmp/pg\" src/types/postgres/generated || { echo 'src/types/postgres/generated is stale \u2014 run `npm run codegen` and commit.' >&2; rm -rf \"$tmp\"; exit 1; }; } && node --experimental-strip-types src/types/sqlite/emit.ts --out-dir \"$tmp/sqlite\" && { diff -r \"$tmp/sqlite/generated\" src/types/sqlite/generated || { echo 'src/types/sqlite/generated is stale \u2014 run `npm run codegen` and commit.' >&2; rm -rf \"$tmp\"; exit 1; }; } && rm -rf \"$tmp\"", "lint": "eslint src", "typecheck": "tsgo --noEmit", "format": "prettier --write src", diff --git a/site/.gitignore b/site/.gitignore index 052abb9..9a758e4 100644 --- a/site/.gitignore +++ b/site/.gitignore @@ -10,3 +10,4 @@ public/demo.ts.static public/events-*.js public/chunk-*.js public/lib-*.js +public/rolldown-runtime-*.js diff --git a/src/core.ts b/src/core.ts new file mode 100644 index 0000000..bb3dc6c --- /dev/null +++ b/src/core.ts @@ -0,0 +1,13 @@ +// Side-effect-free runtime surface: schema, SQL, tables, @expose — no +// optional peer drivers. Prefer this entry (or selective subpaths) from +// workerd / Durable Object bundles so pg / better-sqlite3 / pglite never +// enter the module graph. Node apps can keep using `typegres` root. + +export { Database, Connection } from "./database"; +export type { TransactionIsolation, TransactionOptions } from "./database"; +export { Table } from "./table"; +export { sql, Sql } from "./builder/sql"; +export { QueryBuilder } from "./builder/query"; +export { expose } from "./exoeval/tool"; +export type { ToolFunction } from "./exoeval/tool"; +export type { Driver, ExecuteFn, QueryResult } from "./driver-shared"; diff --git a/src/database.ts b/src/database.ts index 05d10cc..f6ca161 100644 --- a/src/database.ts +++ b/src/database.ts @@ -1,4 +1,4 @@ -import type { ExecuteFn, Driver, QueryResult } from "./driver"; +import type { ExecuteFn, Driver, QueryResult } from "./driver-shared"; import type { Fromable, RowType, RowTypeToTsType } from "./builder/query"; import { QueryBuilder, hydrateRows } from "./builder/query"; import { deserializeRows } from "./util"; diff --git a/src/driver-do-sqlite.ts b/src/driver-do-sqlite.ts new file mode 100644 index 0000000..ceb53ba --- /dev/null +++ b/src/driver-do-sqlite.ts @@ -0,0 +1,44 @@ +import type { CompiledSql } from "./builder/sql"; +import { + type Driver, + type ExecuteFn, + type QueryResult, + normalizeRow, + stripMatchedOuterParens, +} from "./driver-shared"; + +// Duck-typed Cloudflare SqlStorage so this module needs no +// @cloudflare/workers-types dependency. A Durable Object passes +// `ctx.storage.sql`; tests can pass any object with the same shape. +export interface SqlStorageLike { + exec(query: string, ...bindings: unknown[]): { toArray(): { [key: string]: unknown }[] }; +} + +// typegres Driver over a Durable Object's SQLite (Cloudflare SqlStorage). +// Contract pinned by examples/chat/test/sqlstorage.probe.test.ts: +// - numbers bind as REAL (integer affinity comes from the dialect CAST); +// - SqlStorage REJECTS BigInt, so typegres's boolean 0n/1n must become 0/1; +// - results are native JS values, normalized to strings for deserialize; +// - blobs come back as ArrayBuffer (better-sqlite3 gives Uint8Array/Buffer). +// +// This module has NO node-only peer imports — safe to bundle into workerd. +export class DoSqliteDriver implements Driver { + readonly dialect = "sqlite" as const; + + constructor(private readonly sql: SqlStorageLike) {} + + execute: ExecuteFn = ({ text, values }: CompiledSql): Promise => { + const query = stripMatchedOuterParens(text); + // SqlStorage rejects BigInt; typegres emits 0n/1n for booleans. + const bound = values.map((v) => (typeof v === "bigint" ? Number(v) : v)); + const rows = this.sql.exec(query, ...bound).toArray().map(normalizeRow); + return Promise.resolve({ rows }); + }; + + // A Durable Object is single-threaded and single-connection. + runInSingleConnection = (cb: (execute: ExecuteFn) => Promise): Promise => + cb(this.execute); + + // Storage lifecycle belongs to the DO; nothing to close. + close = (): Promise => Promise.resolve(); +} diff --git a/src/driver-shared.ts b/src/driver-shared.ts new file mode 100644 index 0000000..951b59c --- /dev/null +++ b/src/driver-shared.ts @@ -0,0 +1,65 @@ +// Shared pieces of the Driver contract + sqlite row normalization. +// Kept free of optional peer imports (pg / better-sqlite3 / pglite) so +// workerd / browser bundles can pull DoSqliteDriver without resolving +// node-only packages. + +import type { CompiledSql } from "./builder/sql"; +import type { DialectName } from "./builder/sql"; + +// Rows come back as plain objects keyed by column name. Values are +// strings (every driver's type parser is overridden to return raw text) +// or null (SQL NULL). Typed coercion happens downstream in +// QueryBuilder/InsertBuilder/etc. +export type QueryResult = { rows: { [key: string]: string | null }[] }; +// Drivers receive an already-compiled `CompiledSql`. Compilation happens in +// Database (which owns the CompileContext); the driver's only job is to +// hand the query to its underlying pool/wasm and normalize the result rows. +export type ExecuteFn = (sql: CompiledSql) => Promise; + +export interface Driver { + readonly dialect: DialectName; + execute: ExecuteFn; + runInSingleConnection(cb: (execute: ExecuteFn) => Promise): Promise; + close(): Promise; +} + +// Strip one outer pair of parentheses iff they balance to enclose the +// entire string. `(SELECT 1)` → `SELECT 1`; `(SELECT 1) UNION (SELECT 2)` +// stays as-is (the leading `(` closes early and re-opens). Both sqlite +// drivers need it: QueryBuilder.bind() wraps statements in `(...)` for +// subquery splicing, and SQLite refuses top-level parenthesized statements. +export const stripMatchedOuterParens = (s: string): string => { + const t = s.trim(); + if (!t.startsWith("(") || !t.endsWith(")")) {return s;} + let depth = 0; + for (let i = 0; i < t.length; i++) { + if (t[i] === "(") {depth++;} + else if (t[i] === ")") { + depth--; + if (depth === 0 && i !== t.length - 1) {return s;} + } + } + return t.slice(1, -1); +}; + +// PG bytea text-protocol form. Pure JS so it runs in workerd (no Buffer). +const toHex = (bytes: Uint8Array): string => { + let s = "\\x"; + for (const b of bytes) {s += b.toString(16).padStart(2, "0");} + return s; +}; + +// Native driver value → the string form typegres's deserialize expects +// (PG text-protocol contract). Handles better-sqlite3 (Uint8Array/Buffer) +// and SqlStorage (ArrayBuffer) blobs. +export const normalizeValue = (v: unknown): string | null => { + if (v === null || v === undefined) { return null; } + if (typeof v === "string") { return v; } + if (typeof v === "number" || typeof v === "bigint" || typeof v === "boolean") { return String(v); } + if (v instanceof ArrayBuffer) { return toHex(new Uint8Array(v)); } + if (v instanceof Uint8Array) { return toHex(v); } + return String(v); +}; + +export const normalizeRow = (row: { [key: string]: unknown }): { [key: string]: string | null } => + Object.fromEntries(Object.entries(row).map(([k, v]) => [k, normalizeValue(v)])); diff --git a/src/driver.ts b/src/driver.ts index 777517f..176edc0 100644 --- a/src/driver.ts +++ b/src/driver.ts @@ -2,23 +2,16 @@ import type { CompiledSql } from "./builder/sql"; import type { DialectName } from "./builder/sql"; import type pg from "pg"; import type BetterSqlite3 from "better-sqlite3"; +import { + type Driver, + type ExecuteFn, + type QueryResult, + normalizeRow, + stripMatchedOuterParens, +} from "./driver-shared"; -// Rows come back as plain objects keyed by column name. Values are -// strings (every driver's type parser is overridden to return raw text) -// or null (SQL NULL). Typed coercion happens downstream in -// QueryBuilder/InsertBuilder/etc. -export type QueryResult = { rows: { [key: string]: string | null }[] }; -// Drivers receive an already-compiled `CompiledSql`. Compilation happens in -// Database (which owns the CompileContext); the driver's only job is to -// hand the query to its underlying pool/wasm and normalize the result rows. -export type ExecuteFn = (sql: CompiledSql) => Promise; - -export interface Driver { - readonly dialect: DialectName; - execute: ExecuteFn; - runInSingleConnection(cb: (execute: ExecuteFn) => Promise): Promise; - close(): Promise; -} +export type { Driver, ExecuteFn, QueryResult } from "./driver-shared"; +export { DoSqliteDriver, type SqlStorageLike } from "./driver-do-sqlite"; // pg adapter — returns raw text strings (no driver-side deserialization). // `pg` is an *optional* peer dep (see package.json#peerDependenciesMeta): @@ -117,13 +110,8 @@ export class PgliteDriver implements Driver { // Row value normalization: better-sqlite3 returns typed JS values // (number, string, Buffer, bigint, null). Typegres' downstream // deserialize() expects strings (PG contract). We stringify here so -// SQLite reads round-trip through the same code path. Details: -// - number, bigint → String(v) -// - Buffer → hex ("\xDEADBEEF"-style, mirrors PG's bytea repr) -// - null → null (passthrough — SQL NULL preserved) -// - string → identity -// Once the SQLite driver picks up bespoke handling for typed values -// this normalization can move down to just the deserializer layer. +// SQLite reads round-trip through the same code path. +// `better-sqlite3` is an optional peer (see package.json). export class SqliteDriver implements Driver { readonly dialect: DialectName = "sqlite"; @@ -170,35 +158,3 @@ export class SqliteDriver implements Driver { return Promise.resolve(); } } - -// Strip one outer pair of parentheses iff they balance to enclose the -// entire string. `(SELECT 1)` → `SELECT 1`; `(SELECT 1) UNION (SELECT 2)` -// stays as-is (the leading `(` closes early and re-opens). This keeps -// the driver honest about what it's unwrapping. -const stripMatchedOuterParens = (s: string): string => { - const t = s.trim(); - if (!t.startsWith("(") || !t.endsWith(")")) {return s;} - let depth = 0; - for (let i = 0; i < t.length; i++) { - if (t[i] === "(") {depth++;} - else if (t[i] === ")") { - depth--; - if (depth === 0 && i !== t.length - 1) {return s;} - } - } - return t.slice(1, -1); -}; - -const normalizeValue = (v: unknown): string | null => { - if (v === null || v === undefined) { return null; } - if (typeof v === "string") { return v; } - if (typeof v === "number" || typeof v === "bigint" || typeof v === "boolean") { return String(v); } - if (v instanceof Uint8Array) { - // Match PG bytea repr: \x-prefixed lowercase hex. - return "\\x" + Buffer.from(v).toString("hex"); - } - return String(v); -}; - -const normalizeRow = (row: { [key: string]: unknown }): { [key: string]: string | null } => - Object.fromEntries(Object.entries(row).map(([k, v]) => [k, normalizeValue(v)])); diff --git a/src/index.ts b/src/index.ts index d82f32c..4185271 100644 --- a/src/index.ts +++ b/src/index.ts @@ -3,19 +3,24 @@ export type { TransactionIsolation, TransactionOptions } from "./database"; export { Table } from "./table"; export { sql, Sql } from "./builder/sql"; export { QueryBuilder } from "./builder/query"; +// Node drivers (optional peers). Prefer subpath `typegres/do-sqlite` for +// Durable Object / workerd bundles so pg / better-sqlite3 / pglite never +// enter the module graph. export { PgDriver, PgliteDriver, SqliteDriver } from "./driver"; +export { DoSqliteDriver } from "./driver-do-sqlite"; export { TypegresLiveEvents } from "./live/events"; export { expose } from "./exoeval/tool"; export type { ToolFunction } from "./exoeval/tool"; export { RpcClient, inMemoryChannel, safeStringify } from "./exoeval/rpc"; export type { RawChannel } from "./exoeval/rpc"; export type { Config } from "./config"; -export type { Driver } from "./driver"; +export type { Driver } from "./driver-shared"; +export type { SqlStorageLike } from "./driver-do-sqlite"; import type { Connection } from "./database"; import { Database } from "./database"; import { PgDriver, PgliteDriver, SqliteDriver } from "./driver"; -import type { Driver } from "./driver"; +import type { Driver } from "./driver-shared"; import type { DialectName } from "./builder/sql"; // Convenience factory for quick scripts and the playground. Returns diff --git a/src/tables/generate.test.ts b/src/tables/generate.test.ts index 4fdd8e2..8fd8f02 100644 --- a/src/tables/generate.test.ts +++ b/src/tables/generate.test.ts @@ -39,7 +39,7 @@ describe("generateTable — new file", async () => { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; import { Int8, Text } from "typegres/postgres"; import { Teams } from "./teams"; @@ -69,7 +69,7 @@ describe("generateTable — new file", async () => { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose, sql } from "typegres"; + import { expose, sql } from "typegres/core"; import { Int8, Text, Timestamptz } from "typegres/postgres"; export class Dogs extends db.Table("dogs") { @@ -90,7 +90,7 @@ describe("generateTable — update mode preserves @expose() state", async () => test("entries the user stripped stay stripped on regen", async () => { const existing = `import { db } from "../db"; -import { Int8, Text } from "typegres"; +import { Int8, Text } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -105,7 +105,7 @@ export class Dogs extends db.Table("dogs") { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { Int8, Text } from "typegres"; + import { Int8, Text } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -121,8 +121,8 @@ export class Dogs extends db.Table("dogs") { test("entries the user decorated stay decorated on regen", async () => { const existing = `import { db } from "../db"; -import { Int8, Text } from "typegres"; -import { expose } from "typegres"; +import { Int8, Text } from "typegres/core"; +import { expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -137,8 +137,8 @@ export class Dogs extends db.Table("dogs") { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { Int8, Text } from "typegres"; - import { expose } from "typegres"; + import { Int8, Text } from "typegres/core"; + import { expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -154,7 +154,7 @@ export class Dogs extends db.Table("dogs") { test("mixed: per-entry preservation", async () => { const existing = `import { db } from "../db"; -import { Int8, Text, expose } from "typegres"; +import { Int8, Text, expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -169,7 +169,7 @@ export class Dogs extends db.Table("dogs") { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { Int8, Text, expose } from "typegres"; + import { Int8, Text, expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -185,7 +185,7 @@ export class Dogs extends db.Table("dogs") { test("decorator on previous line is recognized", async () => { const existing = `import { db } from "../db"; -import { expose } from "typegres"; +import { expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -203,7 +203,7 @@ export class Dogs extends db.Table("dogs") { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -217,7 +217,7 @@ export class Dogs extends db.Table("dogs") { test("schema migration adds new column → new entry decorated by default", async () => { const existingNoTool = `import { db } from "../db"; -import { Int8, Text, expose } from "typegres"; +import { Int8, Text, expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -234,7 +234,7 @@ export class Dogs extends db.Table("dogs") { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { Int8, Text, expose } from "typegres"; + import { Int8, Text, expose } from "typegres/core"; export class Dogs extends db.Table("dogs") { // @generated-start @@ -248,7 +248,7 @@ export class Dogs extends db.Table("dogs") { test("update mode does not touch imports / preserves custom comments", async () => { const existing = `import { db } from "../db"; -import { Int8 } from "typegres"; +import { Int8 } from "typegres/core"; // my custom comment export class Dogs extends db.Table("dogs") { @@ -265,7 +265,7 @@ export class Dogs extends db.Table("dogs") { await validate(out); expect(out).toMatchInlineSnapshot(` "import { db } from "../db"; - import { Int8 } from "typegres"; + import { Int8 } from "typegres/core"; // my custom comment export class Dogs extends db.Table("dogs") { diff --git a/src/tables/generate.ts b/src/tables/generate.ts index c2e8cda..a51bc4e 100644 --- a/src/tables/generate.ts +++ b/src/tables/generate.ts @@ -242,13 +242,14 @@ const newFile = ( // Split imports: dialect-specific type classes come from // `typeImportPath`; dialect-agnostic runtime helpers (`expose`, - // `sql`) come from the top `typegres` barrel. Symbols within each + // `sql`) come from `typegres/core` (no optional node driver peers — + // safe for Workers / Durable Object bundles). Symbols within each // group sorted for stable diffs. const runtimeSyms = ["expose", ...(hasDefault ? ["sql"] : [])].sort(); const typeSyms = [...typeClasses].sort(); const imports = [ `import { db } from "${dbImport}";`, - `import { ${runtimeSyms.join(", ")} } from "typegres";`, + `import { ${runtimeSyms.join(", ")} } from "typegres/core";`, `import { ${typeSyms.join(", ")} } from "${typeImportPath}";`, ...relImports, ]; diff --git a/src/tables/postgres.test.ts b/src/tables/postgres.test.ts index 1689af8..77b43eb 100644 --- a/src/tables/postgres.test.ts +++ b/src/tables/postgres.test.ts @@ -91,7 +91,7 @@ describe("postgres codegen e2e — DDL in, generated TypeScript out", () => { expect([...files.keys()]).toEqual(["dogs", "teams"]); expect(files.get("dogs")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose, sql } from "typegres"; + import { expose, sql } from "typegres/core"; import { Int8, Text, Timestamptz } from "typegres/postgres"; import { Teams } from "./teams"; @@ -111,7 +111,7 @@ describe("postgres codegen e2e — DDL in, generated TypeScript out", () => { `); expect(files.get("teams")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; import { Int8, Text } from "typegres/postgres"; import { Dogs } from "./dogs"; @@ -172,7 +172,7 @@ describe("postgres codegen e2e — DDL in, generated TypeScript out", () => { `); expect(files.get("parent_t")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; import { Int8 } from "typegres/postgres"; import { Badge } from "./badge"; import { Joiner } from "./joiner"; @@ -193,7 +193,7 @@ describe("postgres codegen e2e — DDL in, generated TypeScript out", () => { `); expect(files.get("profile")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; import { Int8 } from "typegres/postgres"; import { ParentT } from "./parent_t"; diff --git a/src/tables/sqlite.test.ts b/src/tables/sqlite.test.ts index 1443357..f8337d6 100644 --- a/src/tables/sqlite.test.ts +++ b/src/tables/sqlite.test.ts @@ -108,7 +108,7 @@ describe("sqlite codegen e2e — DDL in, generated TypeScript out", () => { expect([...files.keys()]).toEqual(["dogs", "teams"]); expect(files.get("dogs")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose, sql } from "typegres"; + import { expose, sql } from "typegres/core"; import { Any, Bool, Integer, Text } from "typegres/sqlite"; import { Teams } from "./teams"; @@ -128,7 +128,7 @@ describe("sqlite codegen e2e — DDL in, generated TypeScript out", () => { `); expect(files.get("teams")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; import { Integer, Text } from "typegres/sqlite"; import { Dogs } from "./dogs"; @@ -199,7 +199,7 @@ describe("sqlite codegen e2e — DDL in, generated TypeScript out", () => { `); expect(files.get("parent_t")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; import { Integer } from "typegres/sqlite"; import { Badge } from "./badge"; import { Joiner } from "./joiner"; @@ -223,7 +223,7 @@ describe("sqlite codegen e2e — DDL in, generated TypeScript out", () => { // non-null, so the outbound relation must be "one", not "maybe". expect(files.get("profile")).toMatchInlineSnapshot(` "import { db } from "../db"; - import { expose } from "typegres"; + import { expose } from "typegres/core"; import { Integer } from "typegres/sqlite"; import { ParentT } from "./parent_t"; @@ -236,5 +236,32 @@ describe("sqlite codegen e2e — DDL in, generated TypeScript out", () => { } " `); + + // Composite PK: first column gets pk=1 in PRAGMA but is NOT a rowid + // alias — both a and b are insert-supplied. Must not emit generated: true. + const joiner = files.get("joiner")!; + expect(joiner).toContain("@expose() a = Integer.column({ nonNull: true });"); + expect(joiner).toContain("@expose() b = Integer.column({ nonNull: true });"); + expect(joiner).not.toMatch(/a = Integer\.column\(\{ nonNull: true, generated: true \}\)/); + }); + + test("composite INTEGER PRIMARY KEY columns are not rowid aliases (not generated)", async () => { + // Regression: isRowidAlias used to treat pk===1 alone as a rowid alias, + // so room_id in PRIMARY KEY (room_id, user_id) was wrongly generated: true. + const files = await generate(` + CREATE TABLE rooms (id INTEGER PRIMARY KEY); + CREATE TABLE users (id INTEGER PRIMARY KEY); + CREATE TABLE room_members ( + room_id INTEGER NOT NULL REFERENCES rooms(id), + user_id INTEGER NOT NULL REFERENCES users(id), + PRIMARY KEY (room_id, user_id) + ); + `); + const members = files.get("room_members")!; + expect(members).toContain("@expose() room_id = Integer.column({ nonNull: true });"); + expect(members).toContain("@expose() user_id = Integer.column({ nonNull: true });"); + expect(members).not.toContain("generated: true"); + // Single-column INTEGER PK still is a rowid alias. + expect(files.get("rooms")).toContain("@expose() id = Integer.column({ nonNull: true, generated: true });"); }); }); diff --git a/src/tables/sqlite.ts b/src/tables/sqlite.ts index a319071..c2d9059 100644 --- a/src/tables/sqlite.ts +++ b/src/tables/sqlite.ts @@ -72,8 +72,12 @@ export const affinityToClass = (declaredType: string): string => { // `INTEGER PRIMARY KEY` (that exact declared type, not "INT") in a // rowid table aliases the rowid — auto-increments, nulls are replaced. // SQLite's own docs are strict about the literal string match. -const isRowidAlias = (declaredType: string, pk: number): boolean => - pk === 1 && /^\s*INTEGER\s*$/i.test(declaredType); +// +// Composite PKs: PRAGMA still assigns `pk = 1` to the first column of +// `PRIMARY KEY (a, b)`, but that column is NOT a rowid alias — both +// values are supplied by the inserter. Require a single-column PK. +const isRowidAlias = (declaredType: string, pk: number, pkColCount: number): boolean => + pkColCount === 1 && pk === 1 && /^\s*INTEGER\s*$/i.test(declaredType); // --- PRAGMA helpers --- @@ -89,8 +93,8 @@ const readTables = (db: BetterSqlite3.Database): string[] => { const readTableInfo = (db: BetterSqlite3.Database, tableName: string): TableInfoRow[] => db.prepare(`PRAGMA table_info(${quoteIdent(tableName)})`).all() as TableInfoRow[]; -const toColumnInfo = (r: TableInfoRow): ColumnInfo => { - const rowid = isRowidAlias(r.type, r.pk); +const toColumnInfo = (r: TableInfoRow, pkColCount: number): ColumnInfo => { + const rowid = isRowidAlias(r.type, r.pk, pkColCount); return { name: r.name, className: affinityToClass(r.type), @@ -125,7 +129,13 @@ const readSingleColUniqueSet = (db: BetterSqlite3.Database, tableName: string, i return uniq; }; -const readFksFor = (db: BetterSqlite3.Database, tableName: string, info: TableInfoRow[], uniqueCols: Set): FkInfo[] => { +const readFksFor = ( + db: BetterSqlite3.Database, + tableName: string, + info: TableInfoRow[], + uniqueCols: Set, + pkColCount: number, +): FkInfo[] => { const fks = db.prepare(`PRAGMA foreign_key_list(${quoteIdent(tableName)})`).all() as FkListRow[]; // A composite FK repeats the same `id` across multiple rows. Group @@ -151,7 +161,7 @@ const readFksFor = (db: BetterSqlite3.Database, tableName: string, info: TableIn // reports notnull=0 but is semantically non-null. Without this, // a self-referencing single-col PK-as-FK is wrongly flagged // nullable and cardinality drops from "one" to "maybe". - const isRowid = localCol ? isRowidAlias(localCol.type, localCol.pk) : false; + const isRowid = localCol ? isRowidAlias(localCol.type, localCol.pk, pkColCount) : false; out.push({ from_table: tableName, from_column: fk.from, @@ -178,10 +188,11 @@ export const sqliteIntrospector = async (filename: string): Promise(); for (const name of tableNames) { const info = readTableInfo(db, name); + const pkColCount = info.filter((c) => c.pk > 0).length; const uniqueCols = readSingleColUniqueSet(db, name, info); tables.set(name, { - columns: info.map(toColumnInfo), - fks: readFksFor(db, name, info, uniqueCols), + columns: info.map((c) => toColumnInfo(c, pkColCount)), + fks: readFksFor(db, name, info, uniqueCols, pkColCount), }); } return { tables }; diff --git a/tsdown.config.ts b/tsdown.config.ts index a45d0cd..4e32f20 100644 --- a/tsdown.config.ts +++ b/tsdown.config.ts @@ -20,10 +20,10 @@ export default defineConfig([ // loaders — those use `require` / `__filename` and would trip Node's // CJS/ESM mixed-mode check when a consumer runs the CLI. { - entry: ["src/index.ts", "src/config.ts", "src/builder/sql.ts", "src/types/postgres/index.ts", "src/types/sqlite/index.ts", "src/cli.ts", "src/exoeval/index.ts"], + entry: ["src/index.ts", "src/core.ts", "src/config.ts", "src/builder/sql.ts", "src/types/postgres/index.ts", "src/types/sqlite/index.ts", "src/cli.ts", "src/exoeval/index.ts", "src/capnweb/shim.ts", "src/driver-do-sqlite.ts"], format: ["esm"], clean: true, - deps: { neverBundle: ["pg", "@electric-sql/pglite", "better-sqlite3"] }, + deps: { neverBundle: ["pg", "@electric-sql/pglite", "better-sqlite3", "capnweb"] }, plugins: [swcPlugin()], }, // Playground single-file bundle for the site's Monaco + esbuild-wasm