From f264de3d02dddab745368b9ecc867e4964da61c5 Mon Sep 17 00:00:00 2001 From: Meno Abels Date: Wed, 15 Jan 2025 10:39:43 +0100 Subject: [PATCH 001/183] chore: initial backend --- .eslintrc.cjs | 6 +- .github/workflows/ci.yaml | 40 + .prettierignore | 5 + .prettierrc | 6 + README.md | 1 + backend/api.ts | 534 ++++++++++++ backend/db-api-schema.ts | 62 ++ backend/db-api.test.ts | 142 ++++ drizzle.config.ts | 9 + eslint.config.js | 35 +- eslint.config.mjs | 36 + index.html | 2 +- package.json | 15 +- pnpm-lock.yaml | 1330 ++++++++++++++++++++++++++++-- postcss.config.js | 2 +- src/components/CodeHighlight.tsx | 22 +- src/components/DynamicTable.tsx | 25 +- src/components/FireproofMenu.tsx | 6 +- src/components/Sidebar.tsx | 26 +- src/layouts/app.tsx | 72 +- src/pages/databases/connect.tsx | 4 +- src/pages/databases/history.tsx | 5 +- src/pages/databases/index.tsx | 8 +- src/pages/databases/new.tsx | 9 +- src/pages/databases/query.tsx | 32 +- src/pages/databases/show.tsx | 91 +- src/pages/docs/show.tsx | 19 +- src/routes.tsx | 30 +- tailwind.config.js | 3 +- vite.config.js => vite.config.ts | 10 +- vitest.config.ts | 7 + 31 files changed, 2198 insertions(+), 396 deletions(-) create mode 100644 .github/workflows/ci.yaml create mode 100644 .prettierignore create mode 100644 .prettierrc create mode 100644 backend/api.ts create mode 100644 backend/db-api-schema.ts create mode 100644 backend/db-api.test.ts create mode 100644 drizzle.config.ts create mode 100644 eslint.config.mjs rename vite.config.js => vite.config.ts (77%) create mode 100644 vitest.config.ts diff --git a/.eslintrc.cjs b/.eslintrc.cjs index 4f6f59e..0a90d39 100644 --- a/.eslintrc.cjs +++ b/.eslintrc.cjs @@ -66,11 +66,7 @@ module.exports = { }, }, }, - extends: [ - "plugin:@typescript-eslint/recommended", - "plugin:import/recommended", - "plugin:import/typescript", - ], + extends: ["plugin:@typescript-eslint/recommended", "plugin:import/recommended", "plugin:import/typescript"], }, // Node diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..6a0262e --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,40 @@ +name: CI +on: + - push + - pull_request +jobs: + quality-checks: + name: Testit Runit Buildit + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + #with: + # fetch-tags: true + # fetch-depth: 1 + - uses: actions/setup-node@v4 + with: + node-version: 20 + + - uses: pnpm/action-setup@v4 + name: Install pnpm + with: + run_install: false + version: 9 + cache: "pnpm" + + - name: install + run: pnpm install + + - name: format-check + run: pnpm run format --check + + - name: lint + run: pnpm run lint + + - name: build + run: pnpm run build + + - name: test + run: | + pnpm run drizzle:push + pnpm run test diff --git a/.prettierignore b/.prettierignore new file mode 100644 index 0000000..181ae7d --- /dev/null +++ b/.prettierignore @@ -0,0 +1,5 @@ +**/pnpm-lock.yaml +scripts/ +**/.esm-cache/** +**/dist/** +**/coverage/** diff --git a/.prettierrc b/.prettierrc new file mode 100644 index 0000000..5158fa8 --- /dev/null +++ b/.prettierrc @@ -0,0 +1,6 @@ +{ + "printWidth": 132, + "singleQuote": false, + "semi": true, + "useTabs": false +} diff --git a/README.md b/README.md index b3b0cfa..5302847 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,3 @@ # Fireproof Dashboard + https://dashboard.fireproof.storage/ diff --git a/backend/api.ts b/backend/api.ts new file mode 100644 index 0000000..a0efb57 --- /dev/null +++ b/backend/api.ts @@ -0,0 +1,534 @@ +import { Result } from "@adviser/cement"; +import { tenants, tenantUserRefs, userRefs } from "./db-api-schema"; +import { SuperThis } from "@fireproof/core"; +import { eq, and, ExtractTablesWithRelations, is } from "drizzle-orm"; +import { LibSQLDatabase } from "drizzle-orm/libsql"; +import { SQLiteTransaction } from "drizzle-orm/sqlite-core"; +import { ResultSet } from "@libsql/client"; + +export interface AuthType { + readonly type: "ucan" | "clerk"; + readonly token: string; +} + +export interface VerifiedAuth { + readonly type: "clerk"; + readonly token: string; + readonly userId: string; + readonly provider: string; +} + +export interface ClerkClaim { + readonly email: string; + readonly first: string; + readonly last: string; + readonly nick: string; +} + +export interface ClerkVerifyAuth extends VerifiedAuth { + readonly params: ClerkClaim; +} + +export interface ReqEnsureUserRef { + readonly type: "reqEnsureUserRef"; + readonly auth: AuthType; +} + +export interface Tenant { + readonly tenantId: string; + readonly name: string; + readonly ownerUserRefId: string; + readonly adminUserRefIds: string[]; + readonly memberUserRefIds: string[]; + readonly maxAdminUserRefs: number; + readonly maxMemberUserRefs: number; + readonly createdAt: Date; + readonly updatedAt: Date; +} + +// export interface TenantUserRef { +// readonly userRefId: string; +// readonly tenantId: string; +// readonly name: string; +// readonly active: boolean; // active for this user +// } + +export interface ResEnsureUserRef { + readonly type: "resEnsureUserRef"; + readonly userRefId: string; + readonly createdAt: Date; + readonly updatedAt: Date; + readonly params: ClerkClaim; + readonly authUserId: string; + readonly authProvider: string; + readonly tenants: UserTenant[]; + readonly maxTenants: number; +} + +export interface ReqEnsureTenant { + readonly type: "reqEnsureTenant"; + readonly auth: AuthType; + readonly tenantId: string; + readonly name: string; + readonly ownerUserRefId: string; + // null means don't change + readonly adminUserRefIds?: string[]; + readonly memberUserRefIds?: string[]; + readonly maxAdminUserRefs?: number; + readonly maxMemberUserRefs?: number; +} + +export interface ResEnsureTenant { + readonly type: "resEnsureTenant"; + readonly tenant: Tenant; +} + +export interface ReqAttachUserToTenant { + readonly type: "reqAttachUserToTenant"; + readonly auth: AuthType; + // name can be updated + readonly name: string; + readonly tenantId: string; + readonly userRefId: string; + readonly role: "admin" | "member"; +} + +export interface ResAttachUserToTenant { + readonly type: "resAttachUserToTenant"; + readonly name: string; + readonly tenant: Tenant; + readonly userRefId: string; + readonly role: "admin" | "member"; +} + +export interface ReqListLedgerByTenant { + readonly type: "reqListLedgerByTenant"; + readonly auth: AuthType; + readonly tenantId: string; +} + +export interface Ledger { + readonly ledgerId: string; + readonly tenantId: string; + readonly name: string; + readonly ownerRefId: string; + readonly readRefIds: string[]; + readonly writeRefIds: string[]; + readonly createdAt: Date; +} + +export interface ResListLedgerByTenant { + readonly type: "resListLedgerByTenant"; + readonly tenantId: string; + readonly userRefId: string; + readonly ledgers: Ledger[]; +} + +export interface ReqAttachUserToLedger { + readonly type: "reqAttachUserToLedger"; + readonly auth: AuthType; + readonly tenantId: string; + readonly ledgerId: string; + readonly userRefId: string; + readonly role: "read" | "write"; +} + +export interface ResAttachUserToLedger { + readonly type: "resAttachUserToLedger"; + readonly tenantId: string; + readonly ledgerId: string; + readonly userRefId: string; + readonly role: "read" | "write"; +} + +export interface ReqListTenantsByUser { + readonly type: "reqListTenantsByUser"; + readonly auth: AuthType; +} + +export interface UserTenant { + readonly tenantId: string; + readonly tenantName?: string; + readonly name?: string; + readonly role: "admin" | "member"; + readonly default: boolean; +} + +export interface ResListTenantsByUser { + readonly type: "resListTenantsByUser"; + readonly userRefId: string; + readonly tenants: UserTenant[]; +} + +export interface FPApi { + ensureUserRef(req: ReqEnsureUserRef): Promise>; + + listTenantsByUser(req: ReqListTenantsByUser): Promise>; + // attachUserToTenant(req: ReqAttachUserToTenant): Promise + + // listLedgersByTenant(req: ReqListLedgerByTenant): Promise + + // attachUserToLedger(req: ReqAttachUserToLedger): Promise +} + +export interface FPApiToken { + verify(token: string): Promise>; +} + +interface ReqInsertTenant { + readonly tenantId: string; + readonly name?: string; + readonly ownerUserRefId: string; + readonly adminUserRefIds?: string[]; + readonly memberUserRefIds?: string[]; + readonly maxAdminUserRefs?: number; + readonly maxMemberUserRefs?: number; + readonly createdAt?: Date; + readonly updatedAt?: Date; +} + +// interface ResInsertTenant { +// readonly tenantId: string; +// readonly name?: string; +// readonly ownerUserRefId: string; +// readonly adminUserRefIds: string[]; +// readonly memberUserRefIds: string[]; +// readonly maxAdminUserRefs: number; +// readonly maxMemberUserRefs: number; +// readonly createdAt: Date; +// readonly updatedAt: Date; +// } + +interface ReqInsertUserRef { + readonly userRefId: string; + readonly auth: ClerkVerifyAuth; + readonly maxTenants?: number; + readonly createdAt?: Date; + readonly updatedAt?: Date; +} + +function prepareInsertUserRef(req: ReqInsertUserRef) { + const now = new Date(); + const user: typeof userRefs.$inferInsert = { + userRefId: req.userRefId, + authUserId: req.auth.userId, + authProvider: req.auth.provider, + maxTenants: req.maxTenants ?? 5, + params: JSON.stringify(req.auth.params), + createdAt: (req.createdAt ?? now).toISOString(), + updatedAt: (req.updatedAt ?? req.createdAt ?? now).toISOString(), + }; + return user; +} + +function prepareInsertTenant(req: ReqInsertTenant) { + const now = new Date(); + const tenant: typeof tenants.$inferInsert = { + tenantId: req.tenantId, + name: req.name, + ownerUserRefId: req.ownerUserRefId, + adminUserRefIds: JSON.stringify(req.adminUserRefIds ?? []), + memberUserRefIds: JSON.stringify(req.adminUserRefIds ?? []), + maxAdminUserRefs: req.maxAdminUserRefs ?? 5, + maxMemberUserRefs: req.maxMemberUserRefs ?? 5, + createdAt: (req.createdAt ?? now).toISOString(), + updatedAt: (req.updatedAt ?? req.createdAt ?? now).toISOString(), + }; + return tenant; + // await this.db.insert(tenants).values(tenant).run(); + // return Result.Ok({ + // tenantId: tenant.tenantId, + // name: tenant.name, + // ownerUserRefId: tenant.ownerUserRefId, + // adminUserRefIds: JSON.parse(tenant.adminUserRefIds), + // memberUserRefIds: JSON.parse(tenant.memberUserRefIds), + // maxAdminUserRefs: tenant.maxAdminUserRefs, + // maxMemberUserRefs: tenant.maxMemberUserRefs, + // createdAt: new Date(tenant.createdAt), + // updatedAt: new Date(tenant.updatedAt), + // }); +} + +interface ReqAddUserToTenant { + readonly name?: string; + readonly tenantId: string; + readonly userRefId: string; + readonly default?: boolean; + readonly role: "admin" | "member"; +} + +interface ResAddUserToTenant { + readonly name?: string; + readonly tenantId: string; + readonly userRefId: string; + readonly default: boolean; + readonly role: "admin" | "member"; +} + +function getRole( + userRefId: string, + tenant: typeof tenants.$inferSelect, +): { + role: "admin" | "member"; + foundRole: boolean; + adminUserRefIds: string[]; + memberUserRefIds: string[]; +} { + const adminUserRefIds = JSON.parse(tenant.adminUserRefIds as string); + const memberUserRefIds = JSON.parse(tenant.memberUserRefIds as string); + const isAdmin = adminUserRefIds.includes(userRefId); + const isMember = memberUserRefIds.includes(userRefId); + return { + adminUserRefIds, + memberUserRefIds, + foundRole: isAdmin || isMember, + role: isAdmin ? "admin" : "member", + }; +} + +function toUndef(v: string | null | undefined): string | undefined { + return v ? v : undefined; +} + +function toBoolean(v: number): boolean { + return !!v; +} + +type SQLTransaction = SQLiteTransaction< + "async", + ResultSet, + Record, + ExtractTablesWithRelations> +>; + +export class FPApiImpl implements FPApi { + readonly db: LibSQLDatabase; + readonly tokenApi: FPApiToken; + readonly sthis: SuperThis; + constructor(sthis: SuperThis, db: LibSQLDatabase, token: FPApiToken) { + this.db = db; + this.tokenApi = token; + this.sthis = sthis; + } + + async authToClerkVerifyAuth(req: { readonly auth: AuthType }): Promise> { + const rAuth = await this.tokenApi.verify(req.auth.token); + if (rAuth.isErr()) { + return Result.Err(rAuth.Err()); + } + if (rAuth.Ok().type !== "clerk") { + return Result.Err("invalid auth type"); + } + const auth = rAuth.Ok() as ClerkVerifyAuth; + return Result.Ok(auth); + } + + async ensureUserRef(req: ReqEnsureUserRef): Promise> { + const rAuth = await this.authToClerkVerifyAuth(req); + if (rAuth.isErr()) { + return Result.Err(rAuth.Err()); + } + const auth = rAuth.Ok(); + const existing = await this.db.select().from(userRefs).where(eq(userRefs.authUserId, auth.userId)).get(); + if (!existing) { + const userRefId = this.sthis.nextId(12).str; + await this.db + .insert(userRefs) + .values( + prepareInsertUserRef({ + userRefId, + auth, + }), + ) + .run(); + const tenantId = this.sthis.nextId(12).str; + await this.db + .insert(tenants) + .values( + prepareInsertTenant({ + tenantId, + name: `my-tenant[${auth.params.email ?? auth.params.nick}]`, + ownerUserRefId: userRefId, + }), + ) + .run(); + await this.db.transaction(async (db) => { + await this.addUserToTenant(db, { + name: `my-tenant[${auth.params.email ?? auth.params.nick}]`, + tenantId, + userRefId, + role: "admin", + default: true, + }); + }); + return this.ensureUserRef(req); + } + return Result.Ok({ + ...existing, + params: JSON.parse(existing.params as string), + createdAt: new Date(existing.createdAt), + updatedAt: new Date(existing.updatedAt), + type: "resEnsureUserRef", + tenants: await this.listTenantsByUser({ + type: "reqListTenantsByUser", + auth: req.auth, + }).then((r) => r.Ok().tenants), + }); + } + + private async addUserToTenant(db: SQLTransaction, req: ReqAddUserToTenant): Promise> { + const tenant = await db.select().from(tenants).where(eq(tenants.tenantId, req.tenantId)).get(); + if (!tenant) { + return Result.Err("tenant not found"); + } + const role = getRole(req.userRefId, tenant); + if (role.foundRole) { + const tenantUserRef = await db + .select() + .from(tenantUserRefs) + .where(and(eq(tenantUserRefs.tenantId, req.tenantId), eq(tenantUserRefs.userRefId, req.userRefId))) + .get(); + if (!tenantUserRef) { + return Result.Err("ref not found"); + } + return Result.Ok({ + name: toUndef(tenantUserRef.name), + tenantId: req.tenantId, + userRefId: req.userRefId, + default: !!tenantUserRef.default, + role: role.role, + }); + } + switch (req.role) { + case "admin": + if (role.adminUserRefIds.length + 1 >= tenant.maxAdminUserRefs) { + return Result.Err("max admins reached"); + } + role.adminUserRefIds.push(req.userRefId); + role.role = "admin"; + break; + case "member": + default: + if (role.memberUserRefIds.length + 1 >= tenant.maxMemberUserRefs) { + return Result.Err("max members reached"); + } + role.memberUserRefIds.push(req.userRefId); + role.role = "member"; + break; + } + const now = new Date().toISOString(); + await db + .update(tenants) + .set({ + adminUserRefIds: JSON.stringify(role.adminUserRefIds), + memberUserRefIds: JSON.stringify(role.memberUserRefIds), + updatedAt: now, + }) + .where(eq(tenants.tenantId, tenant.tenantId)) + .run(); + await db.insert(tenantUserRefs).values({ + tenantId: tenant.tenantId, + userRefId: req.userRefId, + name: req.name, + active: 1, + default: req.default ? 1 : 0, + createdAt: now, + updatedAt: now, + }); + return Result.Ok({ + name: req.name, + tenantId: tenant.tenantId, + userRefId: req.userRefId, + default: req.default ?? false, + active: true, + role: role.role, + }); + } + + async listTenantsByUser(req: ReqListTenantsByUser): Promise> { + const rAuth = await this.authToClerkVerifyAuth(req); + if (rAuth.isErr()) { + return Result.Err(rAuth.Err()); + } + const auth = rAuth.Ok(); + const tenantUserRef = await this.db + .select() + .from(tenantUserRefs) + .innerJoin(tenants, eq(tenantUserRefs.tenantId, tenants.tenantId)) + .innerJoin(userRefs, eq(tenants.ownerUserRefId, userRefs.userRefId)) + .where(eq(userRefs.authUserId, auth.userId)) + .all(); + return Result.Ok({ + type: "resListTenantsByUser", + userRefId: tenantUserRef[0].TenantUserRefs.userRefId, + tenants: tenantUserRef.map((t) => ({ + tenantId: t.TenantUserRefs.tenantId, + tenantName: toUndef(t.Tenants.name), + name: toUndef(t.TenantUserRefs.name), + role: getRole(t.UserRefs.userRefId, t.Tenants).role, + default: toBoolean(t.TenantUserRefs.default), + })), + }); + } + + // // eslint-disable-next-line @typescript-eslint/no-unused-vars + // async attachUserToTenant(req: ReqAttachUserToTenant): Promise> { + // const maxTenants = await this.db.select({ + // maxTenants: userRefs.maxTenants + // }).from(userRefs).where(eq(userRefs.userRefId, req.userRefId)).get() ?? { maxTenants: 5 } + + // const tendantCount = await this.db.$count(tenantUserRefs, + // and( + // eq(tenants.ownerUserRefId, req.userRefId), + // ne(tenantUserRefs.active, 0) + // )) + + // if (tendantCount >= maxTenants.maxTenants) { + // return Result.Err(`max tenants reached:${maxTenants.maxTenants}`) + // } + + // const now = new Date().toISOString(); + // const values = { + // userRefId: req.userRefId, + // tenantId: req.tenantId, + // name: req.name, + // active: 1, + // createdAt: now, + // updatedAt: now + // } + // const rRes = await this.db + // .insert(tenantUserRefs) + // .values(values) + // .onConflictDoNothing() + // .returning() + // .run() + // const res = rRes.toJSON()[0] + // return Result.Ok({ + // type: 'resAttachUserToTenant', + // name: req.name, + // tenant: { + // tenantId: res. + // name: req.name, + // ownerUserRefId: req.userRefId, + // adminUserRefIds: [], + // memberUserRefIds: [], + // maxAdminUserRefs: 5, + // maxMemberUserRefs: 5, + // createdAt: new Date(), + // updatedAt: new Date() + // }, + // userRefId: req.userRefId, + // role: req.role + // }) + + // // throw new Error("Method not implemented."); + // } + // // eslint-disable-next-line @typescript-eslint/no-unused-vars + // async listLedgersByTenant(req: ReqListLedgerByTenant): Promise { + // throw new Error("Method not implemented."); + // } + // // eslint-disable-next-line @typescript-eslint/no-unused-vars + // async attachUserToLedger(req: ReqAttachUserToLedger): Promise { + // throw new Error("Method not implemented."); + // } +} diff --git a/backend/db-api-schema.ts b/backend/db-api-schema.ts new file mode 100644 index 0000000..dfe3168 --- /dev/null +++ b/backend/db-api-schema.ts @@ -0,0 +1,62 @@ +// import 'dotenv/config'; +// import { drizzle } from 'drizzle-orm/libsql'; +// import { createClient } from '@libsql/client'; +import { blob, int, sqliteTable, text, primaryKey } from "drizzle-orm/sqlite-core"; + +export const userRefs = sqliteTable("UserRefs", { + userRefId: text().primaryKey(), + // userId from auth provider + authUserId: text().notNull().unique(), + // name of auth provider + authProvider: text().notNull(), + // json/jwt from auth provider + params: blob({ mode: "json" }).notNull(), + // max number of tenants + maxTenants: int().notNull(), + // iso date string + createdAt: text().notNull(), + // iso date string + updatedAt: text().notNull(), +}); + +export const tenants = sqliteTable("Tenants", { + tenantId: text().primaryKey(), + name: text(), + ownerUserRefId: text() + .notNull() + .references(() => userRefs.userRefId), + adminUserRefIds: blob({ mode: "json" }).notNull(), + memberUserRefIds: blob({ mode: "json" }).notNull(), + maxAdminUserRefs: int().notNull(), + maxMemberUserRefs: int().notNull(), + createdAt: text().notNull(), + updatedAt: text().notNull(), +}); + +export const tenantUserRefs = sqliteTable( + "TenantUserRefs", + { + userRefId: text() + .notNull() + .references(() => userRefs.userRefId), + tenantId: text() + .notNull() + .references(() => tenants.tenantId), + name: text(), + active: int().notNull(), + default: int().notNull(), + createdAt: text().notNull(), + updatedAt: text().notNull(), + }, + (table) => ({ + pk: primaryKey({ columns: [table.userRefId, table.tenantId] }), + }), +); + +// return { +// pk: primaryKey({ columns: [table.tenantId, table.userRefId] }), +// }; +// }) + +// const client = createClient({ url: process.env.DB_FILE_NAME! }); +// const db = drizzle({ client }); diff --git a/backend/db-api.test.ts b/backend/db-api.test.ts new file mode 100644 index 0000000..b9331ea --- /dev/null +++ b/backend/db-api.test.ts @@ -0,0 +1,142 @@ +// import { describe } from 'vitest/globals'; + +// import { BetterSQLite3Database, drizzle } from "drizzle-orm/better-sqlite3"; + +// import Database from 'better-sqlite3'; +// import { eq } from 'drizzle-orm'; +// import { userRef } from "./db-api-schema"; + +import { createClient } from "@libsql/client/node"; +import { drizzle, LibSQLDatabase } from "drizzle-orm/libsql"; +import { FPApiImpl, FPApiToken, ReqEnsureUserRef, ResEnsureUserRef, VerifiedAuth } from "./api"; +import { ensureSuperThis, Result, SuperThis } from "@fireproof/core"; +// // import { eq } from 'drizzle-orm' +// // import { drizzle } from 'drizzle-orm/libsql'; +// // import Database from 'better-sqlite3'; + +// const client = createClient({ +// url: '' +// }); +// export const db = drizzle(client); + +// const users = sqliteTable('users', { +// id: integer('id').primaryKey(), +// name: text('full_name'), +// }); + +// // const sqlite = new Database('sqlite.db'); +// // const db = drizzle({ client: sqlite }); + +// db.select().from(users).all(); +// db.select().from(users).where(eq(users.id, 42)).get(); + +class TestApiToken implements FPApiToken { + readonly sthis: SuperThis; + constructor(sthis: SuperThis) { + this.sthis = sthis; + } + verify(token: string): Promise> { + const id = `userId-${token}`; + return Promise.resolve( + Result.Ok({ + type: "clerk", + token, + userId: id, + provider: "Clerk", + params: { + email: `test${id}@test.de`, + first: `first${id}`, + last: `last${id}`, + nick: `nick${id}`, + }, + }), + ); + } +} + +describe("db-api", () => { + // let db: BetterSQLite3Database + let db: LibSQLDatabase; + const sthis = ensureSuperThis(); + let fpApi: FPApiImpl; + const data = [] as { + reqs: ReqEnsureUserRef; + ress: ResEnsureUserRef; + }[]; + beforeAll(async () => { + const client = createClient({ url: `file://${process.cwd()}/dist/sqlite.db` }); + db = drizzle(client); + fpApi = new FPApiImpl(sthis, db, new TestApiToken(sthis)); + + data.push( + ...Array(10) + .fill(0) + .map((_, i) => ({ + ress: {} as ResEnsureUserRef, + reqs: { + type: "reqEnsureUserRef", + auth: { + token: `test-${i}-${sthis.nextId().str}`, + type: "clerk", + }, + } satisfies ReqEnsureUserRef, + })), + ); + for (const d of data) { + const rRes = await fpApi.ensureUserRef(d.reqs!); + const res = rRes.Ok(); + d.ress = res; + expect(res).toEqual({ + authProvider: "Clerk", + authUserId: `userId-${d.reqs.auth.token}`, + createdAt: res.createdAt, + maxTenants: 5, + params: res.params, + // "params": "{"email":"testuserId-test-0-zGy3ufenE@test.de","first":"firstuserId-test-0-zGy3ufenE","last":"lastuserId-test-0-zGy3ufenE","nick":"nickuserId-test-0-zGy3ufenE"}", + tenants: res.tenants, + type: "resEnsureUserRef", + updatedAt: res.updatedAt, + userRefId: res.userRefId, + }); + } + }); + it("check ensureUserRef", async () => { + for (const d of data.map((d) => d.reqs)) { + const rRes = await fpApi.ensureUserRef(d); + const res = rRes.Ok(); + expect(res).toEqual({ + authProvider: "Clerk", + authUserId: `userId-${d.auth.token}`, + createdAt: res.createdAt, + maxTenants: 5, + params: res.params, + tenants: res.tenants, + type: "resEnsureUserRef", + updatedAt: res.updatedAt, + userRefId: res.userRefId, + }); + } + }); + it("should list tenants by user", async () => { + for (const d of data) { + const rRes = await fpApi.listTenantsByUser({ + type: "reqListTenantsByUser", + auth: d.reqs.auth, + }); + const res = rRes.Ok(); + expect(res).toEqual({ + tenants: [ + { + default: true, + role: "admin", + tenantId: d.ress.tenants[0].tenantId, + name: d.ress.tenants[0].name, + tenantName: d.ress.tenants[0].tenantName, + }, + ], + type: "resListTenantsByUser", + userRefId: d.ress.userRefId, + }); + } + }); +}); diff --git a/drizzle.config.ts b/drizzle.config.ts new file mode 100644 index 0000000..489313c --- /dev/null +++ b/drizzle.config.ts @@ -0,0 +1,9 @@ +import { defineConfig } from "drizzle-kit"; +export default defineConfig({ + dialect: "sqlite", + schema: "./backend/db-api-schema.ts", + out: "./drizzle", + dbCredentials: { + url: "./dist/sqlite.db", + }, +}); diff --git a/eslint.config.js b/eslint.config.js index 238d2e4..cbe43e3 100644 --- a/eslint.config.js +++ b/eslint.config.js @@ -1,38 +1,35 @@ -import js from '@eslint/js' -import globals from 'globals' -import react from 'eslint-plugin-react' -import reactHooks from 'eslint-plugin-react-hooks' -import reactRefresh from 'eslint-plugin-react-refresh' +import js from "@eslint/js"; +import globals from "globals"; +import react from "eslint-plugin-react"; +import reactHooks from "eslint-plugin-react-hooks"; +import reactRefresh from "eslint-plugin-react-refresh"; export default [ - { ignores: ['dist'] }, + { ignores: ["dist"] }, { - files: ['**/*.{js,jsx}'], + files: ["**/*.{js,jsx}"], languageOptions: { ecmaVersion: 2020, globals: globals.browser, parserOptions: { - ecmaVersion: 'latest', + ecmaVersion: "latest", ecmaFeatures: { jsx: true }, - sourceType: 'module', + sourceType: "module", }, }, - settings: { react: { version: '18.3' } }, + settings: { react: { version: "18.3" } }, plugins: { react, - 'react-hooks': reactHooks, - 'react-refresh': reactRefresh, + "react-hooks": reactHooks, + "react-refresh": reactRefresh, }, rules: { ...js.configs.recommended.rules, ...react.configs.recommended.rules, - ...react.configs['jsx-runtime'].rules, + ...react.configs["jsx-runtime"].rules, ...reactHooks.configs.recommended.rules, - 'react/jsx-no-target-blank': 'off', - 'react-refresh/only-export-components': [ - 'warn', - { allowConstantExport: true }, - ], + "react/jsx-no-target-blank": "off", + "react-refresh/only-export-components": ["warn", { allowConstantExport: true }], }, }, -] +]; diff --git a/eslint.config.mjs b/eslint.config.mjs new file mode 100644 index 0000000..019f40c --- /dev/null +++ b/eslint.config.mjs @@ -0,0 +1,36 @@ +import eslint from "@eslint/js"; +import tseslint from "typescript-eslint"; + +const opts = tseslint.config( + eslint.configs.recommended, + // ...tseslint.configs.recommended, + ...tseslint.configs.strict, + ...tseslint.configs.stylistic, + { + ignores: [ + "babel.config.cjs", + "jest.config.js", + "**/dist/", + "**/pubdir/", + "**/node_modules/", + "**/scripts/", + "**/examples/", + "scripts/", + "smoke/react/", + "src/missingTypes/lib.deno.d.ts", + "**/.esm-cache/**", + ], + }, + { + rules: { + "no-console": ["warn"], + }, + }, + { + rules: { + "no-restricted-globals": ["error", "URL", "TextDecoder", "TextEncoder"], + }, + }, +); + +export default opts; diff --git a/index.html b/index.html index b016e57..a75c1b4 100644 --- a/index.html +++ b/index.html @@ -1,4 +1,4 @@ - + diff --git a/package.json b/package.json index 1836347..0ad85b5 100644 --- a/package.json +++ b/package.json @@ -7,16 +7,22 @@ "dev": "vite", "build": "vite build", "lint": "eslint .", - "preview": "vite preview" + "preview": "vite preview", + "test": "vitest --run", + "format": "prettier", + "drizzle:push": "drizzle-kit push" }, "dependencies": { + "@adviser/cement": "^0.3.5", "@clerk/clerk-js": "^5.40.0", "@clerk/clerk-react": "^5.19.0", "@fireproof/cloud": "^0.19.118", + "@fireproof/core": "^0.19.121", + "@libsql/client": "^0.14.0", "@tailwindcss/container-queries": "^0.1.1", + "drizzle-orm": "^0.38.3", "highlight.js": "^11.10.0", "i": "^0.3.7", - "npm": "^10.9.2", "partysocket": "^1.0.2", "prism-react-renderer": "^2.4.0", "react": "^18.3.1", @@ -25,7 +31,8 @@ "react-router-dom": "^7.0.2", "react-simple-code-editor": "^0.14.1", "use-editable": "^2.3.3", - "use-fireproof": "^0.19.118" + "use-fireproof": "^0.19.118", + "vitest": "^2.1.8" }, "devDependencies": { "@eslint/js": "^9.16.0", @@ -34,12 +41,14 @@ "@types/react-dom": "^19.0.1", "@vitejs/plugin-react": "^4.3.4", "autoprefixer": "^10.4.20", + "drizzle-kit": "^0.30.1", "eslint": "^9.16.0", "eslint-plugin-react": "^7.37.2", "eslint-plugin-react-hooks": "5.1.0", "eslint-plugin-react-refresh": "^0.4.16", "globals": "^15.13.0", "postcss": "^8.4.49", + "prettier": "^3.4.2", "tailwindcss": "^3.4.16", "vite": "^6.0.3" } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 57a7578..904c04b 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -8,6 +8,9 @@ importers: .: dependencies: + '@adviser/cement': + specifier: ^0.3.5 + version: 0.3.5 '@clerk/clerk-js': specifier: ^5.40.0 version: 5.40.0(@types/react@19.0.1)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) @@ -17,18 +20,24 @@ importers: '@fireproof/cloud': specifier: ^0.19.118 version: 0.19.118(react@18.3.1) + '@fireproof/core': + specifier: ^0.19.121 + version: 0.19.121(react@18.3.1) + '@libsql/client': + specifier: ^0.14.0 + version: 0.14.0 '@tailwindcss/container-queries': specifier: ^0.1.1 version: 0.1.1(tailwindcss@3.4.16) + drizzle-orm: + specifier: ^0.38.3 + version: 0.38.3(@cloudflare/workers-types@4.20240718.0)(@libsql/client@0.14.0)(@types/react@19.0.1)(react@18.3.1) highlight.js: specifier: ^11.10.0 version: 11.10.0 i: specifier: ^0.3.7 version: 0.3.7 - npm: - specifier: ^10.9.2 - version: 10.9.2 partysocket: specifier: ^1.0.2 version: 1.0.2 @@ -55,7 +64,10 @@ importers: version: 2.3.3(react@18.3.1) use-fireproof: specifier: ^0.19.118 - version: 0.19.118(@fireproof/core@0.19.118(react@18.3.1))(react@18.3.1) + version: 0.19.118(@fireproof/core@0.19.121(react@18.3.1))(react@18.3.1) + vitest: + specifier: ^2.1.8 + version: 2.1.8(@types/node@22.10.1) devDependencies: '@eslint/js': specifier: ^9.16.0 @@ -75,6 +87,9 @@ importers: autoprefixer: specifier: ^10.4.20 version: 10.4.20(postcss@8.4.49) + drizzle-kit: + specifier: ^0.30.1 + version: 0.30.1 eslint: specifier: ^9.16.0 version: 9.16.0(jiti@2.4.1) @@ -93,6 +108,9 @@ importers: postcss: specifier: ^8.4.49 version: 8.4.49 + prettier: + specifier: ^3.4.2 + version: 3.4.2 tailwindcss: specifier: ^3.4.16 version: 3.4.16 @@ -106,6 +124,10 @@ packages: resolution: {integrity: sha512-Vam1JYxC1lOSkJZJa7CQJWL7jbjkPw5MzhYxMGWjLIK5l3tKDk5Q4SeLVEvPp2xhRGiBBzE9rZrQdt+0GtefFA==} engines: {node: '>=16'} + '@adviser/cement@0.3.5': + resolution: {integrity: sha512-U3BFsID8Fhe5ARmBEXQKw2yPyP1egT2LX8/gNCa8ZCobQjA52RkbEWwL0l8Gs6kDUqay1xhsKbQ9O7cYxLFnSg==} + engines: {node: '>=20'} + '@alloc/quick-lru@5.2.0': resolution: {integrity: sha512-UrcABB+4bUrFABwbluTIBErXwvbsU/V7TZWfmbgJfbkwiBuziS9gxdODUyuiecfdGQ85jglMW6juS3+z5TsKLw==} engines: {node: '>=10'} @@ -271,6 +293,9 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@drizzle-team/brocli@0.10.2': + resolution: {integrity: sha512-z33Il7l5dKjUgGULTqBsQBQwckHh5AbIuxhdsIxDDiZAzBOrZO6q9ogcWC65kU382AfynTfgNumVcNIjuIua6w==} + '@emotion/babel-plugin@11.13.5': resolution: {integrity: sha512-pxHCpT2ex+0q+HH91/zsdHkw/lXd468DIN2zvfvLtPKLLMo6gQj7oLObq8PhkrxOZb/gGCq03S3Z7PDhS8pduQ==} @@ -315,6 +340,20 @@ packages: '@emotion/weak-memoize@0.3.1': resolution: {integrity: sha512-EsBwpc7hBUJWAsNPBmJy4hxWx12v6bshQsldrVmjxJoc3isbxhOrF2IcCpaXxfvq03NwkI7sbsOLXbYuqF/8Ww==} + '@esbuild-kit/core-utils@3.3.2': + resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} + deprecated: 'Merged into tsx: https://tsx.is' + + '@esbuild-kit/esm-loader@2.6.5': + resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} + deprecated: 'Merged into tsx: https://tsx.is' + + '@esbuild/aix-ppc64@0.19.12': + resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [aix] + '@esbuild/aix-ppc64@0.21.5': resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} engines: {node: '>=12'} @@ -333,6 +372,18 @@ packages: cpu: [ppc64] os: [aix] + '@esbuild/android-arm64@0.18.20': + resolution: {integrity: sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + + '@esbuild/android-arm64@0.19.12': + resolution: {integrity: sha512-P0UVNGIienjZv3f5zq0DP3Nt2IE/3plFzuaS96vihvD0Hd6H/q4WXUGpCxD/E8YrSXfNyRPbpTq+T8ZQioSuPA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm64@0.21.5': resolution: {integrity: sha512-c0uX9VAUBQ7dTDCjq+wdyGLowMdtR/GoC2U5IYk/7D1H1JYC0qseD7+11iMP2mRLN9RcCMRcjC4YMclCzGwS/A==} engines: {node: '>=12'} @@ -351,6 +402,18 @@ packages: cpu: [arm64] os: [android] + '@esbuild/android-arm@0.18.20': + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + + '@esbuild/android-arm@0.19.12': + resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.21.5': resolution: {integrity: sha512-vCPvzSjpPHEi1siZdlvAlsPxXl7WbOVUBBAowWug4rJHb68Ox8KualB+1ocNvT5fjv6wpkX6o/iEpbDrf68zcg==} engines: {node: '>=12'} @@ -369,6 +432,18 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-x64@0.18.20': + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + + '@esbuild/android-x64@0.19.12': + resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.21.5': resolution: {integrity: sha512-D7aPRUUNHRBwHxzxRvp856rjUHRFW1SdQATKXH2hqA0kAZb1hKmi02OpYRacl0TxIGz/ZmXWlbZgjwWYaCakTA==} engines: {node: '>=12'} @@ -387,6 +462,18 @@ packages: cpu: [x64] os: [android] + '@esbuild/darwin-arm64@0.18.20': + resolution: {integrity: sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.19.12': + resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + engines: {node: '>=12'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-arm64@0.21.5': resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} engines: {node: '>=12'} @@ -405,6 +492,18 @@ packages: cpu: [arm64] os: [darwin] + '@esbuild/darwin-x64@0.18.20': + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.19.12': + resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.21.5': resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} engines: {node: '>=12'} @@ -423,6 +522,18 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/freebsd-arm64@0.18.20': + resolution: {integrity: sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + + '@esbuild/freebsd-arm64@0.19.12': + resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-arm64@0.21.5': resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} engines: {node: '>=12'} @@ -441,6 +552,18 @@ packages: cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-x64@0.18.20': + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.19.12': + resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.21.5': resolution: {integrity: sha512-J95kNBj1zkbMXtHVH29bBriQygMXqoVQOQYA+ISs0/2l3T9/kj42ow2mpqerRBxDJnmkUDCaQT/dfNXWX/ZZCQ==} engines: {node: '>=12'} @@ -459,6 +582,18 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/linux-arm64@0.18.20': + resolution: {integrity: sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.19.12': + resolution: {integrity: sha512-EoTjyYyLuVPfdPLsGVVVC8a0p1BFFvtpQDB/YLEhaXyf/5bczaGeN15QkR+O4S5LeJ92Tqotve7i1jn35qwvdA==} + engines: {node: '>=12'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm64@0.21.5': resolution: {integrity: sha512-ibKvmyYzKsBeX8d8I7MH/TMfWDXBF3db4qM6sy+7re0YXya+K1cem3on9XgdT2EQGMu4hQyZhan7TeQ8XkGp4Q==} engines: {node: '>=12'} @@ -477,6 +612,18 @@ packages: cpu: [arm64] os: [linux] + '@esbuild/linux-arm@0.18.20': + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.19.12': + resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.21.5': resolution: {integrity: sha512-bPb5AHZtbeNGjCKVZ9UGqGwo8EUu4cLq68E95A53KlxAPRmUyYv2D6F0uUI65XisGOL1hBP5mTronbgo+0bFcA==} engines: {node: '>=12'} @@ -495,6 +642,18 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-ia32@0.18.20': + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.19.12': + resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.21.5': resolution: {integrity: sha512-YvjXDqLRqPDl2dvRODYmmhz4rPeVKYvppfGYKSNGdyZkA01046pLWyRKKI3ax8fbJoK5QbxblURkwK/MWY18Tg==} engines: {node: '>=12'} @@ -513,6 +672,18 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-loong64@0.18.20': + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.19.12': + resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.21.5': resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} engines: {node: '>=12'} @@ -531,6 +702,18 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-mips64el@0.18.20': + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.19.12': + resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.21.5': resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} engines: {node: '>=12'} @@ -549,6 +732,18 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-ppc64@0.18.20': + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + + '@esbuild/linux-ppc64@0.19.12': + resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.21.5': resolution: {integrity: sha512-1hHV/Z4OEfMwpLO8rp7CvlhBDnjsC3CttJXIhBi+5Aj5r+MBvy4egg7wCbe//hSsT+RvDAG7s81tAvpL2XAE4w==} engines: {node: '>=12'} @@ -567,6 +762,18 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-riscv64@0.18.20': + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.19.12': + resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.21.5': resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} engines: {node: '>=12'} @@ -585,6 +792,18 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-s390x@0.18.20': + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.19.12': + resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.21.5': resolution: {integrity: sha512-zus5sxzqBJD3eXxwvjN1yQkRepANgxE9lgOW2qLnmr8ikMTphkjgXu1HR01K4FJg8h1kEEDAqDcZQtbrRnB41A==} engines: {node: '>=12'} @@ -603,6 +822,18 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-x64@0.18.20': + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.19.12': + resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.21.5': resolution: {integrity: sha512-1rYdTpyv03iycF1+BhzrzQJCdOuAOtaqHTWJZCWvijKD2N5Xu0TtVC8/+1faWqcP9iBCWOmjmhoH94dH82BxPQ==} engines: {node: '>=12'} @@ -621,6 +852,18 @@ packages: cpu: [x64] os: [linux] + '@esbuild/netbsd-x64@0.18.20': + resolution: {integrity: sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.19.12': + resolution: {integrity: sha512-3ltjQ7n1owJgFbuC61Oj++XhtzmymoCihNFgT84UAmJnxJfm4sYCiSLTXZtE00VWYpPMYc+ZQmB6xbSdVh0JWA==} + engines: {node: '>=12'} + cpu: [x64] + os: [netbsd] + '@esbuild/netbsd-x64@0.21.5': resolution: {integrity: sha512-Woi2MXzXjMULccIwMnLciyZH4nCIMpWQAs049KEeMvOcNADVxo0UBIQPfSmxB3CWKedngg7sWZdLvLczpe0tLg==} engines: {node: '>=12'} @@ -651,6 +894,18 @@ packages: cpu: [arm64] os: [openbsd] + '@esbuild/openbsd-x64@0.18.20': + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + + '@esbuild/openbsd-x64@0.19.12': + resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.21.5': resolution: {integrity: sha512-HLNNw99xsvx12lFBUwoT8EVCsSvRNDVxNpjZ7bPn947b8gJPzeHWyNVhFsaerc0n3TsbOINvRP2byTZ5LKezow==} engines: {node: '>=12'} @@ -669,6 +924,18 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/sunos-x64@0.18.20': + resolution: {integrity: sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.19.12': + resolution: {integrity: sha512-HKjJwRrW8uWtCQnQOz9qcU3mUZhTUQvi56Q8DPTLLB+DawoiQdjsYq+j+D3s9I8VFtDr+F9CjgXKKC4ss89IeA==} + engines: {node: '>=12'} + cpu: [x64] + os: [sunos] + '@esbuild/sunos-x64@0.21.5': resolution: {integrity: sha512-6+gjmFpfy0BHU5Tpptkuh8+uw3mnrvgs+dSPQXQOv3ekbordwnzTVEb4qnIvQcYXq6gzkyTnoZ9dZG+D4garKg==} engines: {node: '>=12'} @@ -687,6 +954,18 @@ packages: cpu: [x64] os: [sunos] + '@esbuild/win32-arm64@0.18.20': + resolution: {integrity: sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + + '@esbuild/win32-arm64@0.19.12': + resolution: {integrity: sha512-URgtR1dJnmGvX864pn1B2YUYNzjmXkuJOIqG2HdU62MVS4EHpU2946OZoTMnRUHklGtJdJZ33QfzdjGACXhn1A==} + engines: {node: '>=12'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-arm64@0.21.5': resolution: {integrity: sha512-Z0gOTd75VvXqyq7nsl93zwahcTROgqvuAcYDUr+vOv8uHhNSKROyU961kgtCD1e95IqPKSQKH7tBTslnS3tA8A==} engines: {node: '>=12'} @@ -705,6 +984,18 @@ packages: cpu: [arm64] os: [win32] + '@esbuild/win32-ia32@0.18.20': + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.19.12': + resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.21.5': resolution: {integrity: sha512-SWXFF1CL2RVNMaVs+BBClwtfZSvDgtL//G/smwAc5oVK/UPu2Gu9tIaRgFmYFFKrmg3SyAjSrElf0TiJ1v8fYA==} engines: {node: '>=12'} @@ -723,6 +1014,18 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-x64@0.18.20': + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.19.12': + resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.21.5': resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} engines: {node: '>=12'} @@ -787,9 +1090,17 @@ packages: peerDependencies: react: ^18.3.1 + '@fireproof/core@0.19.121': + resolution: {integrity: sha512-HTHM9MXPEvby66h2I4zGT7VqFVpJMzcd3xiGeInzAwwO8mFB5ZQ6ic/i/P+5R6iN0ZNucGMKVOUAh2+XysxmHQ==} + peerDependencies: + react: ^18.3.1 + '@fireproof/vendor@1.0.0': resolution: {integrity: sha512-ucN0ICj7xbpbO3NWjAKKjMHkBn4vSRUdKn14LLaA0MILJowty+H4XBB8dCobwKemhW49ha5p520NOLRzJSKsow==} + '@fireproof/vendor@1.0.4': + resolution: {integrity: sha512-F8yYaYGRNrtYo4KyMzMuKwI5mGieYMkI23KnYkQ3ixKhIu3J6qRGZsuROFjOv2zWjQvtPronvqyxNc9P5km31g==} + '@floating-ui/core@1.6.8': resolution: {integrity: sha512-7XJ9cPU+yI2QeLS+FCSlqNFZJq8arvswefkZrYI1yQBbftw6FyrZOxYSh+9S7z7TpeWlRt9zJ5IhM1WIL334jA==} @@ -887,10 +1198,64 @@ packages: peerDependencies: tslib: '2' + '@libsql/client@0.14.0': + resolution: {integrity: sha512-/9HEKfn6fwXB5aTEEoMeFh4CtG0ZzbncBb1e++OCdVpgKZ/xyMsIVYXm0w7Pv4RUel803vE6LwniB3PqD72R0Q==} + + '@libsql/core@0.14.0': + resolution: {integrity: sha512-nhbuXf7GP3PSZgdCY2Ecj8vz187ptHlZQ0VRc751oB2C1W8jQUXKKklvt7t1LJiUTQBVJuadF628eUk+3cRi4Q==} + + '@libsql/darwin-arm64@0.4.7': + resolution: {integrity: sha512-yOL742IfWUlUevnI5PdnIT4fryY3LYTdLm56bnY0wXBw7dhFcnjuA7jrH3oSVz2mjZTHujxoITgAE7V6Z+eAbg==} + cpu: [arm64] + os: [darwin] + + '@libsql/darwin-x64@0.4.7': + resolution: {integrity: sha512-ezc7V75+eoyyH07BO9tIyJdqXXcRfZMbKcLCeF8+qWK5nP8wWuMcfOVywecsXGRbT99zc5eNra4NEx6z5PkSsA==} + cpu: [x64] + os: [darwin] + + '@libsql/hrana-client@0.7.0': + resolution: {integrity: sha512-OF8fFQSkbL7vJY9rfuegK1R7sPgQ6kFMkDamiEccNUvieQ+3urzfDFI616oPl8V7T9zRmnTkSjMOImYCAVRVuw==} + + '@libsql/isomorphic-fetch@0.3.1': + resolution: {integrity: sha512-6kK3SUK5Uu56zPq/Las620n5aS9xJq+jMBcNSOmjhNf/MUvdyji4vrMTqD7ptY7/4/CAVEAYDeotUz60LNQHtw==} + engines: {node: '>=18.0.0'} + + '@libsql/isomorphic-ws@0.1.5': + resolution: {integrity: sha512-DtLWIH29onUYR00i0GlQ3UdcTRC6EP4u9w/h9LxpUZJWRMARk6dQwZ6Jkd+QdwVpuAOrdxt18v0K2uIYR3fwFg==} + + '@libsql/linux-arm64-gnu@0.4.7': + resolution: {integrity: sha512-WlX2VYB5diM4kFfNaYcyhw5y+UJAI3xcMkEUJZPtRDEIu85SsSFrQ+gvoKfcVh76B//ztSeEX2wl9yrjF7BBCA==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-arm64-musl@0.4.7': + resolution: {integrity: sha512-6kK9xAArVRlTCpWeqnNMCoXW1pe7WITI378n4NpvU5EJ0Ok3aNTIC2nRPRjhro90QcnmLL1jPcrVwO4WD1U0xw==} + cpu: [arm64] + os: [linux] + + '@libsql/linux-x64-gnu@0.4.7': + resolution: {integrity: sha512-CMnNRCmlWQqqzlTw6NeaZXzLWI8bydaXDke63JTUCvu8R+fj/ENsLrVBtPDlxQ0wGsYdXGlrUCH8Qi9gJep0yQ==} + cpu: [x64] + os: [linux] + + '@libsql/linux-x64-musl@0.4.7': + resolution: {integrity: sha512-nI6tpS1t6WzGAt1Kx1n1HsvtBbZ+jHn0m7ogNNT6pQHZQj7AFFTIMeDQw/i/Nt5H38np1GVRNsFe99eSIMs9XA==} + cpu: [x64] + os: [linux] + + '@libsql/win32-x64-msvc@0.4.7': + resolution: {integrity: sha512-7pJzOWzPm6oJUxml+PCDRzYQ4A1hTMHAciTAHfFK4fkbDZX33nWPVG7Y3vqdKtslcwAzwmrNDc6sXy2nwWnbiw==} + cpu: [x64] + os: [win32] + '@multiformats/murmur3@2.1.8': resolution: {integrity: sha512-6vId1C46ra3R1sbJUOFCZnsUIveR9oF20yhPmAFxPm0JfrX3/ZRCgP3YDrBzlGoEppOXnA9czHeYc0T9mB6hbA==} engines: {node: '>=16.0.0', npm: '>=7.0.0'} + '@neon-rs/load@0.0.4': + resolution: {integrity: sha512-kTPhdZyTQxB+2wpiRcFWrDcejc4JI6tkPuS7UZCG4l6Zvc5kU/gGQ/ozvHTh1XR5tS+UlfAfGuPajjzQjCiHCw==} + '@nodelib/fs.scandir@2.1.5': resolution: {integrity: sha512-vq24Bq3ym5HEQm2NKCr3yXDwjc7vTsEThRDnkp2DK9p1uqLR+DHurm/NOTo0KG7HYHU7eppKZj3MyqYuMBf62g==} engines: {node: '>= 8'} @@ -1100,12 +1465,44 @@ packages: '@types/retry@0.12.2': resolution: {integrity: sha512-XISRgDJ2Tc5q4TRqvgJtzsRkFYNJzZrhTdtMoGVBttwzzQJkPnS3WWTFc7kuDRoPtPakl+T+OfdEUjYJj7Jbow==} + '@types/ws@8.5.13': + resolution: {integrity: sha512-osM/gWBTPKgHV8XkTunnegTRIsvF6owmf5w+JtAfOw472dptdm0dlGv4xCt6GwQRcC2XVOvvRE/0bAoQcL2QkA==} + '@vitejs/plugin-react@4.3.4': resolution: {integrity: sha512-SCCPBJtYLdE8PX/7ZQAs1QAZ8Jqwih+0VBLum1EGqmCCQal+MIUqLCzj3ZUy8ufbC0cAM4LRlSTm7IQJwWT4ug==} engines: {node: ^14.18.0 || >=16.0.0} peerDependencies: vite: ^4.2.0 || ^5.0.0 || ^6.0.0 + '@vitest/expect@2.1.8': + resolution: {integrity: sha512-8ytZ/fFHq2g4PJVAtDX57mayemKgDR6X3Oa2Foro+EygiOJHUXhCqBAAKQYYajZpFoIfvBCF1j6R6IYRSIUFuw==} + + '@vitest/mocker@2.1.8': + resolution: {integrity: sha512-7guJ/47I6uqfttp33mgo6ga5Gr1VnL58rcqYKyShoRK9ebu8T5Rs6HN3s1NABiBeVTdWNrwUMcHH54uXZBN4zA==} + peerDependencies: + msw: ^2.4.9 + vite: ^5.0.0 + peerDependenciesMeta: + msw: + optional: true + vite: + optional: true + + '@vitest/pretty-format@2.1.8': + resolution: {integrity: sha512-9HiSZ9zpqNLKlbIDRWOnAWqgcA7xu+8YxXSekhr0Ykab7PAYFkhkwoqVArPOtJhPmYeE2YHgKZlj3CP36z2AJQ==} + + '@vitest/runner@2.1.8': + resolution: {integrity: sha512-17ub8vQstRnRlIU5k50bG+QOMLHRhYPAna5tw8tYbj+jzjcspnwnwtPtiOlkuKC4+ixDPTuLZiqiWWQ2PSXHVg==} + + '@vitest/snapshot@2.1.8': + resolution: {integrity: sha512-20T7xRFbmnkfcmgVEz+z3AU/3b0cEzZOt/zmnvZEctg64/QZbSDJEVm9fLnnlSi74KibmRsO9/Qabi+t0vCRPg==} + + '@vitest/spy@2.1.8': + resolution: {integrity: sha512-5swjf2q95gXeYPevtW0BLk6H8+bPlMb4Vw/9Em4hFxDcaOxS+e0LOX4yqNxoHzMR2akEB2xfpnWUzkZokmgWDg==} + + '@vitest/utils@2.1.8': + resolution: {integrity: sha512-dwSoui6djdwbfFmIgbIjX2ZhIoG7Ex/+xpxyiEgIGzjliY8xGkcpITKTlp6B4MgtGkF2ilvm97cPM96XZaAgcA==} + '@zxcvbn-ts/core@3.0.4': resolution: {integrity: sha512-aQeiT0F09FuJaAqNrxynlAwZ2mW/1MdXakKWNmGM1Qp/VaY6CnB/GfnMS2T8gB2231Esp1/maCWd8vTG4OuShw==} @@ -1192,6 +1589,10 @@ packages: as-table@1.0.55: resolution: {integrity: sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==} + assertion-error@2.0.1: + resolution: {integrity: sha512-Izi8RQcffqCeNVgFigKli1ssklIbpHnCYc6AknXGYoB6grJqyeby7jv12JUQgmTAnIDnbck1uxksT4dzN3PWBA==} + engines: {node: '>=12'} + autoprefixer@10.4.20: resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} engines: {node: ^10 || ^12 || >=14} @@ -1247,12 +1648,19 @@ packages: engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer@5.7.1: resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + cac@6.7.14: + resolution: {integrity: sha512-b6Ilus+c3RrdDk+JhLKUAQfzzgLEPy6wcXqS7f/xe1EETvsDP6GORG7SFuOs6cID5YkqchW/LXZbX5bc8j7ZcQ==} + engines: {node: '>=8'} + call-bind@1.0.7: resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} engines: {node: '>= 0.4'} @@ -1274,6 +1682,10 @@ packages: capnp-ts@0.7.0: resolution: {integrity: sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==} + chai@5.1.2: + resolution: {integrity: sha512-aGtmf24DW6MLHHG5gCx4zaI3uBq3KRtxeVs0DjFH6Z0rDNbsvTxFASFvdj79pxjxZ8/5u3PIiN3IwEIQkiiuPw==} + engines: {node: '>=12'} + chalk@4.1.2: resolution: {integrity: sha512-oKnbhFyRIXpUuez8iBMmyEa4nbj4IOQyuhc/wy9kY7/WVPcwIO9VA668Pu8RkO7+0G76SLROeyw9CpQ061i4mA==} engines: {node: '>=10'} @@ -1281,6 +1693,10 @@ packages: charwise@3.0.1: resolution: {integrity: sha512-RcdumNsM6fJZ5HHbYunqj2bpurVRGsXour3OR+SlLEHFhG6ALm54i6Osnh+OvO7kEoSBzwExpblYFH8zKQiEPw==} + check-error@2.1.1: + resolution: {integrity: sha512-OAlb+T7V4Op9OwdkjmguYRqncdlx5JiofwOAUkmTF+jNdHwzTaTs4sRAGpzLF3oOz5xAyDGrPgeIDFQmDOTiJw==} + engines: {node: '>= 16'} + chokidar@3.6.0: resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} engines: {node: '>= 8.10.0'} @@ -1359,6 +1775,10 @@ packages: data-uri-to-buffer@2.0.2: resolution: {integrity: sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==} + data-uri-to-buffer@4.0.1: + resolution: {integrity: sha512-0R9ikRb668HB7QDxT1vkpuUBtqc53YyAwMwGeUFKRojY/NWKvdZ+9UYtRfGmhqNbRkTSVpMbmyhXipFFv2cb/A==} + engines: {node: '>= 12'} + data-view-buffer@1.0.1: resolution: {integrity: sha512-0lht7OugA5x3iJLOWFhWK/5ehONdprk0ISXqVFn/NFrDu+cuc8iADFrGQz5BnRK7LLU3JmkbXSxaqX+/mXYtUA==} engines: {node: '>= 0.4'} @@ -1380,6 +1800,10 @@ packages: supports-color: optional: true + deep-eql@5.0.2: + resolution: {integrity: sha512-h5k/5U50IJJFpzfL6nO9jaaumfjO/f2NjK/oYB2Djzm4p9L+3T9qWpZqZ2hAbLPuuYq9wrU08WQyBTL5GbPk5Q==} + engines: {node: '>=6'} + deep-is@0.1.4: resolution: {integrity: sha512-oIPzksmTg4/MriiaYGO+okXDT7ztn/w3Eptv/+gSIdMdKsJo0u4CfYNFJPy+4SKMuCqGw2wxnA+URMg3t8a/bQ==} @@ -1395,6 +1819,10 @@ packages: resolution: {integrity: sha512-0je+qPKHEMohvfRTCEo3CrPG6cAzAYgmzKyxRiYSSDkS6eGJdyVJm7WaYA5ECaAD9wLB2T4EEeymA5aFVcYXCA==} engines: {node: '>=6'} + detect-libc@2.0.2: + resolution: {integrity: sha512-UX6sGumvvqSaXgdKGUsgZWqcUyIXZ/vZTrlRT/iobiKhGL0zL4d3osHj3uqllWJK+i+sixDS/3COVEOFbupFyw==} + engines: {node: '>=8'} + didyoumean@1.2.2: resolution: {integrity: sha512-gxtyfqMg7GKyhQmb056K7M3xszy/myH8w+B4RT+QXBQsvAOdc3XymqDDPHx1BgPgsdAA5SIifona89YtRATDzw==} @@ -1405,6 +1833,102 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} + drizzle-kit@0.30.1: + resolution: {integrity: sha512-HmA/NeewvHywhJ2ENXD3KvOuM/+K2dGLJfxVfIHsGwaqKICJnS+Ke2L6UcSrSrtMJLJaT0Im1Qv4TFXfaZShyw==} + hasBin: true + + drizzle-orm@0.38.3: + resolution: {integrity: sha512-w41Y+PquMpSff/QDRGdItG0/aWca+/J3Sda9PPGkTxBtjWQvgU1jxlFBXdjog5tYvTu58uvi3PwR1NuCx0KeZg==} + peerDependencies: + '@aws-sdk/client-rds-data': '>=3' + '@cloudflare/workers-types': '>=4' + '@electric-sql/pglite': '>=0.2.0' + '@libsql/client': '>=0.10.0' + '@libsql/client-wasm': '>=0.10.0' + '@neondatabase/serverless': '>=0.10.0' + '@op-engineering/op-sqlite': '>=2' + '@opentelemetry/api': ^1.4.1 + '@planetscale/database': '>=1' + '@prisma/client': '*' + '@tidbcloud/serverless': '*' + '@types/better-sqlite3': '*' + '@types/pg': '*' + '@types/react': '>=18' + '@types/sql.js': '*' + '@vercel/postgres': '>=0.8.0' + '@xata.io/client': '*' + better-sqlite3: '>=7' + bun-types: '*' + expo-sqlite: '>=14.0.0' + knex: '*' + kysely: '*' + mysql2: '>=2' + pg: '>=8' + postgres: '>=3' + prisma: '*' + react: '>=18' + sql.js: '>=1' + sqlite3: '>=5' + peerDependenciesMeta: + '@aws-sdk/client-rds-data': + optional: true + '@cloudflare/workers-types': + optional: true + '@electric-sql/pglite': + optional: true + '@libsql/client': + optional: true + '@libsql/client-wasm': + optional: true + '@neondatabase/serverless': + optional: true + '@op-engineering/op-sqlite': + optional: true + '@opentelemetry/api': + optional: true + '@planetscale/database': + optional: true + '@prisma/client': + optional: true + '@tidbcloud/serverless': + optional: true + '@types/better-sqlite3': + optional: true + '@types/pg': + optional: true + '@types/react': + optional: true + '@types/sql.js': + optional: true + '@vercel/postgres': + optional: true + '@xata.io/client': + optional: true + better-sqlite3: + optional: true + bun-types: + optional: true + expo-sqlite: + optional: true + knex: + optional: true + kysely: + optional: true + mysql2: + optional: true + pg: + optional: true + postgres: + optional: true + prisma: + optional: true + react: + optional: true + sql.js: + optional: true + sqlite3: + optional: true + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} @@ -1439,6 +1963,9 @@ packages: resolution: {integrity: sha512-/SurEfycdyssORP/E+bj4sEu1CWw4EmLDsHynHwSXQ7utgbrMRWW195pTrCjFgFCddf/UkYm3oqKPRq5i8bJbw==} engines: {node: '>= 0.4'} + es-module-lexer@1.6.0: + resolution: {integrity: sha512-qqnD1yMU6tk/jnaMosogGySTZP8YtUgAffA9nMN+E/rjxcfRQ6IEk7IiozUjgxKoFHBGjTLnrHB/YC45r/59EQ==} + es-object-atoms@1.0.0: resolution: {integrity: sha512-MZ4iQ6JwHOBQjahnjwaC1ZtIBH+2ohjamzAO3oaHcXYup7qxjF2fixyH+Q71voWHeOkI2q/TnJao/KfXYIZWbw==} engines: {node: '>= 0.4'} @@ -1454,6 +1981,21 @@ packages: resolution: {integrity: sha512-QCOllgZJtaUo9miYBcLChTUaHNjJF3PYs1VidD7AwiEj1kYxKeQTctLAezAOH5ZKRH0g2IgPn6KwB4IT8iRpvA==} engines: {node: '>= 0.4'} + esbuild-register@3.6.0: + resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} + peerDependencies: + esbuild: '>=0.12 <1' + + esbuild@0.18.20: + resolution: {integrity: sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==} + engines: {node: '>=12'} + hasBin: true + + esbuild@0.19.12: + resolution: {integrity: sha512-aARqgq8roFBj054KvQr5f1sFu0D65G+miZRCuJyJ0G13Zwx7vRar5Zhn2tkQNzIXcBrNVsv/8stehpj+GAjgbg==} + engines: {node: '>=12'} + hasBin: true + esbuild@0.21.5: resolution: {integrity: sha512-mg3OPMV4hXywwpoDxu3Qda5xCKQi+vCTZq8S9J/EpkhB2HzKXq4SNFZE3+NK93JYxc8VMSep+lOUSC/RVKaBqw==} engines: {node: '>=12'} @@ -1535,6 +2077,9 @@ packages: estree-walker@2.0.2: resolution: {integrity: sha512-Rfkk/Mp/DL7JVje3u18FxFujQlTNR2q6QfMSMB7AvCBx91NGj/ba3kCfza0f6dVDbw7YlRf/nDrn7pQrCCyQ/w==} + estree-walker@3.0.3: + resolution: {integrity: sha512-7RUKfXgSMMkzt6ZuXmqapOurLGPPfgj6l9uRZ7lRGolvk0y2yocc35LdcxKC5PQZdn2DMqioAQ2NoWcrTKmm6g==} + esutils@2.0.3: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} @@ -1554,6 +2099,10 @@ packages: resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} engines: {node: '>=6'} + expect-type@1.1.0: + resolution: {integrity: sha512-bFi65yM+xZgk+u/KRIpekdSYkTB5W1pEf0Lt8Q8Msh7b+eQ7LXVtIB1Bkm4fvclDEL1b2CZkMhv2mOeF8tMdkA==} + engines: {node: '>=12.0.0'} + fast-deep-equal@3.1.3: resolution: {integrity: sha512-f3qQ9oQy9j2AhBe/H9VC91wLmKBCCU/gDOnKNAYG5hswO7BLKj09Hc5HYNz9cGI++xlpDCIgDaitVs03ATR84Q==} @@ -1574,6 +2123,10 @@ packages: fastq@1.17.1: resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fetch-blob@3.2.0: + resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} + engines: {node: ^12.20 || >= 14.13} + file-entry-cache@8.0.0: resolution: {integrity: sha512-XXTUwCvisa5oacNGRP9SfNtYBNAMi+RPwBFmblZEF7N7swHYQS6/Zfk7SRwx4D5j3CH211YNRco1DEMNVfZCnQ==} engines: {node: '>=16.0.0'} @@ -1603,6 +2156,10 @@ packages: resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} + formdata-polyfill@4.0.10: + resolution: {integrity: sha512-buewHzMvYL29jdeQTVILecSaZKnt/RJWjoZCF5OW60Z67/GmSLBkOFM7qh1PI3zFNtJbaZL5eQu1vLfazOwj4g==} + engines: {node: '>=12.20.0'} + fraction.js@4.3.7: resolution: {integrity: sha512-ZsDfxO51wGAXREY55a7la9LScWpwv9RxIrYABrlvOFBlH/ShPnrtsXeuUIfXKKOVicNxQ+o8JTbJvjS4M89yew==} @@ -1728,6 +2285,9 @@ packages: idb@8.0.0: resolution: {integrity: sha512-l//qvlAKGmQO31Qn7xdzagVPPaHTxXx199MhrAFuVBTPqydcPYBWjkrbv4Y0ktB+GmWOiwHl237UUOrLmQxLvw==} + idb@8.0.1: + resolution: {integrity: sha512-EkBCzUZSdhJV8PxMSbeEV//xguVKZu9hZZulM+2gHXI0t2hGVU3eYE6/XnH77DS6FM2FY8wl17aDcu9vXpvLWQ==} + ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} @@ -1942,6 +2502,9 @@ packages: resolution: {integrity: sha512-yPBThwecp1wS9DmoA4x4KR2h3QoslacnDR8ypuFM962kI4/456Iy1oHx2RAgh4jfZNdn0bctsdadceiBUgpU1g==} hasBin: true + js-base64@3.7.7: + resolution: {integrity: sha512-7rCnleh0z2CkXhH67J8K1Ytz0b2Y+yxTPL+/KOJoa20hfnVQ/3/T6W/KflYI4bRHRagNeXeU2bkNGI3v1oS/lw==} + js-cookie@3.0.5: resolution: {integrity: sha512-cEiJEAEoIbWfCZYKWhVwFuvPX1gETRYPw6LlaTKoxD3s2AkXzkCjnp6h0V77ozyqj0jakteJ4YqDJT830+lVGw==} engines: {node: '>=14'} @@ -1990,6 +2553,10 @@ packages: resolution: {integrity: sha512-+bT2uH4E5LGE7h/n3evcS/sQlJXCpIp6ym8OWJ5eV6+67Dsql/LaaT7qJBAt2rzfoa/5QBGBhxDix1dMt2kQKQ==} engines: {node: '>= 0.8.0'} + libsql@0.4.7: + resolution: {integrity: sha512-T9eIRCs6b0J1SHKYIvD8+KCJMcWZ900iZyxdnSCdqxN12Z1ijzT+jY5nrk72Jw4B0HGzms2NgpryArlJqvc3Lw==} + os: [darwin, linux, win32] + lilconfig@3.1.3: resolution: {integrity: sha512-/vlFKAoH5Cgt3Ie+JLhRbwOsCQePABiU3tJ1egGvyQ+33R/vcwM2Zl2QR/LzjsBeItPt3oSVXapn+m4nQDvpzw==} engines: {node: '>=14'} @@ -2014,6 +2581,9 @@ packages: resolution: {integrity: sha512-lyuxPGr/Wfhrlem2CL/UcnUc1zcqKAImBDzukY7Y5F/yQiNdko6+fRLevlw1HgMySw7f611UIY408EtxRSoK3Q==} hasBin: true + loupe@3.1.2: + resolution: {integrity: sha512-23I4pFZHmAemUnz8WZXbYRSKYj801VDaNv9ETuMh7IrMc7VuVVSo+Z9iLE3ni30+U48iDWfi30d3twAXBYmnCg==} + lru-cache@10.4.3: resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} @@ -2027,6 +2597,10 @@ packages: resolution: {integrity: sha512-q9MmZXd2rRWHS6GU3WEm3HyiXZyyoA1DqdOhEq0lxPBmKb5S7IAOwX0RgUCwJfqjelDCySa5h8ujOy24LqsWcw==} engines: {node: '>= 4.0.0'} + memfs@4.17.0: + resolution: {integrity: sha512-4eirfZ7thblFmqFjywlTmuWVSvccHAJbn1r8qQLzmTO11qcqpohOjmY2mFce6x7x7WtskzRqApPD0hv+Oa74jg==} + engines: {node: '>= 4.0.0'} + merge-stream@2.0.0: resolution: {integrity: sha512-abv/qOcuPfk3URPfDzmZU1LKmuw8kT+0nIHvKrKgFrwifol/doWcdA4ZqsWQ8ENrFKkd67Mfpo/LovbIUsbt3w==} @@ -2086,6 +2660,14 @@ packages: node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} + node-domexception@1.0.0: + resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} + engines: {node: '>=10.5.0'} + + node-fetch@3.3.2: + resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + node-gyp-build@4.8.4: resolution: {integrity: sha512-LA4ZjwlnUblHVgq0oBF3Jl/6h/Nvs5fzBLwdEF4nuxnFdsfajde4WfxtJr3CaiH+F6ewcIB/q4jQ4UzPyid+CQ==} hasBin: true @@ -2109,80 +2691,6 @@ packages: resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - npm@10.9.2: - resolution: {integrity: sha512-iriPEPIkoMYUy3F6f3wwSZAU93E0Eg6cHwIR6jzzOXWSy+SD/rOODEs74cVONHKSx2obXtuUoyidVEhISrisgQ==} - engines: {node: ^18.17.0 || >=20.5.0} - hasBin: true - bundledDependencies: - - '@isaacs/string-locale-compare' - - '@npmcli/arborist' - - '@npmcli/config' - - '@npmcli/fs' - - '@npmcli/map-workspaces' - - '@npmcli/package-json' - - '@npmcli/promise-spawn' - - '@npmcli/redact' - - '@npmcli/run-script' - - '@sigstore/tuf' - - abbrev - - archy - - cacache - - chalk - - ci-info - - cli-columns - - fastest-levenshtein - - fs-minipass - - glob - - graceful-fs - - hosted-git-info - - ini - - init-package-json - - is-cidr - - json-parse-even-better-errors - - libnpmaccess - - libnpmdiff - - libnpmexec - - libnpmfund - - libnpmhook - - libnpmorg - - libnpmpack - - libnpmpublish - - libnpmsearch - - libnpmteam - - libnpmversion - - make-fetch-happen - - minimatch - - minipass - - minipass-pipeline - - ms - - node-gyp - - nopt - - normalize-package-data - - npm-audit-report - - npm-install-checks - - npm-package-arg - - npm-pick-manifest - - npm-profile - - npm-registry-fetch - - npm-user-validate - - p-map - - pacote - - parse-conflict-json - - proc-log - - qrcode-terminal - - read - - semver - - spdx-expression-parse - - ssri - - supports-color - - tar - - text-table - - tiny-relative-date - - treeverse - - validate-npm-package-name - - which - - write-file-atomic - object-assign@4.1.1: resolution: {integrity: sha512-rJgTQnkUnH1sFw8yT6VSU3zD3sWmu6sZhIseY8VX+GRu3P6F7Fu+JNDoXfklElbLJSnc3FUQHVe4cU5hj+BcUg==} engines: {node: '>=0.10.0'} @@ -2235,6 +2743,10 @@ packages: resolution: {integrity: sha512-H0jc0q1vOzlEk0TqAKXKZxdl7kX3OFUzCnNVUnq5Pc3DGo0kpeaMuPqxQn235HibwBEb0/pm9dgKTjXy66fBkg==} engines: {node: '>=18'} + p-limit@6.2.0: + resolution: {integrity: sha512-kuUqqHNUqoIWp/c467RI4X6mmyuojY5jGutNU0wVTmEOOfcuwLqyMVoAi9MKi2Ak+5i9+nhmrK4ufZE8069kHA==} + engines: {node: '>=18'} + p-locate@5.0.0: resolution: {integrity: sha512-LaNjtRWUBY++zB5nE/NwcaoMylSPk+S+ZHNB1TzdbMJMny6dynpAGt7X/tl/QYq3TIeE6nxHppbo2LGymrG5Pw==} engines: {node: '>=10'} @@ -2296,6 +2808,13 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + + pathval@2.0.0: + resolution: {integrity: sha512-vE7JKRyES09KiunauX7nd2Q9/L7lhok4smP9RZTDeD4MVs72Dp2qNFVz39Nz5a0FVEW0BJR6C0DYrq6unoziZA==} + engines: {node: '>= 14.16'} + picocolors@1.1.1: resolution: {integrity: sha512-xceH2snhtb5M9liqDsmEw56le376mTZkEX/jEb/RxNFyegNul7eNslCXP9FDj/Lcu0X8KEyMceP2ntpaHrDEVA==} @@ -2363,6 +2882,11 @@ packages: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} + prettier@3.4.2: + resolution: {integrity: sha512-e9MewbtFo+Fevyuxn/4rrcDAaq0IYxPGLvObpQjiZBMAzB9IGmzlnG9RZy3FFas+eBMu2vA0CszMeduow5dIuQ==} + engines: {node: '>=14'} + hasBin: true + printable-characters@1.0.42: resolution: {integrity: sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==} @@ -2377,6 +2901,9 @@ packages: prolly-trees@1.0.4: resolution: {integrity: sha512-vtnxfw5wnUHbGa0IIIk9B9DRztJWZw+t9d0s0iGxY/VzEGCg2EMl8GgGU3EhSquFLWapwbGjFTL1ipbezaXR3g==} + promise-limit@2.7.0: + resolution: {integrity: sha512-7nJ6v5lnJsXwGprnGXga4wx6d1POjvi5Qmf1ivTRxTjH4Z/9Czja/UCMLVmB9N93GeWOU93XaFaEt6jbuoagNw==} + prop-types@15.8.1: resolution: {integrity: sha512-oj87CgZICdulUohogVAR7AjlC0327U4el4L6eAvOqCeudMDVU0NThNaV+b9Df4dXgSP1gXMTnPdhfe/2qDH5cg==} @@ -2548,6 +3075,9 @@ packages: resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} engines: {node: '>= 0.4'} + siginfo@2.0.0: + resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} + signal-exit@4.1.0: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} @@ -2556,6 +3086,9 @@ packages: resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + source-map@0.5.7: resolution: {integrity: sha512-LbrmJOMUSdEVxIKvdcJzQC+nQhe8FUZQTXQy6+I75skNgn3OoQ0DZA8YnFa7gp8tqtL3KPf1kmo0R5DoApeSGQ==} engines: {node: '>=0.10.0'} @@ -2567,6 +3100,9 @@ packages: sparse-array@1.3.2: resolution: {integrity: sha512-ZT711fePGn3+kQyLuv1fpd3rNSkNF8vd5Kv2D+qnOANeyKs3fx6bUMGWRPvgTTcYV64QMqZKZwcuaQSP3AZ0tg==} + stackback@0.0.2: + resolution: {integrity: sha512-1XMJE5fQo1jGH6Y/7ebnwPOBEkIEnT4QF32d5R1+VXdXveM0IBMJt8zfaxX1P3QhVwrYe+576+jkANtSS2mBbw==} + stacktracey@2.1.8: resolution: {integrity: sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==} @@ -2668,6 +3204,24 @@ packages: peerDependencies: tslib: ^2 + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyexec@0.3.2: + resolution: {integrity: sha512-KQQR9yN7R5+OSwaK0XQoj22pwHoTlgYqmUscPYoknOoWCWfj/5/ABTMRi69FrKU5ffPVh5QcFikpWJI/P1ocHA==} + + tinypool@1.0.2: + resolution: {integrity: sha512-al6n+QEANGFOMf/dmUMsuS5/r9B06uwlyNjZZql/zv8J7ybHCgoihBNORZCY2mzUuAnomQa2JdhyHKzZxPCrFA==} + engines: {node: ^18.0.0 || >=20.0.0} + + tinyrainbow@1.2.0: + resolution: {integrity: sha512-weEDEq7Z5eTHPDh4xjX789+fHfF+P8boiFB+0vbWzpbnbsEr/GRaohi/uMKxg8RZMXnl1ItAi/IUHWMsjDV7kQ==} + engines: {node: '>=14.0.0'} + + tinyspy@3.0.2: + resolution: {integrity: sha512-n1cw8k1k0x4pgA2+9XrOkFydTerNcJ1zWCO5Nn9scWHTD+5tp8dghT2x1uduQePZTZgd3Tupf+x9BxJjeJi77Q==} + engines: {node: '>=14.0.0'} + to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -2776,6 +3330,42 @@ packages: varint@6.0.0: resolution: {integrity: sha512-cXEIW6cfr15lFv563k4GuVuW/fiwjknytD37jIOLSdSWuOI6WnO/oKwmP2FQTU2l01LP8/M5TSAJpzUaGe3uWg==} + vite-node@2.1.8: + resolution: {integrity: sha512-uPAwSr57kYjAUux+8E2j0q0Fxpn8M9VoyfGiRI8Kfktz9NcYMCenwY5RnZxnF1WTu3TGiYipirIzacLL3VVGFg==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + + vite@5.4.11: + resolution: {integrity: sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@types/node': ^18.0.0 || >=20.0.0 + less: '*' + lightningcss: ^1.21.0 + sass: '*' + sass-embedded: '*' + stylus: '*' + sugarss: '*' + terser: ^5.4.0 + peerDependenciesMeta: + '@types/node': + optional: true + less: + optional: true + lightningcss: + optional: true + sass: + optional: true + sass-embedded: + optional: true + stylus: + optional: true + sugarss: + optional: true + terser: + optional: true + vite@6.0.3: resolution: {integrity: sha512-Cmuo5P0ENTN6HxLSo6IHsjCLn/81Vgrp81oaiFFMRa8gGDj5xEjIcEpf2ZymZtZR8oU0P2JX5WuUp/rlXcHkAw==} engines: {node: ^18.0.0 || ^20.0.0 || >=22.0.0} @@ -2816,6 +3406,35 @@ packages: yaml: optional: true + vitest@2.1.8: + resolution: {integrity: sha512-1vBKTZskHw/aosXqQUlVWWlGUxSJR8YtiyZDJAFeW2kPAeX6S3Sool0mjspO+kXLuxVWlEDDowBAeqeAQefqLQ==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + peerDependencies: + '@edge-runtime/vm': '*' + '@types/node': ^18.0.0 || >=20.0.0 + '@vitest/browser': 2.1.8 + '@vitest/ui': 2.1.8 + happy-dom: '*' + jsdom: '*' + peerDependenciesMeta: + '@edge-runtime/vm': + optional: true + '@types/node': + optional: true + '@vitest/browser': + optional: true + '@vitest/ui': + optional: true + happy-dom: + optional: true + jsdom: + optional: true + + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + engines: {node: '>= 8'} + which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -2836,6 +3455,11 @@ packages: engines: {node: '>= 8'} hasBin: true + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + engines: {node: '>=8'} + hasBin: true + word-wrap@1.2.5: resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} engines: {node: '>=0.10.0'} @@ -2903,6 +3527,13 @@ snapshots: transitivePeerDependencies: - typescript + '@adviser/cement@0.3.5': + dependencies: + ts-essentials: 10.0.3 + yaml: 2.6.1 + transitivePeerDependencies: + - typescript + '@alloc/quick-lru@5.2.0': {} '@ampproject/remapping@2.3.0': @@ -3109,6 +3740,8 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 + '@drizzle-team/brocli@0.10.2': {} + '@emotion/babel-plugin@11.13.5': dependencies: '@babel/helper-module-imports': 7.25.9 @@ -3175,6 +3808,19 @@ snapshots: '@emotion/weak-memoize@0.3.1': {} + '@esbuild-kit/core-utils@3.3.2': + dependencies: + esbuild: 0.18.20 + source-map-support: 0.5.21 + + '@esbuild-kit/esm-loader@2.6.5': + dependencies: + '@esbuild-kit/core-utils': 3.3.2 + get-tsconfig: 4.8.1 + + '@esbuild/aix-ppc64@0.19.12': + optional: true + '@esbuild/aix-ppc64@0.21.5': optional: true @@ -3184,6 +3830,12 @@ snapshots: '@esbuild/aix-ppc64@0.24.0': optional: true + '@esbuild/android-arm64@0.18.20': + optional: true + + '@esbuild/android-arm64@0.19.12': + optional: true + '@esbuild/android-arm64@0.21.5': optional: true @@ -3193,13 +3845,25 @@ snapshots: '@esbuild/android-arm64@0.24.0': optional: true + '@esbuild/android-arm@0.18.20': + optional: true + + '@esbuild/android-arm@0.19.12': + optional: true + '@esbuild/android-arm@0.21.5': optional: true '@esbuild/android-arm@0.23.1': optional: true - '@esbuild/android-arm@0.24.0': + '@esbuild/android-arm@0.24.0': + optional: true + + '@esbuild/android-x64@0.18.20': + optional: true + + '@esbuild/android-x64@0.19.12': optional: true '@esbuild/android-x64@0.21.5': @@ -3211,6 +3875,12 @@ snapshots: '@esbuild/android-x64@0.24.0': optional: true + '@esbuild/darwin-arm64@0.18.20': + optional: true + + '@esbuild/darwin-arm64@0.19.12': + optional: true + '@esbuild/darwin-arm64@0.21.5': optional: true @@ -3220,6 +3890,12 @@ snapshots: '@esbuild/darwin-arm64@0.24.0': optional: true + '@esbuild/darwin-x64@0.18.20': + optional: true + + '@esbuild/darwin-x64@0.19.12': + optional: true + '@esbuild/darwin-x64@0.21.5': optional: true @@ -3229,6 +3905,12 @@ snapshots: '@esbuild/darwin-x64@0.24.0': optional: true + '@esbuild/freebsd-arm64@0.18.20': + optional: true + + '@esbuild/freebsd-arm64@0.19.12': + optional: true + '@esbuild/freebsd-arm64@0.21.5': optional: true @@ -3238,6 +3920,12 @@ snapshots: '@esbuild/freebsd-arm64@0.24.0': optional: true + '@esbuild/freebsd-x64@0.18.20': + optional: true + + '@esbuild/freebsd-x64@0.19.12': + optional: true + '@esbuild/freebsd-x64@0.21.5': optional: true @@ -3247,6 +3935,12 @@ snapshots: '@esbuild/freebsd-x64@0.24.0': optional: true + '@esbuild/linux-arm64@0.18.20': + optional: true + + '@esbuild/linux-arm64@0.19.12': + optional: true + '@esbuild/linux-arm64@0.21.5': optional: true @@ -3256,6 +3950,12 @@ snapshots: '@esbuild/linux-arm64@0.24.0': optional: true + '@esbuild/linux-arm@0.18.20': + optional: true + + '@esbuild/linux-arm@0.19.12': + optional: true + '@esbuild/linux-arm@0.21.5': optional: true @@ -3265,6 +3965,12 @@ snapshots: '@esbuild/linux-arm@0.24.0': optional: true + '@esbuild/linux-ia32@0.18.20': + optional: true + + '@esbuild/linux-ia32@0.19.12': + optional: true + '@esbuild/linux-ia32@0.21.5': optional: true @@ -3274,6 +3980,12 @@ snapshots: '@esbuild/linux-ia32@0.24.0': optional: true + '@esbuild/linux-loong64@0.18.20': + optional: true + + '@esbuild/linux-loong64@0.19.12': + optional: true + '@esbuild/linux-loong64@0.21.5': optional: true @@ -3283,6 +3995,12 @@ snapshots: '@esbuild/linux-loong64@0.24.0': optional: true + '@esbuild/linux-mips64el@0.18.20': + optional: true + + '@esbuild/linux-mips64el@0.19.12': + optional: true + '@esbuild/linux-mips64el@0.21.5': optional: true @@ -3292,6 +4010,12 @@ snapshots: '@esbuild/linux-mips64el@0.24.0': optional: true + '@esbuild/linux-ppc64@0.18.20': + optional: true + + '@esbuild/linux-ppc64@0.19.12': + optional: true + '@esbuild/linux-ppc64@0.21.5': optional: true @@ -3301,6 +4025,12 @@ snapshots: '@esbuild/linux-ppc64@0.24.0': optional: true + '@esbuild/linux-riscv64@0.18.20': + optional: true + + '@esbuild/linux-riscv64@0.19.12': + optional: true + '@esbuild/linux-riscv64@0.21.5': optional: true @@ -3310,6 +4040,12 @@ snapshots: '@esbuild/linux-riscv64@0.24.0': optional: true + '@esbuild/linux-s390x@0.18.20': + optional: true + + '@esbuild/linux-s390x@0.19.12': + optional: true + '@esbuild/linux-s390x@0.21.5': optional: true @@ -3319,6 +4055,12 @@ snapshots: '@esbuild/linux-s390x@0.24.0': optional: true + '@esbuild/linux-x64@0.18.20': + optional: true + + '@esbuild/linux-x64@0.19.12': + optional: true + '@esbuild/linux-x64@0.21.5': optional: true @@ -3328,6 +4070,12 @@ snapshots: '@esbuild/linux-x64@0.24.0': optional: true + '@esbuild/netbsd-x64@0.18.20': + optional: true + + '@esbuild/netbsd-x64@0.19.12': + optional: true + '@esbuild/netbsd-x64@0.21.5': optional: true @@ -3343,6 +4091,12 @@ snapshots: '@esbuild/openbsd-arm64@0.24.0': optional: true + '@esbuild/openbsd-x64@0.18.20': + optional: true + + '@esbuild/openbsd-x64@0.19.12': + optional: true + '@esbuild/openbsd-x64@0.21.5': optional: true @@ -3352,6 +4106,12 @@ snapshots: '@esbuild/openbsd-x64@0.24.0': optional: true + '@esbuild/sunos-x64@0.18.20': + optional: true + + '@esbuild/sunos-x64@0.19.12': + optional: true + '@esbuild/sunos-x64@0.21.5': optional: true @@ -3361,6 +4121,12 @@ snapshots: '@esbuild/sunos-x64@0.24.0': optional: true + '@esbuild/win32-arm64@0.18.20': + optional: true + + '@esbuild/win32-arm64@0.19.12': + optional: true + '@esbuild/win32-arm64@0.21.5': optional: true @@ -3370,6 +4136,12 @@ snapshots: '@esbuild/win32-arm64@0.24.0': optional: true + '@esbuild/win32-ia32@0.18.20': + optional: true + + '@esbuild/win32-ia32@0.19.12': + optional: true + '@esbuild/win32-ia32@0.21.5': optional: true @@ -3379,6 +4151,12 @@ snapshots: '@esbuild/win32-ia32@0.24.0': optional: true + '@esbuild/win32-x64@0.18.20': + optional: true + + '@esbuild/win32-x64@0.19.12': + optional: true + '@esbuild/win32-x64@0.21.5': optional: true @@ -3461,6 +4239,23 @@ snapshots: transitivePeerDependencies: - typescript + '@fireproof/core@0.19.121(react@18.3.1)': + dependencies: + '@adviser/cement': 0.3.5 + '@fireproof/vendor': 1.0.4 + '@ipld/unixfs': 3.0.0 + charwise: 3.0.1 + idb: 8.0.1 + memfs: 4.17.0 + multiformats: 13.3.1 + p-limit: 6.2.0 + p-map: 7.0.3 + p-retry: 6.2.1 + prolly-trees: 1.0.4 + react: 18.3.1 + transitivePeerDependencies: + - typescript + '@fireproof/vendor@1.0.0': dependencies: '@ipld/dag-pb': 4.1.3 @@ -3479,6 +4274,24 @@ snapshots: progress-events: 1.0.1 varint: 6.0.0 + '@fireproof/vendor@1.0.4': + dependencies: + '@ipld/dag-pb': 4.1.3 + '@multiformats/murmur3': 2.1.8 + hamt-sharding: 3.0.6 + interface-blockstore: 5.3.1 + ipfs-unixfs: 11.2.0 + it-filter: 3.1.1 + it-last: 3.0.6 + it-map: 3.1.1 + it-parallel: 3.0.8 + it-pipe: 3.0.1 + it-pushable: 3.2.3 + multiformats: 13.3.1 + p-queue: 8.0.1 + progress-events: 1.0.1 + varint: 6.0.0 + '@floating-ui/core@1.6.8': dependencies: '@floating-ui/utils': 0.2.8 @@ -3582,11 +4395,69 @@ snapshots: dependencies: tslib: 2.8.1 + '@libsql/client@0.14.0': + dependencies: + '@libsql/core': 0.14.0 + '@libsql/hrana-client': 0.7.0 + js-base64: 3.7.7 + libsql: 0.4.7 + promise-limit: 2.7.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@libsql/core@0.14.0': + dependencies: + js-base64: 3.7.7 + + '@libsql/darwin-arm64@0.4.7': + optional: true + + '@libsql/darwin-x64@0.4.7': + optional: true + + '@libsql/hrana-client@0.7.0': + dependencies: + '@libsql/isomorphic-fetch': 0.3.1 + '@libsql/isomorphic-ws': 0.1.5 + js-base64: 3.7.7 + node-fetch: 3.3.2 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@libsql/isomorphic-fetch@0.3.1': {} + + '@libsql/isomorphic-ws@0.1.5': + dependencies: + '@types/ws': 8.5.13 + ws: 8.18.0 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + + '@libsql/linux-arm64-gnu@0.4.7': + optional: true + + '@libsql/linux-arm64-musl@0.4.7': + optional: true + + '@libsql/linux-x64-gnu@0.4.7': + optional: true + + '@libsql/linux-x64-musl@0.4.7': + optional: true + + '@libsql/win32-x64-msvc@0.4.7': + optional: true + '@multiformats/murmur3@2.1.8': dependencies: multiformats: 13.3.1 murmurhash3js-revisited: 3.0.0 + '@neon-rs/load@0.0.4': {} + '@nodelib/fs.scandir@2.1.5': dependencies: '@nodelib/fs.stat': 2.0.5 @@ -3755,6 +4626,10 @@ snapshots: '@types/retry@0.12.2': {} + '@types/ws@8.5.13': + dependencies: + '@types/node': 22.10.1 + '@vitejs/plugin-react@4.3.4(vite@6.0.3(@types/node@22.10.1)(jiti@2.4.1)(tsx@4.19.2)(yaml@2.6.1))': dependencies: '@babel/core': 7.26.0 @@ -3766,6 +4641,46 @@ snapshots: transitivePeerDependencies: - supports-color + '@vitest/expect@2.1.8': + dependencies: + '@vitest/spy': 2.1.8 + '@vitest/utils': 2.1.8 + chai: 5.1.2 + tinyrainbow: 1.2.0 + + '@vitest/mocker@2.1.8(vite@5.4.11(@types/node@22.10.1))': + dependencies: + '@vitest/spy': 2.1.8 + estree-walker: 3.0.3 + magic-string: 0.30.12 + optionalDependencies: + vite: 5.4.11(@types/node@22.10.1) + + '@vitest/pretty-format@2.1.8': + dependencies: + tinyrainbow: 1.2.0 + + '@vitest/runner@2.1.8': + dependencies: + '@vitest/utils': 2.1.8 + pathe: 1.1.2 + + '@vitest/snapshot@2.1.8': + dependencies: + '@vitest/pretty-format': 2.1.8 + magic-string: 0.30.12 + pathe: 1.1.2 + + '@vitest/spy@2.1.8': + dependencies: + tinyspy: 3.0.2 + + '@vitest/utils@2.1.8': + dependencies: + '@vitest/pretty-format': 2.1.8 + loupe: 3.1.2 + tinyrainbow: 1.2.0 + '@zxcvbn-ts/core@3.0.4': dependencies: fastest-levenshtein: 1.0.16 @@ -3872,6 +4787,8 @@ snapshots: dependencies: printable-characters: 1.0.42 + assertion-error@2.0.1: {} + autoprefixer@10.4.20(postcss@8.4.49): dependencies: browserslist: 4.24.0 @@ -3937,6 +4854,8 @@ snapshots: node-releases: 2.0.18 update-browserslist-db: 1.1.1(browserslist@4.24.2) + buffer-from@1.1.2: {} + buffer@5.7.1: dependencies: base64-js: 1.5.1 @@ -3947,6 +4866,8 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 + cac@6.7.14: {} + call-bind@1.0.7: dependencies: es-define-property: 1.0.0 @@ -3970,6 +4891,14 @@ snapshots: transitivePeerDependencies: - supports-color + chai@5.1.2: + dependencies: + assertion-error: 2.0.1 + check-error: 2.1.1 + deep-eql: 5.0.2 + loupe: 3.1.2 + pathval: 2.0.0 + chalk@4.1.2: dependencies: ansi-styles: 4.3.0 @@ -3977,6 +4906,8 @@ snapshots: charwise@3.0.1: {} + check-error@2.1.1: {} + chokidar@3.6.0: dependencies: anymatch: 3.1.3 @@ -4049,6 +4980,8 @@ snapshots: data-uri-to-buffer@2.0.2: {} + data-uri-to-buffer@4.0.1: {} + data-view-buffer@1.0.1: dependencies: call-bind: 1.0.7 @@ -4071,6 +5004,8 @@ snapshots: dependencies: ms: 2.1.3 + deep-eql@5.0.2: {} + deep-is@0.1.4: {} define-data-property@1.1.4: @@ -4087,6 +5022,8 @@ snapshots: dequal@2.0.3: {} + detect-libc@2.0.2: {} + didyoumean@1.2.2: {} dlv@1.1.3: {} @@ -4095,6 +5032,22 @@ snapshots: dependencies: esutils: 2.0.3 + drizzle-kit@0.30.1: + dependencies: + '@drizzle-team/brocli': 0.10.2 + '@esbuild-kit/esm-loader': 2.6.5 + esbuild: 0.19.12 + esbuild-register: 3.6.0(esbuild@0.19.12) + transitivePeerDependencies: + - supports-color + + drizzle-orm@0.38.3(@cloudflare/workers-types@4.20240718.0)(@libsql/client@0.14.0)(@types/react@19.0.1)(react@18.3.1): + optionalDependencies: + '@cloudflare/workers-types': 4.20240718.0 + '@libsql/client': 0.14.0 + '@types/react': 19.0.1 + react: 18.3.1 + eastasianwidth@0.2.0: {} electron-to-chromium@1.5.39: {} @@ -4181,6 +5134,8 @@ snapshots: iterator.prototype: 1.1.3 safe-array-concat: 1.1.2 + es-module-lexer@1.6.0: {} + es-object-atoms@1.0.0: dependencies: es-errors: 1.3.0 @@ -4201,6 +5156,64 @@ snapshots: is-date-object: 1.0.5 is-symbol: 1.0.4 + esbuild-register@3.6.0(esbuild@0.19.12): + dependencies: + debug: 4.4.0 + esbuild: 0.19.12 + transitivePeerDependencies: + - supports-color + + esbuild@0.18.20: + optionalDependencies: + '@esbuild/android-arm': 0.18.20 + '@esbuild/android-arm64': 0.18.20 + '@esbuild/android-x64': 0.18.20 + '@esbuild/darwin-arm64': 0.18.20 + '@esbuild/darwin-x64': 0.18.20 + '@esbuild/freebsd-arm64': 0.18.20 + '@esbuild/freebsd-x64': 0.18.20 + '@esbuild/linux-arm': 0.18.20 + '@esbuild/linux-arm64': 0.18.20 + '@esbuild/linux-ia32': 0.18.20 + '@esbuild/linux-loong64': 0.18.20 + '@esbuild/linux-mips64el': 0.18.20 + '@esbuild/linux-ppc64': 0.18.20 + '@esbuild/linux-riscv64': 0.18.20 + '@esbuild/linux-s390x': 0.18.20 + '@esbuild/linux-x64': 0.18.20 + '@esbuild/netbsd-x64': 0.18.20 + '@esbuild/openbsd-x64': 0.18.20 + '@esbuild/sunos-x64': 0.18.20 + '@esbuild/win32-arm64': 0.18.20 + '@esbuild/win32-ia32': 0.18.20 + '@esbuild/win32-x64': 0.18.20 + + esbuild@0.19.12: + optionalDependencies: + '@esbuild/aix-ppc64': 0.19.12 + '@esbuild/android-arm': 0.19.12 + '@esbuild/android-arm64': 0.19.12 + '@esbuild/android-x64': 0.19.12 + '@esbuild/darwin-arm64': 0.19.12 + '@esbuild/darwin-x64': 0.19.12 + '@esbuild/freebsd-arm64': 0.19.12 + '@esbuild/freebsd-x64': 0.19.12 + '@esbuild/linux-arm': 0.19.12 + '@esbuild/linux-arm64': 0.19.12 + '@esbuild/linux-ia32': 0.19.12 + '@esbuild/linux-loong64': 0.19.12 + '@esbuild/linux-mips64el': 0.19.12 + '@esbuild/linux-ppc64': 0.19.12 + '@esbuild/linux-riscv64': 0.19.12 + '@esbuild/linux-s390x': 0.19.12 + '@esbuild/linux-x64': 0.19.12 + '@esbuild/netbsd-x64': 0.19.12 + '@esbuild/openbsd-x64': 0.19.12 + '@esbuild/sunos-x64': 0.19.12 + '@esbuild/win32-arm64': 0.19.12 + '@esbuild/win32-ia32': 0.19.12 + '@esbuild/win32-x64': 0.19.12 + esbuild@0.21.5: optionalDependencies: '@esbuild/aix-ppc64': 0.21.5 @@ -4384,6 +5397,10 @@ snapshots: estree-walker@2.0.2: {} + estree-walker@3.0.3: + dependencies: + '@types/estree': 1.0.6 + esutils@2.0.3: {} event-target-shim@6.0.2: {} @@ -4404,6 +5421,8 @@ snapshots: exit-hook@2.2.1: {} + expect-type@1.1.0: {} + fast-deep-equal@3.1.3: {} fast-glob@3.3.2: @@ -4424,6 +5443,11 @@ snapshots: dependencies: reusify: 1.0.4 + fetch-blob@3.2.0: + dependencies: + node-domexception: 1.0.0 + web-streams-polyfill: 3.3.3 + file-entry-cache@8.0.0: dependencies: flat-cache: 4.0.1 @@ -4455,6 +5479,10 @@ snapshots: cross-spawn: 7.0.6 signal-exit: 4.1.0 + formdata-polyfill@4.0.10: + dependencies: + fetch-blob: 3.2.0 + fraction.js@4.3.7: {} fsevents@2.3.3: @@ -4497,7 +5525,6 @@ snapshots: get-tsconfig@4.8.1: dependencies: resolve-pkg-maps: 1.0.0 - optional: true glob-parent@5.1.2: dependencies: @@ -4572,6 +5599,8 @@ snapshots: idb@8.0.0: {} + idb@8.0.1: {} + ieee754@1.2.1: {} ignore@5.3.2: {} @@ -4774,6 +5803,8 @@ snapshots: jiti@2.4.1: optional: true + js-base64@3.7.7: {} + js-cookie@3.0.5: {} js-tokens@4.0.0: {} @@ -4816,6 +5847,19 @@ snapshots: prelude-ls: 1.2.1 type-check: 0.4.0 + libsql@0.4.7: + dependencies: + '@neon-rs/load': 0.0.4 + detect-libc: 2.0.2 + optionalDependencies: + '@libsql/darwin-arm64': 0.4.7 + '@libsql/darwin-x64': 0.4.7 + '@libsql/linux-arm64-gnu': 0.4.7 + '@libsql/linux-arm64-musl': 0.4.7 + '@libsql/linux-x64-gnu': 0.4.7 + '@libsql/linux-x64-musl': 0.4.7 + '@libsql/win32-x64-msvc': 0.4.7 + lilconfig@3.1.3: {} lines-and-columns@1.2.4: {} @@ -4834,6 +5878,8 @@ snapshots: dependencies: js-tokens: 4.0.0 + loupe@3.1.2: {} + lru-cache@10.4.3: {} lru-cache@5.1.1: @@ -4851,6 +5897,13 @@ snapshots: tree-dump: 1.0.2(tslib@2.8.1) tslib: 2.8.1 + memfs@4.17.0: + dependencies: + '@jsonjoy.com/json-pack': 1.1.0(tslib@2.8.1) + '@jsonjoy.com/util': 1.5.0(tslib@2.8.1) + tree-dump: 1.0.2(tslib@2.8.1) + tslib: 2.8.1 + merge-stream@2.0.0: {} merge2@1.4.1: {} @@ -4911,6 +5964,14 @@ snapshots: node-addon-api@2.0.2: {} + node-domexception@1.0.0: {} + + node-fetch@3.3.2: + dependencies: + data-uri-to-buffer: 4.0.1 + fetch-blob: 3.2.0 + formdata-polyfill: 4.0.10 + node-gyp-build@4.8.4: {} node-releases@2.0.18: {} @@ -4927,8 +5988,6 @@ snapshots: dependencies: path-key: 4.0.0 - npm@10.9.2: {} - object-assign@4.1.1: {} object-hash@3.0.0: {} @@ -4986,6 +6045,10 @@ snapshots: dependencies: yocto-queue: 1.1.1 + p-limit@6.2.0: + dependencies: + yocto-queue: 1.1.1 + p-locate@5.0.0: dependencies: p-limit: 3.1.0 @@ -5051,6 +6114,10 @@ snapshots: path-type@4.0.0: {} + pathe@1.1.2: {} + + pathval@2.0.0: {} + picocolors@1.1.1: {} picomatch@2.3.1: {} @@ -5102,6 +6169,8 @@ snapshots: prelude-ls@1.2.1: {} + prettier@3.4.2: {} + printable-characters@1.0.42: {} prism-react-renderer@2.4.0(react@18.3.1): @@ -5117,6 +6186,8 @@ snapshots: bl: 4.1.0 node-sql-parser: 3.9.4 + promise-limit@2.7.0: {} + prop-types@15.8.1: dependencies: loose-envify: 1.4.0 @@ -5230,8 +6301,7 @@ snapshots: resolve-from@4.0.0: {} - resolve-pkg-maps@1.0.0: - optional: true + resolve-pkg-maps@1.0.0: {} resolve@1.22.8: dependencies: @@ -5335,16 +6405,25 @@ snapshots: get-intrinsic: 1.2.4 object-inspect: 1.13.2 + siginfo@2.0.0: {} + signal-exit@4.1.0: {} source-map-js@1.2.1: {} + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + source-map@0.5.7: {} source-map@0.6.1: {} sparse-array@1.3.2: {} + stackback@0.0.2: {} + stacktracey@2.1.8: dependencies: as-table: 1.0.55 @@ -5488,6 +6567,16 @@ snapshots: dependencies: tslib: 2.8.1 + tinybench@2.9.0: {} + + tinyexec@0.3.2: {} + + tinypool@1.0.2: {} + + tinyrainbow@1.2.0: {} + + tinyspy@3.0.2: {} + to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -5598,9 +6687,9 @@ snapshots: dependencies: react: 18.3.1 - use-fireproof@0.19.118(@fireproof/core@0.19.118(react@18.3.1))(react@18.3.1): + use-fireproof@0.19.118(@fireproof/core@0.19.121(react@18.3.1))(react@18.3.1): dependencies: - '@fireproof/core': 0.19.118(react@18.3.1) + '@fireproof/core': 0.19.121(react@18.3.1) react: 18.3.1 use-sync-external-store@1.4.0(react@18.3.1): @@ -5611,6 +6700,33 @@ snapshots: varint@6.0.0: {} + vite-node@2.1.8(@types/node@22.10.1): + dependencies: + cac: 6.7.14 + debug: 4.4.0 + es-module-lexer: 1.6.0 + pathe: 1.1.2 + vite: 5.4.11(@types/node@22.10.1) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + vite@5.4.11(@types/node@22.10.1): + dependencies: + esbuild: 0.21.5 + postcss: 8.4.49 + rollup: 4.28.1 + optionalDependencies: + '@types/node': 22.10.1 + fsevents: 2.3.3 + vite@6.0.3(@types/node@22.10.1)(jiti@2.4.1)(tsx@4.19.2)(yaml@2.6.1): dependencies: esbuild: 0.24.0 @@ -5623,6 +6739,43 @@ snapshots: tsx: 4.19.2 yaml: 2.6.1 + vitest@2.1.8(@types/node@22.10.1): + dependencies: + '@vitest/expect': 2.1.8 + '@vitest/mocker': 2.1.8(vite@5.4.11(@types/node@22.10.1)) + '@vitest/pretty-format': 2.1.8 + '@vitest/runner': 2.1.8 + '@vitest/snapshot': 2.1.8 + '@vitest/spy': 2.1.8 + '@vitest/utils': 2.1.8 + chai: 5.1.2 + debug: 4.4.0 + expect-type: 1.1.0 + magic-string: 0.30.12 + pathe: 1.1.2 + std-env: 3.8.0 + tinybench: 2.9.0 + tinyexec: 0.3.2 + tinypool: 1.0.2 + tinyrainbow: 1.2.0 + vite: 5.4.11(@types/node@22.10.1) + vite-node: 2.1.8(@types/node@22.10.1) + why-is-node-running: 2.3.0 + optionalDependencies: + '@types/node': 22.10.1 + transitivePeerDependencies: + - less + - lightningcss + - msw + - sass + - sass-embedded + - stylus + - sugarss + - supports-color + - terser + + web-streams-polyfill@3.3.3: {} + which-boxed-primitive@1.0.2: dependencies: is-bigint: 1.0.4 @@ -5665,6 +6818,11 @@ snapshots: dependencies: isexe: 2.0.0 + why-is-node-running@2.3.0: + dependencies: + siginfo: 2.0.0 + stackback: 0.0.2 + word-wrap@1.2.5: {} workerd@1.20240718.0: diff --git a/postcss.config.js b/postcss.config.js index 2e7af2b..2aa7205 100644 --- a/postcss.config.js +++ b/postcss.config.js @@ -3,4 +3,4 @@ export default { tailwindcss: {}, autoprefixer: {}, }, -} +}; diff --git a/src/components/CodeHighlight.tsx b/src/components/CodeHighlight.tsx index 8da58e8..66865e4 100644 --- a/src/components/CodeHighlight.tsx +++ b/src/components/CodeHighlight.tsx @@ -8,13 +8,7 @@ import Editor from "react-simple-code-editor"; hljs.registerLanguage("json", json); hljs.registerLanguage("javascript", javascript); -function HighlightedCode({ - code, - language, -}: { - code: string; - language: string; -}) { +function HighlightedCode({ code, language }: { code: string; language: string }) { const highlightedCode = hljs.highlight(code, { language }).value; return (
@@ -26,13 +20,7 @@ const codeStyle = {
   fontFamily: '"Fira code", "Fira Mono", monospace',
   fontSize: 14,
 };
-export function CodeHighlight({
-  code,
-  language = "json",
-}: {
-  code: string;
-  language?: string;
-}): JSX.Element {
+export function CodeHighlight({ code, language = "json" }: { code: string; language?: string }): JSX.Element {
   return (
     
@@ -65,7 +53,7 @@ export function EditableCodeHighlight({ } setCode(liveCode); }, - [language, onChange] + [language, onChange], ); useEffect(() => { @@ -77,9 +65,7 @@ export function EditableCodeHighlight({ ( - - )} + highlight={(code) => } padding={10} style={codeStyle} autoFocus diff --git a/src/components/DynamicTable.tsx b/src/components/DynamicTable.tsx index c5d979b..4b7a307 100644 --- a/src/components/DynamicTable.tsx +++ b/src/components/DynamicTable.tsx @@ -2,14 +2,7 @@ import React from "react"; import { useNavigate } from "react-router-dom"; -export default function DynamicTable({ - hrefFn, - dbName, - headers, - rows, - th = "_id", - link = ["_id"], -}: any) { +export default function DynamicTable({ hrefFn, dbName, headers, rows, th = "_id", link = ["_id"] }: any) { const navigate = useNavigate(); return ( @@ -18,12 +11,8 @@ export default function DynamicTable({ {headers.map((header: string) => ( - - {header === '_id' ? 'document id' : header} + + {header === "_id" ? "document id" : header} ))} @@ -39,18 +28,14 @@ export default function DynamicTable({ > {headers.map((header: string) => header === th ? ( - + {formatTableCellContent(fields[header])} ) : ( {formatTableCellContent(fields[header])} - ) + ), )} ))} diff --git a/src/components/FireproofMenu.tsx b/src/components/FireproofMenu.tsx index 2a970e5..5aade91 100644 --- a/src/components/FireproofMenu.tsx +++ b/src/components/FireproofMenu.tsx @@ -2,11 +2,7 @@ export function FireproofMenu() { return (
- Fireproof Logo + Fireproof Logo
)} - {activeTab === "vanilla" && ( -
-                  {``}
-                
- )} + {activeTab === "vanilla" &&
{``}
} )} @@ -249,10 +224,7 @@ export default function App() {
, - document.body + document.body, )} )} @@ -309,9 +281,7 @@ export default function App() { Actions @@ -347,12 +317,7 @@ export default function App() { to={`/fp/databases/${name}/docs/new`} className="inline-flex items-center justify-center rounded bg-[--accent] px-3 py-2 text-sm font-medium text-accent-foreground transition-colors hover:bg-[--accent]/80 whitespace-nowrap" > - + - + {docs.length === 0 ? (
- No documents found. Create a new document to get started. + No documents found.{" "} + + Create a new document + {" "} + to get started.
) : ( - + )} diff --git a/src/pages/docs/show.tsx b/src/pages/docs/show.tsx index 4f55dad..130a927 100644 --- a/src/pages/docs/show.tsx +++ b/src/pages/docs/show.tsx @@ -2,10 +2,7 @@ import React, { useState } from "react"; import { Link, useNavigate, useParams } from "react-router-dom"; import { useFireproof } from "use-fireproof"; -import { - CodeHighlight, - EditableCodeHighlight, -} from "../../components/CodeHighlight"; +import { CodeHighlight, EditableCodeHighlight } from "../../components/CodeHighlight"; export default function Document() { const { name } = useParams(); @@ -16,9 +13,7 @@ export default function Document() { const { useDocument, database } = useFireproof(name); const [doc] = useDocument(() => ({ _id: _id! })); - const [docToSave, setDocToSave] = useState( - JSON.stringify(doc, null, 2) - ); + const [docToSave, setDocToSave] = useState(JSON.stringify(doc, null, 2)); const [needsSave, setNeedsSave] = useState(false); async function saveDocument(_id?: string) { @@ -51,10 +46,7 @@ export default function Document() {

Editable data fields

- +