diff --git a/.eslintrc.json b/.eslintrc.json index 224c46c..9669460 100644 --- a/.eslintrc.json +++ b/.eslintrc.json @@ -37,6 +37,9 @@ "@typescript-eslint/consistent-type-definitions": "off", "@typescript-eslint/no-empty-function": "off", "@typescript-eslint/no-unused-vars": ["error", { "varsIgnorePattern": "^_" }], + "@typescript-eslint/restrict-template-expressions": "off", // good rule in theory, but doesn't work + "@typescript-eslint/restrict-plus-operands": "off", // good rule in theory, but doesn't work + "@typescript-eslint/use-unknown-in-catch-callback-variable": "off", "no-empty": "off", "react-refresh/only-export-components": ["error", { "allowConstantExport": true }], "no-unused-labels": "off", diff --git a/.vscode/settings.json b/.vscode/settings.json index 7f921b2..3984634 100644 --- a/.vscode/settings.json +++ b/.vscode/settings.json @@ -5,8 +5,8 @@ "pnpm-lock.yaml": true }, "files.exclude": { - "**/dist/**": true, - "**/node_modules": true, + // "**/dist/**": true, + // "**/node_modules": true, "**/.turbo": true, "client/public/sw.js": true, "client/public/sw.js.map": true, @@ -15,7 +15,7 @@ "**/*.module.css.d.ts": true, "**/*.sql.d.ts": true, "**/*.sql.d.ts.map": true, - "**/*.js": true, + // "**/*.js": true, "**/*.mjs": true, "**/*.tsbuildinfo": true }, @@ -59,6 +59,20 @@ "*.wasm": "${capture}.wasm.*", "*.sql": "${capture}.sql.d.ts, ${capture}.sql.d.ts.map" }, + "workbench.editor.customLabels.patterns": { + ".github/**/action.yml": "${dirname}/action.${extname}", + "**/src/index.*": "${dirname(1)}/src/index.${extname}", + "**/index.*": "${dirname}/index.${extname}", + "**/package.json": "${dirname}/package.json", + "**/tsconfig*.json": "${dirname}/${filename}.json", + "**/.eslintrc.*": "${dirname}/.eslintrc.${extname}", + "**/esbuild.ts": "${dirname}/esbuild.ts", + "**/turbo.json": "${dirname}/turbo.json", + "**/.gitignore": "${dirname}/.gitignore", + "**/.nvmrc": "${dirname}/.nvmrc", + "**/vitest.config.ts": "${dirname}/vitest.config.ts", + "**/vite.config.ts": "${dirname}/vite.config.ts" + }, "github-actions.workflows.pinned.refresh.enabled": true, "cSpell.spellCheckOnlyWorkspaceFiles": true, "files.associations": { diff --git a/assets/.eslintrc.json b/assets/.eslintrc.json index ce93f84..b2754bb 100644 --- a/assets/.eslintrc.json +++ b/assets/.eslintrc.json @@ -1,6 +1,6 @@ { "extends": "../.eslintrc.json", "parserOptions": { - "project": ["tsconfig.json"] + "project": ["tsconfig.lib.json", "tsconfig.tools.json"] } } diff --git a/assets/esbuild.ts b/assets/esbuild.ts index c51b383..b90fcc0 100644 --- a/assets/esbuild.ts +++ b/assets/esbuild.ts @@ -1,30 +1,55 @@ +import chalk from "chalk" import { watch as chokidar } from "chokidar" -import { writeFile } from "node:fs/promises" -import { basename, dirname, join, relative } from "node:path" +import { createHash } from "node:crypto" +import { type Stats } from "node:fs" +import { writeFile, readFile } from "node:fs/promises" +import { dirname, join } from "node:path" import { walkFsTree } from "script/walkFsTree" -function dTsTemplate(name: string) { - return `declare const query: string; export = query //# sourceMappingURL=${name}.d.ts.map` -} - -function dTsMapTemplate(name: string) { - return `{"version":3,"file":"${name}.d.ts","sourceRoot":"","sources":["${name}"],"names":[],"mappings":";AAAA"}` -} - -async function buildMap(path: string) { - const name = basename(path) - const promise = Promise.all([ - writeFile(`${path}.d.ts`, dTsTemplate(name)), - writeFile(`${path}.d.ts.map`, dTsMapTemplate(name)), - ]) - void promise.then(() => { - console.log("Built TS maps for:", path) - }) - return promise +function onChange(path: string, stats: Stats | undefined) { + // read all files in the directory + const dir = stats?.isFile() ? dirname(path) : path + readFile(join(dir, "meta", "_journal.json"), "utf8").then((data) => { + const journal = JSON.parse(data) as { + entries: Array<{ + idx: number + version: string + when: number + tag: string + breakpoints: boolean + }> + } + Promise.all( + journal.entries.map((entry) => + readFile(join(dir, entry.tag + ".sql"), "utf8").then((data) => ({ + sql: data + .split("--> statement-breakpoint") + .map((s) => s.trim()) + .filter(Boolean), + bps: entry.breakpoints, + folderMillis: entry.when, + hash: createHash("sha256").update(data).digest("hex"), + })) + ) + ).then((migrations) => { + const result = JSON.stringify(migrations, null, 2) + const resultPath = join(dir, "..", "migrations.json") + writeFile(resultPath, result).then(() => { + console.log(chalk.gray("compiled migrations:"), chalk.green(resultPath)) + for (const entry of journal.entries) { + console.log( + chalk.gray(" -"), + chalk.white(`${entry.tag}.sql`), + chalk.gray(`#${entry.idx} v${entry.version} @${entry.when}`) + ) + } + }, console.error) + }, console.error) + }, console.error) } function watch() { - const watcher = chokidar("./src/*.sql", { + const watcher = chokidar("./src/*/migrations/*.sql", { ignoreInitial: false, persistent: true, atomic: true, @@ -32,11 +57,11 @@ function watch() { stabilityThreshold: 50, }, }) - watcher.on("add", (path, stats) => { - if (stats?.isFile()) { - void buildMap(path) - } - }) + + watcher.on("add", onChange) + watcher.on("change", onChange) + watcher.on("unlink", onChange) + // eslint-disable-next-line @typescript-eslint/no-misused-promises process.on("SIGINT", async () => { console.log("\nStopping assets watcher...") @@ -50,10 +75,9 @@ async function build() { const current = dirname(new URL(import.meta.url).pathname) const promises: Array> = [] await walkFsTree(join(current, "src"), ({ path, stats }) => { - if (!path.endsWith(".sql")) return - if (stats.isFile()) { - const rel = relative(current, path) - promises.push(buildMap(rel)) + if (!stats.isDirectory()) return + if (path.match(/src\/[^/]+\/migrations$/)) { + onChange(path, stats) } }) return promises diff --git a/assets/package.json b/assets/package.json index cdd134f..3657c64 100644 --- a/assets/package.json +++ b/assets/package.json @@ -5,7 +5,9 @@ "type": "module", "scripts": { "tsc:build": "tsx ./esbuild.ts --build", - "tsc": "tsc --noEmit", + "tsc:lib": "tsc --noEmit --project tsconfig.lib.json", + "tsc:tools": "tsc --noEmit --project tsconfig.tools.json", + "tsc": "echo 'done'", "dev": "tsx ./esbuild.ts", "lint": "eslint .", "lint:fix": "eslint . --fix", diff --git a/assets/src/drizzle-test/drizzle.config.ts b/assets/src/drizzle-test/drizzle.config.ts new file mode 100644 index 0000000..877c97f --- /dev/null +++ b/assets/src/drizzle-test/drizzle.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from "drizzle-kit" +import { relative, resolve } from "node:path" + +const schema = relative(".", resolve(__dirname, "schema.ts")) +const out = relative(".", resolve(__dirname, "migrations")) + +export default defineConfig({ + schema, + driver: "better-sqlite", + out, + verbose: true, + strict: true, +}) diff --git a/assets/src/drizzle-test/index.ts b/assets/src/drizzle-test/index.ts new file mode 100644 index 0000000..b8f8065 --- /dev/null +++ b/assets/src/drizzle-test/index.ts @@ -0,0 +1,4 @@ +import * as schema from "./schema" +import migrations from "./migrations.json" + +export { schema, migrations } diff --git a/assets/src/drizzle-test/migrations.json b/assets/src/drizzle-test/migrations.json new file mode 100644 index 0000000..bd12c1a --- /dev/null +++ b/assets/src/drizzle-test/migrations.json @@ -0,0 +1,13 @@ +[ + { + "sql": [ + "CREATE TABLE `list` (\n\t`id` text PRIMARY KEY NOT NULL,\n\t`content` text,\n\t`position` text\n);", + "SELECT\n\tcrsql_as_crr ('list');", + "SELECT\n\tcrsql_fract_as_ordered ('list', 'position');", + "CREATE INDEX `positionIdx` ON `list` (`position`);" + ], + "bps": true, + "folderMillis": 1711879378057, + "hash": "3b557ab5472a1772140cca199e8f1f61933d42d7dd4c578fb42032f214213036" + } +] \ No newline at end of file diff --git a/assets/src/drizzle-test/migrations/0000_worried_mongu.sql b/assets/src/drizzle-test/migrations/0000_worried_mongu.sql new file mode 100644 index 0000000..4f0bdc0 --- /dev/null +++ b/assets/src/drizzle-test/migrations/0000_worried_mongu.sql @@ -0,0 +1,13 @@ +CREATE TABLE `list` ( + `id` text PRIMARY KEY NOT NULL, + `content` text, + `position` text +); +--> statement-breakpoint +SELECT + crsql_as_crr ('list'); +--> statement-breakpoint +SELECT + crsql_fract_as_ordered ('list', 'position'); +--> statement-breakpoint +CREATE INDEX `positionIdx` ON `list` (`position`); \ No newline at end of file diff --git a/assets/src/drizzle-test/migrations/meta/0000_snapshot.json b/assets/src/drizzle-test/migrations/meta/0000_snapshot.json new file mode 100644 index 0000000..64bc11b --- /dev/null +++ b/assets/src/drizzle-test/migrations/meta/0000_snapshot.json @@ -0,0 +1,52 @@ +{ + "version": "5", + "dialect": "sqlite", + "id": "822c009f-7a62-472e-bff5-2047825663d0", + "prevId": "00000000-0000-0000-0000-000000000000", + "tables": { + "list": { + "name": "list", + "columns": { + "id": { + "name": "id", + "type": "text", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "content": { + "name": "content", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + }, + "position": { + "name": "position", + "type": "text", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "positionIdx": { + "name": "positionIdx", + "columns": [ + "position" + ], + "isUnique": false + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + } +} \ No newline at end of file diff --git a/assets/src/drizzle-test/migrations/meta/_journal.json b/assets/src/drizzle-test/migrations/meta/_journal.json new file mode 100644 index 0000000..3449894 --- /dev/null +++ b/assets/src/drizzle-test/migrations/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "5", + "dialect": "sqlite", + "entries": [ + { + "idx": 0, + "version": "5", + "when": 1711879378057, + "tag": "0000_worried_mongu", + "breakpoints": true + } + ] +} \ No newline at end of file diff --git a/assets/src/drizzle-test/schema.ts b/assets/src/drizzle-test/schema.ts new file mode 100644 index 0000000..3083d09 --- /dev/null +++ b/assets/src/drizzle-test/schema.ts @@ -0,0 +1,13 @@ +import { sqliteTable, text, index } from "drizzle-orm/sqlite-core" + +export const list = sqliteTable( + "list", + { + id: text("id").primaryKey(), + content: text("content"), + position: text("position"), + }, + (list) => ({ + positionIdx: index("positionIdx").on(list.position), + }) +) diff --git a/assets/src/faa.sql b/assets/src/faa.sql deleted file mode 100644 index 04e77a5..0000000 --- a/assets/src/faa.sql +++ /dev/null @@ -1 +0,0 @@ -SELECT * from foo; \ No newline at end of file diff --git a/assets/src/test-v0.sql b/assets/src/test-v0.sql deleted file mode 100644 index cd2fe20..0000000 --- a/assets/src/test-v0.sql +++ /dev/null @@ -1,17 +0,0 @@ -CREATE TABLE - IF NOT EXISTS test ( - id TEXT NOT NULL PRIMARY KEY, - content TEXT, - position - ); - -CREATE INDEX IF NOT EXISTS test_position ON test (position); - -SELECT - crsql_as_crr ('test'); - -SELECT - crsql_fract_as_ordered ('test', 'position'); - -CREATE TABLE - IF NOT EXISTS local_notes (id TEXT NOT NULL PRIMARY KEY, content TEXT); \ No newline at end of file diff --git a/assets/tsconfig.json b/assets/tsconfig.json index 509a0d6..e312cd5 100644 --- a/assets/tsconfig.json +++ b/assets/tsconfig.json @@ -1,9 +1,14 @@ { "extends": "../tsconfig.base.json", - "compilerOptions": { - "types": ["node"], - "module": "ESNext", - }, - "files": ["esbuild.ts"], - "include": ["../script/src/**/*.ts"], + "compilerOptions": {}, + "include": [], + "files": [], + "references": [ + { + "path": "./tsconfig.lib.json" + }, + { + "path": "./tsconfig.tools.json" + } + ] } diff --git a/assets/tsconfig.lib.json b/assets/tsconfig.lib.json new file mode 100644 index 0000000..f97eab9 --- /dev/null +++ b/assets/tsconfig.lib.json @@ -0,0 +1,8 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "types": [] + }, + "exclude": ["**/*.drizzle.config.ts"], + "include": ["src/*/schema.ts", "src/*/index.ts", "types/*", "../types/*.d.ts"] +} diff --git a/assets/tsconfig.tools.json b/assets/tsconfig.tools.json new file mode 100644 index 0000000..22124cf --- /dev/null +++ b/assets/tsconfig.tools.json @@ -0,0 +1,9 @@ +{ + "extends": "../tsconfig.base.json", + "compilerOptions": { + "types": ["node"], + "module": "ESNext" + }, + "files": ["esbuild.ts"], + "include": ["../script/src/**/*.ts", "**/*.drizzle.config.ts"] +} diff --git a/assets/turbo.json b/assets/turbo.json index f283baa..f319715 100644 --- a/assets/turbo.json +++ b/assets/turbo.json @@ -2,6 +2,38 @@ "$schema": "https://turbo.build/schema.json", "extends": ["//"], "pipeline": { + "tsc:build": { + "outputs": ["src/**/migrations.json"], + "dependsOn": ["script#build"] + }, + "tsc:tools": { + "inputs": [ + "../script/src/**/*.ts", + "**/*.drizzle.config.ts", + "esbuild.ts", + "../types/*.d.ts", + "tsconfig.json", + "tsconfig.tools.json" + ], + "dependsOn": ["script#build"] + }, + "tsc:lib": { + "inputs": [ + "src/**/*", + "!src/**/drizzle.config.ts", + "tsconfig.json", + "tsconfig.lib.json" + ], + "dependsOn": ["assets#tsc:build"] + }, + "tsc": { + "dependsOn": ["assets#tsc:tools", "assets#tsc:lib"], + "inputs": ["package.json"] + }, + "dev": { + "persistent": true, + "dependsOn": ["script#build"] + }, "spell": { "inputs": ["$TURBO_DEFAULT$", "../repo.dict.txt"] } diff --git a/client/src/App.tsx b/client/src/App.tsx index 86f3203..a6d0659 100644 --- a/client/src/App.tsx +++ b/client/src/App.tsx @@ -7,7 +7,7 @@ import { WorkerDemo } from "client/components/WorkerDemo" import { DbDemo } from "client/components/DbDemo" import { Hero } from "client/components/Hero/Hero" import styles from "client/App.module.css" -import { DrizzleTest } from "client/components/drizzle/Test" +// import { DrizzleTest } from "client/components/drizzle/Test" fooBar() @@ -38,9 +38,9 @@ export default function App() { - + {/* - + */} ) diff --git a/client/src/auth/AuthProvider.tsx b/client/src/auth/AuthProvider.tsx index e2f3d3e..58e8fd4 100644 --- a/client/src/auth/AuthProvider.tsx +++ b/client/src/auth/AuthProvider.tsx @@ -1,13 +1,13 @@ +import { migrations, schema } from "assets/drizzle-test" import { AuthContext } from "client/auth/AuthContext" import { useAuth } from "client/auth/useAuth" import { useAuthContext } from "client/auth/useAuthContext" import { useDbProvider } from "client/db/DbProvider" import { type ReactNode } from "react" -import schema from "assets/test-v0.sql" export const UserDbProvider = ({ children }: { children: ReactNode }) => { const auth = useAuthContext() - useDbProvider(auth.type === "signed-in" ? auth.userId : undefined, schema, "test-v0") + useDbProvider(auth.type === "signed-in" ? auth.userId : undefined, schema, migrations) return children } diff --git a/client/src/components/DbDemo.tsx b/client/src/components/DbDemo.tsx index b335b84..0a2c840 100644 --- a/client/src/components/DbDemo.tsx +++ b/client/src/components/DbDemo.tsx @@ -1,4 +1,5 @@ import { onlineManager } from "@tanstack/react-query" +import { schema } from "assets/drizzle-test" import { useAuthContext } from "client/auth/useAuthContext" import { Title } from "client/components/Bento/Title" import { Button, ButtonList } from "client/components/Button/Button" @@ -8,11 +9,13 @@ import { useDb } from "client/db/DbProvider" import { useSync } from "client/db/Sync" import { useDbMutation } from "client/db/useDbMutation" import { useDbQuery } from "client/db/useDbQuery" -import { useEffect } from "react" -import { sql } from "shared/sql" +import { desc, sql } from "drizzle-orm" +import { useEffect, useState } from "react" +// import { sql } from "shared/sql" export function DbDemo() { const auth = useAuthContext() + const [flag, setFlag] = useState(false) if (auth.type !== "signed-in") { return

User DB only available to signed-in users

} @@ -23,44 +26,66 @@ export function DbDemo() { title="Database" /> - + + {flag && } ) } function Content({ name }: { name: string }) { - const ctx = useDb(name) - const sync = useSync(ctx?.db, name) + const ctx = useDb(name) + // const sync = useSync(ctx?.db, name) + + // // Sync with server on reconnect + // useEffect(() => { + // if (!sync) return + // if (navigator.onLine) { + // void sync.roundTrip() + // } + // return onlineManager.subscribe((online) => { + // if (online) { + // void sync.roundTrip() + // } + // }) + // }, [sync]) + + const list = useDbQuery( + ctx?.db.select().from(schema.list).orderBy(desc(schema.list.position), schema.list.id) + ) + + console.log("list", list.data) - // Sync with server on reconnect useEffect(() => { - if (!sync) return - if (navigator.onLine) { - void sync.roundTrip() - } - return onlineManager.subscribe((online) => { - if (online) { - void sync.roundTrip() - } + console.log("------cocococococ-------------") + const insert = ctx?.db.insert(schema.list).values({ + id: sql.placeholder("id"), + content: sql.placeholder("content"), + position: sql.placeholder("position"), }) - }, [sync]) - - const list = useDbQuery<{ id: string; content: string; position: number }>({ - dbName: name, - query: sql`SELECT id, content, position FROM test ORDER BY position, id ASC`, - }) + console.log(insert) + const insert2 = ctx?.db + .insert(schema.list) + .values({ + id: sql.placeholder("id"), + content: sql.placeholder("content"), + position: sql.placeholder("position"), + }) + .returning({ id: schema.list.id }) + console.log(insert2) + // insert.config.returning + }, [ctx?.db]) - const { mutate: insertData } = useDbMutation<[id: string, content: string, position: number]>({ - dbName: name, - query: sql`INSERT INTO test (id, content, position) VALUES (?, ?, ?) RETURNING id, content;`, - onSuccess: () => sync?.roundTrip(), - }) + // const { mutate: insertData } = useDbMutation<[id: string, content: string, position: number]>({ + // dbName: name, + // query: sql`INSERT INTO test (id, content, position) VALUES (?, ?, ?) RETURNING id, content;`, + // // onSuccess: () => sync?.roundTrip(), + // }) - const { mutate: dropData } = useDbMutation({ - dbName: name, - query: sql`DELETE FROM test;`, - onSuccess: () => sync?.roundTrip(), - }) + // const { mutate: dropData } = useDbMutation({ + // dbName: name, + // query: sql`DELETE FROM test;`, + // // onSuccess: () => sync?.roundTrip(), + // }) return ( <> @@ -69,7 +94,7 @@ function Content({ name }: { name: string }) { onSubmit={(event) => { event.preventDefault() const content = (event.currentTarget.content as HTMLInputElement).value - insertData([crypto.randomUUID(), content, 1]) + // insertData([crypto.randomUUID(), content, 1]) event.currentTarget.reset() }} > @@ -82,7 +107,10 @@ function Content({ name }: { name: string }) { autoComplete="off" /> - diff --git a/client/src/components/Hero/Hero.module.css b/client/src/components/Hero/Hero.module.css index 14b3adb..d622ec4 100644 --- a/client/src/components/Hero/Hero.module.css +++ b/client/src/components/Hero/Hero.module.css @@ -102,7 +102,7 @@ animation-range-start: exit 0%; animation-range-end: exit 80%; animation-fill-mode: both; - animation-timing-function: ease-in; + animation-timing-function: ease-in-out; &::before { content: ""; @@ -138,17 +138,18 @@ --falloff: 5deg; --light: 65%; } - 50% { + 60% { opacity: 0.2; --angle: 35deg; - --falloff: 35deg; - --light: 80%; + --falloff: 25deg; + --light: 75%; } + 100% { opacity: 0.1; - --angle: 5deg; - --falloff: 5deg; - --light: 65%; + --angle: 2deg; + --falloff: 2deg; + --light: 70%; } } @@ -207,12 +208,12 @@ scale: 0.9; filter: drop-shadow(0 0 5px rgb(0 0 0 / 0)) brightness(1); } - 70% { + 60% { scale: 1; filter: drop-shadow(0 100px 10px rgb(0 0 0 / 0.8)) brightness(1.2); } 100% { scale: 1; - filter: drop-shadow(0 170px 15px rgb(0 0 0 / 0)) brightness(0.9); + filter: drop-shadow(0 170px 20px rgb(0 0 0 / 0)) brightness(0.9); } } diff --git a/client/src/components/drizzle/Test.tsx b/client/src/components/drizzle/Test.tsx index ffb4b39..c487306 100644 --- a/client/src/components/drizzle/Test.tsx +++ b/client/src/components/drizzle/Test.tsx @@ -1,19 +1,18 @@ -import * as schema from "shared/drizzle-test/schema" -import { eq } from "drizzle-orm" +import { eq, type Query } from "drizzle-orm" import { useEffect } from "react" import initWasm from "@vlcn.io/crsqlite-wasm" import tblrx from "@vlcn.io/rx-tbl" -import { getMigrations } from "./getMigrations" import { useQuery, useQueryClient } from "@tanstack/react-query" import { migrate } from "drizzle-orm-crsqlite-wasm/migrator" -import { drizzle, type CRSQLiteDatabase } from "drizzle-orm-crsqlite-wasm" +import { drizzle, type CRSQLiteDatabase, type CRSQLiteSession } from "drizzle-orm-crsqlite-wasm" +import { migrations, schema } from "assets/drizzle-test" async function make() { const sqlite = await initWasm() - const sql = await sqlite.open("test") + const sql = await sqlite.open("foo") const db = drizzle(sql, { schema, logger: true }) - await migrate(db, { migrations: await getMigrations() }).catch(console.error) + await migrate(db, { migrations }).catch(console.error) const rx = tblrx(sql) return { db, rx } } @@ -55,82 +54,60 @@ function TestChild() { if (!data) return const db = data.ctx.db as CRSQLiteDatabase void (async function () { - let [usa] = await db - .select() - .from(schema.countries) - .where(eq(schema.countries.name, "USA")) - if (!usa) { - ;[usa] = await db - .insert(schema.countries) - .values({ - id: crypto.randomUUID(), - name: "USA", - population: 331_900_000, - }) - .returning() - } - let [nyc] = await db - .select() - .from(schema.cities) - .where(eq(schema.cities.name, "New York")) - console.log("::::::::::: nyc", nyc) - if (!nyc) { - ;[nyc] = await db - .insert(schema.cities) - .values({ - id: crypto.randomUUID(), - name: "New York", - population: 8_336_817, - countryId: usa!.id, - }) - .returning() - } - const res = db.query.countries - .findMany({ - with: { - cities: { - where: (city, { eq, sql }) => - eq(city.name, sql.placeholder("cityName")), - }, - }, - }) - .prepare() - - console.log(":::::::::::::: user-query", res) - await res - .all({ cityName: "New York" }) - .then((a) => console.log("DRIZZLE", a)) - .catch(console.error) - // @ts-expect-error -- the lib does not expose this method on the type level, but it does exist - await res.finalize() - console.log("--------------------------") - const foo = await db.transaction(async (tx) => { - // throw "rollback" - console.log("inside tx function") - const [usa] = await tx - .select({ - name: schema.countries.name, - pop: schema.countries.population, - }) - .from(schema.countries) - .where(eq(schema.countries.name, "USA")) - console.log("after tx select", usa) - const nyc = await tx.transaction(async (tx) => { - console.log("inside nested tx function") - const [nyc] = await tx - .select({ - name: schema.cities.name, - pop: schema.cities.population, - }) - .from(schema.cities) - .where(eq(schema.cities.name, "New York")) - tx.rollback() - return nyc - }) - return { usa, nyc } - }) - console.log("FOO", foo) + const foo = db.select().from(schema.countries).where(eq(schema.countries.name, "USA")) + console.log("foo", foo) + console.log(foo.toSQL().sql) + console.log(foo.toSQL().params) + const yo = useDrizzQuery( + db.select().from(schema.countries).where(eq(schema.countries.name, "USA")) + ) + await new Promise((resolve) => setTimeout(resolve, 1000)) + const prep = foo.prepare() + console.log("prep", prep) + await new Promise((resolve) => setTimeout(resolve, 1000)) + const data = await prep.all() + console.log("data", data) + await new Promise((resolve) => setTimeout(resolve, 1000)) })() }, [data]) return
Test
} + +const UNIQUE_KEY = "drizzle" + +function useDrizzQuery( + query: { + toSQL(): Query + prepare(): { + all(): Promise + finalize?: () => Promise + } + session?: CRSQLiteSession + }, + updateTypes = [18, 23, 9] +): T { + const q = query.toSQL() + + console.log("qqqqqqqqqq", query) + + const queryKey = [ + UNIQUE_KEY, + query.session!.client.db, + q.sql, + Object.fromEntries(updateTypes.map((t) => [t, true])), // as Record, + q.params, + ] //as DbQueryKey + + console.log("useDrizzQuery", queryKey) + return {} as T +} + +interface MinDrizzle { + toSql: () => { sql: string; params: any[] } + prepare(): { + all(): Promise + finalize(): Promise + } +} + +type Res = T extends MinDrizzle ? R : never diff --git a/client/src/components/drizzle/getMigrations.ts b/client/src/components/drizzle/getMigrations.ts deleted file mode 100644 index 8e64c58..0000000 --- a/client/src/components/drizzle/getMigrations.ts +++ /dev/null @@ -1,39 +0,0 @@ -import type { MigrationMeta } from "drizzle-orm/migrator" -import migrationJournal from "shared/drizzle-migrations/meta/_journal.json" -import { migrations } from "shared/drizzle-migrations/index" - -/** - * TODO: this should be done at build-time through Vite `define` config - */ -export async function getMigrations() { - const journal = migrationJournal as { - entries: Array<{ idx: number; when: number; tag: string; breakpoints: boolean }> - } - const migrationQueries: MigrationMeta[] = [] - for (const journalEntry of journal.entries) { - const query = migrations[journalEntry.tag as keyof typeof migrations] as string - const result = query.split("--> statement-breakpoint") - migrationQueries.push({ - sql: result, - bps: journalEntry.breakpoints, - folderMillis: journalEntry.when, - hash: await createSha256Hash(query), - }) - } - return migrationQueries -} - -/** - * Cross-platform implementation of node's - * ```ts - * crypto.createHash("sha256").update(query).digest("hex") - * ``` - */ -async function createSha256Hash(query: string) { - const encoder = new TextEncoder() - const data = encoder.encode(query) - const hash = await globalThis.crypto.subtle.digest("SHA-256", data) - const hashArray = Array.from(new Uint8Array(hash)) - const hashHex = hashArray.map((b) => b.toString(16).padStart(2, "0")).join("") - return hashHex -} diff --git a/client/src/db/DbProvider.tsx b/client/src/db/DbProvider.tsx index f0625e9..b4f2057 100644 --- a/client/src/db/DbProvider.tsx +++ b/client/src/db/DbProvider.tsx @@ -3,18 +3,21 @@ import { useCacheManager } from "client/db/useDbQuery" import { useQuery, useQueryClient } from "@tanstack/react-query" import initWasm, { type DB } from "@vlcn.io/crsqlite-wasm" import tblrx, { type TblRx } from "@vlcn.io/rx-tbl" +import { drizzle, type CRSQLiteDatabase } from "drizzle-orm-crsqlite-wasm" +import { migrate } from "drizzle-orm-crsqlite-wasm/migrator" +import type { MigrationMeta } from "drizzle-orm/migrator" const DB_KEY = "__sqlite__db_context__" -export type Ctx = { - readonly db: DB +export type Ctx = Record> = { + readonly client: DB readonly rx: TblRx + readonly db: CRSQLiteDatabase } -type DbStore = { - schema: string - schemaName: string - db: Ctx +type DbStore = Record> = { + schema: TSchema + db: Ctx name: string } @@ -28,20 +31,25 @@ declare global { } } -async function makeDb(name: string, schema: string, schemaName: string): Promise { +async function makeDb( + name: string, + schema: Record, + migrations: MigrationMeta[] +): Promise { return navigator.locks.request("db-init", { mode: "exclusive" }, async () => { const sqlite = await initWasm() - const db = await sqlite.open(name) - await db.automigrateTo(schemaName, schema) - const rx = tblrx(db) - return { db, rx } + const client = await sqlite.open(name) + const db = drizzle(client, { schema, logger: true }) + await migrate(db, { migrations }).catch(console.error) + const rx = tblrx(client) + return { client, rx, db } }) } -async function destroyDb({ db, rx }: Ctx): Promise { +async function destroyDb({ client, rx }: Ctx): Promise { return navigator.locks.request("db-init", { mode: "exclusive" }, async () => { rx.dispose() - await db.close() + await client.close() }) } @@ -52,15 +60,18 @@ async function destroyDb({ db, rx }: Ctx): Promise { * @param schema SQL schema to create the database * @param schemaName Global unique name for the schema, used to identify the schema on the server */ -export function useDbProvider(name: string | undefined, schema: string, schemaName: string) { +export function useDbProvider( + name: string | undefined, + schema: Record, + migrations: MigrationMeta[] +) { const client = useQueryClient() useEffect(() => { if (!name) return let closed = false - const cleanSchema = schema.replace(/[\s\n\t]+/g, " ").trim() - const key = [DB_KEY, name] - const existing = client.getQueryData(key) + const keyByName = [DB_KEY, name] + const existing = client.getQueryData(keyByName) if (existing) { const e = new Error( `\`useDbProvider\` called multiple times with the same DB name "${name}"` @@ -68,15 +79,13 @@ export function useDbProvider(name: string | undefined, schema: string, schemaNa console.error(e) throw e } - makeDb(name, cleanSchema, schemaName) + makeDb(name, schema, migrations) .then((db) => { if (closed) return - client.setQueryData(key, { - schema: cleanSchema, - schemaName, - name, - db, - }) + const keyById = [DB_KEY, db.client.db] + const stored = { schema, name, db } + client.setQueryData(keyByName, stored) + client.setQueryData(keyById, stored) // do we need the "by id" entry in the end? }) .catch((e) => { console.error("Error creating db", e) @@ -84,13 +93,15 @@ export function useDbProvider(name: string | undefined, schema: string, schemaNa }) return () => { closed = true - const db = client.getQueryData(key)?.db - if (db) { - void destroyDb(db) - client.removeQueries({ queryKey: key, exact: true }) + const existing = client.getQueryData(keyByName) + if (existing) { + const keyById = [DB_KEY, existing.db.client.db] + client.removeQueries({ queryKey: keyByName, exact: true }) + void destroyDb(existing.db) + client.removeQueries({ queryKey: keyById, exact: true }) // do we need the "by id" entry in the end? } } - }, [name, schema, schemaName]) + }, [name, schema]) useCacheManager(name) } @@ -99,8 +110,10 @@ export function useDbProvider(name: string | undefined, schema: string, schemaNa * Call this hook to retrieve a database from the cache * @param name Local unique name for the database, used to identify the database in the cache */ -export function useDb(name?: string): Ctx | undefined { - const { data } = useQuery({ +export function useDb = Record>( + name?: string +): Ctx | undefined { + const { data } = useQuery, unknown, Ctx>({ enabled: Boolean(name), queryKey: [DB_KEY, name], gcTime: Infinity, diff --git a/client/src/db/useDbQuery.test.ts b/client/src/db/useDbQuery.test.ts index 68e3853..2cc5cf2 100644 --- a/client/src/db/useDbQuery.test.ts +++ b/client/src/db/useDbQuery.test.ts @@ -1,4 +1,4 @@ -import { afterAll, beforeAll, describe, expect, test, vi } from "vitest" +import { afterAll, beforeAll, describe, expect, test, vi, beforeEach } from "vitest" import { QueryClient, QueryObserver, type QueryCache } from "@tanstack/react-query" import { UNIQUE_KEY, start, type DbQueryKey } from "client/db/useDbQuery" import type { Ctx } from "client/db/DbProvider" @@ -22,15 +22,15 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = cache = client.getQueryCache() unsubscribeCache = cache.subscribe((event) => { const key = event.query.queryKey as DbQueryKey - let label = key[4][0] + " > " + event.type + let label = key[3][0] + " > " + event.type if (event.type === "updated") { label += "::" + event.action.type } events.push(label) }) const ctx = { - db: { - filename: "foo", + client: { + db: 1, tablesUsedStmt: { all: () => [["foo_table"]] }, prepare: () => Promise.resolve({ finalize: () => {} }), }, @@ -39,7 +39,7 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = }, } - stop = start("foo", ctx as unknown as Ctx, client) + stop = start(1, ctx as unknown as Ctx, client) }) afterAll(() => { @@ -47,14 +47,18 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = stop() }) + beforeEach(() => { + events.length = 0 + }) + test("Mount 1st query", async () => { const observer = new QueryObserver(client, { queryKey: [ UNIQUE_KEY, - "foo", + 1, "SELECT * FROM foo", - { 18: true, 23: true, 9: true }, ["first"], + { 18: true, 23: true, 9: true }, ], queryFn: () => "data", staleTime: 0, @@ -63,7 +67,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = expect(events).toMatchInlineSnapshot(` [ "first > added", - "first > observerOptionsUpdated", "first > observerResultsUpdated", "first > observerAdded", "first > observerResultsUpdated", @@ -83,17 +86,16 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "first > updated::success", ] `) - events.length = 0 }) test("Mount 2nd query with a matching key (same DB, same SQL)", async () => { const observer = new QueryObserver(client, { queryKey: [ UNIQUE_KEY, - "foo", + 1, "SELECT * FROM foo", - { 18: true, 23: true, 90: true }, ["second"], + { 18: true, 23: true, 90: true }, ], queryFn: () => "data", staleTime: 0, @@ -102,7 +104,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = expect(events).toMatchInlineSnapshot(` [ "second > added", - "second > observerOptionsUpdated", "second > observerResultsUpdated", "second > observerAdded", "second > observerResultsUpdated", @@ -119,7 +120,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "second > updated::success", ] `) - events.length = 0 }) test("Simulate a 'live query' triggering an update on a table used by those 2 queries", async () => { @@ -130,9 +130,9 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = expect(events).toMatchInlineSnapshot(` [ "first > updated::invalidate", - "second > updated::invalidate", "first > observerResultsUpdated", "first > updated::fetch", + "second > updated::invalidate", "second > observerResultsUpdated", "second > updated::fetch", "first > observerResultsUpdated", @@ -141,7 +141,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "second > updated::success", ] `) - events.length = 0 }) test("Simulate a 'live query' triggering an update on a table used by only 1 query", async () => { @@ -158,7 +157,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "first > updated::success", ] `) - events.length = 0 }) test("Unmount 2nd query", async () => { @@ -171,7 +169,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "second > observerRemoved", ] `) - events.length = 0 }) test("Unmount 1st query", async () => { @@ -184,7 +181,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "first > observerRemoved", ] `) - events.length = 0 await new Promise(nextTick) expect(onRange).toHaveBeenCalledTimes(1) @@ -194,10 +190,10 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = const unsubScribeObserver = new QueryObserver(client, { queryKey: [ UNIQUE_KEY, - "foo", + 1, "SELECT * FROM foo", - { 18: true, 23: true, 9: true }, ["third"], + { 18: true, 23: true, 9: true }, ], queryFn: () => "data", staleTime: 0, @@ -206,7 +202,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = expect(events).toMatchInlineSnapshot(` [ "third > added", - "third > observerOptionsUpdated", "third > observerResultsUpdated", "third > observerAdded", "third > observerResultsUpdated", @@ -234,7 +229,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "third > observerRemoved", ] `) - events.length = 0 expect(onRange).toHaveBeenCalledTimes(1) }) @@ -252,7 +246,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = "third > updated::invalidate", ] `) - events.length = 0 expect(onRange).toHaveBeenCalledTimes(1) }) @@ -261,10 +254,10 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = const unsubScribeObserver = new QueryObserver(client, { queryKey: [ UNIQUE_KEY, - "foo", + 1, "SELECT * FROM foo", - { 18: true, 23: true, 9: true }, ["fourth"], + { 18: true, 23: true, 9: true }, ], queryFn: () => "data", staleTime: 0, @@ -273,7 +266,6 @@ describe.sequential("'start' listening to QueryCache for live SQL queries", () = expect(events).toMatchInlineSnapshot(` [ "fourth > added", - "fourth > observerOptionsUpdated", "fourth > observerResultsUpdated", "fourth > observerAdded", "fourth > observerResultsUpdated", diff --git a/client/src/db/useDbQuery.tsx b/client/src/db/useDbQuery.tsx index a2961aa..81b4369 100644 --- a/client/src/db/useDbQuery.tsx +++ b/client/src/db/useDbQuery.tsx @@ -6,12 +6,14 @@ import { type QueryCache, } from "@tanstack/react-query" import { useDb, type Ctx } from "client/db/DbProvider" +import type { Query } from "drizzle-orm" +import type { CRSQLitePreparedQuery, CRSQLiteSession } from "drizzle-orm-crsqlite-wasm" +import type { SQLitePreparedQuery } from "drizzle-orm/sqlite-core" import { useLayoutEffect } from "react" export const UNIQUE_KEY = "__vlcn__cache_manager__" -type DB = Ctx["db"] -type StmtAsync = Awaited> +type DB = Ctx["client"] type UpdateType = /** INSERT */ @@ -23,23 +25,18 @@ type UpdateType = const ALL_UPDATES = [18, 23, 9] as const +type Binding = string | number | null | undefined + export type DbQueryKey = readonly [ typeof UNIQUE_KEY, - dbName: string, + dbName: number, sql: string, + bindings: readonly Binding[], updateTypes: Record, - bindings: readonly string[], ] -/** - * Not really useful, this is just to increase the cache hit rate. - */ -function sqlToKey(sql: string) { - return sql.replace(/\s+/g, " ") -} - type QueryEntry = { - dbName: string + dbName: number /** how many react-query cache entries match this key */ count: number /** how many react-query cache entries match this key and are actively being used */ @@ -49,7 +46,7 @@ type QueryEntry = { * This is stored as a promise to avoid race condition when multiple queries (≠ queryKey, but same SQL) * are mounted at the same time, and would thus try to prepare the same statement. */ - statement: Promise | null + statement: CRSQLitePreparedQuery | null /** * Array<`dbName, table`> * The result of querying for tables used by the SQL. @@ -64,7 +61,7 @@ type QueryEntry = { } const queryStore = new Map< - /** dbName, sql */ + /** dbName, sql, bindings */ string, QueryEntry >() @@ -73,7 +70,7 @@ const tableStore = new Map< /** dbName, table */ string, { - dbName: string + dbName: number queries: Map< /** dbName, sql */ string, @@ -93,9 +90,10 @@ function cleanupQuery({ }: { q: QueryEntry cacheManager: QueryCache - queryKey: readonly [dbName: string, sql: string] + queryKey: readonly [dbName: number, sql: string, bindings: Binding[]] + /** dbName, sql, bindings */ hash: string - dbName: string + dbName: number }) { // make sure no other queryKey is using that same SQL query and is still considered fresh const filterKey = [UNIQUE_KEY, ...queryKey] as const @@ -112,7 +110,6 @@ function cleanupQuery({ console.log("cleanup query, finalizing statement", hash) queryStore.delete(hash) - q.statement?.then((s) => s.finalize(null), console.error) q.statement = null // stop listening to table changes @@ -147,15 +144,21 @@ function cleanupQuery({ q.tables = null } -export function start(dbName: string, ctx: Ctx, client: QueryClient) { +export function start(dbName: number, ctx: Ctx, client: QueryClient) { console.log("~~~ start cache manager ~~~", dbName) const cacheManager = client.getQueryCache() const unsubscribe = cacheManager.subscribe((event) => { const k = event.query.queryKey as readonly unknown[] if (k[0] !== UNIQUE_KEY) return + if (k[1] !== dbName) return const eventQueryKey = k as DbQueryKey - const queryKey = [eventQueryKey[1], eventQueryKey[2]] as [dbName: string, sql: string] + const queryKey = [eventQueryKey[1], eventQueryKey[2], eventQueryKey[3]] as [ + dbName: number, + sql: string, + bindings: Binding[], + ] + /** dbName, sql, bindings */ const hash = hashKey(queryKey) /** @@ -194,13 +197,10 @@ export function start(dbName: string, ctx: Ctx, client: QueryClient) { } queryStore.set(hash, q) } - if (!q.statement) { - q.statement = ctx.db.prepare(eventQueryKey[2]) - } if (q.activeCount !== 1) return if (q.listening) return q.listening = true - getUsedTables(ctx.db, queryKey[1], (tables) => { + getUsedTables(ctx.client, queryKey[1], (tables) => { if (!q.listening) return q.tables = tables for (const table of tables) { @@ -318,18 +318,17 @@ export function start(dbName: string, ctx: Ctx, client: QueryClient) { return () => { unsubscribe() - tableStore.forEach((t) => { + for (const [key, t] of tableStore.entries()) { if (t.dbName === dbName) { t.unsubscribe() - tableStore.delete(t.dbName) + tableStore.delete(key) } - }) - queryStore.forEach((q) => { + } + for (const [key, q] of queryStore.entries()) { if (q.dbName === dbName) { - q.statement?.then((s) => s.finalize(null), console.error) - queryStore.delete(q.dbName) + queryStore.delete(key) } - }) + } } } @@ -346,90 +345,69 @@ export function useCacheManager(dbName?: string) { const client = useQueryClient() const ctx = useDb(dbName) - // only in dev useLayoutEffect(() => { if (!ctx || !dbName) return - start(dbName, ctx, client) + start(ctx.client.db, ctx, client) }, [dbName, ctx, client]) } -let queryId = 0 - export function useDbQuery< TQueryFnData = unknown, // TError = DefaultError, // TODO TData = TQueryFnData[], ->({ - dbName, - query, - select, - bindings = [], - updateTypes = ALL_UPDATES, - enabled = true, -}: { - dbName: string - query: string - select?: (data: TQueryFnData[]) => TData - bindings?: readonly string[] - updateTypes?: readonly UpdateType[] - enabled?: boolean -}) { - const ctx = useDb(dbName) +>( + query: + | { + toSQL(): Query + prepare(): SQLitePreparedQuery<{ + all: TQueryFnData[] + type: "async" + run: void + get: any + values: any + execute: any + }> + session?: CRSQLiteSession + } + | undefined, + { + select, + updateTypes = ALL_UPDATES, + enabled = true, + }: { + select?: (data: TQueryFnData[]) => TData + updateTypes?: readonly UpdateType[] + enabled?: boolean + } = {} +) { + const sqlParams = query?.toSQL() const queryKey = [ UNIQUE_KEY, - dbName, - sqlToKey(query), + //@ts-expect-error -- these are exposed by `drizzle-orm-crsqlite-wasm` but not at the type level + query?.session.client.db, + sqlParams?.sql, + sqlParams?.params, Object.fromEntries(updateTypes.map((t) => [t, true])) as Record, - bindings, ] as DbQueryKey return useQuery({ - enabled: Boolean(ctx?.db && enabled), + enabled: Boolean(enabled && query), queryKey, - queryFn: async ({ signal }) => { + queryFn: async () => { console.debug("::::::queryFn") - const partialKey = [queryKey[1], queryKey[2]] as const + const partialKey = [queryKey[1], queryKey[2], queryKey[3]] as const const key = hashKey(partialKey) - const q = queryStore.get(key) + console.log("query", key, q) if (!q) { throw new Error("Query not in store when trying to execute queryFn") } if (!q.statement) { - throw new Error("Query statement did not exist when trying to execute queryFn") - } - const statement = await q.statement - if (signal.aborted) return Promise.reject(new Error("Request aborted")) - - statement.bind(bindings) - const [releaser, transaction] = await ctx!.db.imperativeTx() - // eslint-disable-next-line @typescript-eslint/no-unnecessary-condition -- could have changed since last check because of the `await` - if (signal.aborted) { - releaser() - return Promise.reject(new Error("Request aborted")) - } - if (!(q.statement as Promise | null)) { - releaser() - throw new Error("Query statement was finalized before being executed") - } - const transactionId = queryId++ - transaction.exec(/*sql*/ `SAVEPOINT use_query_${transactionId};`).catch((e) => { - throw new Error("useQuery transaction failed before SAVEPOINT", { cause: e }) - }) - statement.raw(false) - try { - const data = (await statement.all(transaction)) as TQueryFnData[] - transaction - .exec(/*sql*/ `RELEASE use_query_${transactionId};`) - .then(releaser, releaser) - return data - } catch (e) { - transaction - .exec(/*sql*/ `ROLLBACK TO use_query_${transactionId};`) - .then(releaser, releaser) - throw e + q.statement = query!.prepare() as unknown as CRSQLitePreparedQuery } + console.log("executing query", key) + return q.statement.all() as Promise }, select, refetchOnReconnect: false, // local db, never disconnected @@ -445,7 +423,7 @@ export function useDbQuery< /** leaky cache, seems ok though */ const usedTableCache = new Map() async function getUsedTables(db: DB, query: string, callback: (tables: string[]) => void) { - const cacheKey = hashKey([db.filename, query]) + const cacheKey = hashKey([db.db, query]) const cached = usedTableCache.get(cacheKey) if (cached) return callback(cached) const sanitized = query.replaceAll("'", "''") diff --git a/client/tsconfig.app.json b/client/tsconfig.app.json index e03451d..df04877 100644 --- a/client/tsconfig.app.json +++ b/client/tsconfig.app.json @@ -14,6 +14,7 @@ "types/*.d.ts", "../types/*.d.ts", "../shared/src/**/*.ts", + "../assets/src/**/*.ts", "../server/src/api/**/*.ts" ] } diff --git a/client/vite.config.ts b/client/vite.config.ts index 2ff195d..bf87d35 100644 --- a/client/vite.config.ts +++ b/client/vite.config.ts @@ -220,6 +220,8 @@ export default defineConfig({ "client/": `${normalizePath(__dirname)}/src/`, // allow imports from "server" to resolve to the server folder, despite tsconfig aliases "server/": `${normalizePath(__dirname)}/../server/src/`, + // allow imports from "assets" to resolve to the assets folder, despite tsconfig aliases + "assets/": `${normalizePath(__dirname)}/../assets/src/`, }, }, server: { diff --git a/drizzle.config.ts b/drizzle.config.ts deleted file mode 100644 index 1a9f0d4..0000000 --- a/drizzle.config.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { defineConfig } from "drizzle-kit" - -export default defineConfig({ - schema: "./shared/src/drizzle-test/schema.ts", - driver: "better-sqlite", - out: "./shared/src/drizzle-migrations", - verbose: true, - strict: true, -}) diff --git a/package.json b/package.json index faa92f6..89593d3 100644 --- a/package.json +++ b/package.json @@ -32,61 +32,61 @@ "root:format:fix": "prettier --write '*.ts' '*.json' 'types/*' '.github/**/*' --config .prettierrc.json --log-level warn", "root:spell": "cspell --config .cspell.json --quiet --gitignore '*' 'types/*' '.github/**/*'", "root:clear": "rm -rf dist; rm -rf node_modules; rm -rf .turbo; find . -name '*.tsbuildinfo' -type f -delete;", - "generate": "drizzle-kit generate:sqlite" + "generate:drizzle-test": "drizzle-kit generate:sqlite --config=assets/src/drizzle-test/drizzle.config.ts" }, "dependencies": { "@fastify/cookie": "^9.3.1", "@fastify/session": "^10.7.0", - "@fastify/static": "7.0.1", - "@tanstack/react-query": "^5.25.0", - "@tanstack/react-query-devtools": "^5.25.0", + "@fastify/static": "7.0.3", + "@tanstack/react-query": "^5.29.0", + "@tanstack/react-query-devtools": "^5.29.0", "@vlcn.io/crsqlite": "0.16.3", "@vlcn.io/crsqlite-wasm": "0.16.0", "@vlcn.io/rx-tbl": "0.15.0", "@vlcn.io/ws-common": "0.2.0", - "better-sqlite3": "^9.4.3", + "better-sqlite3": "^9.4.5", "clsx": "^2.1.0", "dotenv": "^16.4.5", "drizzle-orm": "^0.30.6", - "drizzle-orm-crsqlite-wasm": "0.0.3", + "drizzle-orm-crsqlite-wasm": "file:../../drizzle-orm-crsqlite-wasm", "fastify": "^4.26.2", "grant": "^5.4.22", - "pino-pretty": "10.3.1", + "pino-pretty": "11.0.0", "react": "^18.2.0", "react-dom": "^18.2.0", "valibot": "0.30.0", "web-push": "^3.6.7" }, "devDependencies": { - "@fastify/http-proxy": "^9.4.0", + "@fastify/http-proxy": "^9.5.0", "@total-typescript/ts-reset": "0.5.1", "@types/better-sqlite3": "^7.6.9", - "@types/node": "20.11.25", - "@types/react": "18.2.64", - "@types/react-dom": "18.2.21", + "@types/node": "20.12.5", + "@types/react": "18.2.74", + "@types/react-dom": "18.2.24", "@types/web-push": "^3.6.3", - "@typescript-eslint/eslint-plugin": "^7.1.1", - "@typescript-eslint/parser": "^7.1.1", + "@typescript-eslint/eslint-plugin": "^7.5.0", + "@typescript-eslint/parser": "^7.5.0", "@vitejs/plugin-react-swc": "3.6.0", - "@vitest/web-worker": "^1.3.1", + "@vitest/web-worker": "^1.4.0", "chalk": "^5.3.0", "chokidar": "3.6.0", - "cspell": "^8.6.0", + "cspell": "^8.6.1", "drizzle-kit": "^0.20.14", - "esbuild": "0.20.1", + "esbuild": "0.20.2", "eslint": "^8.57.0", "eslint-config-prettier": "^9.1.0", - "eslint-plugin-react-refresh": "^0.4.5", - "json-schema-to-ts": "3.0.0", - "knip": "^5.0.3", + "eslint-plugin-react-refresh": "^0.4.6", + "json-schema-to-ts": "3.0.1", + "knip": "^5.8.0", "prettier": "^3.2.5", "rollup-plugin-visualizer": "5.12.0", - "tsx": "4.7.1", - "turbo": "1.12.5", + "tsx": "4.7.2", + "turbo": "1.13.2", "typed-css-modules": "^0.9.1", - "typescript": "^5.4.2", - "vite": "5.1.5", - "vitest": "^1.3.1", + "typescript": "^5.4.4", + "vite": "5.2.8", + "vitest": "^1.4.0", "vitest-github-actions-reporter": "^0.11.1" }, "engines": { diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 654adcf..e02b218 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -15,14 +15,14 @@ importers: specifier: ^10.7.0 version: 10.7.0 '@fastify/static': - specifier: 7.0.1 - version: 7.0.1 + specifier: 7.0.3 + version: 7.0.3 '@tanstack/react-query': - specifier: ^5.25.0 - version: 5.25.0(react@18.2.0) + specifier: ^5.29.0 + version: 5.29.0(react@18.2.0) '@tanstack/react-query-devtools': - specifier: ^5.25.0 - version: 5.25.0(@tanstack/react-query@5.25.0)(react@18.2.0) + specifier: ^5.29.0 + version: 5.29.0(@tanstack/react-query@5.29.0)(react@18.2.0) '@vlcn.io/crsqlite': specifier: 0.16.3 version: 0.16.3 @@ -36,8 +36,8 @@ importers: specifier: 0.2.0 version: 0.2.0 better-sqlite3: - specifier: ^9.4.3 - version: 9.4.3 + specifier: ^9.4.5 + version: 9.4.5 clsx: specifier: ^2.1.0 version: 2.1.0 @@ -46,10 +46,10 @@ importers: version: 16.4.5 drizzle-orm: specifier: ^0.30.6 - version: 0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.64)(better-sqlite3@9.4.3)(react@18.2.0) + version: 0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.74)(better-sqlite3@9.4.5)(react@18.2.0) drizzle-orm-crsqlite-wasm: - specifier: 0.0.3 - version: 0.0.3(@vlcn.io/xplat-api@0.15.0)(drizzle-orm@0.30.6) + specifier: file:../../drizzle-orm-crsqlite-wasm + version: file:../../drizzle-orm-crsqlite-wasm(@vlcn.io/xplat-api@0.15.0)(drizzle-orm@0.30.6) fastify: specifier: ^4.26.2 version: 4.26.2 @@ -57,8 +57,8 @@ importers: specifier: ^5.4.22 version: 5.4.22 pino-pretty: - specifier: 10.3.1 - version: 10.3.1 + specifier: 11.0.0 + version: 11.0.0 react: specifier: ^18.2.0 version: 18.2.0 @@ -73,8 +73,8 @@ importers: version: 3.6.7 devDependencies: '@fastify/http-proxy': - specifier: ^9.4.0 - version: 9.4.0 + specifier: ^9.5.0 + version: 9.5.0 '@total-typescript/ts-reset': specifier: 0.5.1 version: 0.5.1 @@ -82,29 +82,29 @@ importers: specifier: ^7.6.9 version: 7.6.9 '@types/node': - specifier: 20.11.25 - version: 20.11.25 + specifier: 20.12.5 + version: 20.12.5 '@types/react': - specifier: 18.2.64 - version: 18.2.64 + specifier: 18.2.74 + version: 18.2.74 '@types/react-dom': - specifier: 18.2.21 - version: 18.2.21 + specifier: 18.2.24 + version: 18.2.24 '@types/web-push': specifier: ^3.6.3 version: 3.6.3 '@typescript-eslint/eslint-plugin': - specifier: ^7.1.1 - version: 7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2) + specifier: ^7.5.0 + version: 7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4) '@typescript-eslint/parser': - specifier: ^7.1.1 - version: 7.1.1(eslint@8.57.0)(typescript@5.4.2) + specifier: ^7.5.0 + version: 7.5.0(eslint@8.57.0)(typescript@5.4.4) '@vitejs/plugin-react-swc': specifier: 3.6.0 - version: 3.6.0(vite@5.1.5) + version: 3.6.0(vite@5.2.8) '@vitest/web-worker': - specifier: ^1.3.1 - version: 1.3.1(vitest@1.3.1) + specifier: ^1.4.0 + version: 1.4.0(vitest@1.4.0) chalk: specifier: ^5.3.0 version: 5.3.0 @@ -112,14 +112,14 @@ importers: specifier: 3.6.0 version: 3.6.0 cspell: - specifier: ^8.6.0 - version: 8.6.0 + specifier: ^8.6.1 + version: 8.6.1 drizzle-kit: specifier: ^0.20.14 version: 0.20.14 esbuild: - specifier: 0.20.1 - version: 0.20.1 + specifier: 0.20.2 + version: 0.20.2 eslint: specifier: ^8.57.0 version: 8.57.0 @@ -127,14 +127,14 @@ importers: specifier: ^9.1.0 version: 9.1.0(eslint@8.57.0) eslint-plugin-react-refresh: - specifier: ^0.4.5 - version: 0.4.5(eslint@8.57.0) + specifier: ^0.4.6 + version: 0.4.6(eslint@8.57.0) json-schema-to-ts: - specifier: 3.0.0 - version: 3.0.0 + specifier: 3.0.1 + version: 3.0.1 knip: - specifier: ^5.0.3 - version: 5.0.3(@types/node@20.11.25)(typescript@5.4.2) + specifier: ^5.8.0 + version: 5.8.0(@types/node@20.12.5)(typescript@5.4.4) prettier: specifier: ^3.2.5 version: 3.2.5 @@ -142,26 +142,26 @@ importers: specifier: 5.12.0 version: 5.12.0 tsx: - specifier: 4.7.1 - version: 4.7.1 + specifier: 4.7.2 + version: 4.7.2 turbo: - specifier: 1.12.5 - version: 1.12.5 + specifier: 1.13.2 + version: 1.13.2 typed-css-modules: specifier: ^0.9.1 version: 0.9.1 typescript: - specifier: ^5.4.2 - version: 5.4.2 + specifier: ^5.4.4 + version: 5.4.4 vite: - specifier: 5.1.5 - version: 5.1.5(@types/node@20.11.25) + specifier: 5.2.8 + version: 5.2.8(@types/node@20.12.5) vitest: - specifier: ^1.3.1 - version: 1.3.1(@types/node@20.11.25) + specifier: ^1.4.0 + version: 1.4.0(@types/node@20.12.5) vitest-github-actions-reporter: specifier: ^0.11.1 - version: 0.11.1(vitest@1.3.1) + version: 0.11.1(vitest@1.4.0) assets: devDependencies: @@ -272,8 +272,8 @@ packages: regenerator-runtime: 0.14.1 dev: true - /@cspell/cspell-bundled-dicts@8.6.0: - resolution: {integrity: sha512-hRVvir4G4276Kz/Cru34AJg1FObIw5MrzezAwHkD3obNMwZkof8aX3MEN6AzWusJSVG2ZxZxZAEnYbgqvGr2Fg==} + /@cspell/cspell-bundled-dicts@8.6.1: + resolution: {integrity: sha512-s6Av1xIgctYLuUiazKZjQ2WRUXc9dU38BOZXwM/lb7y8grQMEuTjST1c+8MOkZkppx48/sO7GHIF3k9rEzD3fg==} engines: {node: '>=18'} dependencies: '@cspell/dict-ada': 4.0.2 @@ -303,6 +303,7 @@ packages: '@cspell/dict-html': 4.0.5 '@cspell/dict-html-symbol-entities': 4.0.0 '@cspell/dict-java': 5.0.6 + '@cspell/dict-julia': 1.0.1 '@cspell/dict-k8s': 1.0.2 '@cspell/dict-latex': 4.0.0 '@cspell/dict-lorem-ipsum': 4.0.0 @@ -322,36 +323,37 @@ packages: '@cspell/dict-sql': 2.1.3 '@cspell/dict-svelte': 1.0.2 '@cspell/dict-swift': 2.0.1 + '@cspell/dict-terraform': 1.0.0 '@cspell/dict-typescript': 3.1.2 '@cspell/dict-vue': 3.0.0 dev: true - /@cspell/cspell-json-reporter@8.6.0: - resolution: {integrity: sha512-fPpE4a3zpdfwgTyfLgCmxZn4owkZ4IP6A/oL4XLW22IxW5xBIbXEveOSY+uiWAnVfEnqfrMNRLAGj7JoXnJ1Vg==} + /@cspell/cspell-json-reporter@8.6.1: + resolution: {integrity: sha512-75cmJgU9iQgrDnLFIUyvgybySJJi29BPw71z+8ZO9WhNofufxoSjaWepZeYV2nK0nHXM+MbdQG5Mmj/Lv6J1FA==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-types': 8.6.0 + '@cspell/cspell-types': 8.6.1 dev: true - /@cspell/cspell-pipe@8.6.0: - resolution: {integrity: sha512-gbAZksz38OHaN8s4fOmmgtgQfie1K8dRGlo9z/uxSx5FIELV48GWTbHn9t1TY2yBXBwJ7+4NF2+r624rtlPoHQ==} + /@cspell/cspell-pipe@8.6.1: + resolution: {integrity: sha512-guIlGhhOLQwfqevBSgp26b+SX4I1hCH+puAksWAk93bybKkcGtGpcavAQSN9qvamox4zcHnvGutEPF+UcXuceQ==} engines: {node: '>=18'} dev: true - /@cspell/cspell-resolver@8.6.0: - resolution: {integrity: sha512-ARwO6TWKy8fLHNhC/ls5Wo/AK86E1oLVChwWtHdq7eVyEUIykQaXGLqoRThkIT2jyLfGDrhSvaU+yqcXVLE48Q==} + /@cspell/cspell-resolver@8.6.1: + resolution: {integrity: sha512-ZUbYcvEhfokHG9qfUlIylUqEobG84PiDozCkE8U4h/rTSmYkf/nAD+M6yg+jQ0F2aTFGNbvpKKGFlfXFXveX7A==} engines: {node: '>=18'} dependencies: global-directory: 4.0.1 dev: true - /@cspell/cspell-service-bus@8.6.0: - resolution: {integrity: sha512-veCGlhlNGmYMgzX/rMiDp8j7ndLxFHIZq3h6DNlIsIoSjP1v5Rk6UcCwEoWYexwKmNXo7c2VooB0GM9LSBcPAQ==} + /@cspell/cspell-service-bus@8.6.1: + resolution: {integrity: sha512-WpI3fSW8t00UMetfd6tS8f9+xE3+ElIUO/bQ1YKK95TMIRdEUcH+QDxcHM66pJXEm4WiaN3H/MfWk1fIhGlJ8g==} engines: {node: '>=18'} dev: true - /@cspell/cspell-types@8.6.0: - resolution: {integrity: sha512-+CU/nuFOpswJAA3IS2TcKGskfM/o/4aNG1IMUVaOEQi1Sc5qZQ4Wj1qDIWJArSHFYW1Q4XFa4U8K1jnVHkAhZQ==} + /@cspell/cspell-types@8.6.1: + resolution: {integrity: sha512-MXa9v6sXbbwyiNno7v7vczNph6AsMNWnpMRCcW3h/siXNQYRuMssdxqT5sQJ8Kurh3M/Wo7DlKX4n74elKL3iQ==} engines: {node: '>=18'} dev: true @@ -467,6 +469,10 @@ packages: resolution: {integrity: sha512-kdE4AHHHrixyZ5p6zyms1SLoYpaJarPxrz8Tveo6gddszBVVwIUZ+JkQE1bWNLK740GWzIXdkznpUfw1hP9nXw==} dev: true + /@cspell/dict-julia@1.0.1: + resolution: {integrity: sha512-4JsCLCRhhLMLiaHpmR7zHFjj1qOauzDI5ZzCNQS31TUMfsOo26jAKDfo0jljFAKgw5M2fEG7sKr8IlPpQAYrmQ==} + dev: true + /@cspell/dict-k8s@1.0.2: resolution: {integrity: sha512-tLT7gZpNPnGa+IIFvK9SP1LrSpPpJ94a/DulzAPOb1Q2UBFwdpFd82UWhio0RNShduvKG/WiMZf/wGl98pn+VQ==} dev: true @@ -545,6 +551,10 @@ packages: resolution: {integrity: sha512-gxrCMUOndOk7xZFmXNtkCEeroZRnS2VbeaIPiymGRHj5H+qfTAzAKxtv7jJbVA3YYvEzWcVE2oKDP4wcbhIERw==} dev: true + /@cspell/dict-terraform@1.0.0: + resolution: {integrity: sha512-Ak+vy4HP/bOgzf06BAMC30+ZvL9mzv21xLM2XtfnBLTDJGdxlk/nK0U6QT8VfFLqJ0ZZSpyOxGsUebWDCTr/zQ==} + dev: true + /@cspell/dict-typescript@3.1.2: resolution: {integrity: sha512-lcNOYWjLUvDZdLa0UMNd/LwfVdxhE9rKA+agZBGjL3lTA3uNvH7IUqSJM/IXhJoBpLLMVEOk8v1N9xi+vDuCdA==} dev: true @@ -553,15 +563,15 @@ packages: resolution: {integrity: sha512-niiEMPWPV9IeRBRzZ0TBZmNnkK3olkOPYxC1Ny2AX4TGlYRajcW0WUtoSHmvvjZNfWLSg2L6ruiBeuPSbjnG6A==} dev: true - /@cspell/dynamic-import@8.6.0: - resolution: {integrity: sha512-yDJZ/uXCpZcAkXwaWa0JcCZHZFxnF3qtiFiq2WG5cEw8tiJiNdawjSCd8/D35dT3QFNaInMP+H3sOf68dNueew==} + /@cspell/dynamic-import@8.6.1: + resolution: {integrity: sha512-Fjvkcb5umIAcHfw/iiciYWgO2mXVuRZzQAWPSub6UFCxxcJlRz39YPXa+3O/m3lnXCeo8ChoaEN8qnuV4ogk6g==} engines: {node: '>=18.0'} dependencies: import-meta-resolve: 4.0.0 dev: true - /@cspell/strong-weak-map@8.6.0: - resolution: {integrity: sha512-QenBOdIT1zRa0kF3Z1mwObcvmdhxn+rzQDdmkxwSyRB/9KsNnib6XXTUo8P+Z/ZKXOYbP9Wmf4FX+vKd3yVX0Q==} + /@cspell/strong-weak-map@8.6.1: + resolution: {integrity: sha512-X6/7cy+GGVJFXsfrZapxVKn5mtehNTr7hTlg0bVj3iFoNYEPW9zq9l6WIcI4psmaU8G4DSrNsBK7pp87W3u16A==} engines: {node: '>=18'} dev: true @@ -619,8 +629,8 @@ packages: dev: true optional: true - /@esbuild/aix-ppc64@0.20.1: - resolution: {integrity: sha512-m55cpeupQ2DbuRGQMMZDzbv9J9PgVelPjlcmM5kxHnrBdBx6REaEd7LamYV7Dm8N7rCyR/XwU6rVP8ploKtIkA==} + /@esbuild/aix-ppc64@0.20.2: + resolution: {integrity: sha512-D+EBOJHXdNZcLJRBkhENNG8Wji2kgc9AZ9KiPr1JuZjsNtyHzrsfLRrY0tk2H2aoFu6RANO1y1iPPUCDYWkb5g==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] @@ -646,8 +656,8 @@ packages: dev: true optional: true - /@esbuild/android-arm64@0.20.1: - resolution: {integrity: sha512-hCnXNF0HM6AjowP+Zou0ZJMWWa1VkD77BXe959zERgGJBBxB+sV+J9f/rcjeg2c5bsukD/n17RKWXGFCO5dD5A==} + /@esbuild/android-arm64@0.20.2: + resolution: {integrity: sha512-mRzjLacRtl/tWU0SvD8lUEwb61yP9cqQo6noDZP/O8VkwafSYwZ4yWy24kan8jE/IMERpYncRt2dw438LP3Xmg==} engines: {node: '>=12'} cpu: [arm64] os: [android] @@ -673,8 +683,8 @@ packages: dev: true optional: true - /@esbuild/android-arm@0.20.1: - resolution: {integrity: sha512-4j0+G27/2ZXGWR5okcJi7pQYhmkVgb4D7UKwxcqrjhvp5TKWx3cUjgB1CGj1mfdmJBQ9VnUGgUhign+FPF2Zgw==} + /@esbuild/android-arm@0.20.2: + resolution: {integrity: sha512-t98Ra6pw2VaDhqNWO2Oph2LXbz/EJcnLmKLGBJwEwXX/JAN83Fym1rU8l0JUWK6HkIbWONCSSatf4sf2NBRx/w==} engines: {node: '>=12'} cpu: [arm] os: [android] @@ -700,8 +710,8 @@ packages: dev: true optional: true - /@esbuild/android-x64@0.20.1: - resolution: {integrity: sha512-MSfZMBoAsnhpS+2yMFYIQUPs8Z19ajwfuaSZx+tSl09xrHZCjbeXXMsUF/0oq7ojxYEpsSo4c0SfjxOYXRbpaA==} + /@esbuild/android-x64@0.20.2: + resolution: {integrity: sha512-btzExgV+/lMGDDa194CcUQm53ncxzeBrWJcncOBxuC6ndBkKxnHdFJn86mCIgTELsooUmwUm9FkhSp5HYu00Rg==} engines: {node: '>=12'} cpu: [x64] os: [android] @@ -727,8 +737,8 @@ packages: dev: true optional: true - /@esbuild/darwin-arm64@0.20.1: - resolution: {integrity: sha512-Ylk6rzgMD8klUklGPzS414UQLa5NPXZD5tf8JmQU8GQrj6BrFA/Ic9tb2zRe1kOZyCbGl+e8VMbDRazCEBqPvA==} + /@esbuild/darwin-arm64@0.20.2: + resolution: {integrity: sha512-4J6IRT+10J3aJH3l1yzEg9y3wkTDgDk7TSDFX+wKFiWjqWp/iCfLIYzGyasx9l0SAFPT1HwSCR+0w/h1ES/MjA==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] @@ -754,8 +764,8 @@ packages: dev: true optional: true - /@esbuild/darwin-x64@0.20.1: - resolution: {integrity: sha512-pFIfj7U2w5sMp52wTY1XVOdoxw+GDwy9FsK3OFz4BpMAjvZVs0dT1VXs8aQm22nhwoIWUmIRaE+4xow8xfIDZA==} + /@esbuild/darwin-x64@0.20.2: + resolution: {integrity: sha512-tBcXp9KNphnNH0dfhv8KYkZhjc+H3XBkF5DKtswJblV7KlT9EI2+jeA8DgBjp908WEuYll6pF+UStUCfEpdysA==} engines: {node: '>=12'} cpu: [x64] os: [darwin] @@ -781,8 +791,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-arm64@0.20.1: - resolution: {integrity: sha512-UyW1WZvHDuM4xDz0jWun4qtQFauNdXjXOtIy7SYdf7pbxSWWVlqhnR/T2TpX6LX5NI62spt0a3ldIIEkPM6RHw==} + /@esbuild/freebsd-arm64@0.20.2: + resolution: {integrity: sha512-d3qI41G4SuLiCGCFGUrKsSeTXyWG6yem1KcGZVS+3FYlYhtNoNgYrWcvkOoaqMhwXSMrZRl69ArHsGJ9mYdbbw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] @@ -808,8 +818,8 @@ packages: dev: true optional: true - /@esbuild/freebsd-x64@0.20.1: - resolution: {integrity: sha512-itPwCw5C+Jh/c624vcDd9kRCCZVpzpQn8dtwoYIt2TJF3S9xJLiRohnnNrKwREvcZYx0n8sCSbvGH349XkcQeg==} + /@esbuild/freebsd-x64@0.20.2: + resolution: {integrity: sha512-d+DipyvHRuqEeM5zDivKV1KuXn9WeRX6vqSqIDgwIfPQtwMP4jaDsQsDncjTDDsExT4lR/91OLjRo8bmC1e+Cw==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] @@ -835,8 +845,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm64@0.20.1: - resolution: {integrity: sha512-cX8WdlF6Cnvw/DO9/X7XLH2J6CkBnz7Twjpk56cshk9sjYVcuh4sXQBy5bmTwzBjNVZze2yaV1vtcJS04LbN8w==} + /@esbuild/linux-arm64@0.20.2: + resolution: {integrity: sha512-9pb6rBjGvTFNira2FLIWqDk/uaf42sSyLE8j1rnUpuzsODBq7FvpwHYZxQ/It/8b+QOS1RYfqgGFNLRI+qlq2A==} engines: {node: '>=12'} cpu: [arm64] os: [linux] @@ -862,8 +872,8 @@ packages: dev: true optional: true - /@esbuild/linux-arm@0.20.1: - resolution: {integrity: sha512-LojC28v3+IhIbfQ+Vu4Ut5n3wKcgTu6POKIHN9Wpt0HnfgUGlBuyDDQR4jWZUZFyYLiz4RBBBmfU6sNfn6RhLw==} + /@esbuild/linux-arm@0.20.2: + resolution: {integrity: sha512-VhLPeR8HTMPccbuWWcEUD1Az68TqaTYyj6nfE4QByZIQEQVWBB8vup8PpR7y1QHL3CpcF6xd5WVBU/+SBEvGTg==} engines: {node: '>=12'} cpu: [arm] os: [linux] @@ -889,8 +899,8 @@ packages: dev: true optional: true - /@esbuild/linux-ia32@0.20.1: - resolution: {integrity: sha512-4H/sQCy1mnnGkUt/xszaLlYJVTz3W9ep52xEefGtd6yXDQbz/5fZE5dFLUgsPdbUOQANcVUa5iO6g3nyy5BJiw==} + /@esbuild/linux-ia32@0.20.2: + resolution: {integrity: sha512-o10utieEkNPFDZFQm9CoP7Tvb33UutoJqg3qKf1PWVeeJhJw0Q347PxMvBgVVFgouYLGIhFYG0UGdBumROyiig==} engines: {node: '>=12'} cpu: [ia32] os: [linux] @@ -916,8 +926,8 @@ packages: dev: true optional: true - /@esbuild/linux-loong64@0.20.1: - resolution: {integrity: sha512-c0jgtB+sRHCciVXlyjDcWb2FUuzlGVRwGXgI+3WqKOIuoo8AmZAddzeOHeYLtD+dmtHw3B4Xo9wAUdjlfW5yYA==} + /@esbuild/linux-loong64@0.20.2: + resolution: {integrity: sha512-PR7sp6R/UC4CFVomVINKJ80pMFlfDfMQMYynX7t1tNTeivQ6XdX5r2XovMmha/VjR1YN/HgHWsVcTRIMkymrgQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] @@ -943,8 +953,8 @@ packages: dev: true optional: true - /@esbuild/linux-mips64el@0.20.1: - resolution: {integrity: sha512-TgFyCfIxSujyuqdZKDZ3yTwWiGv+KnlOeXXitCQ+trDODJ+ZtGOzLkSWngynP0HZnTsDyBbPy7GWVXWaEl6lhA==} + /@esbuild/linux-mips64el@0.20.2: + resolution: {integrity: sha512-4BlTqeutE/KnOiTG5Y6Sb/Hw6hsBOZapOVF6njAESHInhlQAghVVZL1ZpIctBOoTFbQyGW+LsVYZ8lSSB3wkjA==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] @@ -970,8 +980,8 @@ packages: dev: true optional: true - /@esbuild/linux-ppc64@0.20.1: - resolution: {integrity: sha512-b+yuD1IUeL+Y93PmFZDZFIElwbmFfIKLKlYI8M6tRyzE6u7oEP7onGk0vZRh8wfVGC2dZoy0EqX1V8qok4qHaw==} + /@esbuild/linux-ppc64@0.20.2: + resolution: {integrity: sha512-rD3KsaDprDcfajSKdn25ooz5J5/fWBylaaXkuotBDGnMnDP1Uv5DLAN/45qfnf3JDYyJv/ytGHQaziHUdyzaAg==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] @@ -997,8 +1007,8 @@ packages: dev: true optional: true - /@esbuild/linux-riscv64@0.20.1: - resolution: {integrity: sha512-wpDlpE0oRKZwX+GfomcALcouqjjV8MIX8DyTrxfyCfXxoKQSDm45CZr9fanJ4F6ckD4yDEPT98SrjvLwIqUCgg==} + /@esbuild/linux-riscv64@0.20.2: + resolution: {integrity: sha512-snwmBKacKmwTMmhLlz/3aH1Q9T8v45bKYGE3j26TsaOVtjIag4wLfWSiZykXzXuE1kbCE+zJRmwp+ZbIHinnVg==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] @@ -1024,8 +1034,8 @@ packages: dev: true optional: true - /@esbuild/linux-s390x@0.20.1: - resolution: {integrity: sha512-5BepC2Au80EohQ2dBpyTquqGCES7++p7G+7lXe1bAIvMdXm4YYcEfZtQrP4gaoZ96Wv1Ute61CEHFU7h4FMueQ==} + /@esbuild/linux-s390x@0.20.2: + resolution: {integrity: sha512-wcWISOobRWNm3cezm5HOZcYz1sKoHLd8VL1dl309DiixxVFoFe/o8HnwuIwn6sXre88Nwj+VwZUvJf4AFxkyrQ==} engines: {node: '>=12'} cpu: [s390x] os: [linux] @@ -1051,8 +1061,8 @@ packages: dev: true optional: true - /@esbuild/linux-x64@0.20.1: - resolution: {integrity: sha512-5gRPk7pKuaIB+tmH+yKd2aQTRpqlf1E4f/mC+tawIm/CGJemZcHZpp2ic8oD83nKgUPMEd0fNanrnFljiruuyA==} + /@esbuild/linux-x64@0.20.2: + resolution: {integrity: sha512-1MdwI6OOTsfQfek8sLwgyjOXAu+wKhLEoaOLTjbijk6E2WONYpH9ZU2mNtR+lZ2B4uwr+usqGuVfFT9tMtGvGw==} engines: {node: '>=12'} cpu: [x64] os: [linux] @@ -1078,8 +1088,8 @@ packages: dev: true optional: true - /@esbuild/netbsd-x64@0.20.1: - resolution: {integrity: sha512-4fL68JdrLV2nVW2AaWZBv3XEm3Ae3NZn/7qy2KGAt3dexAgSVT+Hc97JKSZnqezgMlv9x6KV0ZkZY7UO5cNLCg==} + /@esbuild/netbsd-x64@0.20.2: + resolution: {integrity: sha512-K8/DhBxcVQkzYc43yJXDSyjlFeHQJBiowJ0uVL6Tor3jGQfSGHNNJcWxNbOI8v5k82prYqzPuwkzHt3J1T1iZQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] @@ -1105,8 +1115,8 @@ packages: dev: true optional: true - /@esbuild/openbsd-x64@0.20.1: - resolution: {integrity: sha512-GhRuXlvRE+twf2ES+8REbeCb/zeikNqwD3+6S5y5/x+DYbAQUNl0HNBs4RQJqrechS4v4MruEr8ZtAin/hK5iw==} + /@esbuild/openbsd-x64@0.20.2: + resolution: {integrity: sha512-eMpKlV0SThJmmJgiVyN9jTPJ2VBPquf6Kt/nAoo6DgHAoN57K15ZghiHaMvqjCye/uU4X5u3YSMgVBI1h3vKrQ==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] @@ -1132,8 +1142,8 @@ packages: dev: true optional: true - /@esbuild/sunos-x64@0.20.1: - resolution: {integrity: sha512-ZnWEyCM0G1Ex6JtsygvC3KUUrlDXqOihw8RicRuQAzw+c4f1D66YlPNNV3rkjVW90zXVsHwZYWbJh3v+oQFM9Q==} + /@esbuild/sunos-x64@0.20.2: + resolution: {integrity: sha512-2UyFtRC6cXLyejf/YEld4Hajo7UHILetzE1vsRcGL3earZEW77JxrFjH4Ez2qaTiEfMgAXxfAZCm1fvM/G/o8w==} engines: {node: '>=12'} cpu: [x64] os: [sunos] @@ -1159,8 +1169,8 @@ packages: dev: true optional: true - /@esbuild/win32-arm64@0.20.1: - resolution: {integrity: sha512-QZ6gXue0vVQY2Oon9WyLFCdSuYbXSoxaZrPuJ4c20j6ICedfsDilNPYfHLlMH7vGfU5DQR0czHLmJvH4Nzis/A==} + /@esbuild/win32-arm64@0.20.2: + resolution: {integrity: sha512-GRibxoawM9ZCnDxnP3usoUDO9vUkpAxIIZ6GQI+IlVmr5kP3zUq+l17xELTHMWTWzjxa2guPNyrpq1GWmPvcGQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] @@ -1186,8 +1196,8 @@ packages: dev: true optional: true - /@esbuild/win32-ia32@0.20.1: - resolution: {integrity: sha512-HzcJa1NcSWTAU0MJIxOho8JftNp9YALui3o+Ny7hCh0v5f90nprly1U3Sj1Ldj/CvKKdvvFsCRvDkpsEMp4DNw==} + /@esbuild/win32-ia32@0.20.2: + resolution: {integrity: sha512-HfLOfn9YWmkSKRQqovpnITazdtquEW8/SoHW7pWpuEeguaZI4QnCRW6b+oZTztdBnZOS2hqJ6im/D5cPzBTTlQ==} engines: {node: '>=12'} cpu: [ia32] os: [win32] @@ -1213,8 +1223,8 @@ packages: dev: true optional: true - /@esbuild/win32-x64@0.20.1: - resolution: {integrity: sha512-0MBh53o6XtI6ctDnRMeQ+xoCN8kD2qI1rY1KgF/xdWQwoFeKou7puvDfV8/Wv4Ctx2rRpET/gGdz3YlNtNACSA==} + /@esbuild/win32-x64@0.20.2: + resolution: {integrity: sha512-N49X4lJX27+l9jbLKSqZ6bKNjzQvHaT8IIFUy+YIqmXQdjYCToGWwOItDrfby14c78aDd5NHQl29xingXfCdLQ==} engines: {node: '>=12'} cpu: [x64] os: [win32] @@ -1297,8 +1307,8 @@ packages: fast-json-stringify: 5.10.0 dev: false - /@fastify/http-proxy@9.4.0: - resolution: {integrity: sha512-oXdvWBETRI2fJYJnRfFP/qJ6fQddUJz47X71WP7SkHdm4D5OejlNwrgnEJLUS5Kr4BSXHE5Nq5K6mmUlkivKiA==} + /@fastify/http-proxy@9.5.0: + resolution: {integrity: sha512-1iqIdV10d5k9YtfHq9ylX5zt1NiM50fG+rIX40qt00R694sqWso3ukyTFZVk33SDoSiBW8roB7n11RUVUoN+Ag==} dependencies: '@fastify/reply-from': 9.7.0 fast-querystring: 1.1.2 @@ -1339,14 +1349,14 @@ packages: safe-stable-stringify: 2.4.3 dev: false - /@fastify/static@7.0.1: - resolution: {integrity: sha512-i1p/nELMknAisNfnjo7yhfoUOdKzA+n92QaMirv2NkZrJ1Wl12v2nyTYlDwPN8XoStMBAnRK/Kx6zKmfrXUPXw==} + /@fastify/static@7.0.3: + resolution: {integrity: sha512-2tmTdF+uFCykasutaO6k4/wOt7eXyi7m3dGuCPo5micXzv0qt6ttb/nWnDYL/BlXjYGfp1JI4a1gyluTIylvQA==} dependencies: '@fastify/accept-negotiator': 1.1.0 '@fastify/send': 2.1.0 content-disposition: 0.5.4 fastify-plugin: 4.5.1 - fastq: 1.17.0 + fastq: 1.17.1 glob: 10.3.10 dev: false @@ -1513,8 +1523,8 @@ packages: '@pnpm/types': 9.4.2 dev: true - /@pnpm/error@5.0.2: - resolution: {integrity: sha512-0TEm+tWNYm+9uh6DSKyRbv8pv/6b4NL0PastLvMxIoqZbBZ5Zj1cYi332R9xsSUi31ZOsu2wpgn/bC7DA9hrjg==} + /@pnpm/error@5.0.3: + resolution: {integrity: sha512-ONJU5cUeoeJSy50qOYsMZQHTA/9QKmGgh1ATfEpCLgtbdwqUiwD9MxHNeXUYYI/pocBCz6r1ZCFqiQvO+8SUKA==} engines: {node: '>=16.14'} dependencies: '@pnpm/constants': 7.1.1 @@ -1554,14 +1564,14 @@ packages: validate-npm-package-name: 4.0.0 dev: true - /@pnpm/npm-resolver@18.1.0(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-fUYKX/iHiHldL0VRVvkQI35YK2jWhZEkPO6rrGke8309+LKAo12v833nBttMDpQrtHefmqhB4mhCzQq6L2Xqmg==} + /@pnpm/npm-resolver@18.1.1(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-NptzncmMD5ZMimbjWkGpMzuBRhlCY+sh7mzypPdBOTNlh5hmEQe/VaRKjNK4V9/b0C/llElkvIePL6acybu86w==} engines: {node: '>=16.14'} peerDependencies: '@pnpm/logger': ^5.0.0 dependencies: '@pnpm/core-loggers': 9.0.6(@pnpm/logger@5.0.0) - '@pnpm/error': 5.0.2 + '@pnpm/error': 5.0.3 '@pnpm/fetching-types': 5.0.0 '@pnpm/graceful-fs': 3.2.0 '@pnpm/logger': 5.0.0 @@ -1609,117 +1619,134 @@ packages: engines: {node: '>=16.14'} dev: true - /@pnpm/workspace.pkgs-graph@2.0.14(@pnpm/logger@5.0.0): - resolution: {integrity: sha512-SBXXyWDkPEoaLTjLRyQzRHoBYH+P0NLcIjX1yPUxuJiMTvGOMzjpLWTuxYNVe/P0V0VQMrjpJFaJPjlViNLhzg==} + /@pnpm/workspace.pkgs-graph@2.0.16(@pnpm/logger@5.0.0): + resolution: {integrity: sha512-WNsDLkDKm7/eht91s/Iif9ELLabdshAIqpH3svCwdp/xiRxGumfUWkCCeCODjLbBCQehrsl3ugSsboIvk0xiPw==} engines: {node: '>=16.14'} dependencies: '@pnpm/npm-package-arg': 1.0.0 - '@pnpm/npm-resolver': 18.1.0(@pnpm/logger@5.0.0) + '@pnpm/npm-resolver': 18.1.1(@pnpm/logger@5.0.0) '@pnpm/resolve-workspace-range': 5.0.1 + '@pnpm/types': 9.4.2 ramda: /@pnpm/ramda@0.28.1 transitivePeerDependencies: - '@pnpm/logger' - domexception dev: true - /@rollup/rollup-android-arm-eabi@4.9.6: - resolution: {integrity: sha512-MVNXSSYN6QXOulbHpLMKYi60ppyO13W9my1qogeiAqtjb2yR4LSmfU2+POvDkLzhjYLXz9Rf9+9a3zFHW1Lecg==} + /@rollup/rollup-android-arm-eabi@4.14.0: + resolution: {integrity: sha512-jwXtxYbRt1V+CdQSy6Z+uZti7JF5irRKF8hlKfEnF/xJpcNGuuiZMBvuoYM+x9sr9iWGnzrlM0+9hvQ1kgkf1w==} cpu: [arm] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-android-arm64@4.9.6: - resolution: {integrity: sha512-T14aNLpqJ5wzKNf5jEDpv5zgyIqcpn1MlwCrUXLrwoADr2RkWA0vOWP4XxbO9aiO3dvMCQICZdKeDrFl7UMClw==} + /@rollup/rollup-android-arm64@4.14.0: + resolution: {integrity: sha512-fI9nduZhCccjzlsA/OuAwtFGWocxA4gqXGTLvOyiF8d+8o0fZUeSztixkYjcGq1fGZY3Tkq4yRvHPFxU+jdZ9Q==} cpu: [arm64] os: [android] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-arm64@4.9.6: - resolution: {integrity: sha512-CqNNAyhRkTbo8VVZ5R85X73H3R5NX9ONnKbXuHisGWC0qRbTTxnF1U4V9NafzJbgGM0sHZpdO83pLPzq8uOZFw==} + /@rollup/rollup-darwin-arm64@4.14.0: + resolution: {integrity: sha512-BcnSPRM76/cD2gQC+rQNGBN6GStBs2pl/FpweW8JYuz5J/IEa0Fr4AtrPv766DB/6b2MZ/AfSIOSGw3nEIP8SA==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-darwin-x64@4.9.6: - resolution: {integrity: sha512-zRDtdJuRvA1dc9Mp6BWYqAsU5oeLixdfUvkTHuiYOHwqYuQ4YgSmi6+/lPvSsqc/I0Omw3DdICx4Tfacdzmhog==} + /@rollup/rollup-darwin-x64@4.14.0: + resolution: {integrity: sha512-LDyFB9GRolGN7XI6955aFeI3wCdCUszFWumWU0deHA8VpR3nWRrjG6GtGjBrQxQKFevnUTHKCfPR4IvrW3kCgQ==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm-gnueabihf@4.9.6: - resolution: {integrity: sha512-oNk8YXDDnNyG4qlNb6is1ojTOGL/tRhbbKeE/YuccItzerEZT68Z9gHrY3ROh7axDc974+zYAPxK5SH0j/G+QQ==} + /@rollup/rollup-linux-arm-gnueabihf@4.14.0: + resolution: {integrity: sha512-ygrGVhQP47mRh0AAD0zl6QqCbNsf0eTo+vgwkY6LunBcg0f2Jv365GXlDUECIyoXp1kKwL5WW6rsO429DBY/bA==} cpu: [arm] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-gnu@4.9.6: - resolution: {integrity: sha512-Z3O60yxPtuCYobrtzjo0wlmvDdx2qZfeAWTyfOjEDqd08kthDKexLpV97KfAeUXPosENKd8uyJMRDfFMxcYkDQ==} + /@rollup/rollup-linux-arm64-gnu@4.14.0: + resolution: {integrity: sha512-x+uJ6MAYRlHGe9wi4HQjxpaKHPM3d3JjqqCkeC5gpnnI6OWovLdXTpfa8trjxPLnWKyBsSi5kne+146GAxFt4A==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-arm64-musl@4.9.6: - resolution: {integrity: sha512-gpiG0qQJNdYEVad+1iAsGAbgAnZ8j07FapmnIAQgODKcOTjLEWM9sRb+MbQyVsYCnA0Im6M6QIq6ax7liws6eQ==} + /@rollup/rollup-linux-arm64-musl@4.14.0: + resolution: {integrity: sha512-nrRw8ZTQKg6+Lttwqo6a2VxR9tOroa2m91XbdQ2sUUzHoedXlsyvY1fN4xWdqz8PKmf4orDwejxXHjh7YBGUCA==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-riscv64-gnu@4.9.6: - resolution: {integrity: sha512-+uCOcvVmFUYvVDr27aiyun9WgZk0tXe7ThuzoUTAukZJOwS5MrGbmSlNOhx1j80GdpqbOty05XqSl5w4dQvcOA==} + /@rollup/rollup-linux-powerpc64le-gnu@4.14.0: + resolution: {integrity: sha512-xV0d5jDb4aFu84XKr+lcUJ9y3qpIWhttO3Qev97z8DKLXR62LC3cXT/bMZXrjLF9X+P5oSmJTzAhqwUbY96PnA==} + cpu: [ppc64le] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-riscv64-gnu@4.14.0: + resolution: {integrity: sha512-SDDhBQwZX6LPRoPYjAZWyL27LbcBo7WdBFWJi5PI9RPCzU8ijzkQn7tt8NXiXRiFMJCVpkuMkBf4OxSxVMizAw==} cpu: [riscv64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-gnu@4.9.6: - resolution: {integrity: sha512-HUNqM32dGzfBKuaDUBqFB7tP6VMN74eLZ33Q9Y1TBqRDn+qDonkAUyKWwF9BR9unV7QUzffLnz9GrnKvMqC/fw==} + /@rollup/rollup-linux-s390x-gnu@4.14.0: + resolution: {integrity: sha512-RxB/qez8zIDshNJDufYlTT0ZTVut5eCpAZ3bdXDU9yTxBzui3KhbGjROK2OYTTor7alM7XBhssgoO3CZ0XD3qA==} + cpu: [s390x] + os: [linux] + requiresBuild: true + dev: true + optional: true + + /@rollup/rollup-linux-x64-gnu@4.14.0: + resolution: {integrity: sha512-C6y6z2eCNCfhZxT9u+jAM2Fup89ZjiG5pIzZIDycs1IwESviLxwkQcFRGLjnDrP+PT+v5i4YFvlcfAs+LnreXg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-linux-x64-musl@4.9.6: - resolution: {integrity: sha512-ch7M+9Tr5R4FK40FHQk8VnML0Szi2KRujUgHXd/HjuH9ifH72GUmw6lStZBo3c3GB82vHa0ZoUfjfcM7JiiMrQ==} + /@rollup/rollup-linux-x64-musl@4.14.0: + resolution: {integrity: sha512-i0QwbHYfnOMYsBEyjxcwGu5SMIi9sImDVjDg087hpzXqhBSosxkE7gyIYFHgfFl4mr7RrXksIBZ4DoLoP4FhJg==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-arm64-msvc@4.9.6: - resolution: {integrity: sha512-VD6qnR99dhmTQ1mJhIzXsRcTBvTjbfbGGwKAHcu+52cVl15AC/kplkhxzW/uT0Xl62Y/meBKDZvoJSJN+vTeGA==} + /@rollup/rollup-win32-arm64-msvc@4.14.0: + resolution: {integrity: sha512-Fq52EYb0riNHLBTAcL0cun+rRwyZ10S9vKzhGKKgeD+XbwunszSY0rVMco5KbOsTlwovP2rTOkiII/fQ4ih/zQ==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-ia32-msvc@4.9.6: - resolution: {integrity: sha512-J9AFDq/xiRI58eR2NIDfyVmTYGyIZmRcvcAoJ48oDld/NTR8wyiPUu2X/v1navJ+N/FGg68LEbX3Ejd6l8B7MQ==} + /@rollup/rollup-win32-ia32-msvc@4.14.0: + resolution: {integrity: sha512-e/PBHxPdJ00O9p5Ui43+vixSgVf4NlLsmV6QneGERJ3lnjIua/kim6PRFe3iDueT1rQcgSkYP8ZBBXa/h4iPvw==} cpu: [ia32] os: [win32] requiresBuild: true dev: true optional: true - /@rollup/rollup-win32-x64-msvc@4.9.6: - resolution: {integrity: sha512-jqzNLhNDvIZOrt69Ce4UjGRpXJBzhUBzawMwnaDAwyHriki3XollsewxWzOzz+4yOFDkuJHtTsZFwMxhYJWmLQ==} + /@rollup/rollup-win32-x64-msvc@4.14.0: + resolution: {integrity: sha512-aGg7iToJjdklmxlUlJh/PaPNa4PmqHfyRMLunbL3eaMO0gp656+q1zOKkpJ/CVe9CryJv6tAN1HDoR8cNGzkag==} cpu: [x64] os: [win32] requiresBuild: true @@ -1863,31 +1890,31 @@ packages: resolution: {integrity: sha512-myfUej5naTBWnqOCc/MdVOLVjXUXtIA+NpDrDBKJtLLg2shUjBu3cZmB/85RyitKc55+lUUyl7oRfLOvkr2hsw==} dev: true - /@tanstack/query-core@5.25.0: - resolution: {integrity: sha512-vlobHP64HTuSE68lWF1mEhwSRC5Q7gaT+a/m9S+ItuN+ruSOxe1rFnR9j0ACWQ314BPhBEVKfBQ6mHL0OWfdbQ==} + /@tanstack/query-core@5.29.0: + resolution: {integrity: sha512-WgPTRs58hm9CMzEr5jpISe8HXa3qKQ8CxewdYZeVnA54JrPY9B1CZiwsCoLpLkf0dGRZq+LcX5OiJb0bEsOFww==} dev: false - /@tanstack/query-devtools@5.24.0: - resolution: {integrity: sha512-pThim455t69zrZaQKa7IRkEIK8UBTS+gHVAdNfhO72Xh4rWpMc63ovRje5/n6iw63+d6QiJzVadsJVdPoodSeQ==} + /@tanstack/query-devtools@5.28.10: + resolution: {integrity: sha512-5UN629fKa5/1K/2Pd26gaU7epxRrYiT1gy+V+pW5K6hnf1DeUKK3pANSb2eHKlecjIKIhTwyF7k9XdyE2gREvQ==} dev: false - /@tanstack/react-query-devtools@5.25.0(@tanstack/react-query@5.25.0)(react@18.2.0): - resolution: {integrity: sha512-bqtr1Bwvo/jspJXb2l4R1DSZ848TvIzGBk4V0b6YGS5EQ3015dhm3mPqyTgh0DquK5ZR0h1yP/4DpzhhvTnFHA==} + /@tanstack/react-query-devtools@5.29.0(@tanstack/react-query@5.29.0)(react@18.2.0): + resolution: {integrity: sha512-WLuaU6yM4KdvBimEP1Km5lM4/p1J40cMp5I5z0Mc6a8QbBUYLK8qJcGIKelfLfDp7KmEcr59tzbRTmdH/GWvzQ==} peerDependencies: - '@tanstack/react-query': ^5.25.0 + '@tanstack/react-query': ^5.29.0 react: ^18.0.0 dependencies: - '@tanstack/query-devtools': 5.24.0 - '@tanstack/react-query': 5.25.0(react@18.2.0) + '@tanstack/query-devtools': 5.28.10 + '@tanstack/react-query': 5.29.0(react@18.2.0) react: 18.2.0 dev: false - /@tanstack/react-query@5.25.0(react@18.2.0): - resolution: {integrity: sha512-u+n5R7mLO7RmeiIonpaCRVXNRWtZEef/aVZ/XGWRPa7trBIvGtzlfo0Ah7ZtnTYfrKEVwnZ/tzRCBcoiqJ/tFw==} + /@tanstack/react-query@5.29.0(react@18.2.0): + resolution: {integrity: sha512-yxlhHB73jaBla6h5B6zPaGmQjokkzAhMHN4veotkPNiQ3Ac/mCxgABRZPsJJrgCTvhpcncBZcDBFxaR2B37vug==} peerDependencies: react: ^18.0.0 dependencies: - '@tanstack/query-core': 5.25.0 + '@tanstack/query-core': 5.29.0 react: 18.2.0 dev: false @@ -1898,7 +1925,7 @@ packages: /@types/better-sqlite3@7.6.9: resolution: {integrity: sha512-FvktcujPDj9XKMJQWFcl2vVl7OdRIqsSRX9b0acWwTmwLK9CF2eqo/FRcmMLNpugKoX/avA6pb7TorDLmpgTnQ==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.12.5 /@types/estree@1.0.5: resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} @@ -1908,8 +1935,8 @@ packages: resolution: {integrity: sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA==} dev: true - /@types/node@20.11.25: - resolution: {integrity: sha512-TBHyJxk2b7HceLVGFcpAUjsa5zIdsPWlR6XHfyGzd0SFu+/NFgQgMAl96MSDZgQDvJAvV6BKsFOrt6zIL09JDw==} + /@types/node@20.12.5: + resolution: {integrity: sha512-BD+BjQ9LS/D8ST9p5uqBxghlN+S42iuNxjsUGjeZobe/ciXzk2qb1B6IXc6AnRLS+yFJRpN2IPEHMzwspfDJNw==} dependencies: undici-types: 5.26.5 @@ -1920,22 +1947,18 @@ packages: /@types/prop-types@15.7.11: resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} - /@types/react-dom@18.2.21: - resolution: {integrity: sha512-gnvBA/21SA4xxqNXEwNiVcP0xSGHh/gi1VhWv9Bl46a0ItbTT5nFY+G9VSQpaG/8N/qdJpJ+vftQ4zflTtnjLw==} + /@types/react-dom@18.2.24: + resolution: {integrity: sha512-cN6upcKd8zkGy4HU9F1+/s98Hrp6D4MOcippK4PoE8OZRngohHZpbJn1GsaDLz87MqvHNoT13nHvNqM9ocRHZg==} dependencies: - '@types/react': 18.2.64 + '@types/react': 18.2.74 dev: true - /@types/react@18.2.64: - resolution: {integrity: sha512-MlmPvHgjj2p3vZaxbQgFUQFvD8QiZwACfGqEdDSWou5yISWxDQ4/74nCAwsUiX7UFLKZz3BbVSPj+YxeoGGCfg==} + /@types/react@18.2.74: + resolution: {integrity: sha512-9AEqNZZyBx8OdZpxzQlaFEVCSFUM2YXJH46yPOiOpm078k6ZLOCcuAzGum/zK8YBwY+dbahVNbHrbgrAwIRlqw==} dependencies: '@types/prop-types': 15.7.11 - '@types/scheduler': 0.16.8 csstype: 3.1.3 - /@types/scheduler@0.16.8: - resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} - /@types/semver@7.5.6: resolution: {integrity: sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A==} dev: true @@ -1943,12 +1966,12 @@ packages: /@types/web-push@3.6.3: resolution: {integrity: sha512-v3oT4mMJsHeJ/rraliZ+7TbZtr5bQQuxcgD7C3/1q/zkAj29c8RE0F9lVZVu3hiQe5Z9fYcBreV7TLnfKR+4mg==} dependencies: - '@types/node': 20.11.25 + '@types/node': 20.12.5 dev: true - /@typescript-eslint/eslint-plugin@7.1.1(@typescript-eslint/parser@7.1.1)(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-zioDz623d0RHNhvx0eesUmGfIjzrk18nSBC8xewepKXbBvN/7c1qImV7Hg8TI1URTxKax7/zxfxj3Uph8Chcuw==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/eslint-plugin@7.5.0(@typescript-eslint/parser@7.5.0)(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-HpqNTH8Du34nLxbKgVMGljZMG0rJd2O9ecvr2QLYp+7512ty1j42KnsFwspPXg1Vh8an9YImf6CokUBltisZFQ==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: '@typescript-eslint/parser': ^7.0.0 eslint: ^8.56.0 @@ -1958,26 +1981,26 @@ packages: optional: true dependencies: '@eslint-community/regexpp': 4.10.0 - '@typescript-eslint/parser': 7.1.1(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/scope-manager': 7.1.1 - '@typescript-eslint/type-utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/parser': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/type-utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 eslint: 8.57.0 graphemer: 1.4.0 ignore: 5.3.0 natural-compare: 1.4.0 semver: 7.6.0 - ts-api-utils: 1.0.3(typescript@5.4.2) - typescript: 5.4.2 + ts-api-utils: 1.0.3(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/parser@7.1.1(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-ZWUFyL0z04R1nAEgr9e79YtV5LbafdOtN7yapNbn1ansMyaegl2D4bL7vHoJ4HPSc4CaLwuCVas8CVuneKzplQ==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/parser@7.5.0(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-cj+XGhNujfD2/wzR1tabNsidnYRaFfEkcULdcIyVBYcXjBvBKOes+mpMBP7hMpOyk+gBcfXsrg4NBGAStQyxjQ==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 typescript: '*' @@ -1985,28 +2008,28 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/scope-manager': 7.1.1 - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 eslint: 8.57.0 - typescript: 5.4.2 + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/scope-manager@7.1.1: - resolution: {integrity: sha512-cirZpA8bJMRb4WZ+rO6+mnOJrGFDd38WoXCEI57+CYBqta8Yc8aJym2i7vyqLL1vVYljgw0X27axkUXz32T8TA==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/scope-manager@7.5.0: + resolution: {integrity: sha512-Z1r7uJY0MDeUlql9XJ6kRVgk/sP11sr3HKXn268HZyqL7i4cEfrdFuSSY/0tUqT37l5zT0tJOsuDP16kio85iA==} + engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/visitor-keys': 7.5.0 dev: true - /@typescript-eslint/type-utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-5r4RKze6XHEEhlZnJtR3GYeCh1IueUHdbrukV2KSlLXaTjuSfeVF8mZUVPLovidCuZfbVjfhi4c0DNSa/Rdg5g==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/type-utils@7.5.0(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-A021Rj33+G8mx2Dqh0nMO9GyjjIBK3MqgVgZ2qlKf6CJy51wY/lkkFqq3TqqnH34XyAHUkq27IjlUkWlQRpLHw==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 typescript: '*' @@ -2014,55 +2037,55 @@ packages: typescript: optional: true dependencies: - '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) - '@typescript-eslint/utils': 7.1.1(eslint@8.57.0)(typescript@5.4.2) + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) + '@typescript-eslint/utils': 7.5.0(eslint@8.57.0)(typescript@5.4.4) debug: 4.3.4 eslint: 8.57.0 - ts-api-utils: 1.0.3(typescript@5.4.2) - typescript: 5.4.2 + ts-api-utils: 1.0.3(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/types@7.1.1: - resolution: {integrity: sha512-KhewzrlRMrgeKm1U9bh2z5aoL4s7K3tK5DwHDn8MHv0yQfWFz/0ZR6trrIHHa5CsF83j/GgHqzdbzCXJ3crx0Q==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/types@7.5.0: + resolution: {integrity: sha512-tv5B4IHeAdhR7uS4+bf8Ov3k793VEVHd45viRRkehIUZxm0WF82VPiLgHzA/Xl4TGPg1ZD49vfxBKFPecD5/mg==} + engines: {node: ^18.18.0 || >=20.0.0} dev: true - /@typescript-eslint/typescript-estree@7.1.1(typescript@5.4.2): - resolution: {integrity: sha512-9ZOncVSfr+sMXVxxca2OJOPagRwT0u/UHikM2Rd6L/aB+kL/QAuTnsv6MeXtjzCJYb8PzrXarypSGIPx3Jemxw==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/typescript-estree@7.5.0(typescript@5.4.4): + resolution: {integrity: sha512-YklQQfe0Rv2PZEueLTUffiQGKQneiIEKKnfIqPIOxgM9lKSZFCjT5Ad4VqRKj/U4+kQE3fa8YQpskViL7WjdPQ==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: typescript: '*' peerDependenciesMeta: typescript: optional: true dependencies: - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/visitor-keys': 7.1.1 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/visitor-keys': 7.5.0 debug: 4.3.4 globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 semver: 7.6.0 - ts-api-utils: 1.0.3(typescript@5.4.2) - typescript: 5.4.2 + ts-api-utils: 1.0.3(typescript@5.4.4) + typescript: 5.4.4 transitivePeerDependencies: - supports-color dev: true - /@typescript-eslint/utils@7.1.1(eslint@8.57.0)(typescript@5.4.2): - resolution: {integrity: sha512-thOXM89xA03xAE0lW7alstvnyoBUbBX38YtY+zAUcpRPcq9EIhXPuJ0YTv948MbzmKh6e1AUszn5cBFK49Umqg==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/utils@7.5.0(eslint@8.57.0)(typescript@5.4.4): + resolution: {integrity: sha512-3vZl9u0R+/FLQcpy2EHyRGNqAS/ofJ3Ji8aebilfJe+fobK8+LbIFmrHciLVDxjDoONmufDcnVSF38KwMEOjzw==} + engines: {node: ^18.18.0 || >=20.0.0} peerDependencies: eslint: ^8.56.0 dependencies: '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.0) '@types/json-schema': 7.0.15 '@types/semver': 7.5.6 - '@typescript-eslint/scope-manager': 7.1.1 - '@typescript-eslint/types': 7.1.1 - '@typescript-eslint/typescript-estree': 7.1.1(typescript@5.4.2) + '@typescript-eslint/scope-manager': 7.5.0 + '@typescript-eslint/types': 7.5.0 + '@typescript-eslint/typescript-estree': 7.5.0(typescript@5.4.4) eslint: 8.57.0 semver: 7.6.0 transitivePeerDependencies: @@ -2070,11 +2093,11 @@ packages: - typescript dev: true - /@typescript-eslint/visitor-keys@7.1.1: - resolution: {integrity: sha512-yTdHDQxY7cSoCcAtiBzVzxleJhkGB9NncSIyMYe2+OGON1ZsP9zOPws/Pqgopa65jvknOjlk/w7ulPlZ78PiLQ==} - engines: {node: ^16.0.0 || >=18.0.0} + /@typescript-eslint/visitor-keys@7.5.0: + resolution: {integrity: sha512-mcuHM/QircmA6O7fy6nn2w/3ditQkj+SgtOc8DW3uQ10Yfj42amm2i+6F2K4YAOPNNTmE6iM1ynM6lrSwdendA==} + engines: {node: ^18.18.0 || >=20.0.0} dependencies: - '@typescript-eslint/types': 7.1.1 + '@typescript-eslint/types': 7.5.0 eslint-visitor-keys: 3.4.3 dev: true @@ -2082,49 +2105,49 @@ packages: resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} dev: true - /@vitejs/plugin-react-swc@3.6.0(vite@5.1.5): + /@vitejs/plugin-react-swc@3.6.0(vite@5.2.8): resolution: {integrity: sha512-XFRbsGgpGxGzEV5i5+vRiro1bwcIaZDIdBRP16qwm+jP68ue/S8FJTBEgOeojtVDYrbSua3XFp71kC8VJE6v+g==} peerDependencies: vite: ^4 || ^5 dependencies: '@swc/core': 1.3.107 - vite: 5.1.5(@types/node@20.11.25) + vite: 5.2.8(@types/node@20.12.5) transitivePeerDependencies: - '@swc/helpers' dev: true - /@vitest/expect@1.3.1: - resolution: {integrity: sha512-xofQFwIzfdmLLlHa6ag0dPV8YsnKOCP1KdAeVVh34vSjN2dcUiXYCD9htu/9eM7t8Xln4v03U9HLxLpPlsXdZw==} + /@vitest/expect@1.4.0: + resolution: {integrity: sha512-Jths0sWCJZ8BxjKe+p+eKsoqev1/T8lYcrjavEaz8auEJ4jAVY0GwW3JKmdVU4mmNPLPHixh4GNXP7GFtAiDHA==} dependencies: - '@vitest/spy': 1.3.1 - '@vitest/utils': 1.3.1 + '@vitest/spy': 1.4.0 + '@vitest/utils': 1.4.0 chai: 4.4.1 dev: true - /@vitest/runner@1.3.1: - resolution: {integrity: sha512-5FzF9c3jG/z5bgCnjr8j9LNq/9OxV2uEBAITOXfoe3rdZJTdO7jzThth7FXv/6b+kdY65tpRQB7WaKhNZwX+Kg==} + /@vitest/runner@1.4.0: + resolution: {integrity: sha512-EDYVSmesqlQ4RD2VvWo3hQgTJ7ZrFQ2VSJdfiJiArkCerDAGeyF1i6dHkmySqk573jLp6d/cfqCN+7wUB5tLgg==} dependencies: - '@vitest/utils': 1.3.1 + '@vitest/utils': 1.4.0 p-limit: 5.0.0 pathe: 1.1.2 dev: true - /@vitest/snapshot@1.3.1: - resolution: {integrity: sha512-EF++BZbt6RZmOlE3SuTPu/NfwBF6q4ABS37HHXzs2LUVPBLx2QoY/K0fKpRChSo8eLiuxcbCVfqKgx/dplCDuQ==} + /@vitest/snapshot@1.4.0: + resolution: {integrity: sha512-saAFnt5pPIA5qDGxOHxJ/XxhMFKkUSBJmVt5VgDsAqPTX6JP326r5C/c9UuCMPoXNzuudTPsYDZCoJ5ilpqG2A==} dependencies: magic-string: 0.30.5 pathe: 1.1.2 pretty-format: 29.7.0 dev: true - /@vitest/spy@1.3.1: - resolution: {integrity: sha512-xAcW+S099ylC9VLU7eZfdT9myV67Nor9w9zhf0mGCYJSO+zM2839tOeROTdikOi/8Qeusffvxb/MyBSOja1Uig==} + /@vitest/spy@1.4.0: + resolution: {integrity: sha512-Ywau/Qs1DzM/8Uc+yA77CwSegizMlcgTJuYGAi0jujOteJOUf1ujunHThYo243KG9nAyWT3L9ifPYZ5+As/+6Q==} dependencies: tinyspy: 2.2.0 dev: true - /@vitest/utils@1.3.1: - resolution: {integrity: sha512-d3Waie/299qqRyHTm2DjADeTaNdNSVsnwHPWrs20JMpjh6eiVq7ggggweO8rc4arhf6rRkWuHKwvxGvejUXZZQ==} + /@vitest/utils@1.4.0: + resolution: {integrity: sha512-mx3Yd1/6e2Vt/PUC98DcqTirtfxUyAZ32uK82r8rZzbtBeBo+nqgnjx/LvqQdWsrvNtm14VmurNgcf4nqY5gJg==} dependencies: diff-sequences: 29.6.3 estree-walker: 3.0.3 @@ -2132,13 +2155,13 @@ packages: pretty-format: 29.7.0 dev: true - /@vitest/web-worker@1.3.1(vitest@1.3.1): - resolution: {integrity: sha512-uKr9wtkuTpZ2J64ecItvLOUdeRlvT5JsPSUnYbiAbWDpq5ALJpHSI4JA992DYrYCIZZCX1DLBzvgp704vS27Qw==} + /@vitest/web-worker@1.4.0(vitest@1.4.0): + resolution: {integrity: sha512-JgLAVtPpF2/AJTI3y79eq8RrKEdK4lFS7gxT9O2gAbke1rbhRqpPoM/acQHWA6RrrX9Jci+Yk+ZQuOGON4D4ZA==} peerDependencies: vitest: ^1.0.0 dependencies: debug: 4.3.4 - vitest: 1.3.1(@types/node@20.11.25) + vitest: 1.4.0(@types/node@20.12.5) transitivePeerDependencies: - supports-color dev: true @@ -2380,8 +2403,8 @@ packages: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} dev: false - /better-sqlite3@9.4.3: - resolution: {integrity: sha512-ud0bTmD9O3uWJGuXDltyj3R47Nz0OHX8iqPOT5PMspGqlu/qQFn+5S2eFBUCrySpavTjFXbi4EgrfVvPAHlImw==} + /better-sqlite3@9.4.5: + resolution: {integrity: sha512-uFVyoyZR9BNcjSca+cp3MWCv6upAv+tbMC4SWM51NIMhoQOm4tjIkyxFO/ZsYdGAF61WJBgdzyJcz4OokJi0gQ==} requiresBuild: true dependencies: bindings: 1.5.0 @@ -2735,77 +2758,77 @@ packages: type-fest: 1.4.0 dev: true - /cspell-config-lib@8.6.0: - resolution: {integrity: sha512-Q1rvQFUDJTu4hUtxwL6+q83Hjx/a5grEjMS5axxFJzjJuFRbRsXCagncdSCx/YBqLkNM5noBbRP/0rVh7ufqxw==} + /cspell-config-lib@8.6.1: + resolution: {integrity: sha512-I6LatgXJb8mxKFzIywO81TlUD/qWnUDrhB6yTUPdP90bwZcXMmGoCsZxhd2Rvl9fz5fWne0T839I1coShfm86g==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-types': 8.6.0 + '@cspell/cspell-types': 8.6.1 comment-json: 4.2.3 yaml: 2.4.1 dev: true - /cspell-dictionary@8.6.0: - resolution: {integrity: sha512-ohToeOQznIrb2/z7RfKxX3NID0WiO4sXK3IxKdnbn2viGgdn17tQ8Z2f4Xuy9egjSGRKyr6N25Z5AOes1C8R3w==} + /cspell-dictionary@8.6.1: + resolution: {integrity: sha512-0SfKPi1QoWbGpZ/rWMR7Jn0+GaQT9PAMLWjVOu66PUNUXI5f4oCTHpnZE1Xts+5VX8shZC3TAMHEgtgKuQn4RQ==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-pipe': 8.6.0 - '@cspell/cspell-types': 8.6.0 - cspell-trie-lib: 8.6.0 + '@cspell/cspell-pipe': 8.6.1 + '@cspell/cspell-types': 8.6.1 + cspell-trie-lib: 8.6.1 fast-equals: 5.0.1 gensequence: 7.0.0 dev: true - /cspell-gitignore@8.6.0: - resolution: {integrity: sha512-6INRlNb17iKtQH7NmDM/EsX5OZOD2TzIwHiJnnWci0Y5l10V/zN9WGLDegTjMh9HU3TS6uUuN4I/ffkCs9m+LA==} + /cspell-gitignore@8.6.1: + resolution: {integrity: sha512-3gtt351sSDfN826aMXTqGHVLz2lz9ZHr8uemImUc24Q+676sXkJM9lXzqP8PUqwGhLyt5qSf+9pt0ieNwQy/cA==} engines: {node: '>=18'} hasBin: true dependencies: - cspell-glob: 8.6.0 + cspell-glob: 8.6.1 find-up-simple: 1.0.0 dev: true - /cspell-glob@8.6.0: - resolution: {integrity: sha512-AyuExc34F8JsEYNl4inx1m1v5VoSRA/cTptREq/AoNTcMTyG5s+wt5J+VWBfvJjEDEEpd9Cb2it0j8TMo/Tpjw==} + /cspell-glob@8.6.1: + resolution: {integrity: sha512-QjtngIR0XsUQLmHHDO86hps/JR5sRxSBwCvcsNCEmSdpdofLFc8cuxi3o33JWge7UAPBCQOLGfpA7/Wx31srmw==} engines: {node: '>=18'} dependencies: micromatch: 4.0.5 dev: true - /cspell-grammar@8.6.0: - resolution: {integrity: sha512-wVpZ4pPOqRoOmzLUc34wyOQnBi/6RsV3Y1KiPn8BNSkObb9XSohb1xJJMJ69unEmgE0snQDMHIeUaLTQH414MA==} + /cspell-grammar@8.6.1: + resolution: {integrity: sha512-MaG0e/F0b2FnIRULCZ61JxEiJgTP/6rsbUoR5nG9X+WmJYItYmxC1F/FPPrVeTu+jJr/8O4pdnslE20pimHaCw==} engines: {node: '>=18'} hasBin: true dependencies: - '@cspell/cspell-pipe': 8.6.0 - '@cspell/cspell-types': 8.6.0 + '@cspell/cspell-pipe': 8.6.1 + '@cspell/cspell-types': 8.6.1 dev: true - /cspell-io@8.6.0: - resolution: {integrity: sha512-jx7ccRpcshqxN6xnOiGnX4VycaqTpmatRjHITn4vLoDmQNfxQeU69YT62bhyjogCBuJsZS9ksjo7GQIsrYBekA==} + /cspell-io@8.6.1: + resolution: {integrity: sha512-ofxBB8QtUPvh/bOwKLYsqU1hwQCet8E98jkn/5f4jtG+/x5Zd80I0Ez+tlbjiBmrrQfOKh+i8ipfzHD8JtoreQ==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-service-bus': 8.6.0 + '@cspell/cspell-service-bus': 8.6.1 dev: true - /cspell-lib@8.6.0: - resolution: {integrity: sha512-l1bBxBz8noPOxEIIu1Ahvd4e/j6Re1PNDD9FwZgaRmvMyIPZbupTxzCM0MZWvYz1VymBmrrVEKRwtZ34VocaCw==} + /cspell-lib@8.6.1: + resolution: {integrity: sha512-kGeDUypRtThFT81IdUK7yU8eUwO5MYWj8pGQ0N8WFsqbCahJrUdcocceVSpnCX48W3CXu12DkqYG9kv5Umn7Xw==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-bundled-dicts': 8.6.0 - '@cspell/cspell-pipe': 8.6.0 - '@cspell/cspell-resolver': 8.6.0 - '@cspell/cspell-types': 8.6.0 - '@cspell/dynamic-import': 8.6.0 - '@cspell/strong-weak-map': 8.6.0 + '@cspell/cspell-bundled-dicts': 8.6.1 + '@cspell/cspell-pipe': 8.6.1 + '@cspell/cspell-resolver': 8.6.1 + '@cspell/cspell-types': 8.6.1 + '@cspell/dynamic-import': 8.6.1 + '@cspell/strong-weak-map': 8.6.1 clear-module: 4.1.2 comment-json: 4.2.3 configstore: 6.0.0 - cspell-config-lib: 8.6.0 - cspell-dictionary: 8.6.0 - cspell-glob: 8.6.0 - cspell-grammar: 8.6.0 - cspell-io: 8.6.0 - cspell-trie-lib: 8.6.0 + cspell-config-lib: 8.6.1 + cspell-dictionary: 8.6.1 + cspell-glob: 8.6.1 + cspell-grammar: 8.6.1 + cspell-io: 8.6.1 + cspell-trie-lib: 8.6.1 fast-equals: 5.0.1 gensequence: 7.0.0 import-fresh: 3.3.0 @@ -2814,31 +2837,31 @@ packages: vscode-uri: 3.0.8 dev: true - /cspell-trie-lib@8.6.0: - resolution: {integrity: sha512-S8nGCnEJBL1maiKPd3FhI54QG+OgtOkcJ/yUDXGXGrokSruWFdNocioPirlFAHf959ax1GBUVEYNIgnu/EIWNg==} + /cspell-trie-lib@8.6.1: + resolution: {integrity: sha512-iuJuAyWoqTH/TpFAR/ISJGQQoW3oiw54GyvXIucPoCJt/jgQONDuzqPW+skiLvcgcTbXCN9dutZTb2gImIkmpw==} engines: {node: '>=18'} dependencies: - '@cspell/cspell-pipe': 8.6.0 - '@cspell/cspell-types': 8.6.0 + '@cspell/cspell-pipe': 8.6.1 + '@cspell/cspell-types': 8.6.1 gensequence: 7.0.0 dev: true - /cspell@8.6.0: - resolution: {integrity: sha512-aAaVD3v1105OQePCpcdYkHnHxxkxKxxQzFcfJ4tKsH06dlW04Sp1oQLlsjgWDa3y6cdYTpSYj1eSenavBvfOFg==} + /cspell@8.6.1: + resolution: {integrity: sha512-/Qle15v4IQe7tViSWX0+RCZJ2HJ4HUCZV9Z4uOVasNUz+DWCrxysNR+pfCRYuLX/6lQdqCM9QCR9GZc7a2KIVA==} engines: {node: '>=18'} hasBin: true dependencies: - '@cspell/cspell-json-reporter': 8.6.0 - '@cspell/cspell-pipe': 8.6.0 - '@cspell/cspell-types': 8.6.0 - '@cspell/dynamic-import': 8.6.0 + '@cspell/cspell-json-reporter': 8.6.1 + '@cspell/cspell-pipe': 8.6.1 + '@cspell/cspell-types': 8.6.1 + '@cspell/dynamic-import': 8.6.1 chalk: 5.3.0 chalk-template: 1.1.0 commander: 12.0.0 - cspell-gitignore: 8.6.0 - cspell-glob: 8.6.0 - cspell-io: 8.6.0 - cspell-lib: 8.6.0 + cspell-gitignore: 8.6.1 + cspell-glob: 8.6.1 + cspell-io: 8.6.1 + cspell-lib: 8.6.1 fast-glob: 3.3.2 fast-json-stable-stringify: 2.1.0 file-entry-cache: 8.0.0 @@ -3010,17 +3033,7 @@ packages: - supports-color dev: true - /drizzle-orm-crsqlite-wasm@0.0.3(@vlcn.io/xplat-api@0.15.0)(drizzle-orm@0.30.6): - resolution: {integrity: sha512-hkTppNrDfSABGWvnFklY2+8vNcwlFcKQkPksbCTzdiz/xQKftSfcKyhi2uKiCVRVss5yEreCDUDoP9PVVE5+dw==} - peerDependencies: - '@vlcn.io/xplat-api': ^0.15.0 - drizzle-orm: ^0.30.6 - dependencies: - '@vlcn.io/xplat-api': 0.15.0 - drizzle-orm: 0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.64)(better-sqlite3@9.4.3)(react@18.2.0) - dev: false - - /drizzle-orm@0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.64)(better-sqlite3@9.4.3)(react@18.2.0): + /drizzle-orm@0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.74)(better-sqlite3@9.4.5)(react@18.2.0): resolution: {integrity: sha512-8RgNUmY7J03GRuRgBV5SaJNbYgLVPjdSWNS/bRkIMIHt2TFCA439lJsNpqYX8asyKMqkw8ceBiamUnCIXZIt9w==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' @@ -3101,8 +3114,8 @@ packages: optional: true dependencies: '@types/better-sqlite3': 7.6.9 - '@types/react': 18.2.64 - better-sqlite3: 9.4.3 + '@types/react': 18.2.74 + better-sqlite3: 9.4.5 react: 18.2.0 dev: false @@ -3279,35 +3292,35 @@ packages: '@esbuild/win32-x64': 0.19.12 dev: true - /esbuild@0.20.1: - resolution: {integrity: sha512-OJwEgrpWm/PCMsLVWXKqvcjme3bHNpOgN7Tb6cQnR5n0TPbQx1/Xrn7rqM+wn17bYeT6MGB5sn1Bh5YiGi70nA==} + /esbuild@0.20.2: + resolution: {integrity: sha512-WdOOppmUNU+IbZ0PaDiTst80zjnrOkyJNHoKupIcVyU8Lvla3Ugx94VzkQ32Ijqd7UhHJy75gNWDMUekcrSJ6g==} engines: {node: '>=12'} hasBin: true requiresBuild: true optionalDependencies: - '@esbuild/aix-ppc64': 0.20.1 - '@esbuild/android-arm': 0.20.1 - '@esbuild/android-arm64': 0.20.1 - '@esbuild/android-x64': 0.20.1 - '@esbuild/darwin-arm64': 0.20.1 - '@esbuild/darwin-x64': 0.20.1 - '@esbuild/freebsd-arm64': 0.20.1 - '@esbuild/freebsd-x64': 0.20.1 - '@esbuild/linux-arm': 0.20.1 - '@esbuild/linux-arm64': 0.20.1 - '@esbuild/linux-ia32': 0.20.1 - '@esbuild/linux-loong64': 0.20.1 - '@esbuild/linux-mips64el': 0.20.1 - '@esbuild/linux-ppc64': 0.20.1 - '@esbuild/linux-riscv64': 0.20.1 - '@esbuild/linux-s390x': 0.20.1 - '@esbuild/linux-x64': 0.20.1 - '@esbuild/netbsd-x64': 0.20.1 - '@esbuild/openbsd-x64': 0.20.1 - '@esbuild/sunos-x64': 0.20.1 - '@esbuild/win32-arm64': 0.20.1 - '@esbuild/win32-ia32': 0.20.1 - '@esbuild/win32-x64': 0.20.1 + '@esbuild/aix-ppc64': 0.20.2 + '@esbuild/android-arm': 0.20.2 + '@esbuild/android-arm64': 0.20.2 + '@esbuild/android-x64': 0.20.2 + '@esbuild/darwin-arm64': 0.20.2 + '@esbuild/darwin-x64': 0.20.2 + '@esbuild/freebsd-arm64': 0.20.2 + '@esbuild/freebsd-x64': 0.20.2 + '@esbuild/linux-arm': 0.20.2 + '@esbuild/linux-arm64': 0.20.2 + '@esbuild/linux-ia32': 0.20.2 + '@esbuild/linux-loong64': 0.20.2 + '@esbuild/linux-mips64el': 0.20.2 + '@esbuild/linux-ppc64': 0.20.2 + '@esbuild/linux-riscv64': 0.20.2 + '@esbuild/linux-s390x': 0.20.2 + '@esbuild/linux-x64': 0.20.2 + '@esbuild/netbsd-x64': 0.20.2 + '@esbuild/openbsd-x64': 0.20.2 + '@esbuild/sunos-x64': 0.20.2 + '@esbuild/win32-arm64': 0.20.2 + '@esbuild/win32-ia32': 0.20.2 + '@esbuild/win32-x64': 0.20.2 dev: true /escalade@3.1.1: @@ -3338,8 +3351,8 @@ packages: eslint: 8.57.0 dev: true - /eslint-plugin-react-refresh@0.4.5(eslint@8.57.0): - resolution: {integrity: sha512-D53FYKJa+fDmZMtriODxvhwrO+IOqrxoEo21gMA0sjHdU6dPVH4OhyFip9ypl8HOF5RV5KdTo+rBQLvnY2cO8w==} + /eslint-plugin-react-refresh@0.4.6(eslint@8.57.0): + resolution: {integrity: sha512-NjGXdm7zgcKRkKMua34qVO9doI7VOxZ6ancSvBELJSSoX97jyndXcSoa8XBh69JoB31dNz3EEzlMcizZl7LaMA==} peerDependencies: eslint: '>=7' dependencies: @@ -3596,12 +3609,6 @@ packages: - supports-color dev: false - /fastq@1.17.0: - resolution: {integrity: sha512-zGygtijUMT7jnk3h26kUms3BkSDp4IfIKjmnqI2tvx6nuBfiF1UqOxbnLfzdv+apBy+53oaImsKtMw/xYbW+1w==} - dependencies: - reusify: 1.0.4 - dev: false - /fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} dependencies: @@ -4245,12 +4252,11 @@ packages: fast-deep-equal: 3.1.3 dev: false - /json-schema-to-ts@3.0.0: - resolution: {integrity: sha512-2adDesYifYEXYxNySx3gG0RR69rDWIjqAFzK/JPXdOvjHLZ/UP6d2rkpy6a+AxyhtRp2SvFPZ4+EW36jBinUbA==} + /json-schema-to-ts@3.0.1: + resolution: {integrity: sha512-ANphQxnKbzLWPeYDmdoci8C9g9ttpfMx8etTlJJ8UCEmNXH9jxGkn3AAbMe+lR4N5OG/01nYxPrDyugLdsRt+A==} engines: {node: '>=16'} dependencies: '@babel/runtime': 7.23.9 - '@types/json-schema': 7.0.15 ts-algebra: 1.2.2 dev: true @@ -4315,8 +4321,8 @@ packages: json-buffer: 3.0.1 dev: true - /knip@5.0.3(@types/node@20.11.25)(typescript@5.4.2): - resolution: {integrity: sha512-U4bCIkf4aZ3zZSrBaNE8xIdqX1QVhIHXpwUoAW7odx7oajMwa76hUDd9KjlFlb6qAPjdUuTGHjDszIgpfg+Ndg==} + /knip@5.8.0(@types/node@20.12.5)(typescript@5.4.4): + resolution: {integrity: sha512-q7/3eULypxgjT2EWWt3lly7hbQteKpRj04mfqPMjPb8CPWnF1GzyQtXr++eO0r6pAvSegLlhi/NFmG56sM6pfw==} engines: {node: '>=18.6.0'} hasBin: true peerDependencies: @@ -4328,9 +4334,9 @@ packages: '@npmcli/map-workspaces': 3.0.4 '@npmcli/package-json': 5.0.0 '@pnpm/logger': 5.0.0 - '@pnpm/workspace.pkgs-graph': 2.0.14(@pnpm/logger@5.0.0) + '@pnpm/workspace.pkgs-graph': 2.0.16(@pnpm/logger@5.0.0) '@snyk/github-codeowners': 1.1.0 - '@types/node': 20.11.25 + '@types/node': 20.12.5 '@types/picomatch': 2.3.3 easy-table: 1.2.0 fast-glob: 3.3.2 @@ -4341,13 +4347,13 @@ packages: picocolors: 1.0.0 picomatch: 4.0.1 pretty-ms: 9.0.0 - semver: 7.6.0 + resolve: 1.22.8 smol-toml: 1.1.4 strip-json-comments: 5.0.1 summary: 2.1.0 - typescript: 5.4.2 + typescript: 5.4.4 zod: 3.22.4 - zod-validation-error: 3.0.2(zod@3.22.4) + zod-validation-error: 3.1.0(zod@3.22.4) transitivePeerDependencies: - bluebird - domexception @@ -4857,6 +4863,10 @@ packages: engines: {node: '>=12'} dev: true + /path-parse@1.0.7: + resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} + dev: true + /path-scurry@1.10.1: resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} engines: {node: '>=16 || 14 >=14.17'} @@ -4905,8 +4915,8 @@ packages: split2: 4.2.0 dev: false - /pino-pretty@10.3.1: - resolution: {integrity: sha512-az8JbIYeN/1iLj2t0jR9DV48/LQ3RC6hZPpapKPkb84Q+yTidMCpgWxIT3N0flnBDilyBQ1luWNpOeJptjdp/g==} + /pino-pretty@11.0.0: + resolution: {integrity: sha512-YFJZqw59mHIY72wBnBs7XhLGG6qpJMa4pEQTRgEPEbjIYbng2LXEZZF1DoyDg9CfejEy8uZCyzpcBXXG0oOCwQ==} hasBin: true dependencies: colorette: 2.0.20 @@ -5016,13 +5026,13 @@ packages: source-map-js: 1.0.2 dev: true - /postcss@8.4.35: - resolution: {integrity: sha512-u5U8qYpBCpN13BsiEB0CbR1Hhh4Gc0zLFuedrHJKMctHCHAGrMdG0PRM/KErzAL3CU6/eckEtmHNB3x6e3c0vA==} + /postcss@8.4.38: + resolution: {integrity: sha512-Wglpdk03BSfXkHoQa3b/oulrotAkwrlLDRSOb9D0bN86FdRyE9lppSp33aHNPgBa0JKCoB+drFLZkQoRRYae5A==} engines: {node: ^10 || ^12 || >=14} dependencies: nanoid: 3.3.7 picocolors: 1.0.0 - source-map-js: 1.0.2 + source-map-js: 1.2.0 dev: true /prebuild-install@7.1.1: @@ -5264,6 +5274,15 @@ packages: resolution: {integrity: sha512-seS2Tj26TBVOC2NIc2rOe2y2ZO7efxITtLZcGSOnHHNOQ7CkiUBfw0Iw2ck6xkIhPwLhKNLS8BO+hEpngQlqzw==} dev: true + /resolve@1.22.8: + resolution: {integrity: sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw==} + hasBin: true + dependencies: + is-core-module: 2.13.1 + path-parse: 1.0.7 + supports-preserve-symlinks-flag: 1.0.0 + dev: true + /ret@0.2.2: resolution: {integrity: sha512-M0b3YWQs7R3Z917WRQy1HHA7Ba7D8hvZg6UE5mLykJxQVE2ju0IXbGlaHPPlkY+WN7wFP+wUMXmBFA0aV6vYGQ==} engines: {node: '>=4'} @@ -5317,26 +5336,28 @@ packages: yargs: 17.7.2 dev: true - /rollup@4.9.6: - resolution: {integrity: sha512-05lzkCS2uASX0CiLFybYfVkwNbKZG5NFQ6Go0VWyogFTXXbR039UVsegViTntkk4OglHBdF54ccApXRRuXRbsg==} + /rollup@4.14.0: + resolution: {integrity: sha512-Qe7w62TyawbDzB4yt32R0+AbIo6m1/sqO7UPzFS8Z/ksL5mrfhA0v4CavfdmFav3D+ub4QeAgsGEe84DoWe/nQ==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true dependencies: '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.6 - '@rollup/rollup-android-arm64': 4.9.6 - '@rollup/rollup-darwin-arm64': 4.9.6 - '@rollup/rollup-darwin-x64': 4.9.6 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.6 - '@rollup/rollup-linux-arm64-gnu': 4.9.6 - '@rollup/rollup-linux-arm64-musl': 4.9.6 - '@rollup/rollup-linux-riscv64-gnu': 4.9.6 - '@rollup/rollup-linux-x64-gnu': 4.9.6 - '@rollup/rollup-linux-x64-musl': 4.9.6 - '@rollup/rollup-win32-arm64-msvc': 4.9.6 - '@rollup/rollup-win32-ia32-msvc': 4.9.6 - '@rollup/rollup-win32-x64-msvc': 4.9.6 + '@rollup/rollup-android-arm-eabi': 4.14.0 + '@rollup/rollup-android-arm64': 4.14.0 + '@rollup/rollup-darwin-arm64': 4.14.0 + '@rollup/rollup-darwin-x64': 4.14.0 + '@rollup/rollup-linux-arm-gnueabihf': 4.14.0 + '@rollup/rollup-linux-arm64-gnu': 4.14.0 + '@rollup/rollup-linux-arm64-musl': 4.14.0 + '@rollup/rollup-linux-powerpc64le-gnu': 4.14.0 + '@rollup/rollup-linux-riscv64-gnu': 4.14.0 + '@rollup/rollup-linux-s390x-gnu': 4.14.0 + '@rollup/rollup-linux-x64-gnu': 4.14.0 + '@rollup/rollup-linux-x64-musl': 4.14.0 + '@rollup/rollup-win32-arm64-msvc': 4.14.0 + '@rollup/rollup-win32-ia32-msvc': 4.14.0 + '@rollup/rollup-win32-x64-msvc': 4.14.0 fsevents: 2.3.3 dev: true @@ -5477,6 +5498,11 @@ packages: engines: {node: '>=0.10.0'} dev: true + /source-map-js@1.2.0: + resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} + engines: {node: '>=0.10.0'} + dev: true + /source-map-support@0.5.21: resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} dependencies: @@ -5639,6 +5665,11 @@ packages: has-flag: 4.0.0 dev: true + /supports-preserve-symlinks-flag@1.0.0: + resolution: {integrity: sha512-ot0WnXS9fgdkgIcePe6RHNk1WA8+muPa6cSjeR3V8K27q9BB1rTE3R1p7Hv0z1ZyAc8s6Vvv8DIyWf681MAt0w==} + engines: {node: '>= 0.4'} + dev: true + /tar-fs@2.1.1: resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} dependencies: @@ -5738,21 +5769,21 @@ packages: resolution: {integrity: sha512-kloPhf1hq3JbCPOTYoOWDKxebWjNb2o/LKnNfkWhxVVisFFmMJPPdJeGoGmM+iRLyoXAR61e08Pb+vUXINg8aA==} dev: true - /ts-api-utils@1.0.3(typescript@5.4.2): + /ts-api-utils@1.0.3(typescript@5.4.4): resolution: {integrity: sha512-wNMeqtMz5NtwpT/UZGY5alT+VoKdSsOOP/kqHFcUW1P/VRhH2wJ48+DN2WwUliNbQ976ETwDL0Ifd2VVvgonvg==} engines: {node: '>=16.13.0'} peerDependencies: typescript: '>=4.2.0' dependencies: - typescript: 5.4.2 + typescript: 5.4.4 dev: true /tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} dev: false - /tsx@4.7.1: - resolution: {integrity: sha512-8d6VuibXHtlN5E3zFkgY8u4DX7Y3Z27zvvPKVmLon/D4AjuKzarkUBTLDBgj9iTQ0hg5xM7c/mYiRVM+HETf0g==} + /tsx@4.7.2: + resolution: {integrity: sha512-BCNd4kz6fz12fyrgCTEdZHGJ9fWTGeUzXmQysh0RVocDY3h4frk05ZNCXSy4kIenF7y/QnrdiVpTsyNRn6vlAw==} engines: {node: '>=18.0.0'} hasBin: true dependencies: @@ -5773,64 +5804,64 @@ packages: engines: {node: '>=0.6.11 <=0.7.0 || >=0.7.3'} dev: true - /turbo-darwin-64@1.12.5: - resolution: {integrity: sha512-0GZ8reftwNQgIQLHkHjHEXTc/Z1NJm+YjsrBP+qhM/7yIZ3TEy9gJhuogDt2U0xIWwFgisTyzbtU7xNaQydtoA==} + /turbo-darwin-64@1.13.2: + resolution: {integrity: sha512-CCSuD8CfmtncpohCuIgq7eAzUas0IwSbHfI8/Q3vKObTdXyN8vAo01gwqXjDGpzG9bTEVedD0GmLbD23dR0MLA==} cpu: [x64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-darwin-arm64@1.12.5: - resolution: {integrity: sha512-8WpOLNNzvH6kohQOjihD+gaWL+ZFNfjvBwhOF0rjEzvW+YR3Pa7KjhulrjWyeN2yMFqAPubTbZIGOz1EVXLuQA==} + /turbo-darwin-arm64@1.13.2: + resolution: {integrity: sha512-0HySm06/D2N91rJJ89FbiI/AodmY8B3WDSFTVEpu2+8spUw7hOJ8okWOT0e5iGlyayUP9gr31eOeL3VFZkpfCw==} cpu: [arm64] os: [darwin] requiresBuild: true dev: true optional: true - /turbo-linux-64@1.12.5: - resolution: {integrity: sha512-INit73+bNUpwqGZCxgXCR3I+cQsdkQ3/LkfkgSOibkpg+oGqxJRzeXw3sp990d7SCoE8QOcs3iw+PtiFX/LDAA==} + /turbo-linux-64@1.13.2: + resolution: {integrity: sha512-7HnibgbqZrjn4lcfIouzlPu8ZHSBtURG4c7Bedu7WJUDeZo+RE1crlrQm8wuwO54S0siYqUqo7GNHxu4IXbioQ==} cpu: [x64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-linux-arm64@1.12.5: - resolution: {integrity: sha512-6lkRBvxtI/GQdGtaAec9LvVQUoRw6nXFp0kM+Eu+5PbZqq7yn6cMkgDJLI08zdeui36yXhone8XGI8pHg8bpUQ==} + /turbo-linux-arm64@1.13.2: + resolution: {integrity: sha512-sUq4dbpk6SNKg/Hkwn256Vj2AEYSQdG96repio894h5/LEfauIK2QYiC/xxAeW3WBMc6BngmvNyURIg7ltrePg==} cpu: [arm64] os: [linux] requiresBuild: true dev: true optional: true - /turbo-windows-64@1.12.5: - resolution: {integrity: sha512-gQYbOhZg5Ww0bQ/bC0w/4W6yQRwBumUUnkB+QPo15VznwxZe2a7bo6JM+9Xy9dKLa/kn+p7zTqme4OEp6M3/Yg==} + /turbo-windows-64@1.13.2: + resolution: {integrity: sha512-DqzhcrciWq3dpzllJR2VVIyOhSlXYCo4mNEWl98DJ3FZ08PEzcI3ceudlH6F0t/nIcfSItK1bDP39cs7YoZHEA==} cpu: [x64] os: [win32] requiresBuild: true dev: true optional: true - /turbo-windows-arm64@1.12.5: - resolution: {integrity: sha512-auvhZ9FrhnvQ4mgBlY9O68MT4dIfprYGvd2uPICba/mHUZZvVy5SGgbHJ0KbMwaJfnnFoPgLJO6M+3N2gDprKw==} + /turbo-windows-arm64@1.13.2: + resolution: {integrity: sha512-WnPMrwfCXxK69CdDfS1/j2DlzcKxSmycgDAqV0XCYpK/812KB0KlvsVAt5PjEbZGXkY88pCJ1BLZHAjF5FcbqA==} cpu: [arm64] os: [win32] requiresBuild: true dev: true optional: true - /turbo@1.12.5: - resolution: {integrity: sha512-FATU5EnhrYG8RvQJYFJnDd18DpccDjyvd53hggw9T9JEg9BhWtIEoeaKtBjYbpXwOVrJQMDdXcIB4f2nD3QPPg==} + /turbo@1.13.2: + resolution: {integrity: sha512-rX/d9f4MgRT3yK6cERPAkfavIxbpBZowDQpgvkYwGMGDQ0Nvw1nc0NVjruE76GrzXQqoxR1UpnmEP54vBARFHQ==} hasBin: true optionalDependencies: - turbo-darwin-64: 1.12.5 - turbo-darwin-arm64: 1.12.5 - turbo-linux-64: 1.12.5 - turbo-linux-arm64: 1.12.5 - turbo-windows-64: 1.12.5 - turbo-windows-arm64: 1.12.5 + turbo-darwin-64: 1.13.2 + turbo-darwin-arm64: 1.13.2 + turbo-linux-64: 1.13.2 + turbo-linux-arm64: 1.13.2 + turbo-windows-64: 1.13.2 + turbo-windows-arm64: 1.13.2 dev: true /type-check@0.4.0: @@ -5890,8 +5921,8 @@ packages: is-typedarray: 1.0.0 dev: true - /typescript@5.4.2: - resolution: {integrity: sha512-+2/g0Fds1ERlP6JsakQQDXjZdZMM+rqpamFZJEKh4kwTIn3iDkgKtby0CeNd5ATNZ4Ry1ax15TMx0W2V+miizQ==} + /typescript@5.4.4: + resolution: {integrity: sha512-dGE2Vv8cpVvw28v8HCPqyb08EzbBURxDpuhJvTrusShUfGnhHBafDsLdS1EhhxyL6BJQE+2cT3dDPAv+MQ6oLw==} engines: {node: '>=14.17'} hasBin: true dev: true @@ -5979,8 +6010,8 @@ packages: semver: 7.6.0 dev: true - /vite-node@1.3.1(@types/node@20.11.25): - resolution: {integrity: sha512-azbRrqRxlWTJEVbzInZCTchx0X69M/XPTCz4H+TLvlTcR/xH/3hkRqhOakT41fMJCMzXTu4UvegkZiEoJAWvng==} + /vite-node@1.4.0(@types/node@20.12.5): + resolution: {integrity: sha512-VZDAseqjrHgNd4Kh8icYHWzTKSCZMhia7GyHfhtzLW33fZlG9SwsB6CEhgyVOWkJfJ2pFLrp/Gj1FSfAiqH9Lw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true dependencies: @@ -5988,7 +6019,7 @@ packages: debug: 4.3.4 pathe: 1.1.2 picocolors: 1.0.0 - vite: 5.1.5(@types/node@20.11.25) + vite: 5.2.8(@types/node@20.12.5) transitivePeerDependencies: - '@types/node' - less @@ -6000,8 +6031,8 @@ packages: - terser dev: true - /vite@5.1.5(@types/node@20.11.25): - resolution: {integrity: sha512-BdN1xh0Of/oQafhU+FvopafUp6WaYenLU/NFoL5WyJL++GxkNfieKzBhM24H3HVsPQrlAqB7iJYTHabzaRed5Q==} + /vite@5.2.8(@types/node@20.12.5): + resolution: {integrity: sha512-OyZR+c1CE8yeHw5V5t59aXsUPPVTHMDjEZz8MgguLL/Q7NblxhZUlTu9xSPqlsUO/y+X7dlU05jdhvyycD55DA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -6028,33 +6059,33 @@ packages: terser: optional: true dependencies: - '@types/node': 20.11.25 - esbuild: 0.19.12 - postcss: 8.4.35 - rollup: 4.9.6 + '@types/node': 20.12.5 + esbuild: 0.20.2 + postcss: 8.4.38 + rollup: 4.14.0 optionalDependencies: fsevents: 2.3.3 dev: true - /vitest-github-actions-reporter@0.11.1(vitest@1.3.1): + /vitest-github-actions-reporter@0.11.1(vitest@1.4.0): resolution: {integrity: sha512-ZHHB0wBgOPhMYCB17WKVlJZa+5SdudBZFoVoebwfq3ioIUTeLQGYHwh85vpdJAxRghLP8d0qI/6eCTueGyDVXA==} engines: {node: '>=14.16.0'} peerDependencies: vitest: '>=0.28.5' dependencies: '@actions/core': 1.10.1 - vitest: 1.3.1(@types/node@20.11.25) + vitest: 1.4.0(@types/node@20.12.5) dev: true - /vitest@1.3.1(@types/node@20.11.25): - resolution: {integrity: sha512-/1QJqXs8YbCrfv/GPQ05wAZf2eakUPLPa18vkJAKE7RXOKfVHqMZZ1WlTjiwl6Gcn65M5vpNUB6EFLnEdRdEXQ==} + /vitest@1.4.0(@types/node@20.12.5): + resolution: {integrity: sha512-gujzn0g7fmwf83/WzrDTnncZt2UiXP41mHuFYFrdwaLRVQ6JYQEiME2IfEjU3vcFL3VKa75XhI3lFgn+hfVsQw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 1.3.1 - '@vitest/ui': 1.3.1 + '@vitest/browser': 1.4.0 + '@vitest/ui': 1.4.0 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -6071,12 +6102,12 @@ packages: jsdom: optional: true dependencies: - '@types/node': 20.11.25 - '@vitest/expect': 1.3.1 - '@vitest/runner': 1.3.1 - '@vitest/snapshot': 1.3.1 - '@vitest/spy': 1.3.1 - '@vitest/utils': 1.3.1 + '@types/node': 20.12.5 + '@vitest/expect': 1.4.0 + '@vitest/runner': 1.4.0 + '@vitest/snapshot': 1.4.0 + '@vitest/spy': 1.4.0 + '@vitest/utils': 1.4.0 acorn-walk: 8.3.2 chai: 4.4.1 debug: 4.3.4 @@ -6089,8 +6120,8 @@ packages: strip-literal: 2.0.0 tinybench: 2.6.0 tinypool: 0.8.2 - vite: 5.1.5(@types/node@20.11.25) - vite-node: 1.3.1(@types/node@20.11.25) + vite: 5.2.8(@types/node@20.12.5) + vite-node: 1.4.0(@types/node@20.12.5) why-is-node-running: 2.2.2 transitivePeerDependencies: - less @@ -6252,8 +6283,8 @@ packages: engines: {node: '>=12.20'} dev: true - /zod-validation-error@3.0.2(zod@3.22.4): - resolution: {integrity: sha512-21xGaDmnU7lJZ4J63n5GXWqi+rTzGy3gDHbuZ1jP6xrK/DEQGyOqs/xW7eH96tIfCOYm+ecCuT0bfajBRKEVUw==} + /zod-validation-error@3.1.0(zod@3.22.4): + resolution: {integrity: sha512-zujS6HqJjMZCsvjfbnRs7WI3PXN39ovTcY1n8a+KTm4kOH0ZXYsNiJkH1odZf4xZKMkBDL7M2rmQ913FCS1p9w==} engines: {node: '>=18.0.0'} peerDependencies: zod: ^3.18.0 @@ -6264,3 +6295,15 @@ packages: /zod@3.22.4: resolution: {integrity: sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==} dev: true + + file:../../drizzle-orm-crsqlite-wasm(@vlcn.io/xplat-api@0.15.0)(drizzle-orm@0.30.6): + resolution: {directory: ../../drizzle-orm-crsqlite-wasm, type: directory} + id: file:../../drizzle-orm-crsqlite-wasm + name: drizzle-orm-crsqlite-wasm + peerDependencies: + '@vlcn.io/xplat-api': ^0.15.0 + drizzle-orm: ^0.30.6 + dependencies: + '@vlcn.io/xplat-api': 0.15.0 + drizzle-orm: 0.30.6(@types/better-sqlite3@7.6.9)(@types/react@18.2.74)(better-sqlite3@9.4.5)(react@18.2.0) + dev: false diff --git a/script/src/readableSize.ts b/script/src/readableSize.ts index c706bb2..528f857 100644 --- a/script/src/readableSize.ts +++ b/script/src/readableSize.ts @@ -1,6 +1,5 @@ export function readableSize(size: number) { - const i = Math.floor(Math.log(size) / Math.log(1024)) - return ( - (size / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 2) + " " + ["B", "kB", "MB", "GB", "TB"][i] - ) + const i = Math.min(4, Math.floor(Math.log(size) / Math.log(1024))) + const unit = ["B", "kB", "MB", "GB", "TB"][i]! + return (size / Math.pow(1024, i)).toFixed(i === 0 ? 0 : 2) + " " + unit } diff --git a/server/src/api/helpers.ts b/server/src/api/helpers.ts index 806dca8..113db49 100644 --- a/server/src/api/helpers.ts +++ b/server/src/api/helpers.ts @@ -5,16 +5,16 @@ import type { RawRequestDefaultExpression, } from "fastify/types/utils" import type { FromSchema } from "json-schema-to-ts" -import type { JSONSchema7 } from "json-schema-to-ts/lib/types/definitions" +import type { JSONSchema } from "json-schema-to-ts/lib/types/definitions" import type { NoInfer, Prettify } from "shared/typeHelpers" export type BaseSchema = { - body?: JSONSchema7 & { type: "object" } - querystring?: JSONSchema7 & { type: "object" } - params?: JSONSchema7 & { type: "object" } - headers?: JSONSchema7 & { type: "object" } + body?: JSONSchema & { type: "object" } + querystring?: JSONSchema & { type: "object" } + params?: JSONSchema & { type: "object" } + headers?: JSONSchema & { type: "object" } response?: { - [key in HttpKeys]?: JSONSchema7 & { type: "object" | "string" | "array" } + [key in HttpKeys]?: JSONSchema & { type: "object" | "string" | "array" } } } @@ -49,7 +49,7 @@ type SchemaToRouteGeneric = { : never } : never - : Schema[Key] extends JSONSchema7 + : Schema[Key] extends JSONSchema ? FromSchema : never } diff --git a/server/src/crsqlite/db.ts b/server/src/crsqlite/db.ts index 8db6e5d..0caf5fa 100644 --- a/server/src/crsqlite/db.ts +++ b/server/src/crsqlite/db.ts @@ -5,6 +5,9 @@ import { extensionPath } from "@vlcn.io/crsqlite" import { cryb64, type Change, type Changes } from "@vlcn.io/ws-common" import { sql } from "shared/sql" import { makeDbLogger } from "server/utils/dbLogger" +import { drizzle } from "drizzle-orm/better-sqlite3" +import { migrate } from "drizzle-orm/better-sqlite3/migrator" +import { schema } from "assets/drizzle-test" export type CrsqliteDatabase = Database.Database & { getChanges(sinceVersion: bigint, requestorSiteId: Uint8Array): Change[] @@ -72,7 +75,7 @@ export function makeCrsqliteDb( name?: string version: bigint dbPath?: string - schema: string + // schema: string } ) { const name = @@ -80,55 +83,22 @@ export function makeCrsqliteDb( ? path.join(options.dbPath, `${options.name}.sqlite3`) : ":memory:" fastify.log.info(`Connecting to database @ ${name}`) - const db = new Database(name, { + const client = new Database(name, { verbose: makeDbLogger(fastify), }) - db.pragma("journal_mode = WAL") - db.pragma("synchronous = NORMAL") - db.loadExtension(extensionPath) + client.pragma("journal_mode = WAL") + client.pragma("synchronous = NORMAL") + client.loadExtension(extensionPath) + const db = drizzle(client, { logger: true, schema }) try { - // auto-migrate - const masterStatement = db - .prepare(sql`SELECT value FROM crsql_master WHERE key = ?`) - .pluck() - - const schemaVersion = masterStatement.safeIntegers().get("schema_version") as - | bigint - | undefined - if (options.version === schemaVersion) { - return wrapDatabase(db) - } - if (schemaVersion) { - fastify.log.warn( - `Mismatch schema version for database "${name}". Client requested v${options.version} but server is on v${schemaVersion}. Will try to auto-migrate...` - ) - } else { - fastify.log.info(`First client request for database "${name}". Initializing...`) - } - - const content = options.schema.replace(/[\s\n\t]+/g, " ").trim() - - const residentVersion = cryb64(content) - if (residentVersion !== options.version) { - throw new Error( - `Server has schema version v${residentVersion} but client requested v${options.version} for database "${name}"` - ) - } - - const autoMigrateStatement = db.prepare(sql`SELECT crsql_automigrate(?)`) - const masterInsertStatement = db.prepare( - sql`INSERT OR REPLACE INTO crsql_master (key, value) VALUES (?, ?)` - ) - db.transaction(() => { - autoMigrateStatement.run(content) - masterInsertStatement.run("schema_version", options.version.toString()) - })() + migrate(db, { migrationsFolder: "../../../assets/src/drizzle-test/migrations" }) } catch (e) { - db.prepare(sql`SELECT crsql_finalize()`).run() - db.close() + client.prepare(sql`SELECT crsql_finalize()`).run() + client.close() throw e } - return wrapDatabase(db) + const wrapped = wrapDatabase(client) + return { db, client: wrapped } } diff --git a/server/src/crsqlite/index.ts b/server/src/crsqlite/index.ts index 115167c..df7e48a 100644 --- a/server/src/crsqlite/index.ts +++ b/server/src/crsqlite/index.ts @@ -2,8 +2,9 @@ import type { FastifyInstance, FastifyError } from "fastify" import { makeCrsqliteDb, type CrsqliteDatabase } from "server/crsqlite/db" import { encode, decode, tags, hexToBytes } from "@vlcn.io/ws-common" import { compressBuffer } from "script/compressBuffer" -import schema from "assets/test-v0.sql" +import { type schema } from "assets/drizzle-test" import type { SqliteError } from "server/types/Sqlite" +import type { BetterSQLite3Database } from "drizzle-orm/better-sqlite3" export default function crsqlite( fastify: FastifyInstance, @@ -30,14 +31,15 @@ export default function crsqlite( name: string version: bigint dbPath?: string - db: CrsqliteDatabase + client: CrsqliteDatabase + db: BetterSQLite3Database } | null = null fastify.addHook("onClose", (fastify, done) => { if (lastDb) { fastify.log.info("Closing crsqlite database...") console.log("Closing crsqlite database...") - lastDb.db.close() + lastDb.client.close() lastDb = null fastify.log.info("Closed crsqlite database") console.log("Closed crsqlite database") @@ -54,12 +56,12 @@ export default function crsqlite( ) { return lastDb.db } - lastDb?.db.close() + lastDb?.client.close() lastDb = null - const db = makeCrsqliteDb(fastify, { + const { db, client } = makeCrsqliteDb(fastify, { name, version, - schema, + // schema, dbPath, }) lastDb = { @@ -67,6 +69,7 @@ export default function crsqlite( version, dbPath, db, + client, } return db } @@ -113,7 +116,7 @@ export default function crsqlite( done() }, async handler(req, res) { - let db: CrsqliteDatabase + let db: BetterSQLite3Database try { db = getDb(req.params.name, BigInt(req.query.schemaVersion)) } catch (e: any) { @@ -130,6 +133,7 @@ export default function crsqlite( } throw error } + throw new Error("Not implemented") const data = new Uint8Array((req.body as { raw: Buffer }).raw) if (data.length > 0) { diff --git a/server/tsconfig.app.json b/server/tsconfig.app.json index 43a1b98..9e3c6c0 100644 --- a/server/tsconfig.app.json +++ b/server/tsconfig.app.json @@ -11,6 +11,7 @@ "types/*.d.ts", "../types/*.d.ts", "../shared/src/**/*.ts", + "../assets/src/**/*.ts", "../script/src/**/*.ts" ] } diff --git a/shared/src/drizzle-migrations/0000_nervous_black_queen.sql b/shared/src/drizzle-migrations/0000_nervous_black_queen.sql deleted file mode 100644 index 6d6070c..0000000 --- a/shared/src/drizzle-migrations/0000_nervous_black_queen.sql +++ /dev/null @@ -1,16 +0,0 @@ -CREATE TABLE `cities` ( - `id` TEXT NOT NULL PRIMARY KEY, - `name` text, - `country_id` text -); ---> statement-breakpoint -SELECT crsql_as_crr ('cities'); ---> statement-breakpoint -CREATE TABLE `countries` ( - `id` TEXT NOT NULL PRIMARY KEY, - `name` text -); ---> statement-breakpoint -SELECT crsql_as_crr ('countries'); ---> statement-breakpoint -CREATE INDEX `nameIdx` ON `countries` (`name`); \ No newline at end of file diff --git a/shared/src/drizzle-migrations/0001_loving_madame_hydra.sql b/shared/src/drizzle-migrations/0001_loving_madame_hydra.sql deleted file mode 100644 index 62b5e84..0000000 --- a/shared/src/drizzle-migrations/0001_loving_madame_hydra.sql +++ /dev/null @@ -1,11 +0,0 @@ -SELECT crsql_begin_alter('cities'); ---> statement-breakpoint -ALTER TABLE cities ADD `population` integer; ---> statement-breakpoint -SELECT crsql_commit_alter('cities'); ---> statement-breakpoint -SELECT crsql_begin_alter('countries'); ---> statement-breakpoint -ALTER TABLE countries ADD `population` integer; ---> statement-breakpoint -SELECT crsql_commit_alter('countries'); \ No newline at end of file diff --git a/shared/src/drizzle-migrations/index.ts b/shared/src/drizzle-migrations/index.ts deleted file mode 100644 index f8109ba..0000000 --- a/shared/src/drizzle-migrations/index.ts +++ /dev/null @@ -1,5 +0,0 @@ -export const migrations = Object.fromEntries( - Object.entries( - import.meta.glob("./*.sql", { eager: true, query: "?raw", import: "default" }) - ).map(([key, value]) => [key.slice(2, -4), value]) -) diff --git a/shared/src/drizzle-migrations/meta/0000_snapshot.json b/shared/src/drizzle-migrations/meta/0000_snapshot.json deleted file mode 100644 index 90abd79..0000000 --- a/shared/src/drizzle-migrations/meta/0000_snapshot.json +++ /dev/null @@ -1,89 +0,0 @@ -{ - "version": "5", - "dialect": "sqlite", - "id": "80e880bd-65df-470a-89d5-642e20655222", - "prevId": "00000000-0000-0000-0000-000000000000", - "tables": { - "cities": { - "name": "cities", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country_id": { - "name": "country_id", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cities_country_id_countries_id_fk": { - "name": "cities_country_id_countries_id_fk", - "tableFrom": "cities", - "tableTo": "countries", - "columnsFrom": [ - "country_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "countries": { - "name": "countries", - "columns": { - "id": { - "name": "id", - "type": "integer", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "nameIdx": { - "name": "nameIdx", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/shared/src/drizzle-migrations/meta/0001_snapshot.json b/shared/src/drizzle-migrations/meta/0001_snapshot.json deleted file mode 100644 index 34e9c3b..0000000 --- a/shared/src/drizzle-migrations/meta/0001_snapshot.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "version": "5", - "dialect": "sqlite", - "id": "e3a94504-f960-4e13-8de0-cc85a48e2378", - "prevId": "80e880bd-65df-470a-89d5-642e20655222", - "tables": { - "cities": { - "name": "cities", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country_id": { - "name": "country_id", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "population": { - "name": "population", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cities_country_id_countries_id_fk": { - "name": "cities_country_id_countries_id_fk", - "tableFrom": "cities", - "tableTo": "countries", - "columnsFrom": [ - "country_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "countries": { - "name": "countries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "population": { - "name": "population", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "nameIdx": { - "name": "nameIdx", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/shared/src/drizzle-migrations/meta/0002_snapshot.json b/shared/src/drizzle-migrations/meta/0002_snapshot.json deleted file mode 100644 index 5032a00..0000000 --- a/shared/src/drizzle-migrations/meta/0002_snapshot.json +++ /dev/null @@ -1,103 +0,0 @@ -{ - "version": "5", - "dialect": "sqlite", - "id": "7998d8cd-050a-460d-a1af-472126b0453f", - "prevId": "e3a94504-f960-4e13-8de0-cc85a48e2378", - "tables": { - "cities": { - "name": "cities", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "country_id": { - "name": "country_id", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "population": { - "name": "population", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": {}, - "foreignKeys": { - "cities_country_id_countries_id_fk": { - "name": "cities_country_id_countries_id_fk", - "tableFrom": "cities", - "tableTo": "countries", - "columnsFrom": [ - "country_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "countries": { - "name": "countries", - "columns": { - "id": { - "name": "id", - "type": "text", - "primaryKey": true, - "notNull": true, - "autoincrement": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false, - "autoincrement": false - }, - "population": { - "name": "population", - "type": "integer", - "primaryKey": false, - "notNull": false, - "autoincrement": false - } - }, - "indexes": { - "nameIdx": { - "name": "nameIdx", - "columns": [ - "name" - ], - "isUnique": true - } - }, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/shared/src/drizzle-migrations/meta/_journal.json b/shared/src/drizzle-migrations/meta/_journal.json deleted file mode 100644 index 91a80e3..0000000 --- a/shared/src/drizzle-migrations/meta/_journal.json +++ /dev/null @@ -1,20 +0,0 @@ -{ - "version": "5", - "dialect": "sqlite", - "entries": [ - { - "idx": 0, - "version": "5", - "when": 1710699044633, - "tag": "0000_nervous_black_queen", - "breakpoints": true - }, - { - "idx": 1, - "version": "5", - "when": 1710708236564, - "tag": "0001_loving_madame_hydra", - "breakpoints": true - } - ] -} diff --git a/shared/src/drizzle-test/schema.ts b/shared/src/drizzle-test/schema.ts deleted file mode 100644 index 689877a..0000000 --- a/shared/src/drizzle-test/schema.ts +++ /dev/null @@ -1,32 +0,0 @@ -import { sqliteTable, text, integer, index } from "drizzle-orm/sqlite-core" -import { relations } from "drizzle-orm" - -export const countries = sqliteTable( - "countries", - { - id: text("id").primaryKey(), - name: text("name"), - population: integer("population"), - }, - (countries) => ({ - nameIdx: index("nameIdx").on(countries.name), - }) -) - -export const countriesRelations = relations(countries, ({ many }) => ({ - cities: many(cities), -})) - -export const cities = sqliteTable("cities", { - id: text("id").primaryKey(), - name: text("name"), - countryId: text("country_id").references(() => countries.id), - population: integer("population"), -}) - -export const citiesRelations = relations(cities, ({ one }) => ({ - country: one(countries, { - fields: [cities.countryId], - references: [countries.id], - }), -})) diff --git a/tsconfig.tools.json b/tsconfig.tools.json index f9a1ccd..743109b 100644 --- a/tsconfig.tools.json +++ b/tsconfig.tools.json @@ -7,5 +7,5 @@ "module": "ESNext" }, "include": [], - "files": ["vitest.workspace.ts", "drizzle.config.ts"] + "files": ["vitest.workspace.ts"] }