From 04995199db46f44bf691c77aadf25301e963494d Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Fri, 20 Sep 2024 15:24:21 -0400 Subject: [PATCH 01/29] drizzle deps --- .../migrations/0000_lying_tenebrous.sql | 6 + .../migrations/meta/0000_snapshot.json | 39 + .../migrations/meta/_journal.json | 13 + examples/feature-api-functions/package.json | 3 + .../feature-api-functions/ponder.offchain.ts | 8 + package.json | 2 + packages/core/package.json | 3 +- pnpm-lock.yaml | 5072 ++++++++++------- 8 files changed, 3108 insertions(+), 2038 deletions(-) create mode 100644 examples/feature-api-functions/migrations/0000_lying_tenebrous.sql create mode 100644 examples/feature-api-functions/migrations/meta/0000_snapshot.json create mode 100644 examples/feature-api-functions/migrations/meta/_journal.json create mode 100644 examples/feature-api-functions/ponder.offchain.ts diff --git a/examples/feature-api-functions/migrations/0000_lying_tenebrous.sql b/examples/feature-api-functions/migrations/0000_lying_tenebrous.sql new file mode 100644 index 000000000..7f5bbcc73 --- /dev/null +++ b/examples/feature-api-functions/migrations/0000_lying_tenebrous.sql @@ -0,0 +1,6 @@ +CREATE SCHEMA "offchain"; +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "offchain"."metadata" ( + "id" serial PRIMARY KEY NOT NULL, + "value" text +); diff --git a/examples/feature-api-functions/migrations/meta/0000_snapshot.json b/examples/feature-api-functions/migrations/meta/0000_snapshot.json new file mode 100644 index 000000000..017d10779 --- /dev/null +++ b/examples/feature-api-functions/migrations/meta/0000_snapshot.json @@ -0,0 +1,39 @@ +{ + "id": "fefece60-8cf5-4461-a55d-52e62085ac74", + "prevId": "00000000-0000-0000-0000-000000000000", + "version": "7", + "dialect": "postgresql", + "tables": { + "offchain.metadata": { + "name": "metadata", + "schema": "offchain", + "columns": { + "id": { + "name": "id", + "type": "serial", + "primaryKey": true, + "notNull": true + }, + "value": { + "name": "value", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "schemas": { + "offchain": "offchain" + }, + "_meta": { + "columns": {}, + "schemas": {}, + "tables": {} + } +} diff --git a/examples/feature-api-functions/migrations/meta/_journal.json b/examples/feature-api-functions/migrations/meta/_journal.json new file mode 100644 index 000000000..f5494241b --- /dev/null +++ b/examples/feature-api-functions/migrations/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "7", + "dialect": "postgresql", + "entries": [ + { + "idx": 0, + "version": "7", + "when": 1726860017672, + "tag": "0000_lying_tenebrous", + "breakpoints": true + } + ] +} diff --git a/examples/feature-api-functions/package.json b/examples/feature-api-functions/package.json index 6ec614428..d4ff65fc2 100644 --- a/examples/feature-api-functions/package.json +++ b/examples/feature-api-functions/package.json @@ -7,11 +7,14 @@ "start": "ponder start", "codegen": "ponder codegen", "serve": "ponder serve", + "generate": "drizzle-kit generate --dialect postgresql --schema ./ponder.offchain.ts --out migrations", "lint": "eslint .", "typecheck": "tsc" }, "dependencies": { "@ponder/core": "workspace:*", + "drizzle-kit": "^0.22.8", + "drizzle-orm": "^0.33.0", "hono": "^4.5.0", "viem": "^2.21.3" }, diff --git a/examples/feature-api-functions/ponder.offchain.ts b/examples/feature-api-functions/ponder.offchain.ts new file mode 100644 index 000000000..2577e4f4f --- /dev/null +++ b/examples/feature-api-functions/ponder.offchain.ts @@ -0,0 +1,8 @@ +import { pgSchema, serial, text } from "drizzle-orm/pg-core"; + +export const offchainSchema = pgSchema("offchain"); + +export const metadata = offchainSchema.table("metadata", { + id: serial("id").primaryKey(), + value: text("value"), +}); diff --git a/package.json b/package.json index 7d89c0cd0..41846bb6f 100644 --- a/package.json +++ b/package.json @@ -17,6 +17,8 @@ "@biomejs/biome": "^1.8.1", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", + "drizzle-kit": "^0.22.8", + "drizzle-orm": "^0.33.0", "hono": "4.5.0", "lint-staged": "^15.1.0", "simple-git-hooks": "^2.9.0", diff --git a/packages/core/package.json b/packages/core/package.json index 6f240ccb1..e13630437 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -33,6 +33,8 @@ "typecheck": "tsc --noEmit" }, "peerDependencies": { + "drizzle-kit": "^0.24.2", + "drizzle-orm": "^0.31.2", "hono": ">=4.5", "typescript": ">=5.0.4", "viem": ">=2" @@ -57,7 +59,6 @@ "dataloader": "^2.2.2", "detect-package-manager": "^3.0.2", "dotenv": "^16.3.1", - "drizzle-orm": "^0.31.2", "glob": "^10.3.10", "graphql": "^16.8.1", "graphql-yoga": "^5.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index c0eb556c0..fd76ccaf4 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,22 +10,28 @@ importers: devDependencies: '@biomejs/biome': specifier: ^1.8.1 - version: 1.8.1 + version: 1.9.2 '@changesets/changelog-github': specifier: ^0.4.8 version: 0.4.8(encoding@0.1.13) '@changesets/cli': specifier: ^2.26.2 - version: 2.27.1 + version: 2.27.8 + drizzle-kit: + specifier: ^0.22.8 + version: 0.22.8 + drizzle-orm: + specifier: ^0.33.0 + version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.11)(@types/pg@8.11.10)(@types/react@18.3.8)(better-sqlite3@11.3.0)(kysely@0.26.3)(pg@8.13.0)(react@18.3.1) hono: specifier: 4.5.0 version: 4.5.0 lint-staged: specifier: ^15.1.0 - version: 15.2.0 + version: 15.2.10 simple-git-hooks: specifier: ^2.9.0 - version: 2.9.0 + version: 2.11.1 typescript: specifier: 5.0.4 version: 5.0.4 @@ -37,7 +43,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.61.0 - version: 0.61.0(@types/node@20.11.24)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.3.3) + version: 0.61.0(@types/node@20.16.5)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.6.2) '@graphprotocol/graph-ts': specifier: ^0.31.0 version: 0.31.0 @@ -46,120 +52,126 @@ importers: version: link:../packages/core '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 execa: specifier: ^8.0.1 version: 8.0.1 tsup: specifier: ^8.0.1 - version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) + version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) docs: dependencies: '@radix-ui/react-slot': specifier: ^1.0.2 - version: 1.0.2(@types/react@18.2.46)(react@18.2.0) + version: 1.1.0(@types/react@18.3.8)(react@18.3.1) '@segment/analytics-node': specifier: ^1.1.3 - version: 1.1.3(encoding@0.1.13) + version: 1.3.0(encoding@0.1.13) class-variance-authority: specifier: ^0.7.0 version: 0.7.0 clsx: specifier: ^2.0.0 - version: 2.1.0 + version: 2.1.1 lucide-react: specifier: ^0.295.0 - version: 0.295.0(react@18.2.0) + version: 0.295.0(react@18.3.1) next: specifier: ^14.0.2 - version: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) nextra: specifier: 3.0.0-alpha.10 - version: 3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) nextra-theme-docs: specifier: 3.0.0-alpha.10 - version: 3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(nextra@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) posthog-node: specifier: ^4.0.0 - version: 4.0.0 + version: 4.2.0 react: specifier: ^18.2.0 - version: 18.2.0 + version: 18.3.1 react-dom: specifier: ^18.2.0 - version: 18.2.0(react@18.2.0) + version: 18.3.1(react@18.3.1) tailwind-merge: specifier: ^2.1.0 - version: 2.1.0 + version: 2.5.2 tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))) + version: 1.0.7(tailwindcss@3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))) devDependencies: '@mdx-js/react': specifier: ^3.0.0 - version: 3.0.0(@types/react@18.2.46)(react@18.2.0) + version: 3.0.1(@types/react@18.3.8)(react@18.3.1) '@svgr/webpack': specifier: ^8.1.0 - version: 8.1.0(typescript@5.3.3) + version: 8.1.0(typescript@5.6.2) '@types/node': specifier: ^20.9.0 - version: 20.11.24 + version: 20.16.5 '@types/react': specifier: ^18.2.45 - version: 18.2.46 + version: 18.3.8 '@types/react-dom': specifier: ^18.2.17 - version: 18.2.17 + version: 18.3.0 autoprefixer: specifier: ^10.4.16 - version: 10.4.16(postcss@8.4.32) + version: 10.4.20(postcss@8.4.47) eslint: specifier: ^8.53.0 - version: 8.56.0 + version: 8.57.1 eslint-config-next: specifier: ^14.0.2 - version: 14.0.3(eslint@8.56.0)(typescript@5.3.3) + version: 14.2.13(eslint@8.57.1)(typescript@5.6.2) postcss: specifier: ^8.4.31 - version: 8.4.32 + version: 8.4.47 tailwindcss: specifier: ^3.3.5 - version: 3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) + version: 3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) typescript: specifier: ^5.2.2 - version: 5.3.3 + version: 5.6.2 examples/feature-api-functions: dependencies: '@ponder/core': specifier: workspace:* version: link:../../packages/core + drizzle-kit: + specifier: ^0.22.8 + version: 0.22.8 + drizzle-orm: + specifier: ^0.33.0 + version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.11)(@types/pg@8.11.10)(@types/react@18.3.8)(better-sqlite3@11.3.0)(kysely@0.26.3)(pg@8.13.0)(react@18.3.1) hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/feature-blocks: dependencies: @@ -168,23 +180,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/feature-call-traces: dependencies: @@ -193,23 +205,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/feature-factory: dependencies: @@ -218,26 +230,26 @@ importers: version: link:../../packages/core abitype: specifier: ^0.10.2 - version: 0.10.3(typescript@5.3.3)(zod@3.23.8) + version: 0.10.3(typescript@5.6.2)(zod@3.23.8) hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/feature-filter: dependencies: @@ -246,23 +258,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/feature-multichain: dependencies: @@ -271,23 +283,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/feature-proxy: dependencies: @@ -296,23 +308,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/feature-read-contract: dependencies: @@ -321,23 +333,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/project-friendtech: dependencies: @@ -346,23 +358,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/project-uniswap-v3-flash: dependencies: @@ -371,23 +383,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/reference-erc1155: dependencies: @@ -396,23 +408,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/reference-erc20: dependencies: @@ -421,23 +433,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/reference-erc4626: dependencies: @@ -446,23 +458,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/reference-erc721: dependencies: @@ -471,35 +483,35 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/with-foundry: devDependencies: '@wagmi/cli': specifier: ^1.5.2 - version: 1.5.2(typescript@5.3.3) + version: 1.5.2(typescript@5.6.2) examples/with-foundry/foundry: dependencies: forge-std: specifier: github:foundry-rs/forge-std - version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8 examples/with-foundry/ponder: dependencies: @@ -508,23 +520,23 @@ importers: version: link:../../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.9.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.53.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../../packages/eslint-config-ponder typescript: specifier: ^5.2.2 - version: 5.3.3 + version: 5.6.2 examples/with-nextjs: {} @@ -532,56 +544,56 @@ importers: dependencies: '@tanstack/react-query': specifier: ^5.12.2 - version: 5.12.2(react@18.2.0) + version: 5.56.2(react@18.3.1) graphql: specifier: ^16.8.1 - version: 16.8.2 + version: 16.9.0 graphql-request: specifier: ^6.1.0 - version: 6.1.0(encoding@0.1.13)(graphql@16.8.2) + version: 6.1.0(encoding@0.1.13)(graphql@16.9.0) next: specifier: 14.0.3 - version: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + version: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) react: specifier: ^18 - version: 18.2.0 + version: 18.3.1 react-countup: specifier: ^6.5.0 - version: 6.5.0(react@18.2.0) + version: 6.5.3(react@18.3.1) react-dom: specifier: ^18 - version: 18.2.0(react@18.2.0) + version: 18.3.1(react@18.3.1) viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20 - version: 20.11.24 + version: 20.16.5 '@types/react': specifier: ^18 - version: 18.2.46 + version: 18.3.8 '@types/react-dom': specifier: ^18 - version: 18.2.17 + version: 18.3.0 autoprefixer: specifier: ^10.0.1 - version: 10.4.16(postcss@8.4.32) + version: 10.4.20(postcss@8.4.47) eslint: specifier: ^8 - version: 8.56.0 + version: 8.57.1 eslint-config-next: specifier: 14.0.3 - version: 14.0.3(eslint@8.56.0)(typescript@5.3.3) + version: 14.0.3(eslint@8.57.1)(typescript@5.6.2) postcss: specifier: ^8 - version: 8.4.32 + version: 8.4.47 tailwindcss: specifier: ^3.3.0 - version: 3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) + version: 3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) typescript: specifier: ^5 - version: 5.3.3 + version: 5.6.2 examples/with-nextjs/ponder: dependencies: @@ -590,23 +602,23 @@ importers: version: link:../../../packages/core hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 examples/with-trpc: {} @@ -620,7 +632,7 @@ importers: dependencies: '@hono/trpc-server': specifier: ^0.3.2 - version: 0.3.2(@trpc/server@10.45.2)(hono@4.5.0) + version: 0.3.2(@trpc/server@10.45.2)(hono@4.6.2) '@ponder/core': specifier: workspace:* version: link:../../../packages/core @@ -629,53 +641,53 @@ importers: version: 10.45.2 hono: specifier: ^4.5.0 - version: 4.5.0 + version: 4.6.2 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) zod: specifier: ^3.23.8 version: 3.23.8 devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 eslint: specifier: ^8.54.0 - version: 8.56.0 + version: 8.57.1 eslint-config-ponder: specifier: workspace:* version: link:../../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.3.3 + version: 5.6.2 packages/common: devDependencies: '@types/node': specifier: ^20.11.24 - version: 20.11.24 + version: 20.16.5 dotenv: specifier: ^16.3.1 - version: 16.3.1 + version: 16.4.5 tsup: specifier: ^8.0.1 - version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) + version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) vitest: specifier: ^1.0.2 - version: 1.0.2(@types/node@20.11.24) + version: 1.6.0(@types/node@20.16.5) packages/core: dependencies: '@babel/code-frame': specifier: ^7.23.4 - version: 7.23.5 + version: 7.24.7 '@commander-js/extra-typings': specifier: ^12.0.1 - version: 12.0.1(commander@12.0.0) + version: 12.1.0(commander@12.1.0) '@escape.tech/graphql-armor-max-aliases': specifier: ^2.3.0 - version: 2.4.0 + version: 2.5.0 '@escape.tech/graphql-armor-max-depth': specifier: ^2.2.0 version: 2.3.0 @@ -684,19 +696,19 @@ importers: version: 2.4.0 '@hono/node-server': specifier: ^1.12.2 - version: 1.12.2(hono@4.5.0) + version: 1.13.0(hono@4.6.2) '@ponder/utils': specifier: workspace:* version: link:../utils abitype: specifier: ^0.10.2 - version: 0.10.3(typescript@5.3.3)(zod@3.23.8) + version: 0.10.3(typescript@5.6.2)(zod@3.23.8) better-sqlite3: specifier: ^11.1.2 - version: 11.1.2 + version: 11.3.0 commander: specifier: ^12.0.0 - version: 12.0.0 + version: 12.1.0 conf: specifier: ^12.0.0 version: 12.0.0 @@ -708,95 +720,92 @@ importers: version: 3.0.2 dotenv: specifier: ^16.3.1 - version: 16.3.1 - drizzle-orm: - specifier: ^0.31.2 - version: 0.31.2(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) + version: 16.4.5 glob: specifier: ^10.3.10 - version: 10.3.10 + version: 10.4.5 graphql: specifier: ^16.8.1 - version: 16.8.2 + version: 16.9.0 graphql-yoga: specifier: ^5.3.0 - version: 5.3.1(graphql@16.8.2) + version: 5.7.0(graphql@16.9.0) http-terminator: specifier: ^3.2.0 version: 3.2.0 ink: specifier: ^4.4.1 - version: 4.4.1(@types/react@18.2.46)(react@18.2.0) + version: 4.4.1(@types/react@18.3.8)(react@18.3.1) kysely: specifier: ^0.26.3 version: 0.26.3 pg: specifier: ^8.11.3 - version: 8.11.3 + version: 8.13.0 pg-connection-string: specifier: ^2.6.2 - version: 2.6.2 + version: 2.7.0 picocolors: specifier: ^1.0.0 - version: 1.0.0 + version: 1.1.0 pino: specifier: ^8.16.2 - version: 8.17.2 + version: 8.21.0 prom-client: specifier: ^15.0.0 - version: 15.1.0 + version: 15.1.3 react: specifier: ^18.2.0 - version: 18.2.0 + version: 18.3.1 stacktrace-parser: specifier: ^0.1.10 version: 0.1.10 vite: specifier: ^5.0.7 - version: 5.0.10(@types/node@20.11.24) + version: 5.4.7(@types/node@20.16.5) vite-node: specifier: ^1.0.2 - version: 1.1.1(@types/node@20.11.24) + version: 1.6.0(@types/node@20.16.5) vite-tsconfig-paths: specifier: ^4.3.1 - version: 4.3.1(typescript@5.3.3)(vite@5.0.10(@types/node@20.11.24)) + version: 4.3.2(typescript@5.6.2)(vite@5.4.7(@types/node@20.16.5)) devDependencies: '@types/babel__code-frame': specifier: ^7.0.6 version: 7.0.6 '@types/better-sqlite3': specifier: ^7.6.10 - version: 7.6.10 + version: 7.6.11 '@types/glob': specifier: ^8.1.0 version: 8.1.0 '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 '@types/pg': specifier: ^8.10.9 - version: 8.10.9 + version: 8.11.10 '@types/react': specifier: ^18.2.38 - version: 18.2.46 + version: 18.3.8 '@viem/anvil': specifier: ^0.0.6 version: 0.0.6 '@wagmi/cli': specifier: ^1.5.2 - version: 1.5.2(typescript@5.3.3) + version: 1.5.2(typescript@5.6.2) execa: specifier: ^8.0.1 version: 8.0.1 rimraf: specifier: ^5.0.5 - version: 5.0.5 + version: 5.0.10 tsup: specifier: ^8.0.1 - version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) + version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) vitest: specifier: ^1.0.2 - version: 1.0.2(@types/node@20.11.24) + version: 1.6.0(@types/node@20.16.5) packages/create-ponder: dependencies: @@ -805,7 +814,7 @@ importers: version: 6.7.14 cpy: specifier: ^11.0.0 - version: 11.0.0 + version: 11.1.0 execa: specifier: ^8.0.1 version: 8.0.1 @@ -817,10 +826,10 @@ importers: version: 7.0.1 picocolors: specifier: ^1.0.0 - version: 1.0.0 + version: 1.1.0 prettier: specifier: ^3.1.0 - version: 3.1.1 + version: 3.3.3 prompts: specifier: ^2.4.2 version: 2.4.2 @@ -829,20 +838,20 @@ importers: version: 1.5.4 validate-npm-package-name: specifier: ^5.0.0 - version: 5.0.0 + version: 5.0.1 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.10(typescript@5.6.2)(zod@3.23.8) yaml: specifier: ^2.3.4 - version: 2.3.4 + version: 2.5.1 devDependencies: '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 '@types/node': specifier: ^20.10.0 - version: 20.11.24 + version: 20.16.5 '@types/prompts': specifier: ^2.4.9 version: 2.4.9 @@ -851,19 +860,19 @@ importers: version: 4.0.2 abitype: specifier: ^0.10.2 - version: 0.10.3(typescript@5.3.3)(zod@3.23.8) + version: 0.10.3(typescript@5.6.2)(zod@3.23.8) dotenv: specifier: ^16.3.1 - version: 16.3.1 + version: 16.4.5 rimraf: specifier: ^5.0.5 - version: 5.0.5 + version: 5.0.10 tsup: specifier: ^8.0.1 - version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) + version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) vitest: specifier: ^1.0.2 - version: 1.0.2(@types/node@20.11.24) + version: 1.6.0(@types/node@20.16.5) packages/eslint-config-ponder: {} @@ -871,26 +880,22 @@ importers: devDependencies: '@types/node': specifier: ^20.11.24 - version: 20.11.24 + version: 20.16.5 abitype: specifier: ^1.0.1 - version: 1.0.1(typescript@5.3.3)(zod@3.23.8) + version: 1.0.6(typescript@5.6.2)(zod@3.23.8) dotenv: specifier: ^16.3.1 - version: 16.3.1 + version: 16.4.5 tsup: specifier: ^8.0.1 - version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) + version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) vitest: specifier: ^1.0.2 - version: 1.0.2(@types/node@20.11.24) + version: 1.6.0(@types/node@20.16.5) packages: - '@aashutoshrathi/word-wrap@1.2.6': - resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} - engines: {node: '>=0.10.0'} - '@adraffy/ens-normalize@1.10.0': resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} @@ -906,8 +911,8 @@ packages: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} - '@babel/code-frame@7.23.5': - resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} + '@babel/code-frame@7.24.7': + resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} engines: {node: '>=6.9.0'} '@babel/compat-data@7.23.5': @@ -1017,6 +1022,10 @@ packages: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} + '@babel/helper-validator-identifier@7.24.7': + resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} + engines: {node: '>=6.9.0'} + '@babel/helper-validator-option@7.23.5': resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} @@ -1029,8 +1038,8 @@ packages: resolution: {integrity: sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.23.4': - resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} + '@babel/highlight@7.24.7': + resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} engines: {node: '>=6.9.0'} '@babel/parser@7.23.6': @@ -1536,55 +1545,55 @@ packages: resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} engines: {node: '>=6.9.0'} - '@biomejs/biome@1.8.1': - resolution: {integrity: sha512-fQXGfvq6DIXem12dGQCM2tNF+vsNHH1qs3C7WeOu75Pd0trduoTmoO7G4ntLJ2qDs5wuw981H+cxQhi1uHnAtA==} + '@biomejs/biome@1.9.2': + resolution: {integrity: sha512-4j2Gfwft8Jqp1X0qLYvK4TEy4xhTo4o6rlvJPsjPeEame8gsmbGQfOPBkw7ur+7/Z/f0HZmCZKqbMvR7vTXQYQ==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.8.1': - resolution: {integrity: sha512-XLiB7Uu6GALIOBWzQ2aMD0ru4Ly5/qSeQF7kk3AabzJ/kwsEWSe33iVySBP/SS2qv25cgqNiLksjGcw2bHT3mw==} + '@biomejs/cli-darwin-arm64@1.9.2': + resolution: {integrity: sha512-rbs9uJHFmhqB3Td0Ro+1wmeZOHhAPTL3WHr8NtaVczUmDhXkRDWScaxicG9+vhSLj1iLrW47itiK6xiIJy6vaA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.8.1': - resolution: {integrity: sha512-uMTSxVLMfqkBVqyc25hSn83jBbp+wtWjzM/pHFlKXt3htJuw7FErVGW0nmQ9Sxa9vJ7GcqoltLMl28VQRIMYzg==} + '@biomejs/cli-darwin-x64@1.9.2': + resolution: {integrity: sha512-BlfULKijNaMigQ9GH9fqJVt+3JTDOSiZeWOQtG/1S1sa8Lp046JHG3wRJVOvekTPL9q/CNFW1NVG8J0JN+L1OA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.8.1': - resolution: {integrity: sha512-UQ8Wc01J0wQL+5AYOc7qkJn20B4PZmQL1KrmDZh7ot0DvD6aX4+8mmfd/dG5b6Zjo/44QvCKcvkFGCMRYuhWZA==} + '@biomejs/cli-linux-arm64-musl@1.9.2': + resolution: {integrity: sha512-ZATvbUWhNxegSALUnCKWqetTZqrK72r2RsFD19OK5jXDj/7o1hzI1KzDNG78LloZxftrwr3uI9SqCLh06shSZw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.8.1': - resolution: {integrity: sha512-3SzZRuC/9Oi2P2IBNPsEj0KXxSXUEYRR2kfRF/Ve8QAfGgrt4qnwuWd6QQKKN5R+oYH691qjm+cXBKEcrP1v/Q==} + '@biomejs/cli-linux-arm64@1.9.2': + resolution: {integrity: sha512-T8TJuSxuBDeQCQzxZu2o3OU4eyLumTofhCxxFd3+aH2AEWVMnH7Z/c3QP1lHI5RRMBP9xIJeMORqDQ5j+gVZzw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.8.1': - resolution: {integrity: sha512-fYbP/kNu/rtZ4kKzWVocIdqZOtBSUEg9qUhZaao3dy3CRzafR6u6KDtBeSCnt47O+iLnks1eOR1TUxzr5+QuqA==} + '@biomejs/cli-linux-x64-musl@1.9.2': + resolution: {integrity: sha512-CjPM6jT1miV5pry9C7qv8YJk0FIZvZd86QRD3atvDgfgeh9WQU0k2Aoo0xUcPdTnoz0WNwRtDicHxwik63MmSg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.8.1': - resolution: {integrity: sha512-AeBycVdNrTzsyYKEOtR2R0Ph0hCD0sCshcp2aOnfGP0hCZbtFg09D0SdKLbyzKntisY41HxKVrydYiaApp+2uw==} + '@biomejs/cli-linux-x64@1.9.2': + resolution: {integrity: sha512-T0cPk3C3Jr2pVlsuQVTBqk2qPjTm8cYcTD9p/wmR9MeVqui1C/xTVfOIwd3miRODFMrJaVQ8MYSXnVIhV9jTjg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.8.1': - resolution: {integrity: sha512-6tEd1H/iFKpgpE3OIB7oNgW5XkjiVMzMRPL8zYoZ036YfuJ5nMYm9eB9H/y81+8Z76vL48fiYzMPotJwukGPqQ==} + '@biomejs/cli-win32-arm64@1.9.2': + resolution: {integrity: sha512-2x7gSty75bNIeD23ZRPXyox6Z/V0M71ObeJtvQBhi1fgrvPdtkEuw7/0wEHg6buNCubzOFuN9WYJm6FKoUHfhg==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.8.1': - resolution: {integrity: sha512-g2H31jJzYmS4jkvl6TiyEjEX+Nv79a5km/xn+5DARTp5MBFzC9gwceusSSB2AkJKqZzY131AiACAWjKrVt5Ijw==} + '@biomejs/cli-win32-x64@1.9.2': + resolution: {integrity: sha512-JC3XvdYcjmu1FmAehVwVV0SebLpeNTnO2ZaMdGCSOdS7f8O9Fq14T2P1gTG1Q29Q8Dt1S03hh0IdVpIZykOL8g==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -1592,11 +1601,11 @@ packages: '@braintree/sanitize-url@6.0.4': resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} - '@changesets/apply-release-plan@7.0.0': - resolution: {integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ==} + '@changesets/apply-release-plan@7.0.5': + resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} - '@changesets/assemble-release-plan@6.0.0': - resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} + '@changesets/assemble-release-plan@6.0.4': + resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} @@ -1604,42 +1613,45 @@ packages: '@changesets/changelog-github@0.4.8': resolution: {integrity: sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==} - '@changesets/cli@2.27.1': - resolution: {integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ==} + '@changesets/cli@2.27.8': + resolution: {integrity: sha512-gZNyh+LdSsI82wBSHLQ3QN5J30P4uHKJ4fXgoGwQxfXwYFTJzDdvIJasZn8rYQtmKhyQuiBj4SSnLuKlxKWq4w==} hasBin: true - '@changesets/config@3.0.0': - resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} + '@changesets/config@3.0.3': + resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - '@changesets/get-dependents-graph@2.0.0': - resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} + '@changesets/get-dependents-graph@2.1.2': + resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} '@changesets/get-github-info@0.5.2': resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} - '@changesets/get-release-plan@4.0.0': - resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} + '@changesets/get-release-plan@4.0.4': + resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - '@changesets/git@3.0.0': - resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} + '@changesets/git@3.0.1': + resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} - '@changesets/logger@0.1.0': - resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} + '@changesets/logger@0.1.1': + resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} '@changesets/parse@0.4.0': resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} - '@changesets/pre@2.0.0': - resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} + '@changesets/pre@2.0.1': + resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} + + '@changesets/read@0.6.1': + resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} - '@changesets/read@0.6.0': - resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} + '@changesets/should-skip-package@0.1.1': + resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} '@changesets/types@4.1.0': resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} @@ -1650,13 +1662,13 @@ packages: '@changesets/types@6.0.0': resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} - '@changesets/write@0.3.0': - resolution: {integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw==} + '@changesets/write@0.3.2': + resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} - '@commander-js/extra-typings@12.0.1': - resolution: {integrity: sha512-OvkMobb1eMqOCuJdbuSin/KJkkZr7n24/UNV+Lcz/0Dhepf3r2p9PaGwpRpAWej7A+gQnny4h8mGhpFl4giKkg==} + '@commander-js/extra-typings@12.1.0': + resolution: {integrity: sha512-wf/lwQvWAA0goIghcb91dQYpkLBcyhOhQNqG/VgWhnKzgt+UOMvra7EX/2fv70arm5RW+PUHoQHHDa6/p77Eqg==} peerDependencies: - commander: ~12.0.0 + commander: ~12.1.0 '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} @@ -1670,278 +1682,698 @@ packages: resolution: {integrity: sha512-IPjmgSc4KpQRlO4qbEDnBEixvtb06WDmjKfi/7fkZaryh5HuOmTtixe1EupQI5XfXO8joc3d27uUZ0QdC++euA==} engines: {node: '>=18.0.0'} - '@esbuild/aix-ppc64@0.19.11': - resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} + '@esbuild-kit/core-utils@3.3.2': + resolution: {integrity: sha512-sPRAnw9CdSsRmEtnsl2WXWdyquogVpB3yZ3dgwJfe8zrOzTsV7cJvmwrKVa+0ma5BoiGJ+BoqkMvawbayKUsqQ==} + + '@esbuild-kit/esm-loader@2.6.5': + resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} + + '@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'} + cpu: [ppc64] + os: [aix] + + '@esbuild/aix-ppc64@0.23.1': + resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [aix] + '@esbuild/android-arm64@0.16.17': resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} engines: {node: '>=12'} cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.19.11': - resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==} + '@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'} cpu: [arm64] os: [android] + '@esbuild/android-arm64@0.23.1': + resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} + engines: {node: '>=18'} + cpu: [arm64] + os: [android] + '@esbuild/android-arm@0.16.17': resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} engines: {node: '>=12'} cpu: [arm] os: [android] - '@esbuild/android-arm@0.19.11': - resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==} + '@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'} + cpu: [arm] + os: [android] + + '@esbuild/android-arm@0.23.1': + resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [android] + '@esbuild/android-x64@0.16.17': resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} engines: {node: '>=12'} cpu: [x64] os: [android] - '@esbuild/android-x64@0.19.11': - resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==} + '@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'} cpu: [x64] os: [android] + '@esbuild/android-x64@0.23.1': + resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} + engines: {node: '>=18'} + cpu: [x64] + os: [android] + '@esbuild/darwin-arm64@0.16.17': resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.19.11': - resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==} + '@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'} + cpu: [arm64] + os: [darwin] + + '@esbuild/darwin-arm64@0.23.1': + resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [darwin] + '@esbuild/darwin-x64@0.16.17': resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.19.11': - resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==} + '@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'} + cpu: [x64] + os: [darwin] + + '@esbuild/darwin-x64@0.23.1': + resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} + engines: {node: '>=18'} + cpu: [x64] + os: [darwin] + '@esbuild/freebsd-arm64@0.16.17': resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.19.11': - resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==} + '@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'} cpu: [arm64] os: [freebsd] + '@esbuild/freebsd-arm64@0.23.1': + resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} + engines: {node: '>=18'} + cpu: [arm64] + os: [freebsd] + '@esbuild/freebsd-x64@0.16.17': resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} engines: {node: '>=12'} cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.19.11': - resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==} + '@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'} + cpu: [x64] + os: [freebsd] + + '@esbuild/freebsd-x64@0.23.1': + resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} + engines: {node: '>=18'} + cpu: [x64] + os: [freebsd] + '@esbuild/linux-arm64@0.16.17': resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.19.11': - resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==} + '@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'} + cpu: [arm64] + os: [linux] + + '@esbuild/linux-arm64@0.23.1': + resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} + engines: {node: '>=18'} + cpu: [arm64] + os: [linux] + '@esbuild/linux-arm@0.16.17': resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.19.11': - resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==} + '@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'} + cpu: [arm] + os: [linux] + + '@esbuild/linux-arm@0.23.1': + resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} + engines: {node: '>=18'} + cpu: [arm] + os: [linux] + '@esbuild/linux-ia32@0.16.17': resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.19.11': - resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==} + '@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'} + cpu: [ia32] + os: [linux] + + '@esbuild/linux-ia32@0.23.1': + resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-loong64@0.16.17': resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.19.11': - resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==} + '@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'} + cpu: [loong64] + os: [linux] + + '@esbuild/linux-loong64@0.23.1': + resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} + engines: {node: '>=18'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-mips64el@0.16.17': resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.19.11': - resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==} + '@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'} + cpu: [mips64el] + os: [linux] + + '@esbuild/linux-mips64el@0.23.1': + resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} + engines: {node: '>=18'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-ppc64@0.16.17': resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} engines: {node: '>=12'} cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.19.11': - resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==} + '@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'} cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.23.1': + resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} + engines: {node: '>=18'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-riscv64@0.16.17': resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.19.11': - resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==} + '@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'} + cpu: [riscv64] + os: [linux] + + '@esbuild/linux-riscv64@0.23.1': + resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} + engines: {node: '>=18'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-s390x@0.16.17': resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.19.11': - resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==} + '@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'} + cpu: [s390x] + os: [linux] + + '@esbuild/linux-s390x@0.23.1': + resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} + engines: {node: '>=18'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-x64@0.16.17': resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.19.11': - resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==} + '@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'} + cpu: [x64] + os: [linux] + + '@esbuild/linux-x64@0.23.1': + resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} + engines: {node: '>=18'} + cpu: [x64] + os: [linux] + '@esbuild/netbsd-x64@0.16.17': resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.19.11': - resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==} + '@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'} + cpu: [x64] + os: [netbsd] + + '@esbuild/netbsd-x64@0.23.1': + resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} + engines: {node: '>=18'} + cpu: [x64] + os: [netbsd] + + '@esbuild/openbsd-arm64@0.23.1': + resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} + engines: {node: '>=18'} + cpu: [arm64] + os: [openbsd] + '@esbuild/openbsd-x64@0.16.17': resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.19.11': - resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==} + '@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'} cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.23.1': + resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} + engines: {node: '>=18'} + cpu: [x64] + os: [openbsd] + '@esbuild/sunos-x64@0.16.17': resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.19.11': - resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==} + '@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'} + cpu: [x64] + os: [sunos] + + '@esbuild/sunos-x64@0.23.1': + resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} + engines: {node: '>=18'} + cpu: [x64] + os: [sunos] + '@esbuild/win32-arm64@0.16.17': resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.19.11': - resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==} + '@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'} cpu: [arm64] os: [win32] + '@esbuild/win32-arm64@0.23.1': + resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} + engines: {node: '>=18'} + cpu: [arm64] + os: [win32] + '@esbuild/win32-ia32@0.16.17': resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.19.11': - resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==} + '@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'} + cpu: [ia32] + os: [win32] + + '@esbuild/win32-ia32@0.23.1': + resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} + engines: {node: '>=18'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-x64@0.16.17': resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} engines: {node: '>=12'} cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.19.11': - resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==} + '@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] - '@escape.tech/graphql-armor-max-aliases@2.4.0': - resolution: {integrity: sha512-d4V9EgtPRG9HIoPHuanFNLHj1ENB1YkZi9FbiBiH88x5VahCjVpMXDgKQGkG6RUTOODU4XKp0/ZgaOq0pX5oEA==} + '@esbuild/win32-x64@0.21.5': + resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + + '@esbuild/win32-x64@0.23.1': + resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} + engines: {node: '>=18'} + cpu: [x64] + os: [win32] + + '@escape.tech/graphql-armor-max-aliases@2.5.0': + resolution: {integrity: sha512-deaLZF3ASfJY9jUbBzoZW9IUHWqAVorpDR9Yez4mxk8iFltwCpgtJfVEb57T+R0RyiFrtjdUM5SQpNZJxhie7w==} engines: {node: '>=18.0.0'} '@escape.tech/graphql-armor-max-depth@2.3.0': @@ -1961,16 +2393,16 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.10.0': - resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} + '@eslint-community/regexpp@4.11.1': + resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.56.0': - resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} + '@eslint/js@8.57.1': + resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@ethersproject/abi@5.0.7': @@ -2039,26 +2471,26 @@ packages: '@graphprotocol/graph-ts@0.31.0': resolution: {integrity: sha512-xreRVM6ho2BtolyOh2flDkNoGZximybnzUnF53zJVp0+Ed0KnAlO1/KOCUYw06euVI9tk0c9nA2Z/D5SIQV2Rg==} - '@graphql-tools/executor@1.2.6': - resolution: {integrity: sha512-+1kjfqzM5T2R+dCw7F4vdJ3CqG+fY/LYJyhNiWEFtq0ToLwYzR/KKyD8YuzTirEjSxWTVlcBh7endkx5n5F6ew==} + '@graphql-tools/executor@1.3.1': + resolution: {integrity: sha512-tgJDdGf9SCAm64ofEMZdv925u6/J+eTmv36TGNLxgP2DpCJsZ6gnJ4A+0D28EazDXqJIvMiPd+3d+o3cCRCAnQ==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@graphql-tools/merge@9.0.4': - resolution: {integrity: sha512-MivbDLUQ+4Q8G/Hp/9V72hbn810IJDEZQ57F01sHnlrrijyadibfVhaQfW/pNH+9T/l8ySZpaR/DpL5i+ruZ+g==} + '@graphql-tools/merge@9.0.7': + resolution: {integrity: sha512-lbTrIuXIbUSmSumHkPRY1QX0Z8JEtmRhnIrkH7vkfeEmf0kNn/nCWvJwqokm5U7L+a+DA1wlRM4slIlbfXjJBA==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@graphql-tools/schema@10.0.3': - resolution: {integrity: sha512-p28Oh9EcOna6i0yLaCFOnkcBDQECVf3SCexT6ktb86QNj9idnkhI+tCxnwZDh58Qvjd2nURdkbevvoZkvxzCog==} + '@graphql-tools/schema@10.0.6': + resolution: {integrity: sha512-EIJgPRGzpvDFEjVp+RF1zNNYIC36BYuIeZ514jFoJnI6IdxyVyIRDLx/ykgMdaa1pKQerpfdqDnsF4JnZoDHSQ==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@graphql-tools/utils@10.2.0': - resolution: {integrity: sha512-HYV7dO6pNA2nGKawygaBpk8y+vXOUjjzzO43W/Kb7EPRmXUEQKjHxPYRvQbiF72u1N3XxwGK5jnnFk9WVhUwYw==} + '@graphql-tools/utils@10.5.4': + resolution: {integrity: sha512-XHnyCWSlg1ccsD8s0y6ugo5GZ5TpkTiFVNPSYms5G0s6Z/xTuSmiLBfeqgkfaCwLmLaQnRCmNDL2JRnqc2R5bQ==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 @@ -2072,8 +2504,8 @@ packages: resolution: {integrity: sha512-Mg8psdkAp+YTG1OGmvU+xa6xpsAmSir0hhr3yFYPyLNwzUj95DdIwsMpKadDj9xDpYgJcH3Hp/4JMal9DhQimA==} engines: {node: '>=18.0.0'} - '@graphql-yoga/subscription@5.0.0': - resolution: {integrity: sha512-Ri7sK8hmxd/kwaEa0YT8uqQUb2wOLsmBMxI90QDyf96lzOMJRgBuNYoEkU1pSgsgmW2glceZ96sRYfaXqwVxUw==} + '@graphql-yoga/subscription@5.0.1': + resolution: {integrity: sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==} engines: {node: '>=18.0.0'} '@graphql-yoga/typed-event-target@3.0.0': @@ -2087,8 +2519,8 @@ packages: react: ^16 || ^17 || ^18 react-dom: ^16 || ^17 || ^18 - '@hono/node-server@1.12.2': - resolution: {integrity: sha512-xjzhqhSWUE/OhN0g3KCNVzNsQMlFUAL+/8GgPUr3TKcU7cvgZVBGswFofJ8WwGEHTqobzze1lDpGJl9ZNckDhA==} + '@hono/node-server@1.13.0': + resolution: {integrity: sha512-kz323qIQkNQElEGroo/E9MKPDuIR5pkuk/XEWd50K+cSEKdmdiYx0PKWUdaNY2ecJYngtF+njDMsMKplL6zfEg==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -2100,8 +2532,8 @@ packages: '@trpc/server': ^10.10.0 || >11.0.0-rc hono: '>=4.*' - '@humanwhocodes/config-array@0.11.13': - resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} + '@humanwhocodes/config-array@0.13.0': + resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} engines: {node: '>=10.10.0'} deprecated: Use @eslint/config-array instead @@ -2109,8 +2541,8 @@ packages: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.1': - resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} + '@humanwhocodes/object-schema@2.0.3': + resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} deprecated: Use @eslint/object-schema instead '@ipld/dag-cbor@7.0.3': @@ -2138,6 +2570,10 @@ packages: resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} + '@jridgewell/resolve-uri@3.1.2': + resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} + engines: {node: '>=6.0.0'} + '@jridgewell/set-array@1.1.2': resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} @@ -2145,6 +2581,9 @@ packages: '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} + '@jridgewell/sourcemap-codec@1.5.0': + resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} + '@jridgewell/trace-mapping@0.3.20': resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} @@ -2176,8 +2615,8 @@ packages: peerDependencies: react: '>=16' - '@mdx-js/react@3.0.0': - resolution: {integrity: sha512-nDctevR9KyYFyV+m+/+S4cpzCWHqj+iHDHq3QrsWezcC+B17uZdIWgCguESUkwFhM3n/56KxWVE3V6EokrmONQ==} + '@mdx-js/react@3.0.1': + resolution: {integrity: sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==} peerDependencies: '@types/react': '>=16' react: '>=16' @@ -2255,63 +2694,123 @@ packages: '@next/env@14.0.3': resolution: {integrity: sha512-7xRqh9nMvP5xrW4/+L0jgRRX+HoNRGnfJpD+5Wq6/13j3dsdzxO3BCXn7D3hMqsDb+vjZnJq+vI7+EtgrYZTeA==} + '@next/env@14.2.13': + resolution: {integrity: sha512-s3lh6K8cbW1h5Nga7NNeXrbe0+2jIIYK9YaA9T7IufDWnZpozdFUp6Hf0d5rNWUKu4fEuSX2rCKlGjCrtylfDw==} + '@next/eslint-plugin-next@14.0.3': resolution: {integrity: sha512-j4K0n+DcmQYCVnSAM+UByTVfIHnYQy2ODozfQP+4RdwtRDfobrIvKq1K4Exb2koJ79HSSa7s6B2SA8T/1YR3RA==} + '@next/eslint-plugin-next@14.2.13': + resolution: {integrity: sha512-z8Mk0VljxhIzsSiZUSdt3wp+t2lKd+jk5a9Jsvh3zDGkItgDMfjv/ZbET6HsxEl/fSihVoHGsXV6VLyDH0lfTQ==} + '@next/swc-darwin-arm64@14.0.3': resolution: {integrity: sha512-64JbSvi3nbbcEtyitNn2LEDS/hcleAFpHdykpcnrstITFlzFgB/bW0ER5/SJJwUPj+ZPY+z3e+1jAfcczRLVGw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] + '@next/swc-darwin-arm64@14.2.13': + resolution: {integrity: sha512-IkAmQEa2Htq+wHACBxOsslt+jMoV3msvxCn0WFSfJSkv/scy+i/EukBKNad36grRxywaXUYJc9mxEGkeIs8Bzg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [darwin] + '@next/swc-darwin-x64@14.0.3': resolution: {integrity: sha512-RkTf+KbAD0SgYdVn1XzqE/+sIxYGB7NLMZRn9I4Z24afrhUpVJx6L8hsRnIwxz3ERE2NFURNliPjJ2QNfnWicQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] + '@next/swc-darwin-x64@14.2.13': + resolution: {integrity: sha512-Dv1RBGs2TTjkwEnFMVL5XIfJEavnLqqwYSD6LXgTPdEy/u6FlSrLBSSfe1pcfqhFEXRAgVL3Wpjibe5wXJzWog==} + engines: {node: '>= 10'} + cpu: [x64] + os: [darwin] + '@next/swc-linux-arm64-gnu@14.0.3': resolution: {integrity: sha512-3tBWGgz7M9RKLO6sPWC6c4pAw4geujSwQ7q7Si4d6bo0l6cLs4tmO+lnSwFp1Tm3lxwfMk0SgkJT7EdwYSJvcg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@next/swc-linux-arm64-gnu@14.2.13': + resolution: {integrity: sha512-yB1tYEFFqo4ZNWkwrJultbsw7NPAAxlPXURXioRl9SdW6aIefOLS+0TEsKrWBtbJ9moTDgU3HRILL6QBQnMevg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@next/swc-linux-arm64-musl@14.0.3': resolution: {integrity: sha512-v0v8Kb8j8T23jvVUWZeA2D8+izWspeyeDGNaT2/mTHWp7+37fiNfL8bmBWiOmeumXkacM/AB0XOUQvEbncSnHA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] + '@next/swc-linux-arm64-musl@14.2.13': + resolution: {integrity: sha512-v5jZ/FV/eHGoWhMKYrsAweQ7CWb8xsWGM/8m1mwwZQ/sutJjoFaXchwK4pX8NqwImILEvQmZWyb8pPTcP7htWg==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [linux] + '@next/swc-linux-x64-gnu@14.0.3': resolution: {integrity: sha512-VM1aE1tJKLBwMGtyBR21yy+STfl0MapMQnNrXkxeyLs0GFv/kZqXS5Jw/TQ3TSUnbv0QPDf/X8sDXuMtSgG6eg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@next/swc-linux-x64-gnu@14.2.13': + resolution: {integrity: sha512-aVc7m4YL7ViiRv7SOXK3RplXzOEe/qQzRA5R2vpXboHABs3w8vtFslGTz+5tKiQzWUmTmBNVW0UQdhkKRORmGA==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@next/swc-linux-x64-musl@14.0.3': resolution: {integrity: sha512-64EnmKy18MYFL5CzLaSuUn561hbO1Gk16jM/KHznYP3iCIfF9e3yULtHaMy0D8zbHfxset9LTOv6cuYKJgcOxg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] + '@next/swc-linux-x64-musl@14.2.13': + resolution: {integrity: sha512-4wWY7/OsSaJOOKvMsu1Teylku7vKyTuocvDLTZQq0TYv9OjiYYWt63PiE1nTuZnqQ4RPvME7Xai+9enoiN0Wrg==} + engines: {node: '>= 10'} + cpu: [x64] + os: [linux] + '@next/swc-win32-arm64-msvc@14.0.3': resolution: {integrity: sha512-WRDp8QrmsL1bbGtsh5GqQ/KWulmrnMBgbnb+59qNTW1kVi1nG/2ndZLkcbs2GX7NpFLlToLRMWSQXmPzQm4tog==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] + '@next/swc-win32-arm64-msvc@14.2.13': + resolution: {integrity: sha512-uP1XkqCqV2NVH9+g2sC7qIw+w2tRbcMiXFEbMihkQ8B1+V6m28sshBwAB0SDmOe0u44ne1vFU66+gx/28RsBVQ==} + engines: {node: '>= 10'} + cpu: [arm64] + os: [win32] + '@next/swc-win32-ia32-msvc@14.0.3': resolution: {integrity: sha512-EKffQeqCrj+t6qFFhIFTRoqb2QwX1mU7iTOvMyLbYw3QtqTw9sMwjykyiMlZlrfm2a4fA84+/aeW+PMg1MjuTg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] + '@next/swc-win32-ia32-msvc@14.2.13': + resolution: {integrity: sha512-V26ezyjPqQpDBV4lcWIh8B/QICQ4v+M5Bo9ykLN+sqeKKBxJVDpEc6biDVyluTXTC40f5IqCU0ttth7Es2ZuMw==} + engines: {node: '>= 10'} + cpu: [ia32] + os: [win32] + '@next/swc-win32-x64-msvc@14.0.3': resolution: {integrity: sha512-ERhKPSJ1vQrPiwrs15Pjz/rvDHZmkmvbf/BjPN/UCOI++ODftT0GtasDPi0j+y6PPJi5HsXw+dpRaXUaw4vjuQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] + '@next/swc-win32-x64-msvc@14.2.13': + resolution: {integrity: sha512-WwzOEAFBGhlDHE5Z73mNU8CO8mqMNLqaG+AO9ETmzdCQlJhVtWZnOl2+rqgVQS+YHunjOWptdFmNfbpwcUuEsw==} + engines: {node: '>= 10'} + cpu: [x64] + os: [win32] + '@noble/curves@1.2.0': resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -2322,10 +2821,6 @@ packages: resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} - '@noble/hashes@1.3.3': - resolution: {integrity: sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==} - engines: {node: '>= 16'} - '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} @@ -2346,8 +2841,8 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oclif/core@2.15.0': - resolution: {integrity: sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA==} + '@oclif/core@2.16.0': + resolution: {integrity: sha512-dL6atBH0zCZl1A1IXCKJgLPrM/wR7K+Wi401E/IvqsK8m2iCHW+0TEOGrans/cuN3oTW+uxIyJFHJ8Im0k4qBw==} engines: {node: '>=14.0.0'} '@oclif/core@2.8.6': @@ -2366,15 +2861,15 @@ packages: resolution: {integrity: sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw==} engines: {node: '>=8.0.0'} - '@peculiar/asn1-schema@2.3.8': - resolution: {integrity: sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==} + '@peculiar/asn1-schema@2.3.13': + resolution: {integrity: sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==} '@peculiar/json-schema@1.1.12': resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} engines: {node: '>=8.0.0'} - '@peculiar/webcrypto@1.4.3': - resolution: {integrity: sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A==} + '@peculiar/webcrypto@1.5.0': + resolution: {integrity: sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==} engines: {node: '>=10.12.0'} '@pkgjs/parseargs@0.11.0': @@ -2414,103 +2909,115 @@ packages: '@protobufjs/utf8@1.1.0': resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} - '@radix-ui/react-compose-refs@1.0.1': - resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} + '@radix-ui/react-compose-refs@1.1.0': + resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} peerDependencies: '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true - '@radix-ui/react-slot@1.0.2': - resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} + '@radix-ui/react-slot@1.1.0': + resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} peerDependencies: '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 + react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc peerDependenciesMeta: '@types/react': optional: true - '@repeaterjs/repeater@3.0.5': - resolution: {integrity: sha512-l3YHBLAol6d/IKnB9LhpD0cEZWAoe3eFKUyTYWmFmCO2Q/WOckxLQAUyMZWwZV2M/m3+4vgRoaolFqaII82/TA==} + '@repeaterjs/repeater@3.0.6': + resolution: {integrity: sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==} '@rescript/std@9.0.0': resolution: {integrity: sha512-zGzFsgtZ44mgL4Xef2gOy1hrRVdrs9mcxCOOKZrIPsmbZW14yTkaF591GXxpQvjXiHtgZ/iA9qLyWH6oSReIxQ==} - '@rollup/rollup-android-arm-eabi@4.9.2': - resolution: {integrity: sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==} + '@rollup/rollup-android-arm-eabi@4.22.2': + resolution: {integrity: sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.9.2': - resolution: {integrity: sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==} + '@rollup/rollup-android-arm64@4.22.2': + resolution: {integrity: sha512-I+B1v0a4iqdS9DvYt1RJZ3W+Oh9EVWjbY6gp79aAYipIbxSLEoQtFQlZEnUuwhDXCqMxJ3hluxKAdPD+GiluFQ==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.9.2': - resolution: {integrity: sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==} + '@rollup/rollup-darwin-arm64@4.22.2': + resolution: {integrity: sha512-BTHO7rR+LC67OP7I8N8GvdvnQqzFujJYWo7qCQ8fGdQcb8Gn6EQY+K1P+daQLnDCuWKbZ+gHAQZuKiQkXkqIYg==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.9.2': - resolution: {integrity: sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==} + '@rollup/rollup-darwin-x64@4.22.2': + resolution: {integrity: sha512-1esGwDNFe2lov4I6GsEeYaAMHwkqk0IbuGH7gXGdBmd/EP9QddJJvTtTF/jv+7R8ZTYPqwcdLpMTxK8ytP6k6Q==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.9.2': - resolution: {integrity: sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.22.2': + resolution: {integrity: sha512-GBHuY07x96OTEM3OQLNaUSUwrOhdMea/LDmlFHi/HMonrgF6jcFrrFFwJhhe84XtA1oK/Qh4yFS+VMREf6dobg==} + cpu: [arm] + os: [linux] + + '@rollup/rollup-linux-arm-musleabihf@4.22.2': + resolution: {integrity: sha512-Dbfa9Sc1G1lWxop0gNguXOfGhaXQWAGhZUcqA0Vs6CnJq8JW/YOw/KvyGtQFmz4yDr0H4v9X248SM7bizYj4yQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.9.2': - resolution: {integrity: sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==} + '@rollup/rollup-linux-arm64-gnu@4.22.2': + resolution: {integrity: sha512-Z1YpgBvFYhZIyBW5BoopwSg+t7yqEhs5HCei4JbsaXnhz/eZehT18DaXl957aaE9QK7TRGFryCAtStZywcQe1A==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.9.2': - resolution: {integrity: sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==} + '@rollup/rollup-linux-arm64-musl@4.22.2': + resolution: {integrity: sha512-66Zszr7i/JaQ0u/lefcfaAw16wh3oT72vSqubIMQqWzOg85bGCPhoeykG/cC5uvMzH80DQa2L539IqKht6twVA==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-riscv64-gnu@4.9.2': - resolution: {integrity: sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==} + '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': + resolution: {integrity: sha512-HpJCMnlMTfEhwo19bajvdraQMcAq3FX08QDx3OfQgb+414xZhKNf3jNvLFYKbbDSGBBrQh5yNwWZrdK0g0pokg==} + cpu: [ppc64] + os: [linux] + + '@rollup/rollup-linux-riscv64-gnu@4.22.2': + resolution: {integrity: sha512-/egzQzbOSRef2vYCINKITGrlwkzP7uXRnL+xU2j75kDVp3iPdcF0TIlfwTRF8woBZllhk3QaxNOEj2Ogh3t9hg==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-x64-gnu@4.9.2': - resolution: {integrity: sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==} + '@rollup/rollup-linux-s390x-gnu@4.22.2': + resolution: {integrity: sha512-qgYbOEbrPfEkH/OnUJd1/q4s89FvNJQIUldx8X2F/UM5sEbtkqZpf2s0yly2jSCKr1zUUOY1hnTP2J1WOzMAdA==} + cpu: [s390x] + os: [linux] + + '@rollup/rollup-linux-x64-gnu@4.22.2': + resolution: {integrity: sha512-a0lkvNhFLhf+w7A95XeBqGQaG0KfS3hPFJnz1uraSdUe/XImkp/Psq0Ca0/UdD5IEAGoENVmnYrzSC9Y2a2uKQ==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.9.2': - resolution: {integrity: sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==} + '@rollup/rollup-linux-x64-musl@4.22.2': + resolution: {integrity: sha512-sSWBVZgzwtsuG9Dxi9kjYOUu/wKW+jrbzj4Cclabqnfkot8Z3VEHcIgyenA3lLn/Fu11uDviWjhctulkhEO60g==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.9.2': - resolution: {integrity: sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==} + '@rollup/rollup-win32-arm64-msvc@4.22.2': + resolution: {integrity: sha512-t/YgCbZ638R/r7IKb9yCM6nAek1RUvyNdfU0SHMDLOf6GFe/VG1wdiUAsxTWHKqjyzkRGg897ZfCpdo1bsCSsA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.9.2': - resolution: {integrity: sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==} + '@rollup/rollup-win32-ia32-msvc@4.22.2': + resolution: {integrity: sha512-kTmX5uGs3WYOA+gYDgI6ITkZng9SP71FEMoHNkn+cnmb9Zuyyay8pf0oO5twtTwSjNGy1jlaWooTIr+Dw4tIbw==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.9.2': - resolution: {integrity: sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==} + '@rollup/rollup-win32-x64-msvc@4.22.2': + resolution: {integrity: sha512-Yy8So+SoRz8I3NS4Bjh91BICPOSVgdompTIPYTByUqU66AXSIOgmW3Lv1ke3NORPqxdF+RdrZET+8vYai6f4aA==} cpu: [x64] os: [win32] '@rushstack/eslint-patch@1.6.1': resolution: {integrity: sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==} - '@scure/base@1.1.5': - resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} - - '@scure/base@1.1.8': - resolution: {integrity: sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==} + '@scure/base@1.1.9': + resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} '@scure/bip32@1.3.2': resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==} @@ -2524,19 +3031,23 @@ packages: '@scure/bip39@1.4.0': resolution: {integrity: sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==} - '@segment/analytics-core@1.3.2': - resolution: {integrity: sha512-NpeBCfOyMdO2/BDKfhCUNHcEwxg88N2iTnswBoEMh38rtsQ03TWLVYwgiTakPjNQFezdKkR6jq3JhQ3WWgq67g==} + '@segment/analytics-core@1.4.1': + resolution: {integrity: sha512-kV0Pf33HnthuBOVdYNani21kYyj118Fn+9757bxqoksiXoZlYvBsFq6giNdCsKcTIE1eAMqNDq3xE1VQ0cfsHA==} - '@segment/analytics-generic-utils@1.0.0': - resolution: {integrity: sha512-rAqcIQESnCsc80DMAxH06C4sJQ1MjwRLrWsih9qA2E0XwxydrMYgLA8eazxLW/wqEdctSJHCPnkMynpPIQgatw==} + '@segment/analytics-generic-utils@1.1.1': + resolution: {integrity: sha512-THTIzBPHnvu1HYJU3fARdJ3qIkukO3zDXsmDm+kAeUks5R9CBXOQ6rPChiASVzSmwAIIo5uFIXXnCraojlq/Gw==} - '@segment/analytics-node@1.1.3': - resolution: {integrity: sha512-RGmD/VIW4iHqY+raeHlxdGY/FQpE6ATZHU8LrbwI+16uvT+sfw8d725J/lmzJIgNScJ/NFLg3LyHjitwPpqTxw==} + '@segment/analytics-node@1.3.0': + resolution: {integrity: sha512-lRLz1WZaDokMoUe299yP5JkInc3OgJuqNNlxb6j0q22umCiq6b5iDo2gRmFn93reirIvJxWIicQsGrHd93q8GQ==} engines: {node: '>=14'} '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@sindresorhus/merge-streams@2.3.0': + resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} + engines: {node: '>=18'} + '@svgr/babel-plugin-add-jsx-attribute@8.0.0': resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==} engines: {node: '>=14'} @@ -2615,16 +3126,22 @@ packages: resolution: {integrity: sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==} engines: {node: '>=14'} + '@swc/counter@0.1.3': + resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} + '@swc/helpers@0.5.2': resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} - '@tanstack/query-core@5.12.1': - resolution: {integrity: sha512-WbZztNmKq0t6QjdNmHzezbi/uifYo9j6e2GLJkodsYaYUlzMbAp91RDyeHkIZrm7EfO4wa6Sm5sxJZm5SPlh6w==} + '@swc/helpers@0.5.5': + resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} - '@tanstack/react-query@5.12.2': - resolution: {integrity: sha512-BeWZu8zVFH20oRc+S/K9ADPgWjEzP/XQCGBNz5IbApUwPQAdwkQYbXODVL5AyAlWiSxhx+P2xlARPBApj2Yrog==} + '@tanstack/query-core@5.56.2': + resolution: {integrity: sha512-gor0RI3/R5rVV3gXfddh1MM+hgl0Z4G7tj6Xxpq6p2I03NGPaJ8dITY9Gz05zYYb/EJq9vPas/T4wn9EaDPd4Q==} + + '@tanstack/react-query@5.56.2': + resolution: {integrity: sha512-SR0GzHVo6yzhN72pnRhkEFRAHMsUo5ZPzAxfTMvUxFIDVS6W9LYUp6nXW3fcHVdg0ZJl8opSH85jqahvm6DSVg==} peerDependencies: - react: ^18.0.0 + react: ^18 || ^19 '@theguild/remark-mermaid@0.0.5': resolution: {integrity: sha512-e+ZIyJkEv9jabI4m7q29wZtZv+2iwPGsXJ2d46Zi7e+QcFudiyuqhLhHG/3gX3ZEB+hxTch+fpItyMS8jwbIcw==} @@ -2646,8 +3163,8 @@ packages: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} - '@tsconfig/node10@1.0.9': - resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} + '@tsconfig/node10@1.0.11': + resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} '@tsconfig/node12@1.0.11': resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} @@ -2664,14 +3181,14 @@ packages: '@types/babel__code-frame@7.0.6': resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} - '@types/better-sqlite3@7.6.10': - resolution: {integrity: sha512-TZBjD+yOsyrUJGmcUj6OS3JADk3+UZcNv3NOBqGkM09bZdi28fNZw8ODqbMOLfKCu7RYCO62/ldq1iHbzxqoPw==} + '@types/better-sqlite3@7.6.11': + resolution: {integrity: sha512-i8KcD3PgGtGBLl3+mMYA8PdKkButvPyARxA7IQAd6qeslht13qxb1zzO8dRCtE7U3IoJS782zDBAeoKiM695kg==} - '@types/bn.js@5.1.5': - resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} + '@types/bn.js@5.1.6': + resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} - '@types/cli-progress@3.11.5': - resolution: {integrity: sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g==} + '@types/cli-progress@3.11.6': + resolution: {integrity: sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA==} '@types/concat-stream@1.6.1': resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} @@ -2697,6 +3214,9 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} + '@types/estree@1.0.6': + resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} + '@types/form-data@0.0.33': resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} @@ -2739,9 +3259,6 @@ packages: '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} - '@types/minimist@1.2.5': - resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} - '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} @@ -2751,23 +3268,20 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@20.11.24': - resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} + '@types/node@20.16.5': + resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} '@types/node@8.10.66': resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} - '@types/normalize-package-data@2.4.4': - resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} - '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} '@types/pbkdf2@3.1.2': resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} - '@types/pg@8.10.9': - resolution: {integrity: sha512-UksbANNE/f8w0wOMxVKKIrLCbEMV+oM1uKejmwXr39olg4xqcfBDbXxObJAt6XxHbDa4XTKOlUEcEltXDX+XLQ==} + '@types/pg@8.11.10': + resolution: {integrity: sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg==} '@types/prompts@2.4.9': resolution: {integrity: sha512-qTxFi6Buiu8+50/+3DGIWLHM6QuWsEKugJnnP6iv2Mc4ncxE4A/OJkjuVOA+5X0X1S/nq5VJRa8Lu+nwcvbrKA==} @@ -2775,17 +3289,14 @@ packages: '@types/prop-types@15.7.11': resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} - '@types/qs@6.9.11': - resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==} + '@types/qs@6.9.16': + resolution: {integrity: sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==} - '@types/react-dom@18.2.17': - resolution: {integrity: sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==} + '@types/react-dom@18.3.0': + resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} - '@types/react@18.2.46': - resolution: {integrity: sha512-nNCvVBcZlvX4NU1nRRNV/mFl1nNRuTuslAJglQsq+8ldXe5Xv0Wd2f7WTE3jOxhLH2BFfiZGC6GCp+kHQbgG+w==} - - '@types/scheduler@0.16.8': - resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} + '@types/react@18.3.8': + resolution: {integrity: sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q==} '@types/secp256k1@4.0.6': resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} @@ -2805,6 +3316,17 @@ packages: '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} + '@typescript-eslint/eslint-plugin@8.6.0': + resolution: {integrity: sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 + eslint: ^8.57.0 || ^9.0.0 + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/parser@6.17.0': resolution: {integrity: sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2819,10 +3341,27 @@ packages: resolution: {integrity: sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/scope-manager@8.6.0': + resolution: {integrity: sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + + '@typescript-eslint/type-utils@8.6.0': + resolution: {integrity: sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + '@typescript-eslint/types@6.17.0': resolution: {integrity: sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/types@8.6.0': + resolution: {integrity: sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@typescript-eslint/typescript-estree@6.17.0': resolution: {integrity: sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -2832,30 +3371,49 @@ packages: typescript: optional: true + '@typescript-eslint/typescript-estree@8.6.0': + resolution: {integrity: sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + typescript: '*' + peerDependenciesMeta: + typescript: + optional: true + + '@typescript-eslint/utils@8.6.0': + resolution: {integrity: sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + peerDependencies: + eslint: ^8.57.0 || ^9.0.0 + '@typescript-eslint/visitor-keys@6.17.0': resolution: {integrity: sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==} engines: {node: ^16.0.0 || >=18.0.0} + '@typescript-eslint/visitor-keys@8.6.0': + resolution: {integrity: sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==} + engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} + '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} '@viem/anvil@0.0.6': resolution: {integrity: sha512-OjKR/+FVwzuygXYFqP8MBal1SXG8bT2gbZwqqB0XuLw81LNBBvmE/Repm6+5kkBh4IUj0PhYdrqOsnayS14Gtg==} - '@vitest/expect@1.0.2': - resolution: {integrity: sha512-mAIo/8uddSWkjQMLFcjqZP3WmkwvvN0OtlyZIu33jFnwme3vZds8m8EDMxtj+Uzni2DwtPfHNjJcTM8zTV1f4A==} + '@vitest/expect@1.6.0': + resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} - '@vitest/runner@1.0.2': - resolution: {integrity: sha512-ZcHJXPT2kg/9Hc4fNkCbItlsgZSs3m4vQbxB8LCSdzpbG85bExCmSvu6K9lWpMNdoKfAr1Jn0BwS9SWUcGnbTQ==} + '@vitest/runner@1.6.0': + resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} - '@vitest/snapshot@1.0.2': - resolution: {integrity: sha512-9ClDz2/aV5TfWA4reV7XR9p+hE0e7bifhwxlURugj3Fw0YXeTFzHmKCNEHd6wOIFMfthbGGwhlq7TOJ2jDO4/g==} + '@vitest/snapshot@1.6.0': + resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} - '@vitest/spy@1.0.2': - resolution: {integrity: sha512-YlnHmDntp+zNV3QoTVFI5EVHV0AXpiThd7+xnDEbWnD6fw0TH/J4/+3GFPClLimR39h6nA5m0W4Bjm5Edg4A/A==} + '@vitest/spy@1.6.0': + resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} - '@vitest/utils@1.0.2': - resolution: {integrity: sha512-GPQkGHAnFAP/+seSbB9pCsj339yRrMgILoI5H2sPevTLCYgBq0VRjF8QSllmnQyvf0EontF6KUIt2t5s2SmqoQ==} + '@vitest/utils@1.6.0': + resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} '@wagmi/cli@1.5.2': resolution: {integrity: sha512-UfLMYhW6mQBCjR8A5s01Chf9GpHzdpcuuBuzJ36QGXcMSJAxylz5ImVZWfCRV0ct1UruydjKVSW1QSI6azNxRQ==} @@ -2876,27 +3434,27 @@ packages: '@whatwg-node/events@0.0.3': resolution: {integrity: sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==} - '@whatwg-node/events@0.1.1': - resolution: {integrity: sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==} - engines: {node: '>=16.0.0'} + '@whatwg-node/events@0.1.2': + resolution: {integrity: sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==} + engines: {node: '>=18.0.0'} '@whatwg-node/fetch@0.8.8': resolution: {integrity: sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==} - '@whatwg-node/fetch@0.9.17': - resolution: {integrity: sha512-TDYP3CpCrxwxpiNY0UMNf096H5Ihf67BK1iKGegQl5u9SlpEDYrvnV71gWBGJm+Xm31qOy8ATgma9rm8Pe7/5Q==} - engines: {node: '>=16.0.0'} + '@whatwg-node/fetch@0.9.21': + resolution: {integrity: sha512-Wt0jPb+04JjobK0pAAN7mEHxVHcGA9HoP3OyCsZtyAecNQeADXCZ1MihFwVwjsgaRYuGVmNlsCmLxlG6mor8Gw==} + engines: {node: '>=18.0.0'} '@whatwg-node/node-fetch@0.3.6': resolution: {integrity: sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==} - '@whatwg-node/node-fetch@0.5.11': - resolution: {integrity: sha512-LS8tSomZa3YHnntpWt3PP43iFEEl6YeIsvDakczHBKlay5LdkXFr8w7v8H6akpG5nRrzydyB0k1iE2eoL6aKIQ==} - engines: {node: '>=16.0.0'} + '@whatwg-node/node-fetch@0.5.26': + resolution: {integrity: sha512-4jXDeZ4IH4bylZ6wu14VEx0aDXXhrN4TC279v9rPmn08g4EYekcYf8wdcOOnS9STjDkb6x77/6xBUTqxGgjr8g==} + engines: {node: '>=18.0.0'} - '@whatwg-node/server@0.9.34': - resolution: {integrity: sha512-1sHRjqUtZIyTR2m2dS/dJpzS5OcNDpPuUSVDa2PoEgzYVKr4GsqJaYtRaEXXFohvvyh6PkouYCc1rE7jMDWVCA==} - engines: {node: '>=16.0.0'} + '@whatwg-node/server@0.9.49': + resolution: {integrity: sha512-3KzLXw80gWnTsQ746G/LFdCThTPfDodjQs4PnmoNuPa6XUOl4HWq8TlJpxtmnEEB+y+UYLal+3VQ68dtYlbUDQ==} + engines: {node: '>=18.0.0'} JSONStream@1.3.2: resolution: {integrity: sha512-mn0KSip7N4e0UDPZHnqDsHECo5uGQrixQKnAskOM1BIB8hd7QKbd6il8IPRPudPHOeHiECoCFqhyMaRO9+nWyA==} @@ -2937,8 +3495,8 @@ packages: zod: optional: true - abitype@1.0.1: - resolution: {integrity: sha512-HyHCfBwNYvHPGWsdv5PiKj8b1LnZUCuALyUWg5iP/wbK8FpdmTI4Qk9CYzjNgmsWwRw5j/DCruOltrnUGQdBeQ==} + abitype@1.0.5: + resolution: {integrity: sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -2948,8 +3506,8 @@ packages: zod: optional: true - abitype@1.0.5: - resolution: {integrity: sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==} + abitype@1.0.6: + resolution: {integrity: sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -2968,27 +3526,23 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.3.1: - resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==} + acorn-walk@8.3.4: + resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} engines: {node: '>=0.4.0'} - acorn@8.11.3: - resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} + acorn@8.12.1: + resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} engines: {node: '>=0.4.0'} hasBin: true - aggregate-error@4.0.1: - resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} - engines: {node: '>=12'} - ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ajv@8.12.0: - resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} + ajv@8.17.1: + resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -2998,10 +3552,14 @@ packages: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} - ansi-escapes@6.2.0: - resolution: {integrity: sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==} + ansi-escapes@6.2.1: + resolution: {integrity: sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==} engines: {node: '>=14.16'} + ansi-escapes@7.0.0: + resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} + engines: {node: '>=18'} + ansi-regex@4.1.1: resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} engines: {node: '>=6'} @@ -3010,8 +3568,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.0.1: - resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} + ansi-regex@6.1.0: + resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} engines: {node: '>=12'} ansi-styles@3.2.1: @@ -3103,10 +3661,6 @@ packages: resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} engines: {node: '>= 0.4'} - arrify@1.0.1: - resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} - engines: {node: '>=0.10.0'} - asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} @@ -3143,8 +3697,8 @@ packages: resolution: {integrity: sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==} hasBin: true - async@3.2.5: - resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} + async@3.2.6: + resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} asynciterator.prototype@1.0.0: resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} @@ -3160,15 +3714,15 @@ packages: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} engines: {node: '>=8.0.0'} - atomically@2.0.2: - resolution: {integrity: sha512-Xfmb4q5QV7uqTlVdMSTtO5eF4DCHfNOdaPyKlbFShkzeNP+3lj3yjjcbdjSmEY4+pDBKJ9g26aP+ImTe88UHoQ==} + atomically@2.0.3: + resolution: {integrity: sha512-kU6FmrwZ3Lx7/7y3hPS5QnbJfaohcIul5fGqf7ok+4KklIEk9tJ0C2IQPdacSbVUWv6zVHXEBWoWd6NrVMT7Cw==} auto-bind@5.0.1: resolution: {integrity: sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - autoprefixer@10.4.16: - resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} + autoprefixer@10.4.20: + resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: @@ -3181,8 +3735,8 @@ packages: aws-sign2@0.7.0: resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} - aws4@1.12.0: - resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==} + aws4@1.13.2: + resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} axe-core@4.7.0: resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} @@ -3191,8 +3745,8 @@ packages: axios@0.21.4: resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} - axios@1.6.8: - resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} + axios@1.7.7: + resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -3218,8 +3772,8 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - base-x@3.0.9: - resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} + base-x@3.0.10: + resolution: {integrity: sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -3236,11 +3790,11 @@ packages: peerDependencies: react: '>=16.8' - better-sqlite3@11.1.2: - resolution: {integrity: sha512-gujtFwavWU4MSPT+h9B+4pkvZdyOUkH54zgLdIrMmmmd4ZqiBIrRNBzNzYVFO417xo882uP5HBu4GjOfaSrIQw==} + better-sqlite3@11.3.0: + resolution: {integrity: sha512-iHt9j8NPYF3oKCNOO5ZI4JwThjt3Z6J6XrcwG85VNMVzv1ByqrHWv5VILEbCMFWDsoHhXvQ7oC8vgRXFAKgl9w==} - binary-extensions@2.2.0: - resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} + binary-extensions@2.3.0: + resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} engines: {node: '>=8'} binary-install-raw@0.0.13: @@ -3301,8 +3855,9 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} - breakword@1.0.6: - resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} + braces@3.0.3: + resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} + engines: {node: '>=8'} brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} @@ -3313,8 +3868,8 @@ packages: browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - browserslist@4.22.2: - resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} + browserslist@4.23.3: + resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -3336,10 +3891,6 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} - buffer-writer@2.0.0: - resolution: {integrity: sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==} - engines: {node: '>=4'} - buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} @@ -3349,20 +3900,17 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} - builtins@5.0.1: - resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} - bundle-require@3.1.2: resolution: {integrity: sha512-Of6l6JBAxiyQ5axFxUM6dYeP/W7X2Sozeo/4EYB9sJhL+dqL7TKjg+shwxp6jlu/6ZSERfsYtIpSJ1/x3XkAEA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: esbuild: '>=0.13' - bundle-require@4.0.2: - resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} + bundle-require@5.0.0: + resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: '>=0.17' + esbuild: '>=0.18' busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} @@ -3375,6 +3923,10 @@ packages: call-bind@1.0.5: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} + call-bind@1.0.7: + resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} + engines: {node: '>= 0.4'} + callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -3386,20 +3938,12 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} - camelcase-keys@6.2.2: - resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} - engines: {node: '>=8'} - - camelcase@5.3.1: - resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} - engines: {node: '>=6'} - camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001572: - resolution: {integrity: sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==} + caniuse-lite@1.0.30001662: + resolution: {integrity: sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==} capital-case@1.0.4: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} @@ -3418,8 +3962,8 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chai@4.3.10: - resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} + chai@4.5.0: + resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} engines: {node: '>=4'} chalk@2.3.0: @@ -3467,6 +4011,10 @@ packages: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -3488,10 +4036,6 @@ packages: resolution: {integrity: sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==} engines: {node: '>=10'} - clean-stack@4.2.0: - resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} - engines: {node: '>=12'} - cli-boxes@3.0.0: resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==} engines: {node: '>=10'} @@ -3504,6 +4048,10 @@ packages: resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + cli-cursor@5.0.0: + resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} + engines: {node: '>=18'} + cli-progress@3.12.0: resolution: {integrity: sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==} engines: {node: '>=4'} @@ -3531,13 +4079,6 @@ packages: resolution: {integrity: sha512-16KrBOV7bHmHdxcQiCvfUFYVFyEah4FI8vYT1Fr7CGSA4G+xBWMEfUEQJS1hxeHGtI9ju1Bzs9uXSbj5HZKArw==} engines: {node: '>=4'} - cliui@6.0.0: - resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} - - cliui@8.0.1: - resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} - engines: {node: '>=12'} - clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} @@ -3546,8 +4087,8 @@ packages: resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} engines: {node: '>=6'} - clsx@2.1.0: - resolution: {integrity: sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==} + clsx@2.1.1: + resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} engines: {node: '>=6'} code-excerpt@4.0.0: @@ -3581,12 +4122,8 @@ packages: comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} - commander@11.1.0: - resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} - engines: {node: '>=16'} - - commander@12.0.0: - resolution: {integrity: sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==} + commander@12.1.0: + resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} engines: {node: '>=18'} commander@2.20.3: @@ -3622,6 +4159,13 @@ packages: resolution: {integrity: sha512-fIWyWUXrJ45cHCIQX+Ck1hrZDIf/9DR0P0Zewn3uNht28hbt5OfGUq8rRWsxi96pZWPyBEd0eY9ama01JTaknA==} engines: {node: '>=18'} + confbox@0.1.7: + resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} + + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} @@ -3667,8 +4211,8 @@ packages: countup.js@2.8.0: resolution: {integrity: sha512-f7xEhX0awl4NOElHulrl4XRfKoNH3rB+qfNSZZyjSZhaAoUk6elvhH+MNxMmlmuUJ2/QNTWPSA7U4mNtIAKljQ==} - cpy@11.0.0: - resolution: {integrity: sha512-vA71mFQyIxCrqvP/9JBLCj05UJV/+WpvAxZK2/EiK5ndD090cjuChfJ3ExVVuZXHoTJ/3HLedOPYDWyxnNHjrg==} + cpy@11.1.0: + resolution: {integrity: sha512-QGHetPSSuprVs+lJmMDcivvrBwTKASzXQ5qxFvRC2RFESjjod71bDvFvhxTjDgkNjrrb72AI6JPjfYwxrIy33A==} engines: {node: '>=18'} create-hash@1.2.0: @@ -3683,8 +4227,8 @@ packages: cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} - cross-inspect@1.0.0: - resolution: {integrity: sha512-4PFfn4b5ZN6FMNGSZlyb7wUhuN8wvj8t/VQHZdM4JsDcruGJ8L2kf9zao98QIrBPFCpdk27qst/AGTl7pL3ypQ==} + cross-inspect@1.0.1: + resolution: {integrity: sha512-Pcw1JTvZLSJH83iiGWt6fRcT+BjZlCDRVwYLbUcHzv/CRpB7r0MlSrGbIyQvVSNyGnbt7G4AXuyCiDR3POvZ1A==} engines: {node: '>=16.0.0'} cross-spawn@5.1.0: @@ -3721,19 +4265,6 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} - csv-generate@3.4.3: - resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} - - csv-parse@4.16.3: - resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} - - csv-stringify@5.6.5: - resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} - - csv@5.5.3: - resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} - engines: {node: '>= 0.1.90'} - cytoscape-cose-bilkent@4.1.0: resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==} peerDependencies: @@ -3931,13 +4462,14 @@ packages: supports-color: optional: true - decamelize-keys@1.1.1: - resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} - engines: {node: '>=0.10.0'} - - decamelize@1.2.0: - resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} - engines: {node: '>=0.10.0'} + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} @@ -3949,8 +4481,8 @@ packages: dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} - deep-eql@4.1.3: - resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} + deep-eql@4.1.4: + resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} engines: {node: '>=6'} deep-extend@0.6.0: @@ -3971,6 +4503,10 @@ packages: resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} + define-data-property@1.1.4: + resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} + engines: {node: '>= 0.4'} + define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -4020,8 +4556,8 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - diff@5.1.0: - resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} + diff@5.2.0: + resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} engines: {node: '>=0.3.1'} dir-glob@3.0.1: @@ -4081,16 +4617,20 @@ packages: resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==} engines: {node: '>=12'} - dotenv@16.3.1: - resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} dotenv@8.6.0: resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} engines: {node: '>=10'} - drizzle-orm@0.31.2: - resolution: {integrity: sha512-QnenevbnnAzmbNzQwbhklvIYrDE8YER8K7kSrAWQSV1YvFCdSQPzj+jzqRdTSsV2cDqSpQ0NXGyL1G9I43LDLg==} + drizzle-kit@0.22.8: + resolution: {integrity: sha512-VjI4wsJjk3hSqHSa3TwBf+uvH6M6pRHyxyoVbt935GUzP9tUR/BRZ+MhEJNgryqbzN2Za1KP0eJMTgKEPsalYQ==} + hasBin: true + + drizzle-orm@0.33.0: + resolution: {integrity: sha512-SHy72R2Rdkz0LEq0PSG/IdvnT3nGiWuRk+2tXZQ90GVq/XQhpCzu/EFT3V2rox+w8MlkBQxifF8pCStNYnERfA==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' '@cloudflare/workers-types': '>=3' @@ -4100,6 +4640,7 @@ packages: '@op-engineering/op-sqlite': '>=2' '@opentelemetry/api': ^1.4.1 '@planetscale/database': '>=1' + '@prisma/client': '*' '@tidbcloud/serverless': '*' '@types/better-sqlite3': '*' '@types/pg': '*' @@ -4115,6 +4656,7 @@ packages: mysql2: '>=2' pg: '>=8' postgres: '>=3' + prisma: '*' react: '>=18' sql.js: '>=1' sqlite3: '>=5' @@ -4135,6 +4677,8 @@ packages: optional: true '@planetscale/database': optional: true + '@prisma/client': + optional: true '@tidbcloud/serverless': optional: true '@types/better-sqlite3': @@ -4165,6 +4709,8 @@ packages: optional: true postgres: optional: true + prisma: + optional: true react: optional: true sql.js: @@ -4176,19 +4722,23 @@ packages: resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==} engines: {node: '>=4'} + dset@3.1.4: + resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} + engines: {node: '>=4'} + eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} ecc-jsbn@0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - ejs@3.1.6: - resolution: {integrity: sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==} + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} engines: {node: '>=0.10.0'} hasBin: true - ejs@3.1.9: - resolution: {integrity: sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==} + ejs@3.1.6: + resolution: {integrity: sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==} engines: {node: '>=0.10.0'} hasBin: true @@ -4196,8 +4746,8 @@ packages: resolution: {integrity: sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA==} engines: {node: '>=6'} - electron-to-chromium@1.4.619: - resolution: {integrity: sha512-gW4qlnHxa49kp9kXlLdvnwdYEUlQRio30QOR61YfOQU8MaC/NGHWiJhyMMUl1EwFHbbzQTxvP1Dypdw95DjIow==} + electron-to-chromium@1.5.26: + resolution: {integrity: sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ==} elkjs@0.8.2: resolution: {integrity: sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ==} @@ -4205,6 +4755,9 @@ packages: elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} + elliptic@6.5.7: + resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==} + emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -4240,6 +4793,10 @@ packages: resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + environment@1.1.0: + resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} + engines: {node: '>=18'} + err-code@3.0.1: resolution: {integrity: sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==} @@ -4250,6 +4807,14 @@ packages: resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} + es-define-property@1.0.0: + resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} + engines: {node: '>= 0.4'} + + es-errors@1.3.0: + resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} + engines: {node: '>= 0.4'} + es-iterator-helpers@1.0.15: resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==} @@ -4270,18 +4835,38 @@ packages: es6-promisify@5.0.0: resolution: {integrity: sha512-C+d6UdsYDk0lMebHNR4S2NybQMMngAOnOwYBQjTOiv0MkoJMP0Myw2mgpDLBcpfCmRLxyFqYhS/CfOENq4SJhQ==} + esbuild-register@3.6.0: + resolution: {integrity: sha512-H2/S7Pm8a9CL1uhp9OvjwrBh5Pvx0H8qVOxNu8Wed9Y7qv56MPtq+GGM8RJpq6glYJn9Wspr8uw7l55uyinNeg==} + peerDependencies: + esbuild: '>=0.12 <1' + esbuild@0.16.17: resolution: {integrity: sha512-G8LEkV0XzDMNwXKgM0Jwu3nY3lSTwSGY6XbxM9cr9+s0T/qSV1q1JVPBGzm3dcjhCic9+emZDmMffkwgPeOeLg==} engines: {node: '>=12'} hasBin: true - esbuild@0.19.11: - resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} + 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'} hasBin: true - escalade@3.1.1: - resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} + esbuild@0.23.1: + resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} + engines: {node: '>=18'} + hasBin: true + + escalade@3.2.0: + resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} engines: {node: '>=6'} escape-string-regexp@1.0.5: @@ -4309,6 +4894,15 @@ packages: typescript: optional: true + eslint-config-next@14.2.13: + resolution: {integrity: sha512-aro1EKAoyYchnO/3Tlo91hnNBO7QO7qnv/79MAFC+4Jq8TdUVKQlht5d2F+YjrePjdpOvfL+mV9JPfyYNwkk1g==} + peerDependencies: + eslint: ^7.23.0 || ^8.0.0 + typescript: '>=3.3.1' + peerDependenciesMeta: + typescript: + optional: true + eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} @@ -4376,8 +4970,8 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.56.0: - resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} + eslint@8.57.1: + resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true @@ -4394,8 +4988,8 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.5.0: - resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} + esquery@1.6.0: + resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -4445,8 +5039,8 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - ethereum-bloom-filters@1.0.10: - resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==} + ethereum-bloom-filters@1.2.0: + resolution: {integrity: sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==} ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} @@ -4551,10 +5145,13 @@ packages: fast-querystring@1.1.2: resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} - fast-redact@3.3.0: - resolution: {integrity: sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==} + fast-redact@3.5.0: + resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} engines: {node: '>=6'} + fast-uri@3.0.1: + resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} + fast-url-parser@1.1.3: resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==} @@ -4562,12 +5159,20 @@ packages: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} - fastq@1.16.0: - resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} + fastq@1.17.1: + resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} fault@2.0.1: resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} + fdir@6.3.0: + resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} + peerDependencies: + picomatch: ^3 || ^4 + peerDependenciesMeta: + picomatch: + optional: true + fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -4586,6 +5191,10 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} + fill-range@7.1.1: + resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} + engines: {node: '>=8'} + find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -4598,15 +5207,12 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - find-yarn-workspace-root2@1.2.16: - resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} - flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} - flatted@3.2.9: - resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} + flatted@3.3.1: + resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} flexsearch@0.7.31: resolution: {integrity: sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==} @@ -4614,8 +5220,8 @@ packages: focus-visible@5.2.0: resolution: {integrity: sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==} - follow-redirects@1.15.6: - resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} + follow-redirects@1.15.9: + resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -4626,15 +5232,15 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - foreground-child@3.1.1: - resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} + foreground-child@3.3.0: + resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} engines: {node: '>=14'} forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8} version: 1.9.2 form-data@2.3.3: @@ -4712,10 +5318,6 @@ packages: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} - get-caller-file@2.0.5: - resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} - engines: {node: 6.* || 8.* || >= 10.*} - get-east-asian-width@1.2.0: resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} engines: {node: '>=18'} @@ -4726,6 +5328,10 @@ packages: get-intrinsic@1.2.2: resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} + get-intrinsic@1.2.4: + resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} + engines: {node: '>= 0.4'} + get-iterator@1.0.2: resolution: {integrity: sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg==} @@ -4760,6 +5366,9 @@ packages: get-tsconfig@4.7.2: resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} + get-tsconfig@4.8.1: + resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} + getpass@0.1.7: resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} @@ -4785,6 +5394,10 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true + glob@10.4.5: + resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} + hasBin: true + glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} deprecated: Glob versions prior to v9 are no longer supported @@ -4817,6 +5430,10 @@ packages: resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + globby@14.0.2: + resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} + engines: {node: '>=18'} + globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} @@ -4830,9 +5447,6 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} - grapheme-splitter@1.0.4: - resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} - graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -4846,8 +5460,8 @@ packages: peerDependencies: graphql: 14 - 16 - graphql-yoga@5.3.1: - resolution: {integrity: sha512-n918QV6TF7xTjb9ASnozgsr4ydMc08c+x4eRAWKxxWVwSnzdP2xeN2zw1ljIzRD0ccSCNoBajGDKwcZkJDitPA==} + graphql-yoga@5.7.0: + resolution: {integrity: sha512-QyGVvFAvGhMrzjJvhjsxsyoE+e4lNrj5f5qOsRYJuWIjyw7tHfbBvybZIwzNOGY0aB5sgA8BlVvu5hxjdKJ5tQ==} engines: {node: '>=18.0.0'} peerDependencies: graphql: ^15.2.0 || ^16.0.0 @@ -4856,8 +5470,8 @@ packages: resolution: {integrity: sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA==} engines: {node: '>= 10.x'} - graphql@16.8.2: - resolution: {integrity: sha512-cvVIBILwuoSyD54U4cF/UXDh5yAobhNV/tPygI4lZhgOIJQE/WLWC4waBRb4I6bDVYb3OVx3lfHbaQOEoUD5sg==} + graphql@16.9.0: + resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} gray-matter@4.0.3: @@ -4873,10 +5487,6 @@ packages: engines: {node: '>=6'} deprecated: this library is no longer supported - hard-rejection@2.1.0: - resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} - engines: {node: '>=6'} - has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -4895,10 +5505,17 @@ packages: has-property-descriptors@1.0.1: resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} + has-property-descriptors@1.0.2: + resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} + has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} + has-proto@1.0.3: + resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} + engines: {node: '>= 0.4'} + has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} @@ -4922,6 +5539,10 @@ packages: resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} engines: {node: '>= 0.4'} + hasown@2.0.2: + resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} + engines: {node: '>= 0.4'} + hast-util-from-dom@5.0.0: resolution: {integrity: sha512-d6235voAp/XR3Hh5uy7aGLbM3S4KamdW0WEgOaU1YoewnuYw4HXb5eRtv9g65m/RFGEfUY1Mw4UqCc5Y8L4Stg==} @@ -4949,8 +5570,8 @@ packages: hast-util-to-estree@3.1.0: resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==} - hast-util-to-html@9.0.2: - resolution: {integrity: sha512-RP5wNpj5nm1Z8cloDv4Sl4RS8jH5HYa0v93YB6Wb4poEzgMo/dAAL0KcT4974dCjcNG5pkLqTImeFHHCwwfY3g==} + hast-util-to-html@9.0.3: + resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} hast-util-to-parse5@8.0.0: resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} @@ -4980,8 +5601,9 @@ packages: resolution: {integrity: sha512-ZbezypZfn4odyApjCCv+Fw5OgweBqRLA/EsMyc4FUknFvBJcBIKhHy4sqmD1rWpBc/3wUlaQ6tqOPjk36R1ckg==} engines: {node: '>=16.0.0'} - hosted-git-info@2.8.9: - resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} + hono@4.6.2: + resolution: {integrity: sha512-v+39817TgAhetmHUEli8O0uHDmxp2Up3DnhS4oUZXOl5IQ9np9tYtldd42e5zgdLVS0wsOoXQNZ6mx+BGmEvCA==} + engines: {node: '>=16.9.0'} html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} @@ -5039,8 +5661,8 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - ignore@5.3.0: - resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} + ignore@5.3.2: + resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} engines: {node: '>= 4'} immutable@4.2.1: @@ -5266,10 +5888,6 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} - is-plain-obj@1.1.0: - resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} - engines: {node: '>=0.10.0'} - is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} @@ -5412,8 +6030,11 @@ packages: resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} - jake@10.8.7: - resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==} + jackspeak@3.4.3: + resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} + + jake@10.9.2: + resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} engines: {node: '>=10'} hasBin: true @@ -5436,6 +6057,9 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} + js-tokens@9.0.0: + resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} + js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -5489,9 +6113,6 @@ packages: engines: {node: '>=6'} hasBin: true - jsonc-parser@3.2.0: - resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} - jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -5569,26 +6190,26 @@ packages: resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} engines: {node: '>=14'} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@15.2.0: - resolution: {integrity: sha512-TFZzUEV00f+2YLaVPWBWGAMq7So6yQx+GG8YRMDeOEIf95Zn5RyiLMsEiX4KTNl9vq/w+NqRJkLA1kPIo15ufQ==} + lint-staged@15.2.10: + resolution: {integrity: sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==} engines: {node: '>=18.12.0'} hasBin: true - listr2@8.0.0: - resolution: {integrity: sha512-u8cusxAcyqAiQ2RhYvV7kRKNLgUvtObIbhOX2NCXqvp1UU32xIg5CT22ykS2TPKJXZWJwtK3IKLiqAGlGNE+Zg==} + listr2@8.2.4: + resolution: {integrity: sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==} engines: {node: '>=18.0.0'} load-tsconfig@0.2.5: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - load-yaml-file@0.2.0: - resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} - engines: {node: '>=6'} - local-pkg@0.5.0: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} @@ -5673,8 +6294,8 @@ packages: resolution: {integrity: sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==} engines: {node: '>=12'} - log-update@6.0.0: - resolution: {integrity: sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==} + log-update@6.1.0: + resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} engines: {node: '>=18'} long@4.0.0: @@ -5700,6 +6321,9 @@ packages: resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} engines: {node: 14 || >=16.14} + lru-cache@10.4.3: + resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} + lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -5715,21 +6339,12 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 - magic-string@0.30.5: - resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} - engines: {node: '>=12'} + magic-string@0.30.11: + resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} - map-obj@1.0.1: - resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} - engines: {node: '>=0.10.0'} - - map-obj@4.3.0: - resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} - engines: {node: '>=8'} - markdown-extensions@1.1.1: resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} engines: {node: '>=0.10.0'} @@ -5830,10 +6445,6 @@ packages: mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} - meow@6.1.1: - resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} - engines: {node: '>=8'} - merge-options@3.0.4: resolution: {integrity: sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==} engines: {node: '>=10'} @@ -6029,6 +6640,10 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} + micromatch@4.0.8: + resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} + engines: {node: '>=8.6'} + mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -6045,14 +6660,14 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} + mimic-function@5.0.1: + resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} + engines: {node: '>=18'} + mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} - min-indent@1.0.1: - resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} - engines: {node: '>=4'} - minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -6074,9 +6689,9 @@ packages: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} - minimist-options@4.1.0: - resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} - engines: {node: '>= 6'} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -6093,18 +6708,14 @@ packages: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} - minipass@7.0.4: - resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} + minipass@7.1.2: + resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} engines: {node: '>=16 || 14 >=14.17'} minizlib@2.1.2: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} - mixme@0.5.10: - resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} - engines: {node: '>= 8.0.0'} - mj-context-menu@0.6.1: resolution: {integrity: sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==} @@ -6120,8 +6731,8 @@ packages: engines: {node: '>=10'} hasBin: true - mlly@1.4.2: - resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} + mlly@1.7.1: + resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -6193,6 +6804,24 @@ packages: sass: optional: true + next@14.2.13: + resolution: {integrity: sha512-BseY9YNw8QJSwLYD7hlZzl6QVDoSFHL/URN5K64kVEVpCsSOWeyjbIGK+dZUaRViHTaMQX8aqmnn0PHBbGZezg==} + engines: {node: '>=18.17.0'} + hasBin: true + peerDependencies: + '@opentelemetry/api': ^1.1.0 + '@playwright/test': ^1.41.2 + react: ^18.2.0 + react-dom: ^18.2.0 + sass: ^1.3.0 + peerDependenciesMeta: + '@opentelemetry/api': + optional: true + '@playwright/test': + optional: true + sass: + optional: true + nextra-theme-docs@3.0.0-alpha.10: resolution: {integrity: sha512-1qOZGgrJUa2qS9opbSeBSQaiSMImxX3Sw1BeSceLlxB1mgiCbfeRD7CyZ7haa5A6rozklLsp3q4qtJydwzJB7Q==} peerDependencies: @@ -6236,19 +6865,16 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-gyp-build@4.7.1: - resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} + node-gyp-build@4.8.2: + resolution: {integrity: sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==} hasBin: true - node-releases@2.0.14: - resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} + node-releases@2.0.18: + resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} non-layered-tidy-tree-layout@2.0.2: resolution: {integrity: sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==} - normalize-package-data@2.5.0: - resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} - normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -6265,8 +6891,8 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npm-run-path@5.2.0: - resolution: {integrity: sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==} + npm-run-path@5.3.0: + resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} npm-to-yarn@2.1.0: @@ -6294,6 +6920,10 @@ packages: object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} + object-inspect@1.13.2: + resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} + engines: {node: '>= 0.4'} + object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} @@ -6342,8 +6972,12 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} - optionator@0.9.3: - resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} + onetime@7.0.0: + resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} + engines: {node: '>=18'} + + optionator@0.9.4: + resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} engines: {node: '>= 0.8.0'} ora@4.0.2: @@ -6380,9 +7014,9 @@ packages: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} - p-filter@3.0.0: - resolution: {integrity: sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==} - engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + p-filter@4.1.0: + resolution: {integrity: sha512-37/tPdZ3oJwHaS3gNJdenCDB3Tz26i9sjhnguBtvN0vYlRIiDNnvTWkuh+0hETV9rLPdJ3rlL3yVOYPIAnM8rw==} + engines: {node: '>=18'} p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} @@ -6420,13 +7054,9 @@ packages: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} - p-map@5.5.0: - resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} - engines: {node: '>=12'} - - p-map@6.0.0: - resolution: {integrity: sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==} - engines: {node: '>=16'} + p-map@7.0.2: + resolution: {integrity: sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==} + engines: {node: '>=18'} p-timeout@3.2.0: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} @@ -6444,8 +7074,11 @@ packages: resolution: {integrity: sha512-wpgERjNkLrBiFmkMEjuZJEWKKDrNfHCKA1OhyN1wg1FrLkULbviEy6py1AyJUgZ72YWFbZ38FIpnqvVqAlDUwA==} engines: {node: '>=8'} - packet-reader@1.0.0: - resolution: {integrity: sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==} + package-json-from-dist@1.0.0: + resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} + + package-manager-detector@0.2.0: + resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} param-case@3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} @@ -6513,16 +7146,20 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@1.10.1: - resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} - engines: {node: '>=16 || 14 >=14.17'} + path-scurry@1.11.1: + resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} + engines: {node: '>=16 || 14 >=14.18'} path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - pathe@1.1.1: - resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} + path-type@5.0.0: + resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} + engines: {node: '>=12'} + + pathe@1.1.2: + resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} @@ -6540,8 +7177,8 @@ packages: pg-cloudflare@1.1.1: resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==} - pg-connection-string@2.6.2: - resolution: {integrity: sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==} + pg-connection-string@2.7.0: + resolution: {integrity: sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==} pg-int8@1.0.1: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} @@ -6551,14 +7188,17 @@ packages: resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==} engines: {node: '>=4'} - pg-pool@3.6.1: - resolution: {integrity: sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==} + pg-pool@3.7.0: + resolution: {integrity: sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==} peerDependencies: pg: '>=8.0' pg-protocol@1.6.0: resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==} + pg-protocol@1.7.0: + resolution: {integrity: sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==} + pg-types@2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} engines: {node: '>=4'} @@ -6567,8 +7207,8 @@ packages: resolution: {integrity: sha512-hRCSDuLII9/LE3smys1hRHcu5QGcLs9ggT7I/TCs0IE+2Eesxi9+9RWAAwZ0yaGjxoWICF/YHLOEjydGujoJ+g==} engines: {node: '>=10'} - pg@8.11.3: - resolution: {integrity: sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==} + pg@8.13.0: + resolution: {integrity: sha512-34wkUTh3SxTClfoHB3pQ7bIMvw9dpFU1audQQeZG837fmHfHpr14n/AELVDoOYVDW2h5RDWU78tFjkD+erSBsw==} engines: {node: '>= 8.0.0'} peerDependencies: pg-native: '>=3.0.1' @@ -6582,10 +7222,17 @@ packages: picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} + picocolors@1.1.0: + resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} + picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} + picomatch@4.0.2: + resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} + engines: {node: '>=12'} + pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -6599,26 +7246,22 @@ packages: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - pino-abstract-transport@1.1.0: - resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} + pino-abstract-transport@1.2.0: + resolution: {integrity: sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==} pino-std-serializers@6.2.2: resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} - pino@8.17.2: - resolution: {integrity: sha512-LA6qKgeDMLr2ux2y/YiUt47EfgQ+S9LznBWOJdN3q1dx2sv0ziDLUBeVpyVv17TEcGCBuWf0zNtg3M5m1NhhWQ==} + pino@8.21.0: + resolution: {integrity: sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==} hasBin: true pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} - pkg-dir@4.2.0: - resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} - engines: {node: '>=8'} - - pkg-types@1.0.3: - resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} + pkg-types@1.2.0: + resolution: {integrity: sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==} pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} @@ -6648,6 +7291,24 @@ packages: ts-node: optional: true + postcss-load-config@6.0.1: + resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} + engines: {node: '>= 18'} + peerDependencies: + jiti: '>=1.21.0' + postcss: '>=8.0.9' + tsx: ^4.8.1 + yaml: ^2.4.2 + peerDependenciesMeta: + jiti: + optional: true + postcss: + optional: true + tsx: + optional: true + yaml: + optional: true + postcss-nested@6.0.1: resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} @@ -6665,8 +7326,8 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.32: - resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} + postcss@8.4.47: + resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} engines: {node: ^10 || ^12 || >=14} postgres-array@2.0.0: @@ -6704,8 +7365,8 @@ packages: postgres-range@1.1.3: resolution: {integrity: sha512-VdlZoocy5lCP0c/t66xAfclglEapXPCIVhqqJRncYpvbCgImF0w67aPKfbqUMr72tO2k5q0TdTZwCLjPTI6C9g==} - posthog-node@4.0.0: - resolution: {integrity: sha512-jEZnNbgb/3FNk+gNwtTcyz3j+62zIN+UTPotONfacVXJnoI70KScSkKdIR+rvP9tA2kjBSoHQxGwJuizs27o9A==} + posthog-node@4.2.0: + resolution: {integrity: sha512-hgyCYMyzMvuF3qWMw6JvS8gT55v7Mtp5wKWcnDrw+nu39D0Tk9BXD7I0LOBp0lGlHEPaXCEVYUtviNKrhMALGA==} engines: {node: '>=15.0.0'} prebuild-install@7.1.2: @@ -6713,10 +7374,6 @@ packages: engines: {node: '>=10'} hasBin: true - preferred-pm@3.1.2: - resolution: {integrity: sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==} - engines: {node: '>=10'} - prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -6731,8 +7388,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.1.1: - resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} + prettier@3.3.3: + resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} engines: {node: '>=14'} hasBin: true @@ -6750,8 +7407,8 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - prom-client@15.1.0: - resolution: {integrity: sha512-cCD7jLTqyPdjEPBo/Xk4Iu8jxjuZgZJ3e/oET3L+ZwOuap/7Cw3dH/TJSsZKs1TQLZ2IHpIlRAKw82ef06kmMw==} + prom-client@15.1.3: + resolution: {integrity: sha512-6ZiOBfCywsD4k1BN9IX0uZhF+tJkV8q8llP64G5Hajs4JOeVLPCwpPVcpXy3BwYiUGgyJzsJJQeOIv7+hDSq8g==} engines: {node: ^16 || ^18 || >=20} promise@8.3.0: @@ -6800,8 +7457,8 @@ packages: resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} engines: {node: '>=6.0.0'} - qs@6.11.2: - resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} + qs@6.13.0: + resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} engines: {node: '>=0.6'} qs@6.5.3: @@ -6814,10 +7471,6 @@ packages: quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} - quick-lru@4.0.1: - resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} - engines: {node: '>=8'} - randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -6825,46 +7478,38 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-countup@6.5.0: - resolution: {integrity: sha512-26JFHbUHsHxu8SetkJwWVIUEkaNnrj4P9msxNGC8tS4hGr1bngRzbwtJYOgXD2G/ItjaKJ3JfYKd85sw7qRVeA==} + react-countup@6.5.3: + resolution: {integrity: sha512-udnqVQitxC7QWADSPDOxVWULkLvKUWrDapn5i53HE4DPRVgs+Y5rr4bo25qEl8jSh+0l2cToJgGMx+clxPM3+w==} peerDependencies: react: '>= 16.3.0' - react-dom@18.2.0: - resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} + react-dom@18.3.1: + resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} peerDependencies: - react: ^18.2.0 + react: ^18.3.1 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-is@18.2.0: - resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} + react-is@18.3.1: + resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} react-native-fetch-api@3.0.0: resolution: {integrity: sha512-g2rtqPjdroaboDKTsJCTlcmtw54E25OjyaunUP0anOZn4Fuo2IKs8BVfe02zVggA/UysbmfSnRJIqtNkAgggNA==} - react-reconciler@0.29.0: - resolution: {integrity: sha512-wa0fGj7Zht1EYMRhKWwoo1H9GApxYLBuhoAuXN0TlltESAjDssB+Apf0T/DngVqaMyPypDmabL37vw/2aRM98Q==} + react-reconciler@0.29.2: + resolution: {integrity: sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==} engines: {node: '>=0.10.0'} peerDependencies: - react: ^18.2.0 + react: ^18.3.1 - react@18.2.0: - resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} + react@18.3.1: + resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} engines: {node: '>=0.10.0'} read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} - read-pkg-up@7.0.1: - resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} - engines: {node: '>=8'} - - read-pkg@5.2.0: - resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} - engines: {node: '>=8'} - read-yaml-file@1.1.0: resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} engines: {node: '>=6'} @@ -6895,11 +7540,7 @@ packages: engines: {node: '>= 12.13.0'} receptacle@1.3.2: - resolution: {integrity: sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==} - - redent@3.0.0: - resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} - engines: {node: '>=8'} + resolution: {integrity: sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==} redeyed@2.1.1: resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==} @@ -6978,17 +7619,10 @@ packages: engines: {node: '>= 6'} deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 - require-directory@2.1.1: - resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} - engines: {node: '>=0.10.0'} - require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} - require-main-filename@2.0.0: - resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} - requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -7019,6 +7653,10 @@ packages: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + restore-cursor@5.1.0: + resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} + engines: {node: '>=18'} + retimer@3.0.0: resolution: {integrity: sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA==} @@ -7026,8 +7664,8 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rfdc@1.3.0: - resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} + rfdc@1.4.1: + resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} @@ -7039,9 +7677,8 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.5: - resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} - engines: {node: '>=14'} + rimraf@5.0.10: + resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} hasBin: true ripemd160@2.0.2: @@ -7058,8 +7695,8 @@ packages: robust-predicates@3.0.2: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} - rollup@4.9.2: - resolution: {integrity: sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==} + rollup@4.22.2: + resolution: {integrity: sha512-JWWpTrZmqQGQWt16xvNn6KVIUz16VtZwl984TKw0dfqqRpFwtLJYYk1/4BTgplndMQKWUk/yB4uOShYmMzA2Vg==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -7093,11 +7730,15 @@ packages: resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} engines: {node: '>=10'} + safe-stable-stringify@2.5.0: + resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} + engines: {node: '>=10'} + safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scheduler@0.23.0: - resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} + scheduler@0.23.2: + resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} scroll-into-view-if-needed@3.1.0: resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==} @@ -7116,10 +7757,6 @@ packages: semver-compare@1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} - semver@5.7.2: - resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} - hasBin: true - semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -7139,16 +7776,22 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} - set-blocking@2.0.0: - resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} - set-function-length@1.1.1: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} engines: {node: '>= 0.4'} + set-function-length@1.2.2: + resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} + engines: {node: '>= 0.4'} + set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -7178,10 +7821,15 @@ packages: shikiji@0.6.10: resolution: {integrity: sha512-WE+A5Y2ntM5hL3iJQujk97qr5Uj7PSIRXpQfrZ6h+JWPXZ8KBEDhFXc4lqNriaRq1WGOVPUT83XMOzmHiH3W8A==} + deprecated: Shikiji is merged back to Shiki v1.0, please migrate over to get the latest updates side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} + side-channel@1.0.6: + resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} + engines: {node: '>= 0.4'} + siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -7198,8 +7846,8 @@ packages: simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - simple-git-hooks@2.9.0: - resolution: {integrity: sha512-waSQ5paUQtyGC0ZxlHmcMmD9I1rRXauikBwX31bX58l5vTOhCEcBC5Bi+ZDkPXTjDnZAF8TbCqKBY+9+sVPScw==} + simple-git-hooks@2.11.1: + resolution: {integrity: sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==} hasBin: true sisteransi@1.0.5: @@ -7233,23 +7881,18 @@ packages: resolution: {integrity: sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==} engines: {node: '>=18'} - smartwrap@2.0.2: - resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} - engines: {node: '>=6'} - hasBin: true - snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - sonic-boom@3.7.0: - resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==} + sonic-boom@3.8.1: + resolution: {integrity: sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==} sort-keys@5.0.0: resolution: {integrity: sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw==} engines: {node: '>=12'} - source-map-js@1.0.2: - resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} + source-map-js@1.2.1: + resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} engines: {node: '>=0.10.0'} source-map-support@0.5.21: @@ -7273,18 +7916,6 @@ packages: spawndamnit@2.0.0: resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} - spdx-correct@3.2.0: - resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} - - spdx-exceptions@2.3.0: - resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} - - spdx-expression-parse@3.0.1: - resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} - - spdx-license-ids@3.0.16: - resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} - speech-rule-engine@4.0.7: resolution: {integrity: sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g==} hasBin: true @@ -7325,9 +7956,6 @@ packages: stream-to-it@0.2.4: resolution: {integrity: sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ==} - stream-transform@2.1.3: - resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} - streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -7348,8 +7976,8 @@ packages: resolution: {integrity: sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==} engines: {node: '>=16'} - string-width@7.0.0: - resolution: {integrity: sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==} + string-width@7.2.0: + resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} engines: {node: '>=18'} string.prototype.matchall@4.0.10: @@ -7413,10 +8041,6 @@ packages: resolution: {integrity: sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==} engines: {node: '>=6.5.0', npm: '>=3'} - strip-indent@3.0.0: - resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} - engines: {node: '>=8'} - strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -7425,8 +8049,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@1.3.0: - resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} + strip-literal@2.1.0: + resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} stubborn-fs@1.2.5: resolution: {integrity: sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==} @@ -7494,16 +8118,16 @@ packages: sync-rpc@1.3.6: resolution: {integrity: sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==} - tailwind-merge@2.1.0: - resolution: {integrity: sha512-l11VvI4nSwW7MtLSLYT4ldidDEUwQAMWuSHk7l4zcXZDgnCRa0V3OdCwFfM7DCzakVXMNRwAeje9maFFXT71dQ==} + tailwind-merge@2.5.2: + resolution: {integrity: sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==} tailwindcss-animate@1.0.7: resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} peerDependencies: tailwindcss: '>=3.0.0 || insiders' - tailwindcss@3.3.5: - resolution: {integrity: sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==} + tailwindcss@3.4.12: + resolution: {integrity: sha512-Htf/gHj2+soPb9UayUNci/Ja3d8pTmu9ONTfh4QY8r3MATTZOzmv6UYWF7ZwikEIC8okpfqmGqrmDehua8mF8w==} engines: {node: '>=14.0.0'} hasBin: true @@ -7525,8 +8149,8 @@ packages: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} - tar@6.2.0: - resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} + tar@6.2.1: + resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} engines: {node: '>=10'} tdigest@0.1.2: @@ -7550,8 +8174,8 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - thread-stream@2.4.1: - resolution: {integrity: sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==} + thread-stream@2.7.0: + resolution: {integrity: sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==} through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -7559,15 +8183,19 @@ packages: timeout-abort-controller@2.0.0: resolution: {integrity: sha512-2FAPXfzTPYEgw27bQGTHc0SzrbmnU2eso4qo172zMLZzaGqeu09PFa5B2FCUHM1tflgRqPgn5KQgp6+Vex4uNA==} - tinybench@2.5.1: - resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} + tinybench@2.9.0: + resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + + tinyglobby@0.2.6: + resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} + engines: {node: '>=12.0.0'} - tinypool@0.8.1: - resolution: {integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==} + tinypool@0.8.4: + resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} engines: {node: '>=14.0.0'} - tinyspy@2.2.0: - resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} + tinyspy@2.2.1: + resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} engines: {node: '>=14.0.0'} title@3.5.3: @@ -7585,9 +8213,9 @@ packages: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} - tmp@0.2.1: - resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} - engines: {node: '>=8.17.0'} + tmp@0.2.3: + resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} + engines: {node: '>=14.14'} to-buffer@1.1.1: resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} @@ -7617,10 +8245,6 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} - trim-newlines@3.0.1: - resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} - engines: {node: '>=8'} - trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} @@ -7630,6 +8254,12 @@ packages: peerDependencies: typescript: '>=4.2.0' + ts-api-utils@1.3.0: + resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} + engines: {node: '>=16'} + peerDependencies: + typescript: '>=4.2.0' + ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -7651,8 +8281,8 @@ packages: '@swc/wasm': optional: true - tsconfck@3.0.1: - resolution: {integrity: sha512-7ppiBlF3UEddCLeI1JRx5m2Ryq+xk4JrZuq4EuYXykipebaq1dV0Fhgr1hb7CkmHt32QSgOZlcqVLEtHBG4/mg==} + tsconfck@3.1.3: + resolution: {integrity: sha512-ulNZP1SVpRDesxeMLON/LtWM8HIgAJEIVpVVhBM6gsmvQ8+Rh+ZG7FWGvHh7Ah3pRABwVJWklWCr/BTZSv0xnQ==} engines: {node: ^18 || >=20} hasBin: true peerDependencies: @@ -7667,8 +8297,11 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tsup@8.0.1: - resolution: {integrity: sha512-hvW7gUSG96j53ZTSlT4j/KL0q1Q2l6TqGBFc6/mu/L46IoNWqLLUzLRLP1R8Q7xrJTmkDxxDoojV5uCVs1sVOg==} + tslib@2.7.0: + resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} + + tsup@8.3.0: + resolution: {integrity: sha512-ALscEeyS03IomcuNdFdc0YWGVIkwH1Ws7nfTbAPuoILvEV2hpGQAY72LIOjglGo4ShWpZfpBqP/jpQVCzqYQag==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -7686,11 +8319,6 @@ packages: typescript: optional: true - tty-table@4.2.3: - resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} - engines: {node: '>=8.0.0'} - hasBin: true - tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} @@ -7701,18 +8329,14 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-detect@4.0.8: - resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} + type-detect@4.1.0: + resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} engines: {node: '>=4'} type-fest@0.12.0: resolution: {integrity: sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==} engines: {node: '>=10'} - type-fest@0.13.1: - resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} - engines: {node: '>=10'} - type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -7721,18 +8345,10 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} - type-fest@0.6.0: - resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} - engines: {node: '>=8'} - type-fest@0.7.1: resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} engines: {node: '>=8'} - type-fest@0.8.1: - resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} - engines: {node: '>=8'} - type-fest@1.4.0: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} @@ -7768,13 +8384,13 @@ packages: engines: {node: '>=12.20'} hasBin: true - typescript@5.3.3: - resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} + typescript@5.6.2: + resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} engines: {node: '>=14.17'} hasBin: true - ufo@1.3.2: - resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} + ufo@1.5.4: + resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} uint8array-extras@0.3.0: resolution: {integrity: sha512-erJsJwQ0tKdwuqI0359U8ijkFmfiTcq25JvvzRVc1VP+2son1NJRXhxcAKJmAW3ajM8JSGAfsAXye8g4s+znxA==} @@ -7786,8 +8402,8 @@ packages: unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@5.26.5: - resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} + undici-types@6.19.8: + resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} @@ -7805,6 +8421,10 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} @@ -7873,8 +8493,8 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - update-browserslist-db@1.0.13: - resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} + update-browserslist-db@1.1.0: + resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -7924,11 +8544,8 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - validate-npm-package-license@3.0.4: - resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} - - validate-npm-package-name@5.0.0: - resolution: {integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==} + validate-npm-package-name@5.0.1: + resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} value-or-promise@1.0.12: @@ -7965,6 +8582,14 @@ packages: typescript: optional: true + viem@2.21.10: + resolution: {integrity: sha512-n+BKNabWI0k2i7PB4UEdxgHHpQmMeDk+2X9093l/yU0NLUjIgiazybfD1BksGwbiIRk/WXr+aoRqKOExxRDxWA==} + peerDependencies: + typescript: '>=5.0.4' + peerDependenciesMeta: + typescript: + optional: true + viem@2.21.3: resolution: {integrity: sha512-WwOEsoiJ4v1zHf1OeKdtWth+chMyY/yZbHRLidhZEr0yFsOjTXkyfuvFp5ZykjRv9EtzDr2C6K/MU26CjMkSUw==} peerDependencies: @@ -7973,26 +8598,21 @@ packages: typescript: optional: true - vite-node@1.0.2: - resolution: {integrity: sha512-h7BbMJf46fLvFW/9Ygo3snkIBEHFh6fHpB4lge98H5quYrDhPFeI3S0LREz328uqPWSnii2yeJXktQ+Pmqk5BQ==} - engines: {node: ^18.0.0 || >=20.0.0} - hasBin: true - - vite-node@1.1.1: - resolution: {integrity: sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==} + vite-node@1.6.0: + resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-tsconfig-paths@4.3.1: - resolution: {integrity: sha512-cfgJwcGOsIxXOLU/nELPny2/LUD/lcf1IbfyeKTv2bsupVbTH/xpFtdQlBmIP1GEK2CjjLxYhFfB+QODFAx5aw==} + vite-tsconfig-paths@4.3.2: + resolution: {integrity: sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==} peerDependencies: vite: '*' peerDependenciesMeta: vite: optional: true - vite@5.0.10: - resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} + vite@5.4.7: + resolution: {integrity: sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -8000,6 +8620,7 @@ packages: less: '*' lightningcss: ^1.21.0 sass: '*' + sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -8012,6 +8633,8 @@ packages: optional: true sass: optional: true + sass-embedded: + optional: true stylus: optional: true sugarss: @@ -8019,15 +8642,15 @@ packages: terser: optional: true - vitest@1.0.2: - resolution: {integrity: sha512-F3NVwwpXfRSDnJmyv+ALPwSRVt0zDkRRE18pwUHSUPXAlWQ47rY1dc99ziMW5bBHyqwK2ERjMisLNoef64qk9w==} + vitest@1.6.0: + resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': ^1.0.0 - '@vitest/ui': ^1.0.0 + '@vitest/browser': 1.6.0 + '@vitest/ui': 1.6.0 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -8054,8 +8677,8 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - web-streams-polyfill@3.2.1: - resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} + web-streams-polyfill@3.3.3: + resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} engines: {node: '>= 8'} web-worker@1.2.0: @@ -8072,8 +8695,8 @@ packages: webauthn-p256@0.0.5: resolution: {integrity: sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==} - webcrypto-core@1.7.7: - resolution: {integrity: sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g==} + webcrypto-core@1.8.0: + resolution: {integrity: sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==} webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -8087,8 +8710,8 @@ packages: whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - when-exit@2.1.2: - resolution: {integrity: sha512-u9J+toaf3CCxCAzM/484qNAxQE75rFdVgiFEEV8Xps2gzYhf0tx73s1WXDQhkwV17E3MxRMz40m7Ekd2/121Lg==} + when-exit@2.1.3: + resolution: {integrity: sha512-uVieSTccFIr/SFQdFWN/fFaQYmV37OKtuaGphMAzi4DmmUlrvRBJW5WSLkHyjNQY/ePJMz3LoiX9R3yy1Su6Hw==} which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -8100,13 +8723,6 @@ packages: which-collection@1.0.1: resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} - which-module@2.0.1: - resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} - - which-pm@2.0.0: - resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} - engines: {node: '>=8.15'} - which-typed-array@1.1.13: resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} engines: {node: '>= 0.4'} @@ -8120,8 +8736,8 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.2.2: - resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} + why-is-node-running@2.3.0: + resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} engines: {node: '>=8'} hasBin: true @@ -8136,13 +8752,13 @@ packages: resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} engines: {node: '>=12'} + word-wrap@1.2.5: + resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} + engines: {node: '>=0.10.0'} + wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} - wrap-ansi@6.2.0: - resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} - engines: {node: '>=8'} - wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -8158,8 +8774,8 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@7.5.9: - resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} + ws@7.5.10: + resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} engines: {node: '>=8.3.0'} peerDependencies: bufferutil: ^4.0.1 @@ -8182,8 +8798,8 @@ packages: utf-8-validate: optional: true - ws@8.16.0: - resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -8194,8 +8810,8 @@ packages: utf-8-validate: optional: true - ws@8.17.1: - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -8214,13 +8830,6 @@ packages: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} - y18n@4.0.3: - resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} - - y18n@5.0.8: - resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} - engines: {node: '>=10'} - yallist@2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} @@ -8238,22 +8847,15 @@ packages: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} - yargs-parser@18.1.3: - resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} - engines: {node: '>=6'} + yaml@2.5.1: + resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} + engines: {node: '>= 14'} + hasBin: true yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} - yargs@15.4.1: - resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} - engines: {node: '>=8'} - - yargs@17.7.2: - resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} - engines: {node: '>=12'} - yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} @@ -8283,8 +8885,6 @@ packages: snapshots: - '@aashutoshrathi/word-wrap@1.2.6': {} - '@adraffy/ens-normalize@1.10.0': {} '@alcalzone/ansi-tokenize@0.1.3': @@ -8299,17 +8899,17 @@ snapshots: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.20 - '@babel/code-frame@7.23.5': + '@babel/code-frame@7.24.7': dependencies: - '@babel/highlight': 7.23.4 - chalk: 2.4.2 + '@babel/highlight': 7.24.7 + picocolors: 1.1.0 '@babel/compat-data@7.23.5': {} '@babel/core@7.23.7': dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.7 '@babel/generator': 7.23.6 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.7) @@ -8319,7 +8919,7 @@ snapshots: '@babel/traverse': 7.23.7 '@babel/types': 7.23.6 convert-source-map: 2.0.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -8345,7 +8945,7 @@ snapshots: dependencies: '@babel/compat-data': 7.23.5 '@babel/helper-validator-option': 7.23.5 - browserslist: 4.22.2 + browserslist: 4.23.3 lru-cache: 5.1.1 semver: 6.3.1 @@ -8374,7 +8974,7 @@ snapshots: '@babel/core': 7.23.7 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.22.5 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -8444,6 +9044,8 @@ snapshots: '@babel/helper-validator-identifier@7.22.20': {} + '@babel/helper-validator-identifier@7.24.7': {} + '@babel/helper-validator-option@7.23.5': {} '@babel/helper-wrap-function@7.22.20': @@ -8460,11 +9062,12 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/highlight@7.23.4': + '@babel/highlight@7.24.7': dependencies: - '@babel/helper-validator-identifier': 7.22.20 + '@babel/helper-validator-identifier': 7.24.7 chalk: 2.4.2 js-tokens: 4.0.0 + picocolors: 1.1.0 '@babel/parser@7.23.6': dependencies: @@ -9044,13 +9647,13 @@ snapshots: '@babel/template@7.22.15': dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.7 '@babel/parser': 7.23.6 '@babel/types': 7.23.6 '@babel/traverse@7.23.7': dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.7 '@babel/generator': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 @@ -9058,7 +9661,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.6 '@babel/types': 7.23.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -9069,49 +9672,49 @@ snapshots: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - '@biomejs/biome@1.8.1': + '@biomejs/biome@1.9.2': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.8.1 - '@biomejs/cli-darwin-x64': 1.8.1 - '@biomejs/cli-linux-arm64': 1.8.1 - '@biomejs/cli-linux-arm64-musl': 1.8.1 - '@biomejs/cli-linux-x64': 1.8.1 - '@biomejs/cli-linux-x64-musl': 1.8.1 - '@biomejs/cli-win32-arm64': 1.8.1 - '@biomejs/cli-win32-x64': 1.8.1 - - '@biomejs/cli-darwin-arm64@1.8.1': + '@biomejs/cli-darwin-arm64': 1.9.2 + '@biomejs/cli-darwin-x64': 1.9.2 + '@biomejs/cli-linux-arm64': 1.9.2 + '@biomejs/cli-linux-arm64-musl': 1.9.2 + '@biomejs/cli-linux-x64': 1.9.2 + '@biomejs/cli-linux-x64-musl': 1.9.2 + '@biomejs/cli-win32-arm64': 1.9.2 + '@biomejs/cli-win32-x64': 1.9.2 + + '@biomejs/cli-darwin-arm64@1.9.2': optional: true - '@biomejs/cli-darwin-x64@1.8.1': + '@biomejs/cli-darwin-x64@1.9.2': optional: true - '@biomejs/cli-linux-arm64-musl@1.8.1': + '@biomejs/cli-linux-arm64-musl@1.9.2': optional: true - '@biomejs/cli-linux-arm64@1.8.1': + '@biomejs/cli-linux-arm64@1.9.2': optional: true - '@biomejs/cli-linux-x64-musl@1.8.1': + '@biomejs/cli-linux-x64-musl@1.9.2': optional: true - '@biomejs/cli-linux-x64@1.8.1': + '@biomejs/cli-linux-x64@1.9.2': optional: true - '@biomejs/cli-win32-arm64@1.8.1': + '@biomejs/cli-win32-arm64@1.9.2': optional: true - '@biomejs/cli-win32-x64@1.8.1': + '@biomejs/cli-win32-x64@1.9.2': optional: true '@braintree/sanitize-url@6.0.4': {} - '@changesets/apply-release-plan@7.0.0': + '@changesets/apply-release-plan@7.0.5': dependencies: - '@babel/runtime': 7.23.7 - '@changesets/config': 3.0.0 + '@changesets/config': 3.0.3 '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.0 + '@changesets/git': 3.0.1 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 @@ -9122,11 +9725,11 @@ snapshots: resolve-from: 5.0.0 semver: 7.6.2 - '@changesets/assemble-release-plan@6.0.0': + '@changesets/assemble-release-plan@6.0.4': dependencies: - '@babel/runtime': 7.23.7 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.0.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 semver: 7.6.2 @@ -9143,61 +9746,58 @@ snapshots: transitivePeerDependencies: - encoding - '@changesets/cli@2.27.1': + '@changesets/cli@2.27.8': dependencies: - '@babel/runtime': 7.23.7 - '@changesets/apply-release-plan': 7.0.0 - '@changesets/assemble-release-plan': 6.0.0 + '@changesets/apply-release-plan': 7.0.5 + '@changesets/assemble-release-plan': 6.0.4 '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.0 + '@changesets/config': 3.0.3 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.0.0 - '@changesets/get-release-plan': 4.0.0 - '@changesets/git': 3.0.0 - '@changesets/logger': 0.1.0 - '@changesets/pre': 2.0.0 - '@changesets/read': 0.6.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/get-release-plan': 4.0.4 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 + '@changesets/should-skip-package': 0.1.1 '@changesets/types': 6.0.0 - '@changesets/write': 0.3.0 + '@changesets/write': 0.3.2 '@manypkg/get-packages': 1.1.3 '@types/semver': 7.5.6 ansi-colors: 4.1.3 - chalk: 2.4.2 ci-info: 3.9.0 enquirer: 2.4.1 external-editor: 3.1.0 fs-extra: 7.0.1 - human-id: 1.0.2 - meow: 6.1.1 + mri: 1.2.0 outdent: 0.5.0 p-limit: 2.3.0 - preferred-pm: 3.1.2 + package-manager-detector: 0.2.0 + picocolors: 1.1.0 resolve-from: 5.0.0 semver: 7.6.2 spawndamnit: 2.0.0 term-size: 2.2.1 - tty-table: 4.2.3 - '@changesets/config@3.0.0': + '@changesets/config@3.0.3': dependencies: '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.0.0 - '@changesets/logger': 0.1.0 + '@changesets/get-dependents-graph': 2.1.2 + '@changesets/logger': 0.1.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - micromatch: 4.0.5 + micromatch: 4.0.8 '@changesets/errors@0.2.0': dependencies: extendable-error: 0.1.7 - '@changesets/get-dependents-graph@2.0.0': + '@changesets/get-dependents-graph@2.1.2': dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - chalk: 2.4.2 - fs-extra: 7.0.1 + picocolors: 1.1.0 semver: 7.6.2 '@changesets/get-github-info@0.5.2(encoding@0.1.13)': @@ -9207,55 +9807,55 @@ snapshots: transitivePeerDependencies: - encoding - '@changesets/get-release-plan@4.0.0': + '@changesets/get-release-plan@4.0.4': dependencies: - '@babel/runtime': 7.23.7 - '@changesets/assemble-release-plan': 6.0.0 - '@changesets/config': 3.0.0 - '@changesets/pre': 2.0.0 - '@changesets/read': 0.6.0 + '@changesets/assemble-release-plan': 6.0.4 + '@changesets/config': 3.0.3 + '@changesets/pre': 2.0.1 + '@changesets/read': 0.6.1 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 '@changesets/get-version-range-type@0.4.0': {} - '@changesets/git@3.0.0': + '@changesets/git@3.0.1': dependencies: - '@babel/runtime': 7.23.7 '@changesets/errors': 0.2.0 - '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 - micromatch: 4.0.5 + micromatch: 4.0.8 spawndamnit: 2.0.0 - '@changesets/logger@0.1.0': + '@changesets/logger@0.1.1': dependencies: - chalk: 2.4.2 + picocolors: 1.1.0 '@changesets/parse@0.4.0': dependencies: '@changesets/types': 6.0.0 js-yaml: 3.14.1 - '@changesets/pre@2.0.0': + '@changesets/pre@2.0.1': dependencies: - '@babel/runtime': 7.23.7 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.6.0': + '@changesets/read@0.6.1': dependencies: - '@babel/runtime': 7.23.7 - '@changesets/git': 3.0.0 - '@changesets/logger': 0.1.0 + '@changesets/git': 3.0.1 + '@changesets/logger': 0.1.1 '@changesets/parse': 0.4.0 '@changesets/types': 6.0.0 - chalk: 2.4.2 fs-extra: 7.0.1 p-filter: 2.1.0 + picocolors: 1.1.0 + + '@changesets/should-skip-package@0.1.1': + dependencies: + '@changesets/types': 6.0.0 + '@manypkg/get-packages': 1.1.3 '@changesets/types@4.1.0': {} @@ -9263,206 +9863,422 @@ snapshots: '@changesets/types@6.0.0': {} - '@changesets/write@0.3.0': + '@changesets/write@0.3.2': dependencies: - '@babel/runtime': 7.23.7 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 prettier: 2.8.8 - '@commander-js/extra-typings@12.0.1(commander@12.0.0)': - dependencies: - commander: 12.0.0 + '@commander-js/extra-typings@12.1.0(commander@12.1.0)': + dependencies: + commander: 12.1.0 + + '@cspotcode/source-map-support@0.8.1': + dependencies: + '@jridgewell/trace-mapping': 0.3.9 + + '@envelop/core@5.0.2': + dependencies: + '@envelop/types': 5.0.0 + tslib: 2.6.2 + + '@envelop/types@5.0.0': + dependencies: + tslib: 2.7.0 + + '@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 + + '@esbuild/aix-ppc64@0.23.1': + optional: true + + '@esbuild/android-arm64@0.16.17': + 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 + + '@esbuild/android-arm64@0.23.1': + optional: true + + '@esbuild/android-arm@0.16.17': + 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-x64@0.16.17': + optional: true + + '@esbuild/android-x64@0.18.20': + optional: true + + '@esbuild/android-x64@0.19.12': + optional: true + + '@esbuild/android-x64@0.21.5': + optional: true + + '@esbuild/android-x64@0.23.1': + optional: true + + '@esbuild/darwin-arm64@0.16.17': + 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 + + '@esbuild/darwin-arm64@0.23.1': + optional: true + + '@esbuild/darwin-x64@0.16.17': + 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 + + '@esbuild/darwin-x64@0.23.1': + optional: true + + '@esbuild/freebsd-arm64@0.16.17': + 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 + + '@esbuild/freebsd-arm64@0.23.1': + optional: true + + '@esbuild/freebsd-x64@0.16.17': + 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 + + '@esbuild/freebsd-x64@0.23.1': + optional: true + + '@esbuild/linux-arm64@0.16.17': + 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 + + '@esbuild/linux-arm64@0.23.1': + optional: true + + '@esbuild/linux-arm@0.16.17': + 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 + + '@esbuild/linux-arm@0.23.1': + optional: true + + '@esbuild/linux-ia32@0.16.17': + 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 + + '@esbuild/linux-ia32@0.23.1': + optional: true + + '@esbuild/linux-loong64@0.16.17': + 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 + + '@esbuild/linux-loong64@0.23.1': + optional: true + + '@esbuild/linux-mips64el@0.16.17': + optional: true + + '@esbuild/linux-mips64el@0.18.20': + optional: true - '@cspotcode/source-map-support@0.8.1': - dependencies: - '@jridgewell/trace-mapping': 0.3.9 + '@esbuild/linux-mips64el@0.19.12': + optional: true - '@envelop/core@5.0.2': - dependencies: - '@envelop/types': 5.0.0 - tslib: 2.6.2 + '@esbuild/linux-mips64el@0.21.5': + optional: true - '@envelop/types@5.0.0': - dependencies: - tslib: 2.6.2 + '@esbuild/linux-mips64el@0.23.1': + optional: true - '@esbuild/aix-ppc64@0.19.11': + '@esbuild/linux-ppc64@0.16.17': optional: true - '@esbuild/android-arm64@0.16.17': + '@esbuild/linux-ppc64@0.18.20': optional: true - '@esbuild/android-arm64@0.19.11': + '@esbuild/linux-ppc64@0.19.12': optional: true - '@esbuild/android-arm@0.16.17': + '@esbuild/linux-ppc64@0.21.5': optional: true - '@esbuild/android-arm@0.19.11': + '@esbuild/linux-ppc64@0.23.1': optional: true - '@esbuild/android-x64@0.16.17': + '@esbuild/linux-riscv64@0.16.17': optional: true - '@esbuild/android-x64@0.19.11': + '@esbuild/linux-riscv64@0.18.20': optional: true - '@esbuild/darwin-arm64@0.16.17': + '@esbuild/linux-riscv64@0.19.12': optional: true - '@esbuild/darwin-arm64@0.19.11': + '@esbuild/linux-riscv64@0.21.5': optional: true - '@esbuild/darwin-x64@0.16.17': + '@esbuild/linux-riscv64@0.23.1': optional: true - '@esbuild/darwin-x64@0.19.11': + '@esbuild/linux-s390x@0.16.17': optional: true - '@esbuild/freebsd-arm64@0.16.17': + '@esbuild/linux-s390x@0.18.20': optional: true - '@esbuild/freebsd-arm64@0.19.11': + '@esbuild/linux-s390x@0.19.12': optional: true - '@esbuild/freebsd-x64@0.16.17': + '@esbuild/linux-s390x@0.21.5': optional: true - '@esbuild/freebsd-x64@0.19.11': + '@esbuild/linux-s390x@0.23.1': optional: true - '@esbuild/linux-arm64@0.16.17': + '@esbuild/linux-x64@0.16.17': optional: true - '@esbuild/linux-arm64@0.19.11': + '@esbuild/linux-x64@0.18.20': optional: true - '@esbuild/linux-arm@0.16.17': + '@esbuild/linux-x64@0.19.12': optional: true - '@esbuild/linux-arm@0.19.11': + '@esbuild/linux-x64@0.21.5': optional: true - '@esbuild/linux-ia32@0.16.17': + '@esbuild/linux-x64@0.23.1': optional: true - '@esbuild/linux-ia32@0.19.11': + '@esbuild/netbsd-x64@0.16.17': optional: true - '@esbuild/linux-loong64@0.16.17': + '@esbuild/netbsd-x64@0.18.20': optional: true - '@esbuild/linux-loong64@0.19.11': + '@esbuild/netbsd-x64@0.19.12': optional: true - '@esbuild/linux-mips64el@0.16.17': + '@esbuild/netbsd-x64@0.21.5': optional: true - '@esbuild/linux-mips64el@0.19.11': + '@esbuild/netbsd-x64@0.23.1': optional: true - '@esbuild/linux-ppc64@0.16.17': + '@esbuild/openbsd-arm64@0.23.1': optional: true - '@esbuild/linux-ppc64@0.19.11': + '@esbuild/openbsd-x64@0.16.17': optional: true - '@esbuild/linux-riscv64@0.16.17': + '@esbuild/openbsd-x64@0.18.20': optional: true - '@esbuild/linux-riscv64@0.19.11': + '@esbuild/openbsd-x64@0.19.12': optional: true - '@esbuild/linux-s390x@0.16.17': + '@esbuild/openbsd-x64@0.21.5': optional: true - '@esbuild/linux-s390x@0.19.11': + '@esbuild/openbsd-x64@0.23.1': optional: true - '@esbuild/linux-x64@0.16.17': + '@esbuild/sunos-x64@0.16.17': optional: true - '@esbuild/linux-x64@0.19.11': + '@esbuild/sunos-x64@0.18.20': optional: true - '@esbuild/netbsd-x64@0.16.17': + '@esbuild/sunos-x64@0.19.12': optional: true - '@esbuild/netbsd-x64@0.19.11': + '@esbuild/sunos-x64@0.21.5': optional: true - '@esbuild/openbsd-x64@0.16.17': + '@esbuild/sunos-x64@0.23.1': optional: true - '@esbuild/openbsd-x64@0.19.11': + '@esbuild/win32-arm64@0.16.17': optional: true - '@esbuild/sunos-x64@0.16.17': + '@esbuild/win32-arm64@0.18.20': optional: true - '@esbuild/sunos-x64@0.19.11': + '@esbuild/win32-arm64@0.19.12': optional: true - '@esbuild/win32-arm64@0.16.17': + '@esbuild/win32-arm64@0.21.5': optional: true - '@esbuild/win32-arm64@0.19.11': + '@esbuild/win32-arm64@0.23.1': optional: true '@esbuild/win32-ia32@0.16.17': optional: true - '@esbuild/win32-ia32@0.19.11': + '@esbuild/win32-ia32@0.18.20': + optional: true + + '@esbuild/win32-ia32@0.19.12': + optional: true + + '@esbuild/win32-ia32@0.21.5': + optional: true + + '@esbuild/win32-ia32@0.23.1': optional: true '@esbuild/win32-x64@0.16.17': optional: true - '@esbuild/win32-x64@0.19.11': + '@esbuild/win32-x64@0.18.20': + optional: true + + '@esbuild/win32-x64@0.19.12': + optional: true + + '@esbuild/win32-x64@0.21.5': + optional: true + + '@esbuild/win32-x64@0.23.1': optional: true - '@escape.tech/graphql-armor-max-aliases@2.4.0': + '@escape.tech/graphql-armor-max-aliases@2.5.0': dependencies: - graphql: 16.8.2 + graphql: 16.9.0 optionalDependencies: '@envelop/core': 5.0.2 '@escape.tech/graphql-armor-types': 0.6.0 '@escape.tech/graphql-armor-max-depth@2.3.0': dependencies: - graphql: 16.8.2 + graphql: 16.9.0 optionalDependencies: '@envelop/core': 5.0.2 '@escape.tech/graphql-armor-types': 0.6.0 '@escape.tech/graphql-armor-max-tokens@2.4.0': dependencies: - graphql: 16.8.2 + graphql: 16.9.0 optionalDependencies: '@envelop/core': 5.0.2 '@escape.tech/graphql-armor-types': 0.6.0 '@escape.tech/graphql-armor-types@0.6.0': dependencies: - graphql: 16.8.2 + graphql: 16.9.0 optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.56.0)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': dependencies: - eslint: 8.56.0 + eslint: 8.57.1 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.10.0': {} + '@eslint-community/regexpp@4.11.1': {} '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.0 + ignore: 5.3.2 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -9470,7 +10286,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.56.0': {} + '@eslint/js@8.57.1': {} '@ethersproject/abi@5.0.7': dependencies: @@ -9598,22 +10414,22 @@ snapshots: '@float-capital/float-subgraph-uncrashable@0.0.0-internal-testing.5': dependencies: '@rescript/std': 9.0.0 - graphql: 16.8.2 - graphql-import-node: 0.0.5(graphql@16.8.2) + graphql: 16.9.0 + graphql-import-node: 0.0.5(graphql@16.9.0) js-yaml: 4.1.0 - '@graphprotocol/graph-cli@0.61.0(@types/node@20.11.24)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.3.3)': + '@graphprotocol/graph-cli@0.61.0(@types/node@20.16.5)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.6.2)': dependencies: '@float-capital/float-subgraph-uncrashable': 0.0.0-internal-testing.5 - '@oclif/core': 2.8.6(@types/node@20.11.24)(typescript@5.3.3) - '@oclif/plugin-autocomplete': 2.3.10(@types/node@20.11.24)(typescript@5.3.3) - '@oclif/plugin-not-found': 2.4.3(@types/node@20.11.24)(typescript@5.3.3) + '@oclif/core': 2.8.6(@types/node@20.16.5)(typescript@5.6.2) + '@oclif/plugin-autocomplete': 2.3.10(@types/node@20.16.5)(typescript@5.6.2) + '@oclif/plugin-not-found': 2.4.3(@types/node@20.16.5)(typescript@5.6.2) '@whatwg-node/fetch': 0.8.8 assemblyscript: 0.19.23 binary-install-raw: 0.0.13(debug@4.3.4) chalk: 3.0.0 chokidar: 3.5.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 docker-compose: 0.23.19 dockerode: 2.5.8 fs-extra: 9.1.0 @@ -9647,83 +10463,83 @@ snapshots: dependencies: assemblyscript: 0.19.10 - '@graphql-tools/executor@1.2.6(graphql@16.8.2)': + '@graphql-tools/executor@1.3.1(graphql@16.9.0)': dependencies: - '@graphql-tools/utils': 10.2.0(graphql@16.8.2) - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.2) - '@repeaterjs/repeater': 3.0.5 - graphql: 16.8.2 + '@graphql-tools/utils': 10.5.4(graphql@16.9.0) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) + '@repeaterjs/repeater': 3.0.6 + graphql: 16.9.0 tslib: 2.6.2 value-or-promise: 1.0.12 - '@graphql-tools/merge@9.0.4(graphql@16.8.2)': + '@graphql-tools/merge@9.0.7(graphql@16.9.0)': dependencies: - '@graphql-tools/utils': 10.2.0(graphql@16.8.2) - graphql: 16.8.2 - tslib: 2.6.2 + '@graphql-tools/utils': 10.5.4(graphql@16.9.0) + graphql: 16.9.0 + tslib: 2.7.0 - '@graphql-tools/schema@10.0.3(graphql@16.8.2)': + '@graphql-tools/schema@10.0.6(graphql@16.9.0)': dependencies: - '@graphql-tools/merge': 9.0.4(graphql@16.8.2) - '@graphql-tools/utils': 10.2.0(graphql@16.8.2) - graphql: 16.8.2 + '@graphql-tools/merge': 9.0.7(graphql@16.9.0) + '@graphql-tools/utils': 10.5.4(graphql@16.9.0) + graphql: 16.9.0 tslib: 2.6.2 value-or-promise: 1.0.12 - '@graphql-tools/utils@10.2.0(graphql@16.8.2)': + '@graphql-tools/utils@10.5.4(graphql@16.9.0)': dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.2) - cross-inspect: 1.0.0 + '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) + cross-inspect: 1.0.1 dset: 3.1.3 - graphql: 16.8.2 + graphql: 16.9.0 tslib: 2.6.2 - '@graphql-typed-document-node/core@3.2.0(graphql@16.8.2)': + '@graphql-typed-document-node/core@3.2.0(graphql@16.9.0)': dependencies: - graphql: 16.8.2 + graphql: 16.9.0 '@graphql-yoga/logger@2.0.0': dependencies: tslib: 2.6.2 - '@graphql-yoga/subscription@5.0.0': + '@graphql-yoga/subscription@5.0.1': dependencies: '@graphql-yoga/typed-event-target': 3.0.0 - '@repeaterjs/repeater': 3.0.5 - '@whatwg-node/events': 0.1.1 + '@repeaterjs/repeater': 3.0.6 + '@whatwg-node/events': 0.1.2 tslib: 2.6.2 '@graphql-yoga/typed-event-target@3.0.0': dependencies: - '@repeaterjs/repeater': 3.0.5 - tslib: 2.6.2 + '@repeaterjs/repeater': 3.0.6 + tslib: 2.7.0 - '@headlessui/react@1.7.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': + '@headlessui/react@1.7.17(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': dependencies: client-only: 0.0.1 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) - '@hono/node-server@1.12.2(hono@4.5.0)': + '@hono/node-server@1.13.0(hono@4.6.2)': dependencies: - hono: 4.5.0 + hono: 4.6.2 - '@hono/trpc-server@0.3.2(@trpc/server@10.45.2)(hono@4.5.0)': + '@hono/trpc-server@0.3.2(@trpc/server@10.45.2)(hono@4.6.2)': dependencies: '@trpc/server': 10.45.2 - hono: 4.5.0 + hono: 4.6.2 - '@humanwhocodes/config-array@0.11.13': + '@humanwhocodes/config-array@0.13.0': dependencies: - '@humanwhocodes/object-schema': 2.0.1 - debug: 4.3.4(supports-color@8.1.1) + '@humanwhocodes/object-schema': 2.0.3 + debug: 4.3.7(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.1': {} + '@humanwhocodes/object-schema@2.0.3': {} '@ipld/dag-cbor@7.0.3': dependencies: @@ -9760,10 +10576,14 @@ snapshots: '@jridgewell/resolve-uri@3.1.1': {} + '@jridgewell/resolve-uri@3.1.2': {} + '@jridgewell/set-array@1.1.2': {} '@jridgewell/sourcemap-codec@1.4.15': {} + '@jridgewell/sourcemap-codec@1.5.0': {} + '@jridgewell/trace-mapping@0.3.20': dependencies: '@jridgewell/resolve-uri': 3.1.1 @@ -9771,8 +10591,8 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: - '@jridgewell/resolve-uri': 3.1.1 - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/resolve-uri': 3.1.2 + '@jridgewell/sourcemap-codec': 1.5.0 '@kamilkisiela/fast-url-parser@1.1.4': {} @@ -9820,17 +10640,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.3.0(react@18.2.0)': + '@mdx-js/react@2.3.0(react@18.3.1)': dependencies: '@types/mdx': 2.0.10 - '@types/react': 18.2.46 - react: 18.2.0 + '@types/react': 18.3.8 + react: 18.3.1 - '@mdx-js/react@3.0.0(@types/react@18.2.46)(react@18.2.0)': + '@mdx-js/react@3.0.1(@types/react@18.3.8)(react@18.3.1)': dependencies: '@types/mdx': 2.0.10 - '@types/react': 18.2.46 - react: 18.2.0 + '@types/react': 18.3.8 + react: 18.3.1 '@napi-rs/simple-git-android-arm-eabi@0.1.9': optional: true @@ -9881,37 +10701,70 @@ snapshots: '@next/env@14.0.3': {} + '@next/env@14.2.13': {} + '@next/eslint-plugin-next@14.0.3': dependencies: glob: 7.1.7 + '@next/eslint-plugin-next@14.2.13': + dependencies: + glob: 10.3.10 + '@next/swc-darwin-arm64@14.0.3': optional: true + '@next/swc-darwin-arm64@14.2.13': + optional: true + '@next/swc-darwin-x64@14.0.3': optional: true + '@next/swc-darwin-x64@14.2.13': + optional: true + '@next/swc-linux-arm64-gnu@14.0.3': optional: true + '@next/swc-linux-arm64-gnu@14.2.13': + optional: true + '@next/swc-linux-arm64-musl@14.0.3': optional: true + '@next/swc-linux-arm64-musl@14.2.13': + optional: true + '@next/swc-linux-x64-gnu@14.0.3': optional: true + '@next/swc-linux-x64-gnu@14.2.13': + optional: true + '@next/swc-linux-x64-musl@14.0.3': optional: true + '@next/swc-linux-x64-musl@14.2.13': + optional: true + '@next/swc-win32-arm64-msvc@14.0.3': optional: true + '@next/swc-win32-arm64-msvc@14.2.13': + optional: true + '@next/swc-win32-ia32-msvc@14.0.3': optional: true + '@next/swc-win32-ia32-msvc@14.2.13': + optional: true + '@next/swc-win32-x64-msvc@14.0.3': optional: true + '@next/swc-win32-x64-msvc@14.2.13': + optional: true + '@noble/curves@1.2.0': dependencies: '@noble/hashes': 1.3.2 @@ -9922,8 +10775,6 @@ snapshots: '@noble/hashes@1.3.2': {} - '@noble/hashes@1.3.3': {} - '@noble/hashes@1.4.0': {} '@noble/hashes@1.5.0': {} @@ -9938,19 +10789,19 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.16.0 + fastq: 1.17.1 - '@oclif/core@2.15.0(@types/node@20.11.24)(typescript@5.3.3)': + '@oclif/core@2.16.0(@types/node@20.16.5)(typescript@5.6.2)': dependencies: - '@types/cli-progress': 3.11.5 + '@types/cli-progress': 3.11.6 ansi-escapes: 4.3.2 ansi-styles: 4.3.0 cardinal: 2.1.1 chalk: 4.1.2 clean-stack: 3.0.1 cli-progress: 3.12.0 - debug: 4.3.4(supports-color@8.1.1) - ejs: 3.1.9 + debug: 4.3.7(supports-color@8.1.1) + ejs: 3.1.10 get-package-type: 0.1.0 globby: 11.1.0 hyperlinker: 1.0.0 @@ -9965,8 +10816,8 @@ snapshots: strip-ansi: 6.0.1 supports-color: 8.1.1 supports-hyperlinks: 2.3.0 - ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) - tslib: 2.6.2 + ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) + tslib: 2.7.0 widest-line: 3.1.0 wordwrap: 1.0.0 wrap-ansi: 7.0.0 @@ -9976,17 +10827,17 @@ snapshots: - '@types/node' - typescript - '@oclif/core@2.8.6(@types/node@20.11.24)(typescript@5.3.3)': + '@oclif/core@2.8.6(@types/node@20.16.5)(typescript@5.6.2)': dependencies: - '@types/cli-progress': 3.11.5 + '@types/cli-progress': 3.11.6 ansi-escapes: 4.3.2 ansi-styles: 4.3.0 cardinal: 2.1.1 chalk: 4.1.2 clean-stack: 3.0.1 cli-progress: 3.12.0 - debug: 4.3.4(supports-color@8.1.1) - ejs: 3.1.9 + debug: 4.3.7(supports-color@8.1.1) + ejs: 3.1.10 fs-extra: 9.1.0 get-package-type: 0.1.0 globby: 11.1.0 @@ -9997,13 +10848,13 @@ snapshots: natural-orderby: 2.0.3 object-treeify: 1.1.33 password-prompt: 1.1.3 - semver: 7.6.2 + semver: 7.6.3 string-width: 4.2.3 strip-ansi: 6.0.1 supports-color: 8.1.1 supports-hyperlinks: 2.3.0 - ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) - tslib: 2.6.2 + ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) + tslib: 2.7.0 widest-line: 3.1.0 wordwrap: 1.0.0 wrap-ansi: 7.0.0 @@ -10013,11 +10864,11 @@ snapshots: - '@types/node' - typescript - '@oclif/plugin-autocomplete@2.3.10(@types/node@20.11.24)(typescript@5.3.3)': + '@oclif/plugin-autocomplete@2.3.10(@types/node@20.16.5)(typescript@5.6.2)': dependencies: - '@oclif/core': 2.15.0(@types/node@20.11.24)(typescript@5.3.3) + '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.6.2) chalk: 4.1.2 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10025,9 +10876,9 @@ snapshots: - supports-color - typescript - '@oclif/plugin-not-found@2.4.3(@types/node@20.11.24)(typescript@5.3.3)': + '@oclif/plugin-not-found@2.4.3(@types/node@20.16.5)(typescript@5.6.2)': dependencies: - '@oclif/core': 2.15.0(@types/node@20.11.24)(typescript@5.3.3) + '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.6.2) chalk: 4.1.2 fast-levenshtein: 3.0.0 transitivePeerDependencies: @@ -10038,23 +10889,23 @@ snapshots: '@opentelemetry/api@1.7.0': {} - '@peculiar/asn1-schema@2.3.8': + '@peculiar/asn1-schema@2.3.13': dependencies: asn1js: 3.0.5 pvtsutils: 1.3.5 - tslib: 2.6.2 + tslib: 2.7.0 '@peculiar/json-schema@1.1.12': dependencies: - tslib: 2.6.2 + tslib: 2.7.0 - '@peculiar/webcrypto@1.4.3': + '@peculiar/webcrypto@1.5.0': dependencies: - '@peculiar/asn1-schema': 2.3.8 + '@peculiar/asn1-schema': 2.3.13 '@peculiar/json-schema': 1.1.12 pvtsutils: 1.3.5 - tslib: 2.6.2 - webcrypto-core: 1.7.7 + tslib: 2.7.0 + webcrypto-core: 1.8.0 '@pkgjs/parseargs@0.11.0': optional: true @@ -10084,113 +10935,123 @@ snapshots: '@protobufjs/utf8@1.1.0': {} - '@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.46)(react@18.2.0)': + '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.8)(react@18.3.1)': dependencies: - '@babel/runtime': 7.23.7 - react: 18.2.0 + react: 18.3.1 optionalDependencies: - '@types/react': 18.2.46 + '@types/react': 18.3.8 - '@radix-ui/react-slot@1.0.2(@types/react@18.2.46)(react@18.2.0)': + '@radix-ui/react-slot@1.1.0(@types/react@18.3.8)(react@18.3.1)': dependencies: - '@babel/runtime': 7.23.7 - '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.46)(react@18.2.0) - react: 18.2.0 + '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.8)(react@18.3.1) + react: 18.3.1 optionalDependencies: - '@types/react': 18.2.46 + '@types/react': 18.3.8 - '@repeaterjs/repeater@3.0.5': {} + '@repeaterjs/repeater@3.0.6': {} '@rescript/std@9.0.0': {} - '@rollup/rollup-android-arm-eabi@4.9.2': + '@rollup/rollup-android-arm-eabi@4.22.2': optional: true - '@rollup/rollup-android-arm64@4.9.2': + '@rollup/rollup-android-arm64@4.22.2': optional: true - '@rollup/rollup-darwin-arm64@4.9.2': + '@rollup/rollup-darwin-arm64@4.22.2': optional: true - '@rollup/rollup-darwin-x64@4.9.2': + '@rollup/rollup-darwin-x64@4.22.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.9.2': + '@rollup/rollup-linux-arm-gnueabihf@4.22.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.9.2': + '@rollup/rollup-linux-arm-musleabihf@4.22.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.9.2': + '@rollup/rollup-linux-arm64-gnu@4.22.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.9.2': + '@rollup/rollup-linux-arm64-musl@4.22.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.9.2': + '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': optional: true - '@rollup/rollup-linux-x64-musl@4.9.2': + '@rollup/rollup-linux-riscv64-gnu@4.22.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.9.2': + '@rollup/rollup-linux-s390x-gnu@4.22.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.9.2': + '@rollup/rollup-linux-x64-gnu@4.22.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.9.2': + '@rollup/rollup-linux-x64-musl@4.22.2': optional: true - '@rushstack/eslint-patch@1.6.1': {} + '@rollup/rollup-win32-arm64-msvc@4.22.2': + optional: true + + '@rollup/rollup-win32-ia32-msvc@4.22.2': + optional: true - '@scure/base@1.1.5': {} + '@rollup/rollup-win32-x64-msvc@4.22.2': + optional: true + + '@rushstack/eslint-patch@1.6.1': {} - '@scure/base@1.1.8': {} + '@scure/base@1.1.9': {} '@scure/bip32@1.3.2': dependencies: '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.3 - '@scure/base': 1.1.5 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.9 '@scure/bip32@1.4.0': dependencies: '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.9 '@scure/bip39@1.2.1': dependencies: - '@noble/hashes': 1.3.3 - '@scure/base': 1.1.5 + '@noble/hashes': 1.3.2 + '@scure/base': 1.1.9 '@scure/bip39@1.4.0': dependencies: '@noble/hashes': 1.5.0 - '@scure/base': 1.1.8 + '@scure/base': 1.1.9 - '@segment/analytics-core@1.3.2': + '@segment/analytics-core@1.4.1': dependencies: '@lukeed/uuid': 2.0.1 - dset: 3.1.3 - tslib: 2.6.2 + '@segment/analytics-generic-utils': 1.1.1 + dset: 3.1.4 + tslib: 2.7.0 - '@segment/analytics-generic-utils@1.0.0': {} + '@segment/analytics-generic-utils@1.1.1': + dependencies: + tslib: 2.7.0 - '@segment/analytics-node@1.1.3(encoding@0.1.13)': + '@segment/analytics-node@1.3.0(encoding@0.1.13)': dependencies: '@lukeed/uuid': 2.0.1 - '@segment/analytics-core': 1.3.2 - '@segment/analytics-generic-utils': 1.0.0 + '@segment/analytics-core': 1.4.1 + '@segment/analytics-generic-utils': 1.1.1 buffer: 6.0.3 node-fetch: 2.7.0(encoding@0.1.13) - tslib: 2.6.2 + tslib: 2.7.0 transitivePeerDependencies: - encoding '@sinclair/typebox@0.27.8': {} + '@sindresorhus/merge-streams@2.3.0': {} + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 @@ -10235,12 +11096,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.23.7) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.23.7) - '@svgr/core@8.1.0(typescript@5.3.3)': + '@svgr/core@8.1.0(typescript@5.6.2)': dependencies: '@babel/core': 7.23.7 '@svgr/babel-preset': 8.1.0(@babel/core@7.23.7) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.3.3) + cosmiconfig: 8.3.6(typescript@5.6.2) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -10251,54 +11112,61 @@ snapshots: '@babel/types': 7.23.6 entities: 4.5.0 - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.3.3))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.6.2))': dependencies: '@babel/core': 7.23.7 '@svgr/babel-preset': 8.1.0(@babel/core@7.23.7) - '@svgr/core': 8.1.0(typescript@5.3.3) + '@svgr/core': 8.1.0(typescript@5.6.2) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.3.3))(typescript@5.3.3)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.6.2))(typescript@5.6.2)': dependencies: - '@svgr/core': 8.1.0(typescript@5.3.3) - cosmiconfig: 8.3.6(typescript@5.3.3) + '@svgr/core': 8.1.0(typescript@5.6.2) + cosmiconfig: 8.3.6(typescript@5.6.2) deepmerge: 4.3.1 svgo: 3.2.0 transitivePeerDependencies: - typescript - '@svgr/webpack@8.1.0(typescript@5.3.3)': + '@svgr/webpack@8.1.0(typescript@5.6.2)': dependencies: '@babel/core': 7.23.7 '@babel/plugin-transform-react-constant-elements': 7.23.3(@babel/core@7.23.7) '@babel/preset-env': 7.23.7(@babel/core@7.23.7) '@babel/preset-react': 7.23.3(@babel/core@7.23.7) '@babel/preset-typescript': 7.23.3(@babel/core@7.23.7) - '@svgr/core': 8.1.0(typescript@5.3.3) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.3.3)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.3.3))(typescript@5.3.3) + '@svgr/core': 8.1.0(typescript@5.6.2) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.6.2)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.6.2))(typescript@5.6.2) transitivePeerDependencies: - supports-color - typescript + '@swc/counter@0.1.3': {} + '@swc/helpers@0.5.2': dependencies: - tslib: 2.6.2 + tslib: 2.7.0 - '@tanstack/query-core@5.12.1': {} + '@swc/helpers@0.5.5': + dependencies: + '@swc/counter': 0.1.3 + tslib: 2.7.0 + + '@tanstack/query-core@5.56.2': {} - '@tanstack/react-query@5.12.2(react@18.2.0)': + '@tanstack/react-query@5.56.2(react@18.3.1)': dependencies: - '@tanstack/query-core': 5.12.1 - react: 18.2.0 + '@tanstack/query-core': 5.56.2 + react: 18.3.1 - '@theguild/remark-mermaid@0.0.5(react@18.2.0)': + '@theguild/remark-mermaid@0.0.5(react@18.3.1)': dependencies: mermaid: 10.6.1 - react: 18.2.0 + react: 18.3.1 unist-util-visit: 5.0.0 transitivePeerDependencies: - supports-color @@ -10316,7 +11184,7 @@ snapshots: '@trysound/sax@0.2.0': {} - '@tsconfig/node10@1.0.9': {} + '@tsconfig/node10@1.0.11': {} '@tsconfig/node12@1.0.11': {} @@ -10326,29 +11194,29 @@ snapshots: '@types/acorn@4.0.6': dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/babel__code-frame@7.0.6': {} - '@types/better-sqlite3@7.6.10': + '@types/better-sqlite3@7.6.11': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 - '@types/bn.js@5.1.5': + '@types/bn.js@5.1.6': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 - '@types/cli-progress@3.11.5': + '@types/cli-progress@3.11.6': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/concat-stream@1.6.1': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/connect@3.4.38': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/d3-scale-chromatic@3.0.3': {} @@ -10368,19 +11236,21 @@ snapshots: '@types/estree@1.0.5': {} + '@types/estree@1.0.6': {} + '@types/form-data@0.0.33': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/glob@8.1.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/hast@2.3.10': dependencies: @@ -10394,7 +11264,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/katex@0.16.7': {} @@ -10414,58 +11284,51 @@ snapshots: '@types/minimatch@5.1.2': {} - '@types/minimist@1.2.5': {} - '@types/ms@0.7.34': {} '@types/node@10.17.60': {} '@types/node@12.20.55': {} - '@types/node@20.11.24': + '@types/node@20.16.5': dependencies: - undici-types: 5.26.5 + undici-types: 6.19.8 '@types/node@8.10.66': {} - '@types/normalize-package-data@2.4.4': {} - '@types/parse-json@4.0.2': {} '@types/pbkdf2@3.1.2': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 - '@types/pg@8.10.9': + '@types/pg@8.11.10': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 pg-protocol: 1.6.0 pg-types: 4.0.1 '@types/prompts@2.4.9': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 kleur: 3.0.3 '@types/prop-types@15.7.11': {} - '@types/qs@6.9.11': {} + '@types/qs@6.9.16': {} - '@types/react-dom@18.2.17': + '@types/react-dom@18.3.0': dependencies: - '@types/react': 18.2.46 + '@types/react': 18.3.8 - '@types/react@18.2.46': + '@types/react@18.3.8': dependencies: '@types/prop-types': 15.7.11 - '@types/scheduler': 0.16.8 csstype: 3.1.3 - '@types/scheduler@0.16.8': {} - '@types/secp256k1@4.0.6': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 '@types/semver@7.5.6': {} @@ -10477,18 +11340,36 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 + + '@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)': + dependencies: + '@eslint-community/regexpp': 4.11.1 + '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/type-utils': 8.6.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/visitor-keys': 8.6.0 + eslint: 8.57.1 + graphemer: 1.4.0 + ignore: 5.3.2 + natural-compare: 1.4.0 + ts-api-utils: 1.3.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color - '@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3)': + '@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2)': dependencies: '@typescript-eslint/scope-manager': 6.17.0 '@typescript-eslint/types': 6.17.0 - '@typescript-eslint/typescript-estree': 6.17.0(typescript@5.3.3) + '@typescript-eslint/typescript-estree': 6.17.0(typescript@5.6.2) '@typescript-eslint/visitor-keys': 6.17.0 - debug: 4.3.4(supports-color@8.1.1) - eslint: 8.56.0 + debug: 4.3.7(supports-color@8.1.1) + eslint: 8.57.1 optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 transitivePeerDependencies: - supports-color @@ -10497,28 +11378,78 @@ snapshots: '@typescript-eslint/types': 6.17.0 '@typescript-eslint/visitor-keys': 6.17.0 + '@typescript-eslint/scope-manager@8.6.0': + dependencies: + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/visitor-keys': 8.6.0 + + '@typescript-eslint/type-utils@8.6.0(eslint@8.57.1)(typescript@5.6.2)': + dependencies: + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) + '@typescript-eslint/utils': 8.6.0(eslint@8.57.1)(typescript@5.6.2) + debug: 4.3.7(supports-color@8.1.1) + ts-api-utils: 1.3.0(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - eslint + - supports-color + '@typescript-eslint/types@6.17.0': {} - '@typescript-eslint/typescript-estree@6.17.0(typescript@5.3.3)': + '@typescript-eslint/types@8.6.0': {} + + '@typescript-eslint/typescript-estree@6.17.0(typescript@5.6.2)': dependencies: '@typescript-eslint/types': 6.17.0 '@typescript-eslint/visitor-keys': 6.17.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.2 - ts-api-utils: 1.0.3(typescript@5.3.3) + semver: 7.6.3 + ts-api-utils: 1.0.3(typescript@5.6.2) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/typescript-estree@8.6.0(typescript@5.6.2)': + dependencies: + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/visitor-keys': 8.6.0 + debug: 4.3.7(supports-color@8.1.1) + fast-glob: 3.3.2 + is-glob: 4.0.3 + minimatch: 9.0.5 + semver: 7.6.3 + ts-api-utils: 1.3.0(typescript@5.6.2) optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 + transitivePeerDependencies: + - supports-color + + '@typescript-eslint/utils@8.6.0(eslint@8.57.1)(typescript@5.6.2)': + dependencies: + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@typescript-eslint/scope-manager': 8.6.0 + '@typescript-eslint/types': 8.6.0 + '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) + eslint: 8.57.1 transitivePeerDependencies: - supports-color + - typescript '@typescript-eslint/visitor-keys@6.17.0': dependencies: '@typescript-eslint/types': 6.17.0 eslint-visitor-keys: 3.4.3 + '@typescript-eslint/visitor-keys@8.6.0': + dependencies: + '@typescript-eslint/types': 8.6.0 + eslint-visitor-keys: 3.4.3 + '@ungap/structured-clone@1.2.0': {} '@viem/anvil@0.0.6': @@ -10526,51 +11457,52 @@ snapshots: execa: 7.2.0 get-port: 6.1.2 http-proxy: 1.18.1 - ws: 8.16.0 + ws: 8.18.0 transitivePeerDependencies: - bufferutil - debug - utf-8-validate - '@vitest/expect@1.0.2': + '@vitest/expect@1.6.0': dependencies: - '@vitest/spy': 1.0.2 - '@vitest/utils': 1.0.2 - chai: 4.3.10 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + chai: 4.5.0 - '@vitest/runner@1.0.2': + '@vitest/runner@1.6.0': dependencies: - '@vitest/utils': 1.0.2 + '@vitest/utils': 1.6.0 p-limit: 5.0.0 - pathe: 1.1.1 + pathe: 1.1.2 - '@vitest/snapshot@1.0.2': + '@vitest/snapshot@1.6.0': dependencies: - magic-string: 0.30.5 - pathe: 1.1.1 + magic-string: 0.30.11 + pathe: 1.1.2 pretty-format: 29.7.0 - '@vitest/spy@1.0.2': + '@vitest/spy@1.6.0': dependencies: - tinyspy: 2.2.0 + tinyspy: 2.2.1 - '@vitest/utils@1.0.2': + '@vitest/utils@1.6.0': dependencies: diff-sequences: 29.6.3 + estree-walker: 3.0.3 loupe: 2.3.7 pretty-format: 29.7.0 - '@wagmi/cli@1.5.2(typescript@5.3.3)': + '@wagmi/cli@1.5.2(typescript@5.6.2)': dependencies: - abitype: 0.8.7(typescript@5.3.3)(zod@3.23.8) + abitype: 0.8.7(typescript@5.6.2)(zod@3.23.8) abort-controller: 3.0.0 bundle-require: 3.1.2(esbuild@0.16.17) cac: 6.7.14 change-case: 4.1.2 - chokidar: 3.5.3 + chokidar: 3.6.0 dedent: 0.7.0 detect-package-manager: 2.0.1 - dotenv: 16.3.1 + dotenv: 16.4.5 dotenv-expand: 10.0.0 esbuild: 0.16.17 execa: 6.1.0 @@ -10579,32 +11511,34 @@ snapshots: globby: 13.2.2 node-fetch: 3.3.2 ora: 6.3.1 - pathe: 1.1.1 - picocolors: 1.0.0 + pathe: 1.1.2 + picocolors: 1.1.0 prettier: 2.8.8 - viem: 1.21.4(typescript@5.3.3)(zod@3.23.8) + viem: 1.21.4(typescript@5.6.2)(zod@3.23.8) zod: 3.23.8 optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 transitivePeerDependencies: - bufferutil - utf-8-validate '@whatwg-node/events@0.0.3': {} - '@whatwg-node/events@0.1.1': {} + '@whatwg-node/events@0.1.2': + dependencies: + tslib: 2.7.0 '@whatwg-node/fetch@0.8.8': dependencies: - '@peculiar/webcrypto': 1.4.3 + '@peculiar/webcrypto': 1.5.0 '@whatwg-node/node-fetch': 0.3.6 busboy: 1.6.0 urlpattern-polyfill: 8.0.2 - web-streams-polyfill: 3.2.1 + web-streams-polyfill: 3.3.3 - '@whatwg-node/fetch@0.9.17': + '@whatwg-node/fetch@0.9.21': dependencies: - '@whatwg-node/node-fetch': 0.5.11 + '@whatwg-node/node-fetch': 0.5.26 urlpattern-polyfill: 10.0.0 '@whatwg-node/node-fetch@0.3.6': @@ -10613,20 +11547,19 @@ snapshots: busboy: 1.6.0 fast-querystring: 1.1.2 fast-url-parser: 1.1.3 - tslib: 2.6.2 + tslib: 2.7.0 - '@whatwg-node/node-fetch@0.5.11': + '@whatwg-node/node-fetch@0.5.26': dependencies: '@kamilkisiela/fast-url-parser': 1.1.4 - '@whatwg-node/events': 0.1.1 busboy: 1.6.0 fast-querystring: 1.1.2 - tslib: 2.6.2 + tslib: 2.7.0 - '@whatwg-node/server@0.9.34': + '@whatwg-node/server@0.9.49': dependencies: - '@whatwg-node/fetch': 0.9.17 - tslib: 2.6.2 + '@whatwg-node/fetch': 0.9.21 + tslib: 2.7.0 JSONStream@1.3.2: dependencies: @@ -10638,57 +11571,54 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abitype@0.10.3(typescript@5.3.3)(zod@3.23.8): + abitype@0.10.3(typescript@5.6.2)(zod@3.23.8): optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 zod: 3.23.8 - abitype@0.8.7(typescript@5.3.3)(zod@3.23.8): + abitype@0.8.7(typescript@5.6.2)(zod@3.23.8): dependencies: - typescript: 5.3.3 + typescript: 5.6.2 optionalDependencies: zod: 3.23.8 - abitype@0.9.8(typescript@5.3.3)(zod@3.23.8): + abitype@0.9.8(typescript@5.6.2)(zod@3.23.8): optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 zod: 3.23.8 - abitype@1.0.1(typescript@5.3.3)(zod@3.23.8): + abitype@1.0.5(typescript@5.0.4)(zod@3.23.8): optionalDependencies: - typescript: 5.3.3 + typescript: 5.0.4 zod: 3.23.8 - abitype@1.0.5(typescript@5.0.4)(zod@3.23.8): + abitype@1.0.5(typescript@5.6.2)(zod@3.23.8): optionalDependencies: - typescript: 5.0.4 + typescript: 5.6.2 zod: 3.23.8 - abitype@1.0.5(typescript@5.3.3)(zod@3.23.8): + abitype@1.0.6(typescript@5.6.2)(zod@3.23.8): optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 zod: 3.23.8 abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 - acorn-jsx@5.3.2(acorn@8.11.3): + acorn-jsx@5.3.2(acorn@8.12.1): dependencies: - acorn: 8.11.3 - - acorn-walk@8.3.1: {} + acorn: 8.12.1 - acorn@8.11.3: {} - - aggregate-error@4.0.1: + acorn-walk@8.3.4: dependencies: - clean-stack: 4.2.0 - indent-string: 5.0.0 + acorn: 8.12.1 + + acorn@8.12.1: {} ajv-formats@2.1.1: dependencies: - ajv: 8.12.0 + ajv: 8.17.1 ajv@6.12.6: dependencies: @@ -10697,12 +11627,12 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ajv@8.12.0: + ajv@8.17.1: dependencies: fast-deep-equal: 3.1.3 + fast-uri: 3.0.1 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 - uri-js: 4.4.1 ansi-colors@4.1.3: {} @@ -10710,15 +11640,17 @@ snapshots: dependencies: type-fest: 0.21.3 - ansi-escapes@6.2.0: + ansi-escapes@6.2.1: {} + + ansi-escapes@7.0.0: dependencies: - type-fest: 3.13.1 + environment: 1.1.0 ansi-regex@4.1.1: {} ansi-regex@5.0.1: {} - ansi-regex@6.0.1: {} + ansi-regex@6.1.0: {} ansi-styles@3.2.1: dependencies: @@ -10829,8 +11761,6 @@ snapshots: is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 - arrify@1.0.1: {} - asap@2.0.6: {} asn1@0.2.6: @@ -10841,7 +11771,7 @@ snapshots: dependencies: pvtsutils: 1.3.5 pvutils: 1.1.3 - tslib: 2.6.2 + tslib: 2.7.0 assemblyscript@0.19.10: dependencies: @@ -10864,7 +11794,7 @@ snapshots: astring@1.8.6: {} - async@3.2.5: {} + async@3.2.6: {} asynciterator.prototype@1.0.0: dependencies: @@ -10876,40 +11806,40 @@ snapshots: atomic-sleep@1.0.0: {} - atomically@2.0.2: + atomically@2.0.3: dependencies: stubborn-fs: 1.2.5 - when-exit: 2.1.2 + when-exit: 2.1.3 auto-bind@5.0.1: {} - autoprefixer@10.4.16(postcss@8.4.32): + autoprefixer@10.4.20(postcss@8.4.47): dependencies: - browserslist: 4.22.2 - caniuse-lite: 1.0.30001572 + browserslist: 4.23.3 + caniuse-lite: 1.0.30001662 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.0.0 - postcss: 8.4.32 + picocolors: 1.1.0 + postcss: 8.4.47 postcss-value-parser: 4.2.0 available-typed-arrays@1.0.5: {} aws-sign2@0.7.0: {} - aws4@1.12.0: {} + aws4@1.13.2: {} axe-core@4.7.0: {} axios@0.21.4(debug@4.3.4): dependencies: - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.9(debug@4.3.4) transitivePeerDependencies: - debug - axios@1.6.8: + axios@1.7.7: dependencies: - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.9(debug@4.3.4) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -10947,7 +11877,7 @@ snapshots: balanced-match@1.0.2: {} - base-x@3.0.9: + base-x@3.0.10: dependencies: safe-buffer: 5.2.1 @@ -10961,23 +11891,23 @@ snapshots: dependencies: is-windows: 1.0.2 - better-react-mathjax@2.0.3(react@18.2.0): + better-react-mathjax@2.0.3(react@18.3.1): dependencies: mathjax-full: 3.2.2 - react: 18.2.0 + react: 18.3.1 - better-sqlite3@11.1.2: + better-sqlite3@11.3.0: dependencies: bindings: 1.5.0 prebuild-install: 7.1.2 - binary-extensions@2.2.0: {} + binary-extensions@2.3.0: {} binary-install-raw@0.0.13(debug@4.3.4): dependencies: axios: 0.21.4(debug@4.3.4) rimraf: 3.0.2 - tar: 6.2.0 + tar: 6.2.1 transitivePeerDependencies: - debug @@ -11037,9 +11967,9 @@ snapshots: dependencies: fill-range: 7.0.1 - breakword@1.0.6: + braces@3.0.3: dependencies: - wcwidth: 1.0.1 + fill-range: 7.1.1 brorand@1.1.0: {} @@ -11054,16 +11984,16 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 - browserslist@4.22.2: + browserslist@4.23.3: dependencies: - caniuse-lite: 1.0.30001572 - electron-to-chromium: 1.4.619 - node-releases: 2.0.14 - update-browserslist-db: 1.0.13(browserslist@4.22.2) + caniuse-lite: 1.0.30001662 + electron-to-chromium: 1.5.26 + node-releases: 2.0.18 + update-browserslist-db: 1.1.0(browserslist@4.23.3) bs58@4.0.1: dependencies: - base-x: 3.0.9 + base-x: 3.0.10 bs58check@2.1.2: dependencies: @@ -11082,8 +12012,6 @@ snapshots: buffer-from@1.1.2: {} - buffer-writer@2.0.0: {} - buffer-xor@1.0.3: {} buffer@5.7.1: @@ -11096,18 +12024,14 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 - builtins@5.0.1: - dependencies: - semver: 7.6.2 - bundle-require@3.1.2(esbuild@0.16.17): dependencies: esbuild: 0.16.17 load-tsconfig: 0.2.5 - bundle-require@4.0.2(esbuild@0.19.11): + bundle-require@5.0.0(esbuild@0.23.1): dependencies: - esbuild: 0.19.11 + esbuild: 0.23.1 load-tsconfig: 0.2.5 busboy@1.6.0: @@ -11122,31 +12046,31 @@ snapshots: get-intrinsic: 1.2.2 set-function-length: 1.1.1 + call-bind@1.0.7: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + set-function-length: 1.2.2 + callsites@3.1.0: {} camel-case@4.1.2: dependencies: pascal-case: 3.1.2 - tslib: 2.6.2 + tslib: 2.7.0 camelcase-css@2.0.1: {} - camelcase-keys@6.2.2: - dependencies: - camelcase: 5.3.1 - map-obj: 4.3.0 - quick-lru: 4.0.1 - - camelcase@5.3.1: {} - camelcase@6.3.0: {} - caniuse-lite@1.0.30001572: {} + caniuse-lite@1.0.30001662: {} capital-case@1.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 upper-case-first: 2.0.2 cardinal@2.1.1: @@ -11160,15 +12084,15 @@ snapshots: ccount@2.0.1: {} - chai@4.3.10: + chai@4.5.0: dependencies: assertion-error: 1.1.0 check-error: 1.0.3 - deep-eql: 4.1.3 + deep-eql: 4.1.4 get-func-name: 2.0.2 loupe: 2.3.7 pathval: 1.1.1 - type-detect: 4.0.8 + type-detect: 4.1.0 chalk@2.3.0: dependencies: @@ -11207,7 +12131,7 @@ snapshots: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 character-entities-html4@2.1.0: {} @@ -11226,7 +12150,19 @@ snapshots: chokidar@3.5.3: dependencies: anymatch: 3.1.3 - braces: 3.0.2 + braces: 3.0.3 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.3 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -11254,10 +12190,6 @@ snapshots: dependencies: escape-string-regexp: 4.0.0 - clean-stack@4.2.0: - dependencies: - escape-string-regexp: 5.0.0 - cli-boxes@3.0.0: {} cli-cursor@3.1.0: @@ -11268,6 +12200,10 @@ snapshots: dependencies: restore-cursor: 4.0.0 + cli-cursor@5.0.0: + dependencies: + restore-cursor: 5.1.0 + cli-progress@3.12.0: dependencies: string-width: 4.2.3 @@ -11289,7 +12225,7 @@ snapshots: cli-truncate@4.0.0: dependencies: slice-ansi: 5.0.0 - string-width: 7.0.0 + string-width: 7.2.0 client-only@0.0.1: {} @@ -11298,23 +12234,11 @@ snapshots: arch: 2.2.0 execa: 0.8.0 - cliui@6.0.0: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 6.2.0 - - cliui@8.0.1: - dependencies: - string-width: 4.2.3 - strip-ansi: 6.0.1 - wrap-ansi: 7.0.0 - clone@1.0.4: {} clsx@2.0.0: {} - clsx@2.1.0: {} + clsx@2.1.1: {} code-excerpt@4.0.0: dependencies: @@ -11342,9 +12266,7 @@ snapshots: comma-separated-tokens@2.0.3: {} - commander@11.1.0: {} - - commander@12.0.0: {} + commander@12.1.0: {} commander@2.20.3: {} @@ -11369,20 +12291,24 @@ snapshots: conf@12.0.0: dependencies: - ajv: 8.12.0 + ajv: 8.17.1 ajv-formats: 2.1.1 - atomically: 2.0.2 + atomically: 2.0.3 debounce-fn: 5.1.2 dot-prop: 8.0.2 env-paths: 3.0.0 json-schema-typed: 8.0.1 - semver: 7.6.2 + semver: 7.6.3 uint8array-extras: 0.3.0 + confbox@0.1.7: {} + + consola@3.2.3: {} + constant-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 upper-case: 2.0.2 convert-source-map@2.0.0: {} @@ -11396,7 +12322,7 @@ snapshots: core-js-compat@3.35.0: dependencies: - browserslist: 4.22.2 + browserslist: 4.23.3 core-util-is@1.0.2: {} @@ -11418,25 +12344,25 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@8.3.6(typescript@5.3.3): + cosmiconfig@8.3.6(typescript@5.6.2): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 countup.js@2.8.0: {} - cpy@11.0.0: + cpy@11.1.0: dependencies: copy-file: 11.0.0 - globby: 13.2.2 + globby: 14.0.2 junk: 4.0.1 - micromatch: 4.0.5 - p-filter: 3.0.0 - p-map: 6.0.0 + micromatch: 4.0.8 + p-filter: 4.1.0 + p-map: 7.0.2 create-hash@1.2.0: dependencies: @@ -11463,9 +12389,9 @@ snapshots: transitivePeerDependencies: - encoding - cross-inspect@1.0.0: + cross-inspect@1.0.1: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 cross-spawn@5.1.0: dependencies: @@ -11490,12 +12416,12 @@ snapshots: css-tree@2.2.1: dependencies: mdn-data: 2.0.28 - source-map-js: 1.0.2 + source-map-js: 1.2.1 css-tree@2.3.1: dependencies: mdn-data: 2.0.30 - source-map-js: 1.0.2 + source-map-js: 1.2.1 css-what@6.1.0: {} @@ -11507,19 +12433,6 @@ snapshots: csstype@3.1.3: {} - csv-generate@3.4.3: {} - - csv-parse@4.16.3: {} - - csv-stringify@5.6.5: {} - - csv@5.5.3: - dependencies: - csv-generate: 3.4.3 - csv-parse: 4.16.3 - csv-stringify: 5.6.5 - stream-transform: 2.1.3 - cytoscape-cose-bilkent@4.1.0(cytoscape@3.28.1): dependencies: cose-base: 1.0.3 @@ -11729,18 +12642,15 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4(supports-color@8.1.1): + debug@4.3.4: dependencies: ms: 2.1.2 - optionalDependencies: - supports-color: 8.1.1 - decamelize-keys@1.1.1: + debug@4.3.7(supports-color@8.1.1): dependencies: - decamelize: 1.2.0 - map-obj: 1.0.1 - - decamelize@1.2.0: {} + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 decode-named-character-reference@1.0.2: dependencies: @@ -11752,9 +12662,9 @@ snapshots: dedent@0.7.0: {} - deep-eql@4.1.3: + deep-eql@4.1.4: dependencies: - type-detect: 4.0.8 + type-detect: 4.1.0 deep-extend@0.6.0: {} @@ -11772,6 +12682,12 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 + define-data-property@1.1.4: + dependencies: + es-define-property: 1.0.0 + es-errors: 1.3.0 + gopd: 1.0.1 + define-properties@1.2.1: dependencies: define-data-property: 1.1.1 @@ -11810,7 +12726,7 @@ snapshots: diff@4.0.2: {} - diff@5.1.0: {} + diff@5.2.0: {} dir-glob@3.0.1: dependencies: @@ -11820,7 +12736,7 @@ snapshots: dns-over-http-resolver@1.2.3(node-fetch@3.3.2): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) native-fetch: 3.0.0(node-fetch@3.3.2) receptacle: 1.3.2 transitivePeerDependencies: @@ -11879,7 +12795,7 @@ snapshots: dot-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 dot-prop@8.0.2: dependencies: @@ -11887,23 +12803,33 @@ snapshots: dotenv-expand@10.0.0: {} - dotenv@16.3.1: {} + dotenv@16.4.5: {} dotenv@8.6.0: {} - drizzle-orm@0.31.2(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0): + drizzle-kit@0.22.8: + dependencies: + '@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.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.11)(@types/pg@8.11.10)(@types/react@18.3.8)(better-sqlite3@11.3.0)(kysely@0.26.3)(pg@8.13.0)(react@18.3.1): optionalDependencies: '@opentelemetry/api': 1.7.0 - '@types/better-sqlite3': 7.6.10 - '@types/pg': 8.10.9 - '@types/react': 18.2.46 - better-sqlite3: 11.1.2 + '@types/better-sqlite3': 7.6.11 + '@types/pg': 8.11.10 + '@types/react': 18.3.8 + better-sqlite3: 11.3.0 kysely: 0.26.3 - pg: 8.11.3 - react: 18.2.0 + pg: 8.13.0 + react: 18.3.1 dset@3.1.3: {} + dset@3.1.4: {} + eastasianwidth@0.2.0: {} ecc-jsbn@0.1.2: @@ -11911,19 +12837,19 @@ snapshots: jsbn: 0.1.1 safer-buffer: 2.1.2 - ejs@3.1.6: + ejs@3.1.10: dependencies: - jake: 10.8.7 + jake: 10.9.2 - ejs@3.1.9: + ejs@3.1.6: dependencies: - jake: 10.8.7 + jake: 10.9.2 electron-fetch@1.9.1: dependencies: encoding: 0.1.13 - electron-to-chromium@1.4.619: {} + electron-to-chromium@1.5.26: {} elkjs@0.8.2: {} @@ -11937,6 +12863,16 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 + elliptic@6.5.7: + dependencies: + bn.js: 4.12.0 + brorand: 1.1.0 + hash.js: 1.1.7 + hmac-drbg: 1.0.1 + inherits: 2.0.4 + minimalistic-assert: 1.0.1 + minimalistic-crypto-utils: 1.0.1 + emoji-regex@10.4.0: {} emoji-regex@8.0.0: {} @@ -11969,6 +12905,8 @@ snapshots: env-paths@3.0.0: {} + environment@1.1.0: {} + err-code@3.0.1: {} error-ex@1.3.2: @@ -12017,6 +12955,12 @@ snapshots: unbox-primitive: 1.0.2 which-typed-array: 1.1.13 + es-define-property@1.0.0: + dependencies: + get-intrinsic: 1.2.4 + + es-errors@1.3.0: {} + es-iterator-helpers@1.0.15: dependencies: asynciterator.prototype: 1.0.0 @@ -12056,6 +13000,13 @@ snapshots: dependencies: es6-promise: 4.2.8 + esbuild-register@3.6.0(esbuild@0.19.12): + dependencies: + debug: 4.3.7(supports-color@8.1.1) + esbuild: 0.19.12 + transitivePeerDependencies: + - supports-color + esbuild@0.16.17: optionalDependencies: '@esbuild/android-arm': 0.16.17 @@ -12081,33 +13032,111 @@ snapshots: '@esbuild/win32-ia32': 0.16.17 '@esbuild/win32-x64': 0.16.17 - esbuild@0.19.11: + 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.19.11 - '@esbuild/android-arm': 0.19.11 - '@esbuild/android-arm64': 0.19.11 - '@esbuild/android-x64': 0.19.11 - '@esbuild/darwin-arm64': 0.19.11 - '@esbuild/darwin-x64': 0.19.11 - '@esbuild/freebsd-arm64': 0.19.11 - '@esbuild/freebsd-x64': 0.19.11 - '@esbuild/linux-arm': 0.19.11 - '@esbuild/linux-arm64': 0.19.11 - '@esbuild/linux-ia32': 0.19.11 - '@esbuild/linux-loong64': 0.19.11 - '@esbuild/linux-mips64el': 0.19.11 - '@esbuild/linux-ppc64': 0.19.11 - '@esbuild/linux-riscv64': 0.19.11 - '@esbuild/linux-s390x': 0.19.11 - '@esbuild/linux-x64': 0.19.11 - '@esbuild/netbsd-x64': 0.19.11 - '@esbuild/openbsd-x64': 0.19.11 - '@esbuild/sunos-x64': 0.19.11 - '@esbuild/win32-arm64': 0.19.11 - '@esbuild/win32-ia32': 0.19.11 - '@esbuild/win32-x64': 0.19.11 - - escalade@3.1.1: {} + '@esbuild/aix-ppc64': 0.21.5 + '@esbuild/android-arm': 0.21.5 + '@esbuild/android-arm64': 0.21.5 + '@esbuild/android-x64': 0.21.5 + '@esbuild/darwin-arm64': 0.21.5 + '@esbuild/darwin-x64': 0.21.5 + '@esbuild/freebsd-arm64': 0.21.5 + '@esbuild/freebsd-x64': 0.21.5 + '@esbuild/linux-arm': 0.21.5 + '@esbuild/linux-arm64': 0.21.5 + '@esbuild/linux-ia32': 0.21.5 + '@esbuild/linux-loong64': 0.21.5 + '@esbuild/linux-mips64el': 0.21.5 + '@esbuild/linux-ppc64': 0.21.5 + '@esbuild/linux-riscv64': 0.21.5 + '@esbuild/linux-s390x': 0.21.5 + '@esbuild/linux-x64': 0.21.5 + '@esbuild/netbsd-x64': 0.21.5 + '@esbuild/openbsd-x64': 0.21.5 + '@esbuild/sunos-x64': 0.21.5 + '@esbuild/win32-arm64': 0.21.5 + '@esbuild/win32-ia32': 0.21.5 + '@esbuild/win32-x64': 0.21.5 + + esbuild@0.23.1: + optionalDependencies: + '@esbuild/aix-ppc64': 0.23.1 + '@esbuild/android-arm': 0.23.1 + '@esbuild/android-arm64': 0.23.1 + '@esbuild/android-x64': 0.23.1 + '@esbuild/darwin-arm64': 0.23.1 + '@esbuild/darwin-x64': 0.23.1 + '@esbuild/freebsd-arm64': 0.23.1 + '@esbuild/freebsd-x64': 0.23.1 + '@esbuild/linux-arm': 0.23.1 + '@esbuild/linux-arm64': 0.23.1 + '@esbuild/linux-ia32': 0.23.1 + '@esbuild/linux-loong64': 0.23.1 + '@esbuild/linux-mips64el': 0.23.1 + '@esbuild/linux-ppc64': 0.23.1 + '@esbuild/linux-riscv64': 0.23.1 + '@esbuild/linux-s390x': 0.23.1 + '@esbuild/linux-x64': 0.23.1 + '@esbuild/netbsd-x64': 0.23.1 + '@esbuild/openbsd-arm64': 0.23.1 + '@esbuild/openbsd-x64': 0.23.1 + '@esbuild/sunos-x64': 0.23.1 + '@esbuild/win32-arm64': 0.23.1 + '@esbuild/win32-ia32': 0.23.1 + '@esbuild/win32-x64': 0.23.1 + + escalade@3.2.0: {} escape-string-regexp@1.0.5: {} @@ -12117,20 +13146,39 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-next@14.0.3(eslint@8.56.0)(typescript@5.3.3): + eslint-config-next@14.0.3(eslint@8.57.1)(typescript@5.6.2): dependencies: '@next/eslint-plugin-next': 14.0.3 '@rushstack/eslint-patch': 1.6.1 - '@typescript-eslint/parser': 6.17.0(eslint@8.56.0)(typescript@5.3.3) - eslint: 8.56.0 + '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) + eslint: 8.57.1 + eslint-import-resolver-node: 0.3.9 + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.1) + eslint-plugin-react: 7.33.2(eslint@8.57.1) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.1) + optionalDependencies: + typescript: 5.6.2 + transitivePeerDependencies: + - eslint-import-resolver-webpack + - supports-color + + eslint-config-next@14.2.13(eslint@8.57.1)(typescript@5.6.2): + dependencies: + '@next/eslint-plugin-next': 14.2.13 + '@rushstack/eslint-patch': 1.6.1 + '@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) + eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) - eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0) - eslint-plugin-react: 7.33.2(eslint@8.56.0) - eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.1) + eslint-plugin-react: 7.33.2(eslint@8.57.1) + eslint-plugin-react-hooks: 4.6.0(eslint@8.57.1) optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color @@ -12143,13 +13191,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) enhanced-resolve: 5.15.0 - eslint: 8.56.0 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint: 8.57.1 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1))(eslint@8.57.1) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1) fast-glob: 3.3.2 get-tsconfig: 4.7.2 is-core-module: 2.13.1 @@ -12160,18 +13208,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1))(eslint@8.57.1): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 6.17.0(eslint@8.56.0)(typescript@5.3.3) - eslint: 8.56.0 + '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) + eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1): dependencies: array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 @@ -12179,9 +13227,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.56.0 + eslint: 8.57.1 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1))(eslint@8.57.1) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -12192,13 +13240,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 6.17.0(eslint@8.56.0)(typescript@5.3.3) + '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.8.0(eslint@8.56.0): + eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.1): dependencies: '@babel/runtime': 7.23.7 aria-query: 5.3.0 @@ -12210,7 +13258,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.15 - eslint: 8.56.0 + eslint: 8.57.1 hasown: 2.0.0 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -12218,18 +13266,18 @@ snapshots: object.entries: 1.1.7 object.fromentries: 2.0.7 - eslint-plugin-react-hooks@4.6.0(eslint@8.56.0): + eslint-plugin-react-hooks@4.6.0(eslint@8.57.1): dependencies: - eslint: 8.56.0 + eslint: 8.57.1 - eslint-plugin-react@7.33.2(eslint@8.56.0): + eslint-plugin-react@7.33.2(eslint@8.57.1): dependencies: array-includes: 3.1.7 array.prototype.flatmap: 1.3.2 array.prototype.tosorted: 1.1.2 doctrine: 2.1.0 es-iterator-helpers: 1.0.15 - eslint: 8.56.0 + eslint: 8.57.1 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -12249,26 +13297,26 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint@8.56.0: + eslint@8.57.1: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) - '@eslint-community/regexpp': 4.10.0 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) + '@eslint-community/regexpp': 4.11.1 '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.56.0 - '@humanwhocodes/config-array': 0.11.13 + '@eslint/js': 8.57.1 + '@humanwhocodes/config-array': 0.13.0 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.5.0 + esquery: 1.6.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -12276,7 +13324,7 @@ snapshots: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.0 + ignore: 5.3.2 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -12286,7 +13334,7 @@ snapshots: lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.3 + optionator: 0.9.4 strip-ansi: 6.0.1 text-table: 0.2.0 transitivePeerDependencies: @@ -12296,13 +13344,13 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} - esquery@1.5.0: + esquery@1.6.0: dependencies: estraverse: 5.3.0 @@ -12358,13 +13406,13 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 esutils@2.0.3: {} - ethereum-bloom-filters@1.0.10: + ethereum-bloom-filters@1.2.0: dependencies: - js-sha3: 0.8.0 + '@noble/hashes': 1.5.0 ethereum-cryptography@0.1.3: dependencies: @@ -12386,7 +13434,7 @@ snapshots: ethereumjs-util@7.1.5: dependencies: - '@types/bn.js': 5.1.5 + '@types/bn.js': 5.1.6 bn.js: 5.2.1 create-hash: 1.2.0 ethereum-cryptography: 0.1.3 @@ -12439,7 +13487,7 @@ snapshots: human-signals: 3.0.1 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.2.0 + npm-run-path: 5.3.0 onetime: 6.0.0 signal-exit: 3.0.7 strip-final-newline: 3.0.0 @@ -12451,7 +13499,7 @@ snapshots: human-signals: 4.3.1 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.2.0 + npm-run-path: 5.3.0 onetime: 6.0.0 signal-exit: 3.0.7 strip-final-newline: 3.0.0 @@ -12463,7 +13511,7 @@ snapshots: human-signals: 5.0.0 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.2.0 + npm-run-path: 5.3.0 onetime: 6.0.0 signal-exit: 4.1.0 strip-final-newline: 3.0.0 @@ -12518,7 +13566,9 @@ snapshots: dependencies: fast-decode-uri-component: 1.0.1 - fast-redact@3.3.0: {} + fast-redact@3.5.0: {} + + fast-uri@3.0.1: {} fast-url-parser@1.1.3: dependencies: @@ -12526,7 +13576,7 @@ snapshots: fastest-levenshtein@1.0.16: {} - fastq@1.16.0: + fastq@1.17.1: dependencies: reusify: 1.0.4 @@ -12534,10 +13584,14 @@ snapshots: dependencies: format: 0.2.2 + fdir@6.3.0(picomatch@4.0.2): + optionalDependencies: + picomatch: 4.0.2 + fetch-blob@3.2.0: dependencies: node-domexception: 1.0.0 - web-streams-polyfill: 3.2.1 + web-streams-polyfill: 3.3.3 file-entry-cache@6.0.1: dependencies: @@ -12553,6 +13607,10 @@ snapshots: dependencies: to-regex-range: 5.0.1 + fill-range@7.1.1: + dependencies: + to-regex-range: 5.0.1 + find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -12568,39 +13626,34 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 - find-yarn-workspace-root2@1.2.16: - dependencies: - micromatch: 4.0.5 - pkg-dir: 4.2.0 - flat-cache@3.2.0: dependencies: - flatted: 3.2.9 + flatted: 3.3.1 keyv: 4.5.4 rimraf: 3.0.2 - flatted@3.2.9: {} + flatted@3.3.1: {} flexsearch@0.7.31: {} focus-visible@5.2.0: {} - follow-redirects@1.15.6(debug@4.3.4): + follow-redirects@1.15.9(debug@4.3.4): optionalDependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 for-each@0.3.3: dependencies: is-callable: 1.2.7 - foreground-child@3.1.1: + foreground-child@3.3.0: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 forever-agent@0.6.1: {} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: {} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8: {} form-data@2.3.3: dependencies: @@ -12688,8 +13741,6 @@ snapshots: gensync@1.0.0-beta.2: {} - get-caller-file@2.0.5: {} - get-east-asian-width@1.2.0: {} get-func-name@2.0.2: {} @@ -12701,6 +13752,14 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.0 + get-intrinsic@1.2.4: + dependencies: + es-errors: 1.3.0 + function-bind: 1.1.2 + has-proto: 1.0.3 + has-symbols: 1.0.3 + hasown: 2.0.2 + get-iterator@1.0.2: {} get-package-type@0.1.0: {} @@ -12724,6 +13783,10 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 + get-tsconfig@4.8.1: + dependencies: + resolve-pkg-maps: 1.0.0 + getpass@0.1.7: dependencies: assert-plus: 1.0.0 @@ -12744,11 +13807,20 @@ snapshots: glob@10.3.10: dependencies: - foreground-child: 3.1.1 + foreground-child: 3.3.0 jackspeak: 2.3.6 - minimatch: 9.0.3 - minipass: 7.0.4 - path-scurry: 1.10.1 + minimatch: 9.0.5 + minipass: 7.1.2 + path-scurry: 1.11.1 + + glob@10.4.5: + dependencies: + foreground-child: 3.3.0 + jackspeak: 3.4.3 + minimatch: 9.0.5 + minipass: 7.1.2 + package-json-from-dist: 1.0.0 + path-scurry: 1.11.1 glob@7.1.7: dependencies: @@ -12773,7 +13845,7 @@ snapshots: fs.realpath: 1.0.0 minimatch: 8.0.4 minipass: 4.2.8 - path-scurry: 1.10.1 + path-scurry: 1.11.1 globals@11.12.0: {} @@ -12790,7 +13862,7 @@ snapshots: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.0 + ignore: 5.3.2 merge2: 1.4.1 slash: 3.0.0 @@ -12798,10 +13870,19 @@ snapshots: dependencies: dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.0 + ignore: 5.3.2 merge2: 1.4.1 slash: 4.0.0 + globby@14.0.2: + dependencies: + '@sindresorhus/merge-streams': 2.3.0 + fast-glob: 3.3.2 + ignore: 5.3.2 + path-type: 5.0.0 + slash: 5.1.0 + unicorn-magic: 0.1.0 + globrex@0.1.2: {} gluegun@5.1.2(debug@4.3.4): @@ -12845,40 +13926,38 @@ snapshots: graceful-fs@4.2.11: {} - grapheme-splitter@1.0.4: {} - graphemer@1.4.0: {} - graphql-import-node@0.0.5(graphql@16.8.2): + graphql-import-node@0.0.5(graphql@16.9.0): dependencies: - graphql: 16.8.2 + graphql: 16.9.0 - graphql-request@6.1.0(encoding@0.1.13)(graphql@16.8.2): + graphql-request@6.1.0(encoding@0.1.13)(graphql@16.9.0): dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.2) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) cross-fetch: 3.1.8(encoding@0.1.13) - graphql: 16.8.2 + graphql: 16.9.0 transitivePeerDependencies: - encoding - graphql-yoga@5.3.1(graphql@16.8.2): + graphql-yoga@5.7.0(graphql@16.9.0): dependencies: '@envelop/core': 5.0.2 - '@graphql-tools/executor': 1.2.6(graphql@16.8.2) - '@graphql-tools/schema': 10.0.3(graphql@16.8.2) - '@graphql-tools/utils': 10.2.0(graphql@16.8.2) + '@graphql-tools/executor': 1.3.1(graphql@16.9.0) + '@graphql-tools/schema': 10.0.6(graphql@16.9.0) + '@graphql-tools/utils': 10.5.4(graphql@16.9.0) '@graphql-yoga/logger': 2.0.0 - '@graphql-yoga/subscription': 5.0.0 - '@whatwg-node/fetch': 0.9.17 - '@whatwg-node/server': 0.9.34 + '@graphql-yoga/subscription': 5.0.1 + '@whatwg-node/fetch': 0.9.21 + '@whatwg-node/server': 0.9.49 dset: 3.1.3 - graphql: 16.8.2 + graphql: 16.9.0 lru-cache: 10.1.0 tslib: 2.6.2 graphql@15.5.0: {} - graphql@16.8.2: {} + graphql@16.9.0: {} gray-matter@4.0.3: dependencies: @@ -12894,8 +13973,6 @@ snapshots: ajv: 6.12.6 har-schema: 2.0.0 - hard-rejection@2.1.0: {} - has-bigints@1.0.2: {} has-flag@2.0.0: {} @@ -12908,8 +13985,14 @@ snapshots: dependencies: get-intrinsic: 1.2.2 + has-property-descriptors@1.0.2: + dependencies: + es-define-property: 1.0.0 + has-proto@1.0.1: {} + has-proto@1.0.3: {} + has-symbols@1.0.3: {} has-tostringtag@1.0.0: @@ -12937,6 +14020,10 @@ snapshots: dependencies: function-bind: 1.1.2 + hasown@2.0.2: + dependencies: + function-bind: 1.1.2 + hast-util-from-dom@5.0.0: dependencies: '@types/hast': 3.0.4 @@ -13035,7 +14122,7 @@ snapshots: transitivePeerDependencies: - supports-color - hast-util-to-html@9.0.2: + hast-util-to-html@9.0.3: dependencies: '@types/hast': 3.0.4 '@types/unist': 3.0.3 @@ -13083,7 +14170,7 @@ snapshots: header-case@2.0.4: dependencies: capital-case: 1.0.4 - tslib: 2.6.2 + tslib: 2.7.0 heap@0.2.7: {} @@ -13095,7 +14182,7 @@ snapshots: hono@4.5.0: {} - hosted-git-info@2.8.9: {} + hono@4.6.2: {} html-void-elements@3.0.0: {} @@ -13109,7 +14196,7 @@ snapshots: http-proxy@1.18.1: dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.15.6(debug@4.3.4) + follow-redirects: 1.15.9(debug@4.3.4) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -13153,7 +14240,7 @@ snapshots: ieee754@1.2.1: {} - ignore@5.3.0: {} + ignore@5.3.2: {} immutable@4.2.1: {} @@ -13177,10 +14264,10 @@ snapshots: ini@1.3.8: {} - ink@4.4.1(@types/react@18.2.46)(react@18.2.0): + ink@4.4.1(@types/react@18.3.8)(react@18.3.1): dependencies: '@alcalzone/ansi-tokenize': 0.1.3 - ansi-escapes: 6.2.0 + ansi-escapes: 6.2.1 auto-bind: 5.0.1 chalk: 5.3.0 cli-boxes: 3.0.0 @@ -13193,9 +14280,9 @@ snapshots: is-upper-case: 2.0.2 lodash: 4.17.21 patch-console: 2.0.0 - react: 18.2.0 - react-reconciler: 0.29.0(react@18.2.0) - scheduler: 0.23.0 + react: 18.3.1 + react-reconciler: 0.29.2(react@18.3.1) + scheduler: 0.23.2 signal-exit: 3.0.7 slice-ansi: 6.0.0 stack-utils: 2.0.6 @@ -13203,10 +14290,10 @@ snapshots: type-fest: 0.12.0 widest-line: 4.0.1 wrap-ansi: 8.1.0 - ws: 8.16.0 + ws: 8.18.0 yoga-wasm-web: 0.3.3 optionalDependencies: - '@types/react': 18.2.46 + '@types/react': 18.3.8 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -13249,7 +14336,7 @@ snapshots: any-signal: 2.1.2 blob-to-it: 1.0.4 browser-readablestream-to-it: 1.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) err-code: 3.0.1 ipfs-core-types: 0.9.0(node-fetch@3.3.2) ipfs-unixfs: 6.0.9 @@ -13278,7 +14365,7 @@ snapshots: '@ipld/dag-pb': 2.1.18 abort-controller: 3.0.0 any-signal: 2.1.2 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) err-code: 3.0.1 ipfs-core-types: 0.9.0(node-fetch@3.3.2) ipfs-core-utils: 0.13.0(encoding@0.1.13)(node-fetch@3.3.2) @@ -13348,7 +14435,7 @@ snapshots: is-binary-path@2.1.0: dependencies: - binary-extensions: 2.2.0 + binary-extensions: 2.3.0 is-boolean-object@1.1.2: dependencies: @@ -13415,7 +14502,7 @@ snapshots: is-lower-case@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 is-map@2.0.2: {} @@ -13431,8 +14518,6 @@ snapshots: is-path-inside@3.0.3: {} - is-plain-obj@1.1.0: {} - is-plain-obj@2.1.0: {} is-plain-obj@3.0.0: {} @@ -13482,7 +14567,7 @@ snapshots: is-upper-case@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 is-weakmap@2.0.1: {} @@ -13511,9 +14596,9 @@ snapshots: iso-url@1.2.1: {} - isomorphic-ws@4.0.1(ws@7.5.9): + isomorphic-ws@4.0.1(ws@7.5.10): dependencies: - ws: 7.5.9 + ws: 7.5.10 isows@1.0.3(ws@8.13.0): dependencies: @@ -13563,9 +14648,15 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jake@10.8.7: + jackspeak@3.4.3: dependencies: - async: 3.2.5 + '@isaacs/cliui': 8.0.2 + optionalDependencies: + '@pkgjs/parseargs': 0.11.0 + + jake@10.9.2: + dependencies: + async: 3.2.6 chalk: 4.1.2 filelist: 1.0.4 minimatch: 3.1.2 @@ -13580,10 +14671,10 @@ snapshots: delay: 5.0.0 es6-promisify: 5.0.0 eyes: 0.1.8 - isomorphic-ws: 4.0.1(ws@7.5.9) + isomorphic-ws: 4.0.1(ws@7.5.10) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.9 + ws: 7.5.10 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -13596,6 +14687,8 @@ snapshots: js-tokens@4.0.0: {} + js-tokens@9.0.0: {} + js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -13633,8 +14726,6 @@ snapshots: json5@2.2.3: {} - jsonc-parser@3.2.0: {} - jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -13670,7 +14761,7 @@ snapshots: keccak@3.0.4: dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.2 readable-stream: 3.6.2 keyv@4.5.4: @@ -13706,45 +14797,40 @@ snapshots: lilconfig@3.0.0: {} + lilconfig@3.1.2: {} + lines-and-columns@1.2.4: {} - lint-staged@15.2.0: + lint-staged@15.2.10: dependencies: chalk: 5.3.0 - commander: 11.1.0 - debug: 4.3.4(supports-color@8.1.1) + commander: 12.1.0 + debug: 4.3.7(supports-color@8.1.1) execa: 8.0.1 - lilconfig: 3.0.0 - listr2: 8.0.0 - micromatch: 4.0.5 + lilconfig: 3.1.2 + listr2: 8.2.4 + micromatch: 4.0.8 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.3.4 + yaml: 2.5.1 transitivePeerDependencies: - supports-color - listr2@8.0.0: + listr2@8.2.4: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 eventemitter3: 5.0.1 - log-update: 6.0.0 - rfdc: 1.3.0 + log-update: 6.1.0 + rfdc: 1.4.1 wrap-ansi: 9.0.0 load-tsconfig@0.2.5: {} - load-yaml-file@0.2.0: - dependencies: - graceful-fs: 4.2.11 - js-yaml: 3.14.1 - pify: 4.0.1 - strip-bom: 3.0.0 - local-pkg@0.5.0: dependencies: - mlly: 1.4.2 - pkg-types: 1.0.3 + mlly: 1.7.1 + pkg-types: 1.2.0 locate-path@5.0.0: dependencies: @@ -13807,10 +14893,10 @@ snapshots: chalk: 5.3.0 is-unicode-supported: 1.3.0 - log-update@6.0.0: + log-update@6.1.0: dependencies: - ansi-escapes: 6.2.0 - cli-cursor: 4.0.0 + ansi-escapes: 7.0.0 + cli-cursor: 5.0.0 slice-ansi: 7.1.0 strip-ansi: 7.1.0 wrap-ansi: 9.0.0 @@ -13831,10 +14917,12 @@ snapshots: lower-case@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 lru-cache@10.1.0: {} + lru-cache@10.4.3: {} + lru-cache@4.1.5: dependencies: pseudomap: 1.0.2 @@ -13848,20 +14936,16 @@ snapshots: dependencies: yallist: 4.0.0 - lucide-react@0.295.0(react@18.2.0): + lucide-react@0.295.0(react@18.3.1): dependencies: - react: 18.2.0 + react: 18.3.1 - magic-string@0.30.5: + magic-string@0.30.11: dependencies: - '@jridgewell/sourcemap-codec': 1.4.15 + '@jridgewell/sourcemap-codec': 1.5.0 make-error@1.3.6: {} - map-obj@1.0.1: {} - - map-obj@4.3.0: {} - markdown-extensions@1.1.1: {} markdown-table@3.0.3: {} @@ -14142,20 +15226,6 @@ snapshots: mdn-data@2.0.30: {} - meow@6.1.1: - dependencies: - '@types/minimist': 1.2.5 - camelcase-keys: 6.2.2 - decamelize-keys: 1.1.1 - hard-rejection: 2.1.0 - minimist-options: 4.1.0 - normalize-package-data: 2.5.0 - read-pkg-up: 7.0.1 - redent: 3.0.0 - trim-newlines: 3.0.1 - type-fest: 0.13.1 - yargs-parser: 18.1.3 - merge-options@3.0.4: dependencies: is-plain-obj: 2.1.0 @@ -14306,7 +15376,7 @@ snapshots: micromark-extension-mdx-expression@1.0.8: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 micromark-factory-mdx-expression: 1.0.9 micromark-factory-space: 1.1.0 micromark-util-character: 1.2.0 @@ -14318,7 +15388,7 @@ snapshots: micromark-extension-mdx-jsx@1.0.5: dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 estree-util-is-identifier-name: 2.1.0 micromark-factory-mdx-expression: 1.0.9 micromark-factory-space: 1.1.0 @@ -14334,7 +15404,7 @@ snapshots: micromark-extension-mdxjs-esm@1.0.5: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 micromark-core-commonmark: 1.1.0 micromark-util-character: 1.2.0 micromark-util-events-to-acorn: 1.2.3 @@ -14346,8 +15416,8 @@ snapshots: micromark-extension-mdxjs@1.0.1: dependencies: - acorn: 8.11.3 - acorn-jsx: 5.3.2(acorn@8.11.3) + acorn: 8.12.1 + acorn-jsx: 5.3.2(acorn@8.12.1) micromark-extension-mdx-expression: 1.0.8 micromark-extension-mdx-jsx: 1.0.5 micromark-extension-mdx-md: 1.0.1 @@ -14383,7 +15453,7 @@ snapshots: micromark-factory-mdx-expression@1.0.9: dependencies: - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 micromark-util-character: 1.2.0 micromark-util-events-to-acorn: 1.2.3 micromark-util-symbol: 1.1.0 @@ -14499,7 +15569,7 @@ snapshots: micromark-util-events-to-acorn@1.2.3: dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.5 + '@types/estree': 1.0.6 '@types/unist': 2.0.11 estree-util-visit: 1.2.1 micromark-util-symbol: 1.1.0 @@ -14564,7 +15634,7 @@ snapshots: micromark@3.2.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -14586,7 +15656,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 @@ -14610,6 +15680,11 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 + micromatch@4.0.8: + dependencies: + braces: 3.0.3 + picomatch: 2.3.1 + mime-db@1.52.0: {} mime-types@2.1.35: @@ -14620,9 +15695,9 @@ snapshots: mimic-fn@4.0.0: {} - mimic-response@3.1.0: {} + mimic-function@5.0.1: {} - min-indent@1.0.1: {} + mimic-response@3.1.0: {} minimalistic-assert@1.0.1: {} @@ -14644,11 +15719,9 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimist-options@4.1.0: + minimatch@9.0.5: dependencies: - arrify: 1.0.1 - is-plain-obj: 1.1.0 - kind-of: 6.0.3 + brace-expansion: 2.0.1 minimist@1.2.8: {} @@ -14660,15 +15733,13 @@ snapshots: minipass@5.0.0: {} - minipass@7.0.4: {} + minipass@7.1.2: {} minizlib@2.1.2: dependencies: minipass: 3.3.6 yallist: 4.0.0 - mixme@0.5.10: {} - mj-context-menu@0.6.1: {} mkdirp-classic@0.5.3: {} @@ -14679,12 +15750,12 @@ snapshots: mkdirp@1.0.4: {} - mlly@1.4.2: + mlly@1.7.1: dependencies: - acorn: 8.11.3 - pathe: 1.1.1 - pkg-types: 1.0.3 - ufo: 1.3.2 + acorn: 8.12.1 + pathe: 1.1.2 + pkg-types: 1.2.0 + ufo: 1.5.4 mri@1.2.0: {} @@ -14739,22 +15810,22 @@ snapshots: natural-orderby@2.0.3: {} - next-themes@0.2.1(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + next-themes@0.2.1(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - next: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + next: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) - next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: '@next/env': 14.0.3 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001572 + caniuse-lite: 1.0.30001662 postcss: 8.4.31 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) - styled-jsx: 5.1.1(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + styled-jsx: 5.1.1(react@18.3.1) watchpack: 2.4.0 optionalDependencies: '@next/swc-darwin-arm64': 14.0.3 @@ -14771,33 +15842,59 @@ snapshots: - '@babel/core' - babel-plugin-macros - nextra-theme-docs@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(nextra@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + dependencies: + '@next/env': 14.2.13 + '@swc/helpers': 0.5.5 + busboy: 1.6.0 + caniuse-lite: 1.0.30001662 + graceful-fs: 4.2.11 + postcss: 8.4.31 + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) + styled-jsx: 5.1.1(react@18.3.1) + optionalDependencies: + '@next/swc-darwin-arm64': 14.2.13 + '@next/swc-darwin-x64': 14.2.13 + '@next/swc-linux-arm64-gnu': 14.2.13 + '@next/swc-linux-arm64-musl': 14.2.13 + '@next/swc-linux-x64-gnu': 14.2.13 + '@next/swc-linux-x64-musl': 14.2.13 + '@next/swc-win32-arm64-msvc': 14.2.13 + '@next/swc-win32-ia32-msvc': 14.2.13 + '@next/swc-win32-x64-msvc': 14.2.13 + '@opentelemetry/api': 1.7.0 + transitivePeerDependencies: + - '@babel/core' + - babel-plugin-macros + + nextra-theme-docs@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@headlessui/react': 1.7.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@headlessui/react': 1.7.17(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@popperjs/core': 2.11.8 - clsx: 2.1.0 + clsx: 2.1.1 escape-string-regexp: 5.0.0 flexsearch: 0.7.31 focus-visible: 5.2.0 intersection-observer: 0.12.2 - next: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - next-themes: 0.2.1(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - nextra: 3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + next: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next-themes: 0.2.1(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + nextra: 3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) scroll-into-view-if-needed: 3.1.0 zod: 3.23.8 - nextra@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): + nextra@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): dependencies: - '@headlessui/react': 1.7.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + '@headlessui/react': 1.7.17(react-dom@18.3.1(react@18.3.1))(react@18.3.1) '@mdx-js/mdx': 2.3.0 - '@mdx-js/react': 2.3.0(react@18.2.0) + '@mdx-js/react': 2.3.0(react@18.3.1) '@napi-rs/simple-git': 0.1.9 - '@theguild/remark-mermaid': 0.0.5(react@18.2.0) + '@theguild/remark-mermaid': 0.0.5(react@18.3.1) '@theguild/remark-npm2yarn': 0.3.0 - better-react-mathjax: 2.0.3(react@18.2.0) - clsx: 2.1.0 + better-react-mathjax: 2.0.3(react@18.3.1) + clsx: 2.1.1 estree-util-to-js: 2.0.0 estree-util-value-to-estree: 3.0.1 github-slugger: 2.0.0 @@ -14805,10 +15902,10 @@ snapshots: gray-matter: 4.0.3 hast-util-to-estree: 3.1.0 katex: 0.16.9 - next: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + next: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) p-limit: 4.0.0 - react: 18.2.0 - react-dom: 18.2.0(react@18.2.0) + react: 18.3.1 + react-dom: 18.3.1(react@18.3.1) rehype-katex: 7.0.0 rehype-pretty-code: 0.10.1(shikiji@0.6.10) rehype-raw: 7.0.0 @@ -14830,11 +15927,11 @@ snapshots: no-case@3.0.4: dependencies: lower-case: 2.0.2 - tslib: 2.6.2 + tslib: 2.7.0 node-abi@3.62.0: dependencies: - semver: 7.6.2 + semver: 7.6.3 node-addon-api@2.0.2: {} @@ -14852,19 +15949,12 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-gyp-build@4.7.1: {} + node-gyp-build@4.8.2: {} - node-releases@2.0.14: {} + node-releases@2.0.18: {} non-layered-tidy-tree-layout@2.0.2: {} - normalize-package-data@2.5.0: - dependencies: - hosted-git-info: 2.8.9 - resolve: 1.22.8 - semver: 5.7.2 - validate-npm-package-license: 3.0.4 - normalize-path@3.0.0: {} normalize-range@0.1.2: {} @@ -14877,7 +15967,7 @@ snapshots: dependencies: path-key: 3.1.1 - npm-run-path@5.2.0: + npm-run-path@5.3.0: dependencies: path-key: 4.0.0 @@ -14900,6 +15990,8 @@ snapshots: object-inspect@1.13.1: {} + object-inspect@1.13.2: {} + object-keys@1.1.1: {} object-treeify@1.1.33: {} @@ -14957,14 +16049,18 @@ snapshots: dependencies: mimic-fn: 4.0.0 - optionator@0.9.3: + onetime@7.0.0: + dependencies: + mimic-function: 5.0.1 + + optionator@0.9.4: dependencies: - '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 + word-wrap: 1.2.5 ora@4.0.2: dependencies: @@ -15019,9 +16115,9 @@ snapshots: dependencies: p-map: 2.1.0 - p-filter@3.0.0: + p-filter@4.1.0: dependencies: - p-map: 5.5.0 + p-map: 7.0.2 p-finally@1.0.0: {} @@ -15055,11 +16151,7 @@ snapshots: p-map@2.1.0: {} - p-map@5.5.0: - dependencies: - aggregate-error: 4.0.1 - - p-map@6.0.0: {} + p-map@7.0.2: {} p-timeout@3.2.0: dependencies: @@ -15073,12 +16165,14 @@ snapshots: dependencies: p-timeout: 3.2.0 - packet-reader@1.0.0: {} + package-json-from-dist@1.0.0: {} + + package-manager-detector@0.2.0: {} param-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 parent-module@1.0.1: dependencies: @@ -15101,7 +16195,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.23.5 + '@babel/code-frame': 7.24.7 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -15115,7 +16209,7 @@ snapshots: pascal-case@3.1.2: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 password-prompt@1.1.3: dependencies: @@ -15127,7 +16221,7 @@ snapshots: path-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 path-exists@4.0.0: {} @@ -15143,14 +16237,16 @@ snapshots: path-parse@1.0.7: {} - path-scurry@1.10.1: + path-scurry@1.11.1: dependencies: - lru-cache: 10.1.0 - minipass: 7.0.4 + lru-cache: 10.4.3 + minipass: 7.1.2 path-type@4.0.0: {} - pathe@1.1.1: {} + path-type@5.0.0: {} + + pathe@1.1.2: {} pathval@1.1.1: {} @@ -15173,18 +16269,20 @@ snapshots: pg-cloudflare@1.1.1: optional: true - pg-connection-string@2.6.2: {} + pg-connection-string@2.7.0: {} pg-int8@1.0.1: {} pg-numeric@1.0.2: {} - pg-pool@3.6.1(pg@8.11.3): + pg-pool@3.7.0(pg@8.13.0): dependencies: - pg: 8.11.3 + pg: 8.13.0 pg-protocol@1.6.0: {} + pg-protocol@1.7.0: {} + pg-types@2.2.0: dependencies: pg-int8: 1.0.1 @@ -15203,13 +16301,11 @@ snapshots: postgres-interval: 3.0.0 postgres-range: 1.1.3 - pg@8.11.3: + pg@8.13.0: dependencies: - buffer-writer: 2.0.0 - packet-reader: 1.0.0 - pg-connection-string: 2.6.2 - pg-pool: 3.6.1(pg@8.11.3) - pg-protocol: 1.6.0 + pg-connection-string: 2.7.0 + pg-pool: 3.7.0(pg@8.13.0) + pg-protocol: 1.7.0 pg-types: 2.2.0 pgpass: 1.0.5 optionalDependencies: @@ -15221,72 +16317,80 @@ snapshots: picocolors@1.0.0: {} + picocolors@1.1.0: {} + picomatch@2.3.1: {} + picomatch@4.0.2: {} + pidtree@0.6.0: {} pify@2.3.0: {} pify@4.0.1: {} - pino-abstract-transport@1.1.0: + pino-abstract-transport@1.2.0: dependencies: readable-stream: 4.5.2 split2: 4.2.0 pino-std-serializers@6.2.2: {} - pino@8.17.2: + pino@8.21.0: dependencies: atomic-sleep: 1.0.0 - fast-redact: 3.3.0 + fast-redact: 3.5.0 on-exit-leak-free: 2.1.2 - pino-abstract-transport: 1.1.0 + pino-abstract-transport: 1.2.0 pino-std-serializers: 6.2.2 process-warning: 3.0.0 quick-format-unescaped: 4.0.4 real-require: 0.2.0 - safe-stable-stringify: 2.4.3 - sonic-boom: 3.7.0 - thread-stream: 2.4.1 + safe-stable-stringify: 2.5.0 + sonic-boom: 3.8.1 + thread-stream: 2.7.0 pirates@4.0.6: {} - pkg-dir@4.2.0: - dependencies: - find-up: 4.1.0 - - pkg-types@1.0.3: + pkg-types@1.2.0: dependencies: - jsonc-parser: 3.2.0 - mlly: 1.4.2 - pathe: 1.1.1 + confbox: 0.1.7 + mlly: 1.7.1 + pathe: 1.1.2 pluralize@8.0.0: {} - postcss-import@15.1.0(postcss@8.4.32): + postcss-import@15.1.0(postcss@8.4.47): dependencies: - postcss: 8.4.32 + postcss: 8.4.47 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-js@4.0.1(postcss@8.4.32): + postcss-js@4.0.1(postcss@8.4.47): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.32 + postcss: 8.4.47 - postcss-load-config@4.0.2(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)): + postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)): dependencies: lilconfig: 3.0.0 - yaml: 2.3.4 + yaml: 2.5.1 + optionalDependencies: + postcss: 8.4.47 + ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) + + postcss-load-config@6.0.1(jiti@1.21.0)(postcss@8.4.47)(yaml@2.5.1): + dependencies: + lilconfig: 3.1.2 optionalDependencies: - postcss: 8.4.32 - ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) + jiti: 1.21.0 + postcss: 8.4.47 + yaml: 2.5.1 - postcss-nested@6.0.1(postcss@8.4.32): + postcss-nested@6.0.1(postcss@8.4.47): dependencies: - postcss: 8.4.32 + postcss: 8.4.47 postcss-selector-parser: 6.0.15 postcss-selector-parser@6.0.15: @@ -15299,14 +16403,14 @@ snapshots: postcss@8.4.31: dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.0.2 + picocolors: 1.1.0 + source-map-js: 1.2.1 - postcss@8.4.32: + postcss@8.4.47: dependencies: nanoid: 3.3.7 - picocolors: 1.0.0 - source-map-js: 1.0.2 + picocolors: 1.1.0 + source-map-js: 1.2.1 postgres-array@2.0.0: {} @@ -15330,9 +16434,9 @@ snapshots: postgres-range@1.1.3: {} - posthog-node@4.0.0: + posthog-node@4.2.0: dependencies: - axios: 1.6.8 + axios: 1.7.7 rusha: 0.8.14 transitivePeerDependencies: - debug @@ -15352,26 +16456,19 @@ snapshots: tar-fs: 2.1.1 tunnel-agent: 0.6.0 - preferred-pm@3.1.2: - dependencies: - find-up: 5.0.0 - find-yarn-workspace-root2: 1.2.16 - path-exists: 4.0.0 - which-pm: 2.0.0 - prelude-ls@1.2.1: {} prettier@1.19.1: {} prettier@2.8.8: {} - prettier@3.1.1: {} + prettier@3.3.3: {} pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 18.2.0 + react-is: 18.3.1 process-nextick-args@2.0.1: {} @@ -15379,7 +16476,7 @@ snapshots: process@0.11.10: {} - prom-client@15.1.0: + prom-client@15.1.3: dependencies: '@opentelemetry/api': 1.7.0 tdigest: 0.1.2 @@ -15414,7 +16511,7 @@ snapshots: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 20.11.24 + '@types/node': 20.16.5 long: 4.0.0 proxy-from-env@1.1.0: {} @@ -15439,13 +16536,13 @@ snapshots: pvtsutils@1.3.5: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 pvutils@1.1.3: {} - qs@6.11.2: + qs@6.13.0: dependencies: - side-channel: 1.0.4 + side-channel: 1.0.6 qs@6.5.3: {} @@ -15453,8 +16550,6 @@ snapshots: quick-format-unescaped@4.0.4: {} - quick-lru@4.0.1: {} - randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 @@ -15466,32 +16561,32 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-countup@6.5.0(react@18.2.0): + react-countup@6.5.3(react@18.3.1): dependencies: countup.js: 2.8.0 - react: 18.2.0 + react: 18.3.1 - react-dom@18.2.0(react@18.2.0): + react-dom@18.3.1(react@18.3.1): dependencies: loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.0 + react: 18.3.1 + scheduler: 0.23.2 react-is@16.13.1: {} - react-is@18.2.0: {} + react-is@18.3.1: {} react-native-fetch-api@3.0.0: dependencies: p-defer: 3.0.0 - react-reconciler@0.29.0(react@18.2.0): + react-reconciler@0.29.2(react@18.3.1): dependencies: loose-envify: 1.4.0 - react: 18.2.0 - scheduler: 0.23.0 + react: 18.3.1 + scheduler: 0.23.2 - react@18.2.0: + react@18.3.1: dependencies: loose-envify: 1.4.0 @@ -15499,19 +16594,6 @@ snapshots: dependencies: pify: 2.3.0 - read-pkg-up@7.0.1: - dependencies: - find-up: 4.1.0 - read-pkg: 5.2.0 - type-fest: 0.8.1 - - read-pkg@5.2.0: - dependencies: - '@types/normalize-package-data': 2.4.4 - normalize-package-data: 2.5.0 - parse-json: 5.2.0 - type-fest: 0.6.0 - read-yaml-file@1.1.0: dependencies: graceful-fs: 4.2.11 @@ -15562,11 +16644,6 @@ snapshots: dependencies: ms: 2.1.3 - redent@3.0.0: - dependencies: - indent-string: 4.0.0 - strip-indent: 3.0.0 - redeyed@2.1.1: dependencies: esprima: 4.0.1 @@ -15700,7 +16777,7 @@ snapshots: request@2.88.2: dependencies: aws-sign2: 0.7.0 - aws4: 1.12.0 + aws4: 1.13.2 caseless: 0.12.0 combined-stream: 1.0.8 extend: 3.0.2 @@ -15720,12 +16797,8 @@ snapshots: tunnel-agent: 0.6.0 uuid: 3.4.0 - require-directory@2.1.1: {} - require-from-string@2.0.2: {} - require-main-filename@2.0.0: {} - requires-port@1.0.0: {} resolve-from@4.0.0: {} @@ -15756,11 +16829,16 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 + restore-cursor@5.1.0: + dependencies: + onetime: 7.0.0 + signal-exit: 4.1.0 + retimer@3.0.0: {} reusify@1.0.4: {} - rfdc@1.3.0: {} + rfdc@1.4.1: {} rimraf@2.7.1: dependencies: @@ -15770,9 +16848,9 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@5.0.5: + rimraf@5.0.10: dependencies: - glob: 10.3.10 + glob: 10.4.5 ripemd160@2.0.2: dependencies: @@ -15791,21 +16869,26 @@ snapshots: robust-predicates@3.0.2: {} - rollup@4.9.2: + rollup@4.22.2: + dependencies: + '@types/estree': 1.0.5 optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.9.2 - '@rollup/rollup-android-arm64': 4.9.2 - '@rollup/rollup-darwin-arm64': 4.9.2 - '@rollup/rollup-darwin-x64': 4.9.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.9.2 - '@rollup/rollup-linux-arm64-gnu': 4.9.2 - '@rollup/rollup-linux-arm64-musl': 4.9.2 - '@rollup/rollup-linux-riscv64-gnu': 4.9.2 - '@rollup/rollup-linux-x64-gnu': 4.9.2 - '@rollup/rollup-linux-x64-musl': 4.9.2 - '@rollup/rollup-win32-arm64-msvc': 4.9.2 - '@rollup/rollup-win32-ia32-msvc': 4.9.2 - '@rollup/rollup-win32-x64-msvc': 4.9.2 + '@rollup/rollup-android-arm-eabi': 4.22.2 + '@rollup/rollup-android-arm64': 4.22.2 + '@rollup/rollup-darwin-arm64': 4.22.2 + '@rollup/rollup-darwin-x64': 4.22.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.22.2 + '@rollup/rollup-linux-arm-musleabihf': 4.22.2 + '@rollup/rollup-linux-arm64-gnu': 4.22.2 + '@rollup/rollup-linux-arm64-musl': 4.22.2 + '@rollup/rollup-linux-powerpc64le-gnu': 4.22.2 + '@rollup/rollup-linux-riscv64-gnu': 4.22.2 + '@rollup/rollup-linux-s390x-gnu': 4.22.2 + '@rollup/rollup-linux-x64-gnu': 4.22.2 + '@rollup/rollup-linux-x64-musl': 4.22.2 + '@rollup/rollup-win32-arm64-msvc': 4.22.2 + '@rollup/rollup-win32-ia32-msvc': 4.22.2 + '@rollup/rollup-win32-x64-msvc': 4.22.2 fsevents: 2.3.3 run-parallel@1.2.0: @@ -15839,9 +16922,11 @@ snapshots: safe-stable-stringify@2.4.3: {} + safe-stable-stringify@2.5.0: {} + safer-buffer@2.1.2: {} - scheduler@0.23.0: + scheduler@0.23.2: dependencies: loose-envify: 1.4.0 @@ -15853,9 +16938,9 @@ snapshots: secp256k1@4.0.3: dependencies: - elliptic: 6.5.4 + elliptic: 6.5.7 node-addon-api: 2.0.2 - node-gyp-build: 4.7.1 + node-gyp-build: 4.8.2 section-matter@1.0.0: dependencies: @@ -15864,8 +16949,6 @@ snapshots: semver-compare@1.0.0: {} - semver@5.7.2: {} - semver@6.3.1: {} semver@7.3.5: @@ -15878,14 +16961,14 @@ snapshots: semver@7.6.2: {} + semver@7.6.3: {} + sentence-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 upper-case-first: 2.0.2 - set-blocking@2.0.0: {} - set-function-length@1.1.1: dependencies: define-data-property: 1.1.1 @@ -15893,6 +16976,15 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 + set-function-length@1.2.2: + dependencies: + define-data-property: 1.1.4 + es-errors: 1.3.0 + function-bind: 1.1.2 + get-intrinsic: 1.2.4 + gopd: 1.0.1 + has-property-descriptors: 1.0.2 + set-function-name@2.0.1: dependencies: define-data-property: 1.1.1 @@ -15920,7 +17012,7 @@ snapshots: shikiji@0.6.10: dependencies: - hast-util-to-html: 9.0.2 + hast-util-to-html: 9.0.3 side-channel@1.0.4: dependencies: @@ -15928,6 +17020,13 @@ snapshots: get-intrinsic: 1.2.2 object-inspect: 1.13.1 + side-channel@1.0.6: + dependencies: + call-bind: 1.0.7 + es-errors: 1.3.0 + get-intrinsic: 1.2.4 + object-inspect: 1.13.2 + siginfo@2.0.0: {} signal-exit@3.0.7: {} @@ -15942,7 +17041,7 @@ snapshots: once: 1.4.0 simple-concat: 1.0.1 - simple-git-hooks@2.9.0: {} + simple-git-hooks@2.11.1: {} sisteransi@1.0.5: {} @@ -15973,21 +17072,12 @@ snapshots: ansi-styles: 6.2.1 is-fullwidth-code-point: 5.0.0 - smartwrap@2.0.2: - dependencies: - array.prototype.flat: 1.3.2 - breakword: 1.0.6 - grapheme-splitter: 1.0.4 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - yargs: 15.4.1 - snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.6.2 + tslib: 2.7.0 - sonic-boom@3.7.0: + sonic-boom@3.8.1: dependencies: atomic-sleep: 1.0.0 @@ -15995,7 +17085,7 @@ snapshots: dependencies: is-plain-obj: 4.1.0 - source-map-js@1.0.2: {} + source-map-js@1.2.1: {} source-map-support@0.5.21: dependencies: @@ -16017,20 +17107,6 @@ snapshots: cross-spawn: 5.1.0 signal-exit: 3.0.7 - spdx-correct@3.2.0: - dependencies: - spdx-expression-parse: 3.0.1 - spdx-license-ids: 3.0.16 - - spdx-exceptions@2.3.0: {} - - spdx-expression-parse@3.0.1: - dependencies: - spdx-exceptions: 2.3.0 - spdx-license-ids: 3.0.16 - - spdx-license-ids@3.0.16: {} - speech-rule-engine@4.0.7: dependencies: commander: 9.2.0 @@ -16075,10 +17151,6 @@ snapshots: dependencies: get-iterator: 1.0.2 - stream-transform@2.1.3: - dependencies: - mixme: 0.5.10 - streamsearch@1.1.0: {} string-argv@0.3.2: {} @@ -16101,7 +17173,7 @@ snapshots: emoji-regex: 10.4.0 strip-ansi: 7.1.0 - string-width@7.0.0: + string-width@7.2.0: dependencies: emoji-regex: 10.4.0 get-east-asian-width: 1.2.0 @@ -16162,7 +17234,7 @@ snapshots: strip-ansi@7.1.0: dependencies: - ansi-regex: 6.0.1 + ansi-regex: 6.1.0 strip-bom-string@1.0.0: {} @@ -16178,17 +17250,13 @@ snapshots: dependencies: is-hex-prefixed: 1.0.0 - strip-indent@3.0.0: - dependencies: - min-indent: 1.0.1 - strip-json-comments@2.0.1: {} strip-json-comments@3.1.1: {} - strip-literal@1.3.0: + strip-literal@2.1.0: dependencies: - acorn: 8.11.3 + js-tokens: 9.0.0 stubborn-fs@1.2.5: {} @@ -16196,10 +17264,10 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-jsx@5.1.1(react@18.2.0): + styled-jsx@5.1.1(react@18.3.1): dependencies: client-only: 0.0.1 - react: 18.2.0 + react: 18.3.1 stylis@4.3.1: {} @@ -16207,7 +17275,7 @@ snapshots: dependencies: '@jridgewell/gen-mapping': 0.3.3 commander: 4.1.1 - glob: 10.3.10 + glob: 10.4.5 lines-and-columns: 1.2.4 mz: 2.7.0 pirates: 4.0.6 @@ -16246,7 +17314,7 @@ snapshots: css-tree: 2.3.1 css-what: 6.1.0 csso: 5.0.5 - picocolors: 1.0.0 + picocolors: 1.1.0 sync-request@6.1.0: dependencies: @@ -16258,15 +17326,13 @@ snapshots: dependencies: get-port: 3.2.0 - tailwind-merge@2.1.0: - dependencies: - '@babel/runtime': 7.23.7 + tailwind-merge@2.5.2: {} - tailwindcss-animate@1.0.7(tailwindcss@3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))): + tailwindcss-animate@1.0.7(tailwindcss@3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))): dependencies: - tailwindcss: 3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) + tailwindcss: 3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) - tailwindcss@3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)): + tailwindcss@3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -16282,11 +17348,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.32 - postcss-import: 15.1.0(postcss@8.4.32) - postcss-js: 4.0.1(postcss@8.4.32) - postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) - postcss-nested: 6.0.1(postcss@8.4.32) + postcss: 8.4.47 + postcss-import: 15.1.0(postcss@8.4.47) + postcss-js: 4.0.1(postcss@8.4.47) + postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) + postcss-nested: 6.0.1(postcss@8.4.47) postcss-selector-parser: 6.0.15 resolve: 1.22.8 sucrase: 3.35.0 @@ -16327,7 +17393,7 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - tar@6.2.0: + tar@6.2.1: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 @@ -16349,14 +17415,14 @@ snapshots: '@types/concat-stream': 1.6.1 '@types/form-data': 0.0.33 '@types/node': 8.10.66 - '@types/qs': 6.9.11 + '@types/qs': 6.9.16 caseless: 0.12.0 concat-stream: 1.6.2 form-data: 2.5.1 http-basic: 8.1.3 http-response-object: 3.0.2 promise: 8.3.0 - qs: 6.11.2 + qs: 6.13.0 thenify-all@1.6.0: dependencies: @@ -16366,7 +17432,7 @@ snapshots: dependencies: any-promise: 1.3.0 - thread-stream@2.4.1: + thread-stream@2.7.0: dependencies: real-require: 0.2.0 @@ -16378,11 +17444,16 @@ snapshots: native-abort-controller: 1.0.4(abort-controller@3.0.0) retimer: 3.0.0 - tinybench@2.5.1: {} + tinybench@2.9.0: {} + + tinyglobby@0.2.6: + dependencies: + fdir: 6.3.0(picomatch@4.0.2) + picomatch: 4.0.2 - tinypool@0.8.1: {} + tinypool@0.8.4: {} - tinyspy@2.2.0: {} + tinyspy@2.2.1: {} title@3.5.3: dependencies: @@ -16395,15 +17466,13 @@ snapshots: tmp-promise@3.0.3: dependencies: - tmp: 0.2.1 + tmp: 0.2.3 tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 - tmp@0.2.1: - dependencies: - rimraf: 3.0.2 + tmp@0.2.3: {} to-buffer@1.1.1: {} @@ -16428,39 +17497,41 @@ snapshots: trim-lines@3.0.1: {} - trim-newlines@3.0.1: {} - trough@2.1.0: {} - ts-api-utils@1.0.3(typescript@5.3.3): + ts-api-utils@1.0.3(typescript@5.6.2): dependencies: - typescript: 5.3.3 + typescript: 5.6.2 + + ts-api-utils@1.3.0(typescript@5.6.2): + dependencies: + typescript: 5.6.2 ts-dedent@2.2.0: {} ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3): + ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2): dependencies: '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.9 + '@tsconfig/node10': 1.0.11 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.11.24 - acorn: 8.11.3 - acorn-walk: 8.3.1 + '@types/node': 20.16.5 + acorn: 8.12.1 + acorn-walk: 8.3.4 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.3.3 + typescript: 5.6.2 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - tsconfck@3.0.1(typescript@5.3.3): + tsconfck@3.1.3(typescript@5.6.2): optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 tsconfig-paths@3.15.0: dependencies: @@ -16471,38 +17542,34 @@ snapshots: tslib@2.6.2: {} - tsup@8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3): + tslib@2.7.0: {} + + tsup@8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1): dependencies: - bundle-require: 4.0.2(esbuild@0.19.11) + bundle-require: 5.0.0(esbuild@0.23.1) cac: 6.7.14 - chokidar: 3.5.3 - debug: 4.3.4(supports-color@8.1.1) - esbuild: 0.19.11 + chokidar: 3.6.0 + consola: 3.2.3 + debug: 4.3.7(supports-color@8.1.1) + esbuild: 0.23.1 execa: 5.1.1 - globby: 11.1.0 joycon: 3.1.1 - postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) + picocolors: 1.1.0 + postcss-load-config: 6.0.1(jiti@1.21.0)(postcss@8.4.47)(yaml@2.5.1) resolve-from: 5.0.0 - rollup: 4.9.2 + rollup: 4.22.2 source-map: 0.8.0-beta.0 sucrase: 3.35.0 + tinyglobby: 0.2.6 tree-kill: 1.2.2 optionalDependencies: - postcss: 8.4.32 - typescript: 5.3.3 + postcss: 8.4.47 + typescript: 5.6.2 transitivePeerDependencies: + - jiti - supports-color - - ts-node - - tty-table@4.2.3: - dependencies: - chalk: 4.1.2 - csv: 5.5.3 - kleur: 4.1.5 - smartwrap: 2.0.2 - strip-ansi: 6.0.1 - wcwidth: 1.0.1 - yargs: 17.7.2 + - tsx + - yaml tunnel-agent@0.6.0: dependencies: @@ -16514,22 +17581,16 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-detect@4.0.8: {} + type-detect@4.1.0: {} type-fest@0.12.0: {} - type-fest@0.13.1: {} - type-fest@0.20.2: {} type-fest@0.21.3: {} - type-fest@0.6.0: {} - type-fest@0.7.1: {} - type-fest@0.8.1: {} - type-fest@1.4.0: {} type-fest@2.19.0: {} @@ -16567,9 +17628,9 @@ snapshots: typescript@5.0.4: {} - typescript@5.3.3: {} + typescript@5.6.2: {} - ufo@1.3.2: {} + ufo@1.5.4: {} uint8array-extras@0.3.0: {} @@ -16584,7 +17645,7 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - undici-types@5.26.5: {} + undici-types@6.19.8: {} unicode-canonical-property-names-ecmascript@2.0.0: {} @@ -16597,6 +17658,8 @@ snapshots: unicode-property-aliases-ecmascript@2.1.0: {} + unicorn-magic@0.1.0: {} + unified@10.1.2: dependencies: '@types/unist': 2.0.11 @@ -16705,11 +17768,11 @@ snapshots: universalify@2.0.1: {} - update-browserslist-db@1.0.13(browserslist@4.22.2): + update-browserslist-db@1.1.0(browserslist@4.23.3): dependencies: - browserslist: 4.22.2 - escalade: 3.1.1 - picocolors: 1.0.0 + browserslist: 4.23.3 + escalade: 3.2.0 + picocolors: 1.1.0 update-check@1.5.4: dependencies: @@ -16718,11 +17781,11 @@ snapshots: upper-case-first@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 upper-case@2.0.2: dependencies: - tslib: 2.6.2 + tslib: 2.7.0 uri-js@4.4.1: dependencies: @@ -16745,20 +17808,13 @@ snapshots: uvu@0.5.6: dependencies: dequal: 2.0.3 - diff: 5.1.0 + diff: 5.2.0 kleur: 4.1.5 sade: 1.8.1 v8-compile-cache-lib@3.0.1: {} - validate-npm-package-license@3.0.4: - dependencies: - spdx-correct: 3.2.0 - spdx-expression-parse: 3.0.1 - - validate-npm-package-name@5.0.0: - dependencies: - builtins: 5.0.1 + validate-npm-package-name@5.0.1: {} value-or-promise@1.0.12: {} @@ -16797,142 +17853,126 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - viem@1.21.4(typescript@5.3.3)(zod@3.23.8): + viem@1.21.4(typescript@5.6.2)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.2.0 '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.3.3)(zod@3.23.8) + abitype: 0.9.8(typescript@5.6.2)(zod@3.23.8) isows: 1.0.3(ws@8.13.0) ws: 8.13.0 optionalDependencies: - typescript: 5.3.3 + typescript: 5.6.2 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - viem@2.21.3(typescript@5.0.4)(zod@3.23.8): + viem@2.21.10(typescript@5.6.2)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.0.4)(zod@3.23.8) + abitype: 1.0.5(typescript@5.6.2)(zod@3.23.8) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 optionalDependencies: - typescript: 5.0.4 + typescript: 5.6.2 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - viem@2.21.3(typescript@5.3.3)(zod@3.23.8): + viem@2.21.3(typescript@5.0.4)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.3.3)(zod@3.23.8) + abitype: 1.0.5(typescript@5.0.4)(zod@3.23.8) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 optionalDependencies: - typescript: 5.3.3 + typescript: 5.0.4 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - vite-node@1.0.2(@types/node@20.11.24): - dependencies: - cac: 6.7.14 - debug: 4.3.4(supports-color@8.1.1) - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 5.0.10(@types/node@20.11.24) - transitivePeerDependencies: - - '@types/node' - - less - - lightningcss - - sass - - stylus - - sugarss - - supports-color - - terser - - vite-node@1.1.1(@types/node@20.11.24): + vite-node@1.6.0(@types/node@20.16.5): dependencies: cac: 6.7.14 - debug: 4.3.4(supports-color@8.1.1) - pathe: 1.1.1 - picocolors: 1.0.0 - vite: 5.0.10(@types/node@20.11.24) + debug: 4.3.7(supports-color@8.1.1) + pathe: 1.1.2 + picocolors: 1.1.0 + vite: 5.4.7(@types/node@20.16.5) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color - terser - vite-tsconfig-paths@4.3.1(typescript@5.3.3)(vite@5.0.10(@types/node@20.11.24)): + vite-tsconfig-paths@4.3.2(typescript@5.6.2)(vite@5.4.7(@types/node@20.16.5)): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.7(supports-color@8.1.1) globrex: 0.1.2 - tsconfck: 3.0.1(typescript@5.3.3) + tsconfck: 3.1.3(typescript@5.6.2) optionalDependencies: - vite: 5.0.10(@types/node@20.11.24) + vite: 5.4.7(@types/node@20.16.5) transitivePeerDependencies: - supports-color - typescript - vite@5.0.10(@types/node@20.11.24): + vite@5.4.7(@types/node@20.16.5): dependencies: - esbuild: 0.19.11 - postcss: 8.4.32 - rollup: 4.9.2 + esbuild: 0.21.5 + postcss: 8.4.47 + rollup: 4.22.2 optionalDependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 fsevents: 2.3.3 - vitest@1.0.2(@types/node@20.11.24): + vitest@1.6.0(@types/node@20.16.5): dependencies: - '@vitest/expect': 1.0.2 - '@vitest/runner': 1.0.2 - '@vitest/snapshot': 1.0.2 - '@vitest/spy': 1.0.2 - '@vitest/utils': 1.0.2 - acorn-walk: 8.3.1 - cac: 6.7.14 - chai: 4.3.10 - debug: 4.3.4(supports-color@8.1.1) + '@vitest/expect': 1.6.0 + '@vitest/runner': 1.6.0 + '@vitest/snapshot': 1.6.0 + '@vitest/spy': 1.6.0 + '@vitest/utils': 1.6.0 + acorn-walk: 8.3.4 + chai: 4.5.0 + debug: 4.3.7(supports-color@8.1.1) execa: 8.0.1 local-pkg: 0.5.0 - magic-string: 0.30.5 - pathe: 1.1.1 - picocolors: 1.0.0 + magic-string: 0.30.11 + pathe: 1.1.2 + picocolors: 1.1.0 std-env: 3.7.0 - strip-literal: 1.3.0 - tinybench: 2.5.1 - tinypool: 0.8.1 - vite: 5.0.10(@types/node@20.11.24) - vite-node: 1.0.2(@types/node@20.11.24) - why-is-node-running: 2.2.2 + strip-literal: 2.1.0 + tinybench: 2.9.0 + tinypool: 0.8.4 + vite: 5.4.7(@types/node@20.16.5) + vite-node: 1.6.0(@types/node@20.16.5) + why-is-node-running: 2.3.0 optionalDependencies: - '@types/node': 20.11.24 + '@types/node': 20.16.5 transitivePeerDependencies: - less - lightningcss - sass + - sass-embedded - stylus - sugarss - supports-color @@ -16949,7 +17989,7 @@ snapshots: web-namespaces@2.0.1: {} - web-streams-polyfill@3.2.1: {} + web-streams-polyfill@3.3.3: {} web-worker@1.2.0: {} @@ -16961,7 +18001,7 @@ snapshots: web3-utils@1.7.0: dependencies: bn.js: 4.12.0 - ethereum-bloom-filters: 1.0.10 + ethereum-bloom-filters: 1.2.0 ethereumjs-util: 7.1.5 ethjs-unit: 0.1.6 number-to-bn: 1.7.0 @@ -16973,13 +18013,13 @@ snapshots: '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 - webcrypto-core@1.7.7: + webcrypto-core@1.8.0: dependencies: - '@peculiar/asn1-schema': 2.3.8 + '@peculiar/asn1-schema': 2.3.13 '@peculiar/json-schema': 1.1.12 asn1js: 3.0.5 pvtsutils: 1.3.5 - tslib: 2.6.2 + tslib: 2.7.0 webidl-conversions@3.0.1: {} @@ -16996,7 +18036,7 @@ snapshots: tr46: 1.0.1 webidl-conversions: 4.0.2 - when-exit@2.1.2: {} + when-exit@2.1.3: {} which-boxed-primitive@1.0.2: dependencies: @@ -17028,13 +18068,6 @@ snapshots: is-weakmap: 2.0.1 is-weakset: 2.0.2 - which-module@2.0.1: {} - - which-pm@2.0.0: - dependencies: - load-yaml-file: 0.2.0 - path-exists: 4.0.0 - which-typed-array@1.1.13: dependencies: available-typed-arrays: 1.0.5 @@ -17051,7 +18084,7 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.2.2: + why-is-node-running@2.3.0: dependencies: siginfo: 2.0.0 stackback: 0.0.2 @@ -17066,13 +18099,9 @@ snapshots: dependencies: string-width: 5.1.2 - wordwrap@1.0.0: {} + word-wrap@1.2.5: {} - wrap-ansi@6.2.0: - dependencies: - ansi-styles: 4.3.0 - string-width: 4.2.3 - strip-ansi: 6.0.1 + wordwrap@1.0.0: {} wrap-ansi@7.0.0: dependencies: @@ -17089,27 +18118,23 @@ snapshots: wrap-ansi@9.0.0: dependencies: ansi-styles: 6.2.1 - string-width: 7.0.0 + string-width: 7.2.0 strip-ansi: 7.1.0 wrappy@1.0.2: {} - ws@7.5.9: {} + ws@7.5.10: {} ws@8.13.0: {} - ws@8.16.0: {} - ws@8.17.1: {} + ws@8.18.0: {} + xmldom-sre@0.1.31: {} xtend@4.0.2: {} - y18n@4.0.3: {} - - y18n@5.0.8: {} - yallist@2.1.2: {} yallist@3.1.1: {} @@ -17120,37 +18145,10 @@ snapshots: yaml@2.3.4: {} - yargs-parser@18.1.3: - dependencies: - camelcase: 5.3.1 - decamelize: 1.2.0 + yaml@2.5.1: {} yargs-parser@21.1.1: {} - yargs@15.4.1: - dependencies: - cliui: 6.0.0 - decamelize: 1.2.0 - find-up: 4.1.0 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - require-main-filename: 2.0.0 - set-blocking: 2.0.0 - string-width: 4.2.3 - which-module: 2.0.1 - y18n: 4.0.3 - yargs-parser: 18.1.3 - - yargs@17.7.2: - dependencies: - cliui: 8.0.1 - escalade: 3.1.1 - get-caller-file: 2.0.5 - require-directory: 2.1.1 - string-width: 4.2.3 - y18n: 5.0.8 - yargs-parser: 21.1.1 - yn@3.1.1: {} yocto-queue@0.1.0: {} From 4e8295a0ee84dd0268db7c88241b0d029edfa875 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Fri, 20 Sep 2024 18:17:54 -0400 Subject: [PATCH 02/29] good --- ...tenebrous.sql => 0000_equal_tarantula.sql} | 2 +- .../migrations/meta/0000_snapshot.json | 10 +- .../migrations/meta/_journal.json | 4 +- .../feature-api-functions/ponder.offchain.ts | 41 +- .../feature-api-functions/src/api/index.ts | 29 +- packages/core/src/bin/utils/runServer.ts | 3 +- .../src/build/configAndIndexingFunctions.ts | 4 + packages/core/src/build/service.ts | 58 +- packages/core/src/common/metrics.ts | 2 +- packages/core/src/common/options.ts | 4 + packages/core/src/database/index.ts | 4 +- packages/core/src/drizzle/bigint.ts | 35 - packages/core/src/drizzle/db.ts | 30 +- packages/core/src/drizzle/hex.ts | 37 +- packages/core/src/drizzle/json.ts | 34 - packages/core/src/drizzle/list.ts | 53 +- packages/core/src/drizzle/runtime.ts | 121 +-- packages/core/src/drizzle/select.ts | 709 ------------------ packages/core/src/drizzle/table.ts | 11 +- packages/core/src/index.ts | 35 +- packages/core/src/indexing/service.ts | 8 +- packages/core/src/server/index.ts | 6 +- packages/core/src/utils/pg.ts | 2 +- 23 files changed, 202 insertions(+), 1040 deletions(-) rename examples/feature-api-functions/migrations/{0000_lying_tenebrous.sql => 0000_equal_tarantula.sql} (83%) delete mode 100644 packages/core/src/drizzle/bigint.ts delete mode 100644 packages/core/src/drizzle/json.ts delete mode 100644 packages/core/src/drizzle/select.ts diff --git a/examples/feature-api-functions/migrations/0000_lying_tenebrous.sql b/examples/feature-api-functions/migrations/0000_equal_tarantula.sql similarity index 83% rename from examples/feature-api-functions/migrations/0000_lying_tenebrous.sql rename to examples/feature-api-functions/migrations/0000_equal_tarantula.sql index 7f5bbcc73..38cc0275c 100644 --- a/examples/feature-api-functions/migrations/0000_lying_tenebrous.sql +++ b/examples/feature-api-functions/migrations/0000_equal_tarantula.sql @@ -2,5 +2,5 @@ CREATE SCHEMA "offchain"; --> statement-breakpoint CREATE TABLE IF NOT EXISTS "offchain"."metadata" ( "id" serial PRIMARY KEY NOT NULL, - "value" text + "account" "bytea" NOT NULL ); diff --git a/examples/feature-api-functions/migrations/meta/0000_snapshot.json b/examples/feature-api-functions/migrations/meta/0000_snapshot.json index 017d10779..59018c761 100644 --- a/examples/feature-api-functions/migrations/meta/0000_snapshot.json +++ b/examples/feature-api-functions/migrations/meta/0000_snapshot.json @@ -1,5 +1,5 @@ { - "id": "fefece60-8cf5-4461-a55d-52e62085ac74", + "id": "a14201cb-be7c-4893-b690-69665c18479c", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -14,11 +14,11 @@ "primaryKey": true, "notNull": true }, - "value": { - "name": "value", - "type": "text", + "account": { + "name": "account", + "type": "bytea", "primaryKey": false, - "notNull": false + "notNull": true } }, "indexes": {}, diff --git a/examples/feature-api-functions/migrations/meta/_journal.json b/examples/feature-api-functions/migrations/meta/_journal.json index f5494241b..67056d876 100644 --- a/examples/feature-api-functions/migrations/meta/_journal.json +++ b/examples/feature-api-functions/migrations/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "7", - "when": 1726860017672, - "tag": "0000_lying_tenebrous", + "when": 1726868577670, + "tag": "0000_equal_tarantula", "breakpoints": true } ] diff --git a/examples/feature-api-functions/ponder.offchain.ts b/examples/feature-api-functions/ponder.offchain.ts index 2577e4f4f..0d58d526f 100644 --- a/examples/feature-api-functions/ponder.offchain.ts +++ b/examples/feature-api-functions/ponder.offchain.ts @@ -1,8 +1,45 @@ -import { pgSchema, serial, text } from "drizzle-orm/pg-core"; +import { entityKind } from "drizzle-orm"; +import { pgSchema, serial } from "drizzle-orm/pg-core"; +import { + type AnyPgTable, + PgColumn, + PgColumnBuilder, +} from "drizzle-orm/pg-core"; +import { bytesToHex, hexToBytes } from "viem"; + +const ponderHex = (columnName: string) => new PgHexBuilder(columnName); + +export class PgHexBuilder extends PgColumnBuilder { + static override readonly [entityKind]: string = "PgHexBuilder"; + + constructor(columnName: string) { + super(columnName, "buffer", "PgHex"); + } + + build(table: AnyPgTable) { + return new PgHex(table, this.config); + } +} + +export class PgHex extends PgColumn { + static override readonly [entityKind]: string = "PgHex"; + + getSQLType(): string { + return "bytea"; + } + + override mapFromDriverValue(value: Buffer) { + return bytesToHex(value); + } + + override mapToDriverValue(value: `0x${string}`): Buffer { + return Buffer.from(hexToBytes(value)); + } +} export const offchainSchema = pgSchema("offchain"); export const metadata = offchainSchema.table("metadata", { id: serial("id").primaryKey(), - value: text("value"), + account: ponderHex("account").notNull(), }); diff --git a/examples/feature-api-functions/src/api/index.ts b/examples/feature-api-functions/src/api/index.ts index 219dbde3b..13ea5e1ba 100644 --- a/examples/feature-api-functions/src/api/index.ts +++ b/examples/feature-api-functions/src/api/index.ts @@ -1,6 +1,8 @@ import { ponder } from "@/generated"; -import { count, desc, eq, graphql, or, replaceBigInts } from "@ponder/core"; +import { graphql, replaceBigInts } from "@ponder/core"; +import { count, desc, eq, or } from "drizzle-orm"; import { formatEther, getAddress } from "viem"; +import * as offchainSchema from "../../ponder.offchain"; ponder.use("/graphql", graphql()); @@ -45,3 +47,28 @@ ponder.get("/whale-transfers", async (c) => { if (result.length === 0) return c.text("Not found", 500); return c.json(replaceBigInts(result, (b) => formatEther(b))); }); + +ponder.get("/register/:address", async (c) => { + const account = getAddress(c.req.param("address")); + await c.db.insert(offchainSchema.metadata).values({ account }); + + return c.text("", 200); +}); + +ponder.get("/user-transfers", async (c) => { + // Top 5 largest transfers to registered users + const result = await c.db + .select({ + amount: c.tables.TransferEvent.amount, + account: offchainSchema.metadata.account, + }) + .from(c.tables.TransferEvent) + .innerJoin( + offchainSchema.metadata, + eq(c.tables.TransferEvent.toId, offchainSchema.metadata.account), + ) + .orderBy(c.tables.TransferEvent.amount) + .limit(5); + + return c.json(replaceBigInts(result, (b) => formatEther(b))); +}); diff --git a/packages/core/src/bin/utils/runServer.ts b/packages/core/src/bin/utils/runServer.ts index f6a35c417..75eee3ca9 100644 --- a/packages/core/src/bin/utils/runServer.ts +++ b/packages/core/src/bin/utils/runServer.ts @@ -13,7 +13,7 @@ export async function runServer({ common: Common; build: ApiBuild; }) { - const { databaseConfig, schema } = build; + const { databaseConfig, schema, offchainSchema } = build; const database = createDatabase({ common, @@ -26,6 +26,7 @@ export async function runServer({ routes: build.routes, common, schema, + offchainSchema, database, }); diff --git a/packages/core/src/build/configAndIndexingFunctions.ts b/packages/core/src/build/configAndIndexingFunctions.ts index 67a0d9a94..612329ca7 100644 --- a/packages/core/src/build/configAndIndexingFunctions.ts +++ b/packages/core/src/build/configAndIndexingFunctions.ts @@ -174,6 +174,10 @@ export async function buildConfigAndIndexingFunctions({ } } + if (databaseConfig.kind === "sqlite") { + throw new Error("Only postgres is supported for this experimental release"); + } + const networks: Network[] = await Promise.all( Object.entries(config.networks).map(async ([networkName, network]) => { const { chainId, transport } = network; diff --git a/packages/core/src/build/service.ts b/packages/core/src/build/service.ts index f37b94285..0eeda434e 100644 --- a/packages/core/src/build/service.ts +++ b/packages/core/src/build/service.ts @@ -55,6 +55,7 @@ type BaseBuild = { // Schema schema: Schema; graphqlSchema: GraphQLSchema; + offchainSchema?: { [name: string]: unknown }; }; export type IndexingBuild = BaseBuild & { @@ -189,6 +190,7 @@ export const start = async ( // it's possible for ViteNodeRunner to return exports as undefined (a race condition). const configResult = await executeConfig(buildService); const schemaResult = await executeSchema(buildService); + const offchainSchemaResult = await executeOffchainSchema(buildService); const indexingResult = await executeIndexingFunctions(buildService); const apiResult = await executeApiRoutes(buildService); @@ -204,6 +206,12 @@ export const start = async ( api: { status: "error", error: schemaResult.error }, }; } + if (offchainSchemaResult.status === "error") { + return { + indexing: { status: "error", error: offchainSchemaResult.error }, + api: { status: "error", error: offchainSchemaResult.error }, + }; + } if (indexingResult.status === "error") { return { indexing: { status: "error", error: indexingResult.error }, @@ -219,6 +227,7 @@ export const start = async ( let cachedConfigResult = configResult; let cachedSchemaResult = schemaResult; + let cachedOffchainSchemaResult = offchainSchemaResult; let cachedIndexingResult = indexingResult; let cachedApiResult = apiResult; @@ -269,6 +278,9 @@ export const start = async ( const hasSchemaUpdate = invalidated.includes( common.options.schemaFile.replace(/\\/g, "/"), ); + const hasOffchainSchemaUpdate = invalidated.includes( + common.options.offchainSchemaFile.replace(/\\/g, "/"), + ); const hasIndexingUpdate = invalidated.some( (file) => buildService.indexingRegex.test(file) && @@ -283,6 +295,7 @@ export const start = async ( if ( !hasConfigUpdate && !hasSchemaUpdate && + !hasOffchainSchemaUpdate && !hasIndexingUpdate && !hasApiUpdate ) { @@ -314,6 +327,16 @@ export const start = async ( cachedSchemaResult = result; } + if (hasOffchainSchemaUpdate) { + const result = await executeOffchainSchema(buildService); + if (result.status === "error") { + onIndexingBuild({ status: "error", error: result.error }); + return; + } + + cachedOffchainSchemaResult = result; + } + if (hasIndexingUpdate) { const files = glob.sync(buildService.indexingPattern, { ignore: buildService.apiPattern, @@ -359,6 +382,7 @@ export const start = async ( buildService, cachedConfigResult, cachedSchemaResult, + cachedOffchainSchemaResult, cachedIndexingResult, ); if (indexingBuildResult.status === "error") { @@ -368,7 +392,7 @@ export const start = async ( } // If schema or config is updated, rebuild both api and indexing - if (hasConfigUpdate || hasSchemaUpdate) { + if (hasConfigUpdate || hasSchemaUpdate || hasOffchainSchemaUpdate) { onIndexingBuild(indexingBuildResult); onApiBuild( validateAndBuildApi( @@ -405,6 +429,7 @@ export const start = async ( buildService, configResult, schemaResult, + offchainSchemaResult, indexingResult, ); @@ -493,6 +518,35 @@ const executeSchema = async ( return { status: "success", schema, contentHash }; }; +const executeOffchainSchema = async ( + buildService: Service, +): Promise< + | { status: "success"; offchainSchema?: { [name: string]: unknown } } + | { status: "error"; error: Error } +> => { + if (fs.existsSync(buildService.common.options.offchainSchemaFile) === false) { + return { status: "success" }; + } + + const executeResult = await executeFile(buildService, { + file: buildService.common.options.offchainSchemaFile, + }); + + if (executeResult.status === "error") { + buildService.common.logger.error({ + service: "build", + msg: "Error while executing 'ponder.offchain.ts':", + error: executeResult.error, + }); + + return executeResult; + } + + const offchainSchema = executeResult.exports; + + return { status: "success", offchainSchema }; +}; + const executeIndexingFunctions = async ( buildService: Service, ): Promise< @@ -600,6 +654,7 @@ const validateAndBuild = async ( { common }: Pick, config: { config: Config; contentHash: string }, schema: { schema: Schema; contentHash: string }, + offchainSchemaResult: { offchainSchema?: { [name: string]: unknown } }, indexingFunctions: { indexingFunctions: RawIndexingFunctions; contentHash: string; @@ -667,6 +722,7 @@ const validateAndBuild = async ( networks: buildConfigAndIndexingFunctionsResult.networks, sources: buildConfigAndIndexingFunctionsResult.sources, schema: buildSchemaResult.schema, + offchainSchema: offchainSchemaResult.offchainSchema, graphqlSchema, indexingFunctions: buildConfigAndIndexingFunctionsResult.indexingFunctions, diff --git a/packages/core/src/common/metrics.ts b/packages/core/src/common/metrics.ts index 663111e38..f8ba40dc1 100644 --- a/packages/core/src/common/metrics.ts +++ b/packages/core/src/common/metrics.ts @@ -284,7 +284,7 @@ export async function getSyncProgress(metrics: MetricsService): Promise< if (requestCount[m.labels.network!] === undefined) { requestCount[m.labels.network!] = 0; } - requestCount[m.labels.network!] += m.value; + requestCount[m.labels.network!]! += m.value; } } diff --git a/packages/core/src/common/options.ts b/packages/core/src/common/options.ts index 682583a69..4a71f3906 100644 --- a/packages/core/src/common/options.ts +++ b/packages/core/src/common/options.ts @@ -8,12 +8,14 @@ export type Options = { configFile: string; schemaFile: string; + offchainSchemaFile: string; rootDir: string; indexingDir: string; apiDir: string; generatedDir: string; ponderDir: string; logDir: string; + migrationsDir: string; port: number; hostname?: string; @@ -81,11 +83,13 @@ export const buildOptions = ({ cliOptions }: { cliOptions: CliOptions }) => { rootDir, configFile: path.join(rootDir, cliOptions.config), schemaFile: path.join(rootDir, "ponder.schema.ts"), + offchainSchemaFile: path.join(rootDir, "ponder.offchain.ts"), indexingDir: path.join(rootDir, "src"), apiDir: path.join(rootDir, "src", "api"), generatedDir: path.join(rootDir, "generated"), ponderDir: path.join(rootDir, ".ponder"), logDir: path.join(rootDir, ".ponder", "logs"), + migrationsDir: path.join(rootDir, "migrations"), port, hostname, diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index 2dec76b88..7e0183a71 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -27,7 +27,7 @@ import { zeroCheckpoint, } from "@/utils/checkpoint.js"; import { formatEta } from "@/utils/format.js"; -import { createPool, createReadonlyPool } from "@/utils/pg.js"; +import { createPool } from "@/utils/pg.js"; import { type SqliteDatabase, createReadonlySqliteDatabase, @@ -247,7 +247,7 @@ export const createDatabase = (args: { application_name: `${namespace}_user`, max: userMax, }), - readonly: createReadonlyPool({ + readonly: createPool({ ...args.databaseConfig.poolConfig, application_name: `${namespace}_readonly`, max: readonlyMax, diff --git a/packages/core/src/drizzle/bigint.ts b/packages/core/src/drizzle/bigint.ts deleted file mode 100644 index 0e499df67..000000000 --- a/packages/core/src/drizzle/bigint.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { decodeToBigInt, encodeAsText } from "@/utils/encoding.js"; -import { entityKind } from "drizzle-orm"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; - -export class SQLiteBigintBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteBigintBuilder"; - - constructor(columnName: string) { - super(columnName, "string", "SQLiteBigint"); - } - - build(table: AnySQLiteTable) { - return new SQLiteBigint(table, this.config); - } -} - -export class SQLiteBigint extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteBigint"; - - getSQLType(): string { - return "varchar(79)"; - } - - override mapFromDriverValue(value: string) { - return decodeToBigInt(value); - } - - override mapToDriverValue(value: bigint): string { - return encodeAsText(value as bigint); - } -} diff --git a/packages/core/src/drizzle/db.ts b/packages/core/src/drizzle/db.ts index 76b87d550..e734ac5c1 100644 --- a/packages/core/src/drizzle/db.ts +++ b/packages/core/src/drizzle/db.ts @@ -1,29 +1,3 @@ -import type { Column, SQLWrapper, SelectedFields, Table } from "drizzle-orm"; -import type { SelectBuilder } from "./select.js"; +import type { NodePgDatabase } from "drizzle-orm/node-postgres"; -export type DrizzleDb = { - select(): SelectBuilder; - select>( - fields: TSelection, - ): SelectBuilder; - select( - fields?: SelectedFields, - ): SelectBuilder | undefined, "async", void>; - /** - * Execute a raw read-only SQL query.. - * - * @example - * import { ponder } from "@/generated"; - * import { sql } from "@ponder/core"; - * - * ponder.get("/", async (c) => { - * const result = await c.db.execute(sql`SELECT * from "Accounts"`); - * return c.json(result); - * }); - * - * @see https://orm.drizzle.team/docs/sql - */ - execute: >( - query: SQLWrapper, - ) => Promise; -}; +export type DrizzleDb = NodePgDatabase; diff --git a/packages/core/src/drizzle/hex.ts b/packages/core/src/drizzle/hex.ts index 40708fd7a..fa921a931 100644 --- a/packages/core/src/drizzle/hex.ts +++ b/packages/core/src/drizzle/hex.ts @@ -4,15 +4,10 @@ import { PgColumn, PgColumnBuilder, } from "drizzle-orm/pg-core"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; import { bytesToHex, hexToBytes } from "viem"; export class PgHexBuilder extends PgColumnBuilder { - static readonly [entityKind]: string = "PgHexBuilder"; + static override readonly [entityKind]: string = "PgHexBuilder"; constructor(columnName: string) { super(columnName, "buffer", "PgHex"); @@ -24,7 +19,7 @@ export class PgHexBuilder extends PgColumnBuilder { } export class PgHex extends PgColumn { - static readonly [entityKind]: string = "PgHex"; + static override readonly [entityKind]: string = "PgHex"; getSQLType(): string { return "bytea"; @@ -38,31 +33,3 @@ export class PgHex extends PgColumn { return Buffer.from(hexToBytes(value)); } } - -export class SQLiteHexBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteHexBuilder"; - - constructor(columnName: string) { - super(columnName, "buffer", "SQLiteHex"); - } - - build(table: AnySQLiteTable) { - return new SQLiteHex(table, this.config); - } -} - -export class SQLiteHex extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteHex"; - - getSQLType(): string { - return "blob"; - } - - override mapFromDriverValue(value: Buffer) { - return bytesToHex(value); - } - - override mapToDriverValue(value: `0x${string}`): Buffer { - return Buffer.from(hexToBytes(value)); - } -} diff --git a/packages/core/src/drizzle/json.ts b/packages/core/src/drizzle/json.ts deleted file mode 100644 index 1503ce56f..000000000 --- a/packages/core/src/drizzle/json.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { entityKind } from "drizzle-orm"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; - -export class SQLiteJsonBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteJsonBuilder"; - - constructor(columnName: string) { - super(columnName, "json", "SQLiteJson"); - } - - build(table: AnySQLiteTable) { - return new SQLiteJson(table, this.config); - } -} - -export class SQLiteJson extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteJson"; - - getSQLType(): string { - return "jsonb"; - } - - override mapFromDriverValue(value: string) { - return JSON.parse(value); - } - - override mapToDriverValue(value: object): string { - return JSON.stringify(value); - } -} diff --git a/packages/core/src/drizzle/list.ts b/packages/core/src/drizzle/list.ts index 2139c96ce..b16776957 100644 --- a/packages/core/src/drizzle/list.ts +++ b/packages/core/src/drizzle/list.ts @@ -5,14 +5,9 @@ import { PgColumn, PgColumnBuilder, } from "drizzle-orm/pg-core"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; export class PgListBuilder extends PgColumnBuilder { - static readonly [entityKind]: string = "PgListBuilder"; + static override readonly [entityKind]: string = "PgListBuilder"; element: Scalar; constructor(columnName: string, element: Scalar) { @@ -26,7 +21,7 @@ export class PgListBuilder extends PgColumnBuilder { } export class PgList extends PgColumn { - static readonly [entityKind]: string = "PgList"; + static override readonly [entityKind]: string = "PgList"; element: Scalar; constructor( @@ -54,47 +49,3 @@ export class PgList extends PgColumn { : JSON.stringify(value); } } - -export class SQLiteListBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteListBuilder"; - element: Scalar; - - constructor(columnName: string, element: Scalar) { - super(columnName, "string", "PgList"); - this.element = element; - } - - build(table: AnySQLiteTable) { - return new SQLiteList(table, this.config, this.element); - } -} - -export class SQLiteList extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteList"; - element: Scalar; - - constructor( - table: AnyPgTable, - config: SQLiteListBuilder["config"], - element: Scalar, - ) { - super(table, config); - this.element = element; - } - - getSQLType(): string { - return "text"; - } - - override mapFromDriverValue(value: string) { - return this.element === "bigint" - ? JSON.parse(value).map(BigInt) - : JSON.parse(value); - } - - override mapToDriverValue(value: Array): string { - return this.element === "bigint" - ? JSON.stringify(value.map(String)) - : JSON.stringify(value); - } -} diff --git a/packages/core/src/drizzle/runtime.ts b/packages/core/src/drizzle/runtime.ts index cbd5ab6e8..ef69483c7 100644 --- a/packages/core/src/drizzle/runtime.ts +++ b/packages/core/src/drizzle/runtime.ts @@ -10,9 +10,6 @@ import { isScalarColumn, } from "@/schema/utils.js"; import { getTables } from "@/schema/utils.js"; -import type { SqliteDatabase } from "@/utils/sqlite.js"; -import { type Table, TableAliasProxyHandler } from "drizzle-orm"; -import { drizzle as drizzleSQLite } from "drizzle-orm/better-sqlite3"; import { drizzle as drizzlePg } from "drizzle-orm/node-postgres"; import { pgSchema, pgTable } from "drizzle-orm/pg-core"; import { @@ -22,71 +19,29 @@ import { numeric as PgNumeric, text as PgText, } from "drizzle-orm/pg-core"; -import type { View } from "drizzle-orm/sql"; import { integer as SQLiteInteger, real as SQLiteReal, text as SQLiteText, - sqliteTable, } from "drizzle-orm/sqlite-core"; import type { Pool } from "pg"; -import { SQLiteBigintBuilder } from "./bigint.js"; -import { PgHexBuilder, SQLiteHexBuilder } from "./hex.js"; -import { SQLiteJsonBuilder } from "./json.js"; -import { PgListBuilder, SQLiteListBuilder } from "./list.js"; -import type { BuildAliasTable } from "./select.js"; +import { PgHexBuilder } from "./hex.js"; +import { PgListBuilder } from "./list.js"; export const createDrizzleDb = (database: Database) => { - if (database.dialect === "postgres") { - const drizzle = drizzlePg(database.driver.readonly as Pool); - return { - // @ts-ignore - select: (...args: any[]) => drizzle.select(...args), - execute: (query: any) => drizzle.execute(query), - }; - } else { - const drizzle = drizzleSQLite(database.driver.readonly as SqliteDatabase); - return { - // @ts-ignore - select: (...args: any[]) => drizzle.select(...args), - execute: (query: any) => { - try { - try { - return drizzle.all(query); - } catch (e) { - const error = e as Error; - if ( - error.name === "SqliteError" && - error.message === - "This statement does not return data. Use run() instead" - ) { - return drizzle.run(query); - } else { - throw error; - } - } - } catch (e) { - const error = e as Error; - if (error.cause) throw error.cause; - throw error; - } - }, - }; - } + return drizzlePg(database.driver.readonly as Pool); }; -export function alias( - table: tableOrView, - alias: alias, -): BuildAliasTable { - return new Proxy(table, new TableAliasProxyHandler(alias, false)) as any; -} - -type SQLiteTable = Parameters[1]; type PostgresTable = Parameters[1]; type DrizzleTable = { [tableName: string]: any }; -export const createDrizzleTables = (schema: Schema, database: Database) => { +export const createDrizzleTables = ({ + schema, + database, +}: { + schema: Schema; + database: Database; +}) => { const drizzleTables: { [tableName: string]: DrizzleTable } = {}; for (const [tableName, { table }] of Object.entries(getTables(schema))) { @@ -176,24 +131,17 @@ export const createDrizzleTables = (schema: Schema, database: Database) => { } } - if (database.dialect === "postgres") { - // Note: this is to avoid an error thrown by drizzle when - // setting schema to "public". - if (database.namespace === "public") { - drizzleTables[tableName] = pgTable( - tableName, - drizzleColumns as PostgresTable, - ); - } else { - drizzleTables[tableName] = pgSchema(database.namespace).table( - tableName, - drizzleColumns as PostgresTable, - ); - } + // Note: this is to avoid an error thrown by drizzle when + // setting schema to "public". + if (database.namespace === "public") { + drizzleTables[tableName] = pgTable( + tableName, + drizzleColumns as PostgresTable, + ); } else { - drizzleTables[tableName] = sqliteTable( + drizzleTables[tableName] = pgSchema(database.namespace).table( tableName, - drizzleColumns as SQLiteTable, + drizzleColumns as PostgresTable, ); } } @@ -201,6 +149,10 @@ export const createDrizzleTables = (schema: Schema, database: Database) => { return drizzleTables; }; +export const ponderHex = (columnName: string) => new PgHexBuilder(columnName); +export const ponderBigint = (columnName: string) => + PgNumeric(columnName, { precision: 78 }); + const convertStringColumn = ( columnName: string, kind: "sqlite" | "postgres", @@ -228,35 +180,30 @@ const convertBooleanColumn = ( return kind === "sqlite" ? SQLiteInteger(columnName) : PgInteger(columnName); }; -const convertHexColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" - ? new SQLiteHexBuilder(columnName) - : new PgHexBuilder(columnName); +const convertHexColumn = (columnName: string, _kind: "sqlite" | "postgres") => { + return new PgHexBuilder(columnName); }; const convertBigintColumn = ( columnName: string, - kind: "sqlite" | "postgres", + _kind: "sqlite" | "postgres", ) => { - return kind === "sqlite" - ? new SQLiteBigintBuilder(columnName) - : PgNumeric(columnName, { precision: 78 }); + return PgNumeric(columnName, { precision: 78 }); }; const convertListColumn = ( columnName: string, - kind: "sqlite" | "postgres", + _kind: "sqlite" | "postgres", element: Scalar, ) => { - return kind === "sqlite" - ? new SQLiteListBuilder(columnName, element) - : new PgListBuilder(columnName, element); + return new PgListBuilder(columnName, element); }; -const convertJsonColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" - ? new SQLiteJsonBuilder(columnName) - : PgJsonb(columnName); +const convertJsonColumn = ( + columnName: string, + _kind: "sqlite" | "postgres", +) => { + return PgJsonb(columnName); }; const convertEnumColumn = (columnName: string, kind: "sqlite" | "postgres") => { diff --git a/packages/core/src/drizzle/select.ts b/packages/core/src/drizzle/select.ts deleted file mode 100644 index dc6a592d2..000000000 --- a/packages/core/src/drizzle/select.ts +++ /dev/null @@ -1,709 +0,0 @@ -import type { - Assume, - Column, - MakeColumnConfig, - QueryPromise, - SelectedFields, - SelectedFieldsOrdered, - Subquery, - Table, - TableConfig, - UpdateTableConfig, - ValidateShape, - entityKind, -} from "drizzle-orm"; -import { TypedQueryBuilder } from "drizzle-orm/query-builders/query-builder"; -import type { - AddAliasToSelection, - AppendToNullabilityMap, - AppendToResult, - BuildSubquerySelection, - GetSelectTableName, - GetSelectTableSelection, - JoinNullability, - JoinType, - SelectMode, - SelectResult, - SetOperator, -} from "drizzle-orm/query-builders/select.types"; -import type { - ColumnsSelection, - Placeholder, - Query, - SQL, - View, -} from "drizzle-orm/sql"; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.ts#L54 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.ts#L50 - */ -export type SelectBuilder< - TSelection extends SelectedFields | undefined, - TResultType extends "sync" | "async", - TRunResult, - TBuilderMode extends "db" | "qb" = "db", -> = { - from: ( - source: TFrom, - ) => CreateSelectFromBuilderMode< - TBuilderMode, - GetSelectTableName, - TResultType, - TRunResult, - TSelection extends undefined ? GetSelectTableSelection : TSelection, - TSelection extends undefined ? "single" : "partial" - >; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.ts#L126 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.ts#L130 - */ -export abstract class SelectQueryBuilderBase< - THKT extends SelectHKTBase, - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode, - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult extends any[] = SelectResult< - TSelection, - TSelectMode, - TNullabilityMap - >[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, -> extends TypedQueryBuilder { - declare [entityKind]: string; - declare _: { - readonly hkt: THKT; - readonly tableName: TTableName; - readonly resultType: TResultType; - readonly runResult: TRunResult; - readonly selection: TSelection; - readonly selectMode: TSelectMode; - readonly nullabilityMap: TNullabilityMap; - readonly dynamic: TDynamic; - readonly excludedMethods: TExcludedMethods; - readonly result: TResult; - readonly selectedFields: TSelectedFields; - }; - - declare leftJoin: JoinFn; - declare rightJoin: JoinFn; - declare innerJoin: JoinFn; - declare fullJoin: JoinFn; - - private declare setOperator: >( - rightSelection: - | (( - setOperators: GetSetOperators, - ) => SetOperatorRightSelect) - | SetOperatorRightSelect, - ) => SelectWithout; - - declare union: typeof this.setOperator; - declare unionAll: typeof this.setOperator; - declare intersect: typeof this.setOperator; - declare intersectAll: typeof this.setOperator; - declare except: typeof this.setOperator; - declare exceptAll: typeof this.setOperator; - - declare where: ( - where: ((aliases: TSelection) => SQL | undefined) | SQL | undefined, - ) => SelectWithout; - - declare having: ( - having: - | ((aliases: this["_"]["selection"]) => SQL | undefined) - | SQL - | undefined, - ) => SelectWithout; - - declare groupBy: ( - ...columns: (Column | SQL)[] - ) => SelectWithout; - - declare orderBy: ( - ...columns: (Column | SQL)[] - ) => SelectWithout; - - declare limit: ( - limit: number | Placeholder, - ) => SelectWithout; - - declare offset: ( - offset: number | Placeholder, - ) => SelectWithout; - - declare toSQL: () => Query; - - declare as: ( - alias: TAlias, - ) => SubqueryWithSelection; - - declare $dynamic: () => SelectDynamic; -} - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.ts#L803 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.ts#L903 - */ -export type SelectBase< - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode = "single", - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult = SelectResult[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, -> = SelectQueryBuilderBase< - SelectHKT, - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode, - TNullabilityMap, - TDynamic, - TExcludedMethods, - // @ts-ignore - TResult, - TSelectedFields -> & - QueryPromise; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L31 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L30 - */ -export type SelectJoinConfig = { - on: SQL; - table: Table | Subquery | View | SQL; - alias: string | undefined; - joinType: JoinType; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L38 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L30 - */ -export type BuildAliasTable< - tableOrView extends Table | View, - alias extends string, -> = tableOrView extends Table - ? TableWithColumns< - UpdateTableConfig< - tableOrView["_"]["config"], - { - name: alias; - columns: MapColumnsToTableAlias; - } - > - > - : tableOrView extends View - ? ViewWithSelection< - alias, - tableOrView["_"]["existing"], - MapColumnsToTableAlias - > - : never; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L52 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L52 - */ -export type SelectConfig = { - withList?: Subquery[]; - fields: Record; - fieldsFlat?: SelectedFieldsOrdered; - where?: SQL; - having?: SQL; - table: Table | Subquery | View | SQL; - limit?: number | Placeholder; - offset?: number | Placeholder; - joins?: SelectJoinConfig[]; - orderBy?: (Column | SQL | SQL.Aliased)[]; - groupBy?: (Column | SQL | SQL.Aliased)[]; - distinct?: boolean; - setOperators: { - rightSelect: TypedQueryBuilder; - type: SetOperator; - isAll: boolean; - orderBy?: (Column | SQL | SQL.Aliased)[]; - limit?: number | Placeholder; - offset?: number | Placeholder; - }[]; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L75 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L82 - */ -export type Join< - T extends AnySelectQueryBuilder, - TDynamic extends boolean, - TJoinType extends JoinType, - TJoinedTable extends Table | Subquery | View | SQL, - TJoinedName extends - GetSelectTableName = GetSelectTableName, -> = T extends any - ? SelectWithout< - SelectKind< - T["_"]["hkt"], - T["_"]["tableName"], - T["_"]["resultType"], - T["_"]["runResult"], - AppendToResult< - T["_"]["tableName"], - T["_"]["selection"], - TJoinedName, - TJoinedTable extends Table - ? TJoinedTable["_"]["columns"] - : TJoinedTable extends Subquery | View - ? Assume< - TJoinedTable["_"]["selectedFields"], - SelectedFields - > - : never, - T["_"]["selectMode"] - >, - T["_"]["selectMode"] extends "partial" - ? T["_"]["selectMode"] - : "multiple", - AppendToNullabilityMap< - T["_"]["nullabilityMap"], - TJoinedName, - TJoinType - >, - T["_"]["dynamic"], - T["_"]["excludedMethods"] - >, - TDynamic, - T["_"]["excludedMethods"] - > - : never; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L106 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L111 - */ -export type JoinFn< - T extends AnySelectQueryBuilder, - TDynamic extends boolean, - TJoinType extends JoinType, -> = < - TJoinedTable extends Table | Subquery | View | SQL, - TJoinedName extends - GetSelectTableName = GetSelectTableName, ->( - table: TJoinedTable, - on: ((aliases: T["_"]["selection"]) => SQL | undefined) | SQL | undefined, -) => Join; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/query-builders/select.types.ts#L75 - */ -type MapColumnsToTableAlias< - TColumns extends ColumnsSelection, - TAlias extends string, -> = { - [Key in keyof TColumns]: TColumns[Key] extends Column - ? Column["_"], TAlias>> - : TColumns[Key]; -} & {}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L124 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L146 - */ -export type SelectHKTBase = { - tableName: string | undefined; - resultType: "sync" | "async"; - runResult: unknown; - selection: unknown; - selectMode: SelectMode; - nullabilityMap: unknown; - dynamic: boolean; - excludedMethods: string; - result: unknown; - selectedFields: unknown; - _type: unknown; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L138 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L158 - */ -export type SelectKind< - T extends SelectHKTBase, - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode, - TNullabilityMap extends Record, - TDynamic extends boolean, - TExcludedMethods extends string, - TResult = SelectResult[], - TSelectedFields = BuildSubquerySelection, -> = (T & { - tableName: TTableName; - resultType: TResultType; - runResult: TRunResult; - selection: TSelection; - selectMode: TSelectMode; - nullabilityMap: TNullabilityMap; - dynamic: TDynamic; - excludedMethods: TExcludedMethods; - result: TResult; - selectedFields: TSelectedFields; -})["_type"]; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L163 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L179 - */ -export interface SelectQueryBuilderHKT extends SelectHKTBase { - _type: SelectQueryBuilderBase< - SelectQueryBuilderHKT, - this["tableName"], - this["resultType"], - this["runResult"], - Assume, - this["selectMode"], - Assume>, - this["dynamic"], - this["excludedMethods"], - Assume, - Assume - >; -} - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L179 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L193 - */ -export interface SelectHKT extends SelectHKTBase { - _type: SelectBase< - this["tableName"], - this["resultType"], - this["runResult"], - Assume, - this["selectMode"], - Assume>, - this["dynamic"], - this["excludedMethods"], - Assume, - Assume - >; -} - -export type SetOperatorExcludedMethods = - | "leftJoin" - | "rightJoin" - | "innerJoin" - | "fullJoin" - | "where" - | "having" - | "groupBy"; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L204 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L206 - */ -export type CreateSelectFromBuilderMode< - TBuilderMode extends "db" | "qb", - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode, -> = TBuilderMode extends "db" - ? SelectBase - : SelectQueryBuilderBase< - SelectQueryBuilderHKT, - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode - >; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L227 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L224 - */ -type SelectWithout< - T extends AnySelectQueryBuilder, - TDynamic extends boolean, - K extends keyof T & string, - TResetExcluded extends boolean = false, -> = TDynamic extends true - ? T - : Omit< - SelectKind< - T["_"]["hkt"], - T["_"]["tableName"], - T["_"]["resultType"], - T["_"]["runResult"], - T["_"]["selection"], - T["_"]["selectMode"], - T["_"]["nullabilityMap"], - TDynamic, - TResetExcluded extends true ? K : T["_"]["excludedMethods"] | K, - T["_"]["result"], - T["_"]["selectedFields"] - >, - TResetExcluded extends true ? K : T["_"]["excludedMethods"] | K - >; - -export type SelectDynamic = SelectKind< - T["_"]["hkt"], - T["_"]["tableName"], - T["_"]["resultType"], - T["_"]["runResult"], - T["_"]["selection"], - T["_"]["selectMode"], - T["_"]["nullabilityMap"], - true, - never, - T["_"]["result"], - T["_"]["selectedFields"] ->; - -export type AnySelectQueryBuilder = SelectQueryBuilderBase< - any, - any, - any, - any, - any, - any, - any, - any, - any, - any, - any ->; - -export type AnySetOperatorInterface = SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - any ->; - -export interface SetOperatorInterface< - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode = "single", - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult extends any[] = SelectResult< - TSelection, - TSelectMode, - TNullabilityMap - >[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, -> { - _: { - readonly hkt: SelectHKTBase; - readonly tableName: TTableName; - readonly resultType: TResultType; - readonly runResult: TRunResult; - readonly selection: TSelection; - readonly selectMode: TSelectMode; - readonly nullabilityMap: TNullabilityMap; - readonly dynamic: TDynamic; - readonly excludedMethods: TExcludedMethods; - readonly result: TResult; - readonly selectedFields: TSelectedFields; - }; -} - -export type SetOperatorWithResult = SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - TResult, - any ->; - -export type SetOperatorRightSelect< - TValue extends SetOperatorWithResult, - TResult extends any[], -> = TValue extends SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - infer TValueResult, - any -> - ? ValidateShape< - TValueResult[number], - TResult[number], - TypedQueryBuilder - > - : TValue; - -export type SetOperatorRestSelect< - TValue extends readonly SetOperatorWithResult[], - TResult extends any[], -> = TValue extends [infer First, ...infer Rest] - ? First extends SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - infer TValueResult, - any - > - ? Rest extends AnySetOperatorInterface[] - ? [ - ValidateShape< - TValueResult[number], - TResult[number], - TypedQueryBuilder - >, - ...SetOperatorRestSelect, - ] - : ValidateShape< - TValueResult[number], - TResult[number], - TypedQueryBuilder[] - > - : never - : TValue; - -export type CreateSetOperatorFn = < - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TValue extends SetOperatorWithResult, - TRest extends SetOperatorWithResult[], - TSelectMode extends SelectMode = "single", - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult extends any[] = SelectResult< - TSelection, - TSelectMode, - TNullabilityMap - >[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, ->( - leftSelect: SetOperatorInterface< - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode, - TNullabilityMap, - TDynamic, - TExcludedMethods, - TResult, - TSelectedFields - >, - rightSelect: SetOperatorRightSelect, - ...restSelects: SetOperatorRestSelect -) => SelectWithout< - SelectBase< - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode, - TNullabilityMap, - TDynamic, - TExcludedMethods, - TResult, - TSelectedFields - >, - false, - SetOperatorExcludedMethods, - true ->; - -export type GetSetOperators = { - union: CreateSetOperatorFn; - intersect: CreateSetOperatorFn; - except: CreateSetOperatorFn; - unionAll: CreateSetOperatorFn; -}; - -export type SubqueryWithSelection< - TSelection extends ColumnsSelection, - TAlias extends string, -> = Subquery> & - AddAliasToSelection; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/table.ts#L49 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/table.ts#L43 - */ -export type TableWithColumns = Table & { - [key in keyof T["columns"]]: T["columns"][key]; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/view.ts#L154 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/view.ts#L305 - */ -export type ViewWithSelection< - TName extends string, - TExisting extends boolean, - TSelection extends ColumnsSelection, -> = View & TSelection; diff --git a/packages/core/src/drizzle/table.ts b/packages/core/src/drizzle/table.ts index 6fe78fc6a..98e8ba895 100644 --- a/packages/core/src/drizzle/table.ts +++ b/packages/core/src/drizzle/table.ts @@ -9,18 +9,18 @@ import type { } from "@/schema/common.js"; import type { InferColumnType } from "@/schema/infer.js"; import type { BuildColumns, ColumnBuilderBase } from "drizzle-orm"; -import type { TableWithColumns } from "./select.js"; +import type { PgTableWithColumns } from "drizzle-orm/pg-core"; /** * Performs type transformation between Ponder and Drizzle column representation. * - * @returns TableWithColumns + * @returns PgTableWithColumns */ export type DrizzleTable< tableName extends string, table extends PonderTable, schema extends PonderSchema, -> = TableWithColumns<{ +> = PgTableWithColumns<{ name: tableName; schema: undefined; columns: BuildColumns< @@ -33,6 +33,7 @@ export type DrizzleTable< data: InferColumnType; driverParam: unknown; enumValues: undefined; + generated: undefined; notNull: (table[columnName] & ( | ScalarColumn @@ -45,7 +46,7 @@ export type DrizzleTable< primaryKey: columnName extends "id" ? true : false; }>; }, - "common" + "pg" >; - dialect: "common"; + dialect: "pg"; }>; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index abbfcd890..fc21d95bd 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -26,37 +26,4 @@ export type DatabaseConfig = Prettify; export { graphql } from "@/graphql/index.js"; -export { - sql, - eq, - gt, - gte, - lt, - lte, - ne, - isNull, - isNotNull, - inArray, - notInArray, - exists, - notExists, - between, - notBetween, - like, - notIlike, - not, - asc, - desc, - and, - or, - count, - countDistinct, - avg, - avgDistinct, - sum, - sumDistinct, - max, - min, -} from "drizzle-orm"; - -export { alias } from "@/drizzle/runtime.js"; +export { ponderHex, ponderBigint } from "@/drizzle/runtime.js"; diff --git a/packages/core/src/indexing/service.ts b/packages/core/src/indexing/service.ts index 1d759f51b..e5b94e478 100644 --- a/packages/core/src/indexing/service.ts +++ b/packages/core/src/indexing/service.ts @@ -240,7 +240,7 @@ export const processSetupEvents = async ( )! as ContractSource; if (indexingService.isKilled) return { status: "killed" }; - indexingService.eventCount[eventName]++; + indexingService.eventCount[eventName]!++; const result = await executeSetup(indexingService, { event: { @@ -282,7 +282,7 @@ export const processEvents = async ( switch (event.type) { case "log": { - indexingService.eventCount[event.name]++; + indexingService.eventCount[event.name]!++; indexingService.common.logger.trace({ service: "indexing", @@ -303,7 +303,7 @@ export const processEvents = async ( } case "block": { - indexingService.eventCount[event.name]++; + indexingService.eventCount[event.name]!++; indexingService.common.logger.trace({ service: "indexing", @@ -324,7 +324,7 @@ export const processEvents = async ( } case "callTrace": { - indexingService.eventCount[event.name]++; + indexingService.eventCount[event.name]!++; indexingService.common.logger.trace({ service: "indexing", diff --git a/packages/core/src/server/index.ts b/packages/core/src/server/index.ts index 416307bd5..09a74b068 100644 --- a/packages/core/src/server/index.ts +++ b/packages/core/src/server/index.ts @@ -9,6 +9,7 @@ import { getReadonlyStore } from "@/indexing-store/readonly.js"; import type { Schema } from "@/schema/common.js"; import { startClock } from "@/utils/timer.js"; import { serve } from "@hono/node-server"; +import { migrate } from "drizzle-orm/pglite/migrator"; import { Hono } from "hono"; import { cors } from "hono/cors"; import { createMiddleware } from "hono/factory"; @@ -32,6 +33,7 @@ export async function createServer({ routes: PonderRoutes; common: Common; schema: Schema; + offchainSchema?: { [name: string]: unknown }; database: Database; }): Promise { // Create hono app @@ -93,7 +95,9 @@ export async function createServer({ }); const db = createDrizzleDb(database); - const tables = createDrizzleTables(schema, database); + const tables = createDrizzleTables({ schema, database }); + + await migrate(db, { migrationsFolder: common.options.migrationsDir }); // context required for graphql middleware and hono middleware const contextMiddleware = createMiddleware(async (c, next) => { diff --git a/packages/core/src/utils/pg.ts b/packages/core/src/utils/pg.ts index 2d8664d7b..32e858c2d 100644 --- a/packages/core/src/utils/pg.ts +++ b/packages/core/src/utils/pg.ts @@ -15,7 +15,7 @@ pg.Client.prototype.query = function query( ...args: [queryText: string, values: any[], callback: () => void] ) { try { - return originalClientQuery.apply(this, args); + return originalClientQuery.apply(this, args as any); } catch (error_) { const error = error_ as Error & { detail?: string; meta?: string[] }; const [statement, parameters_] = args ?? ["empty", []]; From 760a7b810b4ffcb2a493e3802732ae25494f1e8a Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Mon, 23 Sep 2024 15:57:31 -0400 Subject: [PATCH 03/29] fix cjs --- .../feature-api-functions/ponder.offchain.ts | 38 +------------------ packages/core/package.json | 4 +- packages/core/tsup.config.ts | 2 +- 3 files changed, 5 insertions(+), 39 deletions(-) diff --git a/examples/feature-api-functions/ponder.offchain.ts b/examples/feature-api-functions/ponder.offchain.ts index 0d58d526f..2752eaa25 100644 --- a/examples/feature-api-functions/ponder.offchain.ts +++ b/examples/feature-api-functions/ponder.offchain.ts @@ -1,41 +1,5 @@ -import { entityKind } from "drizzle-orm"; +import { ponderHex } from "@ponder/core"; import { pgSchema, serial } from "drizzle-orm/pg-core"; -import { - type AnyPgTable, - PgColumn, - PgColumnBuilder, -} from "drizzle-orm/pg-core"; -import { bytesToHex, hexToBytes } from "viem"; - -const ponderHex = (columnName: string) => new PgHexBuilder(columnName); - -export class PgHexBuilder extends PgColumnBuilder { - static override readonly [entityKind]: string = "PgHexBuilder"; - - constructor(columnName: string) { - super(columnName, "buffer", "PgHex"); - } - - build(table: AnyPgTable) { - return new PgHex(table, this.config); - } -} - -export class PgHex extends PgColumn { - static override readonly [entityKind]: string = "PgHex"; - - getSQLType(): string { - return "bytea"; - } - - override mapFromDriverValue(value: Buffer) { - return bytesToHex(value); - } - - override mapToDriverValue(value: `0x${string}`): Buffer { - return Buffer.from(hexToBytes(value)); - } -} export const offchainSchema = pgSchema("offchain"); diff --git a/packages/core/package.json b/packages/core/package.json index e13630437..e8b5a17f2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -20,11 +20,13 @@ "ponder": "./dist/bin/ponder.js" }, "module": "./dist/index.js", + "main": "./dist/index.cjs", "types": "./dist/index.d.ts", "typings": "./dist/index.d.ts", "exports": { + "types": "./dist/index.d.ts", "import": "./dist/index.js", - "types": "./dist/index.d.ts" + "require": "./dist/index.cjs" }, "scripts": { "build": "tsup", diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts index f261292a0..bbc1b1d94 100644 --- a/packages/core/tsup.config.ts +++ b/packages/core/tsup.config.ts @@ -5,7 +5,7 @@ export default defineConfig({ name: "@ponder/core", entry: ["src/index.ts", "src/bin/ponder.ts"], outDir: "dist", - format: ["esm"], + format: ["esm", "cjs"], sourcemap: true, dts: true, clean: true, From 3cac9fd75eddd26739a44123a72b935dfc22ca8a Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Mon, 23 Sep 2024 16:33:22 -0400 Subject: [PATCH 04/29] nits --- examples/feature-api-functions/src/api/index.ts | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/examples/feature-api-functions/src/api/index.ts b/examples/feature-api-functions/src/api/index.ts index 13ea5e1ba..f151582d6 100644 --- a/examples/feature-api-functions/src/api/index.ts +++ b/examples/feature-api-functions/src/api/index.ts @@ -36,8 +36,9 @@ ponder.get("/whale-transfers", async (c) => { // Top 10 transfers from whale accounts const result = await c.db .select({ - amount: TransferEvent.amount, + sender: Account.id, senderBalance: Account.balance, + amount: TransferEvent.amount, }) .from(TransferEvent) .innerJoin(Account, eq(TransferEvent.fromId, Account.id)) @@ -52,11 +53,11 @@ ponder.get("/register/:address", async (c) => { const account = getAddress(c.req.param("address")); await c.db.insert(offchainSchema.metadata).values({ account }); - return c.text("", 200); + return c.text("Success", 200); }); ponder.get("/user-transfers", async (c) => { - // Top 5 largest transfers to registered users + // Top 20 largest transfers to registered users const result = await c.db .select({ amount: c.tables.TransferEvent.amount, @@ -67,8 +68,8 @@ ponder.get("/user-transfers", async (c) => { offchainSchema.metadata, eq(c.tables.TransferEvent.toId, offchainSchema.metadata.account), ) - .orderBy(c.tables.TransferEvent.amount) - .limit(5); + .orderBy(desc(c.tables.TransferEvent.amount)) + .limit(20); return c.json(replaceBigInts(result, (b) => formatEther(b))); }); From 279c28a0cc4c33f99499a124a286ef23e89a1764 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Mon, 23 Sep 2024 16:34:51 -0400 Subject: [PATCH 05/29] fix lockfile --- pnpm-lock.yaml | 4814 +++++++++++++++++++++--------------------------- 1 file changed, 2050 insertions(+), 2764 deletions(-) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index fd76ccaf4..14ff31fa6 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -10,28 +10,28 @@ importers: devDependencies: '@biomejs/biome': specifier: ^1.8.1 - version: 1.9.2 + version: 1.8.1 '@changesets/changelog-github': specifier: ^0.4.8 version: 0.4.8(encoding@0.1.13) '@changesets/cli': specifier: ^2.26.2 - version: 2.27.8 + version: 2.27.1 drizzle-kit: specifier: ^0.22.8 version: 0.22.8 drizzle-orm: specifier: ^0.33.0 - version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.11)(@types/pg@8.11.10)(@types/react@18.3.8)(better-sqlite3@11.3.0)(kysely@0.26.3)(pg@8.13.0)(react@18.3.1) + version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) hono: specifier: 4.5.0 version: 4.5.0 lint-staged: specifier: ^15.1.0 - version: 15.2.10 + version: 15.2.0 simple-git-hooks: specifier: ^2.9.0 - version: 2.11.1 + version: 2.9.0 typescript: specifier: 5.0.4 version: 5.0.4 @@ -43,7 +43,7 @@ importers: devDependencies: '@graphprotocol/graph-cli': specifier: 0.61.0 - version: 0.61.0(@types/node@20.16.5)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.6.2) + version: 0.61.0(@types/node@20.11.24)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.3.3) '@graphprotocol/graph-ts': specifier: ^0.31.0 version: 0.31.0 @@ -52,95 +52,95 @@ importers: version: link:../packages/core '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 execa: specifier: ^8.0.1 version: 8.0.1 tsup: specifier: ^8.0.1 - version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) + version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) docs: dependencies: '@radix-ui/react-slot': specifier: ^1.0.2 - version: 1.1.0(@types/react@18.3.8)(react@18.3.1) + version: 1.0.2(@types/react@18.2.46)(react@18.2.0) '@segment/analytics-node': specifier: ^1.1.3 - version: 1.3.0(encoding@0.1.13) + version: 1.1.3(encoding@0.1.13) class-variance-authority: specifier: ^0.7.0 version: 0.7.0 clsx: specifier: ^2.0.0 - version: 2.1.1 + version: 2.1.0 lucide-react: specifier: ^0.295.0 - version: 0.295.0(react@18.3.1) + version: 0.295.0(react@18.2.0) next: specifier: ^14.0.2 - version: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) nextra: specifier: 3.0.0-alpha.10 - version: 3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) nextra-theme-docs: specifier: 3.0.0-alpha.10 - version: 3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(nextra@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) posthog-node: specifier: ^4.0.0 - version: 4.2.0 + version: 4.0.0 react: specifier: ^18.2.0 - version: 18.3.1 + version: 18.2.0 react-dom: specifier: ^18.2.0 - version: 18.3.1(react@18.3.1) + version: 18.2.0(react@18.2.0) tailwind-merge: specifier: ^2.1.0 - version: 2.5.2 + version: 2.1.0 tailwindcss-animate: specifier: ^1.0.7 - version: 1.0.7(tailwindcss@3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))) + version: 1.0.7(tailwindcss@3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))) devDependencies: '@mdx-js/react': specifier: ^3.0.0 - version: 3.0.1(@types/react@18.3.8)(react@18.3.1) + version: 3.0.0(@types/react@18.2.46)(react@18.2.0) '@svgr/webpack': specifier: ^8.1.0 - version: 8.1.0(typescript@5.6.2) + version: 8.1.0(typescript@5.3.3) '@types/node': specifier: ^20.9.0 - version: 20.16.5 + version: 20.11.24 '@types/react': specifier: ^18.2.45 - version: 18.3.8 + version: 18.2.46 '@types/react-dom': specifier: ^18.2.17 - version: 18.3.0 + version: 18.2.17 autoprefixer: specifier: ^10.4.16 - version: 10.4.20(postcss@8.4.47) + version: 10.4.16(postcss@8.4.32) eslint: specifier: ^8.53.0 - version: 8.57.1 + version: 8.56.0 eslint-config-next: specifier: ^14.0.2 - version: 14.2.13(eslint@8.57.1)(typescript@5.6.2) + version: 14.0.3(eslint@8.56.0)(typescript@5.3.3) postcss: specifier: ^8.4.31 - version: 8.4.47 + version: 8.4.32 tailwindcss: specifier: ^3.3.5 - version: 3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) + version: 3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) typescript: specifier: ^5.2.2 - version: 5.6.2 + version: 5.3.3 examples/feature-api-functions: dependencies: @@ -152,26 +152,26 @@ importers: version: 0.22.8 drizzle-orm: specifier: ^0.33.0 - version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.11)(@types/pg@8.11.10)(@types/react@18.3.8)(better-sqlite3@11.3.0)(kysely@0.26.3)(pg@8.13.0)(react@18.3.1) + version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/feature-blocks: dependencies: @@ -180,23 +180,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/feature-call-traces: dependencies: @@ -205,23 +205,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/feature-factory: dependencies: @@ -230,26 +230,26 @@ importers: version: link:../../packages/core abitype: specifier: ^0.10.2 - version: 0.10.3(typescript@5.6.2)(zod@3.23.8) + version: 0.10.3(typescript@5.3.3)(zod@3.23.8) hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/feature-filter: dependencies: @@ -258,23 +258,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/feature-multichain: dependencies: @@ -283,23 +283,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/feature-proxy: dependencies: @@ -308,23 +308,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/feature-read-contract: dependencies: @@ -333,23 +333,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/project-friendtech: dependencies: @@ -358,23 +358,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/project-uniswap-v3-flash: dependencies: @@ -383,23 +383,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/reference-erc1155: dependencies: @@ -408,23 +408,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/reference-erc20: dependencies: @@ -433,23 +433,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/reference-erc4626: dependencies: @@ -458,23 +458,23 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/reference-erc721: dependencies: @@ -483,35 +483,35 @@ importers: version: link:../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/with-foundry: devDependencies: '@wagmi/cli': specifier: ^1.5.2 - version: 1.5.2(typescript@5.6.2) + version: 1.5.2(typescript@5.3.3) examples/with-foundry/foundry: dependencies: forge-std: specifier: github:foundry-rs/forge-std - version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8 + version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c examples/with-foundry/ponder: dependencies: @@ -520,23 +520,23 @@ importers: version: link:../../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.9.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.53.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../../packages/eslint-config-ponder typescript: specifier: ^5.2.2 - version: 5.6.2 + version: 5.3.3 examples/with-nextjs: {} @@ -544,56 +544,56 @@ importers: dependencies: '@tanstack/react-query': specifier: ^5.12.2 - version: 5.56.2(react@18.3.1) + version: 5.12.2(react@18.2.0) graphql: specifier: ^16.8.1 - version: 16.9.0 + version: 16.8.2 graphql-request: specifier: ^6.1.0 - version: 6.1.0(encoding@0.1.13)(graphql@16.9.0) + version: 6.1.0(encoding@0.1.13)(graphql@16.8.2) next: specifier: 14.0.3 - version: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + version: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) react: specifier: ^18 - version: 18.3.1 + version: 18.2.0 react-countup: specifier: ^6.5.0 - version: 6.5.3(react@18.3.1) + version: 6.5.0(react@18.2.0) react-dom: specifier: ^18 - version: 18.3.1(react@18.3.1) + version: 18.2.0(react@18.2.0) viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20 - version: 20.16.5 + version: 20.11.24 '@types/react': specifier: ^18 - version: 18.3.8 + version: 18.2.46 '@types/react-dom': specifier: ^18 - version: 18.3.0 + version: 18.2.17 autoprefixer: specifier: ^10.0.1 - version: 10.4.20(postcss@8.4.47) + version: 10.4.16(postcss@8.4.32) eslint: specifier: ^8 - version: 8.57.1 + version: 8.56.0 eslint-config-next: specifier: 14.0.3 - version: 14.0.3(eslint@8.57.1)(typescript@5.6.2) + version: 14.0.3(eslint@8.56.0)(typescript@5.3.3) postcss: specifier: ^8 - version: 8.4.47 + version: 8.4.32 tailwindcss: specifier: ^3.3.0 - version: 3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) + version: 3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) typescript: specifier: ^5 - version: 5.6.2 + version: 5.3.3 examples/with-nextjs/ponder: dependencies: @@ -602,23 +602,23 @@ importers: version: link:../../../packages/core hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 examples/with-trpc: {} @@ -632,7 +632,7 @@ importers: dependencies: '@hono/trpc-server': specifier: ^0.3.2 - version: 0.3.2(@trpc/server@10.45.2)(hono@4.6.2) + version: 0.3.2(@trpc/server@10.45.2)(hono@4.5.0) '@ponder/core': specifier: workspace:* version: link:../../../packages/core @@ -641,53 +641,53 @@ importers: version: 10.45.2 hono: specifier: ^4.5.0 - version: 4.6.2 + version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) zod: specifier: ^3.23.8 version: 3.23.8 devDependencies: '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 eslint: specifier: ^8.54.0 - version: 8.57.1 + version: 8.56.0 eslint-config-ponder: specifier: workspace:* version: link:../../../packages/eslint-config-ponder typescript: specifier: ^5.3.2 - version: 5.6.2 + version: 5.3.3 packages/common: devDependencies: '@types/node': specifier: ^20.11.24 - version: 20.16.5 + version: 20.11.24 dotenv: specifier: ^16.3.1 - version: 16.4.5 + version: 16.3.1 tsup: specifier: ^8.0.1 - version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) + version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) vitest: specifier: ^1.0.2 - version: 1.6.0(@types/node@20.16.5) + version: 1.0.2(@types/node@20.11.24) packages/core: dependencies: '@babel/code-frame': specifier: ^7.23.4 - version: 7.24.7 + version: 7.23.5 '@commander-js/extra-typings': specifier: ^12.0.1 - version: 12.1.0(commander@12.1.0) + version: 12.0.1(commander@12.0.0) '@escape.tech/graphql-armor-max-aliases': specifier: ^2.3.0 - version: 2.5.0 + version: 2.4.0 '@escape.tech/graphql-armor-max-depth': specifier: ^2.2.0 version: 2.3.0 @@ -696,19 +696,19 @@ importers: version: 2.4.0 '@hono/node-server': specifier: ^1.12.2 - version: 1.13.0(hono@4.6.2) + version: 1.12.2(hono@4.5.0) '@ponder/utils': specifier: workspace:* version: link:../utils abitype: specifier: ^0.10.2 - version: 0.10.3(typescript@5.6.2)(zod@3.23.8) + version: 0.10.3(typescript@5.3.3)(zod@3.23.8) better-sqlite3: specifier: ^11.1.2 - version: 11.3.0 + version: 11.1.2 commander: specifier: ^12.0.0 - version: 12.1.0 + version: 12.0.0 conf: specifier: ^12.0.0 version: 12.0.0 @@ -720,92 +720,92 @@ importers: version: 3.0.2 dotenv: specifier: ^16.3.1 - version: 16.4.5 + version: 16.3.1 glob: specifier: ^10.3.10 - version: 10.4.5 + version: 10.3.10 graphql: specifier: ^16.8.1 - version: 16.9.0 + version: 16.8.2 graphql-yoga: specifier: ^5.3.0 - version: 5.7.0(graphql@16.9.0) + version: 5.3.1(graphql@16.8.2) http-terminator: specifier: ^3.2.0 version: 3.2.0 ink: specifier: ^4.4.1 - version: 4.4.1(@types/react@18.3.8)(react@18.3.1) + version: 4.4.1(@types/react@18.2.46)(react@18.2.0) kysely: specifier: ^0.26.3 version: 0.26.3 pg: specifier: ^8.11.3 - version: 8.13.0 + version: 8.11.3 pg-connection-string: specifier: ^2.6.2 - version: 2.7.0 + version: 2.6.2 picocolors: specifier: ^1.0.0 - version: 1.1.0 + version: 1.0.0 pino: specifier: ^8.16.2 - version: 8.21.0 + version: 8.17.2 prom-client: specifier: ^15.0.0 - version: 15.1.3 + version: 15.1.0 react: specifier: ^18.2.0 - version: 18.3.1 + version: 18.2.0 stacktrace-parser: specifier: ^0.1.10 version: 0.1.10 vite: specifier: ^5.0.7 - version: 5.4.7(@types/node@20.16.5) + version: 5.0.10(@types/node@20.11.24) vite-node: specifier: ^1.0.2 - version: 1.6.0(@types/node@20.16.5) + version: 1.1.1(@types/node@20.11.24) vite-tsconfig-paths: specifier: ^4.3.1 - version: 4.3.2(typescript@5.6.2)(vite@5.4.7(@types/node@20.16.5)) + version: 4.3.1(typescript@5.3.3)(vite@5.0.10(@types/node@20.11.24)) devDependencies: '@types/babel__code-frame': specifier: ^7.0.6 version: 7.0.6 '@types/better-sqlite3': specifier: ^7.6.10 - version: 7.6.11 + version: 7.6.10 '@types/glob': specifier: ^8.1.0 version: 8.1.0 '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 '@types/pg': specifier: ^8.10.9 - version: 8.11.10 + version: 8.10.9 '@types/react': specifier: ^18.2.38 - version: 18.3.8 + version: 18.2.46 '@viem/anvil': specifier: ^0.0.6 version: 0.0.6 '@wagmi/cli': specifier: ^1.5.2 - version: 1.5.2(typescript@5.6.2) + version: 1.5.2(typescript@5.3.3) execa: specifier: ^8.0.1 version: 8.0.1 rimraf: specifier: ^5.0.5 - version: 5.0.10 + version: 5.0.5 tsup: specifier: ^8.0.1 - version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) + version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) vitest: specifier: ^1.0.2 - version: 1.6.0(@types/node@20.16.5) + version: 1.0.2(@types/node@20.11.24) packages/create-ponder: dependencies: @@ -814,7 +814,7 @@ importers: version: 6.7.14 cpy: specifier: ^11.0.0 - version: 11.1.0 + version: 11.0.0 execa: specifier: ^8.0.1 version: 8.0.1 @@ -826,10 +826,10 @@ importers: version: 7.0.1 picocolors: specifier: ^1.0.0 - version: 1.1.0 + version: 1.0.0 prettier: specifier: ^3.1.0 - version: 3.3.3 + version: 3.1.1 prompts: specifier: ^2.4.2 version: 2.4.2 @@ -838,20 +838,20 @@ importers: version: 1.5.4 validate-npm-package-name: specifier: ^5.0.0 - version: 5.0.1 + version: 5.0.0 viem: specifier: ^2.21.3 - version: 2.21.10(typescript@5.6.2)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) yaml: specifier: ^2.3.4 - version: 2.5.1 + version: 2.3.4 devDependencies: '@types/fs-extra': specifier: ^11.0.4 version: 11.0.4 '@types/node': specifier: ^20.10.0 - version: 20.16.5 + version: 20.11.24 '@types/prompts': specifier: ^2.4.9 version: 2.4.9 @@ -860,19 +860,19 @@ importers: version: 4.0.2 abitype: specifier: ^0.10.2 - version: 0.10.3(typescript@5.6.2)(zod@3.23.8) + version: 0.10.3(typescript@5.3.3)(zod@3.23.8) dotenv: specifier: ^16.3.1 - version: 16.4.5 + version: 16.3.1 rimraf: specifier: ^5.0.5 - version: 5.0.10 + version: 5.0.5 tsup: specifier: ^8.0.1 - version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) + version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) vitest: specifier: ^1.0.2 - version: 1.6.0(@types/node@20.16.5) + version: 1.0.2(@types/node@20.11.24) packages/eslint-config-ponder: {} @@ -880,22 +880,26 @@ importers: devDependencies: '@types/node': specifier: ^20.11.24 - version: 20.16.5 + version: 20.11.24 abitype: specifier: ^1.0.1 - version: 1.0.6(typescript@5.6.2)(zod@3.23.8) + version: 1.0.1(typescript@5.3.3)(zod@3.23.8) dotenv: specifier: ^16.3.1 - version: 16.4.5 + version: 16.3.1 tsup: specifier: ^8.0.1 - version: 8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1) + version: 8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3) vitest: specifier: ^1.0.2 - version: 1.6.0(@types/node@20.16.5) + version: 1.0.2(@types/node@20.11.24) packages: + '@aashutoshrathi/word-wrap@1.2.6': + resolution: {integrity: sha512-1Yjs2SvM8TflER/OD3cOjhWWOZb58A2t7wpE2S9XfBYTiIl+XFhQG2bjy4Pu1I+EAlCNUzRDYDdFwFYUKvXcIA==} + engines: {node: '>=0.10.0'} + '@adraffy/ens-normalize@1.10.0': resolution: {integrity: sha512-nA9XHtlAkYfJxY7bce8DcN7eKxWWCWkU+1GR9d+U6MbNpfwQp8TI7vqOsBsMcHoT4mBu2kypKoSKnghEzOOq5Q==} @@ -911,8 +915,8 @@ packages: resolution: {integrity: sha512-lFMjJTrFL3j7L9yBxwYfCq2k6qqwHyzuUl/XBnif78PWTJYyL/dfowQHWE3sp6U6ZzqWiiIZnpTMO96zhkjwtg==} engines: {node: '>=6.0.0'} - '@babel/code-frame@7.24.7': - resolution: {integrity: sha512-BcYH1CVJBO9tvyIZ2jVeXgSIMvGZ2FDRvDdOIVQyuklNKSsx+eppDEBq/g47Ayw+RqNFE+URvOShmf+f/qwAlA==} + '@babel/code-frame@7.23.5': + resolution: {integrity: sha512-CgH3s1a96LipHCmSUmYFPwY7MNx8C3avkq7i4Wl3cfa662ldtUe4VM1TPXX70pfmrlWTb6jLqTYrZyT2ZTJBgA==} engines: {node: '>=6.9.0'} '@babel/compat-data@7.23.5': @@ -1022,10 +1026,6 @@ packages: resolution: {integrity: sha512-Y4OZ+ytlatR8AI+8KZfKuL5urKp7qey08ha31L8b3BwewJAoJamTzyvxPR/5D+KkdJCGPq/+8TukHBlY10FX9A==} engines: {node: '>=6.9.0'} - '@babel/helper-validator-identifier@7.24.7': - resolution: {integrity: sha512-rR+PBcQ1SMQDDyF6X0wxtG8QyLCgUB0eRAGguqRLfkCA87l7yAP7ehq8SNj96OOGTO8OBV70KhuFYcIkHXOg0w==} - engines: {node: '>=6.9.0'} - '@babel/helper-validator-option@7.23.5': resolution: {integrity: sha512-85ttAOMLsr53VgXkTbkx8oA6YTfT4q7/HzXSLEYmjcSTJPMPQtvq1BD79Byep5xMUYbGRzEpDsjUf3dyp54IKw==} engines: {node: '>=6.9.0'} @@ -1038,8 +1038,8 @@ packages: resolution: {integrity: sha512-6AMnjCoC8wjqBzDHkuqpa7jAKwvMo4dC+lr/TFBz+ucfulO1XMpDnwWPGBNwClOKZ8h6xn5N81W/R5OrcKtCbQ==} engines: {node: '>=6.9.0'} - '@babel/highlight@7.24.7': - resolution: {integrity: sha512-EStJpq4OuY8xYfhGVXngigBJRWxftKX9ksiGDnmlY3o7B/V7KIAc9X4oiK87uPJSc/vs5L869bem5fhZa8caZw==} + '@babel/highlight@7.23.4': + resolution: {integrity: sha512-acGdbYSfp2WheJoJm/EBBBLh/ID8KDc64ISZ9DYtBmC8/Q204PZJLHyzeB5qMzJ5trcOkybd78M4x2KWsUq++A==} engines: {node: '>=6.9.0'} '@babel/parser@7.23.6': @@ -1545,55 +1545,55 @@ packages: resolution: {integrity: sha512-+uarb83brBzPKN38NX1MkB6vb6+mwvR6amUulqAE7ccQw1pEl+bCia9TbdG1lsnFP7lZySvUn37CHyXQdfTwzg==} engines: {node: '>=6.9.0'} - '@biomejs/biome@1.9.2': - resolution: {integrity: sha512-4j2Gfwft8Jqp1X0qLYvK4TEy4xhTo4o6rlvJPsjPeEame8gsmbGQfOPBkw7ur+7/Z/f0HZmCZKqbMvR7vTXQYQ==} + '@biomejs/biome@1.8.1': + resolution: {integrity: sha512-fQXGfvq6DIXem12dGQCM2tNF+vsNHH1qs3C7WeOu75Pd0trduoTmoO7G4ntLJ2qDs5wuw981H+cxQhi1uHnAtA==} engines: {node: '>=14.21.3'} hasBin: true - '@biomejs/cli-darwin-arm64@1.9.2': - resolution: {integrity: sha512-rbs9uJHFmhqB3Td0Ro+1wmeZOHhAPTL3WHr8NtaVczUmDhXkRDWScaxicG9+vhSLj1iLrW47itiK6xiIJy6vaA==} + '@biomejs/cli-darwin-arm64@1.8.1': + resolution: {integrity: sha512-XLiB7Uu6GALIOBWzQ2aMD0ru4Ly5/qSeQF7kk3AabzJ/kwsEWSe33iVySBP/SS2qv25cgqNiLksjGcw2bHT3mw==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [darwin] - '@biomejs/cli-darwin-x64@1.9.2': - resolution: {integrity: sha512-BlfULKijNaMigQ9GH9fqJVt+3JTDOSiZeWOQtG/1S1sa8Lp046JHG3wRJVOvekTPL9q/CNFW1NVG8J0JN+L1OA==} + '@biomejs/cli-darwin-x64@1.8.1': + resolution: {integrity: sha512-uMTSxVLMfqkBVqyc25hSn83jBbp+wtWjzM/pHFlKXt3htJuw7FErVGW0nmQ9Sxa9vJ7GcqoltLMl28VQRIMYzg==} engines: {node: '>=14.21.3'} cpu: [x64] os: [darwin] - '@biomejs/cli-linux-arm64-musl@1.9.2': - resolution: {integrity: sha512-ZATvbUWhNxegSALUnCKWqetTZqrK72r2RsFD19OK5jXDj/7o1hzI1KzDNG78LloZxftrwr3uI9SqCLh06shSZw==} + '@biomejs/cli-linux-arm64-musl@1.8.1': + resolution: {integrity: sha512-UQ8Wc01J0wQL+5AYOc7qkJn20B4PZmQL1KrmDZh7ot0DvD6aX4+8mmfd/dG5b6Zjo/44QvCKcvkFGCMRYuhWZA==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-arm64@1.9.2': - resolution: {integrity: sha512-T8TJuSxuBDeQCQzxZu2o3OU4eyLumTofhCxxFd3+aH2AEWVMnH7Z/c3QP1lHI5RRMBP9xIJeMORqDQ5j+gVZzw==} + '@biomejs/cli-linux-arm64@1.8.1': + resolution: {integrity: sha512-3SzZRuC/9Oi2P2IBNPsEj0KXxSXUEYRR2kfRF/Ve8QAfGgrt4qnwuWd6QQKKN5R+oYH691qjm+cXBKEcrP1v/Q==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [linux] - '@biomejs/cli-linux-x64-musl@1.9.2': - resolution: {integrity: sha512-CjPM6jT1miV5pry9C7qv8YJk0FIZvZd86QRD3atvDgfgeh9WQU0k2Aoo0xUcPdTnoz0WNwRtDicHxwik63MmSg==} + '@biomejs/cli-linux-x64-musl@1.8.1': + resolution: {integrity: sha512-fYbP/kNu/rtZ4kKzWVocIdqZOtBSUEg9qUhZaao3dy3CRzafR6u6KDtBeSCnt47O+iLnks1eOR1TUxzr5+QuqA==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-linux-x64@1.9.2': - resolution: {integrity: sha512-T0cPk3C3Jr2pVlsuQVTBqk2qPjTm8cYcTD9p/wmR9MeVqui1C/xTVfOIwd3miRODFMrJaVQ8MYSXnVIhV9jTjg==} + '@biomejs/cli-linux-x64@1.8.1': + resolution: {integrity: sha512-AeBycVdNrTzsyYKEOtR2R0Ph0hCD0sCshcp2aOnfGP0hCZbtFg09D0SdKLbyzKntisY41HxKVrydYiaApp+2uw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [linux] - '@biomejs/cli-win32-arm64@1.9.2': - resolution: {integrity: sha512-2x7gSty75bNIeD23ZRPXyox6Z/V0M71ObeJtvQBhi1fgrvPdtkEuw7/0wEHg6buNCubzOFuN9WYJm6FKoUHfhg==} + '@biomejs/cli-win32-arm64@1.8.1': + resolution: {integrity: sha512-6tEd1H/iFKpgpE3OIB7oNgW5XkjiVMzMRPL8zYoZ036YfuJ5nMYm9eB9H/y81+8Z76vL48fiYzMPotJwukGPqQ==} engines: {node: '>=14.21.3'} cpu: [arm64] os: [win32] - '@biomejs/cli-win32-x64@1.9.2': - resolution: {integrity: sha512-JC3XvdYcjmu1FmAehVwVV0SebLpeNTnO2ZaMdGCSOdS7f8O9Fq14T2P1gTG1Q29Q8Dt1S03hh0IdVpIZykOL8g==} + '@biomejs/cli-win32-x64@1.8.1': + resolution: {integrity: sha512-g2H31jJzYmS4jkvl6TiyEjEX+Nv79a5km/xn+5DARTp5MBFzC9gwceusSSB2AkJKqZzY131AiACAWjKrVt5Ijw==} engines: {node: '>=14.21.3'} cpu: [x64] os: [win32] @@ -1601,11 +1601,11 @@ packages: '@braintree/sanitize-url@6.0.4': resolution: {integrity: sha512-s3jaWicZd0pkP0jf5ysyHUI/RE7MHos6qlToFcGWXVp+ykHOy77OUMrfbgJ9it2C5bow7OIQwYYaHjk9XlBQ2A==} - '@changesets/apply-release-plan@7.0.5': - resolution: {integrity: sha512-1cWCk+ZshEkSVEZrm2fSj1Gz8sYvxgUL4Q78+1ZZqeqfuevPTPk033/yUZ3df8BKMohkqqHfzj0HOOrG0KtXTw==} + '@changesets/apply-release-plan@7.0.0': + resolution: {integrity: sha512-vfi69JR416qC9hWmFGSxj7N6wA5J222XNBmezSVATPWDVPIF7gkd4d8CpbEbXmRWbVrkoli3oerGS6dcL/BGsQ==} - '@changesets/assemble-release-plan@6.0.4': - resolution: {integrity: sha512-nqICnvmrwWj4w2x0fOhVj2QEGdlUuwVAwESrUo5HLzWMI1rE5SWfsr9ln+rDqWB6RQ2ZyaMZHUcU7/IRaUJS+Q==} + '@changesets/assemble-release-plan@6.0.0': + resolution: {integrity: sha512-4QG7NuisAjisbW4hkLCmGW2lRYdPrKzro+fCtZaILX+3zdUELSvYjpL4GTv0E4aM9Mef3PuIQp89VmHJ4y2bfw==} '@changesets/changelog-git@0.2.0': resolution: {integrity: sha512-bHOx97iFI4OClIT35Lok3sJAwM31VbUM++gnMBV16fdbtBhgYu4dxsphBF/0AZZsyAHMrnM0yFcj5gZM1py6uQ==} @@ -1613,45 +1613,42 @@ packages: '@changesets/changelog-github@0.4.8': resolution: {integrity: sha512-jR1DHibkMAb5v/8ym77E4AMNWZKB5NPzw5a5Wtqm1JepAuIF+hrKp2u04NKM14oBZhHglkCfrla9uq8ORnK/dw==} - '@changesets/cli@2.27.8': - resolution: {integrity: sha512-gZNyh+LdSsI82wBSHLQ3QN5J30P4uHKJ4fXgoGwQxfXwYFTJzDdvIJasZn8rYQtmKhyQuiBj4SSnLuKlxKWq4w==} + '@changesets/cli@2.27.1': + resolution: {integrity: sha512-iJ91xlvRnnrJnELTp4eJJEOPjgpF3NOh4qeQehM6Ugiz9gJPRZ2t+TsXun6E3AMN4hScZKjqVXl0TX+C7AB3ZQ==} hasBin: true - '@changesets/config@3.0.3': - resolution: {integrity: sha512-vqgQZMyIcuIpw9nqFIpTSNyc/wgm/Lu1zKN5vECy74u95Qx/Wa9g27HdgO4NkVAaq+BGA8wUc/qvbvVNs93n6A==} + '@changesets/config@3.0.0': + resolution: {integrity: sha512-o/rwLNnAo/+j9Yvw9mkBQOZySDYyOr/q+wptRLcAVGlU6djOeP9v1nlalbL9MFsobuBVQbZCTp+dIzdq+CLQUA==} '@changesets/errors@0.2.0': resolution: {integrity: sha512-6BLOQUscTpZeGljvyQXlWOItQyU71kCdGz7Pi8H8zdw6BI0g3m43iL4xKUVPWtG+qrrL9DTjpdn8eYuCQSRpow==} - '@changesets/get-dependents-graph@2.1.2': - resolution: {integrity: sha512-sgcHRkiBY9i4zWYBwlVyAjEM9sAzs4wYVwJUdnbDLnVG3QwAaia1Mk5P8M7kraTOZN+vBET7n8KyB0YXCbFRLQ==} + '@changesets/get-dependents-graph@2.0.0': + resolution: {integrity: sha512-cafUXponivK4vBgZ3yLu944mTvam06XEn2IZGjjKc0antpenkYANXiiE6GExV/yKdsCnE8dXVZ25yGqLYZmScA==} '@changesets/get-github-info@0.5.2': resolution: {integrity: sha512-JppheLu7S114aEs157fOZDjFqUDpm7eHdq5E8SSR0gUBTEK0cNSHsrSR5a66xs0z3RWuo46QvA3vawp8BxDHvg==} - '@changesets/get-release-plan@4.0.4': - resolution: {integrity: sha512-SicG/S67JmPTrdcc9Vpu0wSQt7IiuN0dc8iR5VScnnTVPfIaLvKmEGRvIaF0kcn8u5ZqLbormZNTO77bCEvyWw==} + '@changesets/get-release-plan@4.0.0': + resolution: {integrity: sha512-9L9xCUeD/Tb6L/oKmpm8nyzsOzhdNBBbt/ZNcjynbHC07WW4E1eX8NMGC5g5SbM5z/V+MOrYsJ4lRW41GCbg3w==} '@changesets/get-version-range-type@0.4.0': resolution: {integrity: sha512-hwawtob9DryoGTpixy1D3ZXbGgJu1Rhr+ySH2PvTLHvkZuQ7sRT4oQwMh0hbqZH1weAooedEjRsbrWcGLCeyVQ==} - '@changesets/git@3.0.1': - resolution: {integrity: sha512-pdgHcYBLCPcLd82aRcuO0kxCDbw/yISlOtkmwmE8Odo1L6hSiZrBOsRl84eYG7DRCab/iHnOkWqExqc4wxk2LQ==} + '@changesets/git@3.0.0': + resolution: {integrity: sha512-vvhnZDHe2eiBNRFHEgMiGd2CT+164dfYyrJDhwwxTVD/OW0FUD6G7+4DIx1dNwkwjHyzisxGAU96q0sVNBns0w==} - '@changesets/logger@0.1.1': - resolution: {integrity: sha512-OQtR36ZlnuTxKqoW4Sv6x5YIhOmClRd5pWsjZsddYxpWs517R0HkyiefQPIytCVh4ZcC5x9XaG8KTdd5iRQUfg==} + '@changesets/logger@0.1.0': + resolution: {integrity: sha512-pBrJm4CQm9VqFVwWnSqKEfsS2ESnwqwH+xR7jETxIErZcfd1u2zBSqrHbRHR7xjhSgep9x2PSKFKY//FAshA3g==} '@changesets/parse@0.4.0': resolution: {integrity: sha512-TS/9KG2CdGXS27S+QxbZXgr8uPsP4yNJYb4BC2/NeFUj80Rni3TeD2qwWmabymxmrLo7JEsytXH1FbpKTbvivw==} - '@changesets/pre@2.0.1': - resolution: {integrity: sha512-vvBJ/If4jKM4tPz9JdY2kGOgWmCowUYOi5Ycv8dyLnEE8FgpYYUo1mgJZxcdtGGP3aG8rAQulGLyyXGSLkIMTQ==} - - '@changesets/read@0.6.1': - resolution: {integrity: sha512-jYMbyXQk3nwP25nRzQQGa1nKLY0KfoOV7VLgwucI0bUO8t8ZLCr6LZmgjXsiKuRDc+5A6doKPr9w2d+FEJ55zQ==} + '@changesets/pre@2.0.0': + resolution: {integrity: sha512-HLTNYX/A4jZxc+Sq8D1AMBsv+1qD6rmmJtjsCJa/9MSRybdxh0mjbTvE6JYZQ/ZiQ0mMlDOlGPXTm9KLTU3jyw==} - '@changesets/should-skip-package@0.1.1': - resolution: {integrity: sha512-H9LjLbF6mMHLtJIc/eHR9Na+MifJ3VxtgP/Y+XLn4BF7tDTEN1HNYtH6QMcjP1uxp9sjaFYmW8xqloaCi/ckTg==} + '@changesets/read@0.6.0': + resolution: {integrity: sha512-ZypqX8+/im1Fm98K4YcZtmLKgjs1kDQ5zHpc2U1qdtNBmZZfo/IBiG162RoP0CUF05tvp2y4IspH11PLnPxuuw==} '@changesets/types@4.1.0': resolution: {integrity: sha512-LDQvVDv5Kb50ny2s25Fhm3d9QSZimsoUGBsUioj6MC3qbMUCuC8GPIvk/M6IvXx3lYhAs0lwWUQLb+VIEUCECw==} @@ -1662,13 +1659,13 @@ packages: '@changesets/types@6.0.0': resolution: {integrity: sha512-b1UkfNulgKoWfqyHtzKS5fOZYSJO+77adgL7DLRDr+/7jhChN+QcHnbjiQVOz/U+Ts3PGNySq7diAItzDgugfQ==} - '@changesets/write@0.3.2': - resolution: {integrity: sha512-kDxDrPNpUgsjDbWBvUo27PzKX4gqeKOlhibaOXDJA6kuBisGqNHv/HwGJrAu8U/dSf8ZEFIeHIPtvSlZI1kULw==} + '@changesets/write@0.3.0': + resolution: {integrity: sha512-slGLb21fxZVUYbyea+94uFiD6ntQW0M2hIKNznFizDhZPDgn2c/fv1UzzlW43RVzh1BEDuIqW6hzlJ1OflNmcw==} - '@commander-js/extra-typings@12.1.0': - resolution: {integrity: sha512-wf/lwQvWAA0goIghcb91dQYpkLBcyhOhQNqG/VgWhnKzgt+UOMvra7EX/2fv70arm5RW+PUHoQHHDa6/p77Eqg==} + '@commander-js/extra-typings@12.0.1': + resolution: {integrity: sha512-OvkMobb1eMqOCuJdbuSin/KJkkZr7n24/UNV+Lcz/0Dhepf3r2p9PaGwpRpAWej7A+gQnny4h8mGhpFl4giKkg==} peerDependencies: - commander: ~12.1.0 + commander: ~12.0.0 '@cspotcode/source-map-support@0.8.1': resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} @@ -1688,24 +1685,12 @@ packages: '@esbuild-kit/esm-loader@2.6.5': resolution: {integrity: sha512-FxEMIkJKnodyA1OaCUoEvbYRkoZlLZ4d/eXFu9Fh8CbBBgP5EmZxrfTRyN0qpXZ4vOvqnE5YdRdcrmUUXuU+dA==} - '@esbuild/aix-ppc64@0.19.12': - resolution: {integrity: sha512-bmoCYyWdEL3wDQIVbcyzRyeKLgk2WtWLTWz1ZIAZF/EGbNOwSA6ew3PftJ1PqMiOOGu0OyFMzG53L0zqIpPeNA==} + '@esbuild/aix-ppc64@0.19.11': + resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} engines: {node: '>=12'} cpu: [ppc64] os: [aix] - '@esbuild/aix-ppc64@0.21.5': - resolution: {integrity: sha512-1SDgH6ZSPTlggy1yI6+Dbkiz8xzpHJEVAlF/AM1tHPLsf5STom9rwtjE4hKAF20FfXXNTFqEYXyJNWh1GiZedQ==} - engines: {node: '>=12'} - cpu: [ppc64] - os: [aix] - - '@esbuild/aix-ppc64@0.23.1': - resolution: {integrity: sha512-6VhYk1diRqrhBAqpJEdjASR/+WVRtfjpqKuNw11cLiaWpAT/Uu+nokB+UJnevzy/P9C/ty6AOe0dwueMrGh/iQ==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [aix] - '@esbuild/android-arm64@0.16.17': resolution: {integrity: sha512-MIGl6p5sc3RDTLLkYL1MyL8BMRN4tLMRCn+yRJJmEDvYZ2M7tmAf80hx1kbNEUX2KJ50RRtxZ4JHLvCfuB6kBg==} engines: {node: '>=12'} @@ -1718,24 +1703,12 @@ packages: 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==} + '@esbuild/android-arm64@0.19.11': + resolution: {integrity: sha512-aiu7K/5JnLj//KOnOfEZ0D90obUkRzDMyqd/wNAUQ34m4YUPVhRZpnqKV9uqDGxT7cToSDnIHsGooyIczu9T+Q==} engines: {node: '>=12'} cpu: [arm64] os: [android] - '@esbuild/android-arm64@0.23.1': - resolution: {integrity: sha512-xw50ipykXcLstLeWH7WRdQuysJqejuAGPd30vd1i5zSyKK3WE+ijzHmLKxdiCMtH1pHz78rOg0BKSYOSB/2Khw==} - engines: {node: '>=18'} - cpu: [arm64] - os: [android] - '@esbuild/android-arm@0.16.17': resolution: {integrity: sha512-N9x1CMXVhtWEAMS7pNNONyA14f71VPQN9Cnavj1XQh6T7bskqiLLrSca4O0Vr8Wdcga943eThxnVp3JLnBMYtw==} engines: {node: '>=12'} @@ -1748,24 +1721,12 @@ packages: 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==} + '@esbuild/android-arm@0.19.11': + resolution: {integrity: sha512-5OVapq0ClabvKvQ58Bws8+wkLCV+Rxg7tUVbo9xu034Nm536QTII4YzhaFriQ7rMrorfnFKUsArD2lqKbFY4vw==} engines: {node: '>=12'} cpu: [arm] os: [android] - '@esbuild/android-arm@0.23.1': - resolution: {integrity: sha512-uz6/tEy2IFm9RYOyvKl88zdzZfwEfKZmnX9Cj1BHjeSGNuGLuMD1kR8y5bteYmwqKm1tj8m4cb/aKEorr6fHWQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [android] - '@esbuild/android-x64@0.16.17': resolution: {integrity: sha512-a3kTv3m0Ghh4z1DaFEuEDfz3OLONKuFvI4Xqczqx4BqLyuFaFkuaG4j2MtA6fuWEFeC5x9IvqnX7drmRq/fyAQ==} engines: {node: '>=12'} @@ -1778,24 +1739,12 @@ packages: 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==} + '@esbuild/android-x64@0.19.11': + resolution: {integrity: sha512-eccxjlfGw43WYoY9QgB82SgGgDbibcqyDTlk3l3C0jOVHKxrjdc9CTwDUQd0vkvYg5um0OH+GpxYvp39r+IPOg==} engines: {node: '>=12'} cpu: [x64] os: [android] - '@esbuild/android-x64@0.23.1': - resolution: {integrity: sha512-nlN9B69St9BwUoB+jkyU090bru8L0NA3yFvAd7k8dNsVH8bi9a8cUAUSEcEEgTp2z3dbEDGJGfP6VUnkQnlReg==} - engines: {node: '>=18'} - cpu: [x64] - os: [android] - '@esbuild/darwin-arm64@0.16.17': resolution: {integrity: sha512-/2agbUEfmxWHi9ARTX6OQ/KgXnOWfsNlTeLcoV7HSuSTv63E4DqtAc+2XqGw1KHxKMHGZgbVCZge7HXWX9Vn+w==} engines: {node: '>=12'} @@ -1808,24 +1757,12 @@ packages: cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.19.12': - resolution: {integrity: sha512-B6IeSgZgtEzGC42jsI+YYu9Z3HKRxp8ZT3cqhvliEHovq8HSX2YX8lNocDn79gCKJXOSaEot9MVYky7AKjCs8g==} + '@esbuild/darwin-arm64@0.19.11': + resolution: {integrity: sha512-ETp87DRWuSt9KdDVkqSoKoLFHYTrkyz2+65fj9nfXsaV3bMhTCjtQfw3y+um88vGRKRiF7erPrh/ZuIdLUIVxQ==} engines: {node: '>=12'} cpu: [arm64] os: [darwin] - '@esbuild/darwin-arm64@0.21.5': - resolution: {integrity: sha512-DwqXqZyuk5AiWWf3UfLiRDJ5EDd49zg6O9wclZ7kUMv2WRFr4HKjXp/5t8JZ11QbQfUS6/cRCKGwYhtNAY88kQ==} - engines: {node: '>=12'} - cpu: [arm64] - os: [darwin] - - '@esbuild/darwin-arm64@0.23.1': - resolution: {integrity: sha512-YsS2e3Wtgnw7Wq53XXBLcV6JhRsEq8hkfg91ESVadIrzr9wO6jJDMZnCQbHm1Guc5t/CdDiFSSfWP58FNuvT3Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [darwin] - '@esbuild/darwin-x64@0.16.17': resolution: {integrity: sha512-2By45OBHulkd9Svy5IOCZt376Aa2oOkiE9QWUK9fe6Tb+WDr8hXL3dpqi+DeLiMed8tVXspzsTAvd0jUl96wmg==} engines: {node: '>=12'} @@ -1838,24 +1775,12 @@ packages: cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.19.12': - resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} + '@esbuild/darwin-x64@0.19.11': + resolution: {integrity: sha512-fkFUiS6IUK9WYUO/+22omwetaSNl5/A8giXvQlcinLIjVkxwTLSktbF5f/kJMftM2MJp9+fXqZ5ezS7+SALp4g==} engines: {node: '>=12'} cpu: [x64] os: [darwin] - '@esbuild/darwin-x64@0.21.5': - resolution: {integrity: sha512-se/JjF8NlmKVG4kNIuyWMV/22ZaerB+qaSi5MdrXtd6R08kvs2qCN4C09miupktDitvh8jRFflwGFBQcxZRjbw==} - engines: {node: '>=12'} - cpu: [x64] - os: [darwin] - - '@esbuild/darwin-x64@0.23.1': - resolution: {integrity: sha512-aClqdgTDVPSEGgoCS8QDG37Gu8yc9lTHNAQlsztQ6ENetKEO//b8y31MMu2ZaPbn4kVsIABzVLXYLhCGekGDqw==} - engines: {node: '>=18'} - cpu: [x64] - os: [darwin] - '@esbuild/freebsd-arm64@0.16.17': resolution: {integrity: sha512-mt+cxZe1tVx489VTb4mBAOo2aKSnJ33L9fr25JXpqQqzbUIw/yzIzi+NHwAXK2qYV1lEFp4OoVeThGjUbmWmdw==} engines: {node: '>=12'} @@ -1868,24 +1793,12 @@ packages: cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.19.12': - resolution: {integrity: sha512-4aRvFIXmwAcDBw9AueDQ2YnGmz5L6obe5kmPT8Vd+/+x/JMVKCgdcRwH6APrbpNXsPz+K653Qg8HB/oXvXVukA==} + '@esbuild/freebsd-arm64@0.19.11': + resolution: {integrity: sha512-lhoSp5K6bxKRNdXUtHoNc5HhbXVCS8V0iZmDvyWvYq9S5WSfTIHU2UGjcGt7UeS6iEYp9eeymIl5mJBn0yiuxA==} engines: {node: '>=12'} cpu: [arm64] os: [freebsd] - '@esbuild/freebsd-arm64@0.21.5': - resolution: {integrity: sha512-5JcRxxRDUJLX8JXp/wcBCy3pENnCgBR9bN6JsY4OmhfUtIHe3ZW0mawA7+RDAcMLrMIZaf03NlQiX9DGyB8h4g==} - engines: {node: '>=12'} - cpu: [arm64] - os: [freebsd] - - '@esbuild/freebsd-arm64@0.23.1': - resolution: {integrity: sha512-h1k6yS8/pN/NHlMl5+v4XPfikhJulk4G+tKGFIOwURBSFzE8bixw1ebjluLOjfwtLqY0kewfjLSrO6tN2MgIhA==} - engines: {node: '>=18'} - cpu: [arm64] - os: [freebsd] - '@esbuild/freebsd-x64@0.16.17': resolution: {integrity: sha512-8ScTdNJl5idAKjH8zGAsN7RuWcyHG3BAvMNpKOBaqqR7EbUhhVHOqXRdL7oZvz8WNHL2pr5+eIT5c65kA6NHug==} engines: {node: '>=12'} @@ -1898,24 +1811,12 @@ packages: cpu: [x64] os: [freebsd] - '@esbuild/freebsd-x64@0.19.12': - resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} + '@esbuild/freebsd-x64@0.19.11': + resolution: {integrity: sha512-JkUqn44AffGXitVI6/AbQdoYAq0TEullFdqcMY/PCUZ36xJ9ZJRtQabzMA+Vi7r78+25ZIBosLTOKnUXBSi1Kw==} 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'} - cpu: [x64] - os: [freebsd] - - '@esbuild/freebsd-x64@0.23.1': - resolution: {integrity: sha512-lK1eJeyk1ZX8UklqFd/3A60UuZ/6UVfGT2LuGo3Wp4/z7eRTRYY+0xOu2kpClP+vMTi9wKOfXi2vjUpO1Ro76g==} - engines: {node: '>=18'} - cpu: [x64] - os: [freebsd] - '@esbuild/linux-arm64@0.16.17': resolution: {integrity: sha512-7S8gJnSlqKGVJunnMCrXHU9Q8Q/tQIxk/xL8BqAP64wchPCTzuM6W3Ra8cIa1HIflAvDnNOt2jaL17vaW+1V0g==} engines: {node: '>=12'} @@ -1928,24 +1829,12 @@ packages: 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==} + '@esbuild/linux-arm64@0.19.11': + resolution: {integrity: sha512-LneLg3ypEeveBSMuoa0kwMpCGmpu8XQUh+mL8XXwoYZ6Be2qBnVtcDI5azSvh7vioMDhoJFZzp9GWp9IWpYoUg==} engines: {node: '>=12'} cpu: [arm64] os: [linux] - '@esbuild/linux-arm64@0.23.1': - resolution: {integrity: sha512-/93bf2yxencYDnItMYV/v116zff6UyTjo4EtEQjUBeGiVpMmffDNUyD9UN2zV+V3LRV3/on4xdZ26NKzn6754g==} - engines: {node: '>=18'} - cpu: [arm64] - os: [linux] - '@esbuild/linux-arm@0.16.17': resolution: {integrity: sha512-iihzrWbD4gIT7j3caMzKb/RsFFHCwqqbrbH9SqUSRrdXkXaygSZCZg1FybsZz57Ju7N/SHEgPyaR0LZ8Zbe9gQ==} engines: {node: '>=12'} @@ -1958,24 +1847,12 @@ packages: 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==} + '@esbuild/linux-arm@0.19.11': + resolution: {integrity: sha512-3CRkr9+vCV2XJbjwgzjPtO8T0SZUmRZla+UL1jw+XqHZPkPgZiyWvbDvl9rqAN8Zl7qJF0O/9ycMtjU67HN9/Q==} engines: {node: '>=12'} cpu: [arm] os: [linux] - '@esbuild/linux-arm@0.23.1': - resolution: {integrity: sha512-CXXkzgn+dXAPs3WBwE+Kvnrf4WECwBdfjfeYHpMeVxWE0EceB6vhWGShs6wi0IYEqMSIzdOF1XjQ/Mkm5d7ZdQ==} - engines: {node: '>=18'} - cpu: [arm] - os: [linux] - '@esbuild/linux-ia32@0.16.17': resolution: {integrity: sha512-kiX69+wcPAdgl3Lonh1VI7MBr16nktEvOfViszBSxygRQqSpzv7BffMKRPMFwzeJGPxcio0pdD3kYQGpqQ2SSg==} engines: {node: '>=12'} @@ -1988,24 +1865,12 @@ packages: 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==} + '@esbuild/linux-ia32@0.19.11': + resolution: {integrity: sha512-caHy++CsD8Bgq2V5CodbJjFPEiDPq8JJmBdeyZ8GWVQMjRD0sU548nNdwPNvKjVpamYYVL40AORekgfIubwHoA==} engines: {node: '>=12'} cpu: [ia32] os: [linux] - '@esbuild/linux-ia32@0.23.1': - resolution: {integrity: sha512-VTN4EuOHwXEkXzX5nTvVY4s7E/Krz7COC8xkftbbKRYAl96vPiUssGkeMELQMOnLOJ8k3BY1+ZY52tttZnHcXQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [linux] - '@esbuild/linux-loong64@0.16.17': resolution: {integrity: sha512-dTzNnQwembNDhd654cA4QhbS9uDdXC3TKqMJjgOWsC0yNCbpzfWoXdZvp0mY7HU6nzk5E0zpRGGx3qoQg8T2DQ==} engines: {node: '>=12'} @@ -2018,24 +1883,12 @@ packages: cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.19.12': - resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} + '@esbuild/linux-loong64@0.19.11': + resolution: {integrity: sha512-ppZSSLVpPrwHccvC6nQVZaSHlFsvCQyjnvirnVjbKSHuE5N24Yl8F3UwYUUR1UEPaFObGD2tSvVKbvR+uT1Nrg==} engines: {node: '>=12'} cpu: [loong64] os: [linux] - '@esbuild/linux-loong64@0.21.5': - resolution: {integrity: sha512-uHf1BmMG8qEvzdrzAqg2SIG/02+4/DHB6a9Kbya0XDvwDEKCoC8ZRWI5JJvNdUjtciBGFQ5PuBlpEOXQj+JQSg==} - engines: {node: '>=12'} - cpu: [loong64] - os: [linux] - - '@esbuild/linux-loong64@0.23.1': - resolution: {integrity: sha512-Vx09LzEoBa5zDnieH8LSMRToj7ir/Jeq0Gu6qJ/1GcBq9GkfoEAoXvLiW1U9J1qE/Y/Oyaq33w5p2ZWrNNHNEw==} - engines: {node: '>=18'} - cpu: [loong64] - os: [linux] - '@esbuild/linux-mips64el@0.16.17': resolution: {integrity: sha512-ezbDkp2nDl0PfIUn0CsQ30kxfcLTlcx4Foz2kYv8qdC6ia2oX5Q3E/8m6lq84Dj/6b0FrkgD582fJMIfHhJfSw==} engines: {node: '>=12'} @@ -2048,24 +1901,12 @@ packages: cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.19.12': - resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} + '@esbuild/linux-mips64el@0.19.11': + resolution: {integrity: sha512-B5x9j0OgjG+v1dF2DkH34lr+7Gmv0kzX6/V0afF41FkPMMqaQ77pH7CrhWeR22aEeHKaeZVtZ6yFwlxOKPVFyg==} engines: {node: '>=12'} cpu: [mips64el] os: [linux] - '@esbuild/linux-mips64el@0.21.5': - resolution: {integrity: sha512-IajOmO+KJK23bj52dFSNCMsz1QP1DqM6cwLUv3W1QwyxkyIWecfafnI555fvSGqEKwjMXVLokcV5ygHW5b3Jbg==} - engines: {node: '>=12'} - cpu: [mips64el] - os: [linux] - - '@esbuild/linux-mips64el@0.23.1': - resolution: {integrity: sha512-nrFzzMQ7W4WRLNUOU5dlWAqa6yVeI0P78WKGUo7lg2HShq/yx+UYkeNSE0SSfSure0SqgnsxPvmAUu/vu0E+3Q==} - engines: {node: '>=18'} - cpu: [mips64el] - os: [linux] - '@esbuild/linux-ppc64@0.16.17': resolution: {integrity: sha512-dzS678gYD1lJsW73zrFhDApLVdM3cUF2MvAa1D8K8KtcSKdLBPP4zZSLy6LFZ0jYqQdQ29bjAHJDgz0rVbLB3g==} engines: {node: '>=12'} @@ -2078,24 +1919,12 @@ packages: cpu: [ppc64] os: [linux] - '@esbuild/linux-ppc64@0.19.12': - resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} + '@esbuild/linux-ppc64@0.19.11': + resolution: {integrity: sha512-MHrZYLeCG8vXblMetWyttkdVRjQlQUb/oMgBNurVEnhj4YWOr4G5lmBfZjHYQHHN0g6yDmCAQRR8MUHldvvRDA==} 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'} - cpu: [ppc64] - os: [linux] - - '@esbuild/linux-ppc64@0.23.1': - resolution: {integrity: sha512-dKN8fgVqd0vUIjxuJI6P/9SSSe/mB9rvA98CSH2sJnlZ/OCZWO1DJvxj8jvKTfYUdGfcq2dDxoKaC6bHuTlgcw==} - engines: {node: '>=18'} - cpu: [ppc64] - os: [linux] - '@esbuild/linux-riscv64@0.16.17': resolution: {integrity: sha512-ylNlVsxuFjZK8DQtNUwiMskh6nT0vI7kYl/4fZgV1llP5d6+HIeL/vmmm3jpuoo8+NuXjQVZxmKuhDApK0/cKw==} engines: {node: '>=12'} @@ -2108,24 +1937,12 @@ packages: cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.19.12': - resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} + '@esbuild/linux-riscv64@0.19.11': + resolution: {integrity: sha512-f3DY++t94uVg141dozDu4CCUkYW+09rWtaWfnb3bqe4w5NqmZd6nPVBm+qbz7WaHZCoqXqHz5p6CM6qv3qnSSQ==} engines: {node: '>=12'} cpu: [riscv64] os: [linux] - '@esbuild/linux-riscv64@0.21.5': - resolution: {integrity: sha512-2HdXDMd9GMgTGrPWnJzP2ALSokE/0O5HhTUvWIbD3YdjME8JwvSCnNGBnTThKGEB91OZhzrJ4qIIxk/SBmyDDA==} - engines: {node: '>=12'} - cpu: [riscv64] - os: [linux] - - '@esbuild/linux-riscv64@0.23.1': - resolution: {integrity: sha512-5AV4Pzp80fhHL83JM6LoA6pTQVWgB1HovMBsLQ9OZWLDqVY8MVobBXNSmAJi//Csh6tcY7e7Lny2Hg1tElMjIA==} - engines: {node: '>=18'} - cpu: [riscv64] - os: [linux] - '@esbuild/linux-s390x@0.16.17': resolution: {integrity: sha512-gzy7nUTO4UA4oZ2wAMXPNBGTzZFP7mss3aKR2hH+/4UUkCOyqmjXiKpzGrY2TlEUhbbejzXVKKGazYcQTZWA/w==} engines: {node: '>=12'} @@ -2138,24 +1955,12 @@ packages: 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==} + '@esbuild/linux-s390x@0.19.11': + resolution: {integrity: sha512-A5xdUoyWJHMMlcSMcPGVLzYzpcY8QP1RtYzX5/bS4dvjBGVxdhuiYyFwp7z74ocV7WDc0n1harxmpq2ePOjI0Q==} engines: {node: '>=12'} cpu: [s390x] os: [linux] - '@esbuild/linux-s390x@0.23.1': - resolution: {integrity: sha512-9ygs73tuFCe6f6m/Tb+9LtYxWR4c9yg7zjt2cYkjDbDpV/xVn+68cQxMXCjUpYwEkze2RcU/rMnfIXNRFmSoDw==} - engines: {node: '>=18'} - cpu: [s390x] - os: [linux] - '@esbuild/linux-x64@0.16.17': resolution: {integrity: sha512-mdPjPxfnmoqhgpiEArqi4egmBAMYvaObgn4poorpUaqmvzzbvqbowRllQ+ZgzGVMGKaPkqUmPDOOFQRUFDmeUw==} engines: {node: '>=12'} @@ -2168,24 +1973,12 @@ packages: 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==} + '@esbuild/linux-x64@0.19.11': + resolution: {integrity: sha512-grbyMlVCvJSfxFQUndw5mCtWs5LO1gUlwP4CDi4iJBbVpZcqLVT29FxgGuBJGSzyOxotFG4LoO5X+M1350zmPA==} engines: {node: '>=12'} cpu: [x64] os: [linux] - '@esbuild/linux-x64@0.23.1': - resolution: {integrity: sha512-EV6+ovTsEXCPAp58g2dD68LxoP/wK5pRvgy0J/HxPGB009omFPv3Yet0HiaqvrIrgPTBuC6wCH1LTOY91EO5hQ==} - engines: {node: '>=18'} - cpu: [x64] - os: [linux] - '@esbuild/netbsd-x64@0.16.17': resolution: {integrity: sha512-/PzmzD/zyAeTUsduZa32bn0ORug+Jd1EGGAUJvqfeixoEISYpGnAezN6lnJoskauoai0Jrs+XSyvDhppCPoKOA==} engines: {node: '>=12'} @@ -2198,30 +1991,12 @@ packages: 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==} + '@esbuild/netbsd-x64@0.19.11': + resolution: {integrity: sha512-13jvrQZJc3P230OhU8xgwUnDeuC/9egsjTkXN49b3GcS5BKvJqZn86aGM8W9pd14Kd+u7HuFBMVtrNGhh6fHEQ==} engines: {node: '>=12'} cpu: [x64] os: [netbsd] - '@esbuild/netbsd-x64@0.23.1': - resolution: {integrity: sha512-aevEkCNu7KlPRpYLjwmdcuNz6bDFiE7Z8XC4CPqExjTvrHugh28QzUXVOZtiYghciKUacNktqxdpymplil1beA==} - engines: {node: '>=18'} - cpu: [x64] - os: [netbsd] - - '@esbuild/openbsd-arm64@0.23.1': - resolution: {integrity: sha512-3x37szhLexNA4bXhLrCC/LImN/YtWis6WXr1VESlfVtVeoFJBRINPJ3f0a/6LV8zpikqoUg4hyXw0sFBt5Cr+Q==} - engines: {node: '>=18'} - cpu: [arm64] - os: [openbsd] - '@esbuild/openbsd-x64@0.16.17': resolution: {integrity: sha512-2yaWJhvxGEz2RiftSk0UObqJa/b+rIAjnODJgv2GbGGpRwAfpgzyrg1WLK8rqA24mfZa9GvpjLcBBg8JHkoodg==} engines: {node: '>=12'} @@ -2234,24 +2009,12 @@ packages: 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==} + '@esbuild/openbsd-x64@0.19.11': + resolution: {integrity: sha512-ysyOGZuTp6SNKPE11INDUeFVVQFrhcNDVUgSQVDzqsqX38DjhPEPATpid04LCoUr2WXhQTEZ8ct/EgJCUDpyNw==} engines: {node: '>=12'} cpu: [x64] os: [openbsd] - '@esbuild/openbsd-x64@0.23.1': - resolution: {integrity: sha512-aY2gMmKmPhxfU+0EdnN+XNtGbjfQgwZj43k8G3fyrDM/UdZww6xrWxmDkuz2eCZchqVeABjV5BpildOrUbBTqA==} - engines: {node: '>=18'} - cpu: [x64] - os: [openbsd] - '@esbuild/sunos-x64@0.16.17': resolution: {integrity: sha512-xtVUiev38tN0R3g8VhRfN7Zl42YCJvyBhRKw1RJjwE1d2emWTVToPLNEQj/5Qxc6lVFATDiy6LjVHYhIPrLxzw==} engines: {node: '>=12'} @@ -2264,24 +2027,12 @@ packages: 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==} + '@esbuild/sunos-x64@0.19.11': + resolution: {integrity: sha512-Hf+Sad9nVwvtxy4DXCZQqLpgmRTQqyFyhT3bZ4F2XlJCjxGmRFF0Shwn9rzhOYRB61w9VMXUkxlBy56dk9JJiQ==} engines: {node: '>=12'} cpu: [x64] os: [sunos] - '@esbuild/sunos-x64@0.23.1': - resolution: {integrity: sha512-RBRT2gqEl0IKQABT4XTj78tpk9v7ehp+mazn2HbUeZl1YMdaGAQqhapjGTCe7uw7y0frDi4gS0uHzhvpFuI1sA==} - engines: {node: '>=18'} - cpu: [x64] - os: [sunos] - '@esbuild/win32-arm64@0.16.17': resolution: {integrity: sha512-ga8+JqBDHY4b6fQAmOgtJJue36scANy4l/rL97W+0wYmijhxKetzZdKOJI7olaBaMhWt8Pac2McJdZLxXWUEQw==} engines: {node: '>=12'} @@ -2294,24 +2045,12 @@ packages: 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==} + '@esbuild/win32-arm64@0.19.11': + resolution: {integrity: sha512-0P58Sbi0LctOMOQbpEOvOL44Ne0sqbS0XWHMvvrg6NE5jQ1xguCSSw9jQeUk2lfrXYsKDdOe6K+oZiwKPilYPQ==} engines: {node: '>=12'} cpu: [arm64] os: [win32] - '@esbuild/win32-arm64@0.23.1': - resolution: {integrity: sha512-4O+gPR5rEBe2FpKOVyiJ7wNDPA8nGzDuJ6gN4okSA1gEOYZ67N8JPk58tkWtdtPeLz7lBnY6I5L3jdsr3S+A6A==} - engines: {node: '>=18'} - cpu: [arm64] - os: [win32] - '@esbuild/win32-ia32@0.16.17': resolution: {integrity: sha512-WnsKaf46uSSF/sZhwnqE4L/F89AYNMiD4YtEcYekBt9Q7nj0DiId2XH2Ng2PHM54qi5oPrQ8luuzGszqi/veig==} engines: {node: '>=12'} @@ -2324,24 +2063,12 @@ packages: 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==} + '@esbuild/win32-ia32@0.19.11': + resolution: {integrity: sha512-6YOrWS+sDJDmshdBIQU+Uoyh7pQKrdykdefC1avn76ss5c+RN6gut3LZA4E2cH5xUEp5/cA0+YxRaVtRAb0xBg==} engines: {node: '>=12'} cpu: [ia32] os: [win32] - '@esbuild/win32-ia32@0.23.1': - resolution: {integrity: sha512-BcaL0Vn6QwCwre3Y717nVHZbAa4UBEigzFm6VdsVdT/MbZ38xoj1X9HPkZhbmaBGUD1W8vxAfffbDe8bA6AKnQ==} - engines: {node: '>=18'} - cpu: [ia32] - os: [win32] - '@esbuild/win32-x64@0.16.17': resolution: {integrity: sha512-y+EHuSchhL7FjHgvQL/0fnnFmO4T1bhvWANX6gcnqTjtnKWbTvUMCpGnv2+t+31d7RzyEAYAd4u2fnIhHL6N/Q==} engines: {node: '>=12'} @@ -2354,26 +2081,14 @@ packages: cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.19.12': - resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} + '@esbuild/win32-x64@0.19.11': + resolution: {integrity: sha512-vfkhltrjCAb603XaFhqhAF4LGDi2M4OrCRrFusyQ+iTLQ/o60QQXxc9cZC/FFpihBI9N1Grn6SMKVJ4KP7Fuiw==} engines: {node: '>=12'} cpu: [x64] os: [win32] - '@esbuild/win32-x64@0.21.5': - resolution: {integrity: sha512-tQd/1efJuzPC6rCFwEvLtci/xNFcTZknmXs98FYDfGE4wP9ClFV98nyKrzJKVPMhdDnjzLhdUyMX4PsQAPjwIw==} - engines: {node: '>=12'} - cpu: [x64] - os: [win32] - - '@esbuild/win32-x64@0.23.1': - resolution: {integrity: sha512-BHpFFeslkWrXWyUPnbKm+xYYVYruCinGcftSBaa8zoF9hZO4BcSCFUvHVTtzpIY6YzUnYtuEhZ+C9iEXjxnasg==} - engines: {node: '>=18'} - cpu: [x64] - os: [win32] - - '@escape.tech/graphql-armor-max-aliases@2.5.0': - resolution: {integrity: sha512-deaLZF3ASfJY9jUbBzoZW9IUHWqAVorpDR9Yez4mxk8iFltwCpgtJfVEb57T+R0RyiFrtjdUM5SQpNZJxhie7w==} + '@escape.tech/graphql-armor-max-aliases@2.4.0': + resolution: {integrity: sha512-d4V9EgtPRG9HIoPHuanFNLHj1ENB1YkZi9FbiBiH88x5VahCjVpMXDgKQGkG6RUTOODU4XKp0/ZgaOq0pX5oEA==} engines: {node: '>=18.0.0'} '@escape.tech/graphql-armor-max-depth@2.3.0': @@ -2393,16 +2108,16 @@ packages: peerDependencies: eslint: ^6.0.0 || ^7.0.0 || >=8.0.0 - '@eslint-community/regexpp@4.11.1': - resolution: {integrity: sha512-m4DVN9ZqskZoLU5GlWZadwDnYo3vAEydiUayB9widCl9ffWx2IvPnp6n3on5rJmziJSw9Bv+Z3ChDVdMwXCY8Q==} + '@eslint-community/regexpp@4.10.0': + resolution: {integrity: sha512-Cu96Sd2By9mCNTx2iyKOmq10v22jUVQv0lQnlGNy16oE9589yE+QADPbrMGCkA51cKZSg3Pu/aTJVTGfL/qjUA==} engines: {node: ^12.0.0 || ^14.0.0 || >=16.0.0} '@eslint/eslintrc@2.1.4': resolution: {integrity: sha512-269Z39MS6wVJtsoUl10L60WdkhJVdPG24Q4eZTH3nnF6lpvSShEK3wQjDX9JRWAUPvPh7COouPpU9IrqaZFvtQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - '@eslint/js@8.57.1': - resolution: {integrity: sha512-d9zaMRSTIKDLhctzH12MtXvJKSSUhaHcjV+2Z+GK+EEY7XKpP5yR4x+N3TAcHTcu963nIr+TMcCb4DBCYX1z6Q==} + '@eslint/js@8.56.0': + resolution: {integrity: sha512-gMsVel9D7f2HLkBma9VbtzZRehRogVRfbr++f06nL2vnCGCNlzOD+/MUov/F4p8myyAHspEhVobgjpX64q5m6A==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} '@ethersproject/abi@5.0.7': @@ -2471,26 +2186,26 @@ packages: '@graphprotocol/graph-ts@0.31.0': resolution: {integrity: sha512-xreRVM6ho2BtolyOh2flDkNoGZximybnzUnF53zJVp0+Ed0KnAlO1/KOCUYw06euVI9tk0c9nA2Z/D5SIQV2Rg==} - '@graphql-tools/executor@1.3.1': - resolution: {integrity: sha512-tgJDdGf9SCAm64ofEMZdv925u6/J+eTmv36TGNLxgP2DpCJsZ6gnJ4A+0D28EazDXqJIvMiPd+3d+o3cCRCAnQ==} + '@graphql-tools/executor@1.2.6': + resolution: {integrity: sha512-+1kjfqzM5T2R+dCw7F4vdJ3CqG+fY/LYJyhNiWEFtq0ToLwYzR/KKyD8YuzTirEjSxWTVlcBh7endkx5n5F6ew==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@graphql-tools/merge@9.0.7': - resolution: {integrity: sha512-lbTrIuXIbUSmSumHkPRY1QX0Z8JEtmRhnIrkH7vkfeEmf0kNn/nCWvJwqokm5U7L+a+DA1wlRM4slIlbfXjJBA==} + '@graphql-tools/merge@9.0.4': + resolution: {integrity: sha512-MivbDLUQ+4Q8G/Hp/9V72hbn810IJDEZQ57F01sHnlrrijyadibfVhaQfW/pNH+9T/l8ySZpaR/DpL5i+ruZ+g==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@graphql-tools/schema@10.0.6': - resolution: {integrity: sha512-EIJgPRGzpvDFEjVp+RF1zNNYIC36BYuIeZ514jFoJnI6IdxyVyIRDLx/ykgMdaa1pKQerpfdqDnsF4JnZoDHSQ==} + '@graphql-tools/schema@10.0.3': + resolution: {integrity: sha512-p28Oh9EcOna6i0yLaCFOnkcBDQECVf3SCexT6ktb86QNj9idnkhI+tCxnwZDh58Qvjd2nURdkbevvoZkvxzCog==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 - '@graphql-tools/utils@10.5.4': - resolution: {integrity: sha512-XHnyCWSlg1ccsD8s0y6ugo5GZ5TpkTiFVNPSYms5G0s6Z/xTuSmiLBfeqgkfaCwLmLaQnRCmNDL2JRnqc2R5bQ==} + '@graphql-tools/utils@10.2.0': + resolution: {integrity: sha512-HYV7dO6pNA2nGKawygaBpk8y+vXOUjjzzO43W/Kb7EPRmXUEQKjHxPYRvQbiF72u1N3XxwGK5jnnFk9WVhUwYw==} engines: {node: '>=16.0.0'} peerDependencies: graphql: ^14.0.0 || ^15.0.0 || ^16.0.0 || ^17.0.0 @@ -2504,8 +2219,8 @@ packages: resolution: {integrity: sha512-Mg8psdkAp+YTG1OGmvU+xa6xpsAmSir0hhr3yFYPyLNwzUj95DdIwsMpKadDj9xDpYgJcH3Hp/4JMal9DhQimA==} engines: {node: '>=18.0.0'} - '@graphql-yoga/subscription@5.0.1': - resolution: {integrity: sha512-1wCB1DfAnaLzS+IdoOzELGGnx1ODEg9nzQXFh4u2j02vAnne6d+v4A7HIH9EqzVdPLoAaMKXCZUUdKs+j3z1fg==} + '@graphql-yoga/subscription@5.0.0': + resolution: {integrity: sha512-Ri7sK8hmxd/kwaEa0YT8uqQUb2wOLsmBMxI90QDyf96lzOMJRgBuNYoEkU1pSgsgmW2glceZ96sRYfaXqwVxUw==} engines: {node: '>=18.0.0'} '@graphql-yoga/typed-event-target@3.0.0': @@ -2519,8 +2234,8 @@ packages: react: ^16 || ^17 || ^18 react-dom: ^16 || ^17 || ^18 - '@hono/node-server@1.13.0': - resolution: {integrity: sha512-kz323qIQkNQElEGroo/E9MKPDuIR5pkuk/XEWd50K+cSEKdmdiYx0PKWUdaNY2ecJYngtF+njDMsMKplL6zfEg==} + '@hono/node-server@1.12.2': + resolution: {integrity: sha512-xjzhqhSWUE/OhN0g3KCNVzNsQMlFUAL+/8GgPUr3TKcU7cvgZVBGswFofJ8WwGEHTqobzze1lDpGJl9ZNckDhA==} engines: {node: '>=18.14.1'} peerDependencies: hono: ^4 @@ -2532,8 +2247,8 @@ packages: '@trpc/server': ^10.10.0 || >11.0.0-rc hono: '>=4.*' - '@humanwhocodes/config-array@0.13.0': - resolution: {integrity: sha512-DZLEEqFWQFiyK6h5YIeynKx7JlvCYWL0cImfSRXZ9l4Sg2efkFGTuFf6vzXjK1cq6IYkU+Eg/JizXw+TD2vRNw==} + '@humanwhocodes/config-array@0.11.13': + resolution: {integrity: sha512-JSBDMiDKSzQVngfRjOdFXgFfklaXI4K9nLF49Auh21lmBWRLIK3+xTErTWD4KU54pb6coM6ESE7Awz/FNU3zgQ==} engines: {node: '>=10.10.0'} deprecated: Use @eslint/config-array instead @@ -2541,8 +2256,8 @@ packages: resolution: {integrity: sha512-bxveV4V8v5Yb4ncFTT3rPSgZBOpCkjfK0y4oVVVJwIuDVBRMDXrPyXRL988i5ap9m9bnyEEjWfm5WkBmtffLfA==} engines: {node: '>=12.22'} - '@humanwhocodes/object-schema@2.0.3': - resolution: {integrity: sha512-93zYdMES/c1D69yZiKDBj0V24vqNzB/koF26KPaagAfd3P/4gUlh3Dys5ogAK+Exi9QyzlD8x/08Zt7wIKcDcA==} + '@humanwhocodes/object-schema@2.0.1': + resolution: {integrity: sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw==} deprecated: Use @eslint/object-schema instead '@ipld/dag-cbor@7.0.3': @@ -2570,10 +2285,6 @@ packages: resolution: {integrity: sha512-dSYZh7HhCDtCKm4QakX0xFpsRDqjjtZf/kjI/v3T3Nwt5r8/qz/M19F9ySyOqU94SXBmeG9ttTul+YnR4LOxFA==} engines: {node: '>=6.0.0'} - '@jridgewell/resolve-uri@3.1.2': - resolution: {integrity: sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==} - engines: {node: '>=6.0.0'} - '@jridgewell/set-array@1.1.2': resolution: {integrity: sha512-xnkseuNADM0gt2bs+BvhO0p78Mk762YnZdsuzFV018NoG1Sj1SCQvpSqa7XUaTam5vAGasABV9qXASMKnFMwMw==} engines: {node: '>=6.0.0'} @@ -2581,9 +2292,6 @@ packages: '@jridgewell/sourcemap-codec@1.4.15': resolution: {integrity: sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==} - '@jridgewell/sourcemap-codec@1.5.0': - resolution: {integrity: sha512-gv3ZRaISU3fjPAgNsriBRqGWQL6quFx04YMPW/zD8XMLsU32mhCCbfbO6KZFLjvYpCZ8zyDEgqsgf+PwPaM7GQ==} - '@jridgewell/trace-mapping@0.3.20': resolution: {integrity: sha512-R8LcPeWZol2zR8mmH3JeKQ6QRCFb7XgUhV9ZlGhHLGyg4wpPiPZNQOOWhFZhxKw8u//yTbNGI42Bx/3paXEQ+Q==} @@ -2615,8 +2323,8 @@ packages: peerDependencies: react: '>=16' - '@mdx-js/react@3.0.1': - resolution: {integrity: sha512-9ZrPIU4MGf6et1m1ov3zKf+q9+deetI51zprKB1D/z3NOb+rUxxtEl3mCjW5wTGh6VhRdwPueh1oRzi6ezkA8A==} + '@mdx-js/react@3.0.0': + resolution: {integrity: sha512-nDctevR9KyYFyV+m+/+S4cpzCWHqj+iHDHq3QrsWezcC+B17uZdIWgCguESUkwFhM3n/56KxWVE3V6EokrmONQ==} peerDependencies: '@types/react': '>=16' react: '>=16' @@ -2694,123 +2402,63 @@ packages: '@next/env@14.0.3': resolution: {integrity: sha512-7xRqh9nMvP5xrW4/+L0jgRRX+HoNRGnfJpD+5Wq6/13j3dsdzxO3BCXn7D3hMqsDb+vjZnJq+vI7+EtgrYZTeA==} - '@next/env@14.2.13': - resolution: {integrity: sha512-s3lh6K8cbW1h5Nga7NNeXrbe0+2jIIYK9YaA9T7IufDWnZpozdFUp6Hf0d5rNWUKu4fEuSX2rCKlGjCrtylfDw==} - '@next/eslint-plugin-next@14.0.3': resolution: {integrity: sha512-j4K0n+DcmQYCVnSAM+UByTVfIHnYQy2ODozfQP+4RdwtRDfobrIvKq1K4Exb2koJ79HSSa7s6B2SA8T/1YR3RA==} - '@next/eslint-plugin-next@14.2.13': - resolution: {integrity: sha512-z8Mk0VljxhIzsSiZUSdt3wp+t2lKd+jk5a9Jsvh3zDGkItgDMfjv/ZbET6HsxEl/fSihVoHGsXV6VLyDH0lfTQ==} - '@next/swc-darwin-arm64@14.0.3': resolution: {integrity: sha512-64JbSvi3nbbcEtyitNn2LEDS/hcleAFpHdykpcnrstITFlzFgB/bW0ER5/SJJwUPj+ZPY+z3e+1jAfcczRLVGw==} engines: {node: '>= 10'} cpu: [arm64] os: [darwin] - '@next/swc-darwin-arm64@14.2.13': - resolution: {integrity: sha512-IkAmQEa2Htq+wHACBxOsslt+jMoV3msvxCn0WFSfJSkv/scy+i/EukBKNad36grRxywaXUYJc9mxEGkeIs8Bzg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [darwin] - '@next/swc-darwin-x64@14.0.3': resolution: {integrity: sha512-RkTf+KbAD0SgYdVn1XzqE/+sIxYGB7NLMZRn9I4Z24afrhUpVJx6L8hsRnIwxz3ERE2NFURNliPjJ2QNfnWicQ==} engines: {node: '>= 10'} cpu: [x64] os: [darwin] - '@next/swc-darwin-x64@14.2.13': - resolution: {integrity: sha512-Dv1RBGs2TTjkwEnFMVL5XIfJEavnLqqwYSD6LXgTPdEy/u6FlSrLBSSfe1pcfqhFEXRAgVL3Wpjibe5wXJzWog==} - engines: {node: '>= 10'} - cpu: [x64] - os: [darwin] - '@next/swc-linux-arm64-gnu@14.0.3': resolution: {integrity: sha512-3tBWGgz7M9RKLO6sPWC6c4pAw4geujSwQ7q7Si4d6bo0l6cLs4tmO+lnSwFp1Tm3lxwfMk0SgkJT7EdwYSJvcg==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-gnu@14.2.13': - resolution: {integrity: sha512-yB1tYEFFqo4ZNWkwrJultbsw7NPAAxlPXURXioRl9SdW6aIefOLS+0TEsKrWBtbJ9moTDgU3HRILL6QBQnMevg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@next/swc-linux-arm64-musl@14.0.3': resolution: {integrity: sha512-v0v8Kb8j8T23jvVUWZeA2D8+izWspeyeDGNaT2/mTHWp7+37fiNfL8bmBWiOmeumXkacM/AB0XOUQvEbncSnHA==} engines: {node: '>= 10'} cpu: [arm64] os: [linux] - '@next/swc-linux-arm64-musl@14.2.13': - resolution: {integrity: sha512-v5jZ/FV/eHGoWhMKYrsAweQ7CWb8xsWGM/8m1mwwZQ/sutJjoFaXchwK4pX8NqwImILEvQmZWyb8pPTcP7htWg==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [linux] - '@next/swc-linux-x64-gnu@14.0.3': resolution: {integrity: sha512-VM1aE1tJKLBwMGtyBR21yy+STfl0MapMQnNrXkxeyLs0GFv/kZqXS5Jw/TQ3TSUnbv0QPDf/X8sDXuMtSgG6eg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-gnu@14.2.13': - resolution: {integrity: sha512-aVc7m4YL7ViiRv7SOXK3RplXzOEe/qQzRA5R2vpXboHABs3w8vtFslGTz+5tKiQzWUmTmBNVW0UQdhkKRORmGA==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@next/swc-linux-x64-musl@14.0.3': resolution: {integrity: sha512-64EnmKy18MYFL5CzLaSuUn561hbO1Gk16jM/KHznYP3iCIfF9e3yULtHaMy0D8zbHfxset9LTOv6cuYKJgcOxg==} engines: {node: '>= 10'} cpu: [x64] os: [linux] - '@next/swc-linux-x64-musl@14.2.13': - resolution: {integrity: sha512-4wWY7/OsSaJOOKvMsu1Teylku7vKyTuocvDLTZQq0TYv9OjiYYWt63PiE1nTuZnqQ4RPvME7Xai+9enoiN0Wrg==} - engines: {node: '>= 10'} - cpu: [x64] - os: [linux] - '@next/swc-win32-arm64-msvc@14.0.3': resolution: {integrity: sha512-WRDp8QrmsL1bbGtsh5GqQ/KWulmrnMBgbnb+59qNTW1kVi1nG/2ndZLkcbs2GX7NpFLlToLRMWSQXmPzQm4tog==} engines: {node: '>= 10'} cpu: [arm64] os: [win32] - '@next/swc-win32-arm64-msvc@14.2.13': - resolution: {integrity: sha512-uP1XkqCqV2NVH9+g2sC7qIw+w2tRbcMiXFEbMihkQ8B1+V6m28sshBwAB0SDmOe0u44ne1vFU66+gx/28RsBVQ==} - engines: {node: '>= 10'} - cpu: [arm64] - os: [win32] - '@next/swc-win32-ia32-msvc@14.0.3': resolution: {integrity: sha512-EKffQeqCrj+t6qFFhIFTRoqb2QwX1mU7iTOvMyLbYw3QtqTw9sMwjykyiMlZlrfm2a4fA84+/aeW+PMg1MjuTg==} engines: {node: '>= 10'} cpu: [ia32] os: [win32] - '@next/swc-win32-ia32-msvc@14.2.13': - resolution: {integrity: sha512-V26ezyjPqQpDBV4lcWIh8B/QICQ4v+M5Bo9ykLN+sqeKKBxJVDpEc6biDVyluTXTC40f5IqCU0ttth7Es2ZuMw==} - engines: {node: '>= 10'} - cpu: [ia32] - os: [win32] - '@next/swc-win32-x64-msvc@14.0.3': resolution: {integrity: sha512-ERhKPSJ1vQrPiwrs15Pjz/rvDHZmkmvbf/BjPN/UCOI++ODftT0GtasDPi0j+y6PPJi5HsXw+dpRaXUaw4vjuQ==} engines: {node: '>= 10'} cpu: [x64] os: [win32] - '@next/swc-win32-x64-msvc@14.2.13': - resolution: {integrity: sha512-WwzOEAFBGhlDHE5Z73mNU8CO8mqMNLqaG+AO9ETmzdCQlJhVtWZnOl2+rqgVQS+YHunjOWptdFmNfbpwcUuEsw==} - engines: {node: '>= 10'} - cpu: [x64] - os: [win32] - '@noble/curves@1.2.0': resolution: {integrity: sha512-oYclrNgRaM9SsBUBVbb8M6DTV7ZHRTKugureoYEncY5c65HOmRzvSiTE3y5CYaPYJA/GVkrhXEoF0M3Ya9PMnw==} @@ -2821,6 +2469,10 @@ packages: resolution: {integrity: sha512-MVC8EAQp7MvEcm30KWENFjgR+Mkmf+D189XJTkFIlwohU5hcBbn1ZkKq7KVTi2Hme3PMGF390DaL52beVrIihQ==} engines: {node: '>= 16'} + '@noble/hashes@1.3.3': + resolution: {integrity: sha512-V7/fPHgl+jsVPXqqeOzT8egNj2iBIVt+ECeMMG8TdcnTikP3oaBtUVqpT/gYCR68aEBJSF+XbYUxStjbFMqIIA==} + engines: {node: '>= 16'} + '@noble/hashes@1.4.0': resolution: {integrity: sha512-V1JJ1WTRUqHHrOSh597hURcMqVKVGL/ea3kv0gSnEdsEZ0/+VyPghM1lMNGc00z7CIQorSvbKpuJkxvuHbvdbg==} engines: {node: '>= 16'} @@ -2841,8 +2493,8 @@ packages: resolution: {integrity: sha512-oGB+UxlgWcgQkgwo8GcEGwemoTFt3FIO9ababBmaGwXIoBKZ+GTy0pP185beGg7Llih/NSHSV2XAs1lnznocSg==} engines: {node: '>= 8'} - '@oclif/core@2.16.0': - resolution: {integrity: sha512-dL6atBH0zCZl1A1IXCKJgLPrM/wR7K+Wi401E/IvqsK8m2iCHW+0TEOGrans/cuN3oTW+uxIyJFHJ8Im0k4qBw==} + '@oclif/core@2.15.0': + resolution: {integrity: sha512-fNEMG5DzJHhYmI3MgpByTvltBOMyFcnRIUMxbiz2ai8rhaYgaTHMG3Q38HcosfIvtw9nCjxpcQtC8MN8QtVCcA==} engines: {node: '>=14.0.0'} '@oclif/core@2.8.6': @@ -2861,15 +2513,15 @@ packages: resolution: {integrity: sha512-AdY5wvN0P2vXBi3b29hxZgSFvdhdxPB9+f0B6s//P9Q8nibRWeA3cHm8UmLpio9ABigkVHJ5NMPk+Mz8VCCyrw==} engines: {node: '>=8.0.0'} - '@peculiar/asn1-schema@2.3.13': - resolution: {integrity: sha512-3Xq3a01WkHRZL8X04Zsfg//mGaA21xlL4tlVn4v2xGT0JStiztATRkMwa5b+f/HXmY2smsiLXYK46Gwgzvfg3g==} + '@peculiar/asn1-schema@2.3.8': + resolution: {integrity: sha512-ULB1XqHKx1WBU/tTFIA+uARuRoBVZ4pNdOA878RDrRbBfBGcSzi5HBkdScC6ZbHn8z7L8gmKCgPC1LHRrP46tA==} '@peculiar/json-schema@1.1.12': resolution: {integrity: sha512-coUfuoMeIB7B8/NMekxaDzLhaYmp0HZNPEjYRm9goRou8UZIC3z21s0sL9AWoCw4EG876QyO3kYrc61WNF9B/w==} engines: {node: '>=8.0.0'} - '@peculiar/webcrypto@1.5.0': - resolution: {integrity: sha512-BRs5XUAwiyCDQMsVA9IDvDa7UBR9gAvPHgugOeGng3YN6vJ9JYonyDc0lNczErgtCWtucjR5N7VtaonboD/ezg==} + '@peculiar/webcrypto@1.4.3': + resolution: {integrity: sha512-VtaY4spKTdN5LjJ04im/d/joXuvLbQdgy5Z4DXF4MFZhQ+MTrejbNMkfZBp1Bs3O5+bFqnJgyGdPuZQflvIa5A==} engines: {node: '>=10.12.0'} '@pkgjs/parseargs@0.11.0': @@ -2909,115 +2561,103 @@ packages: '@protobufjs/utf8@1.1.0': resolution: {integrity: sha512-Vvn3zZrhQZkkBE8LSuW3em98c0FwgO4nxzv6OdSxPKJIEKY2bGbHn+mhGIPerzI4twdxaP8/0+06HBpwf345Lw==} - '@radix-ui/react-compose-refs@1.1.0': - resolution: {integrity: sha512-b4inOtiaOnYf9KWyO3jAeeCG6FeyfY6ldiEPanbUjWd+xIk5wZeHa8yVwmrJ2vderhu/BQvzCrJI0lHd+wIiqw==} + '@radix-ui/react-compose-refs@1.0.1': + resolution: {integrity: sha512-fDSBgd44FKHa1FRMU59qBMPFcl2PZE+2nmqunj+BWFyYYjnhIDWL2ItDs3rrbJDQOtzt5nIebLCQc4QRfz6LJw==} peerDependencies: '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': optional: true - '@radix-ui/react-slot@1.1.0': - resolution: {integrity: sha512-FUCf5XMfmW4dtYl69pdS4DbxKy8nj4M7SafBgPllysxmdachynNflAdp/gCsnYWNDnge6tI9onzMp5ARYc1KNw==} + '@radix-ui/react-slot@1.0.2': + resolution: {integrity: sha512-YeTpuq4deV+6DusvVUW4ivBgnkHwECUu0BiN43L5UCDFgdhsRUWAghhTF5MbvNTPzmiFOx90asDSUjWuCNapwg==} peerDependencies: '@types/react': '*' - react: ^16.8 || ^17.0 || ^18.0 || ^19.0 || ^19.0.0-rc + react: ^16.8 || ^17.0 || ^18.0 peerDependenciesMeta: '@types/react': optional: true - '@repeaterjs/repeater@3.0.6': - resolution: {integrity: sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==} + '@repeaterjs/repeater@3.0.5': + resolution: {integrity: sha512-l3YHBLAol6d/IKnB9LhpD0cEZWAoe3eFKUyTYWmFmCO2Q/WOckxLQAUyMZWwZV2M/m3+4vgRoaolFqaII82/TA==} '@rescript/std@9.0.0': resolution: {integrity: sha512-zGzFsgtZ44mgL4Xef2gOy1hrRVdrs9mcxCOOKZrIPsmbZW14yTkaF591GXxpQvjXiHtgZ/iA9qLyWH6oSReIxQ==} - '@rollup/rollup-android-arm-eabi@4.22.2': - resolution: {integrity: sha512-8Ao+EDmTPjZ1ZBABc1ohN7Ylx7UIYcjReZinigedTOnGFhIctyGPxY2II+hJ6gD2/vkDKZTyQ0e7++kwv6wDrw==} + '@rollup/rollup-android-arm-eabi@4.9.2': + resolution: {integrity: sha512-RKzxFxBHq9ysZ83fn8Iduv3A283K7zPPYuhL/z9CQuyFrjwpErJx0h4aeb/bnJ+q29GRLgJpY66ceQ/Wcsn3wA==} cpu: [arm] os: [android] - '@rollup/rollup-android-arm64@4.22.2': - resolution: {integrity: sha512-I+B1v0a4iqdS9DvYt1RJZ3W+Oh9EVWjbY6gp79aAYipIbxSLEoQtFQlZEnUuwhDXCqMxJ3hluxKAdPD+GiluFQ==} + '@rollup/rollup-android-arm64@4.9.2': + resolution: {integrity: sha512-yZ+MUbnwf3SHNWQKJyWh88ii2HbuHCFQnAYTeeO1Nb8SyEiWASEi5dQUygt3ClHWtA9My9RQAYkjvrsZ0WK8Xg==} cpu: [arm64] os: [android] - '@rollup/rollup-darwin-arm64@4.22.2': - resolution: {integrity: sha512-BTHO7rR+LC67OP7I8N8GvdvnQqzFujJYWo7qCQ8fGdQcb8Gn6EQY+K1P+daQLnDCuWKbZ+gHAQZuKiQkXkqIYg==} + '@rollup/rollup-darwin-arm64@4.9.2': + resolution: {integrity: sha512-vqJ/pAUh95FLc/G/3+xPqlSBgilPnauVf2EXOQCZzhZJCXDXt/5A8mH/OzU6iWhb3CNk5hPJrh8pqJUPldN5zw==} cpu: [arm64] os: [darwin] - '@rollup/rollup-darwin-x64@4.22.2': - resolution: {integrity: sha512-1esGwDNFe2lov4I6GsEeYaAMHwkqk0IbuGH7gXGdBmd/EP9QddJJvTtTF/jv+7R8ZTYPqwcdLpMTxK8ytP6k6Q==} + '@rollup/rollup-darwin-x64@4.9.2': + resolution: {integrity: sha512-otPHsN5LlvedOprd3SdfrRNhOahhVBwJpepVKUN58L0RnC29vOAej1vMEaVU6DadnpjivVsNTM5eNt0CcwTahw==} cpu: [x64] os: [darwin] - '@rollup/rollup-linux-arm-gnueabihf@4.22.2': - resolution: {integrity: sha512-GBHuY07x96OTEM3OQLNaUSUwrOhdMea/LDmlFHi/HMonrgF6jcFrrFFwJhhe84XtA1oK/Qh4yFS+VMREf6dobg==} - cpu: [arm] - os: [linux] - - '@rollup/rollup-linux-arm-musleabihf@4.22.2': - resolution: {integrity: sha512-Dbfa9Sc1G1lWxop0gNguXOfGhaXQWAGhZUcqA0Vs6CnJq8JW/YOw/KvyGtQFmz4yDr0H4v9X248SM7bizYj4yQ==} + '@rollup/rollup-linux-arm-gnueabihf@4.9.2': + resolution: {integrity: sha512-ewG5yJSp+zYKBYQLbd1CUA7b1lSfIdo9zJShNTyc2ZP1rcPrqyZcNlsHgs7v1zhgfdS+kW0p5frc0aVqhZCiYQ==} cpu: [arm] os: [linux] - '@rollup/rollup-linux-arm64-gnu@4.22.2': - resolution: {integrity: sha512-Z1YpgBvFYhZIyBW5BoopwSg+t7yqEhs5HCei4JbsaXnhz/eZehT18DaXl957aaE9QK7TRGFryCAtStZywcQe1A==} + '@rollup/rollup-linux-arm64-gnu@4.9.2': + resolution: {integrity: sha512-pL6QtV26W52aCWTG1IuFV3FMPL1m4wbsRG+qijIvgFO/VBsiXJjDPE/uiMdHBAO6YcpV4KvpKtd0v3WFbaxBtg==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-arm64-musl@4.22.2': - resolution: {integrity: sha512-66Zszr7i/JaQ0u/lefcfaAw16wh3oT72vSqubIMQqWzOg85bGCPhoeykG/cC5uvMzH80DQa2L539IqKht6twVA==} + '@rollup/rollup-linux-arm64-musl@4.9.2': + resolution: {integrity: sha512-On+cc5EpOaTwPSNetHXBuqylDW+765G/oqB9xGmWU3npEhCh8xu0xqHGUA+4xwZLqBbIZNcBlKSIYfkBm6ko7g==} cpu: [arm64] os: [linux] - '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': - resolution: {integrity: sha512-HpJCMnlMTfEhwo19bajvdraQMcAq3FX08QDx3OfQgb+414xZhKNf3jNvLFYKbbDSGBBrQh5yNwWZrdK0g0pokg==} - cpu: [ppc64] - os: [linux] - - '@rollup/rollup-linux-riscv64-gnu@4.22.2': - resolution: {integrity: sha512-/egzQzbOSRef2vYCINKITGrlwkzP7uXRnL+xU2j75kDVp3iPdcF0TIlfwTRF8woBZllhk3QaxNOEj2Ogh3t9hg==} + '@rollup/rollup-linux-riscv64-gnu@4.9.2': + resolution: {integrity: sha512-Wnx/IVMSZ31D/cO9HSsU46FjrPWHqtdF8+0eyZ1zIB5a6hXaZXghUKpRrC4D5DcRTZOjml2oBhXoqfGYyXKipw==} cpu: [riscv64] os: [linux] - '@rollup/rollup-linux-s390x-gnu@4.22.2': - resolution: {integrity: sha512-qgYbOEbrPfEkH/OnUJd1/q4s89FvNJQIUldx8X2F/UM5sEbtkqZpf2s0yly2jSCKr1zUUOY1hnTP2J1WOzMAdA==} - cpu: [s390x] - os: [linux] - - '@rollup/rollup-linux-x64-gnu@4.22.2': - resolution: {integrity: sha512-a0lkvNhFLhf+w7A95XeBqGQaG0KfS3hPFJnz1uraSdUe/XImkp/Psq0Ca0/UdD5IEAGoENVmnYrzSC9Y2a2uKQ==} + '@rollup/rollup-linux-x64-gnu@4.9.2': + resolution: {integrity: sha512-ym5x1cj4mUAMBummxxRkI4pG5Vht1QMsJexwGP8547TZ0sox9fCLDHw9KCH9c1FO5d9GopvkaJsBIOkTKxksdw==} cpu: [x64] os: [linux] - '@rollup/rollup-linux-x64-musl@4.22.2': - resolution: {integrity: sha512-sSWBVZgzwtsuG9Dxi9kjYOUu/wKW+jrbzj4Cclabqnfkot8Z3VEHcIgyenA3lLn/Fu11uDviWjhctulkhEO60g==} + '@rollup/rollup-linux-x64-musl@4.9.2': + resolution: {integrity: sha512-m0hYELHGXdYx64D6IDDg/1vOJEaiV8f1G/iO+tejvRCJNSwK4jJ15e38JQy5Q6dGkn1M/9KcyEOwqmlZ2kqaZg==} cpu: [x64] os: [linux] - '@rollup/rollup-win32-arm64-msvc@4.22.2': - resolution: {integrity: sha512-t/YgCbZ638R/r7IKb9yCM6nAek1RUvyNdfU0SHMDLOf6GFe/VG1wdiUAsxTWHKqjyzkRGg897ZfCpdo1bsCSsA==} + '@rollup/rollup-win32-arm64-msvc@4.9.2': + resolution: {integrity: sha512-x1CWburlbN5JjG+juenuNa4KdedBdXLjZMp56nHFSHTOsb/MI2DYiGzLtRGHNMyydPGffGId+VgjOMrcltOksA==} cpu: [arm64] os: [win32] - '@rollup/rollup-win32-ia32-msvc@4.22.2': - resolution: {integrity: sha512-kTmX5uGs3WYOA+gYDgI6ITkZng9SP71FEMoHNkn+cnmb9Zuyyay8pf0oO5twtTwSjNGy1jlaWooTIr+Dw4tIbw==} + '@rollup/rollup-win32-ia32-msvc@4.9.2': + resolution: {integrity: sha512-VVzCB5yXR1QlfsH1Xw1zdzQ4Pxuzv+CPr5qpElpKhVxlxD3CRdfubAG9mJROl6/dmj5gVYDDWk8sC+j9BI9/kQ==} cpu: [ia32] os: [win32] - '@rollup/rollup-win32-x64-msvc@4.22.2': - resolution: {integrity: sha512-Yy8So+SoRz8I3NS4Bjh91BICPOSVgdompTIPYTByUqU66AXSIOgmW3Lv1ke3NORPqxdF+RdrZET+8vYai6f4aA==} + '@rollup/rollup-win32-x64-msvc@4.9.2': + resolution: {integrity: sha512-SYRedJi+mweatroB+6TTnJYLts0L0bosg531xnQWtklOI6dezEagx4Q0qDyvRdK+qgdA3YZpjjGuPFtxBmddBA==} cpu: [x64] os: [win32] '@rushstack/eslint-patch@1.6.1': resolution: {integrity: sha512-UY+FGM/2jjMkzQLn8pxcHGMaVLh9aEitG3zY2CiY7XHdLiz3bZOwa6oDxNqEMv7zZkV+cj5DOdz0cQ1BP5Hjgw==} - '@scure/base@1.1.9': - resolution: {integrity: sha512-8YKhl8GHiNI/pU2VMaofa2Tor7PJRAjwQLBBuilkJ9L5+13yVbC7JO/wS7piioAvPSwR3JKM1IJ/u4xQzbcXKg==} + '@scure/base@1.1.5': + resolution: {integrity: sha512-Brj9FiG2W1MRQSTB212YVPRrcbjkv48FoZi/u4l/zds/ieRrqsh7aUf6CLwkAq61oKXr/ZlTzlY66gLIj3TFTQ==} + + '@scure/base@1.1.8': + resolution: {integrity: sha512-6CyAclxj3Nb0XT7GHK6K4zK6k2xJm6E4Ft0Ohjt4WgegiFUHEtFb2CGzmPmGBwoIhrLsqNLYfLr04Y1GePrzZg==} '@scure/bip32@1.3.2': resolution: {integrity: sha512-N1ZhksgwD3OBlwTv3R6KFEcPojl/W4ElJOeCZdi+vuI5QmTFwLq3OFf2zd2ROpKvxFdgZ6hUpb0dx9bVNEwYCA==} @@ -3031,23 +2671,19 @@ packages: '@scure/bip39@1.4.0': resolution: {integrity: sha512-BEEm6p8IueV/ZTfQLp/0vhw4NPnT9oWf5+28nvmeUICjP99f4vr2d+qc7AVGDDtwRep6ifR43Yed9ERVmiITzw==} - '@segment/analytics-core@1.4.1': - resolution: {integrity: sha512-kV0Pf33HnthuBOVdYNani21kYyj118Fn+9757bxqoksiXoZlYvBsFq6giNdCsKcTIE1eAMqNDq3xE1VQ0cfsHA==} + '@segment/analytics-core@1.3.2': + resolution: {integrity: sha512-NpeBCfOyMdO2/BDKfhCUNHcEwxg88N2iTnswBoEMh38rtsQ03TWLVYwgiTakPjNQFezdKkR6jq3JhQ3WWgq67g==} - '@segment/analytics-generic-utils@1.1.1': - resolution: {integrity: sha512-THTIzBPHnvu1HYJU3fARdJ3qIkukO3zDXsmDm+kAeUks5R9CBXOQ6rPChiASVzSmwAIIo5uFIXXnCraojlq/Gw==} + '@segment/analytics-generic-utils@1.0.0': + resolution: {integrity: sha512-rAqcIQESnCsc80DMAxH06C4sJQ1MjwRLrWsih9qA2E0XwxydrMYgLA8eazxLW/wqEdctSJHCPnkMynpPIQgatw==} - '@segment/analytics-node@1.3.0': - resolution: {integrity: sha512-lRLz1WZaDokMoUe299yP5JkInc3OgJuqNNlxb6j0q22umCiq6b5iDo2gRmFn93reirIvJxWIicQsGrHd93q8GQ==} + '@segment/analytics-node@1.1.3': + resolution: {integrity: sha512-RGmD/VIW4iHqY+raeHlxdGY/FQpE6ATZHU8LrbwI+16uvT+sfw8d725J/lmzJIgNScJ/NFLg3LyHjitwPpqTxw==} engines: {node: '>=14'} '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} - '@sindresorhus/merge-streams@2.3.0': - resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} - engines: {node: '>=18'} - '@svgr/babel-plugin-add-jsx-attribute@8.0.0': resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==} engines: {node: '>=14'} @@ -3126,22 +2762,16 @@ packages: resolution: {integrity: sha512-LnhVjMWyMQV9ZmeEy26maJk+8HTIbd59cH4F2MJ439k9DqejRisfFNGAPvRYlKETuh9LrImlS8aKsBgKjMA8WA==} engines: {node: '>=14'} - '@swc/counter@0.1.3': - resolution: {integrity: sha512-e2BR4lsJkkRlKZ/qCHPw9ZaSxc0MVUd7gtbtaB7aMvHeJVYe8sOB8DBZkP2DtISHGSku9sCK6T6cnY0CtXrOCQ==} - '@swc/helpers@0.5.2': resolution: {integrity: sha512-E4KcWTpoLHqwPHLxidpOqQbcrZVgi0rsmmZXUle1jXmJfuIf/UWpczUJ7MZZ5tlxytgJXyp0w4PGkkeLiuIdZw==} - '@swc/helpers@0.5.5': - resolution: {integrity: sha512-KGYxvIOXcceOAbEk4bi/dVLEK9z8sZ0uBB3Il5b1rhfClSpcX0yfRO0KmTkqR2cnQDymwLB+25ZyMzICg/cm/A==} + '@tanstack/query-core@5.12.1': + resolution: {integrity: sha512-WbZztNmKq0t6QjdNmHzezbi/uifYo9j6e2GLJkodsYaYUlzMbAp91RDyeHkIZrm7EfO4wa6Sm5sxJZm5SPlh6w==} - '@tanstack/query-core@5.56.2': - resolution: {integrity: sha512-gor0RI3/R5rVV3gXfddh1MM+hgl0Z4G7tj6Xxpq6p2I03NGPaJ8dITY9Gz05zYYb/EJq9vPas/T4wn9EaDPd4Q==} - - '@tanstack/react-query@5.56.2': - resolution: {integrity: sha512-SR0GzHVo6yzhN72pnRhkEFRAHMsUo5ZPzAxfTMvUxFIDVS6W9LYUp6nXW3fcHVdg0ZJl8opSH85jqahvm6DSVg==} + '@tanstack/react-query@5.12.2': + resolution: {integrity: sha512-BeWZu8zVFH20oRc+S/K9ADPgWjEzP/XQCGBNz5IbApUwPQAdwkQYbXODVL5AyAlWiSxhx+P2xlARPBApj2Yrog==} peerDependencies: - react: ^18 || ^19 + react: ^18.0.0 '@theguild/remark-mermaid@0.0.5': resolution: {integrity: sha512-e+ZIyJkEv9jabI4m7q29wZtZv+2iwPGsXJ2d46Zi7e+QcFudiyuqhLhHG/3gX3ZEB+hxTch+fpItyMS8jwbIcw==} @@ -3163,8 +2793,8 @@ packages: resolution: {integrity: sha512-L7z9BgrNEcYyUYtF+HaEfiS5ebkh9jXqbszz7pC0hRBPaatV0XjSD3+eHrpqFemQfgwiFF0QPIarnIihIDn7OA==} engines: {node: '>=10.13.0'} - '@tsconfig/node10@1.0.11': - resolution: {integrity: sha512-DcRjDCujK/kCk/cUe8Xz8ZSpm8mS3mNNpta+jGCA6USEDfktlNvm1+IuZ9eTcDbNk41BHwpHHeW+N1lKCz4zOw==} + '@tsconfig/node10@1.0.9': + resolution: {integrity: sha512-jNsYVVxU8v5g43Erja32laIDHXeoNvFEpX33OK4d6hljo3jDhCBDhx5dhCCTMWUojscpAagGiRkBKxpdl9fxqA==} '@tsconfig/node12@1.0.11': resolution: {integrity: sha512-cqefuRsh12pWyGsIoBKJA9luFu3mRxCA+ORZvA4ktLSzIuCUtWVxGIuXigEwO5/ywWFMZ2QEGKWvkZG1zDMTag==} @@ -3181,14 +2811,14 @@ packages: '@types/babel__code-frame@7.0.6': resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} - '@types/better-sqlite3@7.6.11': - resolution: {integrity: sha512-i8KcD3PgGtGBLl3+mMYA8PdKkButvPyARxA7IQAd6qeslht13qxb1zzO8dRCtE7U3IoJS782zDBAeoKiM695kg==} + '@types/better-sqlite3@7.6.10': + resolution: {integrity: sha512-TZBjD+yOsyrUJGmcUj6OS3JADk3+UZcNv3NOBqGkM09bZdi28fNZw8ODqbMOLfKCu7RYCO62/ldq1iHbzxqoPw==} - '@types/bn.js@5.1.6': - resolution: {integrity: sha512-Xh8vSwUeMKeYYrj3cX4lGQgFSF/N03r+tv4AiLl1SucqV+uTQpxRcnM8AkXKHwYP9ZPXOYXRr2KPXpVlIvqh9w==} + '@types/bn.js@5.1.5': + resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} - '@types/cli-progress@3.11.6': - resolution: {integrity: sha512-cE3+jb9WRlu+uOSAugewNpITJDt1VF8dHOopPO4IABFc3SXYL5WE/+PTz/FCdZRRfIujiWW3n3aMbv1eIGVRWA==} + '@types/cli-progress@3.11.5': + resolution: {integrity: sha512-D4PbNRbviKyppS5ivBGyFO29POlySLmA2HyUFE4p5QGazAMM3CwkKWcvTl8gvElSuxRh6FPKL8XmidX873ou4g==} '@types/concat-stream@1.6.1': resolution: {integrity: sha512-eHE4cQPoj6ngxBZMvVf6Hw7Mh4jMW4U9lpGmS5GBPB9RYxlFg+CHaVN7ErNY4W9XfLIEn20b4VDYaIrbq0q4uA==} @@ -3214,9 +2844,6 @@ packages: '@types/estree@1.0.5': resolution: {integrity: sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw==} - '@types/estree@1.0.6': - resolution: {integrity: sha512-AYnb1nQyY49te+VRAVgmzfcgjYS91mY5P0TKUDCLEM+gNnA+3T6rWITXRLYCpahpqSQbN5cE+gHpnPyXjHWxcw==} - '@types/form-data@0.0.33': resolution: {integrity: sha512-8BSvG1kGm83cyJITQMZSulnl6QV8jqAGreJsc5tPu1Jq0vTSOiY/k24Wx82JRpWwZSqrala6sd5rWi6aNXvqcw==} @@ -3259,6 +2886,9 @@ packages: '@types/minimatch@5.1.2': resolution: {integrity: sha512-K0VQKziLUWkVKiRVrx4a40iPaxTUefQmjtkQofBkYRcoaaL/8rhwDWww9qWbrgicNOgnpIsMxyNIUM4+n6dUIA==} + '@types/minimist@1.2.5': + resolution: {integrity: sha512-hov8bUuiLiyFPGyFPE1lwWhmzYbirOXQNNo40+y3zow8aFVTeyn3VWL0VFFfdNddA8S4Vf0Tc062rzyNr7Paag==} + '@types/ms@0.7.34': resolution: {integrity: sha512-nG96G3Wp6acyAgJqGasjODb+acrI7KltPiRxzHPXnP3NgI28bpQDRv53olbqGXbfcgF5aiiHmO3xpwEpS5Ld9g==} @@ -3268,20 +2898,23 @@ packages: '@types/node@12.20.55': resolution: {integrity: sha512-J8xLz7q2OFulZ2cyGTLE1TbbZcjpno7FaN6zdJNrgAdrJ+DZzh/uFR6YrTb4C+nXakvud8Q4+rbhoIWlYQbUFQ==} - '@types/node@20.16.5': - resolution: {integrity: sha512-VwYCweNo3ERajwy0IUlqqcyZ8/A7Zwa9ZP3MnENWcB11AejO+tLy3pu850goUW2FC/IJMdZUfKpX/yxL1gymCA==} + '@types/node@20.11.24': + resolution: {integrity: sha512-Kza43ewS3xoLgCEpQrsT+xRo/EJej1y0kVYGiLFE1NEODXGzTfwiC6tXTLMQskn1X4/Rjlh0MQUvx9W+L9long==} '@types/node@8.10.66': resolution: {integrity: sha512-tktOkFUA4kXx2hhhrB8bIFb5TbwzS4uOhKEmwiD+NoiL0qtP2OQ9mFldbgD4dV1djrlBYP6eBuQZiWjuHUpqFw==} + '@types/normalize-package-data@2.4.4': + resolution: {integrity: sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA==} + '@types/parse-json@4.0.2': resolution: {integrity: sha512-dISoDXWWQwUquiKsyZ4Ng+HX2KsPL7LyHKHQwgGFEA3IaKac4Obd+h2a/a6waisAoepJlBcx9paWqjA8/HVjCw==} '@types/pbkdf2@3.1.2': resolution: {integrity: sha512-uRwJqmiXmh9++aSu1VNEn3iIxWOhd8AHXNSdlaLfdAAdSTY9jYVeGWnzejM3dvrkbqE3/hyQkQQ29IFATEGlew==} - '@types/pg@8.11.10': - resolution: {integrity: sha512-LczQUW4dbOQzsH2RQ5qoeJ6qJPdrcM/DcMLoqWQkMLMsq83J5lAX3LXjdkWdpscFy67JSOWDnh7Ny/sPFykmkg==} + '@types/pg@8.10.9': + resolution: {integrity: sha512-UksbANNE/f8w0wOMxVKKIrLCbEMV+oM1uKejmwXr39olg4xqcfBDbXxObJAt6XxHbDa4XTKOlUEcEltXDX+XLQ==} '@types/prompts@2.4.9': resolution: {integrity: sha512-qTxFi6Buiu8+50/+3DGIWLHM6QuWsEKugJnnP6iv2Mc4ncxE4A/OJkjuVOA+5X0X1S/nq5VJRa8Lu+nwcvbrKA==} @@ -3289,14 +2922,17 @@ packages: '@types/prop-types@15.7.11': resolution: {integrity: sha512-ga8y9v9uyeiLdpKddhxYQkxNDrfvuPrlFb0N1qnZZByvcElJaXthF1UhvCh9TLWJBEHeNtdnbysW7Y6Uq8CVng==} - '@types/qs@6.9.16': - resolution: {integrity: sha512-7i+zxXdPD0T4cKDuxCUXJ4wHcsJLwENa6Z3dCu8cfCK743OGy5Nu1RmAGqDPsoTDINVEcdXKRvR/zre+P2Ku1A==} + '@types/qs@6.9.11': + resolution: {integrity: sha512-oGk0gmhnEJK4Yyk+oI7EfXsLayXatCWPHary1MtcmbAifkobT9cM9yutG/hZKIseOU0MqbIwQ/u2nn/Gb+ltuQ==} - '@types/react-dom@18.3.0': - resolution: {integrity: sha512-EhwApuTmMBmXuFOikhQLIBUn6uFg81SwLMOAUgodJF14SOBOCMdU04gDoYi0WOJJHD144TL32z4yDqCW3dnkQg==} + '@types/react-dom@18.2.17': + resolution: {integrity: sha512-rvrT/M7Df5eykWFxn6MYt5Pem/Dbyc1N8Y0S9Mrkw2WFCRiqUgw9P7ul2NpwsXCSM1DVdENzdG9J5SreqfAIWg==} - '@types/react@18.3.8': - resolution: {integrity: sha512-syBUrW3/XpnW4WJ41Pft+I+aPoDVbrBVQGEnbD7NijDGlVC+8gV/XKRY+7vMDlfPpbwYt0l1vd/Sj8bJGMbs9Q==} + '@types/react@18.2.46': + resolution: {integrity: sha512-nNCvVBcZlvX4NU1nRRNV/mFl1nNRuTuslAJglQsq+8ldXe5Xv0Wd2f7WTE3jOxhLH2BFfiZGC6GCp+kHQbgG+w==} + + '@types/scheduler@0.16.8': + resolution: {integrity: sha512-WZLiwShhwLRmeV6zH+GkbOFT6Z6VklCItrDioxUnv+u4Ll+8vKeFySoFyK/0ctcRpOmwAicELfmys1sDc/Rw+A==} '@types/secp256k1@4.0.6': resolution: {integrity: sha512-hHxJU6PAEUn0TP4S/ZOzuTUvJWuZ6eIKeNKb5RBpODvSl6hp1Wrw4s7ATY50rklRCScUDpHzVA/DQdSjJ3UoYQ==} @@ -3316,17 +2952,6 @@ packages: '@types/ws@7.4.7': resolution: {integrity: sha512-JQbbmxZTZehdc2iszGKs5oC3NFnjeay7mtAWrdt7qNtAVK0g19muApzAy4bm9byz79xa2ZnO/BOBC2R8RC5Lww==} - '@typescript-eslint/eslint-plugin@8.6.0': - resolution: {integrity: sha512-UOaz/wFowmoh2G6Mr9gw60B1mm0MzUtm6Ic8G2yM1Le6gyj5Loi/N+O5mocugRGY+8OeeKmkMmbxNqUCq3B4Sg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - '@typescript-eslint/parser': ^8.0.0 || ^8.0.0-alpha.0 - eslint: ^8.57.0 || ^9.0.0 - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/parser@6.17.0': resolution: {integrity: sha512-C4bBaX2orvhK+LlwrY8oWGmSl4WolCfYm513gEccdWZj0CwGadbIADb0FtVEcI+WzUyjyoBj2JRP8g25E6IB8A==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3341,27 +2966,10 @@ packages: resolution: {integrity: sha512-RX7a8lwgOi7am0k17NUO0+ZmMOX4PpjLtLRgLmT1d3lBYdWH4ssBUbwdmc5pdRX8rXon8v9x8vaoOSpkHfcXGA==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/scope-manager@8.6.0': - resolution: {integrity: sha512-ZuoutoS5y9UOxKvpc/GkvF4cuEmpokda4wRg64JEia27wX+PysIE9q+lzDtlHHgblwUWwo5/Qn+/WyTUvDwBHw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - - '@typescript-eslint/type-utils@8.6.0': - resolution: {integrity: sha512-dtePl4gsuenXVwC7dVNlb4mGDcKjDT/Ropsk4za/ouMBPplCLyznIaR+W65mvCvsyS97dymoBRrioEXI7k0XIg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - '@typescript-eslint/types@6.17.0': resolution: {integrity: sha512-qRKs9tvc3a4RBcL/9PXtKSehI/q8wuU9xYJxe97WFxnzH8NWWtcW3ffNS+EWg8uPvIerhjsEZ+rHtDqOCiH57A==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/types@8.6.0': - resolution: {integrity: sha512-rojqFZGd4MQxw33SrOy09qIDS8WEldM8JWtKQLAjf/X5mGSeEFh5ixQlxssMNyPslVIk9yzWqXCsV2eFhYrYUw==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@typescript-eslint/typescript-estree@6.17.0': resolution: {integrity: sha512-gVQe+SLdNPfjlJn5VNGhlOhrXz4cajwFd5kAgWtZ9dCZf4XJf8xmgCTLIqec7aha3JwgLI2CK6GY1043FRxZwg==} engines: {node: ^16.0.0 || >=18.0.0} @@ -3371,49 +2979,30 @@ packages: typescript: optional: true - '@typescript-eslint/typescript-estree@8.6.0': - resolution: {integrity: sha512-MOVAzsKJIPIlLK239l5s06YXjNqpKTVhBVDnqUumQJja5+Y94V3+4VUFRA0G60y2jNnTVwRCkhyGQpavfsbq/g==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - typescript: '*' - peerDependenciesMeta: - typescript: - optional: true - - '@typescript-eslint/utils@8.6.0': - resolution: {integrity: sha512-eNp9cWnYf36NaOVjkEUznf6fEgVy1TWpE0o52e4wtojjBx7D1UV2WAWGzR+8Y5lVFtpMLPwNbC67T83DWSph4A==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - peerDependencies: - eslint: ^8.57.0 || ^9.0.0 - '@typescript-eslint/visitor-keys@6.17.0': resolution: {integrity: sha512-H6VwB/k3IuIeQOyYczyyKN8wH6ed8EwliaYHLxOIhyF0dYEIsN8+Bk3GE19qafeMKyZJJHP8+O1HiFhFLUNKSg==} engines: {node: ^16.0.0 || >=18.0.0} - '@typescript-eslint/visitor-keys@8.6.0': - resolution: {integrity: sha512-wapVFfZg9H0qOYh4grNVQiMklJGluQrOUiOhYRrQWhx7BY/+I1IYb8BczWNbbUpO+pqy0rDciv3lQH5E1bCLrg==} - engines: {node: ^18.18.0 || ^20.9.0 || >=21.1.0} - '@ungap/structured-clone@1.2.0': resolution: {integrity: sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ==} '@viem/anvil@0.0.6': resolution: {integrity: sha512-OjKR/+FVwzuygXYFqP8MBal1SXG8bT2gbZwqqB0XuLw81LNBBvmE/Repm6+5kkBh4IUj0PhYdrqOsnayS14Gtg==} - '@vitest/expect@1.6.0': - resolution: {integrity: sha512-ixEvFVQjycy/oNgHjqsL6AZCDduC+tflRluaHIzKIsdbzkLn2U/iBnVeJwB6HsIjQBdfMR8Z0tRxKUsvFJEeWQ==} + '@vitest/expect@1.0.2': + resolution: {integrity: sha512-mAIo/8uddSWkjQMLFcjqZP3WmkwvvN0OtlyZIu33jFnwme3vZds8m8EDMxtj+Uzni2DwtPfHNjJcTM8zTV1f4A==} - '@vitest/runner@1.6.0': - resolution: {integrity: sha512-P4xgwPjwesuBiHisAVz/LSSZtDjOTPYZVmNAnpHHSR6ONrf8eCJOFRvUwdHn30F5M1fxhqtl7QZQUk2dprIXAg==} + '@vitest/runner@1.0.2': + resolution: {integrity: sha512-ZcHJXPT2kg/9Hc4fNkCbItlsgZSs3m4vQbxB8LCSdzpbG85bExCmSvu6K9lWpMNdoKfAr1Jn0BwS9SWUcGnbTQ==} - '@vitest/snapshot@1.6.0': - resolution: {integrity: sha512-+Hx43f8Chus+DCmygqqfetcAZrDJwvTj0ymqjQq4CvmpKFSTVteEOBzCusu1x2tt4OJcvBflyHUE0DZSLgEMtQ==} + '@vitest/snapshot@1.0.2': + resolution: {integrity: sha512-9ClDz2/aV5TfWA4reV7XR9p+hE0e7bifhwxlURugj3Fw0YXeTFzHmKCNEHd6wOIFMfthbGGwhlq7TOJ2jDO4/g==} - '@vitest/spy@1.6.0': - resolution: {integrity: sha512-leUTap6B/cqi/bQkXUu6bQV5TZPx7pmMBKBQiI0rJA8c3pB56ZsaTbREnF7CJfmvAS4V2cXIBAh/3rVwrrCYgw==} + '@vitest/spy@1.0.2': + resolution: {integrity: sha512-YlnHmDntp+zNV3QoTVFI5EVHV0AXpiThd7+xnDEbWnD6fw0TH/J4/+3GFPClLimR39h6nA5m0W4Bjm5Edg4A/A==} - '@vitest/utils@1.6.0': - resolution: {integrity: sha512-21cPiuGMoMZwiOHa2i4LXkMkMkCGzA+MVFV70jRwHo95dL4x/ts5GZhML1QWuy7yfp3WzK3lRvZi3JnXTYqrBw==} + '@vitest/utils@1.0.2': + resolution: {integrity: sha512-GPQkGHAnFAP/+seSbB9pCsj339yRrMgILoI5H2sPevTLCYgBq0VRjF8QSllmnQyvf0EontF6KUIt2t5s2SmqoQ==} '@wagmi/cli@1.5.2': resolution: {integrity: sha512-UfLMYhW6mQBCjR8A5s01Chf9GpHzdpcuuBuzJ36QGXcMSJAxylz5ImVZWfCRV0ct1UruydjKVSW1QSI6azNxRQ==} @@ -3434,27 +3023,27 @@ packages: '@whatwg-node/events@0.0.3': resolution: {integrity: sha512-IqnKIDWfXBJkvy/k6tzskWTc2NK3LcqHlb+KHGCrjOCH4jfQckRX0NAiIcC/vIqQkzLYw2r2CTSwAxcrtcD6lA==} - '@whatwg-node/events@0.1.2': - resolution: {integrity: sha512-ApcWxkrs1WmEMS2CaLLFUEem/49erT3sxIVjpzU5f6zmVcnijtDSrhoK2zVobOIikZJdH63jdAXOrvjf6eOUNQ==} - engines: {node: '>=18.0.0'} + '@whatwg-node/events@0.1.1': + resolution: {integrity: sha512-AyQEn5hIPV7Ze+xFoXVU3QTHXVbWPrzaOkxtENMPMuNL6VVHrp4hHfDt9nrQpjO7BgvuM95dMtkycX5M/DZR3w==} + engines: {node: '>=16.0.0'} '@whatwg-node/fetch@0.8.8': resolution: {integrity: sha512-CdcjGC2vdKhc13KKxgsc6/616BQ7ooDIgPeTuAiE8qfCnS0mGzcfCOoZXypQSz73nxI+GWc7ZReIAVhxoE1KCg==} - '@whatwg-node/fetch@0.9.21': - resolution: {integrity: sha512-Wt0jPb+04JjobK0pAAN7mEHxVHcGA9HoP3OyCsZtyAecNQeADXCZ1MihFwVwjsgaRYuGVmNlsCmLxlG6mor8Gw==} - engines: {node: '>=18.0.0'} + '@whatwg-node/fetch@0.9.17': + resolution: {integrity: sha512-TDYP3CpCrxwxpiNY0UMNf096H5Ihf67BK1iKGegQl5u9SlpEDYrvnV71gWBGJm+Xm31qOy8ATgma9rm8Pe7/5Q==} + engines: {node: '>=16.0.0'} '@whatwg-node/node-fetch@0.3.6': resolution: {integrity: sha512-w9wKgDO4C95qnXZRwZTfCmLWqyRnooGjcIwG0wADWjw9/HN0p7dtvtgSvItZtUyNteEvgTrd8QojNEqV6DAGTA==} - '@whatwg-node/node-fetch@0.5.26': - resolution: {integrity: sha512-4jXDeZ4IH4bylZ6wu14VEx0aDXXhrN4TC279v9rPmn08g4EYekcYf8wdcOOnS9STjDkb6x77/6xBUTqxGgjr8g==} - engines: {node: '>=18.0.0'} + '@whatwg-node/node-fetch@0.5.11': + resolution: {integrity: sha512-LS8tSomZa3YHnntpWt3PP43iFEEl6YeIsvDakczHBKlay5LdkXFr8w7v8H6akpG5nRrzydyB0k1iE2eoL6aKIQ==} + engines: {node: '>=16.0.0'} - '@whatwg-node/server@0.9.49': - resolution: {integrity: sha512-3KzLXw80gWnTsQ746G/LFdCThTPfDodjQs4PnmoNuPa6XUOl4HWq8TlJpxtmnEEB+y+UYLal+3VQ68dtYlbUDQ==} - engines: {node: '>=18.0.0'} + '@whatwg-node/server@0.9.34': + resolution: {integrity: sha512-1sHRjqUtZIyTR2m2dS/dJpzS5OcNDpPuUSVDa2PoEgzYVKr4GsqJaYtRaEXXFohvvyh6PkouYCc1rE7jMDWVCA==} + engines: {node: '>=16.0.0'} JSONStream@1.3.2: resolution: {integrity: sha512-mn0KSip7N4e0UDPZHnqDsHECo5uGQrixQKnAskOM1BIB8hd7QKbd6il8IPRPudPHOeHiECoCFqhyMaRO9+nWyA==} @@ -3495,8 +3084,8 @@ packages: zod: optional: true - abitype@1.0.5: - resolution: {integrity: sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==} + abitype@1.0.1: + resolution: {integrity: sha512-HyHCfBwNYvHPGWsdv5PiKj8b1LnZUCuALyUWg5iP/wbK8FpdmTI4Qk9CYzjNgmsWwRw5j/DCruOltrnUGQdBeQ==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -3506,8 +3095,8 @@ packages: zod: optional: true - abitype@1.0.6: - resolution: {integrity: sha512-MMSqYh4+C/aVqI2RQaWqbvI4Kxo5cQV40WQ4QFtDnNzCkqChm8MuENhElmynZlO0qUy/ObkEUaXtKqYnx1Kp3A==} + abitype@1.0.5: + resolution: {integrity: sha512-YzDhti7cjlfaBhHutMaboYB21Ha3rXR9QTkNJFzYC4kC8YclaiwPBBBJY8ejFdu2wnJeZCVZSMlQJ7fi8S6hsw==} peerDependencies: typescript: '>=5.0.4' zod: ^3 >=3.22.0 @@ -3526,23 +3115,27 @@ packages: peerDependencies: acorn: ^6.0.0 || ^7.0.0 || ^8.0.0 - acorn-walk@8.3.4: - resolution: {integrity: sha512-ueEepnujpqee2o5aIYnvHU6C0A42MNdsIDeqy5BydrkuC5R1ZuUFnm27EeFJGoEHJQgn3uleRvmTXaJgfXbt4g==} + acorn-walk@8.3.1: + resolution: {integrity: sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==} engines: {node: '>=0.4.0'} - acorn@8.12.1: - resolution: {integrity: sha512-tcpGyI9zbizT9JbV6oYE477V6mTlXvvi0T0G3SNIYE2apm/G5huBa1+K89VGeovbg+jycCrfhl3ADxErOuO6Jg==} + acorn@8.11.3: + resolution: {integrity: sha512-Y9rRfJG5jcKOE0CLisYbojUjIrIEE7AGMzA/Sm4BslANhbS+cDMpgBdcPT91oJ7OuJ9hYJBx59RjbhxVnrF8Xg==} engines: {node: '>=0.4.0'} hasBin: true + aggregate-error@4.0.1: + resolution: {integrity: sha512-0poP0T7el6Vq3rstR8Mn4V/IQrpBLO6POkUSrN7RhyY+GF/InCFShQzsQ39T25gkHhLgSLByyAz+Kjb+c2L98w==} + engines: {node: '>=12'} + ajv-formats@2.1.1: resolution: {integrity: sha512-Wx0Kx52hxE7C18hkMEggYlEifqWZtYaRgouJor+WMdPnQyEK13vgEWyVNup7SoeeoLMsr4kf5h6dOW11I15MUA==} ajv@6.12.6: resolution: {integrity: sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g==} - ajv@8.17.1: - resolution: {integrity: sha512-B/gBuNg5SiMTrPkC+A2+cW0RszwxYmn6VYxB/inlBStS5nx6xHIt/ehKRhIMhqusl7a8LjQoZnjCs5vhwxOQ1g==} + ajv@8.12.0: + resolution: {integrity: sha512-sRu1kpcO9yLtYxBKvqfTeh9KzZEwO3STyX1HT+4CaDzC6HpTGYhIhPIzj9XuKU7KYDwnaeh5hcOwjy1QuJzBPA==} ansi-colors@4.1.3: resolution: {integrity: sha512-/6w/C21Pm1A7aZitlI5Ni/2J6FFQN8i1Cvz3kHABAAbw93v/NlvKdVOqz7CCWz/3iv/JplRSEEZ83XION15ovw==} @@ -3552,14 +3145,10 @@ packages: resolution: {integrity: sha512-gKXj5ALrKWQLsYG9jlTRmR/xKluxHV+Z9QEwNIgCfM1/uwPMCuzVVnh5mwTd+OuBZcwSIMbqssNWRm1lE51QaQ==} engines: {node: '>=8'} - ansi-escapes@6.2.1: - resolution: {integrity: sha512-4nJ3yixlEthEJ9Rk4vPcdBRkZvQZlYyu8j4/Mqz5sgIkddmEnH2Yj2ZrnP9S3tQOvSNRUIgVNF/1yPpRAGNRig==} + ansi-escapes@6.2.0: + resolution: {integrity: sha512-kzRaCqXnpzWs+3z5ABPQiVke+iq0KXkHo8xiWV4RPTi5Yli0l97BEQuhXV1s7+aSU/fu1kUuxgS4MsQ0fRuygw==} engines: {node: '>=14.16'} - ansi-escapes@7.0.0: - resolution: {integrity: sha512-GdYO7a61mR0fOlAsvC9/rIHf7L96sBc6dEWzeOu+KAea5bZyQRPIpojrVoI4AXGJS/ycu/fBTdLrUkA4ODrvjw==} - engines: {node: '>=18'} - ansi-regex@4.1.1: resolution: {integrity: sha512-ILlv4k/3f6vfQ4OoP2AGvirOktlQ98ZEL1k9FaQjxa3L1abBgbuTDAdPOpvbGncC0BTVQrl+OM8xZGK6tWXt7g==} engines: {node: '>=6'} @@ -3568,8 +3157,8 @@ packages: resolution: {integrity: sha512-quJQXlTSUGL2LH9SUXo8VwsY4soanhgo6LNSm84E1LBcE8s3O0wpdiRzyR9z/ZZJMlMWv37qOOb9pdJlMUEKFQ==} engines: {node: '>=8'} - ansi-regex@6.1.0: - resolution: {integrity: sha512-7HSX4QQb4CspciLpVFwyRe79O3xsIZDDLER21kERQ71oaPodF8jL725AgJMFAYbooIqolJoRLuM81SpeUkpkvA==} + ansi-regex@6.0.1: + resolution: {integrity: sha512-n5M855fKb2SsfMIiFFoVrABHJC8QtHwVx+mHWP3QcEqBHYienj5dHSgjbxtC0WEZXYt4wcD6zrQElDPhFuZgfA==} engines: {node: '>=12'} ansi-styles@3.2.1: @@ -3661,6 +3250,10 @@ packages: resolution: {integrity: sha512-yMBKppFur/fbHu9/6USUe03bZ4knMYiwFBcyiaXB8Go0qNehwX6inYPzK9U0NeQvGxKthcmHcaR8P5MStSRBAw==} engines: {node: '>= 0.4'} + arrify@1.0.1: + resolution: {integrity: sha512-3CYzex9M9FGQjCGMGyi6/31c8GJbgb0qGyrx5HWxPd0aCwh4cB2YjMb2Xf9UuoogrMrlO9cTqnB5rI5GHZTcUA==} + engines: {node: '>=0.10.0'} + asap@2.0.6: resolution: {integrity: sha512-BSHWgDSAiKs50o2Re8ppvp3seVHXSRM44cdSsT9FfNEUUZLOGWVCsiWaRPWM1Znn+mqZ1OfVZ3z3DWEzSp7hRA==} @@ -3697,8 +3290,8 @@ packages: resolution: {integrity: sha512-ISvCdHdlTDlH5IpxQJIex7BWBywFWgjJSVdwst+/iQCoEYnyOaQ95+X1JGshuBjGp6nxKUy1jMgE3zPqN7fQdg==} hasBin: true - async@3.2.6: - resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} + async@3.2.5: + resolution: {integrity: sha512-baNZyqaaLhyLVKm/DlvdW051MSgO6b8eVfIezl9E5PqWxFgzLm/wQntEW4zOytVburDEr0JlALEpdOFwvErLsg==} asynciterator.prototype@1.0.0: resolution: {integrity: sha512-wwHYEIS0Q80f5mosx3L/dfG5t5rjEa9Ft51GTaNt862EnpyGHpgz2RkZvLPp1oF5TnAiTohkEKVEu8pQPJI7Vg==} @@ -3714,15 +3307,15 @@ packages: resolution: {integrity: sha512-kNOjDqAh7px0XWNI+4QbzoiR/nTkHAWNud2uvnJquD1/x5a7EQZMJT0AczqK0Qn67oY/TTQ1LbUKajZpp3I9tQ==} engines: {node: '>=8.0.0'} - atomically@2.0.3: - resolution: {integrity: sha512-kU6FmrwZ3Lx7/7y3hPS5QnbJfaohcIul5fGqf7ok+4KklIEk9tJ0C2IQPdacSbVUWv6zVHXEBWoWd6NrVMT7Cw==} + atomically@2.0.2: + resolution: {integrity: sha512-Xfmb4q5QV7uqTlVdMSTtO5eF4DCHfNOdaPyKlbFShkzeNP+3lj3yjjcbdjSmEY4+pDBKJ9g26aP+ImTe88UHoQ==} auto-bind@5.0.1: resolution: {integrity: sha512-ooviqdwwgfIfNmDwo94wlshcdzfO64XV0Cg6oDsDYBJfITDz1EngD2z7DkbvCWn+XIMsIqW27sEVF6qcpJrRcg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - autoprefixer@10.4.20: - resolution: {integrity: sha512-XY25y5xSv/wEoqzDyXXME4AFfkZI0P23z6Fs3YgymDnKJkCGOnkL0iTxCa85UTqaSgfcqyf3UA6+c7wUvx/16g==} + autoprefixer@10.4.16: + resolution: {integrity: sha512-7vd3UC6xKp0HLfua5IjZlcXvGAGy7cBAXTg2lyQ/8WpNhd6SiZ8Be+xm3FyBSYJx5GKcpRCzBh7RH4/0dnY+uQ==} engines: {node: ^10 || ^12 || >=14} hasBin: true peerDependencies: @@ -3735,8 +3328,8 @@ packages: aws-sign2@0.7.0: resolution: {integrity: sha512-08kcGqnYf/YmjoRhfxyu+CLxBjUtHLXLXX/vUfx9l2LYzG3c1m61nrpyFUZI6zeS+Li/wWMMidD9KgrqtGq3mA==} - aws4@1.13.2: - resolution: {integrity: sha512-lHe62zvbTB5eEABUVi/AwVh0ZKY9rMMDhmm+eeyuuUQbQ3+J+fONVQOZyj+DdrvD4BY33uYniyRJ4UJIaSKAfw==} + aws4@1.12.0: + resolution: {integrity: sha512-NmWvPnx0F1SfrQbYwOi7OeaNGokp9XhzNioJ/CSBs8Qa4vxug81mhJEAVZwxXuBmYB5KDRfMq/F3RR0BIU7sWg==} axe-core@4.7.0: resolution: {integrity: sha512-M0JtH+hlOL5pLQwHOLNYZaXuhqmvS8oExsqB1SBYgA4Dk7u/xx+YdGHXaK5pyUfed5mYXdlYiphWq3G8cRi5JQ==} @@ -3745,8 +3338,8 @@ packages: axios@0.21.4: resolution: {integrity: sha512-ut5vewkiu8jjGBdqpM44XxjuCjq9LAKeHVmoVfHVzy8eHgxxq8SbAVQNovDA8mVi05kP0Ea/n/UzcSHcTJQfNg==} - axios@1.7.7: - resolution: {integrity: sha512-S4kL7XrjgBmvdGut0sN3yJxqYzrDOnivkBiN0OFs6hLiUam3UPvswUo0kqGyhqUZGEOytHyumEdXsAkgCOUf3Q==} + axios@1.6.8: + resolution: {integrity: sha512-v/ZHtJDU39mDpyBoFVkETcd/uNdxrWRrg3bKpOKzXFA6Bvqopts6ALSMU3y6ijYxbw2B+wPrIv46egTzJXCLGQ==} axobject-query@3.2.1: resolution: {integrity: sha512-jsyHu61e6N4Vbz/v18DHwWYKK0bSWLqn47eeDSKPB7m8tqMHF9YJ+mhIk2lVteyZrY8tnSj/jHOv4YiTCuCJgg==} @@ -3772,8 +3365,8 @@ packages: balanced-match@1.0.2: resolution: {integrity: sha512-3oSeUO0TMV67hN1AmbXsK4yaqU7tjiHlbxRDZOpH0KW9+CeX4bRAaX0Anxt0tx2MrpRpWwQaPwIlISEJhYU5Pw==} - base-x@3.0.10: - resolution: {integrity: sha512-7d0s06rR9rYaIWHkpfLIFICM/tkSVdoPC9qYAQRpxn9DdKNWNsKC0uk++akckyLq16Tx2WIinnZ6WRriAt6njQ==} + base-x@3.0.9: + resolution: {integrity: sha512-H7JU6iBHTal1gp56aKoaa//YUxEaAOUiydvrV/pILqIHXTtqxSkATOnDA2u+jZ/61sD+L/412+7kzXRtWukhpQ==} base64-js@1.5.1: resolution: {integrity: sha512-AKpaYlHn8t4SVbOHCy+b5+KKgvR4vrsD8vbvrbiQJps7fKDTkjkDry6ji0rUJjC0kzbNePLwzxq8iypo41qeWA==} @@ -3790,11 +3383,11 @@ packages: peerDependencies: react: '>=16.8' - better-sqlite3@11.3.0: - resolution: {integrity: sha512-iHt9j8NPYF3oKCNOO5ZI4JwThjt3Z6J6XrcwG85VNMVzv1ByqrHWv5VILEbCMFWDsoHhXvQ7oC8vgRXFAKgl9w==} + better-sqlite3@11.1.2: + resolution: {integrity: sha512-gujtFwavWU4MSPT+h9B+4pkvZdyOUkH54zgLdIrMmmmd4ZqiBIrRNBzNzYVFO417xo882uP5HBu4GjOfaSrIQw==} - binary-extensions@2.3.0: - resolution: {integrity: sha512-Ceh+7ox5qe7LJuLHoY0feh3pHuUDHAcRUeyL2VYghZwfpkNIy/+8Ocg0a3UuSoYzavmylwuLWQOf3hl0jjMMIw==} + binary-extensions@2.2.0: + resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} binary-install-raw@0.0.13: @@ -3855,9 +3448,8 @@ packages: resolution: {integrity: sha512-b8um+L1RzM3WDSzvhm6gIz1yfTbBt6YTlcEKAvsmqCZZFw46z626lVj9j1yEPW33H5H+lBQpZMP1k8l+78Ha0A==} engines: {node: '>=8'} - braces@3.0.3: - resolution: {integrity: sha512-yQbXgO/OSZVD2IsiLlro+7Hf6Q18EJrKSEsdoMzKePKXct3gvD8oLcOQdIzGupr5Fj+EDe8gO/lxc1BzfMpxvA==} - engines: {node: '>=8'} + breakword@1.0.6: + resolution: {integrity: sha512-yjxDAYyK/pBvws9H4xKYpLDpYKEH6CzrBPAuXq3x18I+c/2MkVtT3qAr7Oloi6Dss9qNhPVueAAVU1CSeNDIXw==} brorand@1.1.0: resolution: {integrity: sha512-cKV8tMCEpQs4hK/ik71d6LrPOnpkpGBR0wzxqr68g2m/LB2GxVYQroAjMJZRVM1Y4BCjCKc3vAamxSzOY2RP+w==} @@ -3868,8 +3460,8 @@ packages: browserify-aes@1.2.0: resolution: {integrity: sha512-+7CHXqGuspUn/Sl5aO7Ea0xWGAtETPXNSAjHo48JfLdPWcMng33Xe4znFvQweqc/uzk5zSOI3H52CYnjCfb5hA==} - browserslist@4.23.3: - resolution: {integrity: sha512-btwCFJVjI4YWDNfau8RhZ+B1Q/VLoUITrm3RlP6y1tYGWIOa+InuYiRGXUBXo8nA1qKmHMyLB/iVQg5TT4eFoA==} + browserslist@4.22.2: + resolution: {integrity: sha512-0UgcrvQmBDvZHFGdYUehrCNIazki7/lUP3kkoi/r3YB2amZbFM9J43ZRkJTXBUZK4gmx56+Sqk9+Vs9mwZx9+A==} engines: {node: ^6 || ^7 || ^8 || ^9 || ^10 || ^11 || ^12 || >=13.7} hasBin: true @@ -3891,6 +3483,10 @@ packages: buffer-from@1.1.2: resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer-writer@2.0.0: + resolution: {integrity: sha512-a7ZpuTZU1TRtnwyCNW3I5dc0wWNC3VR9S++Ewyk2HHZdrO3CQJqSpd+95Us590V6AL7JqUAH2IwZ/398PmNFgw==} + engines: {node: '>=4'} + buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} @@ -3900,17 +3496,20 @@ packages: buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} + builtins@5.0.1: + resolution: {integrity: sha512-qwVpFEHNfhYJIzNRBvd2C1kyo6jz3ZSMPyyuR47OPdiKWlbYnZNyDWuyR175qDnAJLiCo5fBBqPb3RiXgWlkOQ==} + bundle-require@3.1.2: resolution: {integrity: sha512-Of6l6JBAxiyQ5axFxUM6dYeP/W7X2Sozeo/4EYB9sJhL+dqL7TKjg+shwxp6jlu/6ZSERfsYtIpSJ1/x3XkAEA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: esbuild: '>=0.13' - bundle-require@5.0.0: - resolution: {integrity: sha512-GuziW3fSSmopcx4KRymQEJVbZUfqlCqcq7dvs6TYwKRZiegK/2buMxQTPs6MGlNv50wms1699qYO54R8XfRX4w==} + bundle-require@4.0.2: + resolution: {integrity: sha512-jwzPOChofl67PSTW2SGubV9HBQAhhR2i6nskiOThauo9dzwDUgOWQScFVaJkjEfYX+UXiD+LEx8EblQMc2wIag==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} peerDependencies: - esbuild: '>=0.18' + esbuild: '>=0.17' busboy@1.6.0: resolution: {integrity: sha512-8SFQbg/0hQ9xy3UNTB0YEnsNBbWfhf7RtnzpL7TkBiTBRfrQ9Fxcnz7VJsleJpyp6rVLvXiuORqjlHi5q+PYuA==} @@ -3923,10 +3522,6 @@ packages: call-bind@1.0.5: resolution: {integrity: sha512-C3nQxfFZxFRVoJoGKKI8y3MOEo129NQ+FgQ08iye+Mk4zNZZGdjfs06bVTr+DBSlA66Q2VEcMki/cUCP4SercQ==} - call-bind@1.0.7: - resolution: {integrity: sha512-GHTSNSYICQ7scH7sZ+M2rFopRoLh8t2bLSW6BbgrtLsahOIB5iyAVJf9GjWK3cYTDaMj4XdBpM1cA6pIS0Kv2w==} - engines: {node: '>= 0.4'} - callsites@3.1.0: resolution: {integrity: sha512-P8BjAsXvZS+VIDUI11hHCQEv74YT67YUi5JJFNWIqL235sBmjX4+qx9Muvls5ivyNENctx46xQLQ3aTuE7ssaQ==} engines: {node: '>=6'} @@ -3938,12 +3533,20 @@ packages: resolution: {integrity: sha512-QOSvevhslijgYwRx6Rv7zKdMF8lbRmx+uQGx2+vDc+KI/eBnsy9kit5aj23AgGu3pa4t9AgwbnXWqS+iOY+2aA==} engines: {node: '>= 6'} + camelcase-keys@6.2.2: + resolution: {integrity: sha512-YrwaA0vEKazPBkn0ipTiMpSajYDSe+KjQfrjhcBMxJt/znbvlHd8Pw/Vamaz5EB4Wfhs3SUR3Z9mwRu/P3s3Yg==} + engines: {node: '>=8'} + + camelcase@5.3.1: + resolution: {integrity: sha512-L28STB170nwWS63UjtlEOE3dldQApaJXZkOI1uMFfzf3rRuPegHaHesyee+YxQ+W6SvRDQV6UrdOdRiR153wJg==} + engines: {node: '>=6'} + camelcase@6.3.0: resolution: {integrity: sha512-Gmy6FhYlCY7uOElZUSbxo2UCDH8owEk996gkbrpsgGtrJLM3J7jGxl9Ic7Qwwj4ivOE5AWZWRMecDdF7hqGjFA==} engines: {node: '>=10'} - caniuse-lite@1.0.30001662: - resolution: {integrity: sha512-sgMUVwLmGseH8ZIrm1d51UbrhqMCH3jvS7gF/M6byuHOnKyLOBL7W8yz5V02OHwgLGA36o/AFhWzzh4uc5aqTA==} + caniuse-lite@1.0.30001572: + resolution: {integrity: sha512-1Pbh5FLmn5y4+QhNyJE9j3/7dK44dGB83/ZMjv/qJk86TvDbjk0LosiZo0i0WB0Vx607qMX9jYrn1VLHCkN4rw==} capital-case@1.0.4: resolution: {integrity: sha512-ds37W8CytHgwnhGGTi88pcPyR15qoNkOpYwmMMfnWqqWgESapLqvDx6huFjQ5vqWSn2Z06173XNA7LtMOeUh1A==} @@ -3962,8 +3565,8 @@ packages: ccount@2.0.1: resolution: {integrity: sha512-eyrF0jiFpY+3drT6383f1qhkbGsLSifNAjA61IUjZjmLCWjItY6LB9ft9YhoDgwfmclB2zhu51Lc7+95b8NRAg==} - chai@4.5.0: - resolution: {integrity: sha512-RITGBfijLkBddZvnn8jdqoTypxvqbOLYQkGGxXzeFjVHvudaPw0HNFD9x928/eUwYWd2dPCugVqspGALTZZQKw==} + chai@4.3.10: + resolution: {integrity: sha512-0UXG04VuVbruMUYbJ6JctvH0YnC/4q3/AkT18q4NaITo91CUm0liMS9VqzT9vZhVQ/1eqPanMWjBM+Juhfb/9g==} engines: {node: '>=4'} chalk@2.3.0: @@ -4011,10 +3614,6 @@ packages: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} - chokidar@3.6.0: - resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} - engines: {node: '>= 8.10.0'} - chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -4036,6 +3635,10 @@ packages: resolution: {integrity: sha512-lR9wNiMRcVQjSB3a7xXGLuz4cr4wJuuXlaAEbRutGowQTmlp7R72/DOgN21e8jdwblMWl9UOJMJXarX94pzKdg==} engines: {node: '>=10'} + clean-stack@4.2.0: + resolution: {integrity: sha512-LYv6XPxoyODi36Dp976riBtSY27VmFo+MKqEU9QCCWyTrdEPDog+RWA7xQWHi6Vbp61j5c4cdzzX1NidnwtUWg==} + engines: {node: '>=12'} + cli-boxes@3.0.0: resolution: {integrity: sha512-/lzGpEWL/8PfI0BmBOPRwp0c/wFNX1RdUML3jK/RcSBA9T8mZDdQpqYBKtCFTOfQbwPqWEOpjqW+Fnayc0969g==} engines: {node: '>=10'} @@ -4048,10 +3651,6 @@ packages: resolution: {integrity: sha512-VGtlMu3x/4DOtIUwEkRezxUZ2lBacNJCHash0N0WeZDBS+7Ux1dm3XWAgWYxLJFMMdOeXMHXorshEFhbMSGelg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - cli-cursor@5.0.0: - resolution: {integrity: sha512-aCj4O5wKyszjMmDT4tZj93kxyydN/K5zPWSCe6/0AV/AA1pqe5ZBIw0a2ZfPQV7lL5/yb5HsUreJ6UFAF1tEQw==} - engines: {node: '>=18'} - cli-progress@3.12.0: resolution: {integrity: sha512-tRkV3HJ1ASwm19THiiLIXLO7Im7wlTuKnvkYaTkyoAPefqjNg7W7DHKUlGRxy9vxDvbyCYQkQozvptuMkGCg8A==} engines: {node: '>=4'} @@ -4079,6 +3678,13 @@ packages: resolution: {integrity: sha512-16KrBOV7bHmHdxcQiCvfUFYVFyEah4FI8vYT1Fr7CGSA4G+xBWMEfUEQJS1hxeHGtI9ju1Bzs9uXSbj5HZKArw==} engines: {node: '>=4'} + cliui@6.0.0: + resolution: {integrity: sha512-t6wbgtoCXvAzst7QgXxJYqPt0usEfbgQdftEPbLL/cvv6HPE5VgvqCuAIDR0NgU52ds6rFwqrgakNLrHEjCbrQ==} + + cliui@8.0.1: + resolution: {integrity: sha512-BSeNnyus75C4//NQ9gQt1/csTXyo/8Sb+afLAkzAptFuMsod9HFokGNudZpi/oQV73hnVK+sR+5PVRMd+Dr7YQ==} + engines: {node: '>=12'} + clone@1.0.4: resolution: {integrity: sha512-JQHZ2QMW6l3aH/j6xCqQThY/9OH4D/9ls34cgkUBiEeocRTU04tHfKPBsUK1PqZCUQM7GiA0IIXJSuXHI64Kbg==} engines: {node: '>=0.8'} @@ -4087,8 +3693,8 @@ packages: resolution: {integrity: sha512-rQ1+kcj+ttHG0MKVGBUXwayCCF1oh39BF5COIpRzuCEv8Mwjv0XucrI2ExNTOn9IlLifGClWQcU9BrZORvtw6Q==} engines: {node: '>=6'} - clsx@2.1.1: - resolution: {integrity: sha512-eYm0QWBtUrBWZWG0d386OGAw16Z995PiOVo2B7bjWSbHedGl5e0ZWaq65kOGgUSNesEIDkB9ISbTg/JK9dhCZA==} + clsx@2.1.0: + resolution: {integrity: sha512-m3iNNWpd9rl3jvvcBnu70ylMdrXt8Vlq4HYadnU5fwcOtvkSQWPmj7amUcDT2qYI7risszBjI5AUIUox9D16pg==} engines: {node: '>=6'} code-excerpt@4.0.0: @@ -4122,8 +3728,12 @@ packages: comma-separated-tokens@2.0.3: resolution: {integrity: sha512-Fu4hJdvzeylCfQPp9SGWidpzrMs7tTrlu6Vb8XGaRGck8QSNZJJp538Wrb60Lax4fPwR64ViY468OIUTbRlGZg==} - commander@12.1.0: - resolution: {integrity: sha512-Vw8qHK3bZM9y/P10u3Vib8o/DdkvA2OtPtZvD871QKjy74Wj1WSKFILMPRPSdUSx5RFK1arlJzEtA4PkFgnbuA==} + commander@11.1.0: + resolution: {integrity: sha512-yPVavfyCcRhmorC7rWlkHn15b4wDVgVmBA7kV4QVBsF7kv/9TKJAbAXVTxvTnwP8HHKjRCJDClKbciiYS7p0DQ==} + engines: {node: '>=16'} + + commander@12.0.0: + resolution: {integrity: sha512-MwVNWlYjDTtOjX5PiD7o5pK0UrFU/OYgcJfjjK4RaHZETNtjJqrZa9Y9ds88+A+f+d5lv+561eZ+yCKoS3gbAA==} engines: {node: '>=18'} commander@2.20.3: @@ -4159,13 +3769,6 @@ packages: resolution: {integrity: sha512-fIWyWUXrJ45cHCIQX+Ck1hrZDIf/9DR0P0Zewn3uNht28hbt5OfGUq8rRWsxi96pZWPyBEd0eY9ama01JTaknA==} engines: {node: '>=18'} - confbox@0.1.7: - resolution: {integrity: sha512-uJcB/FKZtBMCJpK8MQji6bJHgu1tixKPxRLeGkNzBoOZzpnZUJm0jm2/sBDWcuBx1dYgxV4JU+g5hmNxCyAmdA==} - - consola@3.2.3: - resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} - engines: {node: ^14.18.0 || >=16.10.0} - constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} @@ -4211,8 +3814,8 @@ packages: countup.js@2.8.0: resolution: {integrity: sha512-f7xEhX0awl4NOElHulrl4XRfKoNH3rB+qfNSZZyjSZhaAoUk6elvhH+MNxMmlmuUJ2/QNTWPSA7U4mNtIAKljQ==} - cpy@11.1.0: - resolution: {integrity: sha512-QGHetPSSuprVs+lJmMDcivvrBwTKASzXQ5qxFvRC2RFESjjod71bDvFvhxTjDgkNjrrb72AI6JPjfYwxrIy33A==} + cpy@11.0.0: + resolution: {integrity: sha512-vA71mFQyIxCrqvP/9JBLCj05UJV/+WpvAxZK2/EiK5ndD090cjuChfJ3ExVVuZXHoTJ/3HLedOPYDWyxnNHjrg==} engines: {node: '>=18'} create-hash@1.2.0: @@ -4227,8 +3830,8 @@ packages: cross-fetch@3.1.8: resolution: {integrity: sha512-cvA+JwZoU0Xq+h6WkMvAUqPEYy92Obet6UdKLfW60qn99ftItKjB5T+BkyWOFWe2pUyfQ+IJHmpOTznqk1M6Kg==} - cross-inspect@1.0.1: - resolution: {integrity: sha512-Pcw1JTvZLSJH83iiGWt6fRcT+BjZlCDRVwYLbUcHzv/CRpB7r0MlSrGbIyQvVSNyGnbt7G4AXuyCiDR3POvZ1A==} + cross-inspect@1.0.0: + resolution: {integrity: sha512-4PFfn4b5ZN6FMNGSZlyb7wUhuN8wvj8t/VQHZdM4JsDcruGJ8L2kf9zao98QIrBPFCpdk27qst/AGTl7pL3ypQ==} engines: {node: '>=16.0.0'} cross-spawn@5.1.0: @@ -4265,6 +3868,19 @@ packages: csstype@3.1.3: resolution: {integrity: sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==} + csv-generate@3.4.3: + resolution: {integrity: sha512-w/T+rqR0vwvHqWs/1ZyMDWtHHSJaN06klRqJXBEpDJaM/+dZkso0OKh1VcuuYvK3XM53KysVNq8Ko/epCK8wOw==} + + csv-parse@4.16.3: + resolution: {integrity: sha512-cO1I/zmz4w2dcKHVvpCr7JVRu8/FymG5OEpmvsZYlccYolPBLoVGKUHgNoc4ZGkFeFlWGEDmMyBM+TTqRdW/wg==} + + csv-stringify@5.6.5: + resolution: {integrity: sha512-PjiQ659aQ+fUTQqSrd1XEDnOr52jh30RBurfzkscaE2tPaFsDH5wOAHJiw8XAHphRknCwMUE9KRayc4K/NbO8A==} + + csv@5.5.3: + resolution: {integrity: sha512-QTaY0XjjhTQOdguARF0lGKm5/mEq9PD9/VhZZegHDIBq2tQwgNpHc3dneD4mGo2iJs+fTKv5Bp0fZ+BRuY3Z0g==} + engines: {node: '>= 0.1.90'} + cytoscape-cose-bilkent@4.1.0: resolution: {integrity: sha512-wgQlVIUJF13Quxiv5e1gstZ08rnZj2XaLHGoFMYXz7SkNfCDOOteKBE6SYRfA9WxxI/iBc3ajfDoc6hb/MRAHQ==} peerDependencies: @@ -4462,14 +4078,13 @@ packages: supports-color: optional: true - debug@4.3.7: - resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} - engines: {node: '>=6.0'} - peerDependencies: - supports-color: '*' - peerDependenciesMeta: - supports-color: - optional: true + decamelize-keys@1.1.1: + resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} + engines: {node: '>=0.10.0'} + + decamelize@1.2.0: + resolution: {integrity: sha512-z2S+W9X73hAUUki+N+9Za2lBlun89zigOyGrsax+KUQ6wKW4ZoWpEYBkGhQjwAjjDCkWxhY0VKEhk8wzY7F5cA==} + engines: {node: '>=0.10.0'} decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} @@ -4481,8 +4096,8 @@ packages: dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} - deep-eql@4.1.4: - resolution: {integrity: sha512-SUwdGfqdKOwxCPeVYjwSyRpJ7Z+fhpwIAtmCUdZIWZ/YP5R9WAsyuSgpLVDi9bjWoN2LXHNss/dk3urXtdQxGg==} + deep-eql@4.1.3: + resolution: {integrity: sha512-WaEtAOpRA1MQ0eohqZjpGD8zdI0Ovsm8mmFhaDN8dvDZzyoUMcYDnf5Y6iu7HTXxf8JDS23qWa4a+hKCDyOPzw==} engines: {node: '>=6'} deep-extend@0.6.0: @@ -4503,10 +4118,6 @@ packages: resolution: {integrity: sha512-E7uGkTzkk1d0ByLeSc6ZsFS79Axg+m1P/VsgYsxHgiuc3tFSj+MjMIwe90FC4lOAZzNBdY7kkO2P2wKdsQ1vgQ==} engines: {node: '>= 0.4'} - define-data-property@1.1.4: - resolution: {integrity: sha512-rBMvIzlpA8v6E+SJZoo++HAYqsLrkg7MSfIinMPFhmkorw7X+dOXVJQs+QT69zGkzMyfDnIMN2Wid1+NbL3T+A==} - engines: {node: '>= 0.4'} - define-properties@1.2.1: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} @@ -4556,8 +4167,8 @@ packages: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} - diff@5.2.0: - resolution: {integrity: sha512-uIFDxqpRZGZ6ThOk84hEfqWoHx2devRFvpTZcTHur85vImfaxUbTW9Ryh4CpCuDnToOP1CEtXKIgytHBPVff5A==} + diff@5.1.0: + resolution: {integrity: sha512-D+mk+qE8VC/PAUrlAU34N+VfXev0ghe5ywmpqrawphmVZc1bEfn56uo9qpyGp1p4xpzOHkSW4ztBd6L7Xx4ACw==} engines: {node: '>=0.3.1'} dir-glob@3.0.1: @@ -4617,8 +4228,8 @@ packages: resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==} engines: {node: '>=12'} - dotenv@16.4.5: - resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + dotenv@16.3.1: + resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} engines: {node: '>=12'} dotenv@8.6.0: @@ -4722,23 +4333,19 @@ packages: resolution: {integrity: sha512-20TuZZHCEZ2O71q9/+8BwKwZ0QtD9D8ObhrihJPr+vLLYlSuAU3/zL4cSlgbfeoGHTjCSJBa7NGcrF9/Bx/WJQ==} engines: {node: '>=4'} - dset@3.1.4: - resolution: {integrity: sha512-2QF/g9/zTaPDc3BjNcVTGoBbXBgYfMTTceLaYcFJ/W9kggFUkhxD/hMEeuLKbugyef9SqAx8cpgwlIP/jinUTA==} - engines: {node: '>=4'} - eastasianwidth@0.2.0: resolution: {integrity: sha512-I88TYZWc9XiYHRQ4/3c5rjjfgkjhLyW2luGIheGERbNQ6OY7yTybanSpDXZa8y7VUP9YmDcYa+eyq4ca7iLqWA==} ecc-jsbn@0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} - ejs@3.1.10: - resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + ejs@3.1.6: + resolution: {integrity: sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==} engines: {node: '>=0.10.0'} hasBin: true - ejs@3.1.6: - resolution: {integrity: sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==} + ejs@3.1.9: + resolution: {integrity: sha512-rC+QVNMJWv+MtPgkt0y+0rVEIdbtxVADApW9JXrUVlzHetgcyczP/E7DJmWJ4fJCZF2cPcBk0laWO9ZHMG3DmQ==} engines: {node: '>=0.10.0'} hasBin: true @@ -4746,8 +4353,8 @@ packages: resolution: {integrity: sha512-M9qw6oUILGVrcENMSRRefE1MbHPIz0h79EKIeJWK9v563aT9Qkh8aEHPO1H5vi970wPirNY+jO9OpFoLiMsMGA==} engines: {node: '>=6'} - electron-to-chromium@1.5.26: - resolution: {integrity: sha512-Z+OMe9M/V6Ep9n/52+b7lkvYEps26z4Yz3vjWL1V61W0q+VLF1pOHhMY17sa4roz4AWmULSI8E6SAojZA5L0YQ==} + electron-to-chromium@1.4.619: + resolution: {integrity: sha512-gW4qlnHxa49kp9kXlLdvnwdYEUlQRio30QOR61YfOQU8MaC/NGHWiJhyMMUl1EwFHbbzQTxvP1Dypdw95DjIow==} elkjs@0.8.2: resolution: {integrity: sha512-L6uRgvZTH+4OF5NE/MBbzQx/WYpru1xCBE9respNj6qznEewGUIfhzmm7horWWxbNO2M0WckQypGctR8lH79xQ==} @@ -4755,9 +4362,6 @@ packages: elliptic@6.5.4: resolution: {integrity: sha512-iLhC6ULemrljPZb+QutR5TQGB+pdW6KGD5RSegS+8sorOZT+rdQFbsQFJgvN3eRqNALqJer4oQ16YvJHlU8hzQ==} - elliptic@6.5.7: - resolution: {integrity: sha512-ESVCtTwiA+XhY3wyh24QqRGBoP3rEdDUl3EDUUo9tft074fi19IrdpH7hLCMMP3CIj7jb3W96rn8lt/BqIlt5Q==} - emoji-regex@10.4.0: resolution: {integrity: sha512-EC+0oUMY1Rqm4O6LLrgjtYDvcVYTy7chDnM4Q7030tP4Kwj3u/pR6gP9ygnp2CJMK5Gq+9Q2oqmrFJAz01DXjw==} @@ -4793,10 +4397,6 @@ packages: resolution: {integrity: sha512-dtJUTepzMW3Lm/NPxRf3wP4642UWhjL2sQxc+ym2YMj1m/H2zDNQOlezafzkHwn6sMstjHTwG6iQQsctDW/b1A==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - environment@1.1.0: - resolution: {integrity: sha512-xUtoPkMggbz0MPyPiIWr1Kp4aeWJjDZ6SMvURhimjdZgsRuDplF5/s9hcgGhyXMhs+6vpnuoiZ2kFiu3FMnS8Q==} - engines: {node: '>=18'} - err-code@3.0.1: resolution: {integrity: sha512-GiaH0KJUewYok+eeY05IIgjtAe4Yltygk9Wqp1V5yVWLdhf0hYZchRjNIT9bb0mSwRcIusT3cx7PJUf3zEIfUA==} @@ -4807,14 +4407,6 @@ packages: resolution: {integrity: sha512-eiiY8HQeYfYH2Con2berK+To6GrK2RxbPawDkGq4UiCQQfZHb6wX9qQqkbpPqaxQFcl8d9QzZqo0tGE0VcrdwA==} engines: {node: '>= 0.4'} - es-define-property@1.0.0: - resolution: {integrity: sha512-jxayLKShrEqqzJ0eumQbVhTYQM27CfT1T35+gCgDFoL82JLsXqTJ76zv6A0YLOgEnLUMvLzsDsGIrl8NFpT2gQ==} - engines: {node: '>= 0.4'} - - es-errors@1.3.0: - resolution: {integrity: sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw==} - engines: {node: '>= 0.4'} - es-iterator-helpers@1.0.15: resolution: {integrity: sha512-GhoY8uYqd6iwUl2kgjTm4CZAf6oo5mHK7BPqx3rKgx893YSsy0LGHV6gfqqQvZt/8xM8xeOnfXBCfqclMKkJ5g==} @@ -4850,23 +4442,13 @@ packages: 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==} + esbuild@0.19.11: + resolution: {integrity: sha512-HJ96Hev2hX/6i5cDVwcqiJBBtuo9+FeIJOtZ9W1kA5M6AMJRHUZlpYZ1/SbEwtO0ioNAW8rUooVpC/WehY2SfA==} engines: {node: '>=12'} hasBin: true - esbuild@0.23.1: - resolution: {integrity: sha512-VVNz/9Sa0bs5SELtn3f7qhJCDPCF5oMEl5cO9/SSinpE9hbPVvxbd572HH5AKiP7WD8INO53GgfDDhRjkylHEg==} - engines: {node: '>=18'} - hasBin: true - - escalade@3.2.0: - resolution: {integrity: sha512-WUj2qlxaQtO4g6Pq5c29GTcWGDyd8itL8zTlipgECz3JesAiiOKotd8JU6otB3PACgG6xkJUyVhboMS+bje/jA==} + escalade@3.1.1: + resolution: {integrity: sha512-k0er2gUkLf8O0zKJiAhmkTnJlTvINGv7ygDNPbeIsX/TJjGJZHuh9B2UxbsaEkmlEo9MfhrSzmhIlhRlI2GXnw==} engines: {node: '>=6'} escape-string-regexp@1.0.5: @@ -4894,15 +4476,6 @@ packages: typescript: optional: true - eslint-config-next@14.2.13: - resolution: {integrity: sha512-aro1EKAoyYchnO/3Tlo91hnNBO7QO7qnv/79MAFC+4Jq8TdUVKQlht5d2F+YjrePjdpOvfL+mV9JPfyYNwkk1g==} - peerDependencies: - eslint: ^7.23.0 || ^8.0.0 - typescript: '>=3.3.1' - peerDependenciesMeta: - typescript: - optional: true - eslint-import-resolver-node@0.3.9: resolution: {integrity: sha512-WFj2isz22JahUv+B788TlO3N6zL3nNJGU8CcZbPZvVEkBPaJdCV4vy5wyghty5ROFbCRnm132v8BScu5/1BQ8g==} @@ -4970,8 +4543,8 @@ packages: resolution: {integrity: sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} - eslint@8.57.1: - resolution: {integrity: sha512-ypowyDxpVSYpkXr9WPv2PAZCtNip1Mv5KTW0SCurXv/9iOpcrH9PaqUElksqEB6pChqHGDRCFTyrZlGhnLNGiA==} + eslint@8.56.0: + resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} hasBin: true @@ -4988,8 +4561,8 @@ packages: engines: {node: '>=4'} hasBin: true - esquery@1.6.0: - resolution: {integrity: sha512-ca9pw9fomFcKPvFLXhBKUK90ZvGibiGOvRJNbjljY7s7uq/5YO4BOzcYtJqExdx99rF6aAcnRxHmcUHcz6sQsg==} + esquery@1.5.0: + resolution: {integrity: sha512-YQLXUplAwJgCydQ78IMJywZCceoqk1oH01OERdSAJc/7U2AylwjhSCLDEtqwg811idIS/9fIU5GjG73IgjKMVg==} engines: {node: '>=0.10'} esrecurse@4.3.0: @@ -5039,8 +4612,8 @@ packages: resolution: {integrity: sha512-kVscqXk4OCp68SZ0dkgEKVi6/8ij300KBWTJq32P/dYeWTSwK41WyTxalN1eRmA5Z9UU/LX9D7FWSmV9SAYx6g==} engines: {node: '>=0.10.0'} - ethereum-bloom-filters@1.2.0: - resolution: {integrity: sha512-28hyiE7HVsWubqhpVLVmZXFd4ITeHi+BUu05o9isf0GUpMtzBUi+8/gFrGaGYzvGAJQmJ3JKj77Mk9G98T84rA==} + ethereum-bloom-filters@1.0.10: + resolution: {integrity: sha512-rxJ5OFN3RwjQxDcFP2Z5+Q9ho4eIdEmSc2ht0fCu8Se9nbXjZ7/031uXoUYJ87KHCOdVeiUuwSnoS7hmYAGVHA==} ethereum-cryptography@0.1.3: resolution: {integrity: sha512-w8/4x1SGGzc+tO97TASLja6SLd3fRIK2tLVcV2Gx4IB21hE19atll5Cq9o3d0ZmAYC/8aw0ipieTSiekAea4SQ==} @@ -5145,13 +4718,10 @@ packages: fast-querystring@1.1.2: resolution: {integrity: sha512-g6KuKWmFXc0fID8WWH0jit4g0AGBoJhCkJMb1RmbsSEUNvQ+ZC8D6CUZ+GtF8nMzSPXnhiePyyqqipzNNEnHjg==} - fast-redact@3.5.0: - resolution: {integrity: sha512-dwsoQlS7h9hMeYUq1W++23NDcBLV4KqONnITDV9DjfS3q1SgDGVrBdvvTLUotWtPSD7asWDV9/CmsZPy8Hf70A==} + fast-redact@3.3.0: + resolution: {integrity: sha512-6T5V1QK1u4oF+ATxs1lWUmlEk6P2T9HqJG3e2DnHOdVgZy2rFJBoEnrIedcTXlkAHU/zKC+7KETJ+KGGKwxgMQ==} engines: {node: '>=6'} - fast-uri@3.0.1: - resolution: {integrity: sha512-MWipKbbYiYI0UC7cl8m/i/IWTqfC8YXsqjzybjddLsFjStroQzsHXkc73JutMvBiXmOvapk+axIl79ig5t55Bw==} - fast-url-parser@1.1.3: resolution: {integrity: sha512-5jOCVXADYNuRkKFzNJ0dCCewsZiYo0dz8QNYljkOpFC6r2U4OBmKtvm/Tsuh4w1YYdDqDb31a8TVhBJ2OJKdqQ==} @@ -5159,20 +4729,12 @@ packages: resolution: {integrity: sha512-eRnCtTTtGZFpQCwhJiUOuxPQWRXVKYDn0b2PeHfXL6/Zi53SLAzAHfVhVWK2AryC/WH05kGfxhFIPvTF0SXQzg==} engines: {node: '>= 4.9.1'} - fastq@1.17.1: - resolution: {integrity: sha512-sRVD3lWVIXWg6By68ZN7vho9a1pQcN/WBFaAAsDDFzlJjvoGx0P8z7V1t72grFJfJhu3YPZBuu25f7Kaw2jN1w==} + fastq@1.16.0: + resolution: {integrity: sha512-ifCoaXsDrsdkWTtiNJX5uzHDsrck5TzfKKDcuFFTIrrc/BS076qgEIfoIy1VeZqViznfKiysPYTh/QeHtnIsYA==} fault@2.0.1: resolution: {integrity: sha512-WtySTkS4OKev5JtpHXnib4Gxiurzh5NCGvWrFaZ34m6JehfTUhKZvn9njTfw48t6JumVQOmrKqpmGcdwxnhqBQ==} - fdir@6.3.0: - resolution: {integrity: sha512-QOnuT+BOtivR77wYvCWHfGt9s4Pz1VIMbD463vegT5MLqNXy8rYFT/lPVEqf/bhYeT6qmqrNHhsX+rWwe3rOCQ==} - peerDependencies: - picomatch: ^3 || ^4 - peerDependenciesMeta: - picomatch: - optional: true - fetch-blob@3.2.0: resolution: {integrity: sha512-7yAQpD2UMJzLi1Dqv7qFYnPbaPx7ZfFK6PiIxQ4PfkGPyNyl2Ugx+a/umUonmKqjhM4DnfbMvdX6otXq83soQQ==} engines: {node: ^12.20 || >= 14.13} @@ -5191,10 +4753,6 @@ packages: resolution: {integrity: sha512-qOo9F+dMUmC2Lcb4BbVvnKJxTPjCm+RRpe4gDuGrzkL7mEVl/djYSu2OdQ2Pa302N4oqkSg9ir6jaLWJ2USVpQ==} engines: {node: '>=8'} - fill-range@7.1.1: - resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} - engines: {node: '>=8'} - find-up@4.1.0: resolution: {integrity: sha512-PpOwAdQ/YlXQ2vj8a3h8IipDuYRi3wceVQQGYWxNINccq40Anw7BlsEXCMbt1Zt+OLA6Fq9suIpIWD0OsnISlw==} engines: {node: '>=8'} @@ -5207,12 +4765,15 @@ packages: resolution: {integrity: sha512-v2ZsoEuVHYy8ZIlYqwPe/39Cy+cFDzp4dXPaxNvkEuouymu+2Jbz0PxpKarJHYJTmv2HWT3O382qY8l4jMWthw==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + find-yarn-workspace-root2@1.2.16: + resolution: {integrity: sha512-hr6hb1w8ePMpPVUK39S4RlwJzi+xPLuVuG8XlwXU3KD5Yn3qgBWVfy3AzNlDhWvE1EORCE65/Qm26rFQt3VLVA==} + flat-cache@3.2.0: resolution: {integrity: sha512-CYcENa+FtcUKLmhhqyctpclsq7QF38pKjZHsGNiSQF5r4FtoKDWabFDl3hzaEQMvT1LHEysw5twgLvpYYb4vbw==} engines: {node: ^10.12.0 || >=12.0.0} - flatted@3.3.1: - resolution: {integrity: sha512-X8cqMLLie7KsNUDSdzeN8FYK9rEt4Dt67OsG/DNGnYTSDBG4uFAJFBnUeiV+zCVAvwFy56IjM9sH51jVaEhNxw==} + flatted@3.2.9: + resolution: {integrity: sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ==} flexsearch@0.7.31: resolution: {integrity: sha512-XGozTsMPYkm+6b5QL3Z9wQcJjNYxp0CYn3U1gO7dwD6PAqU1SVWZxI9CCg3z+ml3YfqdPnrBehaBrnH2AGKbNA==} @@ -5220,8 +4781,8 @@ packages: focus-visible@5.2.0: resolution: {integrity: sha512-Rwix9pBtC1Nuy5wysTmKy+UjbDJpIfg8eHjw0rjZ1mX4GNLz1Bmd16uDpI3Gk1i70Fgcs8Csg2lPm8HULFg9DQ==} - follow-redirects@1.15.9: - resolution: {integrity: sha512-gew4GsXizNgdoRyqmyfMHyAmXsZDk6mHkSxZFCzW9gwlbtOW44CDtYavM+y+72qD/Vq2l550kMF52DT8fOLJqQ==} + follow-redirects@1.15.6: + resolution: {integrity: sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==} engines: {node: '>=4.0'} peerDependencies: debug: '*' @@ -5232,15 +4793,15 @@ packages: for-each@0.3.3: resolution: {integrity: sha512-jqYfLp7mo9vIyQf8ykW2v7A+2N4QjeCeI5+Dz9XraiO1ign81wjiH7Fb9vSOWvQfNtmSa4H2RoQTrrXivdUZmw==} - foreground-child@3.3.0: - resolution: {integrity: sha512-Ld2g8rrAyMYFXBhEqMz8ZAHBi4J4uS1i/CxGMDnjyFWddMXLVcDp051DZfu+t7+ab7Wv6SMqpWmyFIj5UbfFvg==} + foreground-child@3.1.1: + resolution: {integrity: sha512-TMKDUnIte6bfb5nWv7V/caI169OHgvwjb7V4WkeUvbQQdjr5rWKqHFiKWb/fcOwB+CzBT+qbWjvj+DVwRskpIg==} engines: {node: '>=14'} forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c} version: 1.9.2 form-data@2.3.3: @@ -5318,6 +4879,10 @@ packages: resolution: {integrity: sha512-3hN7NaskYvMDLQY55gnW3NQ+mesEAepTqlg+VEbj7zzqEMBVNhzcGYYeqFo/TlYz6eQiFcp1HcsCZO+nGgS8zg==} engines: {node: '>=6.9.0'} + get-caller-file@2.0.5: + resolution: {integrity: sha512-DyFP3BM/3YHTQOCUL/w0OZHR0lpKeGrxotcHWcqNEdnltqFwXVfhEBQ94eIo34AfQpo0rGki4cyIiftY06h2Fg==} + engines: {node: 6.* || 8.* || >= 10.*} + get-east-asian-width@1.2.0: resolution: {integrity: sha512-2nk+7SIVb14QrgXFHcm84tD4bKQz0RxPuMT8Ag5KPOq7J5fEmAg0UbXdTOSHqNuHSU28k55qnceesxXRZGzKWA==} engines: {node: '>=18'} @@ -5328,10 +4893,6 @@ packages: get-intrinsic@1.2.2: resolution: {integrity: sha512-0gSo4ml/0j98Y3lngkFEot/zhiCeWsbYIlZ+uZOVgzLyLaUw7wxUL+nCTP0XJvJg1AXulJRI3UJi8GsbDuxdGA==} - get-intrinsic@1.2.4: - resolution: {integrity: sha512-5uYhsJH8VJBTv7oslg4BznJYhDoRI6waYCxMmCdnTrcCrHA/fCFKoTFz2JKKE0HdDFUF7/oQuhzumXJK7paBRQ==} - engines: {node: '>= 0.4'} - get-iterator@1.0.2: resolution: {integrity: sha512-v+dm9bNVfOYsY1OrhaCrmyOcYoSeVvbt+hHZ0Au+T+p1y+0Uyj9aMaGIeUTT6xdpRbWzDeYKvfOslPhggQMcsg==} @@ -5366,9 +4927,6 @@ packages: get-tsconfig@4.7.2: resolution: {integrity: sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A==} - get-tsconfig@4.8.1: - resolution: {integrity: sha512-k9PN+cFBmaLWtVz29SkUoqU5O0slLuHJXt/2P+tMVFT+phsSGXGkp9t3rQIqdz0e+06EHNGs3oM6ZX1s2zHxRg==} - getpass@0.1.7: resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} @@ -5394,10 +4952,6 @@ packages: engines: {node: '>=16 || 14 >=14.17'} hasBin: true - glob@10.4.5: - resolution: {integrity: sha512-7Bv8RF0k6xjo7d4A/PxYLbUCfb6c+Vpd2/mB2yRDlew7Jb5hEXiCD9ibfO7wpk8i4sevK6DFny9h7EYbM3/sHg==} - hasBin: true - glob@7.1.7: resolution: {integrity: sha512-OvD9ENzPLbegENnYP5UUfJIirTg4+XwMWGaQfQTY0JenxNvvIKP3U3/tAQSPIu/lHxXYSZmpXlUHeqAIdKzBLQ==} deprecated: Glob versions prior to v9 are no longer supported @@ -5430,10 +4984,6 @@ packages: resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - globby@14.0.2: - resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} - engines: {node: '>=18'} - globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} @@ -5447,6 +4997,9 @@ packages: graceful-fs@4.2.11: resolution: {integrity: sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ==} + grapheme-splitter@1.0.4: + resolution: {integrity: sha512-bzh50DW9kTPM00T8y4o8vQg89Di9oLJVLW/KaOGIXJWP/iqCN6WKYkbNOF04vFLJhwcpYUh9ydh/+5vpOqV4YQ==} + graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} @@ -5460,8 +5013,8 @@ packages: peerDependencies: graphql: 14 - 16 - graphql-yoga@5.7.0: - resolution: {integrity: sha512-QyGVvFAvGhMrzjJvhjsxsyoE+e4lNrj5f5qOsRYJuWIjyw7tHfbBvybZIwzNOGY0aB5sgA8BlVvu5hxjdKJ5tQ==} + graphql-yoga@5.3.1: + resolution: {integrity: sha512-n918QV6TF7xTjb9ASnozgsr4ydMc08c+x4eRAWKxxWVwSnzdP2xeN2zw1ljIzRD0ccSCNoBajGDKwcZkJDitPA==} engines: {node: '>=18.0.0'} peerDependencies: graphql: ^15.2.0 || ^16.0.0 @@ -5470,8 +5023,8 @@ packages: resolution: {integrity: sha512-OmaM7y0kaK31NKG31q4YbD2beNYa6jBBKtMFT6gLYJljHLJr42IqJ8KX08u3Li/0ifzTU5HjmoOOrwa5BRLeDA==} engines: {node: '>= 10.x'} - graphql@16.9.0: - resolution: {integrity: sha512-GGTKBX4SD7Wdb8mqeDLni2oaRGYQWjWHGKPQ24ZMnUtKfcsVoiv4uX8+LJr1K6U5VW2Lu1BwJnj7uiori0YtRw==} + graphql@16.8.2: + resolution: {integrity: sha512-cvVIBILwuoSyD54U4cF/UXDh5yAobhNV/tPygI4lZhgOIJQE/WLWC4waBRb4I6bDVYb3OVx3lfHbaQOEoUD5sg==} engines: {node: ^12.22.0 || ^14.16.0 || ^16.0.0 || >=17.0.0} gray-matter@4.0.3: @@ -5487,6 +5040,10 @@ packages: engines: {node: '>=6'} deprecated: this library is no longer supported + hard-rejection@2.1.0: + resolution: {integrity: sha512-VIZB+ibDhx7ObhAe7OVtoEbuP4h/MuOTHJ+J8h/eBXotJYl0fBgR72xDFCKgIh22OJZIOVNxBMWuhAr10r8HdA==} + engines: {node: '>=6'} + has-bigints@1.0.2: resolution: {integrity: sha512-tSvCKtBr9lkF0Ex0aQiP9N+OpV4zi2r/Nee5VkRDbaqv35RLYMzbwQfFSZZH0kR+Rd6302UJZ2p/bJCEoR3VoQ==} @@ -5505,17 +5062,10 @@ packages: has-property-descriptors@1.0.1: resolution: {integrity: sha512-VsX8eaIewvas0xnvinAe9bw4WfIeODpGYikiWYLH+dma0Jw6KHYqWiWfhQlgOVK8D6PvjubK5Uc4P0iIhIcNVg==} - has-property-descriptors@1.0.2: - resolution: {integrity: sha512-55JNKuIW+vq4Ke1BjOTjM2YctQIvCT7GFzHwmfZPGo5wnrgkid0YQtnAleFSqumZm4az3n2BS+erby5ipJdgrg==} - has-proto@1.0.1: resolution: {integrity: sha512-7qE+iP+O+bgF9clE5+UoBFzE65mlBiVj3tKCrlNQ0Ogwm0BjpT/gK4SlLYDMybDh5I3TCTKnPPa0oMG7JDYrhg==} engines: {node: '>= 0.4'} - has-proto@1.0.3: - resolution: {integrity: sha512-SJ1amZAJUiZS+PhsVLf5tGydlaVB8EdFpaSO4gmiUKUOxk8qzn5AIy4ZeJUmh22znIdk/uMAUT2pl3FxzVUH+Q==} - engines: {node: '>= 0.4'} - has-symbols@1.0.3: resolution: {integrity: sha512-l3LCuF6MgDNwTDKkdYGEihYjt5pRPbEg46rtlmnSPlUbgmB8LOIrKJbYYFBSbnPaJexMKtiPO8hmeRjRz2Td+A==} engines: {node: '>= 0.4'} @@ -5539,10 +5089,6 @@ packages: resolution: {integrity: sha512-vUptKVTpIJhcczKBbgnS+RtcuYMB8+oNzPK2/Hp3hanz8JmpATdmmgLgSaadVREkDm+e2giHwY3ZRkyjSIDDFA==} engines: {node: '>= 0.4'} - hasown@2.0.2: - resolution: {integrity: sha512-0hJU9SCPvmMzIBdZFqNPXWa6dqh7WdH0cII9y+CyS8rG3nL48Bclra9HmKhVVUHyPWNH5Y7xDwAB7bfgSjkUMQ==} - engines: {node: '>= 0.4'} - hast-util-from-dom@5.0.0: resolution: {integrity: sha512-d6235voAp/XR3Hh5uy7aGLbM3S4KamdW0WEgOaU1YoewnuYw4HXb5eRtv9g65m/RFGEfUY1Mw4UqCc5Y8L4Stg==} @@ -5570,8 +5116,8 @@ packages: hast-util-to-estree@3.1.0: resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==} - hast-util-to-html@9.0.3: - resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} + hast-util-to-html@9.0.2: + resolution: {integrity: sha512-RP5wNpj5nm1Z8cloDv4Sl4RS8jH5HYa0v93YB6Wb4poEzgMo/dAAL0KcT4974dCjcNG5pkLqTImeFHHCwwfY3g==} hast-util-to-parse5@8.0.0: resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} @@ -5601,9 +5147,8 @@ packages: resolution: {integrity: sha512-ZbezypZfn4odyApjCCv+Fw5OgweBqRLA/EsMyc4FUknFvBJcBIKhHy4sqmD1rWpBc/3wUlaQ6tqOPjk36R1ckg==} engines: {node: '>=16.0.0'} - hono@4.6.2: - resolution: {integrity: sha512-v+39817TgAhetmHUEli8O0uHDmxp2Up3DnhS4oUZXOl5IQ9np9tYtldd42e5zgdLVS0wsOoXQNZ6mx+BGmEvCA==} - engines: {node: '>=16.9.0'} + hosted-git-info@2.8.9: + resolution: {integrity: sha512-mxIDAb9Lsm6DoOJ7xH+5+X4y1LU/4Hi50L9C5sIswK3JzULS4bwk1FvjdBgvYR4bzT4tuUQiC15FE2f5HbLvYw==} html-void-elements@3.0.0: resolution: {integrity: sha512-bEqo66MRXsUGxWHV5IP0PUiAWwoEjba4VCzg0LjFJBpchPaTfyfCKTG6bc5F8ucKec3q5y6qOdGyYTSBEvhCrg==} @@ -5661,8 +5206,8 @@ packages: ieee754@1.2.1: resolution: {integrity: sha512-dcyqhDvX1C46lXZcVqCpK+FtMRQVdIMN6/Df5js2zouUsqG7I6sFxitIC+7KYK29KdXOLHdu9zL4sFnoVQnqaA==} - ignore@5.3.2: - resolution: {integrity: sha512-hsBTNUqQTDwkWtcdYI2i06Y/nUBEsNEDJKjWdigLvegy8kDuJAS8uRlpkkcQpyEXL0Z/pjDy5HBmMjRCJ2gq+g==} + ignore@5.3.0: + resolution: {integrity: sha512-g7dmpshy+gD7mh88OC9NwSGTKoc3kyLAZQRU1mt53Aw/vnvfXnbC+F/7F7QoYVKbV+KNvJx8wArewKy1vXMtlg==} engines: {node: '>= 4'} immutable@4.2.1: @@ -5888,6 +5433,10 @@ packages: resolution: {integrity: sha512-Fd4gABb+ycGAmKou8eMftCupSir5lRxqf4aD/vd0cD2qc4HL07OjCeuHMr8Ro4CoMaeCKDB0/ECBOVWjTwUvPQ==} engines: {node: '>=8'} + is-plain-obj@1.1.0: + resolution: {integrity: sha512-yvkRyxmFKEOQ4pNXCmJG5AEQNlXJS5LaONXo5/cLdTZdWvsZ1ioJEonLGAosKlMWE8lwUy/bJzMjcw8az73+Fg==} + engines: {node: '>=0.10.0'} + is-plain-obj@2.1.0: resolution: {integrity: sha512-YWnfyRwxL/+SsrWYfOpUtz5b3YD+nyfkHvjbcanzk8zgyO4ASD67uVMRt8k5bM4lLMDnXfriRhOpemw+NfT1eA==} engines: {node: '>=8'} @@ -6030,11 +5579,8 @@ packages: resolution: {integrity: sha512-N3yCS/NegsOBokc8GAdM8UcmfsKiSS8cipheD/nivzr700H+nsMOxJjQnvwOcRYVuFkdH0wGUvW2WbXGmrZGbQ==} engines: {node: '>=14'} - jackspeak@3.4.3: - resolution: {integrity: sha512-OGlZQpz2yfahA/Rd1Y8Cd9SIEsqvXkLVoSw/cgwhnhFMDbsQFeZYoJJ7bIZBS9BcamUW96asq/npPWugM+RQBw==} - - jake@10.9.2: - resolution: {integrity: sha512-2P4SQ0HrLQ+fw6llpLnOaGAvN2Zu6778SJMrCUwns4fOoG9ayrTiZk3VV8sCPkVZF8ab0zksVpS8FDY5pRCNBA==} + jake@10.8.7: + resolution: {integrity: sha512-ZDi3aP+fG/LchyBzUM804VjddnwfSfsdeYkwt8NcbKRvo4rFkjhs456iLFn3k2ZUWvNe4i48WACDbza8fhq2+w==} engines: {node: '>=10'} hasBin: true @@ -6057,9 +5603,6 @@ packages: js-tokens@4.0.0: resolution: {integrity: sha512-RdJUflcE3cUzKiMqQgsCu06FPu9UdIJO0beYbPhHN4k6apgJtifcoCtT9bcxOpYBtpD2kCM6Sbzg4CausW/PKQ==} - js-tokens@9.0.0: - resolution: {integrity: sha512-WriZw1luRMlmV3LGJaR6QOJjWwgLUTf89OwT2lUOyjX2dJGBwgmIkbcz+7WFZjrZM635JOIR517++e/67CP9dQ==} - js-yaml@3.14.1: resolution: {integrity: sha512-okMH7OXXJ7YrN9Ok3/SXrnu4iX9yOk+25nqX4imS2npuvTYDmo/QEZoqwZkYaIDk3jVvBOTOIEgEhaLOynBS9g==} hasBin: true @@ -6113,6 +5656,9 @@ packages: engines: {node: '>=6'} hasBin: true + jsonc-parser@3.2.0: + resolution: {integrity: sha512-gfFQZrcTc8CnKXp6Y4/CBT3fTc0OVuDofpre4aEeEpSBPV5X5v4+Vmx+8snU7RLPrNHPKSgLxGo9YuQzz20o+w==} + jsonfile@4.0.0: resolution: {integrity: sha512-m6F1R3z8jjlf2imQHS2Qez5sjKWQzbuuhuJ/FKYFRZvPE3PuHcSMVZzfsLhGVOkfd20obL5SWEBew5ShlquNxg==} @@ -6190,26 +5736,26 @@ packages: resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} engines: {node: '>=14'} - lilconfig@3.1.2: - resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} - engines: {node: '>=14'} - lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - lint-staged@15.2.10: - resolution: {integrity: sha512-5dY5t743e1byO19P9I4b3x8HJwalIznL5E1FWYnU6OWw33KxNBSLAc6Cy7F2PsFEO8FKnLwjwm5hx7aMF0jzZg==} + lint-staged@15.2.0: + resolution: {integrity: sha512-TFZzUEV00f+2YLaVPWBWGAMq7So6yQx+GG8YRMDeOEIf95Zn5RyiLMsEiX4KTNl9vq/w+NqRJkLA1kPIo15ufQ==} engines: {node: '>=18.12.0'} hasBin: true - listr2@8.2.4: - resolution: {integrity: sha512-opevsywziHd3zHCVQGAj8zu+Z3yHNkkoYhWIGnq54RrCVwLz0MozotJEDnKsIBLvkfLGN6BLOyAeRrYI0pKA4g==} + listr2@8.0.0: + resolution: {integrity: sha512-u8cusxAcyqAiQ2RhYvV7kRKNLgUvtObIbhOX2NCXqvp1UU32xIg5CT22ykS2TPKJXZWJwtK3IKLiqAGlGNE+Zg==} engines: {node: '>=18.0.0'} load-tsconfig@0.2.5: resolution: {integrity: sha512-IXO6OCs9yg8tMKzfPZ1YmheJbZCiEsnBdcB03l0OcfK9prKnJb96siuHCr5Fl37/yo9DnKU+TLpxzTUspw9shg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + load-yaml-file@0.2.0: + resolution: {integrity: sha512-OfCBkGEw4nN6JLtgRidPX6QxjBQGQf72q3si2uvqyFEMbycSFFHwAZeXx6cJgFM9wmLrf9zBwCP3Ivqa+LLZPw==} + engines: {node: '>=6'} + local-pkg@0.5.0: resolution: {integrity: sha512-ok6z3qlYyCDS4ZEU27HaU6x/xZa9Whf8jD4ptH5UZTQYZVYeb9bnZ3ojVhiJNLiXK1Hfc0GNbLXcmZ5plLDDBg==} engines: {node: '>=14'} @@ -6294,8 +5840,8 @@ packages: resolution: {integrity: sha512-l0x2DvrW294C9uDCoQe1VSU4gf529FkSZ6leBl4TiqZH/e+0R7hSfHQBNut2mNygDgHwvYHfFLn6Oxb3VWj2rA==} engines: {node: '>=12'} - log-update@6.1.0: - resolution: {integrity: sha512-9ie8ItPR6tjY5uYJh8K/Zrv/RMZ5VOlOWvtZdEHYSTFKZfIBPQa9tOAEeAWhd+AnIneLJ22w5fjOYtoutpWq5w==} + log-update@6.0.0: + resolution: {integrity: sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==} engines: {node: '>=18'} long@4.0.0: @@ -6321,9 +5867,6 @@ packages: resolution: {integrity: sha512-/1clY/ui8CzjKFyjdvwPWJUYKiFVXG2I2cY0ssG7h4+hwk+XOIX7ZSG9Q7TW8TW3Kp3BUSqgFWBLgL4PJ+Blag==} engines: {node: 14 || >=16.14} - lru-cache@10.4.3: - resolution: {integrity: sha512-JNAzZcXrCt42VGLuYz0zfAzDfAvJWW6AfYlDBQyDV5DClI2m5sAmK+OIO7s59XfsRsWHp02jAJrRadPRGTt6SQ==} - lru-cache@4.1.5: resolution: {integrity: sha512-sWZlbEP2OsHNkXrMl5GYk/jKk70MBng6UU4YI/qGDYbgf6YbP4EvmqISbXCoJiRKs+1bSpFHVgQxvJ17F2li5g==} @@ -6339,12 +5882,21 @@ packages: peerDependencies: react: ^16.5.1 || ^17.0.0 || ^18.0.0 - magic-string@0.30.11: - resolution: {integrity: sha512-+Wri9p0QHMy+545hKww7YAu5NyzF8iomPL/RQazugQ9+Ez4Ic3mERMd8ZTX5rfK944j+560ZJi8iAwgak1Ac7A==} + magic-string@0.30.5: + resolution: {integrity: sha512-7xlpfBaQaP/T6Vh8MO/EqXSW5En6INHEvEXQiuff7Gku0PWjU3uf6w/j9o7O+SpB5fOAkrI5HeoNgwjEO0pFsA==} + engines: {node: '>=12'} make-error@1.3.6: resolution: {integrity: sha512-s8UhlNe7vPKomQhC1qFelMokr/Sc3AgNbso3n74mVPA5LTZwkB9NlXf4XPamLxJE8h0gh73rM94xvwRT2CVInw==} + map-obj@1.0.1: + resolution: {integrity: sha512-7N/q3lyZ+LVCp7PzuxrJr4KMbBE2hW7BT7YNia330OFxIf4d3r5zVpicP2650l7CPN6RM9zOJRl3NGpqSiw3Eg==} + engines: {node: '>=0.10.0'} + + map-obj@4.3.0: + resolution: {integrity: sha512-hdN1wVrZbb29eBGiGjJbeP8JbKjq1urkHJ/LIP/NY48MZ1QVXUsQBV1G1zvYFHn1XE06cwjBsOI2K3Ulnj1YXQ==} + engines: {node: '>=8'} + markdown-extensions@1.1.1: resolution: {integrity: sha512-WWC0ZuMzCyDHYCasEGs4IPvLyTGftYwh6wIEOULOF0HXcqZlhwRzrK0w2VUlxWA98xnvb/jszw4ZSkJ6ADpM6Q==} engines: {node: '>=0.10.0'} @@ -6445,6 +5997,10 @@ packages: mdn-data@2.0.30: resolution: {integrity: sha512-GaqWWShW4kv/G9IEucWScBx9G1/vsFZZJUO+tD26M8J8z3Kw5RDQjaoZe03YAClgeS/SWPOcb4nkFBTEi5DUEA==} + meow@6.1.1: + resolution: {integrity: sha512-3YffViIt2QWgTy6Pale5QpopX/IvU3LPL03jOTqp6pGj3VjesdO/U8CuHMKpnQr4shCNCM5fd5XFFvIIl6JBHg==} + engines: {node: '>=8'} + merge-options@3.0.4: resolution: {integrity: sha512-2Sug1+knBjkaMsMgf1ctR1Ujx+Ayku4EdJN4Z+C2+JzoeF7A3OZ9KM2GY0CpQS51NR61LTurMJrRKPhSs3ZRTQ==} engines: {node: '>=10'} @@ -6640,10 +6196,6 @@ packages: resolution: {integrity: sha512-DMy+ERcEW2q8Z2Po+WNXuw3c5YaUSFjAO5GsJqfEl7UjvtIuFKO6ZrKvcItdy98dwFI2N1tg3zNIdKaQT+aNdA==} engines: {node: '>=8.6'} - micromatch@4.0.8: - resolution: {integrity: sha512-PXwfBhYu0hBCPw8Dn0E+WDYb7af3dSLVWKi3HGv84IdF4TyFoC0ysxFd0Goxw7nSv4T/PzEJQxsYsEiFCKo2BA==} - engines: {node: '>=8.6'} - mime-db@1.52.0: resolution: {integrity: sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg==} engines: {node: '>= 0.6'} @@ -6660,14 +6212,14 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} - mimic-function@5.0.1: - resolution: {integrity: sha512-VP79XUPxV2CigYP3jWwAUFSku2aKqBH7uTAapFWCBqutsbmDo96KY5o8uh6U+/YSIn5OxJnXp73beVkpqMIGhA==} - engines: {node: '>=18'} - mimic-response@3.1.0: resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} engines: {node: '>=10'} + min-indent@1.0.1: + resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} + engines: {node: '>=4'} + minimalistic-assert@1.0.1: resolution: {integrity: sha512-UtJcAD4yEaGtjPezWuO9wC4nwUnVH/8/Im3yEHQP4b67cXlD/Qr9hdITCU1xDbSEXg2XKNaP8jsReV7vQd00/A==} @@ -6689,9 +6241,9 @@ packages: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} - minimatch@9.0.5: - resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} - engines: {node: '>=16 || 14 >=14.17'} + minimist-options@4.1.0: + resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} + engines: {node: '>= 6'} minimist@1.2.8: resolution: {integrity: sha512-2yyAR8qBkN3YuheJanUpWC5U3bb5osDywNB8RzDVlDwDHbocAJveqqj1u8+SVD7jkWT4yvsHCpWqqWqAxb0zCA==} @@ -6708,14 +6260,18 @@ packages: resolution: {integrity: sha512-3FnjYuehv9k6ovOEbyOswadCDPX1piCfhV8ncmYtHOjuPwylVWsghTLo7rabjC3Rx5xD4HDx8Wm1xnMF7S5qFQ==} engines: {node: '>=8'} - minipass@7.1.2: - resolution: {integrity: sha512-qOOzS1cBTWYF4BH8fVePDBOO9iptMnGUEZwNc/cMWnTV2nVLZ7VoNWEPHkYczZA0pdoA7dl6e7FL659nX9S2aw==} + minipass@7.0.4: + resolution: {integrity: sha512-jYofLM5Dam9279rdkWzqHozUo4ybjdZmCsDHePy5V/PbBcVMiSZR97gmAy45aqi8CK1lG2ECd356FU86avfwUQ==} engines: {node: '>=16 || 14 >=14.17'} minizlib@2.1.2: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} + mixme@0.5.10: + resolution: {integrity: sha512-5H76ANWinB1H3twpJ6JY8uvAtpmFvHNArpilJAjXRKXSDDLPIMoZArw5SH0q9z+lLs8IrMw7Q2VWpWimFKFT1Q==} + engines: {node: '>= 8.0.0'} + mj-context-menu@0.6.1: resolution: {integrity: sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==} @@ -6731,8 +6287,8 @@ packages: engines: {node: '>=10'} hasBin: true - mlly@1.7.1: - resolution: {integrity: sha512-rrVRZRELyQzrIUAVMHxP97kv+G786pHmOKzuFII8zDYahFBS7qnHh2AlYSl1GAHhaMPCz6/oHjVMcfFYgFYHgA==} + mlly@1.4.2: + resolution: {integrity: sha512-i/Ykufi2t1EZ6NaPLdfnZk2AX8cs0d+mTzVKuPfqPKPatxLApaBoxJQ9x1/uckXtrS/U5oisPMDkNs0yQTaBRg==} mri@1.2.0: resolution: {integrity: sha512-tzzskb3bG8LvYGFF/mDTpq3jpI6Q9wc3LEmBaghu+DdCssd1FakN7Bc0hVNmEyGq1bq3RgfkCb3cmQLpNPOroA==} @@ -6782,43 +6338,25 @@ packages: natural-orderby@2.0.3: resolution: {integrity: sha512-p7KTHxU0CUrcOXe62Zfrb5Z13nLvPhSWR/so3kFulUQU0sgUll2Z0LwpsLN351eOOD+hRGu/F1g+6xDfPeD++Q==} - next-themes@0.2.1: - resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} - peerDependencies: - next: '*' - react: '*' - react-dom: '*' - - next@14.0.3: - resolution: {integrity: sha512-AbYdRNfImBr3XGtvnwOxq8ekVCwbFTv/UJoLwmaX89nk9i051AEY4/HAWzU0YpaTDw8IofUpmuIlvzWF13jxIw==} - engines: {node: '>=18.17.0'} - hasBin: true - peerDependencies: - '@opentelemetry/api': ^1.1.0 - react: ^18.2.0 - react-dom: ^18.2.0 - sass: ^1.3.0 - peerDependenciesMeta: - '@opentelemetry/api': - optional: true - sass: - optional: true + next-themes@0.2.1: + resolution: {integrity: sha512-B+AKNfYNIzh0vqQQKqQItTS8evEouKD7H5Hj3kmuPERwddR2TxvDSFZuTj6T7Jfn1oyeUyJMydPl1Bkxkh0W7A==} + peerDependencies: + next: '*' + react: '*' + react-dom: '*' - next@14.2.13: - resolution: {integrity: sha512-BseY9YNw8QJSwLYD7hlZzl6QVDoSFHL/URN5K64kVEVpCsSOWeyjbIGK+dZUaRViHTaMQX8aqmnn0PHBbGZezg==} + next@14.0.3: + resolution: {integrity: sha512-AbYdRNfImBr3XGtvnwOxq8ekVCwbFTv/UJoLwmaX89nk9i051AEY4/HAWzU0YpaTDw8IofUpmuIlvzWF13jxIw==} engines: {node: '>=18.17.0'} hasBin: true peerDependencies: '@opentelemetry/api': ^1.1.0 - '@playwright/test': ^1.41.2 react: ^18.2.0 react-dom: ^18.2.0 sass: ^1.3.0 peerDependenciesMeta: '@opentelemetry/api': optional: true - '@playwright/test': - optional: true sass: optional: true @@ -6865,16 +6403,19 @@ packages: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - node-gyp-build@4.8.2: - resolution: {integrity: sha512-IRUxE4BVsHWXkV/SFOut4qTlagw2aM8T5/vnTsmrHJvVoKueJHRc/JaFND7QDDc61kLYUJ6qlZM3sqTSyx2dTw==} + node-gyp-build@4.7.1: + resolution: {integrity: sha512-wTSrZ+8lsRRa3I3H8Xr65dLWSgCvY2l4AOnaeKdPA9TB/WYMPaTcrzf3rXvFoVvjKNVnu0CcWSx54qq9GKRUYg==} hasBin: true - node-releases@2.0.18: - resolution: {integrity: sha512-d9VeXT4SJ7ZeOqGX6R5EM022wpL+eWPooLI+5UpWn2jCT1aosUQEhQP214x33Wkwx3JQMvIm+tIoVOdodFS40g==} + node-releases@2.0.14: + resolution: {integrity: sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw==} non-layered-tidy-tree-layout@2.0.2: resolution: {integrity: sha512-gkXMxRzUH+PB0ax9dUN0yYF0S25BqeAYqhgMaLUFmpXLEk7Fcu8f4emJuOAY0V8kjDICxROIKsTAKsV/v355xw==} + normalize-package-data@2.5.0: + resolution: {integrity: sha512-/5CMN3T0R4XTj4DcGaexo+roZSdSFW/0AOOTROrjxzCG1wrWXEsGbRKevjlIL+ZDE4sZlJr5ED4YW0yqmkK+eA==} + normalize-path@3.0.0: resolution: {integrity: sha512-6eZs5Ls3WtCisHWp9S2GUy8dqkpGi4BVSz3GaqiE6ezub0512ESztXUwUB6C6IKbQkY2Pnb/mD4WYojCRwcwLA==} engines: {node: '>=0.10.0'} @@ -6891,8 +6432,8 @@ packages: resolution: {integrity: sha512-S48WzZW777zhNIrn7gxOlISNAqi9ZC/uQFnRdbeIHhZhCA6UqpkOT8T1G7BvfdgP4Er8gF4sUbaS0i7QvIfCWw==} engines: {node: '>=8'} - npm-run-path@5.3.0: - resolution: {integrity: sha512-ppwTtiJZq0O/ai0z7yfudtBpWIoxM8yE6nHi1X47eFR2EWORqfbu6CnPlNsjeN683eT0qG6H/Pyf9fCcvjnnnQ==} + npm-run-path@5.2.0: + resolution: {integrity: sha512-W4/tgAXFqFA0iL7fk0+uQ3g7wkL8xJmx3XdK0VGb4cHW//eZTtKGvFBBoRKVTpY7n6ze4NL9ly7rgXcHufqXKg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} npm-to-yarn@2.1.0: @@ -6920,10 +6461,6 @@ packages: object-inspect@1.13.1: resolution: {integrity: sha512-5qoj1RUiKOMsCCNLV1CBiPYE10sziTsnmNxkAI/rZhiD63CF7IqdFGC/XzjWjpSgLf0LxXX3bDFIh0E18f6UhQ==} - object-inspect@1.13.2: - resolution: {integrity: sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==} - engines: {node: '>= 0.4'} - object-keys@1.1.1: resolution: {integrity: sha512-NuAESUOUMrlIXOfHKzD6bpPu3tYt3xvjNdRIQ+FeT0lNb4K8WR70CaDxhuNguS2XG+GjkyMwOzsN5ZktImfhLA==} engines: {node: '>= 0.4'} @@ -6972,12 +6509,8 @@ packages: resolution: {integrity: sha512-1FlR+gjXK7X+AsAHso35MnyN5KqGwJRi/31ft6x0M194ht7S+rWAvd7PHss9xSKMzE0asv1pyIHaJYq+BbacAQ==} engines: {node: '>=12'} - onetime@7.0.0: - resolution: {integrity: sha512-VXJjc87FScF88uafS3JllDgvAm+c/Slfz06lorj2uAY34rlUu0Nt+v8wreiImcrgAjjIHp1rXpTDlLOGw29WwQ==} - engines: {node: '>=18'} - - optionator@0.9.4: - resolution: {integrity: sha512-6IpQ7mKUxRcZNLIObR0hz7lxsapSSIYNZJwXPGeF0mTVqGKFIXj1DQcMoT22S3ROcLyY/rz0PWaWZ9ayWmad9g==} + optionator@0.9.3: + resolution: {integrity: sha512-JjCoypp+jKn1ttEFExxhetCKeJt9zhAgAve5FXHixTvFDW/5aEktX9bufBKLRRMdU7bNtpLfcGu94B3cdEJgjg==} engines: {node: '>= 0.8.0'} ora@4.0.2: @@ -7014,9 +6547,9 @@ packages: resolution: {integrity: sha512-ZBxxZ5sL2HghephhpGAQdoskxplTwr7ICaehZwLIlfL6acuVgZPm8yBNuRAFBGEqtD/hmUeq9eqLg2ys9Xr/yw==} engines: {node: '>=8'} - p-filter@4.1.0: - resolution: {integrity: sha512-37/tPdZ3oJwHaS3gNJdenCDB3Tz26i9sjhnguBtvN0vYlRIiDNnvTWkuh+0hETV9rLPdJ3rlL3yVOYPIAnM8rw==} - engines: {node: '>=18'} + p-filter@3.0.0: + resolution: {integrity: sha512-QtoWLjXAW++uTX67HZQz1dbTpqBfiidsB6VtQUC9iR85S120+s0T5sO6s+B5MLzFcZkrEd/DGMmCjR+f2Qpxwg==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} p-finally@1.0.0: resolution: {integrity: sha512-LICb2p9CB7FS+0eR1oqWnHhp0FljGLZCWBE9aix0Uye9W8LTQPwMTYVGWQWIw9RdQiDg4+epXQODwIYJtSJaow==} @@ -7054,9 +6587,13 @@ packages: resolution: {integrity: sha512-y3b8Kpd8OAN444hxfBbFfj1FY/RjtTd8tzYwhUqNYXx0fXx2iX4maP4Qr6qhIKbQXI02wTLAda4fYUbDagTUFw==} engines: {node: '>=6'} - p-map@7.0.2: - resolution: {integrity: sha512-z4cYYMMdKHzw4O5UkWJImbZynVIo0lSGTXc7bzB1e/rrDqkgGUNysK/o4bTr+0+xKvvLoTyGqYC4Fgljy9qe1Q==} - engines: {node: '>=18'} + p-map@5.5.0: + resolution: {integrity: sha512-VFqfGDHlx87K66yZrNdI4YGtD70IRyd+zSvgks6mzHPRNkoKy+9EKP4SFC77/vTTQYmRmti7dvqC+m5jBrBAcg==} + engines: {node: '>=12'} + + p-map@6.0.0: + resolution: {integrity: sha512-T8BatKGY+k5rU+Q/GTYgrEf2r4xRMevAN5mtXc2aPc4rS1j3s+vWTaO2Wag94neXuCAUAs8cxBL9EeB5EA6diw==} + engines: {node: '>=16'} p-timeout@3.2.0: resolution: {integrity: sha512-rhIwUycgwwKcP9yTOOFK/AKsAopjjCakVqLHePO3CC6Mir1Z99xT+R63jZxAT5lFZLa2inS5h+ZS2GvR99/FBg==} @@ -7074,11 +6611,8 @@ packages: resolution: {integrity: sha512-wpgERjNkLrBiFmkMEjuZJEWKKDrNfHCKA1OhyN1wg1FrLkULbviEy6py1AyJUgZ72YWFbZ38FIpnqvVqAlDUwA==} engines: {node: '>=8'} - package-json-from-dist@1.0.0: - resolution: {integrity: sha512-dATvCeZN/8wQsGywez1mzHtTlP22H8OEfPrVMLNr4/eGa+ijtLn/6M5f0dY8UKNrC2O9UCU6SSoG3qRKnt7STw==} - - package-manager-detector@0.2.0: - resolution: {integrity: sha512-E385OSk9qDcXhcM9LNSe4sdhx8a9mAPrZ4sMLW+tmxl5ZuGtPUcdFu+MPP2jbgiWAZ6Pfe5soGFMd+0Db5Vrog==} + packet-reader@1.0.0: + resolution: {integrity: sha512-HAKu/fG3HpHFO0AA8WE8q2g+gBJaZ9MG7fcKk+IJPLTGAD6Psw4443l+9DGRbOIh3/aXr7Phy0TjilYivJo5XQ==} param-case@3.0.4: resolution: {integrity: sha512-RXlj7zCYokReqWpOPH9oYivUzLYZ5vAPIfEmCTNViosC78F8F0H9y7T7gG2M39ymgutxF5gcFEsyZQSph9Bp3A==} @@ -7146,20 +6680,16 @@ packages: path-parse@1.0.7: resolution: {integrity: sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw==} - path-scurry@1.11.1: - resolution: {integrity: sha512-Xa4Nw17FS9ApQFJ9umLiJS4orGjm7ZzwUrwamcGQuHSzDyth9boKDaycYdDcZDuqYATXw4HFXgaqWTctW/v1HA==} - engines: {node: '>=16 || 14 >=14.18'} + path-scurry@1.10.1: + resolution: {integrity: sha512-MkhCqzzBEpPvxxQ71Md0b1Kk51W01lrYvlMzSUaIzNsODdd7mqhiimSZlr+VegAz5Z6Vzt9Xg2ttE//XBhH3EQ==} + engines: {node: '>=16 || 14 >=14.17'} path-type@4.0.0: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} - path-type@5.0.0: - resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} - engines: {node: '>=12'} - - pathe@1.1.2: - resolution: {integrity: sha512-whLdWMYL2TwI08hn8/ZqAbrVemu0LNaNNJZX73O6qaIdCTfXutsLhMkjdENX0qhsQ9uIimo4/aQOmXkoon2nDQ==} + pathe@1.1.1: + resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} pathval@1.1.1: resolution: {integrity: sha512-Dp6zGqpTdETdR63lehJYPeIOqpiNBNtc7BpWSLrOje7UaIsE5aY92r/AunQA7rsXvet3lrJ3JnZX29UPTKXyKQ==} @@ -7177,8 +6707,8 @@ packages: pg-cloudflare@1.1.1: resolution: {integrity: sha512-xWPagP/4B6BgFO+EKz3JONXv3YDgvkbVrGw2mTo3D6tVDQRh1e7cqVGvyR3BE+eQgAvx1XhW/iEASj4/jCWl3Q==} - pg-connection-string@2.7.0: - resolution: {integrity: sha512-PI2W9mv53rXJQEOb8xNR8lH7Hr+EKa6oJa38zsK0S/ky2er16ios1wLKhZyxzD7jUReiWokc9WK5nxSnC7W1TA==} + pg-connection-string@2.6.2: + resolution: {integrity: sha512-ch6OwaeaPYcova4kKZ15sbJ2hKb/VP48ZD2gE7i1J+L4MspCtBMAx8nMgz7bksc7IojCIIWuEhHibSMFH8m8oA==} pg-int8@1.0.1: resolution: {integrity: sha512-WCtabS6t3c8SkpDBUlb1kjOs7l66xsGdKpIPZsg4wR+B3+u9UAum2odSsF9tnvxg80h4ZxLWMy4pRjOsFIqQpw==} @@ -7188,17 +6718,14 @@ packages: resolution: {integrity: sha512-BM/Thnrw5jm2kKLE5uJkXqqExRUY/toLHda65XgFTBTFYZyopbKjBe29Ii3RbkvlsMoFwD+tHeGaCjjv0gHlyw==} engines: {node: '>=4'} - pg-pool@3.7.0: - resolution: {integrity: sha512-ZOBQForurqh4zZWjrgSwwAtzJ7QiRX0ovFkZr2klsen3Nm0aoh33Ls0fzfv3imeH/nw/O27cjdz5kzYJfeGp/g==} + pg-pool@3.6.1: + resolution: {integrity: sha512-jizsIzhkIitxCGfPRzJn1ZdcosIt3pz9Sh3V01fm1vZnbnCMgmGl5wvGGdNN2EL9Rmb0EcFoCkixH4Pu+sP9Og==} peerDependencies: pg: '>=8.0' pg-protocol@1.6.0: resolution: {integrity: sha512-M+PDm637OY5WM307051+bsDia5Xej6d9IR4GwJse1qA1DIhiKlksvrneZOYQq42OM+spubpcNYEo2FcKQrDk+Q==} - pg-protocol@1.7.0: - resolution: {integrity: sha512-hTK/mE36i8fDDhgDFjy6xNOG+LCorxLG3WO17tku+ij6sVHXh1jQUJ8hYAnRhNla4QVD2H8er/FOjc/+EgC6yQ==} - pg-types@2.2.0: resolution: {integrity: sha512-qTAAlrEsl8s4OiEQY69wDvcMIdQN6wdz5ojQiOy6YRMuynxenON0O5oCpJI6lshc6scgAY8qvJ2On/p+CXY0GA==} engines: {node: '>=4'} @@ -7207,8 +6734,8 @@ packages: resolution: {integrity: sha512-hRCSDuLII9/LE3smys1hRHcu5QGcLs9ggT7I/TCs0IE+2Eesxi9+9RWAAwZ0yaGjxoWICF/YHLOEjydGujoJ+g==} engines: {node: '>=10'} - pg@8.13.0: - resolution: {integrity: sha512-34wkUTh3SxTClfoHB3pQ7bIMvw9dpFU1audQQeZG837fmHfHpr14n/AELVDoOYVDW2h5RDWU78tFjkD+erSBsw==} + pg@8.11.3: + resolution: {integrity: sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g==} engines: {node: '>= 8.0.0'} peerDependencies: pg-native: '>=3.0.1' @@ -7222,17 +6749,10 @@ packages: picocolors@1.0.0: resolution: {integrity: sha512-1fygroTLlHu66zi26VoTDv8yRgm0Fccecssto+MhsZ0D/DGW2sm8E8AjW7NU5VVTRt5GxbeZ5qBuJr+HyLYkjQ==} - picocolors@1.1.0: - resolution: {integrity: sha512-TQ92mBOW0l3LeMeyLV6mzy/kWr8lkd/hp3mTg7wYK7zJhuBStmGMBG0BdeDZS/dZx1IukaX6Bk11zcln25o1Aw==} - picomatch@2.3.1: resolution: {integrity: sha512-JU3teHTNjmE2VCGFzuY8EXzCDVwEqB2a8fsIvwaStHhAWJEeVd1o1QD80CU6+ZdEXXSLbSsuLwJjkCBWqRQUVA==} engines: {node: '>=8.6'} - picomatch@4.0.2: - resolution: {integrity: sha512-M7BAV6Rlcy5u+m6oPhAPFgJTzAioX/6B0DxyvDlo9l8+T3nLKbrczg2WLUyzd45L8RqfUMyGPzekbMvX2Ldkwg==} - engines: {node: '>=12'} - pidtree@0.6.0: resolution: {integrity: sha512-eG2dWTVw5bzqGRztnHExczNxt5VGsE6OwTeCG3fdUf9KBsZzO3R5OIIIzWR+iZA0NtZ+RDVdaoE2dK1cn6jH4g==} engines: {node: '>=0.10'} @@ -7246,22 +6766,26 @@ packages: resolution: {integrity: sha512-uB80kBFb/tfd68bVleG9T5GGsGPjJrLAUpR5PZIrhBnIaRTQRjqdJSsIKkOP6OAIFbj7GOrcudc5pNjZ+geV2g==} engines: {node: '>=6'} - pino-abstract-transport@1.2.0: - resolution: {integrity: sha512-Guhh8EZfPCfH+PMXAb6rKOjGQEoy0xlAIn+irODG5kgfYV+BQ0rGYYWTIel3P5mmyXqkYkPmdIkywsn6QKUR1Q==} + pino-abstract-transport@1.1.0: + resolution: {integrity: sha512-lsleG3/2a/JIWUtf9Q5gUNErBqwIu1tUKTT3dUzaf5DySw9ra1wcqKjJjLX1VTY64Wk1eEOYsVGSaGfCK85ekA==} pino-std-serializers@6.2.2: resolution: {integrity: sha512-cHjPPsE+vhj/tnhCy/wiMh3M3z3h/j15zHQX+S9GkTBgqJuTuJzYJ4gUyACLhDaJ7kk9ba9iRDmbH2tJU03OiA==} - pino@8.21.0: - resolution: {integrity: sha512-ip4qdzjkAyDDZklUaZkcRFb2iA118H9SgRh8yzTkSQK8HilsOJF7rSY8HoW5+I0M46AZgX/pxbprf2vvzQCE0Q==} + pino@8.17.2: + resolution: {integrity: sha512-LA6qKgeDMLr2ux2y/YiUt47EfgQ+S9LznBWOJdN3q1dx2sv0ziDLUBeVpyVv17TEcGCBuWf0zNtg3M5m1NhhWQ==} hasBin: true pirates@4.0.6: resolution: {integrity: sha512-saLsH7WeYYPiD25LDuLRRY/i+6HaPYr6G1OUlN39otzkSTxKnubR9RTxS3/Kk50s1g2JTgFwWQDQyplC5/SHZg==} engines: {node: '>= 6'} - pkg-types@1.2.0: - resolution: {integrity: sha512-+ifYuSSqOQ8CqP4MbZA5hDpb97n3E8SVWdJe+Wms9kj745lmd3b7EZJiqvmLwAlmRfjrI7Hi5z3kdBJ93lFNPA==} + pkg-dir@4.2.0: + resolution: {integrity: sha512-HRDzbaKjC+AOWVXxAU/x54COGeIv9eb+6CkDSQoNTt4XyWoIJvuPsXizxu/Fr23EiekbtZwmh1IcIG/l/a10GQ==} + engines: {node: '>=8'} + + pkg-types@1.0.3: + resolution: {integrity: sha512-nN7pYi0AQqJnoLPC9eHFQ8AcyaixBUOwvqc5TDnIKCMEE6I0y8P7OKA7fPexsXGCGxQDl/cmrLAp26LhcwxZ4A==} pluralize@8.0.0: resolution: {integrity: sha512-Nc3IT5yHzflTfbjgqWcCPpo7DaKy4FnpB0l/zCAW0Tc7jxAiuqSxHasntB3D7887LSrA93kDJ9IXovxJYxyLCA==} @@ -7291,24 +6815,6 @@ packages: ts-node: optional: true - postcss-load-config@6.0.1: - resolution: {integrity: sha512-oPtTM4oerL+UXmx+93ytZVN82RrlY/wPUV8IeDxFrzIjXOLF1pN+EmKPLbubvKHT2HC20xXsCAH2Z+CKV6Oz/g==} - engines: {node: '>= 18'} - peerDependencies: - jiti: '>=1.21.0' - postcss: '>=8.0.9' - tsx: ^4.8.1 - yaml: ^2.4.2 - peerDependenciesMeta: - jiti: - optional: true - postcss: - optional: true - tsx: - optional: true - yaml: - optional: true - postcss-nested@6.0.1: resolution: {integrity: sha512-mEp4xPMi5bSWiMbsgoPfcP74lsWLHkQbZc3sY+jWYd65CUwXrUaTp0fmNpa01ZcETKlIgUdFN/MpS2xZtqL9dQ==} engines: {node: '>=12.0'} @@ -7326,8 +6832,8 @@ packages: resolution: {integrity: sha512-PS08Iboia9mts/2ygV3eLpY5ghnUcfLV/EXTOW1E2qYxJKGGBUtNjN76FYHnMs36RmARn41bC0AZmn+rR0OVpQ==} engines: {node: ^10 || ^12 || >=14} - postcss@8.4.47: - resolution: {integrity: sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==} + postcss@8.4.32: + resolution: {integrity: sha512-D/kj5JNu6oo2EIy+XL/26JEDTlIbB8hw85G8StOE6L74RQAVVP5rej6wxCNqyMbR4RkPfqvezVbPw81Ngd6Kcw==} engines: {node: ^10 || ^12 || >=14} postgres-array@2.0.0: @@ -7365,8 +6871,8 @@ packages: postgres-range@1.1.3: resolution: {integrity: sha512-VdlZoocy5lCP0c/t66xAfclglEapXPCIVhqqJRncYpvbCgImF0w67aPKfbqUMr72tO2k5q0TdTZwCLjPTI6C9g==} - posthog-node@4.2.0: - resolution: {integrity: sha512-hgyCYMyzMvuF3qWMw6JvS8gT55v7Mtp5wKWcnDrw+nu39D0Tk9BXD7I0LOBp0lGlHEPaXCEVYUtviNKrhMALGA==} + posthog-node@4.0.0: + resolution: {integrity: sha512-jEZnNbgb/3FNk+gNwtTcyz3j+62zIN+UTPotONfacVXJnoI70KScSkKdIR+rvP9tA2kjBSoHQxGwJuizs27o9A==} engines: {node: '>=15.0.0'} prebuild-install@7.1.2: @@ -7374,6 +6880,10 @@ packages: engines: {node: '>=10'} hasBin: true + preferred-pm@3.1.2: + resolution: {integrity: sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==} + engines: {node: '>=10'} + prelude-ls@1.2.1: resolution: {integrity: sha512-vkcDPrRZo1QZLbn5RLGPpg/WmIQ65qoWWhcGKf/b5eplkkarX0m9z8ppCat4mlOqUsWpyNuYgO3VRyrYHSzX5g==} engines: {node: '>= 0.8.0'} @@ -7388,8 +6898,8 @@ packages: engines: {node: '>=10.13.0'} hasBin: true - prettier@3.3.3: - resolution: {integrity: sha512-i2tDNA0O5IrMO757lfrdQZCc2jPNDVntV0m/+4whiDfWaTKfMNgR7Qz0NAeGz/nRqF4m5/6CLzbP4/liHt12Ew==} + prettier@3.1.1: + resolution: {integrity: sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw==} engines: {node: '>=14'} hasBin: true @@ -7407,8 +6917,8 @@ packages: resolution: {integrity: sha512-cdGef/drWFoydD1JsMzuFf8100nZl+GT+yacc2bEced5f9Rjk4z+WtFUTBu9PhOi9j/jfmBPu0mMEY4wIdAF8A==} engines: {node: '>= 0.6.0'} - prom-client@15.1.3: - resolution: {integrity: sha512-6ZiOBfCywsD4k1BN9IX0uZhF+tJkV8q8llP64G5Hajs4JOeVLPCwpPVcpXy3BwYiUGgyJzsJJQeOIv7+hDSq8g==} + prom-client@15.1.0: + resolution: {integrity: sha512-cCD7jLTqyPdjEPBo/Xk4Iu8jxjuZgZJ3e/oET3L+ZwOuap/7Cw3dH/TJSsZKs1TQLZ2IHpIlRAKw82ef06kmMw==} engines: {node: ^16 || ^18 || >=20} promise@8.3.0: @@ -7457,8 +6967,8 @@ packages: resolution: {integrity: sha512-pMpnA0qRdFp32b1sJl1wOJNxZLQ2cbQx+k6tjNtZ8CpvVhNqEPRgivZ2WOUev2YMajecdH7ctUPDvEe87nariQ==} engines: {node: '>=6.0.0'} - qs@6.13.0: - resolution: {integrity: sha512-+38qI9SOr8tfZ4QmJNplMUxqjbe7LKvvZgWdExBOmd+egZTtjLB67Gu0HRX3u/XOq7UU2Nx6nsjvS16Z9uwfpg==} + qs@6.11.2: + resolution: {integrity: sha512-tDNIz22aBzCDxLtVH++VnTfzxlfeK5CbqohpSqpJgj1Wg/cQbStNAz3NuqCs5vV+pjBsK4x4pN9HlVh7rcYRiA==} engines: {node: '>=0.6'} qs@6.5.3: @@ -7471,6 +6981,10 @@ packages: quick-format-unescaped@4.0.4: resolution: {integrity: sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg==} + quick-lru@4.0.1: + resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} + engines: {node: '>=8'} + randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -7478,38 +6992,46 @@ packages: resolution: {integrity: sha512-y3bGgqKj3QBdxLbLkomlohkvsA8gdAiUQlSBJnBhfn+BPxg4bc62d8TcBW15wavDfgexCgccckhcZvywyQYPOw==} hasBin: true - react-countup@6.5.3: - resolution: {integrity: sha512-udnqVQitxC7QWADSPDOxVWULkLvKUWrDapn5i53HE4DPRVgs+Y5rr4bo25qEl8jSh+0l2cToJgGMx+clxPM3+w==} + react-countup@6.5.0: + resolution: {integrity: sha512-26JFHbUHsHxu8SetkJwWVIUEkaNnrj4P9msxNGC8tS4hGr1bngRzbwtJYOgXD2G/ItjaKJ3JfYKd85sw7qRVeA==} peerDependencies: react: '>= 16.3.0' - react-dom@18.3.1: - resolution: {integrity: sha512-5m4nQKp+rZRb09LNH59GM4BxTh9251/ylbKIbpe7TpGxfJ+9kv6BLkLBXIjjspbgbnIBNqlI23tRnTWT0snUIw==} + react-dom@18.2.0: + resolution: {integrity: sha512-6IMTriUmvsjHUjNtEDudZfuDQUoWXVxKHhlEGSk81n4YFS+r/Kl99wXiwlVXtPBtJenozv2P+hxDsw9eA7Xo6g==} peerDependencies: - react: ^18.3.1 + react: ^18.2.0 react-is@16.13.1: resolution: {integrity: sha512-24e6ynE2H+OKt4kqsOvNd8kBpV65zoxbA4BVsEOB3ARVWQki/DHzaUoC5KuON/BiccDaCCTZBuOcfZs70kR8bQ==} - react-is@18.3.1: - resolution: {integrity: sha512-/LLMVyas0ljjAtoYiPqYiL8VWXzUUdThrmU5+n20DZv+a+ClRoevUzw5JxU+Ieh5/c87ytoTBV9G1FiKfNJdmg==} + react-is@18.2.0: + resolution: {integrity: sha512-xWGDIW6x921xtzPkhiULtthJHoJvBbF3q26fzloPCK0hsvxtPVelvftw3zjbHWSkR2km9Z+4uxbDDK/6Zw9B8w==} react-native-fetch-api@3.0.0: resolution: {integrity: sha512-g2rtqPjdroaboDKTsJCTlcmtw54E25OjyaunUP0anOZn4Fuo2IKs8BVfe02zVggA/UysbmfSnRJIqtNkAgggNA==} - react-reconciler@0.29.2: - resolution: {integrity: sha512-zZQqIiYgDCTP/f1N/mAR10nJGrPD2ZR+jDSEsKWJHYC7Cm2wodlwbR3upZRdC3cjIjSlTLNVyO7Iu0Yy7t2AYg==} + react-reconciler@0.29.0: + resolution: {integrity: sha512-wa0fGj7Zht1EYMRhKWwoo1H9GApxYLBuhoAuXN0TlltESAjDssB+Apf0T/DngVqaMyPypDmabL37vw/2aRM98Q==} engines: {node: '>=0.10.0'} peerDependencies: - react: ^18.3.1 + react: ^18.2.0 - react@18.3.1: - resolution: {integrity: sha512-wS+hAgJShR0KhEvPJArfuPVN1+Hz1t0Y6n5jLrGQbkb4urgPE/0Rve+1kMB1v/oWgHgm4WIcV+i7F2pTVj+2iQ==} + react@18.2.0: + resolution: {integrity: sha512-/3IjMdb2L9QbBdWiW5e3P2/npwMBaU9mHCSCUzNln0ZCYbcfTsGbTJrU/kGemdH2IWmB2ioZ+zkxtmq6g09fGQ==} engines: {node: '>=0.10.0'} read-cache@1.0.0: resolution: {integrity: sha512-Owdv/Ft7IjOgm/i0xvNDZ1LrRANRfew4b2prF3OWMQLxLfu3bS8FVhCsrSCMK4lR56Y9ya+AThoTpDCTxCmpRA==} + read-pkg-up@7.0.1: + resolution: {integrity: sha512-zK0TB7Xd6JpCLmlLmufqykGE+/TlOePD6qKClNW7hHDKFh/J7/7gCWGR7joEQEW1bKq3a3yUZSObOoWLFQ4ohg==} + engines: {node: '>=8'} + + read-pkg@5.2.0: + resolution: {integrity: sha512-Ug69mNOpfvKDAc2Q8DRpMjjzdtrnv9HcSMX+4VsZxD1aZ6ZzrIE7rlzXBtWTyhULSMKg076AW6WR5iZpD0JiOg==} + engines: {node: '>=8'} + read-yaml-file@1.1.0: resolution: {integrity: sha512-VIMnQi/Z4HT2Fxuwg5KrY174U1VdUIASQVWXXyqtNRtxSr9IYkn1rsI6Tb6HsrHCmB7gVpNwX6JxPTHcH6IoTA==} engines: {node: '>=6'} @@ -7542,6 +7064,10 @@ packages: receptacle@1.3.2: resolution: {integrity: sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==} + redent@3.0.0: + resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} + engines: {node: '>=8'} + redeyed@2.1.1: resolution: {integrity: sha512-FNpGGo1DycYAdnrKFxCMmKYgo/mILAqtRYbkdQD8Ep/Hk2PQ5+aEAEx+IU713RTDmuBaH0c8P5ZozurNu5ObRQ==} @@ -7619,10 +7145,17 @@ packages: engines: {node: '>= 6'} deprecated: request has been deprecated, see https://github.com/request/request/issues/3142 + require-directory@2.1.1: + resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} + engines: {node: '>=0.10.0'} + require-from-string@2.0.2: resolution: {integrity: sha512-Xf0nWe6RseziFMu+Ap9biiUbmplq6S9/p+7w7YXP/JBHhrUDDUhwa+vANyubuqfZWTveU//DYVGsDG7RKL/vEw==} engines: {node: '>=0.10.0'} + require-main-filename@2.0.0: + resolution: {integrity: sha512-NKN5kMDylKuldxYLSUfrbo5Tuzh4hd+2E8NPPX02mZtn1VuREQToYe/ZdlJy+J3uCpfaiGF05e7B8W0iXbQHmg==} + requires-port@1.0.0: resolution: {integrity: sha512-KigOCHcocU3XODJxsu8i/j8T9tzT4adHiecwORRQ0ZZFcp7ahwXuRU1m+yuO90C5ZUyGeGfocHDI14M3L3yDAQ==} @@ -7653,10 +7186,6 @@ packages: resolution: {integrity: sha512-I9fPXU9geO9bHOt9pHHOhOkYerIMsmVaWB0rA2AI9ERh/+x/i7MV5HKBNrg+ljO5eoPVgCcnFuRjJ9uH6I/3eg==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} - restore-cursor@5.1.0: - resolution: {integrity: sha512-oMA2dcrw6u0YfxJQXm342bFKX/E4sG9rbTzO9ptUcR/e8A33cHuvStiYOwH7fszkZlZ1z/ta9AAoPk2F4qIOHA==} - engines: {node: '>=18'} - retimer@3.0.0: resolution: {integrity: sha512-WKE0j11Pa0ZJI5YIk0nflGI7SQsfl2ljihVy7ogh7DeQSeYAUi0ubZ/yEueGtDfUPk6GH5LRw1hBdLq4IwUBWA==} @@ -7664,8 +7193,8 @@ packages: resolution: {integrity: sha512-U9nH88a3fc/ekCF1l0/UP1IosiuIjyTh7hBvXVMHYgVcfGvt897Xguj2UOLDeI5BG2m7/uwyaLVT6fbtCwTyzw==} engines: {iojs: '>=1.0.0', node: '>=0.10.0'} - rfdc@1.4.1: - resolution: {integrity: sha512-q1b3N5QkRUWUl7iyylaaj3kOpIT0N2i9MqIEQXP73GVsN9cw3fdx8X63cEmWhJGi2PPCF23Ijp7ktmd39rawIA==} + rfdc@1.3.0: + resolution: {integrity: sha512-V2hovdzFbOi77/WajaSMXk2OLm+xNIeQdMMuB7icj7bk6zi2F8GGAxigcnDFpJHbNyNcgyJDiP+8nOrY5cZGrA==} rimraf@2.7.1: resolution: {integrity: sha512-uWjbaKIK3T1OSVptzX7Nl6PvQ3qAGtKEtVRjRuazjfL3Bx5eI409VZSqgND+4UNnmzLVdPj9FqFJNPqBZFve4w==} @@ -7677,8 +7206,9 @@ packages: deprecated: Rimraf versions prior to v4 are no longer supported hasBin: true - rimraf@5.0.10: - resolution: {integrity: sha512-l0OE8wL34P4nJH/H2ffoaniAokM2qSmrtXHmlpvYr5AVVX8msAyW0l8NVJFDxlSK4u3Uh/f41cQheDVdnYijwQ==} + rimraf@5.0.5: + resolution: {integrity: sha512-CqDakW+hMe/Bz202FPEymy68P+G50RfMQK+Qo5YUqc9SPipvbGjCGKd0RSKEelbsfQuw3g5NZDSrlZZAJurH1A==} + engines: {node: '>=14'} hasBin: true ripemd160@2.0.2: @@ -7695,8 +7225,8 @@ packages: robust-predicates@3.0.2: resolution: {integrity: sha512-IXgzBWvWQwE6PrDI05OvmXUIruQTcoMDzRsOd5CDvHCVLcLHMTSYvOK5Cm46kWqlV3yAbuSpBZdJ5oP5OUoStg==} - rollup@4.22.2: - resolution: {integrity: sha512-JWWpTrZmqQGQWt16xvNn6KVIUz16VtZwl984TKw0dfqqRpFwtLJYYk1/4BTgplndMQKWUk/yB4uOShYmMzA2Vg==} + rollup@4.9.2: + resolution: {integrity: sha512-66RB8OtFKUTozmVEh3qyNfH+b+z2RXBVloqO2KCC/pjFaGaHtxP9fVfOQKPSGXg2mElmjmxjW/fZ7iKrEpMH5Q==} engines: {node: '>=18.0.0', npm: '>=8.0.0'} hasBin: true @@ -7730,15 +7260,11 @@ packages: resolution: {integrity: sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g==} engines: {node: '>=10'} - safe-stable-stringify@2.5.0: - resolution: {integrity: sha512-b3rppTKm9T+PsVCBEOUR46GWI7fdOs00VKZ1+9c1EWDaDMvjQc6tUwuFyIprgGgTcWoVHSKrU8H31ZHA2e0RHA==} - engines: {node: '>=10'} - safer-buffer@2.1.2: resolution: {integrity: sha512-YZo3K82SD7Riyi0E1EQPojLz7kpepnSQI9IyPbHHg1XXXevb5dJI7tpyN2ADxGcQbHG7vcyRHk0cbwqcQriUtg==} - scheduler@0.23.2: - resolution: {integrity: sha512-UOShsPwz7NrMUqhR6t0hWjFduvOzbtv7toDH1/hIrfRNIDBnnBWd0CwJTGvTpngVlmwGCdP9/Zl/tVrDqcuYzQ==} + scheduler@0.23.0: + resolution: {integrity: sha512-CtuThmgHNg7zIZWAXi3AsyIzA3n4xx7aNyjwC2VJldO2LMVDhFK+63xGqq6CsJH4rTAt6/M+N4GhZiDYPx9eUw==} scroll-into-view-if-needed@3.1.0: resolution: {integrity: sha512-49oNpRjWRvnU8NyGVmUaYG4jtTkNonFZI86MmGRDqBphEK2EXT9gdEUoQPZhuBM8yWHxCWbobltqYO5M4XrUvQ==} @@ -7757,6 +7283,10 @@ packages: semver-compare@1.0.0: resolution: {integrity: sha512-YM3/ITh2MJ5MtzaM429anh+x2jiLVjqILF4m4oyQB18W7Ggea7BfqdH/wGMK7dDiMghv/6WG7znWMwUDzJiXow==} + semver@5.7.2: + resolution: {integrity: sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g==} + hasBin: true + semver@6.3.1: resolution: {integrity: sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==} hasBin: true @@ -7776,22 +7306,16 @@ packages: engines: {node: '>=10'} hasBin: true - semver@7.6.3: - resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} - engines: {node: '>=10'} - hasBin: true - sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} + set-blocking@2.0.0: + resolution: {integrity: sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==} + set-function-length@1.1.1: resolution: {integrity: sha512-VoaqjbBJKiWtg4yRcKBQ7g7wnGnLV3M8oLvVWwOk2PdYY6PEFegR1vezXR0tw6fZGF9csVakIRjrJiy2veSBFQ==} engines: {node: '>= 0.4'} - set-function-length@1.2.2: - resolution: {integrity: sha512-pgRc4hJ4/sNjWCSS9AmnS40x3bNMDTknHgL5UaMBTMyJnU90EgWh1Rz+MC9eFu4BuN/UwZjKQuY/1v3rM7HMfg==} - engines: {node: '>= 0.4'} - set-function-name@2.0.1: resolution: {integrity: sha512-tMNCiqYVkXIZgc2Hnoy2IvC/f8ezc5koaRFkCjrpWzGpCd3qbZXPzVy9MAZzK1ch/X0jvSkojys3oqJN0qCmdA==} engines: {node: '>= 0.4'} @@ -7826,10 +7350,6 @@ packages: side-channel@1.0.4: resolution: {integrity: sha512-q5XPytqFEIKHkGdiMIrY10mvLRvnQh42/+GoBlFW3b2LXLE2xxJpZFdm94we0BaoV3RwJyGqg5wS7epxTv0Zvw==} - side-channel@1.0.6: - resolution: {integrity: sha512-fDW/EZ6Q9RiO8eFG8Hj+7u/oW+XrPTIChwCOM2+th2A6OblDtYYIpve9m+KvI9Z4C9qSEXlaGR6bTEYHReuglA==} - engines: {node: '>= 0.4'} - siginfo@2.0.0: resolution: {integrity: sha512-ybx0WO1/8bSBLEWXZvEd7gMW3Sn3JFlW3TvX1nREbDLRNQNaeNN8WK0meBwPdAaOI7TtRRRJn/Es1zhrrCHu7g==} @@ -7846,8 +7366,8 @@ packages: simple-get@4.0.1: resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - simple-git-hooks@2.11.1: - resolution: {integrity: sha512-tgqwPUMDcNDhuf1Xf6KTUsyeqGdgKMhzaH4PAZZuzguOgTl5uuyeYe/8mWgAr6IBxB5V06uqEf6Dy37gIWDtDg==} + simple-git-hooks@2.9.0: + resolution: {integrity: sha512-waSQ5paUQtyGC0ZxlHmcMmD9I1rRXauikBwX31bX58l5vTOhCEcBC5Bi+ZDkPXTjDnZAF8TbCqKBY+9+sVPScw==} hasBin: true sisteransi@1.0.5: @@ -7881,18 +7401,23 @@ packages: resolution: {integrity: sha512-bSiSngZ/jWeX93BqeIAbImyTbEihizcwNjFoRUIY/T1wWQsfsm2Vw1agPKylXvQTU7iASGdHhyqRlqQzfz+Htg==} engines: {node: '>=18'} + smartwrap@2.0.2: + resolution: {integrity: sha512-vCsKNQxb7PnCNd2wY1WClWifAc2lwqsG8OaswpJkVJsvMGcnEntdTCDajZCkk93Ay1U3t/9puJmb525Rg5MZBA==} + engines: {node: '>=6'} + hasBin: true + snake-case@3.0.4: resolution: {integrity: sha512-LAOh4z89bGQvl9pFfNF8V146i7o7/CqFPbqzYgP+yYzDIDeS9HaNFtXABamRW+AQzEVODcvE79ljJ+8a9YSdMg==} - sonic-boom@3.8.1: - resolution: {integrity: sha512-y4Z8LCDBuum+PBP3lSV7RHrXscqksve/bi0as7mhwVnBW+/wUqKT/2Kb7um8yqcFy0duYbbPxzt89Zy2nOCaxg==} + sonic-boom@3.7.0: + resolution: {integrity: sha512-IudtNvSqA/ObjN97tfgNmOKyDOs4dNcg4cUUsHDebqsgb8wGBBwb31LIgShNO8fye0dFI52X1+tFoKKI6Rq1Gg==} sort-keys@5.0.0: resolution: {integrity: sha512-Pdz01AvCAottHTPQGzndktFNdbRA75BgOfeT1hH+AMnJFv8lynkPi42rfeEhpx1saTEI3YNMWxfqu0sFD1G8pw==} engines: {node: '>=12'} - source-map-js@1.2.1: - resolution: {integrity: sha512-UXWMKhLOwVKb728IUtQPXxfYU+usdybtUrK/8uGE8CQMvrhOpwvzDBwj0QhSL7MQc7vIsISBG8VQ8+IDQxpfQA==} + source-map-js@1.0.2: + resolution: {integrity: sha512-R0XvVJ9WusLiqTCEiGCmICCMplcCkIwwR11mOSD9CR5u+IXYdiseeEuXCVAjS54zqwkLcPNnmU4OeJ6tUrWhDw==} engines: {node: '>=0.10.0'} source-map-support@0.5.21: @@ -7916,6 +7441,18 @@ packages: spawndamnit@2.0.0: resolution: {integrity: sha512-j4JKEcncSjFlqIwU5L/rp2N5SIPsdxaRsIv678+TZxZ0SRDJTm8JrxJMjE/XuiEZNEir3S8l0Fa3Ke339WI4qA==} + spdx-correct@3.2.0: + resolution: {integrity: sha512-kN9dJbvnySHULIluDHy32WHRUu3Og7B9sbY7tsFLctQkIqnMh3hErYgdMjTYuqmcXX+lK5T1lnUt3G7zNswmZA==} + + spdx-exceptions@2.3.0: + resolution: {integrity: sha512-/tTrYOC7PPI1nUAgx34hUpqXuyJG+DTHJTnIULG4rDygi4xu/tfgmq1e1cIRwRzwZgo4NLySi+ricLkZkw4i5A==} + + spdx-expression-parse@3.0.1: + resolution: {integrity: sha512-cbqHunsQWnJNE6KhVSMsMeH5H/L9EpymbzqTQ3uLwNCLZ1Q481oWaofqH7nO6V07xlXwY6PhQdQ2IedWx/ZK4Q==} + + spdx-license-ids@3.0.16: + resolution: {integrity: sha512-eWN+LnM3GR6gPu35WxNgbGl8rmY1AEmoMDvL/QD6zYmPWgywxWqJWNdLGT+ke8dKNWrcYgYjPpG5gbTfghP8rw==} + speech-rule-engine@4.0.7: resolution: {integrity: sha512-sJrL3/wHzNwJRLBdf6CjJWIlxC04iYKkyXvYSVsWVOiC2DSkHmxsqOhEeMsBA9XK+CHuNcsdkbFDnoUfAsmp9g==} hasBin: true @@ -7956,6 +7493,9 @@ packages: stream-to-it@0.2.4: resolution: {integrity: sha512-4vEbkSs83OahpmBybNJXlJd7d6/RxzkkSdT3I0mnGt79Xd2Kk+e1JqbvAvsQfCeKj3aKb0QIWkyK3/n0j506vQ==} + stream-transform@2.1.3: + resolution: {integrity: sha512-9GHUiM5hMiCi6Y03jD2ARC1ettBXkQBoQAe7nJsPknnI0ow10aXjTnew8QtYQmLjzn974BnmWEAJgCY6ZP1DeQ==} + streamsearch@1.1.0: resolution: {integrity: sha512-Mcc5wHehp9aXz1ax6bZUyY5afg9u2rv5cqQI3mRrYkGC8rW2hM02jWuwjtL++LS5qinSyhj2QfLyNsuc+VsExg==} engines: {node: '>=10.0.0'} @@ -7976,8 +7516,8 @@ packages: resolution: {integrity: sha512-k01swCJAgQmuADB0YIc+7TuatfNvTBVOoaUWJjTB9R4VJzR5vNWzf5t42ESVZFPS8xTySF7CAdV4t/aaIm3UnQ==} engines: {node: '>=16'} - string-width@7.2.0: - resolution: {integrity: sha512-tsaTIkKW9b4N+AEj+SVA+WhJzV7/zMhcSu78mLKWSk7cXMOSHsBKFWUs0fWwq8QyK3MgJBQRX6Gbi4kYbdvGkQ==} + string-width@7.0.0: + resolution: {integrity: sha512-GPQHj7row82Hjo9hKZieKcHIhaAIKOJvFSIZXuCU9OASVZrMNUaZuz++SPVrBjnLsnk4k+z9f2EIypgxf2vNFw==} engines: {node: '>=18'} string.prototype.matchall@4.0.10: @@ -8041,6 +7581,10 @@ packages: resolution: {integrity: sha512-q8d4ue7JGEiVcypji1bALTos+0pWtyGlivAWyPuTkHzuTCJqrK9sWxYQZUq6Nq3cuyv3bm734IhHvHtGGURU6A==} engines: {node: '>=6.5.0', npm: '>=3'} + strip-indent@3.0.0: + resolution: {integrity: sha512-laJTa3Jb+VQpaC6DseHhF7dXVqHTfJPCRDaEbid/drOhgitgYku/letMUqOXFoWV0zIIUbjpdH2t+tYj4bQMRQ==} + engines: {node: '>=8'} + strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -8049,8 +7593,8 @@ packages: resolution: {integrity: sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig==} engines: {node: '>=8'} - strip-literal@2.1.0: - resolution: {integrity: sha512-Op+UycaUt/8FbN/Z2TWPBLge3jWrP3xj10f3fnYxf052bKuS3EKs1ZQcVGjnEMdsNVAM+plXRdmjrZ/KgG3Skw==} + strip-literal@1.3.0: + resolution: {integrity: sha512-PugKzOsyXpArk0yWmUwqOZecSO0GH0bPoctLcqNDH9J04pVW3lflYE0ujElBGTloevcxF5MofAOZ7C5l2b+wLg==} stubborn-fs@1.2.5: resolution: {integrity: sha512-H2N9c26eXjzL/S/K+i/RHHcFanE74dptvvjM8iwzwbVcWY/zjBbgRqF3K0DY4+OD+uTTASTBvDoxPDaPN02D7g==} @@ -8118,16 +7662,16 @@ packages: sync-rpc@1.3.6: resolution: {integrity: sha512-J8jTXuZzRlvU7HemDgHi3pGnh/rkoqR/OZSjhTyyZrEkkYQbk7Z33AXp37mkPfPpfdOuj7Ex3H/TJM1z48uPQw==} - tailwind-merge@2.5.2: - resolution: {integrity: sha512-kjEBm+pvD+6eAwzJL2Bi+02/9LFLal1Gs61+QB7HvTfQQ0aXwC5LGT8PEt1gS0CWKktKe6ysPTAy3cBC5MeiIg==} + tailwind-merge@2.1.0: + resolution: {integrity: sha512-l11VvI4nSwW7MtLSLYT4ldidDEUwQAMWuSHk7l4zcXZDgnCRa0V3OdCwFfM7DCzakVXMNRwAeje9maFFXT71dQ==} tailwindcss-animate@1.0.7: resolution: {integrity: sha512-bl6mpH3T7I3UFxuvDEXLxy/VuFxBk5bbzplh7tXI68mwMokNYd1t9qPBHlnyTwfa4JGC4zP516I1hYYtQ/vspA==} peerDependencies: tailwindcss: '>=3.0.0 || insiders' - tailwindcss@3.4.12: - resolution: {integrity: sha512-Htf/gHj2+soPb9UayUNci/Ja3d8pTmu9ONTfh4QY8r3MATTZOzmv6UYWF7ZwikEIC8okpfqmGqrmDehua8mF8w==} + tailwindcss@3.3.5: + resolution: {integrity: sha512-5SEZU4J7pxZgSkv7FP1zY8i2TIAOooNZ1e/OGtxIEv6GltpoiXUqWvLy89+a10qYTB1N5Ifkuw9lqQkN9sscvA==} engines: {node: '>=14.0.0'} hasBin: true @@ -8149,8 +7693,8 @@ packages: resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} engines: {node: '>=6'} - tar@6.2.1: - resolution: {integrity: sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==} + tar@6.2.0: + resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} tdigest@0.1.2: @@ -8174,8 +7718,8 @@ packages: thenify@3.3.1: resolution: {integrity: sha512-RVZSIV5IG10Hk3enotrhvz0T9em6cyHBLkH/YAZuKqd8hRkKhSfCGIcP2KUY0EPxndzANBmNllzWPwak+bheSw==} - thread-stream@2.7.0: - resolution: {integrity: sha512-qQiRWsU/wvNolI6tbbCKd9iKaTnCXsTwVxhhKM6nctPdujTyztjlbUkUTUymidWcMnZ5pWR0ej4a0tjsW021vw==} + thread-stream@2.4.1: + resolution: {integrity: sha512-d/Ex2iWd1whipbT681JmTINKw0ZwOUBZm7+Gjs64DHuX34mmw8vJL2bFAaNacaW72zYiTJxSHi5abUuOi5nsfg==} through@2.3.8: resolution: {integrity: sha512-w89qg7PI8wAdvX60bMDP+bFoD5Dvhm9oLheFp5O4a2QF0cSBGsBX4qZmadPMvVqlLJBBci+WqGGOAPvcDeNSVg==} @@ -8183,19 +7727,15 @@ packages: timeout-abort-controller@2.0.0: resolution: {integrity: sha512-2FAPXfzTPYEgw27bQGTHc0SzrbmnU2eso4qo172zMLZzaGqeu09PFa5B2FCUHM1tflgRqPgn5KQgp6+Vex4uNA==} - tinybench@2.9.0: - resolution: {integrity: sha512-0+DUvqWMValLmha6lr4kD8iAMK1HzV0/aKnCtWb9v9641TnP/MFb7Pc2bxoxQjTXAErryXVgUOfv2YqNllqGeg==} + tinybench@2.5.1: + resolution: {integrity: sha512-65NKvSuAVDP/n4CqH+a9w2kTlLReS9vhsAP06MWx+/89nMinJyB2icyl58RIcqCmIggpojIGeuJGhjU1aGMBSg==} - tinyglobby@0.2.6: - resolution: {integrity: sha512-NbBoFBpqfcgd1tCiO8Lkfdk+xrA7mlLR9zgvZcZWQQwU63XAfUePyd6wZBaU93Hqw347lHnwFzttAkemHzzz4g==} - engines: {node: '>=12.0.0'} - - tinypool@0.8.4: - resolution: {integrity: sha512-i11VH5gS6IFeLY3gMBQ00/MmLncVP7JLXOw1vlgkytLmJK7QnEr7NXf0LBdxfmNPAeyetukOk0bOYrJrFGjYJQ==} + tinypool@0.8.1: + resolution: {integrity: sha512-zBTCK0cCgRROxvs9c0CGK838sPkeokNGdQVUUwHAbynHFlmyJYj825f/oRs528HaIJ97lo0pLIlDUzwN+IorWg==} engines: {node: '>=14.0.0'} - tinyspy@2.2.1: - resolution: {integrity: sha512-KYad6Vy5VDWV4GH3fjpseMQ/XU2BhIYP7Vzd0LG44qRWm/Yt2WCOTicFdvmgo6gWaqooMQCawTtILVQJupKu7A==} + tinyspy@2.2.0: + resolution: {integrity: sha512-d2eda04AN/cPOR89F7Xv5bK/jrQEhmcLFe6HFldoeO9AJtps+fqEnh486vnT/8y4bw38pSyxDcTCAq+Ks2aJTg==} engines: {node: '>=14.0.0'} title@3.5.3: @@ -8213,9 +7753,9 @@ packages: resolution: {integrity: sha512-jRCJlojKnZ3addtTOjdIqoRuPEKBvNXcGYqzO6zWZX8KfKEpnGY5jfggJQ3EjKuu8D4bJRr0y+cYJFmYbImXGw==} engines: {node: '>=0.6.0'} - tmp@0.2.3: - resolution: {integrity: sha512-nZD7m9iCPC5g0pYmcaxogYKggSfLsdxl8of3Q/oIbqCqLLIO9IAF0GWjX1z9NZRHPiXv8Wex4yDCaZsgEw0Y8w==} - engines: {node: '>=14.14'} + tmp@0.2.1: + resolution: {integrity: sha512-76SUhtfqR2Ijn+xllcI5P1oyannHNHByD80W1q447gU3mp9G9PSpGdWmjUOHRDPiHYacIk66W7ubDTuPF3BEtQ==} + engines: {node: '>=8.17.0'} to-buffer@1.1.1: resolution: {integrity: sha512-lx9B5iv7msuFYE3dytT+KE5tap+rNYw+K4jVkb9R/asAb+pbBSM17jtunHplhBe6RRJdZx3Pn2Jph24O32mOVg==} @@ -8245,6 +7785,10 @@ packages: trim-lines@3.0.1: resolution: {integrity: sha512-kRj8B+YHZCc9kQYdWfJB2/oUl9rA99qbowYYBtr4ui4mZyAQ2JpvVBd/6U2YloATfqBhBTSMhTpgBHtU0Mf3Rg==} + trim-newlines@3.0.1: + resolution: {integrity: sha512-c1PTsA3tYrIsLGkJkzHF+w9F2EyxfXGo4UyJc4pFL++FMjnq0HJS69T3M7d//gKrFKwy429bouPescbjecU+Zw==} + engines: {node: '>=8'} + trough@2.1.0: resolution: {integrity: sha512-AqTiAOLcj85xS7vQ8QkAV41hPDIJ71XJB4RCUrzo/1GM2CQwhkJGaf9Hgr7BOugMRpgGUrqRg/DrBDl4H40+8g==} @@ -8254,12 +7798,6 @@ packages: peerDependencies: typescript: '>=4.2.0' - ts-api-utils@1.3.0: - resolution: {integrity: sha512-UQMIo7pb8WRomKR1/+MFVLTroIvDVtMX3K6OUir8ynLyzB8Jeriont2bTAtmNPa1ekAgN7YPDyf6V+ygrdU+eQ==} - engines: {node: '>=16'} - peerDependencies: - typescript: '>=4.2.0' - ts-dedent@2.2.0: resolution: {integrity: sha512-q5W7tVM71e2xjHZTlgfTDoPF/SmqKG5hddq9SzR49CH2hayqRKJtQ4mtRlSxKaJlR/+9rEM+mnBHf7I2/BQcpQ==} engines: {node: '>=6.10'} @@ -8281,8 +7819,8 @@ packages: '@swc/wasm': optional: true - tsconfck@3.1.3: - resolution: {integrity: sha512-ulNZP1SVpRDesxeMLON/LtWM8HIgAJEIVpVVhBM6gsmvQ8+Rh+ZG7FWGvHh7Ah3pRABwVJWklWCr/BTZSv0xnQ==} + tsconfck@3.0.1: + resolution: {integrity: sha512-7ppiBlF3UEddCLeI1JRx5m2Ryq+xk4JrZuq4EuYXykipebaq1dV0Fhgr1hb7CkmHt32QSgOZlcqVLEtHBG4/mg==} engines: {node: ^18 || >=20} hasBin: true peerDependencies: @@ -8297,11 +7835,8 @@ packages: tslib@2.6.2: resolution: {integrity: sha512-AEYxH93jGFPn/a2iVAwW87VuUIkR1FVUKB77NwMF7nBTDkDrrT/Hpt/IrCJ0QXhW27jTBDcf5ZY7w6RiqTMw2Q==} - tslib@2.7.0: - resolution: {integrity: sha512-gLXCKdN1/j47AiHiOkJN69hJmcbGTHI0ImLmbYLHykhgeN0jVGola9yVjFgzCUklsZQMW55o+dW7IXv3RCXDzA==} - - tsup@8.3.0: - resolution: {integrity: sha512-ALscEeyS03IomcuNdFdc0YWGVIkwH1Ws7nfTbAPuoILvEV2hpGQAY72LIOjglGo4ShWpZfpBqP/jpQVCzqYQag==} + tsup@8.0.1: + resolution: {integrity: sha512-hvW7gUSG96j53ZTSlT4j/KL0q1Q2l6TqGBFc6/mu/L46IoNWqLLUzLRLP1R8Q7xrJTmkDxxDoojV5uCVs1sVOg==} engines: {node: '>=18'} hasBin: true peerDependencies: @@ -8319,6 +7854,11 @@ packages: typescript: optional: true + tty-table@4.2.3: + resolution: {integrity: sha512-Fs15mu0vGzCrj8fmJNP7Ynxt5J7praPXqFN0leZeZBXJwkMxv9cb2D454k1ltrtUSJbZ4yH4e0CynsHLxmUfFA==} + engines: {node: '>=8.0.0'} + hasBin: true + tunnel-agent@0.6.0: resolution: {integrity: sha512-McnNiV1l8RYeY8tBgEpuodCC1mLUdbSN+CYBL7kJsJNInOP8UjDDEwdk6Mw60vdLLrr5NHKZhMAOSrR2NZuQ+w==} @@ -8329,14 +7869,18 @@ packages: resolution: {integrity: sha512-XleUoc9uwGXqjWwXaUTZAmzMcFZ5858QA2vvx1Ur5xIcixXIP+8LnFDgRplU30us6teqdlskFfu+ae4K79Ooew==} engines: {node: '>= 0.8.0'} - type-detect@4.1.0: - resolution: {integrity: sha512-Acylog8/luQ8L7il+geoSxhEkazvkslg7PSNKOX59mbB9cOveP5aq9h74Y7YU8yDpJwetzQQrfIwtf4Wp4LKcw==} + type-detect@4.0.8: + resolution: {integrity: sha512-0fr/mIH1dlO+x7TlcMy+bIDqKPsw/70tVyeHW787goQjhmqaZe10uwLujubK9q9Lg6Fiho1KUKDYz0Z7k7g5/g==} engines: {node: '>=4'} type-fest@0.12.0: resolution: {integrity: sha512-53RyidyjvkGpnWPMF9bQgFtWp+Sl8O2Rp13VavmJgfAP9WWG6q6TkrKU8iyJdnwnfgHI6k2hTlgqH4aSdjoTbg==} engines: {node: '>=10'} + type-fest@0.13.1: + resolution: {integrity: sha512-34R7HTnG0XIJcBSn5XhDd7nNFPRcXYRZrBB2O2jdKqYODldSzBAqzsWoZYYvduky73toYS/ESqxPvkDf/F0XMg==} + engines: {node: '>=10'} + type-fest@0.20.2: resolution: {integrity: sha512-Ne+eE4r0/iWnpAxD852z3A+N0Bt5RN//NjJwRd2VFHEmrywxf5vsZlh4R6lixl6B+wz/8d+maTSAkN1FIkI3LQ==} engines: {node: '>=10'} @@ -8345,10 +7889,18 @@ packages: resolution: {integrity: sha512-t0rzBq87m3fVcduHDUFhKmyyX+9eo6WQjZvf51Ea/M0Q7+T374Jp1aUiyUl0GKxp8M/OETVHSDvmkyPgvX+X2w==} engines: {node: '>=10'} + type-fest@0.6.0: + resolution: {integrity: sha512-q+MB8nYR1KDLrgr4G5yemftpMC7/QLqVndBmEEdqzmNj5dcFOO4Oo8qlwZE3ULT3+Zim1F8Kq4cBnikNhlCMlg==} + engines: {node: '>=8'} + type-fest@0.7.1: resolution: {integrity: sha512-Ne2YiiGN8bmrmJJEuTWTLJR32nh/JdL1+PSicowtNb0WFpn59GK8/lfD61bVtzguz7b3PBt74nxpv/Pw5po5Rg==} engines: {node: '>=8'} + type-fest@0.8.1: + resolution: {integrity: sha512-4dbzIzqvjtgiM5rw1k5rEHtBANKmdudhGyBEajN01fEyhaAIhsoKNy6y7+IN93IfpFtwY9iqi7kD+xwKhQsNJA==} + engines: {node: '>=8'} + type-fest@1.4.0: resolution: {integrity: sha512-yGSza74xk0UG8k+pLh5oeoYirvIiWo5t0/o3zHHAO2tRDiZcxWP7fywNlXhqb6/r6sWvwi+RsyQMWhVLe4BVuA==} engines: {node: '>=10'} @@ -8384,13 +7936,13 @@ packages: engines: {node: '>=12.20'} hasBin: true - typescript@5.6.2: - resolution: {integrity: sha512-NW8ByodCSNCwZeghjN3o+JX5OFH0Ojg6sadjEKY4huZ52TqbJTJnDo5+Tw98lSy63NZvi4n+ez5m2u5d4PkZyw==} + typescript@5.3.3: + resolution: {integrity: sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw==} engines: {node: '>=14.17'} hasBin: true - ufo@1.5.4: - resolution: {integrity: sha512-UsUk3byDzKd04EyoZ7U4DOlxQaD14JUKQl6/P7wiX4FNvUfm3XL246n9W5AmqwW5RSFJ27NAuM0iLscAOYUiGQ==} + ufo@1.3.2: + resolution: {integrity: sha512-o+ORpgGwaYQXgqGDwd+hkS4PuZ3QnmqMMxRuajK/a38L6fTpcE5GPIfrf+L/KemFzfUpeUQc1rRS1iDBozvnFA==} uint8array-extras@0.3.0: resolution: {integrity: sha512-erJsJwQ0tKdwuqI0359U8ijkFmfiTcq25JvvzRVc1VP+2son1NJRXhxcAKJmAW3ajM8JSGAfsAXye8g4s+znxA==} @@ -8402,8 +7954,8 @@ packages: unbox-primitive@1.0.2: resolution: {integrity: sha512-61pPlCD9h51VoreyJ0BReideM3MDKMKnh6+V9L08331ipq6Q8OFXZYiqP6n/tbHx4s5I9uRhcye6BrbkizkBDw==} - undici-types@6.19.8: - resolution: {integrity: sha512-ve2KP6f/JnbPBFyobGHuerC9g1FYGn/F8n1LWTwNxCEzd6IfqTwUQcNXgEtmmQ6DlRrC1hrSrBnCZPokRrDHjw==} + undici-types@5.26.5: + resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} unicode-canonical-property-names-ecmascript@2.0.0: resolution: {integrity: sha512-yY5PpDlfVIU5+y/BSCxAJRBIS1Zc2dDG3Ujq+sR0U+JjUevW2JhocOF+soROYDSaAezOzOKuyyixhD6mBknSmQ==} @@ -8421,10 +7973,6 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} - unicorn-magic@0.1.0: - resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} - engines: {node: '>=18'} - unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} @@ -8493,8 +8041,8 @@ packages: resolution: {integrity: sha512-gptHNQghINnc/vTGIk0SOFGFNXw7JVrlRUtConJRlvaw6DuX0wO5Jeko9sWrMBhh+PsYAZ7oXAiOnf/UKogyiw==} engines: {node: '>= 10.0.0'} - update-browserslist-db@1.1.0: - resolution: {integrity: sha512-EdRAaAyk2cUE1wOf2DkEhzxqOQvFOoRJFNS6NeyJ01Gp2beMRpBAINjM2iDXE3KCuKhwnvHIQCJm6ThL2Z+HzQ==} + update-browserslist-db@1.0.13: + resolution: {integrity: sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg==} hasBin: true peerDependencies: browserslist: '>= 4.21.0' @@ -8544,8 +8092,11 @@ packages: v8-compile-cache-lib@3.0.1: resolution: {integrity: sha512-wa7YjyUGfNZngI/vtK0UHAN+lgDCxBPCylVXGp0zu59Fz5aiGtNXaq3DhIov063MorB+VfufLh3JlF2KdTK3xg==} - validate-npm-package-name@5.0.1: - resolution: {integrity: sha512-OljLrQ9SQdOUqTaQxqL5dEfZWrXExyyWsozYlAWFawPVNuD83igl7uJD2RTkNMbniIYgt8l81eCJGIdQF7avLQ==} + validate-npm-package-license@3.0.4: + resolution: {integrity: sha512-DpKm2Ui/xN7/HQKCtpZxoRWBhZ9Z0kqtygG8XCgNQ8ZlDnxuQmWhj566j8fN4Cu3/JmbhsDo7fcAJq4s9h27Ew==} + + validate-npm-package-name@5.0.0: + resolution: {integrity: sha512-YuKoXDAhBYxY7SfOKxHBDoSyENFeW5VvIIQp2TGQuit8gpK6MnWaQelBKxso72DoxTZfZdcP3W90LqpSkgPzLQ==} engines: {node: ^14.17.0 || ^16.13.0 || >=18.0.0} value-or-promise@1.0.12: @@ -8582,14 +8133,6 @@ packages: typescript: optional: true - viem@2.21.10: - resolution: {integrity: sha512-n+BKNabWI0k2i7PB4UEdxgHHpQmMeDk+2X9093l/yU0NLUjIgiazybfD1BksGwbiIRk/WXr+aoRqKOExxRDxWA==} - peerDependencies: - typescript: '>=5.0.4' - peerDependenciesMeta: - typescript: - optional: true - viem@2.21.3: resolution: {integrity: sha512-WwOEsoiJ4v1zHf1OeKdtWth+chMyY/yZbHRLidhZEr0yFsOjTXkyfuvFp5ZykjRv9EtzDr2C6K/MU26CjMkSUw==} peerDependencies: @@ -8598,21 +8141,26 @@ packages: typescript: optional: true - vite-node@1.6.0: - resolution: {integrity: sha512-de6HJgzC+TFzOu0NTC4RAIsyf/DY/ibWDYQUcuEA84EMHhcefTUGkjFHKKEJhQN4A+6I0u++kr3l36ZF2d7XRw==} + vite-node@1.0.2: + resolution: {integrity: sha512-h7BbMJf46fLvFW/9Ygo3snkIBEHFh6fHpB4lge98H5quYrDhPFeI3S0LREz328uqPWSnii2yeJXktQ+Pmqk5BQ==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true - vite-tsconfig-paths@4.3.2: - resolution: {integrity: sha512-0Vd/a6po6Q+86rPlntHye7F31zA2URZMbH8M3saAZ/xR9QoGN/L21bxEGfXdWmFdNkqPpRdxFT7nmNe12e9/uA==} + vite-node@1.1.1: + resolution: {integrity: sha512-2bGE5w4jvym5v8llF6Gu1oBrmImoNSs4WmRVcavnG2me6+8UQntTqLiAMFyiAobp+ZXhj5ZFhI7SmLiFr/jrow==} + engines: {node: ^18.0.0 || >=20.0.0} + hasBin: true + + vite-tsconfig-paths@4.3.1: + resolution: {integrity: sha512-cfgJwcGOsIxXOLU/nELPny2/LUD/lcf1IbfyeKTv2bsupVbTH/xpFtdQlBmIP1GEK2CjjLxYhFfB+QODFAx5aw==} peerDependencies: vite: '*' peerDependenciesMeta: vite: optional: true - vite@5.4.7: - resolution: {integrity: sha512-5l2zxqMEPVENgvzTuBpHer2awaetimj2BGkhBPdnwKbPNOlHsODU+oiazEZzLK7KhAnOrO+XGYJYn4ZlUhDtDQ==} + vite@5.0.10: + resolution: {integrity: sha512-2P8J7WWgmc355HUMlFrwofacvr98DAjoE52BfdbwQtyLH06XKwaL/FMnmKM2crF0iX4MpmMKoDlNCB1ok7zHCw==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: @@ -8620,7 +8168,6 @@ packages: less: '*' lightningcss: ^1.21.0 sass: '*' - sass-embedded: '*' stylus: '*' sugarss: '*' terser: ^5.4.0 @@ -8633,8 +8180,6 @@ packages: optional: true sass: optional: true - sass-embedded: - optional: true stylus: optional: true sugarss: @@ -8642,15 +8187,15 @@ packages: terser: optional: true - vitest@1.6.0: - resolution: {integrity: sha512-H5r/dN06swuFnzNFhq/dnz37bPXnq8xB2xB5JOVk8K09rUtoeNN+LHWkoQ0A/i3hvbUKKcCei9KpbxqHMLhLLA==} + vitest@1.0.2: + resolution: {integrity: sha512-F3NVwwpXfRSDnJmyv+ALPwSRVt0zDkRRE18pwUHSUPXAlWQ47rY1dc99ziMW5bBHyqwK2ERjMisLNoef64qk9w==} engines: {node: ^18.0.0 || >=20.0.0} hasBin: true peerDependencies: '@edge-runtime/vm': '*' '@types/node': ^18.0.0 || >=20.0.0 - '@vitest/browser': 1.6.0 - '@vitest/ui': 1.6.0 + '@vitest/browser': ^1.0.0 + '@vitest/ui': ^1.0.0 happy-dom: '*' jsdom: '*' peerDependenciesMeta: @@ -8677,8 +8222,8 @@ packages: web-namespaces@2.0.1: resolution: {integrity: sha512-bKr1DkiNa2krS7qxNtdrtHAmzuYGFQLiQ13TsorsdT6ULTkPLKuu5+GsFpDlg6JFjUTwX2DyhMPG2be8uPrqsQ==} - web-streams-polyfill@3.3.3: - resolution: {integrity: sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw==} + web-streams-polyfill@3.2.1: + resolution: {integrity: sha512-e0MO3wdXWKrLbL0DgGnUV7WHVuw9OUvL4hjgnPkIeEvESk74gAITi5G606JtZPp39cd8HA9VQzCIvA49LpPN5Q==} engines: {node: '>= 8'} web-worker@1.2.0: @@ -8695,8 +8240,8 @@ packages: webauthn-p256@0.0.5: resolution: {integrity: sha512-drMGNWKdaixZNobeORVIqq7k5DsRC9FnG201K2QjeOoQLmtSDaSsVZdkg6n5jUALJKcAG++zBPJXmv6hy0nWFg==} - webcrypto-core@1.8.0: - resolution: {integrity: sha512-kR1UQNH8MD42CYuLzvibfakG5Ew5seG85dMMoAM/1LqvckxaF6pUiidLuraIu4V+YCIFabYecUZAW0TuxAoaqw==} + webcrypto-core@1.7.7: + resolution: {integrity: sha512-7FjigXNsBfopEj+5DV2nhNpfic2vumtjjgPmeDKk45z+MJwXKKfhPB7118Pfzrmh4jqOMST6Ch37iPAHoImg5g==} webidl-conversions@3.0.1: resolution: {integrity: sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==} @@ -8710,8 +8255,8 @@ packages: whatwg-url@7.1.0: resolution: {integrity: sha512-WUu7Rg1DroM7oQvGWfOiAK21n74Gg+T4elXEQYkOhtyLeWiJFoOGLXPKI/9gzIie9CtwVLm8wtw6YJdKyxSjeg==} - when-exit@2.1.3: - resolution: {integrity: sha512-uVieSTccFIr/SFQdFWN/fFaQYmV37OKtuaGphMAzi4DmmUlrvRBJW5WSLkHyjNQY/ePJMz3LoiX9R3yy1Su6Hw==} + when-exit@2.1.2: + resolution: {integrity: sha512-u9J+toaf3CCxCAzM/484qNAxQE75rFdVgiFEEV8Xps2gzYhf0tx73s1WXDQhkwV17E3MxRMz40m7Ekd2/121Lg==} which-boxed-primitive@1.0.2: resolution: {integrity: sha512-bwZdv0AKLpplFY2KZRX6TvyuN7ojjr7lwkg6ml0roIy9YeuSr7JS372qlNW18UQYzgYK9ziGcerWqZOmEn9VNg==} @@ -8723,6 +8268,13 @@ packages: which-collection@1.0.1: resolution: {integrity: sha512-W8xeTUwaln8i3K/cY1nGXzdnVZlidBcagyNFtBdD5kxnb4TvGKR7FfSIS3mYpwWS1QUCutfKz8IY8RjftB0+1A==} + which-module@2.0.1: + resolution: {integrity: sha512-iBdZ57RDvnOR9AGBhML2vFZf7h8vmBjhoaZqODJBFWHVtKkDmKuHai3cx5PgVMrX5YDNp27AofYbAwctSS+vhQ==} + + which-pm@2.0.0: + resolution: {integrity: sha512-Lhs9Pmyph0p5n5Z3mVnN0yWcbQYUAD7rbQUiMsQxOJ3T57k7RFe35SUwWMf7dsbDZks1uOmw4AecB/JMDj3v/w==} + engines: {node: '>=8.15'} + which-typed-array@1.1.13: resolution: {integrity: sha512-P5Nra0qjSncduVPEAr7xhoF5guty49ArDTwzJ/yNuPIbZppyRxFQsRCWrocxIY+CnMVG+qfbU2FmDKyvSGClow==} engines: {node: '>= 0.4'} @@ -8736,8 +8288,8 @@ packages: engines: {node: '>= 8'} hasBin: true - why-is-node-running@2.3.0: - resolution: {integrity: sha512-hUrmaWBdVDcxvYqnyh09zunKzROWjbZTiNy8dBEjkS7ehEDQibXJ7XvlmtbwuTclUiIyN+CyXQD4Vmko8fNm8w==} + why-is-node-running@2.2.2: + resolution: {integrity: sha512-6tSwToZxTOcotxHeA+qGCq1mVzKR3CwcJGmVcY+QE8SHy6TnpFnh8PAvPNHYr7EcuVeG0QSMxtYCuO1ta/G/oA==} engines: {node: '>=8'} hasBin: true @@ -8752,13 +8304,13 @@ packages: resolution: {integrity: sha512-o0cyEG0e8GPzT4iGHphIOh0cJOV8fivsXxddQasHPHfoZf1ZexrfeA21w2NaEN1RHE+fXlfISmOE8R9N3u3Qig==} engines: {node: '>=12'} - word-wrap@1.2.5: - resolution: {integrity: sha512-BN22B5eaMMI9UMtjrGd5g5eCYPpCPDUy0FJXbYsaT5zYxjFOckS53SQDE3pWkVoWpHXVb3BrYcEN4Twa55B5cA==} - engines: {node: '>=0.10.0'} - wordwrap@1.0.0: resolution: {integrity: sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q==} + wrap-ansi@6.2.0: + resolution: {integrity: sha512-r6lPcBGxZXlIcymEu7InxDMhdW0KDxpLgoFLcguasxCaJ/SOIZwINatK9KY/tf+ZrlywOKU0UDj3ATXUBfxJXA==} + engines: {node: '>=8'} + wrap-ansi@7.0.0: resolution: {integrity: sha512-YVGIj2kamLSTxw6NsZjoBxfSwsn0ycdesmc4p+Q21c5zPuZ1pl+NfxVdxPtdHvmNVOQ6XSYG4AUtyt/Fi7D16Q==} engines: {node: '>=10'} @@ -8774,8 +8326,8 @@ packages: wrappy@1.0.2: resolution: {integrity: sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ==} - ws@7.5.10: - resolution: {integrity: sha512-+dbF1tHwZpXcbOJdVOkzLDxZP1ailvSxM6ZweXTegylPny803bFhA+vqBYw4s31NSAk4S2Qz+AKXK9a4wkdjcQ==} + ws@7.5.9: + resolution: {integrity: sha512-F+P9Jil7UiSKSkppIiD94dN07AwvFixvLIj1Og1Rl9GGMuNipJnV9JzjD6XuqmAeiswGvUmNLjr5cFuXwNS77Q==} engines: {node: '>=8.3.0'} peerDependencies: bufferutil: ^4.0.1 @@ -8798,8 +8350,8 @@ packages: utf-8-validate: optional: true - ws@8.17.1: - resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} + ws@8.16.0: + resolution: {integrity: sha512-HS0c//TP7Ina87TfiPUz1rQzMhHrl/SG2guqRcTOIUYD2q8uhUdNHZYJUaQ8aTGPzCh+c6oawMKW35nFl1dxyQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -8810,8 +8362,8 @@ packages: utf-8-validate: optional: true - ws@8.18.0: - resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + ws@8.17.1: + resolution: {integrity: sha512-6XQFvXTkbfUOZOKKILFG1PDK2NDQs4azKQl26T0YS5CxqWLgXajbPZ+h4gZekJyRqFU8pvnbAbbs/3TgRPy+GQ==} engines: {node: '>=10.0.0'} peerDependencies: bufferutil: ^4.0.1 @@ -8830,6 +8382,13 @@ packages: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} + y18n@4.0.3: + resolution: {integrity: sha512-JKhqTOwSrqNA1NY5lSztJ1GrBiUodLMmIZuLiDaMRJ+itFd+ABVE8XBjOvIWL+rSqNDC74LCSFmlb/U4UZ4hJQ==} + + y18n@5.0.8: + resolution: {integrity: sha512-0pfFzegeDWJHJIAmTLRP2DwHjdF5s7jo9tuztdQxAhINCdvS+3nGINqPd00AphqJR/0LhANUS6/+7SCb98YOfA==} + engines: {node: '>=10'} + yallist@2.1.2: resolution: {integrity: sha512-ncTzHV7NvsQZkYe1DW7cbDLm0YpzHmZF5r/iyP3ZnQtMiJ+pjzisCiMNI+Sj+xQF5pXhSHxSB3uDbsBTzY/c2A==} @@ -8847,15 +8406,22 @@ packages: resolution: {integrity: sha512-8aAvwVUSHpfEqTQ4w/KMlf3HcRdt50E5ODIQJBw1fQ5RL34xabzxtUlzTXVqc4rkZsPbvrXKWnABCD7kWSmocA==} engines: {node: '>= 14'} - yaml@2.5.1: - resolution: {integrity: sha512-bLQOjaX/ADgQ20isPJRvF0iRUHIxVhYvr53Of7wGcWlO2jvtUlH5m87DsmulFVxRpNLOnI4tB6p/oh8D7kpn9Q==} - engines: {node: '>= 14'} - hasBin: true + yargs-parser@18.1.3: + resolution: {integrity: sha512-o50j0JeToy/4K6OZcaQmW6lyXXKhq7csREXcDwk2omFPJEwUNOVtJKvmDr9EI1fAJZUyZcRF7kxGBWmRXudrCQ==} + engines: {node: '>=6'} yargs-parser@21.1.1: resolution: {integrity: sha512-tVpsJW7DdjecAiFpbIB1e3qxIQsE6NoPc5/eTdrbbIC4h0LVsWhnoa3g+m2HclBIujHzsxZ4VJVA+GUuc2/LBw==} engines: {node: '>=12'} + yargs@15.4.1: + resolution: {integrity: sha512-aePbxDmcYW++PaqBsJ+HYUFwCdv4LVvdnhBy78E57PIor8/OVvhMrADFFEDh8DHDFRv/O9i3lPhsENjO7QX0+A==} + engines: {node: '>=8'} + + yargs@17.7.2: + resolution: {integrity: sha512-7dSzzRQ++CKnNI/krKnYRV7JKKPUXMEh61soaHKg9mrWEhzFWhFnxPxGl+69cD1Ou63C13NUPCnmIcrvqCuM6w==} + engines: {node: '>=12'} + yn@3.1.1: resolution: {integrity: sha512-Ux4ygGWsu2c7isFWe8Yu1YluJmqVhxqK2cLXNQA5AcC3QfbGNpM7fu0Y8b/z16pXLnFxZYvWhd3fhBY9DLmC6Q==} engines: {node: '>=6'} @@ -8885,6 +8451,8 @@ packages: snapshots: + '@aashutoshrathi/word-wrap@1.2.6': {} + '@adraffy/ens-normalize@1.10.0': {} '@alcalzone/ansi-tokenize@0.1.3': @@ -8899,17 +8467,17 @@ snapshots: '@jridgewell/gen-mapping': 0.3.3 '@jridgewell/trace-mapping': 0.3.20 - '@babel/code-frame@7.24.7': + '@babel/code-frame@7.23.5': dependencies: - '@babel/highlight': 7.24.7 - picocolors: 1.1.0 + '@babel/highlight': 7.23.4 + chalk: 2.4.2 '@babel/compat-data@7.23.5': {} '@babel/core@7.23.7': dependencies: '@ampproject/remapping': 2.2.1 - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.23.5 '@babel/generator': 7.23.6 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-module-transforms': 7.23.3(@babel/core@7.23.7) @@ -8919,7 +8487,7 @@ snapshots: '@babel/traverse': 7.23.7 '@babel/types': 7.23.6 convert-source-map: 2.0.0 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) gensync: 1.0.0-beta.2 json5: 2.2.3 semver: 6.3.1 @@ -8945,7 +8513,7 @@ snapshots: dependencies: '@babel/compat-data': 7.23.5 '@babel/helper-validator-option': 7.23.5 - browserslist: 4.23.3 + browserslist: 4.22.2 lru-cache: 5.1.1 semver: 6.3.1 @@ -8974,7 +8542,7 @@ snapshots: '@babel/core': 7.23.7 '@babel/helper-compilation-targets': 7.23.6 '@babel/helper-plugin-utils': 7.22.5 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) lodash.debounce: 4.0.8 resolve: 1.22.8 transitivePeerDependencies: @@ -9044,8 +8612,6 @@ snapshots: '@babel/helper-validator-identifier@7.22.20': {} - '@babel/helper-validator-identifier@7.24.7': {} - '@babel/helper-validator-option@7.23.5': {} '@babel/helper-wrap-function@7.22.20': @@ -9062,12 +8628,11 @@ snapshots: transitivePeerDependencies: - supports-color - '@babel/highlight@7.24.7': + '@babel/highlight@7.23.4': dependencies: - '@babel/helper-validator-identifier': 7.24.7 + '@babel/helper-validator-identifier': 7.22.20 chalk: 2.4.2 js-tokens: 4.0.0 - picocolors: 1.1.0 '@babel/parser@7.23.6': dependencies: @@ -9647,13 +9212,13 @@ snapshots: '@babel/template@7.22.15': dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.23.5 '@babel/parser': 7.23.6 '@babel/types': 7.23.6 '@babel/traverse@7.23.7': dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.23.5 '@babel/generator': 7.23.6 '@babel/helper-environment-visitor': 7.22.20 '@babel/helper-function-name': 7.23.0 @@ -9661,7 +9226,7 @@ snapshots: '@babel/helper-split-export-declaration': 7.22.6 '@babel/parser': 7.23.6 '@babel/types': 7.23.6 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) globals: 11.12.0 transitivePeerDependencies: - supports-color @@ -9672,49 +9237,49 @@ snapshots: '@babel/helper-validator-identifier': 7.22.20 to-fast-properties: 2.0.0 - '@biomejs/biome@1.9.2': + '@biomejs/biome@1.8.1': optionalDependencies: - '@biomejs/cli-darwin-arm64': 1.9.2 - '@biomejs/cli-darwin-x64': 1.9.2 - '@biomejs/cli-linux-arm64': 1.9.2 - '@biomejs/cli-linux-arm64-musl': 1.9.2 - '@biomejs/cli-linux-x64': 1.9.2 - '@biomejs/cli-linux-x64-musl': 1.9.2 - '@biomejs/cli-win32-arm64': 1.9.2 - '@biomejs/cli-win32-x64': 1.9.2 - - '@biomejs/cli-darwin-arm64@1.9.2': + '@biomejs/cli-darwin-arm64': 1.8.1 + '@biomejs/cli-darwin-x64': 1.8.1 + '@biomejs/cli-linux-arm64': 1.8.1 + '@biomejs/cli-linux-arm64-musl': 1.8.1 + '@biomejs/cli-linux-x64': 1.8.1 + '@biomejs/cli-linux-x64-musl': 1.8.1 + '@biomejs/cli-win32-arm64': 1.8.1 + '@biomejs/cli-win32-x64': 1.8.1 + + '@biomejs/cli-darwin-arm64@1.8.1': optional: true - '@biomejs/cli-darwin-x64@1.9.2': + '@biomejs/cli-darwin-x64@1.8.1': optional: true - '@biomejs/cli-linux-arm64-musl@1.9.2': + '@biomejs/cli-linux-arm64-musl@1.8.1': optional: true - '@biomejs/cli-linux-arm64@1.9.2': + '@biomejs/cli-linux-arm64@1.8.1': optional: true - '@biomejs/cli-linux-x64-musl@1.9.2': + '@biomejs/cli-linux-x64-musl@1.8.1': optional: true - '@biomejs/cli-linux-x64@1.9.2': + '@biomejs/cli-linux-x64@1.8.1': optional: true - '@biomejs/cli-win32-arm64@1.9.2': + '@biomejs/cli-win32-arm64@1.8.1': optional: true - '@biomejs/cli-win32-x64@1.9.2': + '@biomejs/cli-win32-x64@1.8.1': optional: true '@braintree/sanitize-url@6.0.4': {} - '@changesets/apply-release-plan@7.0.5': + '@changesets/apply-release-plan@7.0.0': dependencies: - '@changesets/config': 3.0.3 + '@babel/runtime': 7.23.7 + '@changesets/config': 3.0.0 '@changesets/get-version-range-type': 0.4.0 - '@changesets/git': 3.0.1 - '@changesets/should-skip-package': 0.1.1 + '@changesets/git': 3.0.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 detect-indent: 6.1.0 @@ -9725,11 +9290,11 @@ snapshots: resolve-from: 5.0.0 semver: 7.6.2 - '@changesets/assemble-release-plan@6.0.4': + '@changesets/assemble-release-plan@6.0.0': dependencies: + '@babel/runtime': 7.23.7 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/should-skip-package': 0.1.1 + '@changesets/get-dependents-graph': 2.0.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 semver: 7.6.2 @@ -9746,58 +9311,61 @@ snapshots: transitivePeerDependencies: - encoding - '@changesets/cli@2.27.8': + '@changesets/cli@2.27.1': dependencies: - '@changesets/apply-release-plan': 7.0.5 - '@changesets/assemble-release-plan': 6.0.4 + '@babel/runtime': 7.23.7 + '@changesets/apply-release-plan': 7.0.0 + '@changesets/assemble-release-plan': 6.0.0 '@changesets/changelog-git': 0.2.0 - '@changesets/config': 3.0.3 + '@changesets/config': 3.0.0 '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/get-release-plan': 4.0.4 - '@changesets/git': 3.0.1 - '@changesets/logger': 0.1.1 - '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.1 - '@changesets/should-skip-package': 0.1.1 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/get-release-plan': 4.0.0 + '@changesets/git': 3.0.0 + '@changesets/logger': 0.1.0 + '@changesets/pre': 2.0.0 + '@changesets/read': 0.6.0 '@changesets/types': 6.0.0 - '@changesets/write': 0.3.2 + '@changesets/write': 0.3.0 '@manypkg/get-packages': 1.1.3 '@types/semver': 7.5.6 ansi-colors: 4.1.3 + chalk: 2.4.2 ci-info: 3.9.0 enquirer: 2.4.1 external-editor: 3.1.0 fs-extra: 7.0.1 - mri: 1.2.0 + human-id: 1.0.2 + meow: 6.1.1 outdent: 0.5.0 p-limit: 2.3.0 - package-manager-detector: 0.2.0 - picocolors: 1.1.0 + preferred-pm: 3.1.2 resolve-from: 5.0.0 semver: 7.6.2 spawndamnit: 2.0.0 term-size: 2.2.1 + tty-table: 4.2.3 - '@changesets/config@3.0.3': + '@changesets/config@3.0.0': dependencies: '@changesets/errors': 0.2.0 - '@changesets/get-dependents-graph': 2.1.2 - '@changesets/logger': 0.1.1 + '@changesets/get-dependents-graph': 2.0.0 + '@changesets/logger': 0.1.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - micromatch: 4.0.8 + micromatch: 4.0.5 '@changesets/errors@0.2.0': dependencies: extendable-error: 0.1.7 - '@changesets/get-dependents-graph@2.1.2': + '@changesets/get-dependents-graph@2.0.0': dependencies: '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 - picocolors: 1.1.0 + chalk: 2.4.2 + fs-extra: 7.0.1 semver: 7.6.2 '@changesets/get-github-info@0.5.2(encoding@0.1.13)': @@ -9807,55 +9375,55 @@ snapshots: transitivePeerDependencies: - encoding - '@changesets/get-release-plan@4.0.4': + '@changesets/get-release-plan@4.0.0': dependencies: - '@changesets/assemble-release-plan': 6.0.4 - '@changesets/config': 3.0.3 - '@changesets/pre': 2.0.1 - '@changesets/read': 0.6.1 + '@babel/runtime': 7.23.7 + '@changesets/assemble-release-plan': 6.0.0 + '@changesets/config': 3.0.0 + '@changesets/pre': 2.0.0 + '@changesets/read': 0.6.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 '@changesets/get-version-range-type@0.4.0': {} - '@changesets/git@3.0.1': + '@changesets/git@3.0.0': dependencies: + '@babel/runtime': 7.23.7 '@changesets/errors': 0.2.0 + '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 is-subdir: 1.2.0 - micromatch: 4.0.8 + micromatch: 4.0.5 spawndamnit: 2.0.0 - '@changesets/logger@0.1.1': + '@changesets/logger@0.1.0': dependencies: - picocolors: 1.1.0 + chalk: 2.4.2 '@changesets/parse@0.4.0': dependencies: '@changesets/types': 6.0.0 js-yaml: 3.14.1 - '@changesets/pre@2.0.1': + '@changesets/pre@2.0.0': dependencies: + '@babel/runtime': 7.23.7 '@changesets/errors': 0.2.0 '@changesets/types': 6.0.0 '@manypkg/get-packages': 1.1.3 fs-extra: 7.0.1 - '@changesets/read@0.6.1': + '@changesets/read@0.6.0': dependencies: - '@changesets/git': 3.0.1 - '@changesets/logger': 0.1.1 + '@babel/runtime': 7.23.7 + '@changesets/git': 3.0.0 + '@changesets/logger': 0.1.0 '@changesets/parse': 0.4.0 '@changesets/types': 6.0.0 + chalk: 2.4.2 fs-extra: 7.0.1 p-filter: 2.1.0 - picocolors: 1.1.0 - - '@changesets/should-skip-package@0.1.1': - dependencies: - '@changesets/types': 6.0.0 - '@manypkg/get-packages': 1.1.3 '@changesets/types@4.1.0': {} @@ -9863,16 +9431,17 @@ snapshots: '@changesets/types@6.0.0': {} - '@changesets/write@0.3.2': + '@changesets/write@0.3.0': dependencies: + '@babel/runtime': 7.23.7 '@changesets/types': 6.0.0 fs-extra: 7.0.1 human-id: 1.0.2 prettier: 2.8.8 - '@commander-js/extra-typings@12.1.0(commander@12.1.0)': + '@commander-js/extra-typings@12.0.1(commander@12.0.0)': dependencies: - commander: 12.1.0 + commander: 12.0.0 '@cspotcode/source-map-support@0.8.1': dependencies: @@ -9885,7 +9454,7 @@ snapshots: '@envelop/types@5.0.0': dependencies: - tslib: 2.7.0 + tslib: 2.6.2 '@esbuild-kit/core-utils@3.3.2': dependencies: @@ -9895,15 +9464,9 @@ snapshots: '@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 + get-tsconfig: 4.7.2 - '@esbuild/aix-ppc64@0.23.1': + '@esbuild/aix-ppc64@0.19.11': optional: true '@esbuild/android-arm64@0.16.17': @@ -9912,13 +9475,7 @@ snapshots: '@esbuild/android-arm64@0.18.20': optional: true - '@esbuild/android-arm64@0.19.12': - optional: true - - '@esbuild/android-arm64@0.21.5': - optional: true - - '@esbuild/android-arm64@0.23.1': + '@esbuild/android-arm64@0.19.11': optional: true '@esbuild/android-arm@0.16.17': @@ -9927,13 +9484,7 @@ snapshots: '@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': + '@esbuild/android-arm@0.19.11': optional: true '@esbuild/android-x64@0.16.17': @@ -9942,256 +9493,151 @@ snapshots: '@esbuild/android-x64@0.18.20': optional: true - '@esbuild/android-x64@0.19.12': - optional: true - - '@esbuild/android-x64@0.21.5': - optional: true - - '@esbuild/android-x64@0.23.1': - optional: true - - '@esbuild/darwin-arm64@0.16.17': - 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 - - '@esbuild/darwin-arm64@0.23.1': - optional: true - - '@esbuild/darwin-x64@0.16.17': - 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 - - '@esbuild/darwin-x64@0.23.1': - optional: true - - '@esbuild/freebsd-arm64@0.16.17': - 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 - - '@esbuild/freebsd-arm64@0.23.1': - optional: true - - '@esbuild/freebsd-x64@0.16.17': - 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 - - '@esbuild/freebsd-x64@0.23.1': - optional: true - - '@esbuild/linux-arm64@0.16.17': - 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 - - '@esbuild/linux-arm64@0.23.1': - optional: true - - '@esbuild/linux-arm@0.16.17': - 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 - - '@esbuild/linux-arm@0.23.1': - optional: true - - '@esbuild/linux-ia32@0.16.17': - optional: true - - '@esbuild/linux-ia32@0.18.20': - optional: true - - '@esbuild/linux-ia32@0.19.12': + '@esbuild/android-x64@0.19.11': optional: true - '@esbuild/linux-ia32@0.21.5': + '@esbuild/darwin-arm64@0.16.17': optional: true - '@esbuild/linux-ia32@0.23.1': + '@esbuild/darwin-arm64@0.18.20': optional: true - '@esbuild/linux-loong64@0.16.17': + '@esbuild/darwin-arm64@0.19.11': optional: true - '@esbuild/linux-loong64@0.18.20': + '@esbuild/darwin-x64@0.16.17': optional: true - '@esbuild/linux-loong64@0.19.12': + '@esbuild/darwin-x64@0.18.20': optional: true - '@esbuild/linux-loong64@0.21.5': + '@esbuild/darwin-x64@0.19.11': optional: true - '@esbuild/linux-loong64@0.23.1': + '@esbuild/freebsd-arm64@0.16.17': optional: true - '@esbuild/linux-mips64el@0.16.17': + '@esbuild/freebsd-arm64@0.18.20': optional: true - '@esbuild/linux-mips64el@0.18.20': + '@esbuild/freebsd-arm64@0.19.11': optional: true - '@esbuild/linux-mips64el@0.19.12': + '@esbuild/freebsd-x64@0.16.17': optional: true - '@esbuild/linux-mips64el@0.21.5': + '@esbuild/freebsd-x64@0.18.20': optional: true - '@esbuild/linux-mips64el@0.23.1': + '@esbuild/freebsd-x64@0.19.11': optional: true - '@esbuild/linux-ppc64@0.16.17': + '@esbuild/linux-arm64@0.16.17': optional: true - '@esbuild/linux-ppc64@0.18.20': + '@esbuild/linux-arm64@0.18.20': optional: true - '@esbuild/linux-ppc64@0.19.12': + '@esbuild/linux-arm64@0.19.11': optional: true - '@esbuild/linux-ppc64@0.21.5': + '@esbuild/linux-arm@0.16.17': optional: true - '@esbuild/linux-ppc64@0.23.1': + '@esbuild/linux-arm@0.18.20': optional: true - '@esbuild/linux-riscv64@0.16.17': + '@esbuild/linux-arm@0.19.11': optional: true - '@esbuild/linux-riscv64@0.18.20': + '@esbuild/linux-ia32@0.16.17': optional: true - '@esbuild/linux-riscv64@0.19.12': + '@esbuild/linux-ia32@0.18.20': optional: true - '@esbuild/linux-riscv64@0.21.5': + '@esbuild/linux-ia32@0.19.11': optional: true - '@esbuild/linux-riscv64@0.23.1': + '@esbuild/linux-loong64@0.16.17': optional: true - '@esbuild/linux-s390x@0.16.17': + '@esbuild/linux-loong64@0.18.20': optional: true - '@esbuild/linux-s390x@0.18.20': + '@esbuild/linux-loong64@0.19.11': optional: true - '@esbuild/linux-s390x@0.19.12': + '@esbuild/linux-mips64el@0.16.17': optional: true - '@esbuild/linux-s390x@0.21.5': + '@esbuild/linux-mips64el@0.18.20': optional: true - '@esbuild/linux-s390x@0.23.1': + '@esbuild/linux-mips64el@0.19.11': optional: true - '@esbuild/linux-x64@0.16.17': + '@esbuild/linux-ppc64@0.16.17': optional: true - '@esbuild/linux-x64@0.18.20': + '@esbuild/linux-ppc64@0.18.20': optional: true - '@esbuild/linux-x64@0.19.12': + '@esbuild/linux-ppc64@0.19.11': optional: true - '@esbuild/linux-x64@0.21.5': + '@esbuild/linux-riscv64@0.16.17': optional: true - '@esbuild/linux-x64@0.23.1': + '@esbuild/linux-riscv64@0.18.20': optional: true - '@esbuild/netbsd-x64@0.16.17': + '@esbuild/linux-riscv64@0.19.11': optional: true - '@esbuild/netbsd-x64@0.18.20': + '@esbuild/linux-s390x@0.16.17': optional: true - '@esbuild/netbsd-x64@0.19.12': + '@esbuild/linux-s390x@0.18.20': optional: true - '@esbuild/netbsd-x64@0.21.5': + '@esbuild/linux-s390x@0.19.11': optional: true - '@esbuild/netbsd-x64@0.23.1': + '@esbuild/linux-x64@0.16.17': optional: true - '@esbuild/openbsd-arm64@0.23.1': + '@esbuild/linux-x64@0.18.20': optional: true - '@esbuild/openbsd-x64@0.16.17': + '@esbuild/linux-x64@0.19.11': optional: true - '@esbuild/openbsd-x64@0.18.20': + '@esbuild/netbsd-x64@0.16.17': optional: true - '@esbuild/openbsd-x64@0.19.12': + '@esbuild/netbsd-x64@0.18.20': optional: true - '@esbuild/openbsd-x64@0.21.5': + '@esbuild/netbsd-x64@0.19.11': optional: true - '@esbuild/openbsd-x64@0.23.1': + '@esbuild/openbsd-x64@0.16.17': optional: true - '@esbuild/sunos-x64@0.16.17': + '@esbuild/openbsd-x64@0.18.20': optional: true - '@esbuild/sunos-x64@0.18.20': + '@esbuild/openbsd-x64@0.19.11': optional: true - '@esbuild/sunos-x64@0.19.12': + '@esbuild/sunos-x64@0.16.17': optional: true - '@esbuild/sunos-x64@0.21.5': + '@esbuild/sunos-x64@0.18.20': optional: true - '@esbuild/sunos-x64@0.23.1': + '@esbuild/sunos-x64@0.19.11': optional: true '@esbuild/win32-arm64@0.16.17': @@ -10200,13 +9646,7 @@ snapshots: '@esbuild/win32-arm64@0.18.20': optional: true - '@esbuild/win32-arm64@0.19.12': - optional: true - - '@esbuild/win32-arm64@0.21.5': - optional: true - - '@esbuild/win32-arm64@0.23.1': + '@esbuild/win32-arm64@0.19.11': optional: true '@esbuild/win32-ia32@0.16.17': @@ -10215,13 +9655,7 @@ snapshots: '@esbuild/win32-ia32@0.18.20': optional: true - '@esbuild/win32-ia32@0.19.12': - optional: true - - '@esbuild/win32-ia32@0.21.5': - optional: true - - '@esbuild/win32-ia32@0.23.1': + '@esbuild/win32-ia32@0.19.11': optional: true '@esbuild/win32-x64@0.16.17': @@ -10230,55 +9664,49 @@ snapshots: '@esbuild/win32-x64@0.18.20': optional: true - '@esbuild/win32-x64@0.19.12': - optional: true - - '@esbuild/win32-x64@0.21.5': + '@esbuild/win32-x64@0.19.11': optional: true - '@esbuild/win32-x64@0.23.1': - optional: true - - '@escape.tech/graphql-armor-max-aliases@2.5.0': + '@escape.tech/graphql-armor-max-aliases@2.4.0': dependencies: - graphql: 16.9.0 + graphql: 16.8.2 optionalDependencies: '@envelop/core': 5.0.2 '@escape.tech/graphql-armor-types': 0.6.0 '@escape.tech/graphql-armor-max-depth@2.3.0': dependencies: - graphql: 16.9.0 + graphql: 16.8.2 optionalDependencies: '@envelop/core': 5.0.2 '@escape.tech/graphql-armor-types': 0.6.0 '@escape.tech/graphql-armor-max-tokens@2.4.0': dependencies: - graphql: 16.9.0 + graphql: 16.8.2 optionalDependencies: '@envelop/core': 5.0.2 '@escape.tech/graphql-armor-types': 0.6.0 '@escape.tech/graphql-armor-types@0.6.0': dependencies: - graphql: 16.9.0 + graphql: 16.8.2 optional: true - '@eslint-community/eslint-utils@4.4.0(eslint@8.57.1)': + '@eslint-community/eslint-utils@4.4.0(eslint@8.56.0)': dependencies: - eslint: 8.57.1 + eslint: 8.56.0 eslint-visitor-keys: 3.4.3 - '@eslint-community/regexpp@4.11.1': {} + '@eslint-community/regexpp@4.10.0': {} '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.24.0 - ignore: 5.3.2 + ignore: 5.3.0 import-fresh: 3.3.0 js-yaml: 4.1.0 minimatch: 3.1.2 @@ -10286,7 +9714,7 @@ snapshots: transitivePeerDependencies: - supports-color - '@eslint/js@8.57.1': {} + '@eslint/js@8.56.0': {} '@ethersproject/abi@5.0.7': dependencies: @@ -10414,22 +9842,22 @@ snapshots: '@float-capital/float-subgraph-uncrashable@0.0.0-internal-testing.5': dependencies: '@rescript/std': 9.0.0 - graphql: 16.9.0 - graphql-import-node: 0.0.5(graphql@16.9.0) + graphql: 16.8.2 + graphql-import-node: 0.0.5(graphql@16.8.2) js-yaml: 4.1.0 - '@graphprotocol/graph-cli@0.61.0(@types/node@20.16.5)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.6.2)': + '@graphprotocol/graph-cli@0.61.0(@types/node@20.11.24)(encoding@0.1.13)(node-fetch@3.3.2)(typescript@5.3.3)': dependencies: '@float-capital/float-subgraph-uncrashable': 0.0.0-internal-testing.5 - '@oclif/core': 2.8.6(@types/node@20.16.5)(typescript@5.6.2) - '@oclif/plugin-autocomplete': 2.3.10(@types/node@20.16.5)(typescript@5.6.2) - '@oclif/plugin-not-found': 2.4.3(@types/node@20.16.5)(typescript@5.6.2) + '@oclif/core': 2.8.6(@types/node@20.11.24)(typescript@5.3.3) + '@oclif/plugin-autocomplete': 2.3.10(@types/node@20.11.24)(typescript@5.3.3) + '@oclif/plugin-not-found': 2.4.3(@types/node@20.11.24)(typescript@5.3.3) '@whatwg-node/fetch': 0.8.8 assemblyscript: 0.19.23 binary-install-raw: 0.0.13(debug@4.3.4) chalk: 3.0.0 chokidar: 3.5.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) docker-compose: 0.23.19 dockerode: 2.5.8 fs-extra: 9.1.0 @@ -10463,83 +9891,83 @@ snapshots: dependencies: assemblyscript: 0.19.10 - '@graphql-tools/executor@1.3.1(graphql@16.9.0)': + '@graphql-tools/executor@1.2.6(graphql@16.8.2)': dependencies: - '@graphql-tools/utils': 10.5.4(graphql@16.9.0) - '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) - '@repeaterjs/repeater': 3.0.6 - graphql: 16.9.0 + '@graphql-tools/utils': 10.2.0(graphql@16.8.2) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.2) + '@repeaterjs/repeater': 3.0.5 + graphql: 16.8.2 tslib: 2.6.2 value-or-promise: 1.0.12 - '@graphql-tools/merge@9.0.7(graphql@16.9.0)': + '@graphql-tools/merge@9.0.4(graphql@16.8.2)': dependencies: - '@graphql-tools/utils': 10.5.4(graphql@16.9.0) - graphql: 16.9.0 - tslib: 2.7.0 + '@graphql-tools/utils': 10.2.0(graphql@16.8.2) + graphql: 16.8.2 + tslib: 2.6.2 - '@graphql-tools/schema@10.0.6(graphql@16.9.0)': + '@graphql-tools/schema@10.0.3(graphql@16.8.2)': dependencies: - '@graphql-tools/merge': 9.0.7(graphql@16.9.0) - '@graphql-tools/utils': 10.5.4(graphql@16.9.0) - graphql: 16.9.0 + '@graphql-tools/merge': 9.0.4(graphql@16.8.2) + '@graphql-tools/utils': 10.2.0(graphql@16.8.2) + graphql: 16.8.2 tslib: 2.6.2 value-or-promise: 1.0.12 - '@graphql-tools/utils@10.5.4(graphql@16.9.0)': + '@graphql-tools/utils@10.2.0(graphql@16.8.2)': dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) - cross-inspect: 1.0.1 + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.2) + cross-inspect: 1.0.0 dset: 3.1.3 - graphql: 16.9.0 + graphql: 16.8.2 tslib: 2.6.2 - '@graphql-typed-document-node/core@3.2.0(graphql@16.9.0)': + '@graphql-typed-document-node/core@3.2.0(graphql@16.8.2)': dependencies: - graphql: 16.9.0 + graphql: 16.8.2 '@graphql-yoga/logger@2.0.0': dependencies: tslib: 2.6.2 - '@graphql-yoga/subscription@5.0.1': + '@graphql-yoga/subscription@5.0.0': dependencies: '@graphql-yoga/typed-event-target': 3.0.0 - '@repeaterjs/repeater': 3.0.6 - '@whatwg-node/events': 0.1.2 + '@repeaterjs/repeater': 3.0.5 + '@whatwg-node/events': 0.1.1 tslib: 2.6.2 '@graphql-yoga/typed-event-target@3.0.0': dependencies: - '@repeaterjs/repeater': 3.0.6 - tslib: 2.7.0 + '@repeaterjs/repeater': 3.0.5 + tslib: 2.6.2 - '@headlessui/react@1.7.17(react-dom@18.3.1(react@18.3.1))(react@18.3.1)': + '@headlessui/react@1.7.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0)': dependencies: client-only: 0.0.1 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) - '@hono/node-server@1.13.0(hono@4.6.2)': + '@hono/node-server@1.12.2(hono@4.5.0)': dependencies: - hono: 4.6.2 + hono: 4.5.0 - '@hono/trpc-server@0.3.2(@trpc/server@10.45.2)(hono@4.6.2)': + '@hono/trpc-server@0.3.2(@trpc/server@10.45.2)(hono@4.5.0)': dependencies: '@trpc/server': 10.45.2 - hono: 4.6.2 + hono: 4.5.0 - '@humanwhocodes/config-array@0.13.0': + '@humanwhocodes/config-array@0.11.13': dependencies: - '@humanwhocodes/object-schema': 2.0.3 - debug: 4.3.7(supports-color@8.1.1) + '@humanwhocodes/object-schema': 2.0.1 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color '@humanwhocodes/module-importer@1.0.1': {} - '@humanwhocodes/object-schema@2.0.3': {} + '@humanwhocodes/object-schema@2.0.1': {} '@ipld/dag-cbor@7.0.3': dependencies: @@ -10576,14 +10004,10 @@ snapshots: '@jridgewell/resolve-uri@3.1.1': {} - '@jridgewell/resolve-uri@3.1.2': {} - '@jridgewell/set-array@1.1.2': {} '@jridgewell/sourcemap-codec@1.4.15': {} - '@jridgewell/sourcemap-codec@1.5.0': {} - '@jridgewell/trace-mapping@0.3.20': dependencies: '@jridgewell/resolve-uri': 3.1.1 @@ -10591,8 +10015,8 @@ snapshots: '@jridgewell/trace-mapping@0.3.9': dependencies: - '@jridgewell/resolve-uri': 3.1.2 - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/resolve-uri': 3.1.1 + '@jridgewell/sourcemap-codec': 1.4.15 '@kamilkisiela/fast-url-parser@1.1.4': {} @@ -10640,17 +10064,17 @@ snapshots: transitivePeerDependencies: - supports-color - '@mdx-js/react@2.3.0(react@18.3.1)': + '@mdx-js/react@2.3.0(react@18.2.0)': dependencies: '@types/mdx': 2.0.10 - '@types/react': 18.3.8 - react: 18.3.1 + '@types/react': 18.2.46 + react: 18.2.0 - '@mdx-js/react@3.0.1(@types/react@18.3.8)(react@18.3.1)': + '@mdx-js/react@3.0.0(@types/react@18.2.46)(react@18.2.0)': dependencies: '@types/mdx': 2.0.10 - '@types/react': 18.3.8 - react: 18.3.1 + '@types/react': 18.2.46 + react: 18.2.0 '@napi-rs/simple-git-android-arm-eabi@0.1.9': optional: true @@ -10701,70 +10125,37 @@ snapshots: '@next/env@14.0.3': {} - '@next/env@14.2.13': {} - '@next/eslint-plugin-next@14.0.3': dependencies: glob: 7.1.7 - '@next/eslint-plugin-next@14.2.13': - dependencies: - glob: 10.3.10 - '@next/swc-darwin-arm64@14.0.3': optional: true - '@next/swc-darwin-arm64@14.2.13': - optional: true - '@next/swc-darwin-x64@14.0.3': optional: true - '@next/swc-darwin-x64@14.2.13': - optional: true - '@next/swc-linux-arm64-gnu@14.0.3': optional: true - '@next/swc-linux-arm64-gnu@14.2.13': - optional: true - '@next/swc-linux-arm64-musl@14.0.3': optional: true - '@next/swc-linux-arm64-musl@14.2.13': - optional: true - '@next/swc-linux-x64-gnu@14.0.3': optional: true - '@next/swc-linux-x64-gnu@14.2.13': - optional: true - '@next/swc-linux-x64-musl@14.0.3': optional: true - '@next/swc-linux-x64-musl@14.2.13': - optional: true - '@next/swc-win32-arm64-msvc@14.0.3': optional: true - '@next/swc-win32-arm64-msvc@14.2.13': - optional: true - '@next/swc-win32-ia32-msvc@14.0.3': optional: true - '@next/swc-win32-ia32-msvc@14.2.13': - optional: true - '@next/swc-win32-x64-msvc@14.0.3': optional: true - '@next/swc-win32-x64-msvc@14.2.13': - optional: true - '@noble/curves@1.2.0': dependencies: '@noble/hashes': 1.3.2 @@ -10775,6 +10166,8 @@ snapshots: '@noble/hashes@1.3.2': {} + '@noble/hashes@1.3.3': {} + '@noble/hashes@1.4.0': {} '@noble/hashes@1.5.0': {} @@ -10789,19 +10182,19 @@ snapshots: '@nodelib/fs.walk@1.2.8': dependencies: '@nodelib/fs.scandir': 2.1.5 - fastq: 1.17.1 + fastq: 1.16.0 - '@oclif/core@2.16.0(@types/node@20.16.5)(typescript@5.6.2)': + '@oclif/core@2.15.0(@types/node@20.11.24)(typescript@5.3.3)': dependencies: - '@types/cli-progress': 3.11.6 + '@types/cli-progress': 3.11.5 ansi-escapes: 4.3.2 ansi-styles: 4.3.0 cardinal: 2.1.1 chalk: 4.1.2 clean-stack: 3.0.1 cli-progress: 3.12.0 - debug: 4.3.7(supports-color@8.1.1) - ejs: 3.1.10 + debug: 4.3.4(supports-color@8.1.1) + ejs: 3.1.9 get-package-type: 0.1.0 globby: 11.1.0 hyperlinker: 1.0.0 @@ -10816,8 +10209,8 @@ snapshots: strip-ansi: 6.0.1 supports-color: 8.1.1 supports-hyperlinks: 2.3.0 - ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) - tslib: 2.7.0 + ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) + tslib: 2.6.2 widest-line: 3.1.0 wordwrap: 1.0.0 wrap-ansi: 7.0.0 @@ -10827,17 +10220,17 @@ snapshots: - '@types/node' - typescript - '@oclif/core@2.8.6(@types/node@20.16.5)(typescript@5.6.2)': + '@oclif/core@2.8.6(@types/node@20.11.24)(typescript@5.3.3)': dependencies: - '@types/cli-progress': 3.11.6 + '@types/cli-progress': 3.11.5 ansi-escapes: 4.3.2 ansi-styles: 4.3.0 cardinal: 2.1.1 chalk: 4.1.2 clean-stack: 3.0.1 cli-progress: 3.12.0 - debug: 4.3.7(supports-color@8.1.1) - ejs: 3.1.10 + debug: 4.3.4(supports-color@8.1.1) + ejs: 3.1.9 fs-extra: 9.1.0 get-package-type: 0.1.0 globby: 11.1.0 @@ -10848,13 +10241,13 @@ snapshots: natural-orderby: 2.0.3 object-treeify: 1.1.33 password-prompt: 1.1.3 - semver: 7.6.3 + semver: 7.6.2 string-width: 4.2.3 strip-ansi: 6.0.1 supports-color: 8.1.1 supports-hyperlinks: 2.3.0 - ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) - tslib: 2.7.0 + ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) + tslib: 2.6.2 widest-line: 3.1.0 wordwrap: 1.0.0 wrap-ansi: 7.0.0 @@ -10864,11 +10257,11 @@ snapshots: - '@types/node' - typescript - '@oclif/plugin-autocomplete@2.3.10(@types/node@20.16.5)(typescript@5.6.2)': + '@oclif/plugin-autocomplete@2.3.10(@types/node@20.11.24)(typescript@5.3.3)': dependencies: - '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.6.2) + '@oclif/core': 2.15.0(@types/node@20.11.24)(typescript@5.3.3) chalk: 4.1.2 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) transitivePeerDependencies: - '@swc/core' - '@swc/wasm' @@ -10876,9 +10269,9 @@ snapshots: - supports-color - typescript - '@oclif/plugin-not-found@2.4.3(@types/node@20.16.5)(typescript@5.6.2)': + '@oclif/plugin-not-found@2.4.3(@types/node@20.11.24)(typescript@5.3.3)': dependencies: - '@oclif/core': 2.16.0(@types/node@20.16.5)(typescript@5.6.2) + '@oclif/core': 2.15.0(@types/node@20.11.24)(typescript@5.3.3) chalk: 4.1.2 fast-levenshtein: 3.0.0 transitivePeerDependencies: @@ -10889,23 +10282,23 @@ snapshots: '@opentelemetry/api@1.7.0': {} - '@peculiar/asn1-schema@2.3.13': + '@peculiar/asn1-schema@2.3.8': dependencies: asn1js: 3.0.5 pvtsutils: 1.3.5 - tslib: 2.7.0 + tslib: 2.6.2 '@peculiar/json-schema@1.1.12': dependencies: - tslib: 2.7.0 + tslib: 2.6.2 - '@peculiar/webcrypto@1.5.0': + '@peculiar/webcrypto@1.4.3': dependencies: - '@peculiar/asn1-schema': 2.3.13 + '@peculiar/asn1-schema': 2.3.8 '@peculiar/json-schema': 1.1.12 pvtsutils: 1.3.5 - tslib: 2.7.0 - webcrypto-core: 1.8.0 + tslib: 2.6.2 + webcrypto-core: 1.7.7 '@pkgjs/parseargs@0.11.0': optional: true @@ -10935,123 +10328,113 @@ snapshots: '@protobufjs/utf8@1.1.0': {} - '@radix-ui/react-compose-refs@1.1.0(@types/react@18.3.8)(react@18.3.1)': + '@radix-ui/react-compose-refs@1.0.1(@types/react@18.2.46)(react@18.2.0)': dependencies: - react: 18.3.1 + '@babel/runtime': 7.23.7 + react: 18.2.0 optionalDependencies: - '@types/react': 18.3.8 + '@types/react': 18.2.46 - '@radix-ui/react-slot@1.1.0(@types/react@18.3.8)(react@18.3.1)': + '@radix-ui/react-slot@1.0.2(@types/react@18.2.46)(react@18.2.0)': dependencies: - '@radix-ui/react-compose-refs': 1.1.0(@types/react@18.3.8)(react@18.3.1) - react: 18.3.1 + '@babel/runtime': 7.23.7 + '@radix-ui/react-compose-refs': 1.0.1(@types/react@18.2.46)(react@18.2.0) + react: 18.2.0 optionalDependencies: - '@types/react': 18.3.8 + '@types/react': 18.2.46 - '@repeaterjs/repeater@3.0.6': {} + '@repeaterjs/repeater@3.0.5': {} '@rescript/std@9.0.0': {} - '@rollup/rollup-android-arm-eabi@4.22.2': - optional: true - - '@rollup/rollup-android-arm64@4.22.2': - optional: true - - '@rollup/rollup-darwin-arm64@4.22.2': - optional: true - - '@rollup/rollup-darwin-x64@4.22.2': + '@rollup/rollup-android-arm-eabi@4.9.2': optional: true - '@rollup/rollup-linux-arm-gnueabihf@4.22.2': + '@rollup/rollup-android-arm64@4.9.2': optional: true - '@rollup/rollup-linux-arm-musleabihf@4.22.2': + '@rollup/rollup-darwin-arm64@4.9.2': optional: true - '@rollup/rollup-linux-arm64-gnu@4.22.2': + '@rollup/rollup-darwin-x64@4.9.2': optional: true - '@rollup/rollup-linux-arm64-musl@4.22.2': + '@rollup/rollup-linux-arm-gnueabihf@4.9.2': optional: true - '@rollup/rollup-linux-powerpc64le-gnu@4.22.2': + '@rollup/rollup-linux-arm64-gnu@4.9.2': optional: true - '@rollup/rollup-linux-riscv64-gnu@4.22.2': + '@rollup/rollup-linux-arm64-musl@4.9.2': optional: true - '@rollup/rollup-linux-s390x-gnu@4.22.2': + '@rollup/rollup-linux-riscv64-gnu@4.9.2': optional: true - '@rollup/rollup-linux-x64-gnu@4.22.2': + '@rollup/rollup-linux-x64-gnu@4.9.2': optional: true - '@rollup/rollup-linux-x64-musl@4.22.2': + '@rollup/rollup-linux-x64-musl@4.9.2': optional: true - '@rollup/rollup-win32-arm64-msvc@4.22.2': + '@rollup/rollup-win32-arm64-msvc@4.9.2': optional: true - '@rollup/rollup-win32-ia32-msvc@4.22.2': + '@rollup/rollup-win32-ia32-msvc@4.9.2': optional: true - '@rollup/rollup-win32-x64-msvc@4.22.2': + '@rollup/rollup-win32-x64-msvc@4.9.2': optional: true '@rushstack/eslint-patch@1.6.1': {} - '@scure/base@1.1.9': {} + '@scure/base@1.1.5': {} + + '@scure/base@1.1.8': {} '@scure/bip32@1.3.2': dependencies: '@noble/curves': 1.2.0 - '@noble/hashes': 1.3.2 - '@scure/base': 1.1.9 + '@noble/hashes': 1.3.3 + '@scure/base': 1.1.5 '@scure/bip32@1.4.0': dependencies: '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 - '@scure/base': 1.1.9 + '@scure/base': 1.1.8 '@scure/bip39@1.2.1': dependencies: - '@noble/hashes': 1.3.2 - '@scure/base': 1.1.9 + '@noble/hashes': 1.3.3 + '@scure/base': 1.1.5 '@scure/bip39@1.4.0': dependencies: '@noble/hashes': 1.5.0 - '@scure/base': 1.1.9 + '@scure/base': 1.1.8 - '@segment/analytics-core@1.4.1': + '@segment/analytics-core@1.3.2': dependencies: '@lukeed/uuid': 2.0.1 - '@segment/analytics-generic-utils': 1.1.1 - dset: 3.1.4 - tslib: 2.7.0 + dset: 3.1.3 + tslib: 2.6.2 - '@segment/analytics-generic-utils@1.1.1': - dependencies: - tslib: 2.7.0 + '@segment/analytics-generic-utils@1.0.0': {} - '@segment/analytics-node@1.3.0(encoding@0.1.13)': + '@segment/analytics-node@1.1.3(encoding@0.1.13)': dependencies: '@lukeed/uuid': 2.0.1 - '@segment/analytics-core': 1.4.1 - '@segment/analytics-generic-utils': 1.1.1 + '@segment/analytics-core': 1.3.2 + '@segment/analytics-generic-utils': 1.0.0 buffer: 6.0.3 node-fetch: 2.7.0(encoding@0.1.13) - tslib: 2.7.0 + tslib: 2.6.2 transitivePeerDependencies: - encoding '@sinclair/typebox@0.27.8': {} - '@sindresorhus/merge-streams@2.3.0': {} - '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 @@ -11096,12 +10479,12 @@ snapshots: '@svgr/babel-plugin-transform-react-native-svg': 8.1.0(@babel/core@7.23.7) '@svgr/babel-plugin-transform-svg-component': 8.0.0(@babel/core@7.23.7) - '@svgr/core@8.1.0(typescript@5.6.2)': + '@svgr/core@8.1.0(typescript@5.3.3)': dependencies: '@babel/core': 7.23.7 '@svgr/babel-preset': 8.1.0(@babel/core@7.23.7) camelcase: 6.3.0 - cosmiconfig: 8.3.6(typescript@5.6.2) + cosmiconfig: 8.3.6(typescript@5.3.3) snake-case: 3.0.4 transitivePeerDependencies: - supports-color @@ -11112,61 +10495,54 @@ snapshots: '@babel/types': 7.23.6 entities: 4.5.0 - '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.6.2))': + '@svgr/plugin-jsx@8.1.0(@svgr/core@8.1.0(typescript@5.3.3))': dependencies: '@babel/core': 7.23.7 '@svgr/babel-preset': 8.1.0(@babel/core@7.23.7) - '@svgr/core': 8.1.0(typescript@5.6.2) + '@svgr/core': 8.1.0(typescript@5.3.3) '@svgr/hast-util-to-babel-ast': 8.0.0 svg-parser: 2.0.4 transitivePeerDependencies: - supports-color - '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.6.2))(typescript@5.6.2)': + '@svgr/plugin-svgo@8.1.0(@svgr/core@8.1.0(typescript@5.3.3))(typescript@5.3.3)': dependencies: - '@svgr/core': 8.1.0(typescript@5.6.2) - cosmiconfig: 8.3.6(typescript@5.6.2) + '@svgr/core': 8.1.0(typescript@5.3.3) + cosmiconfig: 8.3.6(typescript@5.3.3) deepmerge: 4.3.1 svgo: 3.2.0 transitivePeerDependencies: - typescript - '@svgr/webpack@8.1.0(typescript@5.6.2)': + '@svgr/webpack@8.1.0(typescript@5.3.3)': dependencies: '@babel/core': 7.23.7 '@babel/plugin-transform-react-constant-elements': 7.23.3(@babel/core@7.23.7) '@babel/preset-env': 7.23.7(@babel/core@7.23.7) '@babel/preset-react': 7.23.3(@babel/core@7.23.7) '@babel/preset-typescript': 7.23.3(@babel/core@7.23.7) - '@svgr/core': 8.1.0(typescript@5.6.2) - '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.6.2)) - '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.6.2))(typescript@5.6.2) + '@svgr/core': 8.1.0(typescript@5.3.3) + '@svgr/plugin-jsx': 8.1.0(@svgr/core@8.1.0(typescript@5.3.3)) + '@svgr/plugin-svgo': 8.1.0(@svgr/core@8.1.0(typescript@5.3.3))(typescript@5.3.3) transitivePeerDependencies: - supports-color - typescript - '@swc/counter@0.1.3': {} - '@swc/helpers@0.5.2': dependencies: - tslib: 2.7.0 - - '@swc/helpers@0.5.5': - dependencies: - '@swc/counter': 0.1.3 - tslib: 2.7.0 + tslib: 2.6.2 - '@tanstack/query-core@5.56.2': {} + '@tanstack/query-core@5.12.1': {} - '@tanstack/react-query@5.56.2(react@18.3.1)': + '@tanstack/react-query@5.12.2(react@18.2.0)': dependencies: - '@tanstack/query-core': 5.56.2 - react: 18.3.1 + '@tanstack/query-core': 5.12.1 + react: 18.2.0 - '@theguild/remark-mermaid@0.0.5(react@18.3.1)': + '@theguild/remark-mermaid@0.0.5(react@18.2.0)': dependencies: mermaid: 10.6.1 - react: 18.3.1 + react: 18.2.0 unist-util-visit: 5.0.0 transitivePeerDependencies: - supports-color @@ -11184,7 +10560,7 @@ snapshots: '@trysound/sax@0.2.0': {} - '@tsconfig/node10@1.0.11': {} + '@tsconfig/node10@1.0.9': {} '@tsconfig/node12@1.0.11': {} @@ -11194,29 +10570,29 @@ snapshots: '@types/acorn@4.0.6': dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 '@types/babel__code-frame@7.0.6': {} - '@types/better-sqlite3@7.6.11': + '@types/better-sqlite3@7.6.10': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 - '@types/bn.js@5.1.6': + '@types/bn.js@5.1.5': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 - '@types/cli-progress@3.11.6': + '@types/cli-progress@3.11.5': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/concat-stream@1.6.1': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/connect@3.4.38': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/d3-scale-chromatic@3.0.3': {} @@ -11236,21 +10612,19 @@ snapshots: '@types/estree@1.0.5': {} - '@types/estree@1.0.6': {} - '@types/form-data@0.0.33': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/fs-extra@11.0.4': dependencies: '@types/jsonfile': 6.1.4 - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/glob@8.1.0': dependencies: '@types/minimatch': 5.1.2 - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/hast@2.3.10': dependencies: @@ -11264,7 +10638,7 @@ snapshots: '@types/jsonfile@6.1.4': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/katex@0.16.7': {} @@ -11284,51 +10658,58 @@ snapshots: '@types/minimatch@5.1.2': {} + '@types/minimist@1.2.5': {} + '@types/ms@0.7.34': {} '@types/node@10.17.60': {} '@types/node@12.20.55': {} - '@types/node@20.16.5': + '@types/node@20.11.24': dependencies: - undici-types: 6.19.8 + undici-types: 5.26.5 '@types/node@8.10.66': {} + '@types/normalize-package-data@2.4.4': {} + '@types/parse-json@4.0.2': {} '@types/pbkdf2@3.1.2': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 - '@types/pg@8.11.10': + '@types/pg@8.10.9': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 pg-protocol: 1.6.0 pg-types: 4.0.1 '@types/prompts@2.4.9': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 kleur: 3.0.3 '@types/prop-types@15.7.11': {} - '@types/qs@6.9.16': {} + '@types/qs@6.9.11': {} - '@types/react-dom@18.3.0': + '@types/react-dom@18.2.17': dependencies: - '@types/react': 18.3.8 + '@types/react': 18.2.46 - '@types/react@18.3.8': + '@types/react@18.2.46': dependencies: '@types/prop-types': 15.7.11 + '@types/scheduler': 0.16.8 csstype: 3.1.3 + '@types/scheduler@0.16.8': {} + '@types/secp256k1@4.0.6': dependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 '@types/semver@7.5.6': {} @@ -11340,36 +10721,18 @@ snapshots: '@types/ws@7.4.7': dependencies: - '@types/node': 20.16.5 - - '@typescript-eslint/eslint-plugin@8.6.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/regexpp': 4.11.1 - '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/type-utils': 8.6.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/visitor-keys': 8.6.0 - eslint: 8.57.1 - graphemer: 1.4.0 - ignore: 5.3.2 - natural-compare: 1.4.0 - ts-api-utils: 1.3.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color + '@types/node': 20.11.24 - '@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2)': + '@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3)': dependencies: '@typescript-eslint/scope-manager': 6.17.0 '@typescript-eslint/types': 6.17.0 - '@typescript-eslint/typescript-estree': 6.17.0(typescript@5.6.2) + '@typescript-eslint/typescript-estree': 6.17.0(typescript@5.3.3) '@typescript-eslint/visitor-keys': 6.17.0 - debug: 4.3.7(supports-color@8.1.1) - eslint: 8.57.1 + debug: 4.3.4(supports-color@8.1.1) + eslint: 8.56.0 optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 transitivePeerDependencies: - supports-color @@ -11378,78 +10741,28 @@ snapshots: '@typescript-eslint/types': 6.17.0 '@typescript-eslint/visitor-keys': 6.17.0 - '@typescript-eslint/scope-manager@8.6.0': - dependencies: - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/visitor-keys': 8.6.0 - - '@typescript-eslint/type-utils@8.6.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - '@typescript-eslint/utils': 8.6.0(eslint@8.57.1)(typescript@5.6.2) - debug: 4.3.7(supports-color@8.1.1) - ts-api-utils: 1.3.0(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - eslint - - supports-color - '@typescript-eslint/types@6.17.0': {} - '@typescript-eslint/types@8.6.0': {} - - '@typescript-eslint/typescript-estree@6.17.0(typescript@5.6.2)': + '@typescript-eslint/typescript-estree@6.17.0(typescript@5.3.3)': dependencies: '@typescript-eslint/types': 6.17.0 '@typescript-eslint/visitor-keys': 6.17.0 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) globby: 11.1.0 is-glob: 4.0.3 minimatch: 9.0.3 - semver: 7.6.3 - ts-api-utils: 1.0.3(typescript@5.6.2) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/typescript-estree@8.6.0(typescript@5.6.2)': - dependencies: - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/visitor-keys': 8.6.0 - debug: 4.3.7(supports-color@8.1.1) - fast-glob: 3.3.2 - is-glob: 4.0.3 - minimatch: 9.0.5 - semver: 7.6.3 - ts-api-utils: 1.3.0(typescript@5.6.2) + semver: 7.6.2 + ts-api-utils: 1.0.3(typescript@5.3.3) optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - supports-color - - '@typescript-eslint/utils@8.6.0(eslint@8.57.1)(typescript@5.6.2)': - dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@typescript-eslint/scope-manager': 8.6.0 - '@typescript-eslint/types': 8.6.0 - '@typescript-eslint/typescript-estree': 8.6.0(typescript@5.6.2) - eslint: 8.57.1 + typescript: 5.3.3 transitivePeerDependencies: - supports-color - - typescript '@typescript-eslint/visitor-keys@6.17.0': dependencies: '@typescript-eslint/types': 6.17.0 eslint-visitor-keys: 3.4.3 - '@typescript-eslint/visitor-keys@8.6.0': - dependencies: - '@typescript-eslint/types': 8.6.0 - eslint-visitor-keys: 3.4.3 - '@ungap/structured-clone@1.2.0': {} '@viem/anvil@0.0.6': @@ -11457,52 +10770,51 @@ snapshots: execa: 7.2.0 get-port: 6.1.2 http-proxy: 1.18.1 - ws: 8.18.0 + ws: 8.16.0 transitivePeerDependencies: - bufferutil - debug - utf-8-validate - '@vitest/expect@1.6.0': + '@vitest/expect@1.0.2': dependencies: - '@vitest/spy': 1.6.0 - '@vitest/utils': 1.6.0 - chai: 4.5.0 + '@vitest/spy': 1.0.2 + '@vitest/utils': 1.0.2 + chai: 4.3.10 - '@vitest/runner@1.6.0': + '@vitest/runner@1.0.2': dependencies: - '@vitest/utils': 1.6.0 + '@vitest/utils': 1.0.2 p-limit: 5.0.0 - pathe: 1.1.2 + pathe: 1.1.1 - '@vitest/snapshot@1.6.0': + '@vitest/snapshot@1.0.2': dependencies: - magic-string: 0.30.11 - pathe: 1.1.2 + magic-string: 0.30.5 + pathe: 1.1.1 pretty-format: 29.7.0 - '@vitest/spy@1.6.0': + '@vitest/spy@1.0.2': dependencies: - tinyspy: 2.2.1 + tinyspy: 2.2.0 - '@vitest/utils@1.6.0': + '@vitest/utils@1.0.2': dependencies: diff-sequences: 29.6.3 - estree-walker: 3.0.3 loupe: 2.3.7 pretty-format: 29.7.0 - '@wagmi/cli@1.5.2(typescript@5.6.2)': + '@wagmi/cli@1.5.2(typescript@5.3.3)': dependencies: - abitype: 0.8.7(typescript@5.6.2)(zod@3.23.8) + abitype: 0.8.7(typescript@5.3.3)(zod@3.23.8) abort-controller: 3.0.0 bundle-require: 3.1.2(esbuild@0.16.17) cac: 6.7.14 change-case: 4.1.2 - chokidar: 3.6.0 + chokidar: 3.5.3 dedent: 0.7.0 detect-package-manager: 2.0.1 - dotenv: 16.4.5 + dotenv: 16.3.1 dotenv-expand: 10.0.0 esbuild: 0.16.17 execa: 6.1.0 @@ -11511,34 +10823,32 @@ snapshots: globby: 13.2.2 node-fetch: 3.3.2 ora: 6.3.1 - pathe: 1.1.2 - picocolors: 1.1.0 + pathe: 1.1.1 + picocolors: 1.0.0 prettier: 2.8.8 - viem: 1.21.4(typescript@5.6.2)(zod@3.23.8) + viem: 1.21.4(typescript@5.3.3)(zod@3.23.8) zod: 3.23.8 optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 transitivePeerDependencies: - bufferutil - utf-8-validate '@whatwg-node/events@0.0.3': {} - '@whatwg-node/events@0.1.2': - dependencies: - tslib: 2.7.0 + '@whatwg-node/events@0.1.1': {} '@whatwg-node/fetch@0.8.8': dependencies: - '@peculiar/webcrypto': 1.5.0 + '@peculiar/webcrypto': 1.4.3 '@whatwg-node/node-fetch': 0.3.6 busboy: 1.6.0 urlpattern-polyfill: 8.0.2 - web-streams-polyfill: 3.3.3 + web-streams-polyfill: 3.2.1 - '@whatwg-node/fetch@0.9.21': + '@whatwg-node/fetch@0.9.17': dependencies: - '@whatwg-node/node-fetch': 0.5.26 + '@whatwg-node/node-fetch': 0.5.11 urlpattern-polyfill: 10.0.0 '@whatwg-node/node-fetch@0.3.6': @@ -11547,19 +10857,20 @@ snapshots: busboy: 1.6.0 fast-querystring: 1.1.2 fast-url-parser: 1.1.3 - tslib: 2.7.0 + tslib: 2.6.2 - '@whatwg-node/node-fetch@0.5.26': + '@whatwg-node/node-fetch@0.5.11': dependencies: '@kamilkisiela/fast-url-parser': 1.1.4 + '@whatwg-node/events': 0.1.1 busboy: 1.6.0 fast-querystring: 1.1.2 - tslib: 2.7.0 + tslib: 2.6.2 - '@whatwg-node/server@0.9.49': + '@whatwg-node/server@0.9.34': dependencies: - '@whatwg-node/fetch': 0.9.21 - tslib: 2.7.0 + '@whatwg-node/fetch': 0.9.17 + tslib: 2.6.2 JSONStream@1.3.2: dependencies: @@ -11571,54 +10882,57 @@ snapshots: jsonparse: 1.3.1 through: 2.3.8 - abitype@0.10.3(typescript@5.6.2)(zod@3.23.8): + abitype@0.10.3(typescript@5.3.3)(zod@3.23.8): optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 zod: 3.23.8 - abitype@0.8.7(typescript@5.6.2)(zod@3.23.8): + abitype@0.8.7(typescript@5.3.3)(zod@3.23.8): dependencies: - typescript: 5.6.2 + typescript: 5.3.3 optionalDependencies: zod: 3.23.8 - abitype@0.9.8(typescript@5.6.2)(zod@3.23.8): + abitype@0.9.8(typescript@5.3.3)(zod@3.23.8): optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 zod: 3.23.8 - abitype@1.0.5(typescript@5.0.4)(zod@3.23.8): + abitype@1.0.1(typescript@5.3.3)(zod@3.23.8): optionalDependencies: - typescript: 5.0.4 + typescript: 5.3.3 zod: 3.23.8 - abitype@1.0.5(typescript@5.6.2)(zod@3.23.8): + abitype@1.0.5(typescript@5.0.4)(zod@3.23.8): optionalDependencies: - typescript: 5.6.2 + typescript: 5.0.4 zod: 3.23.8 - abitype@1.0.6(typescript@5.6.2)(zod@3.23.8): + abitype@1.0.5(typescript@5.3.3)(zod@3.23.8): optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 zod: 3.23.8 abort-controller@3.0.0: dependencies: event-target-shim: 5.0.1 - acorn-jsx@5.3.2(acorn@8.12.1): + acorn-jsx@5.3.2(acorn@8.11.3): dependencies: - acorn: 8.12.1 + acorn: 8.11.3 - acorn-walk@8.3.4: - dependencies: - acorn: 8.12.1 + acorn-walk@8.3.1: {} + + acorn@8.11.3: {} - acorn@8.12.1: {} + aggregate-error@4.0.1: + dependencies: + clean-stack: 4.2.0 + indent-string: 5.0.0 ajv-formats@2.1.1: dependencies: - ajv: 8.17.1 + ajv: 8.12.0 ajv@6.12.6: dependencies: @@ -11627,12 +10941,12 @@ snapshots: json-schema-traverse: 0.4.1 uri-js: 4.4.1 - ajv@8.17.1: + ajv@8.12.0: dependencies: fast-deep-equal: 3.1.3 - fast-uri: 3.0.1 json-schema-traverse: 1.0.0 require-from-string: 2.0.2 + uri-js: 4.4.1 ansi-colors@4.1.3: {} @@ -11640,17 +10954,15 @@ snapshots: dependencies: type-fest: 0.21.3 - ansi-escapes@6.2.1: {} - - ansi-escapes@7.0.0: + ansi-escapes@6.2.0: dependencies: - environment: 1.1.0 + type-fest: 3.13.1 ansi-regex@4.1.1: {} ansi-regex@5.0.1: {} - ansi-regex@6.1.0: {} + ansi-regex@6.0.1: {} ansi-styles@3.2.1: dependencies: @@ -11761,6 +11073,8 @@ snapshots: is-array-buffer: 3.0.2 is-shared-array-buffer: 1.0.2 + arrify@1.0.1: {} + asap@2.0.6: {} asn1@0.2.6: @@ -11771,7 +11085,7 @@ snapshots: dependencies: pvtsutils: 1.3.5 pvutils: 1.1.3 - tslib: 2.7.0 + tslib: 2.6.2 assemblyscript@0.19.10: dependencies: @@ -11794,7 +11108,7 @@ snapshots: astring@1.8.6: {} - async@3.2.6: {} + async@3.2.5: {} asynciterator.prototype@1.0.0: dependencies: @@ -11806,40 +11120,40 @@ snapshots: atomic-sleep@1.0.0: {} - atomically@2.0.3: + atomically@2.0.2: dependencies: stubborn-fs: 1.2.5 - when-exit: 2.1.3 + when-exit: 2.1.2 auto-bind@5.0.1: {} - autoprefixer@10.4.20(postcss@8.4.47): + autoprefixer@10.4.16(postcss@8.4.32): dependencies: - browserslist: 4.23.3 - caniuse-lite: 1.0.30001662 + browserslist: 4.22.2 + caniuse-lite: 1.0.30001572 fraction.js: 4.3.7 normalize-range: 0.1.2 - picocolors: 1.1.0 - postcss: 8.4.47 + picocolors: 1.0.0 + postcss: 8.4.32 postcss-value-parser: 4.2.0 available-typed-arrays@1.0.5: {} aws-sign2@0.7.0: {} - aws4@1.13.2: {} + aws4@1.12.0: {} axe-core@4.7.0: {} axios@0.21.4(debug@4.3.4): dependencies: - follow-redirects: 1.15.9(debug@4.3.4) + follow-redirects: 1.15.6(debug@4.3.4) transitivePeerDependencies: - debug - axios@1.7.7: + axios@1.6.8: dependencies: - follow-redirects: 1.15.9(debug@4.3.4) + follow-redirects: 1.15.6(debug@4.3.4) form-data: 4.0.0 proxy-from-env: 1.1.0 transitivePeerDependencies: @@ -11877,7 +11191,7 @@ snapshots: balanced-match@1.0.2: {} - base-x@3.0.10: + base-x@3.0.9: dependencies: safe-buffer: 5.2.1 @@ -11891,23 +11205,23 @@ snapshots: dependencies: is-windows: 1.0.2 - better-react-mathjax@2.0.3(react@18.3.1): + better-react-mathjax@2.0.3(react@18.2.0): dependencies: mathjax-full: 3.2.2 - react: 18.3.1 + react: 18.2.0 - better-sqlite3@11.3.0: + better-sqlite3@11.1.2: dependencies: bindings: 1.5.0 prebuild-install: 7.1.2 - binary-extensions@2.3.0: {} + binary-extensions@2.2.0: {} binary-install-raw@0.0.13(debug@4.3.4): dependencies: axios: 0.21.4(debug@4.3.4) rimraf: 3.0.2 - tar: 6.2.1 + tar: 6.2.0 transitivePeerDependencies: - debug @@ -11967,9 +11281,9 @@ snapshots: dependencies: fill-range: 7.0.1 - braces@3.0.3: + breakword@1.0.6: dependencies: - fill-range: 7.1.1 + wcwidth: 1.0.1 brorand@1.1.0: {} @@ -11984,16 +11298,16 @@ snapshots: inherits: 2.0.4 safe-buffer: 5.2.1 - browserslist@4.23.3: + browserslist@4.22.2: dependencies: - caniuse-lite: 1.0.30001662 - electron-to-chromium: 1.5.26 - node-releases: 2.0.18 - update-browserslist-db: 1.1.0(browserslist@4.23.3) + caniuse-lite: 1.0.30001572 + electron-to-chromium: 1.4.619 + node-releases: 2.0.14 + update-browserslist-db: 1.0.13(browserslist@4.22.2) bs58@4.0.1: dependencies: - base-x: 3.0.10 + base-x: 3.0.9 bs58check@2.1.2: dependencies: @@ -12012,6 +11326,8 @@ snapshots: buffer-from@1.1.2: {} + buffer-writer@2.0.0: {} + buffer-xor@1.0.3: {} buffer@5.7.1: @@ -12024,14 +11340,18 @@ snapshots: base64-js: 1.5.1 ieee754: 1.2.1 + builtins@5.0.1: + dependencies: + semver: 7.6.2 + bundle-require@3.1.2(esbuild@0.16.17): dependencies: esbuild: 0.16.17 load-tsconfig: 0.2.5 - bundle-require@5.0.0(esbuild@0.23.1): + bundle-require@4.0.2(esbuild@0.19.11): dependencies: - esbuild: 0.23.1 + esbuild: 0.19.11 load-tsconfig: 0.2.5 busboy@1.6.0: @@ -12046,31 +11366,31 @@ snapshots: get-intrinsic: 1.2.2 set-function-length: 1.1.1 - call-bind@1.0.7: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - set-function-length: 1.2.2 - callsites@3.1.0: {} camel-case@4.1.2: dependencies: pascal-case: 3.1.2 - tslib: 2.7.0 + tslib: 2.6.2 camelcase-css@2.0.1: {} + camelcase-keys@6.2.2: + dependencies: + camelcase: 5.3.1 + map-obj: 4.3.0 + quick-lru: 4.0.1 + + camelcase@5.3.1: {} + camelcase@6.3.0: {} - caniuse-lite@1.0.30001662: {} + caniuse-lite@1.0.30001572: {} capital-case@1.0.4: dependencies: no-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 upper-case-first: 2.0.2 cardinal@2.1.1: @@ -12084,15 +11404,15 @@ snapshots: ccount@2.0.1: {} - chai@4.5.0: + chai@4.3.10: dependencies: assertion-error: 1.1.0 check-error: 1.0.3 - deep-eql: 4.1.4 + deep-eql: 4.1.3 get-func-name: 2.0.2 loupe: 2.3.7 pathval: 1.1.1 - type-detect: 4.1.0 + type-detect: 4.0.8 chalk@2.3.0: dependencies: @@ -12131,7 +11451,7 @@ snapshots: path-case: 3.0.4 sentence-case: 3.0.4 snake-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 character-entities-html4@2.1.0: {} @@ -12150,19 +11470,7 @@ snapshots: chokidar@3.5.3: dependencies: anymatch: 3.1.3 - braces: 3.0.3 - glob-parent: 5.1.2 - is-binary-path: 2.1.0 - is-glob: 4.0.3 - normalize-path: 3.0.0 - readdirp: 3.6.0 - optionalDependencies: - fsevents: 2.3.3 - - chokidar@3.6.0: - dependencies: - anymatch: 3.1.3 - braces: 3.0.3 + braces: 3.0.2 glob-parent: 5.1.2 is-binary-path: 2.1.0 is-glob: 4.0.3 @@ -12190,6 +11498,10 @@ snapshots: dependencies: escape-string-regexp: 4.0.0 + clean-stack@4.2.0: + dependencies: + escape-string-regexp: 5.0.0 + cli-boxes@3.0.0: {} cli-cursor@3.1.0: @@ -12200,10 +11512,6 @@ snapshots: dependencies: restore-cursor: 4.0.0 - cli-cursor@5.0.0: - dependencies: - restore-cursor: 5.1.0 - cli-progress@3.12.0: dependencies: string-width: 4.2.3 @@ -12225,7 +11533,7 @@ snapshots: cli-truncate@4.0.0: dependencies: slice-ansi: 5.0.0 - string-width: 7.2.0 + string-width: 7.0.0 client-only@0.0.1: {} @@ -12234,11 +11542,23 @@ snapshots: arch: 2.2.0 execa: 0.8.0 + cliui@6.0.0: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 6.2.0 + + cliui@8.0.1: + dependencies: + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi: 7.0.0 + clone@1.0.4: {} clsx@2.0.0: {} - clsx@2.1.1: {} + clsx@2.1.0: {} code-excerpt@4.0.0: dependencies: @@ -12266,7 +11586,9 @@ snapshots: comma-separated-tokens@2.0.3: {} - commander@12.1.0: {} + commander@11.1.0: {} + + commander@12.0.0: {} commander@2.20.3: {} @@ -12291,24 +11613,20 @@ snapshots: conf@12.0.0: dependencies: - ajv: 8.17.1 + ajv: 8.12.0 ajv-formats: 2.1.1 - atomically: 2.0.3 + atomically: 2.0.2 debounce-fn: 5.1.2 dot-prop: 8.0.2 env-paths: 3.0.0 json-schema-typed: 8.0.1 - semver: 7.6.3 + semver: 7.6.2 uint8array-extras: 0.3.0 - confbox@0.1.7: {} - - consola@3.2.3: {} - constant-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 upper-case: 2.0.2 convert-source-map@2.0.0: {} @@ -12322,7 +11640,7 @@ snapshots: core-js-compat@3.35.0: dependencies: - browserslist: 4.23.3 + browserslist: 4.22.2 core-util-is@1.0.2: {} @@ -12344,25 +11662,25 @@ snapshots: path-type: 4.0.0 yaml: 1.10.2 - cosmiconfig@8.3.6(typescript@5.6.2): + cosmiconfig@8.3.6(typescript@5.3.3): dependencies: import-fresh: 3.3.0 js-yaml: 4.1.0 parse-json: 5.2.0 path-type: 4.0.0 optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 countup.js@2.8.0: {} - cpy@11.1.0: + cpy@11.0.0: dependencies: copy-file: 11.0.0 - globby: 14.0.2 + globby: 13.2.2 junk: 4.0.1 - micromatch: 4.0.8 - p-filter: 4.1.0 - p-map: 7.0.2 + micromatch: 4.0.5 + p-filter: 3.0.0 + p-map: 6.0.0 create-hash@1.2.0: dependencies: @@ -12389,9 +11707,9 @@ snapshots: transitivePeerDependencies: - encoding - cross-inspect@1.0.1: + cross-inspect@1.0.0: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 cross-spawn@5.1.0: dependencies: @@ -12416,12 +11734,12 @@ snapshots: css-tree@2.2.1: dependencies: mdn-data: 2.0.28 - source-map-js: 1.2.1 + source-map-js: 1.0.2 css-tree@2.3.1: dependencies: mdn-data: 2.0.30 - source-map-js: 1.2.1 + source-map-js: 1.0.2 css-what@6.1.0: {} @@ -12433,6 +11751,19 @@ snapshots: csstype@3.1.3: {} + csv-generate@3.4.3: {} + + csv-parse@4.16.3: {} + + csv-stringify@5.6.5: {} + + csv@5.5.3: + dependencies: + csv-generate: 3.4.3 + csv-parse: 4.16.3 + csv-stringify: 5.6.5 + stream-transform: 2.1.3 + cytoscape-cose-bilkent@4.1.0(cytoscape@3.28.1): dependencies: cose-base: 1.0.3 @@ -12642,16 +11973,19 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4: + debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 - - debug@4.3.7(supports-color@8.1.1): - dependencies: - ms: 2.1.3 optionalDependencies: supports-color: 8.1.1 + decamelize-keys@1.1.1: + dependencies: + decamelize: 1.2.0 + map-obj: 1.0.1 + + decamelize@1.2.0: {} + decode-named-character-reference@1.0.2: dependencies: character-entities: 2.0.2 @@ -12662,9 +11996,9 @@ snapshots: dedent@0.7.0: {} - deep-eql@4.1.4: + deep-eql@4.1.3: dependencies: - type-detect: 4.1.0 + type-detect: 4.0.8 deep-extend@0.6.0: {} @@ -12682,12 +12016,6 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 - define-data-property@1.1.4: - dependencies: - es-define-property: 1.0.0 - es-errors: 1.3.0 - gopd: 1.0.1 - define-properties@1.2.1: dependencies: define-data-property: 1.1.1 @@ -12726,7 +12054,7 @@ snapshots: diff@4.0.2: {} - diff@5.2.0: {} + diff@5.1.0: {} dir-glob@3.0.1: dependencies: @@ -12736,7 +12064,7 @@ snapshots: dns-over-http-resolver@1.2.3(node-fetch@3.3.2): dependencies: - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) native-fetch: 3.0.0(node-fetch@3.3.2) receptacle: 1.3.2 transitivePeerDependencies: @@ -12795,7 +12123,7 @@ snapshots: dot-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 dot-prop@8.0.2: dependencies: @@ -12803,33 +12131,31 @@ snapshots: dotenv-expand@10.0.0: {} - dotenv@16.4.5: {} + dotenv@16.3.1: {} dotenv@8.6.0: {} drizzle-kit@0.22.8: dependencies: '@esbuild-kit/esm-loader': 2.6.5 - esbuild: 0.19.12 - esbuild-register: 3.6.0(esbuild@0.19.12) + esbuild: 0.19.11 + esbuild-register: 3.6.0(esbuild@0.19.11) transitivePeerDependencies: - supports-color - drizzle-orm@0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.11)(@types/pg@8.11.10)(@types/react@18.3.8)(better-sqlite3@11.3.0)(kysely@0.26.3)(pg@8.13.0)(react@18.3.1): + drizzle-orm@0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0): optionalDependencies: '@opentelemetry/api': 1.7.0 - '@types/better-sqlite3': 7.6.11 - '@types/pg': 8.11.10 - '@types/react': 18.3.8 - better-sqlite3: 11.3.0 + '@types/better-sqlite3': 7.6.10 + '@types/pg': 8.10.9 + '@types/react': 18.2.46 + better-sqlite3: 11.1.2 kysely: 0.26.3 - pg: 8.13.0 - react: 18.3.1 + pg: 8.11.3 + react: 18.2.0 dset@3.1.3: {} - dset@3.1.4: {} - eastasianwidth@0.2.0: {} ecc-jsbn@0.1.2: @@ -12837,19 +12163,19 @@ snapshots: jsbn: 0.1.1 safer-buffer: 2.1.2 - ejs@3.1.10: + ejs@3.1.6: dependencies: - jake: 10.9.2 + jake: 10.8.7 - ejs@3.1.6: + ejs@3.1.9: dependencies: - jake: 10.9.2 + jake: 10.8.7 electron-fetch@1.9.1: dependencies: encoding: 0.1.13 - electron-to-chromium@1.5.26: {} + electron-to-chromium@1.4.619: {} elkjs@0.8.2: {} @@ -12863,16 +12189,6 @@ snapshots: minimalistic-assert: 1.0.1 minimalistic-crypto-utils: 1.0.1 - elliptic@6.5.7: - dependencies: - bn.js: 4.12.0 - brorand: 1.1.0 - hash.js: 1.1.7 - hmac-drbg: 1.0.1 - inherits: 2.0.4 - minimalistic-assert: 1.0.1 - minimalistic-crypto-utils: 1.0.1 - emoji-regex@10.4.0: {} emoji-regex@8.0.0: {} @@ -12905,8 +12221,6 @@ snapshots: env-paths@3.0.0: {} - environment@1.1.0: {} - err-code@3.0.1: {} error-ex@1.3.2: @@ -12955,12 +12269,6 @@ snapshots: unbox-primitive: 1.0.2 which-typed-array: 1.1.13 - es-define-property@1.0.0: - dependencies: - get-intrinsic: 1.2.4 - - es-errors@1.3.0: {} - es-iterator-helpers@1.0.15: dependencies: asynciterator.prototype: 1.0.0 @@ -13000,10 +12308,10 @@ snapshots: dependencies: es6-promise: 4.2.8 - esbuild-register@3.6.0(esbuild@0.19.12): + esbuild-register@3.6.0(esbuild@0.19.11): dependencies: - debug: 4.3.7(supports-color@8.1.1) - esbuild: 0.19.12 + debug: 4.3.4(supports-color@8.1.1) + esbuild: 0.19.11 transitivePeerDependencies: - supports-color @@ -13056,87 +12364,34 @@ snapshots: '@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 - '@esbuild/android-arm': 0.21.5 - '@esbuild/android-arm64': 0.21.5 - '@esbuild/android-x64': 0.21.5 - '@esbuild/darwin-arm64': 0.21.5 - '@esbuild/darwin-x64': 0.21.5 - '@esbuild/freebsd-arm64': 0.21.5 - '@esbuild/freebsd-x64': 0.21.5 - '@esbuild/linux-arm': 0.21.5 - '@esbuild/linux-arm64': 0.21.5 - '@esbuild/linux-ia32': 0.21.5 - '@esbuild/linux-loong64': 0.21.5 - '@esbuild/linux-mips64el': 0.21.5 - '@esbuild/linux-ppc64': 0.21.5 - '@esbuild/linux-riscv64': 0.21.5 - '@esbuild/linux-s390x': 0.21.5 - '@esbuild/linux-x64': 0.21.5 - '@esbuild/netbsd-x64': 0.21.5 - '@esbuild/openbsd-x64': 0.21.5 - '@esbuild/sunos-x64': 0.21.5 - '@esbuild/win32-arm64': 0.21.5 - '@esbuild/win32-ia32': 0.21.5 - '@esbuild/win32-x64': 0.21.5 - - esbuild@0.23.1: + + esbuild@0.19.11: optionalDependencies: - '@esbuild/aix-ppc64': 0.23.1 - '@esbuild/android-arm': 0.23.1 - '@esbuild/android-arm64': 0.23.1 - '@esbuild/android-x64': 0.23.1 - '@esbuild/darwin-arm64': 0.23.1 - '@esbuild/darwin-x64': 0.23.1 - '@esbuild/freebsd-arm64': 0.23.1 - '@esbuild/freebsd-x64': 0.23.1 - '@esbuild/linux-arm': 0.23.1 - '@esbuild/linux-arm64': 0.23.1 - '@esbuild/linux-ia32': 0.23.1 - '@esbuild/linux-loong64': 0.23.1 - '@esbuild/linux-mips64el': 0.23.1 - '@esbuild/linux-ppc64': 0.23.1 - '@esbuild/linux-riscv64': 0.23.1 - '@esbuild/linux-s390x': 0.23.1 - '@esbuild/linux-x64': 0.23.1 - '@esbuild/netbsd-x64': 0.23.1 - '@esbuild/openbsd-arm64': 0.23.1 - '@esbuild/openbsd-x64': 0.23.1 - '@esbuild/sunos-x64': 0.23.1 - '@esbuild/win32-arm64': 0.23.1 - '@esbuild/win32-ia32': 0.23.1 - '@esbuild/win32-x64': 0.23.1 - - escalade@3.2.0: {} + '@esbuild/aix-ppc64': 0.19.11 + '@esbuild/android-arm': 0.19.11 + '@esbuild/android-arm64': 0.19.11 + '@esbuild/android-x64': 0.19.11 + '@esbuild/darwin-arm64': 0.19.11 + '@esbuild/darwin-x64': 0.19.11 + '@esbuild/freebsd-arm64': 0.19.11 + '@esbuild/freebsd-x64': 0.19.11 + '@esbuild/linux-arm': 0.19.11 + '@esbuild/linux-arm64': 0.19.11 + '@esbuild/linux-ia32': 0.19.11 + '@esbuild/linux-loong64': 0.19.11 + '@esbuild/linux-mips64el': 0.19.11 + '@esbuild/linux-ppc64': 0.19.11 + '@esbuild/linux-riscv64': 0.19.11 + '@esbuild/linux-s390x': 0.19.11 + '@esbuild/linux-x64': 0.19.11 + '@esbuild/netbsd-x64': 0.19.11 + '@esbuild/openbsd-x64': 0.19.11 + '@esbuild/sunos-x64': 0.19.11 + '@esbuild/win32-arm64': 0.19.11 + '@esbuild/win32-ia32': 0.19.11 + '@esbuild/win32-x64': 0.19.11 + + escalade@3.1.1: {} escape-string-regexp@1.0.5: {} @@ -13146,39 +12401,20 @@ snapshots: escape-string-regexp@5.0.0: {} - eslint-config-next@14.0.3(eslint@8.57.1)(typescript@5.6.2): + eslint-config-next@14.0.3(eslint@8.56.0)(typescript@5.3.3): dependencies: '@next/eslint-plugin-next': 14.0.3 '@rushstack/eslint-patch': 1.6.1 - '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 - eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1) - eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.1) - eslint-plugin-react: 7.33.2(eslint@8.57.1) - eslint-plugin-react-hooks: 4.6.0(eslint@8.57.1) - optionalDependencies: - typescript: 5.6.2 - transitivePeerDependencies: - - eslint-import-resolver-webpack - - supports-color - - eslint-config-next@14.2.13(eslint@8.57.1)(typescript@5.6.2): - dependencies: - '@next/eslint-plugin-next': 14.2.13 - '@rushstack/eslint-patch': 1.6.1 - '@typescript-eslint/eslint-plugin': 8.6.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint@8.57.1)(typescript@5.6.2) - '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 + '@typescript-eslint/parser': 6.17.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1) - eslint-plugin-jsx-a11y: 6.8.0(eslint@8.57.1) - eslint-plugin-react: 7.33.2(eslint@8.57.1) - eslint-plugin-react-hooks: 4.6.0(eslint@8.57.1) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) + eslint-plugin-jsx-a11y: 6.8.0(eslint@8.56.0) + eslint-plugin-react: 7.33.2(eslint@8.56.0) + eslint-plugin-react-hooks: 4.6.0(eslint@8.56.0) optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 transitivePeerDependencies: - eslint-import-resolver-webpack - supports-color @@ -13191,13 +12427,13 @@ snapshots: transitivePeerDependencies: - supports-color - eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1): + eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0): dependencies: - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) enhanced-resolve: 5.15.0 - eslint: 8.57.1 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1))(eslint@8.57.1) - eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1) + eslint: 8.56.0 + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0) + eslint-plugin-import: 2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0) fast-glob: 3.3.2 get-tsconfig: 4.7.2 is-core-module: 2.13.1 @@ -13208,18 +12444,18 @@ snapshots: - eslint-import-resolver-webpack - supports-color - eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1))(eslint@8.57.1): + eslint-module-utils@2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0): dependencies: debug: 3.2.7 optionalDependencies: - '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) - eslint: 8.57.1 + '@typescript-eslint/parser': 6.17.0(eslint@8.56.0)(typescript@5.3.3) + eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1) + eslint-import-resolver-typescript: 3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0) transitivePeerDependencies: - supports-color - eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-typescript@3.6.1)(eslint@8.57.1): + eslint-plugin-import@2.29.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-typescript@3.6.1)(eslint@8.56.0): dependencies: array-includes: 3.1.7 array.prototype.findlastindex: 1.2.3 @@ -13227,9 +12463,9 @@ snapshots: array.prototype.flatmap: 1.3.2 debug: 3.2.7 doctrine: 2.1.0 - eslint: 8.57.1 + eslint: 8.56.0 eslint-import-resolver-node: 0.3.9 - eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.57.1)(typescript@5.6.2))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.57.1))(eslint@8.57.1) + eslint-module-utils: 2.8.0(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-import-resolver-typescript@3.6.1(@typescript-eslint/parser@6.17.0(eslint@8.56.0)(typescript@5.3.3))(eslint-import-resolver-node@0.3.9)(eslint-plugin-import@2.29.1)(eslint@8.56.0))(eslint@8.56.0) hasown: 2.0.0 is-core-module: 2.13.1 is-glob: 4.0.3 @@ -13240,13 +12476,13 @@ snapshots: semver: 6.3.1 tsconfig-paths: 3.15.0 optionalDependencies: - '@typescript-eslint/parser': 6.17.0(eslint@8.57.1)(typescript@5.6.2) + '@typescript-eslint/parser': 6.17.0(eslint@8.56.0)(typescript@5.3.3) transitivePeerDependencies: - eslint-import-resolver-typescript - eslint-import-resolver-webpack - supports-color - eslint-plugin-jsx-a11y@6.8.0(eslint@8.57.1): + eslint-plugin-jsx-a11y@6.8.0(eslint@8.56.0): dependencies: '@babel/runtime': 7.23.7 aria-query: 5.3.0 @@ -13258,7 +12494,7 @@ snapshots: damerau-levenshtein: 1.0.8 emoji-regex: 9.2.2 es-iterator-helpers: 1.0.15 - eslint: 8.57.1 + eslint: 8.56.0 hasown: 2.0.0 jsx-ast-utils: 3.3.5 language-tags: 1.0.9 @@ -13266,18 +12502,18 @@ snapshots: object.entries: 1.1.7 object.fromentries: 2.0.7 - eslint-plugin-react-hooks@4.6.0(eslint@8.57.1): + eslint-plugin-react-hooks@4.6.0(eslint@8.56.0): dependencies: - eslint: 8.57.1 + eslint: 8.56.0 - eslint-plugin-react@7.33.2(eslint@8.57.1): + eslint-plugin-react@7.33.2(eslint@8.56.0): dependencies: array-includes: 3.1.7 array.prototype.flatmap: 1.3.2 array.prototype.tosorted: 1.1.2 doctrine: 2.1.0 es-iterator-helpers: 1.0.15 - eslint: 8.57.1 + eslint: 8.56.0 estraverse: 5.3.0 jsx-ast-utils: 3.3.5 minimatch: 3.1.2 @@ -13297,26 +12533,26 @@ snapshots: eslint-visitor-keys@3.4.3: {} - eslint@8.57.1: + eslint@8.56.0: dependencies: - '@eslint-community/eslint-utils': 4.4.0(eslint@8.57.1) - '@eslint-community/regexpp': 4.11.1 + '@eslint-community/eslint-utils': 4.4.0(eslint@8.56.0) + '@eslint-community/regexpp': 4.10.0 '@eslint/eslintrc': 2.1.4 - '@eslint/js': 8.57.1 - '@humanwhocodes/config-array': 0.13.0 + '@eslint/js': 8.56.0 + '@humanwhocodes/config-array': 0.11.13 '@humanwhocodes/module-importer': 1.0.1 '@nodelib/fs.walk': 1.2.8 '@ungap/structured-clone': 1.2.0 ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 eslint-visitor-keys: 3.4.3 espree: 9.6.1 - esquery: 1.6.0 + esquery: 1.5.0 esutils: 2.0.3 fast-deep-equal: 3.1.3 file-entry-cache: 6.0.1 @@ -13324,7 +12560,7 @@ snapshots: glob-parent: 6.0.2 globals: 13.24.0 graphemer: 1.4.0 - ignore: 5.3.2 + ignore: 5.3.0 imurmurhash: 0.1.4 is-glob: 4.0.3 is-path-inside: 3.0.3 @@ -13334,7 +12570,7 @@ snapshots: lodash.merge: 4.6.2 minimatch: 3.1.2 natural-compare: 1.4.0 - optionator: 0.9.4 + optionator: 0.9.3 strip-ansi: 6.0.1 text-table: 0.2.0 transitivePeerDependencies: @@ -13344,13 +12580,13 @@ snapshots: espree@9.6.1: dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) eslint-visitor-keys: 3.4.3 esprima@4.0.1: {} - esquery@1.6.0: + esquery@1.5.0: dependencies: estraverse: 5.3.0 @@ -13406,13 +12642,13 @@ snapshots: estree-walker@3.0.3: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 esutils@2.0.3: {} - ethereum-bloom-filters@1.2.0: + ethereum-bloom-filters@1.0.10: dependencies: - '@noble/hashes': 1.5.0 + js-sha3: 0.8.0 ethereum-cryptography@0.1.3: dependencies: @@ -13434,7 +12670,7 @@ snapshots: ethereumjs-util@7.1.5: dependencies: - '@types/bn.js': 5.1.6 + '@types/bn.js': 5.1.5 bn.js: 5.2.1 create-hash: 1.2.0 ethereum-cryptography: 0.1.3 @@ -13487,7 +12723,7 @@ snapshots: human-signals: 3.0.1 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.3.0 + npm-run-path: 5.2.0 onetime: 6.0.0 signal-exit: 3.0.7 strip-final-newline: 3.0.0 @@ -13499,7 +12735,7 @@ snapshots: human-signals: 4.3.1 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.3.0 + npm-run-path: 5.2.0 onetime: 6.0.0 signal-exit: 3.0.7 strip-final-newline: 3.0.0 @@ -13511,7 +12747,7 @@ snapshots: human-signals: 5.0.0 is-stream: 3.0.0 merge-stream: 2.0.0 - npm-run-path: 5.3.0 + npm-run-path: 5.2.0 onetime: 6.0.0 signal-exit: 4.1.0 strip-final-newline: 3.0.0 @@ -13566,9 +12802,7 @@ snapshots: dependencies: fast-decode-uri-component: 1.0.1 - fast-redact@3.5.0: {} - - fast-uri@3.0.1: {} + fast-redact@3.3.0: {} fast-url-parser@1.1.3: dependencies: @@ -13576,7 +12810,7 @@ snapshots: fastest-levenshtein@1.0.16: {} - fastq@1.17.1: + fastq@1.16.0: dependencies: reusify: 1.0.4 @@ -13584,14 +12818,10 @@ snapshots: dependencies: format: 0.2.2 - fdir@6.3.0(picomatch@4.0.2): - optionalDependencies: - picomatch: 4.0.2 - fetch-blob@3.2.0: dependencies: node-domexception: 1.0.0 - web-streams-polyfill: 3.3.3 + web-streams-polyfill: 3.2.1 file-entry-cache@6.0.1: dependencies: @@ -13607,10 +12837,6 @@ snapshots: dependencies: to-regex-range: 5.0.1 - fill-range@7.1.1: - dependencies: - to-regex-range: 5.0.1 - find-up@4.1.0: dependencies: locate-path: 5.0.0 @@ -13626,34 +12852,39 @@ snapshots: locate-path: 7.2.0 path-exists: 5.0.0 + find-yarn-workspace-root2@1.2.16: + dependencies: + micromatch: 4.0.5 + pkg-dir: 4.2.0 + flat-cache@3.2.0: dependencies: - flatted: 3.3.1 + flatted: 3.2.9 keyv: 4.5.4 rimraf: 3.0.2 - flatted@3.3.1: {} + flatted@3.2.9: {} flexsearch@0.7.31: {} focus-visible@5.2.0: {} - follow-redirects@1.15.9(debug@4.3.4): + follow-redirects@1.15.6(debug@4.3.4): optionalDependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) for-each@0.3.3: dependencies: is-callable: 1.2.7 - foreground-child@3.3.0: + foreground-child@3.1.1: dependencies: cross-spawn: 7.0.3 signal-exit: 4.1.0 forever-agent@0.6.1: {} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/5a802d7c10abb4bbfb3e7214c75052ef9e6a06f8: {} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: {} form-data@2.3.3: dependencies: @@ -13741,6 +12972,8 @@ snapshots: gensync@1.0.0-beta.2: {} + get-caller-file@2.0.5: {} + get-east-asian-width@1.2.0: {} get-func-name@2.0.2: {} @@ -13752,14 +12985,6 @@ snapshots: has-symbols: 1.0.3 hasown: 2.0.0 - get-intrinsic@1.2.4: - dependencies: - es-errors: 1.3.0 - function-bind: 1.1.2 - has-proto: 1.0.3 - has-symbols: 1.0.3 - hasown: 2.0.2 - get-iterator@1.0.2: {} get-package-type@0.1.0: {} @@ -13783,10 +13008,6 @@ snapshots: dependencies: resolve-pkg-maps: 1.0.0 - get-tsconfig@4.8.1: - dependencies: - resolve-pkg-maps: 1.0.0 - getpass@0.1.7: dependencies: assert-plus: 1.0.0 @@ -13807,20 +13028,11 @@ snapshots: glob@10.3.10: dependencies: - foreground-child: 3.3.0 + foreground-child: 3.1.1 jackspeak: 2.3.6 - minimatch: 9.0.5 - minipass: 7.1.2 - path-scurry: 1.11.1 - - glob@10.4.5: - dependencies: - foreground-child: 3.3.0 - jackspeak: 3.4.3 - minimatch: 9.0.5 - minipass: 7.1.2 - package-json-from-dist: 1.0.0 - path-scurry: 1.11.1 + minimatch: 9.0.3 + minipass: 7.0.4 + path-scurry: 1.10.1 glob@7.1.7: dependencies: @@ -13845,7 +13057,7 @@ snapshots: fs.realpath: 1.0.0 minimatch: 8.0.4 minipass: 4.2.8 - path-scurry: 1.11.1 + path-scurry: 1.10.1 globals@11.12.0: {} @@ -13862,7 +13074,7 @@ snapshots: array-union: 2.1.0 dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.2 + ignore: 5.3.0 merge2: 1.4.1 slash: 3.0.0 @@ -13870,19 +13082,10 @@ snapshots: dependencies: dir-glob: 3.0.1 fast-glob: 3.3.2 - ignore: 5.3.2 + ignore: 5.3.0 merge2: 1.4.1 slash: 4.0.0 - globby@14.0.2: - dependencies: - '@sindresorhus/merge-streams': 2.3.0 - fast-glob: 3.3.2 - ignore: 5.3.2 - path-type: 5.0.0 - slash: 5.1.0 - unicorn-magic: 0.1.0 - globrex@0.1.2: {} gluegun@5.1.2(debug@4.3.4): @@ -13926,38 +13129,40 @@ snapshots: graceful-fs@4.2.11: {} + grapheme-splitter@1.0.4: {} + graphemer@1.4.0: {} - graphql-import-node@0.0.5(graphql@16.9.0): + graphql-import-node@0.0.5(graphql@16.8.2): dependencies: - graphql: 16.9.0 + graphql: 16.8.2 - graphql-request@6.1.0(encoding@0.1.13)(graphql@16.9.0): + graphql-request@6.1.0(encoding@0.1.13)(graphql@16.8.2): dependencies: - '@graphql-typed-document-node/core': 3.2.0(graphql@16.9.0) + '@graphql-typed-document-node/core': 3.2.0(graphql@16.8.2) cross-fetch: 3.1.8(encoding@0.1.13) - graphql: 16.9.0 + graphql: 16.8.2 transitivePeerDependencies: - encoding - graphql-yoga@5.7.0(graphql@16.9.0): + graphql-yoga@5.3.1(graphql@16.8.2): dependencies: '@envelop/core': 5.0.2 - '@graphql-tools/executor': 1.3.1(graphql@16.9.0) - '@graphql-tools/schema': 10.0.6(graphql@16.9.0) - '@graphql-tools/utils': 10.5.4(graphql@16.9.0) + '@graphql-tools/executor': 1.2.6(graphql@16.8.2) + '@graphql-tools/schema': 10.0.3(graphql@16.8.2) + '@graphql-tools/utils': 10.2.0(graphql@16.8.2) '@graphql-yoga/logger': 2.0.0 - '@graphql-yoga/subscription': 5.0.1 - '@whatwg-node/fetch': 0.9.21 - '@whatwg-node/server': 0.9.49 + '@graphql-yoga/subscription': 5.0.0 + '@whatwg-node/fetch': 0.9.17 + '@whatwg-node/server': 0.9.34 dset: 3.1.3 - graphql: 16.9.0 + graphql: 16.8.2 lru-cache: 10.1.0 tslib: 2.6.2 graphql@15.5.0: {} - graphql@16.9.0: {} + graphql@16.8.2: {} gray-matter@4.0.3: dependencies: @@ -13973,6 +13178,8 @@ snapshots: ajv: 6.12.6 har-schema: 2.0.0 + hard-rejection@2.1.0: {} + has-bigints@1.0.2: {} has-flag@2.0.0: {} @@ -13985,14 +13192,8 @@ snapshots: dependencies: get-intrinsic: 1.2.2 - has-property-descriptors@1.0.2: - dependencies: - es-define-property: 1.0.0 - has-proto@1.0.1: {} - has-proto@1.0.3: {} - has-symbols@1.0.3: {} has-tostringtag@1.0.0: @@ -14020,10 +13221,6 @@ snapshots: dependencies: function-bind: 1.1.2 - hasown@2.0.2: - dependencies: - function-bind: 1.1.2 - hast-util-from-dom@5.0.0: dependencies: '@types/hast': 3.0.4 @@ -14122,7 +13319,7 @@ snapshots: transitivePeerDependencies: - supports-color - hast-util-to-html@9.0.3: + hast-util-to-html@9.0.2: dependencies: '@types/hast': 3.0.4 '@types/unist': 3.0.3 @@ -14170,7 +13367,7 @@ snapshots: header-case@2.0.4: dependencies: capital-case: 1.0.4 - tslib: 2.7.0 + tslib: 2.6.2 heap@0.2.7: {} @@ -14182,7 +13379,7 @@ snapshots: hono@4.5.0: {} - hono@4.6.2: {} + hosted-git-info@2.8.9: {} html-void-elements@3.0.0: {} @@ -14196,7 +13393,7 @@ snapshots: http-proxy@1.18.1: dependencies: eventemitter3: 4.0.7 - follow-redirects: 1.15.9(debug@4.3.4) + follow-redirects: 1.15.6(debug@4.3.4) requires-port: 1.0.0 transitivePeerDependencies: - debug @@ -14240,7 +13437,7 @@ snapshots: ieee754@1.2.1: {} - ignore@5.3.2: {} + ignore@5.3.0: {} immutable@4.2.1: {} @@ -14264,10 +13461,10 @@ snapshots: ini@1.3.8: {} - ink@4.4.1(@types/react@18.3.8)(react@18.3.1): + ink@4.4.1(@types/react@18.2.46)(react@18.2.0): dependencies: '@alcalzone/ansi-tokenize': 0.1.3 - ansi-escapes: 6.2.1 + ansi-escapes: 6.2.0 auto-bind: 5.0.1 chalk: 5.3.0 cli-boxes: 3.0.0 @@ -14280,9 +13477,9 @@ snapshots: is-upper-case: 2.0.2 lodash: 4.17.21 patch-console: 2.0.0 - react: 18.3.1 - react-reconciler: 0.29.2(react@18.3.1) - scheduler: 0.23.2 + react: 18.2.0 + react-reconciler: 0.29.0(react@18.2.0) + scheduler: 0.23.0 signal-exit: 3.0.7 slice-ansi: 6.0.0 stack-utils: 2.0.6 @@ -14290,10 +13487,10 @@ snapshots: type-fest: 0.12.0 widest-line: 4.0.1 wrap-ansi: 8.1.0 - ws: 8.18.0 + ws: 8.16.0 yoga-wasm-web: 0.3.3 optionalDependencies: - '@types/react': 18.3.8 + '@types/react': 18.2.46 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -14336,7 +13533,7 @@ snapshots: any-signal: 2.1.2 blob-to-it: 1.0.4 browser-readablestream-to-it: 1.0.3 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) err-code: 3.0.1 ipfs-core-types: 0.9.0(node-fetch@3.3.2) ipfs-unixfs: 6.0.9 @@ -14365,7 +13562,7 @@ snapshots: '@ipld/dag-pb': 2.1.18 abort-controller: 3.0.0 any-signal: 2.1.2 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) err-code: 3.0.1 ipfs-core-types: 0.9.0(node-fetch@3.3.2) ipfs-core-utils: 0.13.0(encoding@0.1.13)(node-fetch@3.3.2) @@ -14435,7 +13632,7 @@ snapshots: is-binary-path@2.1.0: dependencies: - binary-extensions: 2.3.0 + binary-extensions: 2.2.0 is-boolean-object@1.1.2: dependencies: @@ -14502,7 +13699,7 @@ snapshots: is-lower-case@2.0.2: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 is-map@2.0.2: {} @@ -14518,6 +13715,8 @@ snapshots: is-path-inside@3.0.3: {} + is-plain-obj@1.1.0: {} + is-plain-obj@2.1.0: {} is-plain-obj@3.0.0: {} @@ -14567,7 +13766,7 @@ snapshots: is-upper-case@2.0.2: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 is-weakmap@2.0.1: {} @@ -14596,9 +13795,9 @@ snapshots: iso-url@1.2.1: {} - isomorphic-ws@4.0.1(ws@7.5.10): + isomorphic-ws@4.0.1(ws@7.5.9): dependencies: - ws: 7.5.10 + ws: 7.5.9 isows@1.0.3(ws@8.13.0): dependencies: @@ -14648,15 +13847,9 @@ snapshots: optionalDependencies: '@pkgjs/parseargs': 0.11.0 - jackspeak@3.4.3: + jake@10.8.7: dependencies: - '@isaacs/cliui': 8.0.2 - optionalDependencies: - '@pkgjs/parseargs': 0.11.0 - - jake@10.9.2: - dependencies: - async: 3.2.6 + async: 3.2.5 chalk: 4.1.2 filelist: 1.0.4 minimatch: 3.1.2 @@ -14671,10 +13864,10 @@ snapshots: delay: 5.0.0 es6-promisify: 5.0.0 eyes: 0.1.8 - isomorphic-ws: 4.0.1(ws@7.5.10) + isomorphic-ws: 4.0.1(ws@7.5.9) json-stringify-safe: 5.0.1 uuid: 8.3.2 - ws: 7.5.10 + ws: 7.5.9 transitivePeerDependencies: - bufferutil - utf-8-validate @@ -14687,8 +13880,6 @@ snapshots: js-tokens@4.0.0: {} - js-tokens@9.0.0: {} - js-yaml@3.14.1: dependencies: argparse: 1.0.10 @@ -14726,6 +13917,8 @@ snapshots: json5@2.2.3: {} + jsonc-parser@3.2.0: {} + jsonfile@4.0.0: optionalDependencies: graceful-fs: 4.2.11 @@ -14761,7 +13954,7 @@ snapshots: keccak@3.0.4: dependencies: node-addon-api: 2.0.2 - node-gyp-build: 4.8.2 + node-gyp-build: 4.7.1 readable-stream: 3.6.2 keyv@4.5.4: @@ -14797,40 +13990,45 @@ snapshots: lilconfig@3.0.0: {} - lilconfig@3.1.2: {} - lines-and-columns@1.2.4: {} - lint-staged@15.2.10: + lint-staged@15.2.0: dependencies: chalk: 5.3.0 - commander: 12.1.0 - debug: 4.3.7(supports-color@8.1.1) + commander: 11.1.0 + debug: 4.3.4(supports-color@8.1.1) execa: 8.0.1 - lilconfig: 3.1.2 - listr2: 8.2.4 - micromatch: 4.0.8 + lilconfig: 3.0.0 + listr2: 8.0.0 + micromatch: 4.0.5 pidtree: 0.6.0 string-argv: 0.3.2 - yaml: 2.5.1 + yaml: 2.3.4 transitivePeerDependencies: - supports-color - listr2@8.2.4: + listr2@8.0.0: dependencies: cli-truncate: 4.0.0 colorette: 2.0.20 eventemitter3: 5.0.1 - log-update: 6.1.0 - rfdc: 1.4.1 + log-update: 6.0.0 + rfdc: 1.3.0 wrap-ansi: 9.0.0 load-tsconfig@0.2.5: {} + load-yaml-file@0.2.0: + dependencies: + graceful-fs: 4.2.11 + js-yaml: 3.14.1 + pify: 4.0.1 + strip-bom: 3.0.0 + local-pkg@0.5.0: dependencies: - mlly: 1.7.1 - pkg-types: 1.2.0 + mlly: 1.4.2 + pkg-types: 1.0.3 locate-path@5.0.0: dependencies: @@ -14893,10 +14091,10 @@ snapshots: chalk: 5.3.0 is-unicode-supported: 1.3.0 - log-update@6.1.0: + log-update@6.0.0: dependencies: - ansi-escapes: 7.0.0 - cli-cursor: 5.0.0 + ansi-escapes: 6.2.0 + cli-cursor: 4.0.0 slice-ansi: 7.1.0 strip-ansi: 7.1.0 wrap-ansi: 9.0.0 @@ -14917,12 +14115,10 @@ snapshots: lower-case@2.0.2: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 lru-cache@10.1.0: {} - lru-cache@10.4.3: {} - lru-cache@4.1.5: dependencies: pseudomap: 1.0.2 @@ -14936,16 +14132,20 @@ snapshots: dependencies: yallist: 4.0.0 - lucide-react@0.295.0(react@18.3.1): + lucide-react@0.295.0(react@18.2.0): dependencies: - react: 18.3.1 + react: 18.2.0 - magic-string@0.30.11: + magic-string@0.30.5: dependencies: - '@jridgewell/sourcemap-codec': 1.5.0 + '@jridgewell/sourcemap-codec': 1.4.15 make-error@1.3.6: {} + map-obj@1.0.1: {} + + map-obj@4.3.0: {} + markdown-extensions@1.1.1: {} markdown-table@3.0.3: {} @@ -15226,6 +14426,20 @@ snapshots: mdn-data@2.0.30: {} + meow@6.1.1: + dependencies: + '@types/minimist': 1.2.5 + camelcase-keys: 6.2.2 + decamelize-keys: 1.1.1 + hard-rejection: 2.1.0 + minimist-options: 4.1.0 + normalize-package-data: 2.5.0 + read-pkg-up: 7.0.1 + redent: 3.0.0 + trim-newlines: 3.0.1 + type-fest: 0.13.1 + yargs-parser: 18.1.3 + merge-options@3.0.4: dependencies: is-plain-obj: 2.1.0 @@ -15376,7 +14590,7 @@ snapshots: micromark-extension-mdx-expression@1.0.8: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 micromark-factory-mdx-expression: 1.0.9 micromark-factory-space: 1.1.0 micromark-util-character: 1.2.0 @@ -15388,7 +14602,7 @@ snapshots: micromark-extension-mdx-jsx@1.0.5: dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 estree-util-is-identifier-name: 2.1.0 micromark-factory-mdx-expression: 1.0.9 micromark-factory-space: 1.1.0 @@ -15404,7 +14618,7 @@ snapshots: micromark-extension-mdxjs-esm@1.0.5: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 micromark-core-commonmark: 1.1.0 micromark-util-character: 1.2.0 micromark-util-events-to-acorn: 1.2.3 @@ -15416,8 +14630,8 @@ snapshots: micromark-extension-mdxjs@1.0.1: dependencies: - acorn: 8.12.1 - acorn-jsx: 5.3.2(acorn@8.12.1) + acorn: 8.11.3 + acorn-jsx: 5.3.2(acorn@8.11.3) micromark-extension-mdx-expression: 1.0.8 micromark-extension-mdx-jsx: 1.0.5 micromark-extension-mdx-md: 1.0.1 @@ -15453,7 +14667,7 @@ snapshots: micromark-factory-mdx-expression@1.0.9: dependencies: - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 micromark-util-character: 1.2.0 micromark-util-events-to-acorn: 1.2.3 micromark-util-symbol: 1.1.0 @@ -15569,7 +14783,7 @@ snapshots: micromark-util-events-to-acorn@1.2.3: dependencies: '@types/acorn': 4.0.6 - '@types/estree': 1.0.6 + '@types/estree': 1.0.5 '@types/unist': 2.0.11 estree-util-visit: 1.2.1 micromark-util-symbol: 1.1.0 @@ -15634,7 +14848,7 @@ snapshots: micromark@3.2.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) decode-named-character-reference: 1.0.2 micromark-core-commonmark: 1.1.0 micromark-factory-space: 1.1.0 @@ -15656,7 +14870,7 @@ snapshots: micromark@4.0.0: dependencies: '@types/debug': 4.1.12 - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) decode-named-character-reference: 1.0.2 devlop: 1.1.0 micromark-core-commonmark: 2.0.0 @@ -15680,11 +14894,6 @@ snapshots: braces: 3.0.2 picomatch: 2.3.1 - micromatch@4.0.8: - dependencies: - braces: 3.0.3 - picomatch: 2.3.1 - mime-db@1.52.0: {} mime-types@2.1.35: @@ -15695,10 +14904,10 @@ snapshots: mimic-fn@4.0.0: {} - mimic-function@5.0.1: {} - mimic-response@3.1.0: {} + min-indent@1.0.1: {} + minimalistic-assert@1.0.1: {} minimalistic-crypto-utils@1.0.1: {} @@ -15719,9 +14928,11 @@ snapshots: dependencies: brace-expansion: 2.0.1 - minimatch@9.0.5: + minimist-options@4.1.0: dependencies: - brace-expansion: 2.0.1 + arrify: 1.0.1 + is-plain-obj: 1.1.0 + kind-of: 6.0.3 minimist@1.2.8: {} @@ -15733,13 +14944,15 @@ snapshots: minipass@5.0.0: {} - minipass@7.1.2: {} + minipass@7.0.4: {} minizlib@2.1.2: dependencies: minipass: 3.3.6 yallist: 4.0.0 + mixme@0.5.10: {} + mj-context-menu@0.6.1: {} mkdirp-classic@0.5.3: {} @@ -15750,12 +14963,12 @@ snapshots: mkdirp@1.0.4: {} - mlly@1.7.1: + mlly@1.4.2: dependencies: - acorn: 8.12.1 - pathe: 1.1.2 - pkg-types: 1.2.0 - ufo: 1.5.4 + acorn: 8.11.3 + pathe: 1.1.1 + pkg-types: 1.0.3 + ufo: 1.3.2 mri@1.2.0: {} @@ -15810,22 +15023,22 @@ snapshots: natural-orderby@2.0.3: {} - next-themes@0.2.1(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next-themes@0.2.1(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - next: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + next: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) - next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: '@next/env': 14.0.3 '@swc/helpers': 0.5.2 busboy: 1.6.0 - caniuse-lite: 1.0.30001662 + caniuse-lite: 1.0.30001572 postcss: 8.4.31 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(react@18.3.1) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) + styled-jsx: 5.1.1(react@18.2.0) watchpack: 2.4.0 optionalDependencies: '@next/swc-darwin-arm64': 14.0.3 @@ -15842,59 +15055,33 @@ snapshots: - '@babel/core' - babel-plugin-macros - next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1): - dependencies: - '@next/env': 14.2.13 - '@swc/helpers': 0.5.5 - busboy: 1.6.0 - caniuse-lite: 1.0.30001662 - graceful-fs: 4.2.11 - postcss: 8.4.31 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) - styled-jsx: 5.1.1(react@18.3.1) - optionalDependencies: - '@next/swc-darwin-arm64': 14.2.13 - '@next/swc-darwin-x64': 14.2.13 - '@next/swc-linux-arm64-gnu': 14.2.13 - '@next/swc-linux-arm64-musl': 14.2.13 - '@next/swc-linux-x64-gnu': 14.2.13 - '@next/swc-linux-x64-musl': 14.2.13 - '@next/swc-win32-arm64-msvc': 14.2.13 - '@next/swc-win32-ia32-msvc': 14.2.13 - '@next/swc-win32-x64-msvc': 14.2.13 - '@opentelemetry/api': 1.7.0 - transitivePeerDependencies: - - '@babel/core' - - babel-plugin-macros - - nextra-theme-docs@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(nextra@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + nextra-theme-docs@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(nextra@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - '@headlessui/react': 1.7.17(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@headlessui/react': 1.7.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@popperjs/core': 2.11.8 - clsx: 2.1.1 + clsx: 2.1.0 escape-string-regexp: 5.0.0 flexsearch: 0.7.31 focus-visible: 5.2.0 intersection-observer: 0.12.2 - next: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - next-themes: 0.2.1(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - nextra: 3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1) - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + next: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + next-themes: 0.2.1(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + nextra: 3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) scroll-into-view-if-needed: 3.1.0 zod: 3.23.8 - nextra@3.0.0-alpha.10(next@14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1))(react-dom@18.3.1(react@18.3.1))(react@18.3.1): + nextra@3.0.0-alpha.10(next@14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0))(react-dom@18.2.0(react@18.2.0))(react@18.2.0): dependencies: - '@headlessui/react': 1.7.17(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + '@headlessui/react': 1.7.17(react-dom@18.2.0(react@18.2.0))(react@18.2.0) '@mdx-js/mdx': 2.3.0 - '@mdx-js/react': 2.3.0(react@18.3.1) + '@mdx-js/react': 2.3.0(react@18.2.0) '@napi-rs/simple-git': 0.1.9 - '@theguild/remark-mermaid': 0.0.5(react@18.3.1) + '@theguild/remark-mermaid': 0.0.5(react@18.2.0) '@theguild/remark-npm2yarn': 0.3.0 - better-react-mathjax: 2.0.3(react@18.3.1) - clsx: 2.1.1 + better-react-mathjax: 2.0.3(react@18.2.0) + clsx: 2.1.0 estree-util-to-js: 2.0.0 estree-util-value-to-estree: 3.0.1 github-slugger: 2.0.0 @@ -15902,10 +15089,10 @@ snapshots: gray-matter: 4.0.3 hast-util-to-estree: 3.1.0 katex: 0.16.9 - next: 14.2.13(@opentelemetry/api@1.7.0)(react-dom@18.3.1(react@18.3.1))(react@18.3.1) + next: 14.0.3(@opentelemetry/api@1.7.0)(react-dom@18.2.0(react@18.2.0))(react@18.2.0) p-limit: 4.0.0 - react: 18.3.1 - react-dom: 18.3.1(react@18.3.1) + react: 18.2.0 + react-dom: 18.2.0(react@18.2.0) rehype-katex: 7.0.0 rehype-pretty-code: 0.10.1(shikiji@0.6.10) rehype-raw: 7.0.0 @@ -15927,11 +15114,11 @@ snapshots: no-case@3.0.4: dependencies: lower-case: 2.0.2 - tslib: 2.7.0 + tslib: 2.6.2 node-abi@3.62.0: dependencies: - semver: 7.6.3 + semver: 7.6.2 node-addon-api@2.0.2: {} @@ -15949,12 +15136,19 @@ snapshots: fetch-blob: 3.2.0 formdata-polyfill: 4.0.10 - node-gyp-build@4.8.2: {} + node-gyp-build@4.7.1: {} - node-releases@2.0.18: {} + node-releases@2.0.14: {} non-layered-tidy-tree-layout@2.0.2: {} + normalize-package-data@2.5.0: + dependencies: + hosted-git-info: 2.8.9 + resolve: 1.22.8 + semver: 5.7.2 + validate-npm-package-license: 3.0.4 + normalize-path@3.0.0: {} normalize-range@0.1.2: {} @@ -15967,7 +15161,7 @@ snapshots: dependencies: path-key: 3.1.1 - npm-run-path@5.3.0: + npm-run-path@5.2.0: dependencies: path-key: 4.0.0 @@ -15990,8 +15184,6 @@ snapshots: object-inspect@1.13.1: {} - object-inspect@1.13.2: {} - object-keys@1.1.1: {} object-treeify@1.1.33: {} @@ -16049,18 +15241,14 @@ snapshots: dependencies: mimic-fn: 4.0.0 - onetime@7.0.0: - dependencies: - mimic-function: 5.0.1 - - optionator@0.9.4: + optionator@0.9.3: dependencies: + '@aashutoshrathi/word-wrap': 1.2.6 deep-is: 0.1.4 fast-levenshtein: 2.0.6 levn: 0.4.1 prelude-ls: 1.2.1 type-check: 0.4.0 - word-wrap: 1.2.5 ora@4.0.2: dependencies: @@ -16115,9 +15303,9 @@ snapshots: dependencies: p-map: 2.1.0 - p-filter@4.1.0: + p-filter@3.0.0: dependencies: - p-map: 7.0.2 + p-map: 5.5.0 p-finally@1.0.0: {} @@ -16151,7 +15339,11 @@ snapshots: p-map@2.1.0: {} - p-map@7.0.2: {} + p-map@5.5.0: + dependencies: + aggregate-error: 4.0.1 + + p-map@6.0.0: {} p-timeout@3.2.0: dependencies: @@ -16165,14 +15357,12 @@ snapshots: dependencies: p-timeout: 3.2.0 - package-json-from-dist@1.0.0: {} - - package-manager-detector@0.2.0: {} + packet-reader@1.0.0: {} param-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 parent-module@1.0.1: dependencies: @@ -16195,7 +15385,7 @@ snapshots: parse-json@5.2.0: dependencies: - '@babel/code-frame': 7.24.7 + '@babel/code-frame': 7.23.5 error-ex: 1.3.2 json-parse-even-better-errors: 2.3.1 lines-and-columns: 1.2.4 @@ -16209,7 +15399,7 @@ snapshots: pascal-case@3.1.2: dependencies: no-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 password-prompt@1.1.3: dependencies: @@ -16221,7 +15411,7 @@ snapshots: path-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 path-exists@4.0.0: {} @@ -16237,16 +15427,14 @@ snapshots: path-parse@1.0.7: {} - path-scurry@1.11.1: + path-scurry@1.10.1: dependencies: - lru-cache: 10.4.3 - minipass: 7.1.2 + lru-cache: 10.1.0 + minipass: 7.0.4 path-type@4.0.0: {} - path-type@5.0.0: {} - - pathe@1.1.2: {} + pathe@1.1.1: {} pathval@1.1.1: {} @@ -16269,20 +15457,18 @@ snapshots: pg-cloudflare@1.1.1: optional: true - pg-connection-string@2.7.0: {} + pg-connection-string@2.6.2: {} pg-int8@1.0.1: {} pg-numeric@1.0.2: {} - pg-pool@3.7.0(pg@8.13.0): + pg-pool@3.6.1(pg@8.11.3): dependencies: - pg: 8.13.0 + pg: 8.11.3 pg-protocol@1.6.0: {} - pg-protocol@1.7.0: {} - pg-types@2.2.0: dependencies: pg-int8: 1.0.1 @@ -16301,11 +15487,13 @@ snapshots: postgres-interval: 3.0.0 postgres-range: 1.1.3 - pg@8.13.0: + pg@8.11.3: dependencies: - pg-connection-string: 2.7.0 - pg-pool: 3.7.0(pg@8.13.0) - pg-protocol: 1.7.0 + buffer-writer: 2.0.0 + packet-reader: 1.0.0 + pg-connection-string: 2.6.2 + pg-pool: 3.6.1(pg@8.11.3) + pg-protocol: 1.6.0 pg-types: 2.2.0 pgpass: 1.0.5 optionalDependencies: @@ -16317,80 +15505,72 @@ snapshots: picocolors@1.0.0: {} - picocolors@1.1.0: {} - picomatch@2.3.1: {} - picomatch@4.0.2: {} - pidtree@0.6.0: {} pify@2.3.0: {} pify@4.0.1: {} - pino-abstract-transport@1.2.0: + pino-abstract-transport@1.1.0: dependencies: readable-stream: 4.5.2 split2: 4.2.0 pino-std-serializers@6.2.2: {} - pino@8.21.0: + pino@8.17.2: dependencies: atomic-sleep: 1.0.0 - fast-redact: 3.5.0 + fast-redact: 3.3.0 on-exit-leak-free: 2.1.2 - pino-abstract-transport: 1.2.0 + pino-abstract-transport: 1.1.0 pino-std-serializers: 6.2.2 process-warning: 3.0.0 quick-format-unescaped: 4.0.4 real-require: 0.2.0 - safe-stable-stringify: 2.5.0 - sonic-boom: 3.8.1 - thread-stream: 2.7.0 + safe-stable-stringify: 2.4.3 + sonic-boom: 3.7.0 + thread-stream: 2.4.1 pirates@4.0.6: {} - pkg-types@1.2.0: + pkg-dir@4.2.0: + dependencies: + find-up: 4.1.0 + + pkg-types@1.0.3: dependencies: - confbox: 0.1.7 - mlly: 1.7.1 - pathe: 1.1.2 + jsonc-parser: 3.2.0 + mlly: 1.4.2 + pathe: 1.1.1 pluralize@8.0.0: {} - postcss-import@15.1.0(postcss@8.4.47): + postcss-import@15.1.0(postcss@8.4.32): dependencies: - postcss: 8.4.47 + postcss: 8.4.32 postcss-value-parser: 4.2.0 read-cache: 1.0.0 resolve: 1.22.8 - postcss-js@4.0.1(postcss@8.4.47): + postcss-js@4.0.1(postcss@8.4.32): dependencies: camelcase-css: 2.0.1 - postcss: 8.4.47 + postcss: 8.4.32 - postcss-load-config@4.0.2(postcss@8.4.47)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)): + postcss-load-config@4.0.2(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)): dependencies: lilconfig: 3.0.0 - yaml: 2.5.1 - optionalDependencies: - postcss: 8.4.47 - ts-node: 10.9.2(@types/node@20.16.5)(typescript@5.6.2) - - postcss-load-config@6.0.1(jiti@1.21.0)(postcss@8.4.47)(yaml@2.5.1): - dependencies: - lilconfig: 3.1.2 + yaml: 2.3.4 optionalDependencies: - jiti: 1.21.0 - postcss: 8.4.47 - yaml: 2.5.1 + postcss: 8.4.32 + ts-node: 10.9.2(@types/node@20.11.24)(typescript@5.3.3) - postcss-nested@6.0.1(postcss@8.4.47): + postcss-nested@6.0.1(postcss@8.4.32): dependencies: - postcss: 8.4.47 + postcss: 8.4.32 postcss-selector-parser: 6.0.15 postcss-selector-parser@6.0.15: @@ -16403,14 +15583,14 @@ snapshots: postcss@8.4.31: dependencies: nanoid: 3.3.7 - picocolors: 1.1.0 - source-map-js: 1.2.1 + picocolors: 1.0.0 + source-map-js: 1.0.2 - postcss@8.4.47: + postcss@8.4.32: dependencies: nanoid: 3.3.7 - picocolors: 1.1.0 - source-map-js: 1.2.1 + picocolors: 1.0.0 + source-map-js: 1.0.2 postgres-array@2.0.0: {} @@ -16434,9 +15614,9 @@ snapshots: postgres-range@1.1.3: {} - posthog-node@4.2.0: + posthog-node@4.0.0: dependencies: - axios: 1.7.7 + axios: 1.6.8 rusha: 0.8.14 transitivePeerDependencies: - debug @@ -16456,19 +15636,26 @@ snapshots: tar-fs: 2.1.1 tunnel-agent: 0.6.0 + preferred-pm@3.1.2: + dependencies: + find-up: 5.0.0 + find-yarn-workspace-root2: 1.2.16 + path-exists: 4.0.0 + which-pm: 2.0.0 + prelude-ls@1.2.1: {} prettier@1.19.1: {} prettier@2.8.8: {} - prettier@3.3.3: {} + prettier@3.1.1: {} pretty-format@29.7.0: dependencies: '@jest/schemas': 29.6.3 ansi-styles: 5.2.0 - react-is: 18.3.1 + react-is: 18.2.0 process-nextick-args@2.0.1: {} @@ -16476,7 +15663,7 @@ snapshots: process@0.11.10: {} - prom-client@15.1.3: + prom-client@15.1.0: dependencies: '@opentelemetry/api': 1.7.0 tdigest: 0.1.2 @@ -16511,7 +15698,7 @@ snapshots: '@protobufjs/pool': 1.1.0 '@protobufjs/utf8': 1.1.0 '@types/long': 4.0.2 - '@types/node': 20.16.5 + '@types/node': 20.11.24 long: 4.0.0 proxy-from-env@1.1.0: {} @@ -16536,13 +15723,13 @@ snapshots: pvtsutils@1.3.5: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 pvutils@1.1.3: {} - qs@6.13.0: + qs@6.11.2: dependencies: - side-channel: 1.0.6 + side-channel: 1.0.4 qs@6.5.3: {} @@ -16550,6 +15737,8 @@ snapshots: quick-format-unescaped@4.0.4: {} + quick-lru@4.0.1: {} + randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 @@ -16561,32 +15750,32 @@ snapshots: minimist: 1.2.8 strip-json-comments: 2.0.1 - react-countup@6.5.3(react@18.3.1): + react-countup@6.5.0(react@18.2.0): dependencies: countup.js: 2.8.0 - react: 18.3.1 + react: 18.2.0 - react-dom@18.3.1(react@18.3.1): + react-dom@18.2.0(react@18.2.0): dependencies: loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 + react: 18.2.0 + scheduler: 0.23.0 react-is@16.13.1: {} - react-is@18.3.1: {} + react-is@18.2.0: {} react-native-fetch-api@3.0.0: dependencies: p-defer: 3.0.0 - react-reconciler@0.29.2(react@18.3.1): + react-reconciler@0.29.0(react@18.2.0): dependencies: loose-envify: 1.4.0 - react: 18.3.1 - scheduler: 0.23.2 + react: 18.2.0 + scheduler: 0.23.0 - react@18.3.1: + react@18.2.0: dependencies: loose-envify: 1.4.0 @@ -16594,6 +15783,19 @@ snapshots: dependencies: pify: 2.3.0 + read-pkg-up@7.0.1: + dependencies: + find-up: 4.1.0 + read-pkg: 5.2.0 + type-fest: 0.8.1 + + read-pkg@5.2.0: + dependencies: + '@types/normalize-package-data': 2.4.4 + normalize-package-data: 2.5.0 + parse-json: 5.2.0 + type-fest: 0.6.0 + read-yaml-file@1.1.0: dependencies: graceful-fs: 4.2.11 @@ -16644,6 +15846,11 @@ snapshots: dependencies: ms: 2.1.3 + redent@3.0.0: + dependencies: + indent-string: 4.0.0 + strip-indent: 3.0.0 + redeyed@2.1.1: dependencies: esprima: 4.0.1 @@ -16777,7 +15984,7 @@ snapshots: request@2.88.2: dependencies: aws-sign2: 0.7.0 - aws4: 1.13.2 + aws4: 1.12.0 caseless: 0.12.0 combined-stream: 1.0.8 extend: 3.0.2 @@ -16797,8 +16004,12 @@ snapshots: tunnel-agent: 0.6.0 uuid: 3.4.0 + require-directory@2.1.1: {} + require-from-string@2.0.2: {} + require-main-filename@2.0.0: {} + requires-port@1.0.0: {} resolve-from@4.0.0: {} @@ -16829,16 +16040,11 @@ snapshots: onetime: 5.1.2 signal-exit: 3.0.7 - restore-cursor@5.1.0: - dependencies: - onetime: 7.0.0 - signal-exit: 4.1.0 - retimer@3.0.0: {} reusify@1.0.4: {} - rfdc@1.4.1: {} + rfdc@1.3.0: {} rimraf@2.7.1: dependencies: @@ -16848,9 +16054,9 @@ snapshots: dependencies: glob: 7.2.3 - rimraf@5.0.10: + rimraf@5.0.5: dependencies: - glob: 10.4.5 + glob: 10.3.10 ripemd160@2.0.2: dependencies: @@ -16869,26 +16075,21 @@ snapshots: robust-predicates@3.0.2: {} - rollup@4.22.2: - dependencies: - '@types/estree': 1.0.5 + rollup@4.9.2: optionalDependencies: - '@rollup/rollup-android-arm-eabi': 4.22.2 - '@rollup/rollup-android-arm64': 4.22.2 - '@rollup/rollup-darwin-arm64': 4.22.2 - '@rollup/rollup-darwin-x64': 4.22.2 - '@rollup/rollup-linux-arm-gnueabihf': 4.22.2 - '@rollup/rollup-linux-arm-musleabihf': 4.22.2 - '@rollup/rollup-linux-arm64-gnu': 4.22.2 - '@rollup/rollup-linux-arm64-musl': 4.22.2 - '@rollup/rollup-linux-powerpc64le-gnu': 4.22.2 - '@rollup/rollup-linux-riscv64-gnu': 4.22.2 - '@rollup/rollup-linux-s390x-gnu': 4.22.2 - '@rollup/rollup-linux-x64-gnu': 4.22.2 - '@rollup/rollup-linux-x64-musl': 4.22.2 - '@rollup/rollup-win32-arm64-msvc': 4.22.2 - '@rollup/rollup-win32-ia32-msvc': 4.22.2 - '@rollup/rollup-win32-x64-msvc': 4.22.2 + '@rollup/rollup-android-arm-eabi': 4.9.2 + '@rollup/rollup-android-arm64': 4.9.2 + '@rollup/rollup-darwin-arm64': 4.9.2 + '@rollup/rollup-darwin-x64': 4.9.2 + '@rollup/rollup-linux-arm-gnueabihf': 4.9.2 + '@rollup/rollup-linux-arm64-gnu': 4.9.2 + '@rollup/rollup-linux-arm64-musl': 4.9.2 + '@rollup/rollup-linux-riscv64-gnu': 4.9.2 + '@rollup/rollup-linux-x64-gnu': 4.9.2 + '@rollup/rollup-linux-x64-musl': 4.9.2 + '@rollup/rollup-win32-arm64-msvc': 4.9.2 + '@rollup/rollup-win32-ia32-msvc': 4.9.2 + '@rollup/rollup-win32-x64-msvc': 4.9.2 fsevents: 2.3.3 run-parallel@1.2.0: @@ -16922,11 +16123,9 @@ snapshots: safe-stable-stringify@2.4.3: {} - safe-stable-stringify@2.5.0: {} - safer-buffer@2.1.2: {} - scheduler@0.23.2: + scheduler@0.23.0: dependencies: loose-envify: 1.4.0 @@ -16938,9 +16137,9 @@ snapshots: secp256k1@4.0.3: dependencies: - elliptic: 6.5.7 + elliptic: 6.5.4 node-addon-api: 2.0.2 - node-gyp-build: 4.8.2 + node-gyp-build: 4.7.1 section-matter@1.0.0: dependencies: @@ -16949,6 +16148,8 @@ snapshots: semver-compare@1.0.0: {} + semver@5.7.2: {} + semver@6.3.1: {} semver@7.3.5: @@ -16961,14 +16162,14 @@ snapshots: semver@7.6.2: {} - semver@7.6.3: {} - sentence-case@3.0.4: dependencies: no-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 upper-case-first: 2.0.2 + set-blocking@2.0.0: {} + set-function-length@1.1.1: dependencies: define-data-property: 1.1.1 @@ -16976,15 +16177,6 @@ snapshots: gopd: 1.0.1 has-property-descriptors: 1.0.1 - set-function-length@1.2.2: - dependencies: - define-data-property: 1.1.4 - es-errors: 1.3.0 - function-bind: 1.1.2 - get-intrinsic: 1.2.4 - gopd: 1.0.1 - has-property-descriptors: 1.0.2 - set-function-name@2.0.1: dependencies: define-data-property: 1.1.1 @@ -17012,7 +16204,7 @@ snapshots: shikiji@0.6.10: dependencies: - hast-util-to-html: 9.0.3 + hast-util-to-html: 9.0.2 side-channel@1.0.4: dependencies: @@ -17020,13 +16212,6 @@ snapshots: get-intrinsic: 1.2.2 object-inspect: 1.13.1 - side-channel@1.0.6: - dependencies: - call-bind: 1.0.7 - es-errors: 1.3.0 - get-intrinsic: 1.2.4 - object-inspect: 1.13.2 - siginfo@2.0.0: {} signal-exit@3.0.7: {} @@ -17041,7 +16226,7 @@ snapshots: once: 1.4.0 simple-concat: 1.0.1 - simple-git-hooks@2.11.1: {} + simple-git-hooks@2.9.0: {} sisteransi@1.0.5: {} @@ -17072,12 +16257,21 @@ snapshots: ansi-styles: 6.2.1 is-fullwidth-code-point: 5.0.0 + smartwrap@2.0.2: + dependencies: + array.prototype.flat: 1.3.2 + breakword: 1.0.6 + grapheme-splitter: 1.0.4 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 15.4.1 + snake-case@3.0.4: dependencies: dot-case: 3.0.4 - tslib: 2.7.0 + tslib: 2.6.2 - sonic-boom@3.8.1: + sonic-boom@3.7.0: dependencies: atomic-sleep: 1.0.0 @@ -17085,7 +16279,7 @@ snapshots: dependencies: is-plain-obj: 4.1.0 - source-map-js@1.2.1: {} + source-map-js@1.0.2: {} source-map-support@0.5.21: dependencies: @@ -17107,6 +16301,20 @@ snapshots: cross-spawn: 5.1.0 signal-exit: 3.0.7 + spdx-correct@3.2.0: + dependencies: + spdx-expression-parse: 3.0.1 + spdx-license-ids: 3.0.16 + + spdx-exceptions@2.3.0: {} + + spdx-expression-parse@3.0.1: + dependencies: + spdx-exceptions: 2.3.0 + spdx-license-ids: 3.0.16 + + spdx-license-ids@3.0.16: {} + speech-rule-engine@4.0.7: dependencies: commander: 9.2.0 @@ -17151,6 +16359,10 @@ snapshots: dependencies: get-iterator: 1.0.2 + stream-transform@2.1.3: + dependencies: + mixme: 0.5.10 + streamsearch@1.1.0: {} string-argv@0.3.2: {} @@ -17173,7 +16385,7 @@ snapshots: emoji-regex: 10.4.0 strip-ansi: 7.1.0 - string-width@7.2.0: + string-width@7.0.0: dependencies: emoji-regex: 10.4.0 get-east-asian-width: 1.2.0 @@ -17234,7 +16446,7 @@ snapshots: strip-ansi@7.1.0: dependencies: - ansi-regex: 6.1.0 + ansi-regex: 6.0.1 strip-bom-string@1.0.0: {} @@ -17250,13 +16462,17 @@ snapshots: dependencies: is-hex-prefixed: 1.0.0 + strip-indent@3.0.0: + dependencies: + min-indent: 1.0.1 + strip-json-comments@2.0.1: {} strip-json-comments@3.1.1: {} - strip-literal@2.1.0: + strip-literal@1.3.0: dependencies: - js-tokens: 9.0.0 + acorn: 8.11.3 stubborn-fs@1.2.5: {} @@ -17264,10 +16480,10 @@ snapshots: dependencies: inline-style-parser: 0.1.1 - styled-jsx@5.1.1(react@18.3.1): + styled-jsx@5.1.1(react@18.2.0): dependencies: client-only: 0.0.1 - react: 18.3.1 + react: 18.2.0 stylis@4.3.1: {} @@ -17275,7 +16491,7 @@ snapshots: dependencies: '@jridgewell/gen-mapping': 0.3.3 commander: 4.1.1 - glob: 10.4.5 + glob: 10.3.10 lines-and-columns: 1.2.4 mz: 2.7.0 pirates: 4.0.6 @@ -17314,7 +16530,7 @@ snapshots: css-tree: 2.3.1 css-what: 6.1.0 csso: 5.0.5 - picocolors: 1.1.0 + picocolors: 1.0.0 sync-request@6.1.0: dependencies: @@ -17326,13 +16542,15 @@ snapshots: dependencies: get-port: 3.2.0 - tailwind-merge@2.5.2: {} + tailwind-merge@2.1.0: + dependencies: + '@babel/runtime': 7.23.7 - tailwindcss-animate@1.0.7(tailwindcss@3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2))): + tailwindcss-animate@1.0.7(tailwindcss@3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))): dependencies: - tailwindcss: 3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) + tailwindcss: 3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) - tailwindcss@3.4.12(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)): + tailwindcss@3.3.5(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)): dependencies: '@alloc/quick-lru': 5.2.0 arg: 5.0.2 @@ -17348,11 +16566,11 @@ snapshots: normalize-path: 3.0.0 object-hash: 3.0.0 picocolors: 1.0.0 - postcss: 8.4.47 - postcss-import: 15.1.0(postcss@8.4.47) - postcss-js: 4.0.1(postcss@8.4.47) - postcss-load-config: 4.0.2(postcss@8.4.47)(ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2)) - postcss-nested: 6.0.1(postcss@8.4.47) + postcss: 8.4.32 + postcss-import: 15.1.0(postcss@8.4.32) + postcss-js: 4.0.1(postcss@8.4.32) + postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) + postcss-nested: 6.0.1(postcss@8.4.32) postcss-selector-parser: 6.0.15 resolve: 1.22.8 sucrase: 3.35.0 @@ -17393,7 +16611,7 @@ snapshots: inherits: 2.0.4 readable-stream: 3.6.2 - tar@6.2.1: + tar@6.2.0: dependencies: chownr: 2.0.0 fs-minipass: 2.1.0 @@ -17415,14 +16633,14 @@ snapshots: '@types/concat-stream': 1.6.1 '@types/form-data': 0.0.33 '@types/node': 8.10.66 - '@types/qs': 6.9.16 + '@types/qs': 6.9.11 caseless: 0.12.0 concat-stream: 1.6.2 form-data: 2.5.1 http-basic: 8.1.3 http-response-object: 3.0.2 promise: 8.3.0 - qs: 6.13.0 + qs: 6.11.2 thenify-all@1.6.0: dependencies: @@ -17432,7 +16650,7 @@ snapshots: dependencies: any-promise: 1.3.0 - thread-stream@2.7.0: + thread-stream@2.4.1: dependencies: real-require: 0.2.0 @@ -17444,16 +16662,11 @@ snapshots: native-abort-controller: 1.0.4(abort-controller@3.0.0) retimer: 3.0.0 - tinybench@2.9.0: {} - - tinyglobby@0.2.6: - dependencies: - fdir: 6.3.0(picomatch@4.0.2) - picomatch: 4.0.2 + tinybench@2.5.1: {} - tinypool@0.8.4: {} + tinypool@0.8.1: {} - tinyspy@2.2.1: {} + tinyspy@2.2.0: {} title@3.5.3: dependencies: @@ -17466,13 +16679,15 @@ snapshots: tmp-promise@3.0.3: dependencies: - tmp: 0.2.3 + tmp: 0.2.1 tmp@0.0.33: dependencies: os-tmpdir: 1.0.2 - tmp@0.2.3: {} + tmp@0.2.1: + dependencies: + rimraf: 3.0.2 to-buffer@1.1.1: {} @@ -17497,41 +16712,39 @@ snapshots: trim-lines@3.0.1: {} - trough@2.1.0: {} + trim-newlines@3.0.1: {} - ts-api-utils@1.0.3(typescript@5.6.2): - dependencies: - typescript: 5.6.2 + trough@2.1.0: {} - ts-api-utils@1.3.0(typescript@5.6.2): + ts-api-utils@1.0.3(typescript@5.3.3): dependencies: - typescript: 5.6.2 + typescript: 5.3.3 ts-dedent@2.2.0: {} ts-interface-checker@0.1.13: {} - ts-node@10.9.2(@types/node@20.16.5)(typescript@5.6.2): + ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3): dependencies: '@cspotcode/source-map-support': 0.8.1 - '@tsconfig/node10': 1.0.11 + '@tsconfig/node10': 1.0.9 '@tsconfig/node12': 1.0.11 '@tsconfig/node14': 1.0.3 '@tsconfig/node16': 1.0.4 - '@types/node': 20.16.5 - acorn: 8.12.1 - acorn-walk: 8.3.4 + '@types/node': 20.11.24 + acorn: 8.11.3 + acorn-walk: 8.3.1 arg: 4.1.3 create-require: 1.1.1 diff: 4.0.2 make-error: 1.3.6 - typescript: 5.6.2 + typescript: 5.3.3 v8-compile-cache-lib: 3.0.1 yn: 3.1.1 - tsconfck@3.1.3(typescript@5.6.2): + tsconfck@3.0.1(typescript@5.3.3): optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 tsconfig-paths@3.15.0: dependencies: @@ -17542,34 +16755,38 @@ snapshots: tslib@2.6.2: {} - tslib@2.7.0: {} - - tsup@8.3.0(jiti@1.21.0)(postcss@8.4.47)(typescript@5.6.2)(yaml@2.5.1): + tsup@8.0.1(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3))(typescript@5.3.3): dependencies: - bundle-require: 5.0.0(esbuild@0.23.1) + bundle-require: 4.0.2(esbuild@0.19.11) cac: 6.7.14 - chokidar: 3.6.0 - consola: 3.2.3 - debug: 4.3.7(supports-color@8.1.1) - esbuild: 0.23.1 + chokidar: 3.5.3 + debug: 4.3.4(supports-color@8.1.1) + esbuild: 0.19.11 execa: 5.1.1 + globby: 11.1.0 joycon: 3.1.1 - picocolors: 1.1.0 - postcss-load-config: 6.0.1(jiti@1.21.0)(postcss@8.4.47)(yaml@2.5.1) + postcss-load-config: 4.0.2(postcss@8.4.32)(ts-node@10.9.2(@types/node@20.11.24)(typescript@5.3.3)) resolve-from: 5.0.0 - rollup: 4.22.2 + rollup: 4.9.2 source-map: 0.8.0-beta.0 sucrase: 3.35.0 - tinyglobby: 0.2.6 tree-kill: 1.2.2 optionalDependencies: - postcss: 8.4.47 - typescript: 5.6.2 + postcss: 8.4.32 + typescript: 5.3.3 transitivePeerDependencies: - - jiti - supports-color - - tsx - - yaml + - ts-node + + tty-table@4.2.3: + dependencies: + chalk: 4.1.2 + csv: 5.5.3 + kleur: 4.1.5 + smartwrap: 2.0.2 + strip-ansi: 6.0.1 + wcwidth: 1.0.1 + yargs: 17.7.2 tunnel-agent@0.6.0: dependencies: @@ -17581,16 +16798,22 @@ snapshots: dependencies: prelude-ls: 1.2.1 - type-detect@4.1.0: {} + type-detect@4.0.8: {} type-fest@0.12.0: {} + type-fest@0.13.1: {} + type-fest@0.20.2: {} type-fest@0.21.3: {} + type-fest@0.6.0: {} + type-fest@0.7.1: {} + type-fest@0.8.1: {} + type-fest@1.4.0: {} type-fest@2.19.0: {} @@ -17628,9 +16851,9 @@ snapshots: typescript@5.0.4: {} - typescript@5.6.2: {} + typescript@5.3.3: {} - ufo@1.5.4: {} + ufo@1.3.2: {} uint8array-extras@0.3.0: {} @@ -17645,7 +16868,7 @@ snapshots: has-symbols: 1.0.3 which-boxed-primitive: 1.0.2 - undici-types@6.19.8: {} + undici-types@5.26.5: {} unicode-canonical-property-names-ecmascript@2.0.0: {} @@ -17658,8 +16881,6 @@ snapshots: unicode-property-aliases-ecmascript@2.1.0: {} - unicorn-magic@0.1.0: {} - unified@10.1.2: dependencies: '@types/unist': 2.0.11 @@ -17768,11 +16989,11 @@ snapshots: universalify@2.0.1: {} - update-browserslist-db@1.1.0(browserslist@4.23.3): + update-browserslist-db@1.0.13(browserslist@4.22.2): dependencies: - browserslist: 4.23.3 - escalade: 3.2.0 - picocolors: 1.1.0 + browserslist: 4.22.2 + escalade: 3.1.1 + picocolors: 1.0.0 update-check@1.5.4: dependencies: @@ -17781,11 +17002,11 @@ snapshots: upper-case-first@2.0.2: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 upper-case@2.0.2: dependencies: - tslib: 2.7.0 + tslib: 2.6.2 uri-js@4.4.1: dependencies: @@ -17808,13 +17029,20 @@ snapshots: uvu@0.5.6: dependencies: dequal: 2.0.3 - diff: 5.2.0 + diff: 5.1.0 kleur: 4.1.5 sade: 1.8.1 v8-compile-cache-lib@3.0.1: {} - validate-npm-package-name@5.0.1: {} + validate-npm-package-license@3.0.4: + dependencies: + spdx-correct: 3.2.0 + spdx-expression-parse: 3.0.1 + + validate-npm-package-name@5.0.0: + dependencies: + builtins: 5.0.1 value-or-promise@1.0.12: {} @@ -17853,126 +17081,142 @@ snapshots: '@types/unist': 3.0.3 vfile-message: 4.0.2 - viem@1.21.4(typescript@5.6.2)(zod@3.23.8): + viem@1.21.4(typescript@5.3.3)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.2.0 '@noble/hashes': 1.3.2 '@scure/bip32': 1.3.2 '@scure/bip39': 1.2.1 - abitype: 0.9.8(typescript@5.6.2)(zod@3.23.8) + abitype: 0.9.8(typescript@5.3.3)(zod@3.23.8) isows: 1.0.3(ws@8.13.0) ws: 8.13.0 optionalDependencies: - typescript: 5.6.2 + typescript: 5.3.3 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - viem@2.21.10(typescript@5.6.2)(zod@3.23.8): + viem@2.21.3(typescript@5.0.4)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.6.2)(zod@3.23.8) + abitype: 1.0.5(typescript@5.0.4)(zod@3.23.8) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 optionalDependencies: - typescript: 5.6.2 + typescript: 5.0.4 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - viem@2.21.3(typescript@5.0.4)(zod@3.23.8): + viem@2.21.3(typescript@5.3.3)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.0.4)(zod@3.23.8) + abitype: 1.0.5(typescript@5.3.3)(zod@3.23.8) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 optionalDependencies: - typescript: 5.0.4 + typescript: 5.3.3 transitivePeerDependencies: - bufferutil - utf-8-validate - zod - vite-node@1.6.0(@types/node@20.16.5): + vite-node@1.0.2(@types/node@20.11.24): + dependencies: + cac: 6.7.14 + debug: 4.3.4(supports-color@8.1.1) + pathe: 1.1.1 + picocolors: 1.0.0 + vite: 5.0.10(@types/node@20.11.24) + transitivePeerDependencies: + - '@types/node' + - less + - lightningcss + - sass + - stylus + - sugarss + - supports-color + - terser + + vite-node@1.1.1(@types/node@20.11.24): dependencies: cac: 6.7.14 - debug: 4.3.7(supports-color@8.1.1) - pathe: 1.1.2 - picocolors: 1.1.0 - vite: 5.4.7(@types/node@20.16.5) + debug: 4.3.4(supports-color@8.1.1) + pathe: 1.1.1 + picocolors: 1.0.0 + vite: 5.0.10(@types/node@20.11.24) transitivePeerDependencies: - '@types/node' - less - lightningcss - sass - - sass-embedded - stylus - sugarss - supports-color - terser - vite-tsconfig-paths@4.3.2(typescript@5.6.2)(vite@5.4.7(@types/node@20.16.5)): + vite-tsconfig-paths@4.3.1(typescript@5.3.3)(vite@5.0.10(@types/node@20.11.24)): dependencies: - debug: 4.3.7(supports-color@8.1.1) + debug: 4.3.4(supports-color@8.1.1) globrex: 0.1.2 - tsconfck: 3.1.3(typescript@5.6.2) + tsconfck: 3.0.1(typescript@5.3.3) optionalDependencies: - vite: 5.4.7(@types/node@20.16.5) + vite: 5.0.10(@types/node@20.11.24) transitivePeerDependencies: - supports-color - typescript - vite@5.4.7(@types/node@20.16.5): + vite@5.0.10(@types/node@20.11.24): dependencies: - esbuild: 0.21.5 - postcss: 8.4.47 - rollup: 4.22.2 + esbuild: 0.19.11 + postcss: 8.4.32 + rollup: 4.9.2 optionalDependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 fsevents: 2.3.3 - vitest@1.6.0(@types/node@20.16.5): + vitest@1.0.2(@types/node@20.11.24): dependencies: - '@vitest/expect': 1.6.0 - '@vitest/runner': 1.6.0 - '@vitest/snapshot': 1.6.0 - '@vitest/spy': 1.6.0 - '@vitest/utils': 1.6.0 - acorn-walk: 8.3.4 - chai: 4.5.0 - debug: 4.3.7(supports-color@8.1.1) + '@vitest/expect': 1.0.2 + '@vitest/runner': 1.0.2 + '@vitest/snapshot': 1.0.2 + '@vitest/spy': 1.0.2 + '@vitest/utils': 1.0.2 + acorn-walk: 8.3.1 + cac: 6.7.14 + chai: 4.3.10 + debug: 4.3.4(supports-color@8.1.1) execa: 8.0.1 local-pkg: 0.5.0 - magic-string: 0.30.11 - pathe: 1.1.2 - picocolors: 1.1.0 + magic-string: 0.30.5 + pathe: 1.1.1 + picocolors: 1.0.0 std-env: 3.7.0 - strip-literal: 2.1.0 - tinybench: 2.9.0 - tinypool: 0.8.4 - vite: 5.4.7(@types/node@20.16.5) - vite-node: 1.6.0(@types/node@20.16.5) - why-is-node-running: 2.3.0 + strip-literal: 1.3.0 + tinybench: 2.5.1 + tinypool: 0.8.1 + vite: 5.0.10(@types/node@20.11.24) + vite-node: 1.0.2(@types/node@20.11.24) + why-is-node-running: 2.2.2 optionalDependencies: - '@types/node': 20.16.5 + '@types/node': 20.11.24 transitivePeerDependencies: - less - lightningcss - sass - - sass-embedded - stylus - sugarss - supports-color @@ -17989,7 +17233,7 @@ snapshots: web-namespaces@2.0.1: {} - web-streams-polyfill@3.3.3: {} + web-streams-polyfill@3.2.1: {} web-worker@1.2.0: {} @@ -18001,7 +17245,7 @@ snapshots: web3-utils@1.7.0: dependencies: bn.js: 4.12.0 - ethereum-bloom-filters: 1.2.0 + ethereum-bloom-filters: 1.0.10 ethereumjs-util: 7.1.5 ethjs-unit: 0.1.6 number-to-bn: 1.7.0 @@ -18013,13 +17257,13 @@ snapshots: '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 - webcrypto-core@1.8.0: + webcrypto-core@1.7.7: dependencies: - '@peculiar/asn1-schema': 2.3.13 + '@peculiar/asn1-schema': 2.3.8 '@peculiar/json-schema': 1.1.12 asn1js: 3.0.5 pvtsutils: 1.3.5 - tslib: 2.7.0 + tslib: 2.6.2 webidl-conversions@3.0.1: {} @@ -18036,7 +17280,7 @@ snapshots: tr46: 1.0.1 webidl-conversions: 4.0.2 - when-exit@2.1.3: {} + when-exit@2.1.2: {} which-boxed-primitive@1.0.2: dependencies: @@ -18068,6 +17312,13 @@ snapshots: is-weakmap: 2.0.1 is-weakset: 2.0.2 + which-module@2.0.1: {} + + which-pm@2.0.0: + dependencies: + load-yaml-file: 0.2.0 + path-exists: 4.0.0 + which-typed-array@1.1.13: dependencies: available-typed-arrays: 1.0.5 @@ -18084,7 +17335,7 @@ snapshots: dependencies: isexe: 2.0.0 - why-is-node-running@2.3.0: + why-is-node-running@2.2.2: dependencies: siginfo: 2.0.0 stackback: 0.0.2 @@ -18099,10 +17350,14 @@ snapshots: dependencies: string-width: 5.1.2 - word-wrap@1.2.5: {} - wordwrap@1.0.0: {} + wrap-ansi@6.2.0: + dependencies: + ansi-styles: 4.3.0 + string-width: 4.2.3 + strip-ansi: 6.0.1 + wrap-ansi@7.0.0: dependencies: ansi-styles: 4.3.0 @@ -18118,23 +17373,27 @@ snapshots: wrap-ansi@9.0.0: dependencies: ansi-styles: 6.2.1 - string-width: 7.2.0 + string-width: 7.0.0 strip-ansi: 7.1.0 wrappy@1.0.2: {} - ws@7.5.10: {} + ws@7.5.9: {} ws@8.13.0: {} - ws@8.17.1: {} + ws@8.16.0: {} - ws@8.18.0: {} + ws@8.17.1: {} xmldom-sre@0.1.31: {} xtend@4.0.2: {} + y18n@4.0.3: {} + + y18n@5.0.8: {} + yallist@2.1.2: {} yallist@3.1.1: {} @@ -18145,10 +17404,37 @@ snapshots: yaml@2.3.4: {} - yaml@2.5.1: {} + yargs-parser@18.1.3: + dependencies: + camelcase: 5.3.1 + decamelize: 1.2.0 yargs-parser@21.1.1: {} + yargs@15.4.1: + dependencies: + cliui: 6.0.0 + decamelize: 1.2.0 + find-up: 4.1.0 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + require-main-filename: 2.0.0 + set-blocking: 2.0.0 + string-width: 4.2.3 + which-module: 2.0.1 + y18n: 4.0.3 + yargs-parser: 18.1.3 + + yargs@17.7.2: + dependencies: + cliui: 8.0.1 + escalade: 3.1.1 + get-caller-file: 2.0.5 + require-directory: 2.1.1 + string-width: 4.2.3 + y18n: 5.0.8 + yargs-parser: 21.1.1 + yn@3.1.1: {} yocto-queue@0.1.0: {} From 3b06276b0e1f0e0f1d0ae0d40e742236b965858b Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Mon, 23 Sep 2024 17:14:25 -0400 Subject: [PATCH 06/29] prerelease --- .changeset/pre.json | 12 ++++++++++++ packages/core/package.json | 2 +- 2 files changed, 13 insertions(+), 1 deletion(-) create mode 100644 .changeset/pre.json diff --git a/.changeset/pre.json b/.changeset/pre.json new file mode 100644 index 000000000..bcccd2c0f --- /dev/null +++ b/.changeset/pre.json @@ -0,0 +1,12 @@ +{ + "mode": "pre", + "tag": "next", + "initialVersions": { + "@ponder/common": "0.0.0", + "@ponder/core": "0.6.2", + "create-ponder": "0.6.2", + "eslint-config-ponder": "0.6.2", + "@ponder/utils": "0.2.1" + }, + "changesets": [] +} diff --git a/packages/core/package.json b/packages/core/package.json index 4f5b1fe78..013c8e6d2 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@ponder/core", - "version": "0.6.2", + "version": "0.6.3-next.1", "description": "An open-source framework for crypto application backends", "license": "MIT", "type": "module", From 2adb02d1b6725d4cfb65a3767ee4c03b3e043503 Mon Sep 17 00:00:00 2001 From: kyscott18 <43524469+kyscott18@users.noreply.github.com> Date: Fri, 27 Sep 2024 15:41:37 -0400 Subject: [PATCH 07/29] Kjs/store (#1123) * . * . * insert and update * delete * realtime * relations * onchain offchain * remove ponder.offchain.schema * cleanup --- examples/feature-api-functions/package.json | 4 +- .../feature-api-functions/ponder-env.d.ts | 4 +- .../feature-api-functions/ponder.offchain.ts | 9 - .../feature-api-functions/ponder.schema.ts | 104 +- .../feature-api-functions/src/api/index.ts | 49 +- examples/feature-api-functions/src/index.ts | 126 +- examples/reference-erc20/package.json | 2 + examples/reference-erc20/ponder-env.d.ts | 4 +- examples/reference-erc20/ponder.schema.ts | 96 +- examples/reference-erc20/src/index.ts | 126 +- package.json | 1 - packages/core/package.json | 14 +- packages/core/src/bin/commands/codegen.ts | 2 +- packages/core/src/bin/commands/serve.ts | 2 +- packages/core/src/bin/utils/run.ts | 48 +- packages/core/src/bin/utils/runServer.ts | 5 +- packages/core/src/build/schema.test.ts | 411 --- packages/core/src/build/schema.ts | 338 -- packages/core/src/build/service.ts | 93 +- packages/core/src/common/codegen.ts | 19 +- packages/core/src/common/options.ts | 2 - packages/core/src/common/telemetry.ts | 3 +- packages/core/src/database/index.ts | 453 ++- packages/core/src/drizzle/db.ts | 102 +- packages/core/src/drizzle/hex.ts | 45 +- packages/core/src/drizzle/index.ts | 498 +++ packages/core/src/drizzle/list.ts | 51 - packages/core/src/drizzle/runtime.test.ts | 267 -- packages/core/src/drizzle/runtime.ts | 211 -- packages/core/src/drizzle/sql.ts | 252 ++ packages/core/src/drizzle/table.test-d.ts | 152 - packages/core/src/drizzle/table.ts | 52 - .../src/graphql/buildGraphqlSchema.test.ts | 3097 ----------------- .../core/src/graphql/buildGraphqlSchema.ts | 71 - packages/core/src/graphql/buildLoaderCache.ts | 28 - packages/core/src/graphql/entity.ts | 187 - packages/core/src/graphql/enum.ts | 19 - packages/core/src/graphql/filter.test.ts | 69 - packages/core/src/graphql/filter.ts | 177 - packages/core/src/graphql/graphQLJson.ts | 63 - packages/core/src/graphql/index.test.ts | 316 -- packages/core/src/graphql/index.ts | 86 - packages/core/src/graphql/metadata.ts | 7 - packages/core/src/graphql/plural.ts | 64 - packages/core/src/graphql/scalar.ts | 33 - packages/core/src/graphql/singular.ts | 45 - packages/core/src/hono/context.ts | 11 +- packages/core/src/hono/handler.ts | 2 +- packages/core/src/index.ts | 5 +- .../src/indexing-store/historical.test.ts | 1184 ------- .../core/src/indexing-store/historical.ts | 877 ----- packages/core/src/indexing-store/metadata.ts | 16 +- .../core/src/indexing-store/readonly.test.ts | 679 ---- packages/core/src/indexing-store/readonly.ts | 290 -- .../core/src/indexing-store/realtime.test.ts | 897 ----- packages/core/src/indexing-store/realtime.ts | 469 --- .../core/src/indexing-store/store.bench.ts | 178 - packages/core/src/indexing-store/store.ts | 156 - .../src/indexing-store/utils/cursor.test.ts | 113 - .../core/src/indexing-store/utils/cursor.ts | 82 - .../core/src/indexing-store/utils/encoding.ts | 397 --- .../core/src/indexing-store/utils/errors.ts | 46 - .../src/indexing-store/utils/filter.test.ts | 208 -- .../core/src/indexing-store/utils/filter.ts | 195 -- .../src/indexing-store/utils/sort.test.ts | 129 - .../core/src/indexing-store/utils/sort.ts | 86 - packages/core/src/indexing/index.ts | 2 - packages/core/src/indexing/ponderActions.ts | 118 +- packages/core/src/indexing/service.ts | 51 +- packages/core/src/schema/columns.test-d.ts | 333 -- packages/core/src/schema/columns.ts | 675 ---- packages/core/src/schema/common.ts | 195 -- packages/core/src/schema/infer.test-d.ts | 118 - packages/core/src/schema/infer.ts | 72 - packages/core/src/schema/schema.test-d.ts | 212 -- packages/core/src/schema/schema.ts | 378 -- packages/core/src/schema/utils.ts | 95 - packages/core/src/server/index.ts | 67 +- packages/core/src/types/api.ts | 22 +- packages/core/src/types/model.test-d.ts | 18 - packages/core/src/types/model.ts | 106 - packages/core/src/types/schema.ts | 32 - packages/core/src/types/utils.ts | 32 - packages/core/src/types/virtual.test-d.ts | 53 +- packages/core/src/types/virtual.ts | 23 +- packages/core/tsup.config.ts | 2 +- pnpm-lock.yaml | 21 +- 87 files changed, 1494 insertions(+), 14958 deletions(-) delete mode 100644 examples/feature-api-functions/ponder.offchain.ts delete mode 100644 packages/core/src/build/schema.test.ts delete mode 100644 packages/core/src/build/schema.ts create mode 100644 packages/core/src/drizzle/index.ts delete mode 100644 packages/core/src/drizzle/list.ts delete mode 100644 packages/core/src/drizzle/runtime.test.ts delete mode 100644 packages/core/src/drizzle/runtime.ts create mode 100644 packages/core/src/drizzle/sql.ts delete mode 100644 packages/core/src/drizzle/table.test-d.ts delete mode 100644 packages/core/src/drizzle/table.ts delete mode 100644 packages/core/src/graphql/buildGraphqlSchema.test.ts delete mode 100644 packages/core/src/graphql/buildGraphqlSchema.ts delete mode 100644 packages/core/src/graphql/buildLoaderCache.ts delete mode 100644 packages/core/src/graphql/entity.ts delete mode 100644 packages/core/src/graphql/enum.ts delete mode 100644 packages/core/src/graphql/filter.test.ts delete mode 100644 packages/core/src/graphql/filter.ts delete mode 100644 packages/core/src/graphql/graphQLJson.ts delete mode 100644 packages/core/src/graphql/index.test.ts delete mode 100644 packages/core/src/graphql/index.ts delete mode 100644 packages/core/src/graphql/metadata.ts delete mode 100644 packages/core/src/graphql/plural.ts delete mode 100644 packages/core/src/graphql/scalar.ts delete mode 100644 packages/core/src/graphql/singular.ts delete mode 100644 packages/core/src/indexing-store/historical.test.ts delete mode 100644 packages/core/src/indexing-store/historical.ts delete mode 100644 packages/core/src/indexing-store/readonly.test.ts delete mode 100644 packages/core/src/indexing-store/readonly.ts delete mode 100644 packages/core/src/indexing-store/realtime.test.ts delete mode 100644 packages/core/src/indexing-store/realtime.ts delete mode 100644 packages/core/src/indexing-store/store.bench.ts delete mode 100644 packages/core/src/indexing-store/store.ts delete mode 100644 packages/core/src/indexing-store/utils/cursor.test.ts delete mode 100644 packages/core/src/indexing-store/utils/cursor.ts delete mode 100644 packages/core/src/indexing-store/utils/encoding.ts delete mode 100644 packages/core/src/indexing-store/utils/errors.ts delete mode 100644 packages/core/src/indexing-store/utils/filter.test.ts delete mode 100644 packages/core/src/indexing-store/utils/filter.ts delete mode 100644 packages/core/src/indexing-store/utils/sort.test.ts delete mode 100644 packages/core/src/indexing-store/utils/sort.ts delete mode 100644 packages/core/src/schema/columns.test-d.ts delete mode 100644 packages/core/src/schema/columns.ts delete mode 100644 packages/core/src/schema/common.ts delete mode 100644 packages/core/src/schema/infer.test-d.ts delete mode 100644 packages/core/src/schema/infer.ts delete mode 100644 packages/core/src/schema/schema.test-d.ts delete mode 100644 packages/core/src/schema/schema.ts delete mode 100644 packages/core/src/schema/utils.ts delete mode 100644 packages/core/src/types/model.test-d.ts delete mode 100644 packages/core/src/types/model.ts delete mode 100644 packages/core/src/types/schema.ts diff --git a/examples/feature-api-functions/package.json b/examples/feature-api-functions/package.json index d4ff65fc2..3b2614e0b 100644 --- a/examples/feature-api-functions/package.json +++ b/examples/feature-api-functions/package.json @@ -7,13 +7,13 @@ "start": "ponder start", "codegen": "ponder codegen", "serve": "ponder serve", - "generate": "drizzle-kit generate --dialect postgresql --schema ./ponder.offchain.ts --out migrations", + "generate": "drizzle-kit generate --dialect postgresql --schema ./ponder.schema.ts --out migrations", "lint": "eslint .", "typecheck": "tsc" }, "dependencies": { "@ponder/core": "workspace:*", - "drizzle-kit": "^0.22.8", + "drizzle-kit": "0.22.8", "drizzle-orm": "^0.33.0", "hono": "^4.5.0", "viem": "^2.21.3" diff --git a/examples/feature-api-functions/ponder-env.d.ts b/examples/feature-api-functions/ponder-env.d.ts index 03126bf92..919cf2f8a 100644 --- a/examples/feature-api-functions/ponder-env.d.ts +++ b/examples/feature-api-functions/ponder-env.d.ts @@ -7,7 +7,7 @@ declare module "@/generated" { import type { Virtual } from "@ponder/core"; type config = typeof import("./ponder.config.ts").default; - type schema = typeof import("./ponder.schema.ts").default; + type schema = typeof import("./ponder.schema.ts"); export const ponder: Virtual.Registry; @@ -21,8 +21,6 @@ declare module "@/generated" { schema, name >; - export type ApiContext = Virtual.Drizzle; export type IndexingFunctionArgs = Virtual.IndexingFunctionArgs; - export type Schema = Virtual.Schema; } diff --git a/examples/feature-api-functions/ponder.offchain.ts b/examples/feature-api-functions/ponder.offchain.ts deleted file mode 100644 index 2752eaa25..000000000 --- a/examples/feature-api-functions/ponder.offchain.ts +++ /dev/null @@ -1,9 +0,0 @@ -import { ponderHex } from "@ponder/core"; -import { pgSchema, serial } from "drizzle-orm/pg-core"; - -export const offchainSchema = pgSchema("offchain"); - -export const metadata = offchainSchema.table("metadata", { - id: serial("id").primaryKey(), - account: ponderHex("account").notNull(), -}); diff --git a/examples/feature-api-functions/ponder.schema.ts b/examples/feature-api-functions/ponder.schema.ts index a722500c6..7071f7297 100644 --- a/examples/feature-api-functions/ponder.schema.ts +++ b/examples/feature-api-functions/ponder.schema.ts @@ -1,50 +1,58 @@ -import { createSchema } from "@ponder/core"; - -export default createSchema((p) => ({ - Account: p.createTable({ - id: p.hex(), - balance: p.bigint(), - isOwner: p.boolean(), - - allowances: p.many("Allowance.ownerId"), - approvalOwnerEvents: p.many("ApprovalEvent.ownerId"), - approvalSpenderEvents: p.many("ApprovalEvent.spenderId"), - transferFromEvents: p.many("TransferEvent.fromId"), - transferToEvents: p.many("TransferEvent.toId"), - }), - Allowance: p.createTable({ - id: p.string(), - amount: p.bigint(), - - ownerId: p.hex().references("Account.id"), - spenderId: p.hex().references("Account.id"), - - owner: p.one("ownerId"), - spender: p.one("spenderId"), +import { + boolean, + evmBigint, + evmHex, + index, + integer, + offchainSchema, + onchainTable, + primaryKey, + serial, +} from "@ponder/core/db"; + +export const account = onchainTable("account", { + address: evmHex("address").primaryKey(), + balance: evmBigint("balance").notNull(), + isOwner: boolean("is_owner").notNull(), +}); + +export const allowance = onchainTable( + "allowance", + { + owner: evmHex("owner"), + spender: evmHex("spender"), + amount: evmBigint("amount").notNull(), + }, + (table) => ({ + pk: primaryKey({ columns: [table.owner, table.spender] }), }), - TransferEvent: p.createTable( - { - id: p.string(), - amount: p.bigint(), - timestamp: p.int(), - - fromId: p.hex().references("Account.id"), - toId: p.hex().references("Account.id"), - - from: p.one("fromId"), - to: p.one("toId"), - }, - { fromIdIndex: p.index("fromId") }, - ), - ApprovalEvent: p.createTable({ - id: p.string(), - amount: p.bigint(), - timestamp: p.int(), - - ownerId: p.hex().references("Account.id"), - spenderId: p.hex().references("Account.id"), - - owner: p.one("ownerId"), - spender: p.one("spenderId"), +); + +export const transferEvent = onchainTable( + "transfer_event", + { + id: serial("id").primaryKey(), + amount: evmBigint("amount").$type(), + timestamp: integer("timestamp"), + from: evmHex("from"), + to: evmHex("to"), + }, + (table) => ({ + fromIdx: index("from_index").on(table.from), }), -})); +); + +export const approvalEvent = onchainTable("approval_event", { + id: serial("id").primaryKey(), + amount: evmBigint("amount"), + timestamp: integer("timestamp"), + owner: evmHex("from"), + spender: evmHex("to"), +}); + +export const schema = offchainSchema("offchain"); + +export const metadata = schema.table("metadata", { + id: serial("id").primaryKey(), + account: evmHex("account").notNull(), +}); diff --git a/examples/feature-api-functions/src/api/index.ts b/examples/feature-api-functions/src/api/index.ts index f151582d6..d64e8bf7c 100644 --- a/examples/feature-api-functions/src/api/index.ts +++ b/examples/feature-api-functions/src/api/index.ts @@ -1,15 +1,15 @@ import { ponder } from "@/generated"; -import { graphql, replaceBigInts } from "@ponder/core"; -import { count, desc, eq, or } from "drizzle-orm"; +import { replaceBigInts } from "@ponder/core"; +import { count, desc, eq, or } from "@ponder/core/db"; import { formatEther, getAddress } from "viem"; -import * as offchainSchema from "../../ponder.offchain"; +import * as schema from "../../ponder.schema"; -ponder.use("/graphql", graphql()); +// ponder.use("/graphql", graphql()); ponder.get("/count", async (c) => { const result = await c.db .select({ count: count() }) - .from(c.tables.TransferEvent); + .from(schema.transferEvent); if (result.length === 0) return c.text("0"); return c.text(String(result[0]!.count)); @@ -17,13 +17,15 @@ ponder.get("/count", async (c) => { ponder.get("/count/:address", async (c) => { const account = getAddress(c.req.param("address")); - const { TransferEvent } = c.tables; const result = await c.db .select({ count: count() }) - .from(c.tables.TransferEvent) + .from(schema.transferEvent) .where( - or(eq(TransferEvent.fromId, account), eq(TransferEvent.toId, account)), + or( + eq(schema.transferEvent.from, account), + eq(schema.transferEvent.to, account), + ), ); if (result.length === 0) return c.text("0"); @@ -31,18 +33,19 @@ ponder.get("/count/:address", async (c) => { }); ponder.get("/whale-transfers", async (c) => { - const { TransferEvent, Account } = c.tables; - // Top 10 transfers from whale accounts const result = await c.db .select({ - sender: Account.id, - senderBalance: Account.balance, - amount: TransferEvent.amount, + sender: schema.account.address, + senderBalance: schema.account.balance, + amount: schema.transferEvent.amount, }) - .from(TransferEvent) - .innerJoin(Account, eq(TransferEvent.fromId, Account.id)) - .orderBy(desc(Account.balance)) + .from(schema.transferEvent) + .innerJoin( + schema.account, + eq(schema.transferEvent.from, schema.account.address), + ) + .orderBy(desc(schema.account.balance)) .limit(10); if (result.length === 0) return c.text("Not found", 500); @@ -51,7 +54,7 @@ ponder.get("/whale-transfers", async (c) => { ponder.get("/register/:address", async (c) => { const account = getAddress(c.req.param("address")); - await c.db.insert(offchainSchema.metadata).values({ account }); + await c.db.insert(schema.metadata).values({ account }); return c.text("Success", 200); }); @@ -60,15 +63,15 @@ ponder.get("/user-transfers", async (c) => { // Top 20 largest transfers to registered users const result = await c.db .select({ - amount: c.tables.TransferEvent.amount, - account: offchainSchema.metadata.account, + amount: schema.transferEvent.amount, + account: schema.metadata.account, }) - .from(c.tables.TransferEvent) + .from(schema.transferEvent) .innerJoin( - offchainSchema.metadata, - eq(c.tables.TransferEvent.toId, offchainSchema.metadata.account), + schema.metadata, + eq(schema.transferEvent.to, schema.metadata.account), ) - .orderBy(desc(c.tables.TransferEvent.amount)) + .orderBy(desc(schema.transferEvent.amount)) .limit(20); return c.json(replaceBigInts(result, (b) => formatEther(b))); diff --git a/examples/feature-api-functions/src/index.ts b/examples/feature-api-functions/src/index.ts index 16bf33aa7..36b09c630 100644 --- a/examples/feature-api-functions/src/index.ts +++ b/examples/feature-api-functions/src/index.ts @@ -1,70 +1,94 @@ import { ponder } from "@/generated"; +import { and, eq } from "drizzle-orm"; +import * as schema from "../ponder.schema"; ponder.on("ERC20:Transfer", async ({ event, context }) => { - const { Account, TransferEvent } = context.db; + // Create an "account" for the sender, or update the balance if it already exists. - // Create an Account for the sender, or update the balance if it already exists. - await Account.upsert({ - id: event.args.from, - create: { - balance: BigInt(0), - isOwner: false, - }, - update: ({ current }) => ({ - balance: current.balance - event.args.amount, - }), + const from = await context.db.query.account.findFirst({ + where: eq(schema.account.address, event.args.from), }); - // Create an Account for the recipient, or update the balance if it already exists. - await Account.upsert({ - id: event.args.to, - create: { - balance: event.args.amount, + if (from === undefined) { + await context.db.insert(schema.account).values({ + address: event.args.from, + balance: 0n, isOwner: false, - }, - update: ({ current }) => ({ - balance: current.balance + event.args.amount, - }), + }); + } else { + await context.db + .update(schema.account) + .set({ + balance: from.balance - event.args.amount, + }) + .where(eq(schema.account.address, event.args.from)); + } + + // Create an "account" for the recipient, or update the balance if it already exists. + + const to = await context.db.query.account.findFirst({ + where: eq(schema.account.address, event.args.to), }); - // Create a TransferEvent. - await TransferEvent.create({ - id: event.log.id, - data: { - fromId: event.args.from, - toId: event.args.to, - amount: event.args.amount, - timestamp: Number(event.block.timestamp), - }, + if (to === undefined) { + await context.db.insert(schema.account).values({ + address: event.args.to, + balance: 0n, + isOwner: false, + }); + } else { + await context.db + .update(schema.account) + .set({ + balance: to.balance + event.args.amount, + }) + .where(eq(schema.account.address, event.args.to)); + } + + // add row to "transfer_event". + await context.db.insert(schema.transferEvent).values({ + amount: event.args.amount, + timestamp: Number(event.block.timestamp), + from: event.args.from, + to: event.args.to, }); }); ponder.on("ERC20:Approval", async ({ event, context }) => { - const { Allowance, ApprovalEvent } = context.db; - - const allowanceId = `${event.args.owner}-${event.args.spender}`; + // upsert "allowance". - // Create or update the Allowance. - await Allowance.upsert({ - id: allowanceId, - create: { - ownerId: event.args.owner, - spenderId: event.args.spender, - amount: event.args.amount, - }, - update: { - amount: event.args.amount, - }, + const allowance = await context.db.query.allowance.findFirst({ + where: and( + eq(schema.allowance.spender, event.args.spender), + eq(schema.allowance.owner, event.args.owner), + ), }); - // Create an ApprovalEvent. - await ApprovalEvent.create({ - id: event.log.id, - data: { - ownerId: event.args.owner, - spenderId: event.args.spender, + if (allowance === undefined) { + await context.db.insert(schema.allowance).values({ + owner: event.args.owner, + spender: event.args.spender, amount: event.args.amount, - timestamp: Number(event.block.timestamp), - }, + }); + } else { + await context.db + .update(schema.allowance) + .set({ + amount: event.args.amount, + }) + .where( + and( + eq(schema.allowance.spender, event.args.spender), + eq(schema.allowance.owner, event.args.owner), + ), + ); + } + + // add row to "approval_event". + await context.db.insert(schema.approvalEvent).values({ + amount: event.args.amount, + timestamp: Number(event.block.timestamp), + owner: event.args.owner, + spender: event.args.spender, }); }); diff --git a/examples/reference-erc20/package.json b/examples/reference-erc20/package.json index 0b3d3d6da..94eacc9fd 100644 --- a/examples/reference-erc20/package.json +++ b/examples/reference-erc20/package.json @@ -12,6 +12,8 @@ }, "dependencies": { "@ponder/core": "workspace:*", + "drizzle-kit": "0.22.8", + "drizzle-orm": "^0.33.0", "hono": "^4.5.0", "viem": "^2.21.3" }, diff --git a/examples/reference-erc20/ponder-env.d.ts b/examples/reference-erc20/ponder-env.d.ts index 03126bf92..919cf2f8a 100644 --- a/examples/reference-erc20/ponder-env.d.ts +++ b/examples/reference-erc20/ponder-env.d.ts @@ -7,7 +7,7 @@ declare module "@/generated" { import type { Virtual } from "@ponder/core"; type config = typeof import("./ponder.config.ts").default; - type schema = typeof import("./ponder.schema.ts").default; + type schema = typeof import("./ponder.schema.ts"); export const ponder: Virtual.Registry; @@ -21,8 +21,6 @@ declare module "@/generated" { schema, name >; - export type ApiContext = Virtual.Drizzle; export type IndexingFunctionArgs = Virtual.IndexingFunctionArgs; - export type Schema = Virtual.Schema; } diff --git a/examples/reference-erc20/ponder.schema.ts b/examples/reference-erc20/ponder.schema.ts index a722500c6..348ae3c76 100644 --- a/examples/reference-erc20/ponder.schema.ts +++ b/examples/reference-erc20/ponder.schema.ts @@ -1,50 +1,50 @@ -import { createSchema } from "@ponder/core"; - -export default createSchema((p) => ({ - Account: p.createTable({ - id: p.hex(), - balance: p.bigint(), - isOwner: p.boolean(), - - allowances: p.many("Allowance.ownerId"), - approvalOwnerEvents: p.many("ApprovalEvent.ownerId"), - approvalSpenderEvents: p.many("ApprovalEvent.spenderId"), - transferFromEvents: p.many("TransferEvent.fromId"), - transferToEvents: p.many("TransferEvent.toId"), - }), - Allowance: p.createTable({ - id: p.string(), - amount: p.bigint(), - - ownerId: p.hex().references("Account.id"), - spenderId: p.hex().references("Account.id"), - - owner: p.one("ownerId"), - spender: p.one("spenderId"), +import { + boolean, + evmBigint, + evmHex, + index, + integer, + onchainTable, + primaryKey, + serial, +} from "@ponder/core/db"; + +export const account = onchainTable("account", { + address: evmHex("address").primaryKey(), + balance: evmBigint("balance").notNull(), + isOwner: boolean("is_owner").notNull(), +}); + +export const allowance = onchainTable( + "allowance", + { + owner: evmHex("owner"), + spender: evmHex("spender"), + amount: evmBigint("amount").notNull(), + }, + (table) => ({ + pk: primaryKey({ columns: [table.owner, table.spender] }), }), - TransferEvent: p.createTable( - { - id: p.string(), - amount: p.bigint(), - timestamp: p.int(), - - fromId: p.hex().references("Account.id"), - toId: p.hex().references("Account.id"), - - from: p.one("fromId"), - to: p.one("toId"), - }, - { fromIdIndex: p.index("fromId") }, - ), - ApprovalEvent: p.createTable({ - id: p.string(), - amount: p.bigint(), - timestamp: p.int(), - - ownerId: p.hex().references("Account.id"), - spenderId: p.hex().references("Account.id"), - - owner: p.one("ownerId"), - spender: p.one("spenderId"), +); + +export const transferEvent = onchainTable( + "transfer_event", + { + id: serial("id").primaryKey(), + amount: evmBigint("amount").notNull(), + timestamp: integer("timestamp").notNull(), + from: evmHex("from").notNull(), + to: evmHex("to").notNull(), + }, + (table) => ({ + fromIdx: index("from_index").on(table.from), }), -})); +); + +export const approvalEvent = onchainTable("approval_event", { + id: serial("id").primaryKey(), + amount: evmBigint("amount").notNull(), + timestamp: integer("timestamp").notNull(), + owner: evmHex("from").notNull(), + spender: evmHex("to").notNull(), +}); diff --git a/examples/reference-erc20/src/index.ts b/examples/reference-erc20/src/index.ts index 16bf33aa7..c2238534d 100644 --- a/examples/reference-erc20/src/index.ts +++ b/examples/reference-erc20/src/index.ts @@ -1,70 +1,94 @@ import { ponder } from "@/generated"; +import { and, eq } from "@ponder/core/db"; +import * as schema from "../ponder.schema"; ponder.on("ERC20:Transfer", async ({ event, context }) => { - const { Account, TransferEvent } = context.db; + // Create an "account" for the sender, or update the balance if it already exists. - // Create an Account for the sender, or update the balance if it already exists. - await Account.upsert({ - id: event.args.from, - create: { - balance: BigInt(0), - isOwner: false, - }, - update: ({ current }) => ({ - balance: current.balance - event.args.amount, - }), + const from = await context.db.query.account.findFirst({ + where: eq(schema.account.address, event.args.from), }); - // Create an Account for the recipient, or update the balance if it already exists. - await Account.upsert({ - id: event.args.to, - create: { - balance: event.args.amount, + if (from === undefined) { + await context.db.insert(schema.account).values({ + address: event.args.from, + balance: 0n, isOwner: false, - }, - update: ({ current }) => ({ - balance: current.balance + event.args.amount, - }), + }); + } else { + await context.db + .update(schema.account) + .set({ + balance: from.balance - event.args.amount, + }) + .where(eq(schema.account.address, event.args.from)); + } + + // Create an "account" for the recipient, or update the balance if it already exists. + + const to = await context.db.query.account.findFirst({ + where: eq(schema.account.address, event.args.to), }); - // Create a TransferEvent. - await TransferEvent.create({ - id: event.log.id, - data: { - fromId: event.args.from, - toId: event.args.to, - amount: event.args.amount, - timestamp: Number(event.block.timestamp), - }, + if (to === undefined) { + await context.db.insert(schema.account).values({ + address: event.args.to, + balance: 0n, + isOwner: false, + }); + } else { + await context.db + .update(schema.account) + .set({ + balance: to.balance + event.args.amount, + }) + .where(eq(schema.account.address, event.args.to)); + } + + // add row to "transfer_event". + await context.db.insert(schema.transferEvent).values({ + amount: event.args.amount, + timestamp: Number(event.block.timestamp), + from: event.args.from, + to: event.args.to, }); }); ponder.on("ERC20:Approval", async ({ event, context }) => { - const { Allowance, ApprovalEvent } = context.db; - - const allowanceId = `${event.args.owner}-${event.args.spender}`; + // upsert "allowance". - // Create or update the Allowance. - await Allowance.upsert({ - id: allowanceId, - create: { - ownerId: event.args.owner, - spenderId: event.args.spender, - amount: event.args.amount, - }, - update: { - amount: event.args.amount, - }, + const allowance = await context.db.query.allowance.findFirst({ + where: and( + eq(schema.allowance.spender, event.args.spender), + eq(schema.allowance.owner, event.args.owner), + ), }); - // Create an ApprovalEvent. - await ApprovalEvent.create({ - id: event.log.id, - data: { - ownerId: event.args.owner, - spenderId: event.args.spender, + if (allowance === undefined) { + await context.db.insert(schema.allowance).values({ + owner: event.args.owner, + spender: event.args.spender, amount: event.args.amount, - timestamp: Number(event.block.timestamp), - }, + }); + } else { + await context.db + .update(schema.allowance) + .set({ + amount: event.args.amount, + }) + .where( + and( + eq(schema.allowance.spender, event.args.spender), + eq(schema.allowance.owner, event.args.owner), + ), + ); + } + + // add row to "approval_event". + await context.db.insert(schema.approvalEvent).values({ + amount: event.args.amount, + timestamp: Number(event.block.timestamp), + owner: event.args.owner, + spender: event.args.spender, }); }); diff --git a/package.json b/package.json index 41846bb6f..db2aa671f 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "@biomejs/biome": "^1.8.1", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", - "drizzle-kit": "^0.22.8", "drizzle-orm": "^0.33.0", "hono": "4.5.0", "lint-staged": "^15.1.0", diff --git a/packages/core/package.json b/packages/core/package.json index 013c8e6d2..ef0425b4f 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -24,9 +24,16 @@ "types": "./dist/index.d.ts", "typings": "./dist/index.d.ts", "exports": { - "types": "./dist/index.d.ts", - "import": "./dist/index.js", - "require": "./dist/index.cjs" + ".": { + "types": "./dist/index.d.ts", + "import": "./dist/index.js", + "require": "./dist/index.cjs" + }, + "./db": { + "types": "./dist/drizzle/db.d.ts", + "import": "./dist/drizzle/db.js", + "require": "./dist/drizzle/db.cjs" + } }, "scripts": { "build": "tsup", @@ -35,7 +42,6 @@ "typecheck": "tsc --noEmit" }, "peerDependencies": { - "drizzle-kit": "^0.24.2", "drizzle-orm": "^0.31.2", "hono": ">=4.5", "typescript": ">=5.0.4", diff --git a/packages/core/src/bin/commands/codegen.ts b/packages/core/src/bin/commands/codegen.ts index ad49b0864..e63b0cf53 100644 --- a/packages/core/src/bin/commands/codegen.ts +++ b/packages/core/src/bin/commands/codegen.ts @@ -57,7 +57,7 @@ export async function codegen({ cliOptions }: { cliOptions: CliOptions }) { properties: { cli_command: "codegen" }, }); - runCodegen({ common, graphqlSchema: indexing.build.graphqlSchema }); + runCodegen({ common }); logger.info({ service: "codegen", msg: "Wrote ponder-env.d.ts" }); logger.info({ service: "codegen", msg: "Wrote schema.graphql" }); diff --git a/packages/core/src/bin/commands/serve.ts b/packages/core/src/bin/commands/serve.ts index 543362b01..3d70c2eeb 100644 --- a/packages/core/src/bin/commands/serve.ts +++ b/packages/core/src/bin/commands/serve.ts @@ -77,7 +77,7 @@ export async function serve({ cliOptions }: { cliOptions: CliOptions }) { return cleanup; } - const database = createDatabase({ + const database = await createDatabase({ common, schema, databaseConfig, diff --git a/packages/core/src/bin/utils/run.ts b/packages/core/src/bin/utils/run.ts index a90e2e0e8..88418ad49 100644 --- a/packages/core/src/bin/utils/run.ts +++ b/packages/core/src/bin/utils/run.ts @@ -1,12 +1,7 @@ import type { IndexingBuild } from "@/build/index.js"; -import { runCodegen } from "@/common/codegen.js"; import type { Common } from "@/common/common.js"; import { createDatabase } from "@/database/index.js"; -import { getHistoricalStore } from "@/indexing-store/historical.js"; import { getMetadataStore } from "@/indexing-store/metadata.js"; -import { getReadonlyStore } from "@/indexing-store/readonly.js"; -import { getRealtimeStore } from "@/indexing-store/realtime.js"; -import type { IndexingStore } from "@/indexing-store/store.js"; import { createIndexingService } from "@/indexing/index.js"; import { createSyncStore } from "@/sync-store/index.js"; import type { Event } from "@/sync/events.js"; @@ -39,14 +34,13 @@ export async function run({ databaseConfig, networks, sources, - graphqlSchema, schema, indexingFunctions, } = build; let isKilled = false; - const database = createDatabase({ + const database = await createDatabase({ common, schema, databaseConfig, @@ -62,7 +56,6 @@ export async function run({ }); const metadataStore = getMetadataStore({ - dialect: database.dialect, db: database.qb.user, }); @@ -70,7 +63,7 @@ export async function run({ // starting the server so the app can become responsive more quickly. await database.migrateSync(); - runCodegen({ common, graphqlSchema }); + // runCodegen({ common, graphqlSchema }); // Note: can throw const sync = await createSync({ @@ -134,32 +127,13 @@ export async function run({ }, }); - const readonlyStore = getReadonlyStore({ - dialect: database.dialect, - schema, - db: database.qb.user, - common, - }); - - const historicalStore = getHistoricalStore({ - dialect: database.dialect, - schema, - readonlyStore, - db: database.qb.user, - common, - isCacheExhaustive: encodeCheckpoint(zeroCheckpoint) === initialCheckpoint, - }); - - let indexingStore: IndexingStore = historicalStore; - const indexingService = createIndexingService({ indexingFunctions, common, - indexingStore, sources, networks, sync, - schema, + database, }); await metadataStore.setStatus(sync.getStatus()); @@ -201,7 +175,7 @@ export async function run({ if (isKilled) return; - await historicalStore.flush({ isFullFlush: true }); + // await historicalStore.flush({ isFullFlush: true }); // Manually update metrics to fix a UI bug that occurs when the end // checkpoint is between the last processed event and the finalized @@ -223,19 +197,9 @@ export async function run({ await database.finalize({ checkpoint: sync.getFinalizedCheckpoint() }); - await database.createIndexes({ schema }); - - indexingStore = { - ...readonlyStore, - ...getRealtimeStore({ - dialect: database.dialect, - schema, - db: database.qb.user, - common, - }), - }; + database.drizzle.mode = "realtime"; - indexingService.updateIndexingStore({ indexingStore, schema }); + // await database.createIndexes({ schema }); sync.startRealtime(); diff --git a/packages/core/src/bin/utils/runServer.ts b/packages/core/src/bin/utils/runServer.ts index 75eee3ca9..291df0821 100644 --- a/packages/core/src/bin/utils/runServer.ts +++ b/packages/core/src/bin/utils/runServer.ts @@ -13,9 +13,9 @@ export async function runServer({ common: Common; build: ApiBuild; }) { - const { databaseConfig, schema, offchainSchema } = build; + const { databaseConfig, schema } = build; - const database = createDatabase({ + const database = await createDatabase({ common, schema, databaseConfig, @@ -26,7 +26,6 @@ export async function runServer({ routes: build.routes, common, schema, - offchainSchema, database, }); diff --git a/packages/core/src/build/schema.test.ts b/packages/core/src/build/schema.test.ts deleted file mode 100644 index 97bc96893..000000000 --- a/packages/core/src/build/schema.test.ts +++ /dev/null @@ -1,411 +0,0 @@ -import { createSchema } from "@/schema/schema.js"; -import { expect, test } from "vitest"; -import { safeBuildSchema } from "./schema.js"; - -test("safeBuildSchema() returns error for duplicate enum values", () => { - const schema = createSchema((p) => ({ - myEnum: p.createEnum(["duplicate", "duplicate"]), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Enum 'myEnum' contains duplicate value 'duplicate'.", - ); -}); - -test("safeBuildSchema() returns error for table without ID column", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({}), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Table 'myTable' does not have an 'id' column.", - ); -}); - -test("safeBuildSchema() returns error for ID column typed as an enum", () => { - const schema = createSchema((p) => ({ - myEnum: p.createEnum(["value1", "value2"]), - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.enum("myEnum"), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. Got 'enum', expected one of ['string', 'hex', 'bigint', 'int'].", - ); -}); - -test("safeBuildSchema() returns error for ID column typed as a 'one' relationship", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.one("refTableId"), - refTableId: p.string().references("refTable.id"), - }), - refTable: p.createTable({ - id: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. Got 'one', expected one of ['string', 'hex', 'bigint', 'int'].", - ); -}); - -test("safeBuildSchema() returns error for ID column typed as a 'many' relationship", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.many("refTable.myTableId"), - }), - // @ts-expect-error - refTable: p.createTable({ - id: p.string(), - myTableId: p.string().references("myTable.id"), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. Got 'many', expected one of ['string', 'hex', 'bigint', 'int'].", - ); -}); - -test("safeBuildSchema() returns error for ID column with the references modifier", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.string().references("refTable.id"), - }), - refTable: p.createTable({ - id: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. ID columns cannot use the '.references' modifier.", - ); -}); - -test("safeBuildSchema() returns error for invalid ID column type boolean", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.boolean(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. Got 'boolean', expected one of ['string', 'hex', 'bigint', 'int'].", - ); -}); - -test("safeBuildSchema() returns error for invalid ID column type float", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.float(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. Got 'float', expected one of ['string', 'hex', 'bigint', 'int'].", - ); -}); - -test("safeBuildSchema() returns error for ID column with optional modifier", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.string().optional(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. ID columns cannot be optional.", - ); -}); - -test("safeBuildSchema() returns error for ID column with list modifier", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - // @ts-expect-error - id: p.string().list(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Invalid type for ID column 'myTable.id'. ID columns cannot be a list.", - ); -}); - -test("safeBuildSchema() returns error for empty table or enum name", () => { - const schema = createSchema((p) => ({ - "": p.createEnum(["value1", "value2"]), - myTable: p.createTable({ - id: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Enum name can't be an empty string.", - ); -}); - -test("safeBuildSchema() returns error for table or enum name with invalid characters", () => { - const schema = createSchema((p) => ({ - "invalid-name": p.createEnum(["value1", "value2"]), - myTable: p.createTable({ - id: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toBe( - "Validation failed: Enum name 'invalid-name' contains an invalid character.", - ); -}); - -test("safeBuildSchema() returns error for 'one' relationship with non-existent reference column", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - id: p.string(), - // @ts-expect-error - refColumn: p.one("nonExistentColumn"), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain("uses a column that does not exist"); -}); - -test("safeBuildSchema() returns error for 'one' relationship with reference to non-foreign key column", () => { - const schema = createSchema((p) => ({ - myTable: p.createTable({ - id: p.string(), - refColumn: p.one("nonForeignKeyColumn"), - nonForeignKeyColumn: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain( - "uses a column that is not foreign key column", - ); -}); - -test("safeBuildSchema() returns error for 'many' relationship with non-existent reference table", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - id: p.string(), - refColumn: p.many("nonExistentTable.nonExistentColumn"), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain("uses a table that does not exist"); -}); - -test("safeBuildSchema() returns error for 'many' relationship with non-existent reference column", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - id: p.string(), - refColumn: p.many("otherTable.nonExistentColumn"), - }), - otherTable: p.createTable({ - id: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain("uses a column that does not exist"); -}); - -test("safeBuildSchema() returns error for 'many' relationship with reference to non-foreign key column", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - id: p.string(), - refColumn: p.many("otherTable.nonForeignKeyColumn"), - }), - otherTable: p.createTable({ - id: p.string(), - nonForeignKeyColumn: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain( - "uses a column that is not foreign key column", - ); -}); - -test("safeBuildSchema() returns error for enum column referencing non-existent enum", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - id: p.string(), - enumColumn: p.enum("nonExistentEnum"), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain("doesn't reference a valid enum"); -}); - -test("safeBuildSchema() returns error for foreign key column referencing non-existent ID column", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable({ - id: p.string(), - fkColumn: p.string().references("nonExistentTable.id"), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain( - "does not reference a valid ID column", - ); -}); - -test("safeBuildSchema() returns error for foreign key column type mismatch", () => { - const schema = createSchema((p) => ({ - myTable: p.createTable({ - id: p.string(), - fkColumn: p.bigint().references("otherTable.id"), - }), - otherTable: p.createTable({ - id: p.string(), - }), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain( - "type does not match the referenced table's ID column type", - ); -}); - -test("safeBuildSchema() returns error for empty index", () => { - const schema = createSchema((p) => ({ - myTable: p.createTable( - { - id: p.string(), - col: p.int(), - }, - { - colIndex: p.index([]), - }, - ), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain("Index 'colIndex' cannot be empty."); -}); - -test("safeBuildSchema() returns error for duplicate index", () => { - const schema = createSchema((p) => ({ - myTable: p.createTable( - { - id: p.string(), - col: p.int(), - }, - { - colIndex: p.index(["col", "col"]), - }, - ), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain( - "Index 'colIndex' cannot contain duplicate columns.", - ); -}); - -test("safeBuildSchema() returns error for invalid multi-column index", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable( - { - id: p.string(), - col: p.int(), - }, - { - // @ts-expect-error - colIndex: p.index(["coll"]), - }, - ), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain( - "Index 'colIndex' does not reference a valid column.", - ); -}); - -test("safeBuildSchema() returns error for invalid index", () => { - const schema = createSchema((p) => ({ - // @ts-expect-error - myTable: p.createTable( - { - id: p.string(), - col: p.int(), - }, - { - // @ts-expect-error - colIndex: p.index("col1"), - }, - ), - })); - - const result = safeBuildSchema({ schema }); - expect(result.status).toBe("error"); - expect(result.error?.message).toContain( - "Index 'colIndex' does not reference a valid column.", - ); -}); diff --git a/packages/core/src/build/schema.ts b/packages/core/src/build/schema.ts deleted file mode 100644 index e56fefa1b..000000000 --- a/packages/core/src/build/schema.ts +++ /dev/null @@ -1,338 +0,0 @@ -import { BuildError } from "@/common/errors.js"; -import type { Schema } from "@/schema/common.js"; -import { - extractReferenceTable, - getEnums, - getTables, - isEnumColumn, - isJSONColumn, - isListColumn, - isManyColumn, - isOneColumn, - isOptionalColumn, - isReferenceColumn, -} from "@/schema/utils.js"; -import { dedupe } from "@ponder/common"; - -export const buildSchema = ({ schema }: { schema: Schema }) => { - const logs: { level: "warn" | "info" | "debug"; msg: string }[] = []; - - // Validate enums - Object.entries(getEnums(schema)).forEach(([name, _enum]) => { - validateTableOrColumnName(name, "Enum"); - - const enumValues = new Set(); - for (const enumValue of _enum) { - if (enumValues.has(enumValue)) { - throw new Error( - `Validation failed: Enum '${name}' contains duplicate value '${enumValue}'.`, - ); - } - enumValues.add(enumValue); - } - }); - - // Validate tables - Object.entries(getTables(schema)).forEach( - ([tableName, { table, constraints }]) => { - validateTableOrColumnName(tableName, "Table"); - - // Validate the id column - if (table.id === undefined) - throw new Error( - `Validation failed: Table '${tableName}' does not have an 'id' column.`, - ); - - if (isJSONColumn(table.id)) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. Got 'json', expected one of ['string', 'hex', 'bigint', 'int'].`, - ); - if (isEnumColumn(table.id)) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. Got 'enum', expected one of ['string', 'hex', 'bigint', 'int'].`, - ); - if (isOneColumn(table.id)) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. Got 'one', expected one of ['string', 'hex', 'bigint', 'int'].`, - ); - if (isManyColumn(table.id)) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. Got 'many', expected one of ['string', 'hex', 'bigint', 'int'].`, - ); - if (isReferenceColumn(table.id)) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. ID columns cannot use the '.references' modifier.`, - ); - - if ( - table.id[" scalar"] !== "bigint" && - table.id[" scalar"] !== "string" && - table.id[" scalar"] !== "hex" && - table.id[" scalar"] !== "int" - ) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. Got '${table.id[" scalar"]}', expected one of ['string', 'hex', 'bigint', 'int'].`, - ); - - if (isOptionalColumn(table.id)) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. ID columns cannot be optional.`, - ); - if (isListColumn(table.id)) - throw new Error( - `Validation failed: Invalid type for ID column '${tableName}.id'. ID columns cannot be a list.`, - ); - - // Validate all other columns - Object.entries(table).forEach(([columnName, column]) => { - if (columnName === "id") return; - - validateTableOrColumnName(columnName, "Column"); - - if (isOneColumn(column)) { - const usedColumn = Object.entries(table).find( - ([c]) => c === column[" reference"], - ); - - if (usedColumn === undefined) { - const otherColumns = Object.keys(table).filter( - (c) => c !== columnName, - ); - throw new Error( - `Validation failed. Relationship column '${tableName}.${columnName}' uses a column that does not exist. Got '${ - column[" reference"] - }', expected one of [${otherColumns.map((c) => `'${c}'`).join(", ")}].`, - ); - } - - if (!isReferenceColumn(usedColumn[1])) { - const foreignKeyColumns = Object.keys(table).filter( - (c) => c !== columnName && isReferenceColumn(table[c]!), - ); - throw new Error( - `Validation failed. Relationship column '${tableName}.${columnName}' uses a column that is not foreign key column. Got '${ - column[" reference"] - }', expected one of [${foreignKeyColumns.map((c) => `'${c}'`).join(", ")}].`, - ); - } - } - - if (isManyColumn(column)) { - const usedTable = Object.entries(getTables(schema)).find( - ([name]) => name === column[" referenceTable"], - ); - - if (usedTable === undefined) { - const otherTables = Object.keys(getTables(schema)).filter( - (t) => t !== tableName, - ); - - throw new Error( - `Validation failed. Relationship column '${tableName}.${columnName}' uses a table that does not exist. Got '${ - column[" referenceTable"] - }', expected one of [${otherTables.map((t) => `'${t}'`).join(", ")}].`, - ); - } - - const usedTableColumns = Object.entries(usedTable[1].table); - const usedColumn = usedTableColumns.find( - ([columnName]) => columnName === column[" referenceColumn"], - ); - - if (usedColumn === undefined) { - throw new Error( - `Validation failed. Relationship column '${tableName}.${columnName}' uses a column that does not exist. Got '${ - column[" referenceTable"] - }.${column[" referenceTable"]}', expected one of [${usedTableColumns - .map((c) => `'${usedTable[0]}.${c}'`) - .join(", ")}].`, - ); - } - - if (!isReferenceColumn(usedColumn[1])) { - const foreignKeyColumnNames = usedTableColumns.filter(([, c]) => - isReferenceColumn(c), - ); - throw new Error( - `Validation failed. Relationship column '${tableName}.${columnName}' uses a column that is not foreign key column. Got '${ - column[" referenceTable"] - }.${column[" referenceTable"]}', expected one of [${foreignKeyColumnNames - .map((c) => `'${usedTable[0]}.${c}'`) - .join(", ")}].`, - ); - } - } - - if (isEnumColumn(column)) { - const referencedEnum = Object.entries(getEnums(schema)).find( - ([enumName]) => enumName === column[" enum"], - ); - if (referencedEnum === undefined) { - throw new Error( - `Validation failed: Enum column '${tableName}.${columnName}' doesn't reference a valid enum. Got '${ - column[" enum"] - }', expected one of [${Object.keys(getEnums(schema)) - .map((e) => `'${e}'`) - .join(", ")}].`, - ); - } - } - - if (isReferenceColumn(column)) { - const referencedTable = Object.entries(getTables(schema)).find( - ([tableName]) => tableName === extractReferenceTable(column), - ); - - if (referencedTable === undefined) { - throw new Error( - `Validation failed: Foreign key column '${tableName}.${columnName}' does not reference a valid ID column. Got '${extractReferenceTable( - column, - )}', expected one of [${Object.keys(getTables(schema)) - .map((t) => `'${t}.id'`) - .join(", ")}].`, - ); - } - - if (referencedTable[1].table.id[" scalar"] !== column[" scalar"]) { - throw new Error( - `Validation failed: Foreign key column '${tableName}.${columnName}' type does not match the referenced table's ID column type. Got '${column[" scalar"]}', expected '${referencedTable[1].table.id[" scalar"]}'.`, - ); - } - - // NOTE: This is unreachable, but worth documenting here. - // if (column.list) { - // throw new Error( - // `Validation failed: Foreign key column '${tableName}.${columnName}' cannot use the 'list' modifier.`, - // ); - // } - } - - // NOTE: This is unreachable, but worth documenting here. - // if (isPrimitiveColumn(column)) { - // if ( - // column.type !== "bigint" && - // column.type !== "string" && - // column.type !== "boolean" && - // column.type !== "int" && - // column.type !== "float" && - // column.type !== "hex" - // ) { - // throw new Error( - // `Validation failed: Primitive column '${tableName}.${columnName}' type is invalid. Got '${column.type}', expected one of ['bigint', 'string', 'boolean', 'int', 'float', 'hex'].`, - // ); - // } - // } - }); - - // Validate constraints - if (constraints === undefined) return; - - for (const [name, index] of Object.entries(constraints)) { - validateTableOrColumnName(name, "index"); - const column = index[" column"]; - - if (Array.isArray(column)) { - if (column.length === 0) - throw new Error( - `Validation failed: Index '${name}' cannot be empty.`, - ); - - if (column.length !== dedupe(column as string[]).length) - throw new Error( - `Validation failed: Index '${name}' cannot contain duplicate columns.`, - ); - - for (const c of column) { - if (table[c] === undefined) - throw new Error( - `Validation failed: Index '${name}' does not reference a valid column. Got '${c}', expected one of [${Object.keys( - table, - ).join(", ")}].`, - ); - - if (isJSONColumn(table[c]!)) - throw new Error( - `Validation failed: Invalid type for column '${column}' referenced by index '${name}'. Got 'json', expected one of ['string', 'hex', 'bigint', 'int', 'boolean', 'float'].`, - ); - - if (isOneColumn(table[c]!)) - throw new Error( - `Validation failed: Invalid type for column '${column}' referenced by index '${name}'. Got 'one', expected one of ['string', 'hex', 'bigint', 'int', 'boolean', 'float'].`, - ); - - if (isManyColumn(table[c]!)) - throw new Error( - `Validation failed: Invalid type for column '${column}' referenced by index '${name}'. Got 'many', expected one of ['string', 'hex', 'bigint', 'int', 'boolean', 'float'].`, - ); - } - } else { - if (column === "id") { - logs.push({ - level: "warn", - msg: `Ignoring index '${name}'. Column 'id' has a primary key constraint by default.`, - }); - delete constraints[name]; - continue; - } - - if (table[column] === undefined) - throw new Error( - `Validation failed: Index '${name}' does not reference a valid column. Got '${column}', expected one of [${Object.entries( - table, - ) - .filter( - ([_, column]) => - !isOneColumn(column) && !isManyColumn(column), - ) - .map(([columnName]) => columnName) - .join(", ")}].`, - ); - - if (isJSONColumn(table[column]!)) - throw new Error( - `Validation failed: Invalid type for column '${column}' referenced by index '${name}'. Got 'json', expected one of ['string', 'hex', 'bigint', 'int', 'boolean', 'float'].`, - ); - - if (isOneColumn(table[column]!)) - throw new Error( - `Validation failed: Invalid type for column '${column}' referenced by index '${name}'. Got 'one', expected one of ['string', 'hex', 'bigint', 'int', 'boolean', 'float'].`, - ); - - if (isManyColumn(table[column]!)) - throw new Error( - `Validation failed: Invalid type for column '${column}' referenced by index '${name}'. Got 'many', expected one of ['string', 'hex', 'bigint', 'int', 'boolean', 'float'].`, - ); - } - } - }, - ); - - return { schema, logs }; -}; - -const validateTableOrColumnName = (key: string, type: string) => { - if (key === "") - throw new Error( - `Validation failed: ${type} name can't be an empty string.`, - ); - - if (!/^[a-z|A-Z|0-9]+$/.test(key)) - throw new Error( - `Validation failed: ${type} name '${key}' contains an invalid character.`, - ); -}; - -export function safeBuildSchema({ schema }: { schema: Schema }) { - try { - const result = buildSchema({ schema }); - return { - status: "success", - schema: result.schema, - logs: result.logs, - } as const; - } catch (_error) { - const buildError = new BuildError((_error as Error).message); - buildError.stack = undefined; - return { status: "error", error: buildError } as const; - } -} diff --git a/packages/core/src/build/service.ts b/packages/core/src/build/service.ts index 0eeda434e..387e5d5f0 100644 --- a/packages/core/src/build/service.ts +++ b/packages/core/src/build/service.ts @@ -6,13 +6,11 @@ import { BuildError } from "@/common/errors.js"; import type { Config } from "@/config/config.js"; import type { DatabaseConfig } from "@/config/database.js"; import type { Network } from "@/config/networks.js"; -import { buildGraphQLSchema } from "@/graphql/buildGraphqlSchema.js"; +import type { Schema } from "@/drizzle/index.js"; import type { PonderRoutes } from "@/hono/index.js"; -import type { Schema } from "@/schema/common.js"; import type { Source } from "@/sync/source.js"; import { serialize } from "@/utils/serialize.js"; import { glob } from "glob"; -import type { GraphQLSchema } from "graphql"; import type { Hono } from "hono"; import { type ViteDevServer, createServer } from "vite"; import { ViteNodeRunner } from "vite-node/client"; @@ -26,7 +24,6 @@ import { safeBuildConfigAndIndexingFunctions, } from "./configAndIndexingFunctions.js"; import { vitePluginPonder } from "./plugin.js"; -import { safeBuildSchema } from "./schema.js"; import { parseViteNodeError } from "./stacktrace.js"; const BUILD_ID_VERSION = "1"; @@ -54,8 +51,6 @@ type BaseBuild = { networks: Network[]; // Schema schema: Schema; - graphqlSchema: GraphQLSchema; - offchainSchema?: { [name: string]: unknown }; }; export type IndexingBuild = BaseBuild & { @@ -190,7 +185,6 @@ export const start = async ( // it's possible for ViteNodeRunner to return exports as undefined (a race condition). const configResult = await executeConfig(buildService); const schemaResult = await executeSchema(buildService); - const offchainSchemaResult = await executeOffchainSchema(buildService); const indexingResult = await executeIndexingFunctions(buildService); const apiResult = await executeApiRoutes(buildService); @@ -206,12 +200,6 @@ export const start = async ( api: { status: "error", error: schemaResult.error }, }; } - if (offchainSchemaResult.status === "error") { - return { - indexing: { status: "error", error: offchainSchemaResult.error }, - api: { status: "error", error: offchainSchemaResult.error }, - }; - } if (indexingResult.status === "error") { return { indexing: { status: "error", error: indexingResult.error }, @@ -227,7 +215,6 @@ export const start = async ( let cachedConfigResult = configResult; let cachedSchemaResult = schemaResult; - let cachedOffchainSchemaResult = offchainSchemaResult; let cachedIndexingResult = indexingResult; let cachedApiResult = apiResult; @@ -278,9 +265,7 @@ export const start = async ( const hasSchemaUpdate = invalidated.includes( common.options.schemaFile.replace(/\\/g, "/"), ); - const hasOffchainSchemaUpdate = invalidated.includes( - common.options.offchainSchemaFile.replace(/\\/g, "/"), - ); + const hasIndexingUpdate = invalidated.some( (file) => buildService.indexingRegex.test(file) && @@ -295,7 +280,6 @@ export const start = async ( if ( !hasConfigUpdate && !hasSchemaUpdate && - !hasOffchainSchemaUpdate && !hasIndexingUpdate && !hasApiUpdate ) { @@ -327,16 +311,6 @@ export const start = async ( cachedSchemaResult = result; } - if (hasOffchainSchemaUpdate) { - const result = await executeOffchainSchema(buildService); - if (result.status === "error") { - onIndexingBuild({ status: "error", error: result.error }); - return; - } - - cachedOffchainSchemaResult = result; - } - if (hasIndexingUpdate) { const files = glob.sync(buildService.indexingPattern, { ignore: buildService.apiPattern, @@ -382,7 +356,6 @@ export const start = async ( buildService, cachedConfigResult, cachedSchemaResult, - cachedOffchainSchemaResult, cachedIndexingResult, ); if (indexingBuildResult.status === "error") { @@ -392,7 +365,7 @@ export const start = async ( } // If schema or config is updated, rebuild both api and indexing - if (hasConfigUpdate || hasSchemaUpdate || hasOffchainSchemaUpdate) { + if (hasConfigUpdate || hasSchemaUpdate) { onIndexingBuild(indexingBuildResult); onApiBuild( validateAndBuildApi( @@ -429,7 +402,6 @@ export const start = async ( buildService, configResult, schemaResult, - offchainSchemaResult, indexingResult, ); @@ -509,44 +481,16 @@ const executeSchema = async ( return executeResult; } - const schema = executeResult.exports.default as Schema; + const schema = executeResult.exports; + // TODO(kyle) hash the contents const contentHash = createHash("sha256") - .update(serialize(schema)) + .update(fs.readFileSync(buildService.common.options.schemaFile)) .digest("hex"); return { status: "success", schema, contentHash }; }; -const executeOffchainSchema = async ( - buildService: Service, -): Promise< - | { status: "success"; offchainSchema?: { [name: string]: unknown } } - | { status: "error"; error: Error } -> => { - if (fs.existsSync(buildService.common.options.offchainSchemaFile) === false) { - return { status: "success" }; - } - - const executeResult = await executeFile(buildService, { - file: buildService.common.options.offchainSchemaFile, - }); - - if (executeResult.status === "error") { - buildService.common.logger.error({ - service: "build", - msg: "Error while executing 'ponder.offchain.ts':", - error: executeResult.error, - }); - - return executeResult; - } - - const offchainSchema = executeResult.exports; - - return { status: "success", offchainSchema }; -}; - const executeIndexingFunctions = async ( buildService: Service, ): Promise< @@ -654,32 +598,11 @@ const validateAndBuild = async ( { common }: Pick, config: { config: Config; contentHash: string }, schema: { schema: Schema; contentHash: string }, - offchainSchemaResult: { offchainSchema?: { [name: string]: unknown } }, indexingFunctions: { indexingFunctions: RawIndexingFunctions; contentHash: string; }, ): Promise => { - // Validate and build the schema - const buildSchemaResult = safeBuildSchema({ - schema: schema.schema, - }); - if (buildSchemaResult.status === "error") { - common.logger.error({ - service: "build", - msg: "Error while building schema:", - error: buildSchemaResult.error, - }); - - return buildSchemaResult; - } - - for (const log of buildSchemaResult.logs) { - common.logger[log.level]({ service: "build", msg: log.msg }); - } - - const graphqlSchema = buildGraphQLSchema(buildSchemaResult.schema); - // Validates and build the config const buildConfigAndIndexingFunctionsResult = await safeBuildConfigAndIndexingFunctions({ @@ -721,9 +644,7 @@ const validateAndBuild = async ( databaseConfig: buildConfigAndIndexingFunctionsResult.databaseConfig, networks: buildConfigAndIndexingFunctionsResult.networks, sources: buildConfigAndIndexingFunctionsResult.sources, - schema: buildSchemaResult.schema, - offchainSchema: offchainSchemaResult.offchainSchema, - graphqlSchema, + schema: schema.schema, indexingFunctions: buildConfigAndIndexingFunctionsResult.indexingFunctions, }, diff --git a/packages/core/src/common/codegen.ts b/packages/core/src/common/codegen.ts index 59b5d6baa..1332ae41a 100644 --- a/packages/core/src/common/codegen.ts +++ b/packages/core/src/common/codegen.ts @@ -1,7 +1,6 @@ import { mkdirSync, writeFileSync } from "node:fs"; import path from "node:path"; import type { Common } from "@/common/common.js"; -import { type GraphQLSchema, printSchema } from "graphql"; export const ponderEnv = `// This file enables type checking and editor autocomplete for this Ponder project. // After upgrading, you may find that changes have been made to this file. @@ -12,7 +11,7 @@ declare module "@/generated" { import type { Virtual } from "@ponder/core"; type config = typeof import("./ponder.config.ts").default; - type schema = typeof import("./ponder.schema.ts").default; + type schema = typeof import("./ponder.schema.ts"); export const ponder: Virtual.Registry; @@ -26,19 +25,17 @@ declare module "@/generated" { schema, name >; - export type ApiContext = Virtual.Drizzle; export type IndexingFunctionArgs = Virtual.IndexingFunctionArgs; - export type Schema = Virtual.Schema; } `; export function runCodegen({ common, - graphqlSchema, + // graphqlSchema, }: { common: Common; - graphqlSchema: GraphQLSchema; + // graphqlSchema: GraphQLSchema; }) { writeFileSync( path.join(common.options.rootDir, "ponder-env.d.ts"), @@ -52,11 +49,11 @@ export function runCodegen({ }); mkdirSync(common.options.generatedDir, { recursive: true }); - writeFileSync( - path.join(common.options.generatedDir, "schema.graphql"), - printSchema(graphqlSchema), - "utf-8", - ); + // writeFileSync( + // path.join(common.options.generatedDir, "schema.graphql"), + // printSchema(graphqlSchema), + // "utf-8", + // ); common.logger.debug({ service: "codegen", diff --git a/packages/core/src/common/options.ts b/packages/core/src/common/options.ts index 4a71f3906..4e03fb486 100644 --- a/packages/core/src/common/options.ts +++ b/packages/core/src/common/options.ts @@ -8,7 +8,6 @@ export type Options = { configFile: string; schemaFile: string; - offchainSchemaFile: string; rootDir: string; indexingDir: string; apiDir: string; @@ -83,7 +82,6 @@ export const buildOptions = ({ cliOptions }: { cliOptions: CliOptions }) => { rootDir, configFile: path.join(rootDir, cliOptions.config), schemaFile: path.join(rootDir, "ponder.schema.ts"), - offchainSchemaFile: path.join(rootDir, "ponder.offchain.ts"), indexingDir: path.join(rootDir, "src"), apiDir: path.join(rootDir, "src", "api"), generatedDir: path.join(rootDir, "generated"), diff --git a/packages/core/src/common/telemetry.ts b/packages/core/src/common/telemetry.ts index 1a8a5340e..20b13d859 100644 --- a/packages/core/src/common/telemetry.ts +++ b/packages/core/src/common/telemetry.ts @@ -6,7 +6,6 @@ import path from "node:path"; import { promisify } from "node:util"; import type { IndexingBuild } from "@/build/service.js"; import type { Options } from "@/common/options.js"; -import { getTables } from "@/schema/utils.js"; import { startClock } from "@/utils/timer.js"; import { wait } from "@/utils/wait.js"; import { createQueue } from "@ponder/common"; @@ -270,7 +269,7 @@ function getPackageJson(rootDir: string) { } export function buildPayload(build: IndexingBuild) { - const table_count = Object.keys(getTables(build.schema)).length; + const table_count = Object.keys(build.schema).length; const indexing_function_count = Object.values(build.indexingFunctions).reduce( (acc, f) => acc + Object.keys(f).length, 0, diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index 7e0183a71..016d5813a 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -3,24 +3,19 @@ import path from "node:path"; import type { Common } from "@/common/common.js"; import { NonRetryableError } from "@/common/errors.js"; import type { DatabaseConfig } from "@/config/database.js"; -import type { Schema } from "@/schema/common.js"; import { - getEnums, - getTables, - isEnumColumn, - isJSONColumn, - isListColumn, - isManyColumn, - isOneColumn, - isOptionalColumn, -} from "@/schema/utils.js"; + type Drizzle, + type Schema, + createDrizzleDb, + onchain, +} from "@/drizzle/index.js"; +import { generateTableSQL, getPrimaryKeyColumns } from "@/drizzle/sql.js"; import type { PonderSyncSchema } from "@/sync-store/encoding.js"; import { moveLegacyTables, migrationProvider as postgresMigrationProvider, } from "@/sync-store/postgres/migrations.js"; import { migrationProvider as sqliteMigrationProvider } from "@/sync-store/sqlite/migrations.js"; -import type { UserTable } from "@/types/schema.js"; import { decodeCheckpoint, encodeCheckpoint, @@ -34,14 +29,24 @@ import { createSqliteDatabase, } from "@/utils/sqlite.js"; import { wait } from "@/utils/wait.js"; +import { is } from "drizzle-orm"; +import { migrate } from "drizzle-orm/node-postgres/migrator"; +import { + PgTable, + getTableConfig, + integer, + pgTable, + serial, + varchar, +} from "drizzle-orm/pg-core"; import { Migrator, PostgresDialect, + SqliteDialect, type Transaction, WithSchemaPlugin, sql, } from "kysely"; -import { SqliteDialect } from "kysely"; import type { Pool } from "pg"; import prometheus from "prom-client"; import { HeadlessKysely } from "./kysely.js"; @@ -53,6 +58,7 @@ export type Database< namespace: string; driver: Driver; qb: QueryBuilder; + drizzle: Drizzle; migrateSync(): Promise; /** * Prepare the database environment for a Ponder app. @@ -72,7 +78,7 @@ export type Database< setup(args: { buildId: string }): Promise<{ checkpoint: string }>; revert(args: { checkpoint: string }): Promise; finalize(args: { checkpoint: string }): Promise; - createIndexes(args: { schema: Schema }): Promise; + // createIndexes(args: { schema: Schema }): Promise; kill(): Promise; }; @@ -92,13 +98,10 @@ type PonderInternalSchema = { }; } & { [_: `_ponder_reorg__${string}`]: { - id: unknown; operation_id: number; checkpoint: string; operation: 0 | 1 | 2; }; -} & { - [tableName: string]: UserTable; }; type Driver = dialect extends "sqlite" @@ -125,29 +128,11 @@ type QueryBuilder = { sync: HeadlessKysely; }; -const scalarToSqliteType = { - boolean: "integer", - int: "integer", - float: "real", - string: "text", - bigint: "varchar(79)", - hex: "blob", -} as const; - -const scalarToPostgresType = { - boolean: "integer", - int: "integer", - float: "float8", - string: "text", - bigint: "numeric(78, 0)", - hex: "bytea", -} as const; - -export const createDatabase = (args: { +export const createDatabase = async (args: { common: Common; schema: Schema; databaseConfig: DatabaseConfig; -}): Database => { +}): Promise => { let heartbeatInterval: NodeJS.Timeout | undefined; let namespace: string; @@ -315,6 +300,22 @@ export const createDatabase = (args: { }; } + /** + * Reset the prototype so `table instanceof PgTable` evaluates to true. + */ + for (const table of Object.values(args.schema)) { + // @ts-ignore + if (onchain in table) { + Object.setPrototypeOf(table, PgTable.prototype); + } + } + + const drizzle = createDrizzleDb({ driver }, { schema: args.schema }); + + await migrate(drizzle, { + migrationsFolder: args.common.options.migrationsDir, + }); + // Register metrics if (dialect === "sqlite") { args.common.metrics.registry.removeSingleMetric( @@ -427,6 +428,10 @@ export const createDatabase = (args: { checkpoint: string; tx: Transaction; }) => { + const primaryKeyColumns = getPrimaryKeyColumns( + args.schema[tableName] as PgTable, + ); + const rows = await tx .deleteFrom(`_ponder_reorg__${tableName}`) .returningAll() @@ -440,8 +445,15 @@ export const createDatabase = (args: { if (log.operation === 0) { // Create await tx + // @ts-ignore .deleteFrom(tableName) - .where("id", "=", log.id as any) + .$call((qb) => { + for (const name of primaryKeyColumns) { + // @ts-ignore + qb = qb.where(name, "=", log[name]); + } + return qb; + }) .execute(); } else if (log.operation === 1) { // Update @@ -453,9 +465,16 @@ export const createDatabase = (args: { // @ts-ignore log.operation = undefined; await tx + // @ts-ignore .updateTable(tableName) .set(log as any) - .where("id", "=", log.id as any) + .$call((qb) => { + for (const name of primaryKeyColumns) { + // @ts-ignore + qb = qb.where(name, "=", log[name]); + } + return qb; + }) .execute(); } else { // Delete @@ -467,6 +486,7 @@ export const createDatabase = (args: { // @ts-ignore log.operation = undefined; await tx + // @ts-ignore .insertInto(tableName) .values(log as any) .execute(); @@ -484,6 +504,7 @@ export const createDatabase = (args: { namespace, driver, qb, + drizzle, async migrateSync() { await qb.sync.wrap({ method: "migrateSyncStore" }, async () => { // TODO: Probably remove this at 1.0 to speed up startup time. @@ -491,6 +512,7 @@ export const createDatabase = (args: { if (dialect === "postgres") { await moveLegacyTables({ common: args.common, + // @ts-expect-error db: qb.internal, newSchemaName: "ponder_sync", }); @@ -516,6 +538,10 @@ export const createDatabase = (args: { }); }, async setup({ buildId }) { + const tableNames = Object.values(args.schema) + .filter((table): table is PgTable => is(table, PgTable)) + .map((table) => getTableConfig(table).name); + //////// // Migrate //////// @@ -600,8 +626,11 @@ export const createDatabase = (args: { } } else { const hasPonderSchema = await qb.internal + // @ts-ignore .selectFrom("information_schema.schemata") + // @ts-ignore .select("schema_name") + // @ts-ignore .where("schema_name", "=", "ponder") .executeTakeFirst() .then((schema) => schema?.schema_name === "ponder"); @@ -610,14 +639,18 @@ export const createDatabase = (args: { await qb.internal.wrap({ method: "setup" }, async () => { const namespaceCount = await qb.internal .withSchema("ponder") + // @ts-ignore .selectFrom("namespace_lock") .select(sql`count(*)`.as("count")) .executeTakeFirst(); const tableNames = await qb.internal .withSchema("ponder") + // @ts-ignore .selectFrom("namespace_lock") + // @ts-ignore .select("schema") + // @ts-ignore .where("namespace", "=", namespace) .executeTakeFirst() .then((schema: any | undefined) => @@ -636,7 +669,9 @@ export const createDatabase = (args: { await qb.internal .withSchema("ponder") + // @ts-ignore .deleteFrom("namespace_lock") + // @ts-ignore .where("namespace", "=", namespace) .execute(); @@ -681,147 +716,41 @@ export const createDatabase = (args: { //////// const createUserTables = async () => { - for (const [tableName, table] of Object.entries( - getTables(args.schema), - )) { - await tx.schema - .createTable(tableName) - .$call((builder) => { - for (const [columnName, column] of Object.entries( - table.table, - )) { - if (isOneColumn(column)) continue; - if (isManyColumn(column)) continue; - if (isEnumColumn(column)) { - // Handle enum types - builder = builder.addColumn( - columnName, - "text", - (col) => { - if (isOptionalColumn(column) === false) - col = col.notNull(); - if (isListColumn(column) === false) { - col = col.check( - sql`${sql.ref(columnName)} in (${sql.join( - getEnums(args.schema)[column[" enum"]]!.map( - (v) => sql.lit(v), - ), - )})`, - ); - } - return col; - }, - ); - } else if (isListColumn(column)) { - // Handle scalar list columns - builder = builder.addColumn( - columnName, - "text", - (col) => { - if (isOptionalColumn(column) === false) - col = col.notNull(); - return col; - }, - ); - } else if (isJSONColumn(column)) { - // Handle json columns - builder = builder.addColumn( - columnName, - "jsonb", - (col) => { - if (isOptionalColumn(column) === false) - col = col.notNull(); - return col; - }, - ); - } else { - // Non-list base columns - builder = builder.addColumn( - columnName, - (dialect === "sqlite" - ? scalarToSqliteType - : scalarToPostgresType)[column[" scalar"]], - (col) => { - if (isOptionalColumn(column) === false) - col = col.notNull(); - if (columnName === "id") col = col.primaryKey(); - return col; - }, - ); - } - } - - return builder; - }) - .execute() - .catch((_error) => { - const error = _error as Error; - if (!error.message.includes("already exists")) throw error; - throw new NonRetryableError( - `Unable to create table '${namespace}'.'${tableName}' because a table with that name already exists. Is there another application using the '${namespace}' database schema?`, - ); - }); - - args.common.logger.info({ - service: "database", - msg: `Created table '${namespace}'.'${tableName}'`, - }); + for (const table of Object.values(args.schema)) { + if (is(table, PgTable)) { + await sql + .raw(generateTableSQL({ table, namespace })) + .execute(tx); + } } }; const createReorgTables = async () => { - for (const [tableName, table] of Object.entries( - getTables(args.schema), - )) { - await tx.schema - .createTable(`_ponder_reorg__${tableName}`) - .$call((builder) => { - for (const [columnName, column] of Object.entries( - table.table, - )) { - if (isOneColumn(column)) continue; - if (isManyColumn(column)) continue; - if (isEnumColumn(column)) { - // Handle enum types - // Omit the CHECK constraint because its included in the user table - builder = builder.addColumn(columnName, "text"); - } else if (isListColumn(column)) { - // Handle scalar list columns - builder = builder.addColumn(columnName, "text"); - } else if (isJSONColumn(column)) { - // Handle json columns - builder = builder.addColumn(columnName, "jsonb"); - } else { - // Non-list base columns - builder = builder.addColumn( - columnName, - (dialect === "sqlite" - ? scalarToSqliteType - : scalarToPostgresType)[column[" scalar"]], - (col) => { - if (columnName === "id") col = col.notNull(); - return col; - }, - ); - } - } - - builder = builder - .addColumn( - "operation_id", - dialect === "sqlite" ? "integer" : "serial", - (col) => col.notNull().primaryKey(), - ) - .addColumn("checkpoint", "varchar(75)", (col) => - col.notNull(), - ) - .addColumn("operation", "integer", (col) => - col.notNull(), - ); - - return builder; - }) - .execute(); + for (const table of Object.values(args.schema)) { + if (is(table, PgTable)) { + const extraColumns = Object.values( + pgTable("", { + operation_id: serial("operation_id") + .notNull() + .primaryKey(), + operation: integer("operation").notNull(), + checkpoint: varchar("checkpoint", { + length: 75, + }).notNull(), + }), + ); + + await sql + .raw( + generateTableSQL({ + table, + namespace, + extraColumns, + namePrefix: "_ponder_reorg__", + }), + ) + .execute(tx); + } } }; @@ -844,7 +773,7 @@ export const createDatabase = (args: { heartbeat_at: Date.now(), build_id: buildId, checkpoint: encodeCheckpoint(zeroCheckpoint), - table_names: Object.keys(getTables(args.schema)), + table_names: tableNames, } satisfies PonderApp; /** @@ -928,23 +857,23 @@ export const createDatabase = (args: { }); // Remove indexes - for (const [tableName, table] of Object.entries( - getTables(args.schema), - )) { - if (table.constraints === undefined) continue; - - for (const name of Object.keys(table.constraints)) { - await tx.schema - .dropIndex(`${tableName}_${name}`) - .ifExists() - .execute(); - - args.common.logger.info({ - service: "database", - msg: `Dropped index '${tableName}_${name}' in schema '${namespace}'`, - }); - } - } + // for (const [tableName, table] of Object.entries( + // getTables(args.schema), + // )) { + // if (table.constraints === undefined) continue; + + // for (const name of Object.keys(table.constraints)) { + // await tx.schema + // .dropIndex(`${tableName}_${name}`) + // .ifExists() + // .execute(); + + // args.common.logger.info({ + // service: "database", + // msg: `Dropped index '${tableName}_${name}' in schema '${namespace}'`, + // }); + // } + // } // Revert unfinalized data @@ -956,13 +885,13 @@ export const createDatabase = (args: { msg: `Reverting operations after finalized checkpoint (timestamp=${blockTimestamp} chainId=${chainId} block=${blockNumber})`, }); - for (const tableName of Object.keys(getTables(args.schema))) { - await revert({ - tableName, - checkpoint: previousApp.checkpoint, - tx, - }); - } + // for (const tableName of tableNames) { + // await revert({ + // tableName, + // checkpoint: previousApp.checkpoint, + // tx, + // }); + // } return { status: "success", @@ -1056,7 +985,6 @@ export const createDatabase = (args: { }); } catch (err) { const error = err as Error; - console.log(error); args.common.logger.error({ service: "database", msg: `Failed to update heartbeat timestamp, retrying in ${formatEta( @@ -1069,66 +997,69 @@ export const createDatabase = (args: { return { checkpoint: result.checkpoint }; }, - async createIndexes() { - await Promise.all( - Object.entries(getTables(args.schema)).flatMap(([tableName, table]) => { - if (table.constraints === undefined) return []; - - return Object.entries(table.constraints).map( - async ([name, index]) => { - await qb.internal.wrap({ method: "createIndexes" }, async () => { - const indexName = `${tableName}_${name}`; - - const indexColumn = index[" column"]; - const order = index[" order"]; - const nulls = index[" nulls"]; - - if (dialect === "sqlite") { - const columns = Array.isArray(indexColumn) - ? indexColumn.map((ic) => `"${ic}"`).join(", ") - : `"${indexColumn}" ${order === "asc" ? "ASC" : order === "desc" ? "DESC" : ""}`; - - await qb.internal.executeQuery( - sql`CREATE INDEX ${sql.ref(indexName)} ON ${sql.table( - tableName, - )} (${sql.raw(columns)})`.compile(qb.internal), - ); - } else { - const columns = Array.isArray(indexColumn) - ? indexColumn.map((ic) => `"${ic}"`).join(", ") - : `"${indexColumn}" ${order === "asc" ? "ASC" : order === "desc" ? "DESC" : ""} ${ - nulls === "first" - ? "NULLS FIRST" - : nulls === "last" - ? "NULLS LAST" - : "" - }`; - - await qb.internal.executeQuery( - sql`CREATE INDEX ${sql.ref(indexName)} ON ${sql.table( - `${namespace}.${tableName}`, - )} (${sql.raw(columns)})`.compile(qb.internal), - ); - } - }); - - args.common.logger.info({ - service: "database", - msg: `Created index '${tableName}_${name}' on columns (${ - Array.isArray(index[" column"]) - ? index[" column"].join(", ") - : index[" column"] - }) in schema '${namespace}'`, - }); - }, - ); - }), - ); - }, + // async createIndexes() { + // await Promise.all( + // Object.entries(getTables(args.schema)).flatMap(([tableName, table]) => { + // if (table.constraints === undefined) return []; + + // return Object.entries(table.constraints).map( + // async ([name, index]) => { + // await qb.internal.wrap({ method: "createIndexes" }, async () => { + // const indexName = `${tableName}_${name}`; + + // const indexColumn = index[" column"]; + // const order = index[" order"]; + // const nulls = index[" nulls"]; + + // if (dialect === "sqlite") { + // const columns = Array.isArray(indexColumn) + // ? indexColumn.map((ic) => `"${ic}"`).join(", ") + // : `"${indexColumn}" ${order === "asc" ? "ASC" : order === "desc" ? "DESC" : ""}`; + + // await qb.internal.executeQuery( + // sql`CREATE INDEX ${sql.ref(indexName)} ON ${sql.table( + // tableName, + // )} (${sql.raw(columns)})`.compile(qb.internal), + // ); + // } else { + // const columns = Array.isArray(indexColumn) + // ? indexColumn.map((ic) => `"${ic}"`).join(", ") + // : `"${indexColumn}" ${order === "asc" ? "ASC" : order === "desc" ? "DESC" : ""} ${ + // nulls === "first" + // ? "NULLS FIRST" + // : nulls === "last" + // ? "NULLS LAST" + // : "" + // }`; + + // await qb.internal.executeQuery( + // sql`CREATE INDEX ${sql.ref(indexName)} ON ${sql.table( + // `${namespace}.${tableName}`, + // )} (${sql.raw(columns)})`.compile(qb.internal), + // ); + // } + // }); + + // args.common.logger.info({ + // service: "database", + // msg: `Created index '${tableName}_${name}' on columns (${ + // Array.isArray(index[" column"]) + // ? index[" column"].join(", ") + // : index[" column"] + // }) in schema '${namespace}'`, + // }); + // }, + // ); + // }), + // ); + // }, async revert({ checkpoint }) { + const tableNames = Object.values(args.schema) + .filter((table): table is PgTable => is(table, PgTable)) + .map((table) => getTableConfig(table).name); await qb.internal.wrap({ method: "revert" }, () => Promise.all( - Object.keys(getTables(args.schema)).map((tableName) => + tableNames.map((tableName) => qb.internal .transaction() .execute((tx) => revert({ tableName, checkpoint, tx })), @@ -1149,8 +1080,12 @@ export const createDatabase = (args: { }) .execute(); + const tableNames = Object.values(args.schema) + .filter((table): table is PgTable => is(table, PgTable)) + .map((table) => getTableConfig(table).name); + await Promise.all( - Object.keys(getTables(args.schema)).map((tableName) => + tableNames.map((tableName) => qb.internal .deleteFrom(`_ponder_reorg__${tableName}`) .where("checkpoint", "<=", checkpoint) diff --git a/packages/core/src/drizzle/db.ts b/packages/core/src/drizzle/db.ts index e734ac5c1..0bef69cff 100644 --- a/packages/core/src/drizzle/db.ts +++ b/packages/core/src/drizzle/db.ts @@ -1,3 +1,101 @@ -import type { NodePgDatabase } from "drizzle-orm/node-postgres"; +import { type PgTableFn, pgSchema, pgTable } from "drizzle-orm/pg-core"; +import { numeric } from "drizzle-orm/pg-core"; +import { PgHexBuilder, type PgHexBuilderInitial } from "./hex.js"; +import { onchain } from "./index.js"; -export type DrizzleDb = NodePgDatabase; +export const evmHex = ( + columnName: name, +): PgHexBuilderInitial => new PgHexBuilder(columnName); +export const evmBigint = (columnName: name) => + numeric(columnName, { precision: 78 }).$type(); + +export { + sql, + eq, + gt, + gte, + lt, + lte, + ne, + isNull, + isNotNull, + inArray, + notInArray, + exists, + notExists, + between, + notBetween, + like, + notIlike, + not, + asc, + desc, + and, + or, + count, + countDistinct, + avg, + avgDistinct, + sum, + sumDistinct, + max, + min, +} from "drizzle-orm"; + +export { + bigserial, + boolean, + char, + cidr, + date, + doublePrecision, + pgEnum, + inet, + integer, + interval, + json, + jsonb, + line, + macaddr, + macaddr8, + numeric, + point, + real, + serial, + smallint, + smallserial, + text, + time, + timestamp, + uuid, + varchar, + index, + uniqueIndex, + primaryKey, + alias, + foreignKey, + union, + unionAll, + intersect, + intersectAll, + except, + exceptAll, +} from "drizzle-orm/pg-core"; + +export const onchainTable: PgTableFn = (name, columns, extraConfig) => { + const table = pgTable(name, columns, extraConfig); + + /** + * This trick is used to make `table instanceof PgTable` evaluate to false. + * This is necessary to avoid generating migrations for onchain tables. + */ + Object.setPrototypeOf(table, Object.prototype); + + // @ts-ignore + table[onchain] = true; + + return table; +}; + +export const offchainSchema = (name: T) => pgSchema(name); +export const offchainTable: PgTableFn = pgTable; diff --git a/packages/core/src/drizzle/hex.ts b/packages/core/src/drizzle/hex.ts index fa921a931..0ed60c17e 100644 --- a/packages/core/src/drizzle/hex.ts +++ b/packages/core/src/drizzle/hex.ts @@ -1,4 +1,10 @@ -import { entityKind } from "drizzle-orm"; +import { + type ColumnBaseConfig, + type ColumnBuilderBaseConfig, + type ColumnBuilderRuntimeConfig, + type MakeColumnConfig, + entityKind, +} from "drizzle-orm"; import { type AnyPgTable, PgColumn, @@ -6,20 +12,41 @@ import { } from "drizzle-orm/pg-core"; import { bytesToHex, hexToBytes } from "viem"; -export class PgHexBuilder extends PgColumnBuilder { - static override readonly [entityKind]: string = "PgHexBuilder"; +export type PgHexBuilderInitial = PgHexBuilder<{ + name: TName; + dataType: "string"; + columnType: "PgHex"; + data: `0x${string}`; + driverParam: Buffer; + enumValues: undefined; + generated: undefined; +}>; + +export class PgHexBuilder< + T extends ColumnBuilderBaseConfig<"string", "PgHex">, +> extends PgColumnBuilder { + static readonly [entityKind]: string = "PgHexBuilder"; - constructor(columnName: string) { - super(columnName, "buffer", "PgHex"); + constructor(name: T["name"]) { + super(name, "string", "PgHex"); } - build(table: AnyPgTable) { - return new PgHex(table, this.config); + /** @internal */ + // @ts-ignore + override build( + table: AnyPgTable<{ name: TTableName }>, + ): PgHex> { + return new PgHex>( + table, + this.config as ColumnBuilderRuntimeConfig, + ); } } -export class PgHex extends PgColumn { - static override readonly [entityKind]: string = "PgHex"; +export class PgHex< + T extends ColumnBaseConfig<"string", "PgHex">, +> extends PgColumn { + static readonly [entityKind]: string = "PgHex"; getSQLType(): string { return "bytea"; diff --git a/packages/core/src/drizzle/index.ts b/packages/core/src/drizzle/index.ts new file mode 100644 index 000000000..cedc10a11 --- /dev/null +++ b/packages/core/src/drizzle/index.ts @@ -0,0 +1,498 @@ +import type { Database } from "@/database/index.js"; +import { + type DrizzleConfig, + type ExtractTablesWithRelations, + Param, + type RelationalSchemaConfig, + SQL, + type Subquery, + Table, + type TablesRelationalConfig, + type UpdateSet, + createTableRelationsHelpers, + extractTablesRelationalConfig, + getTableColumns, + is, +} from "drizzle-orm"; +import { + NodePgDriver, + type NodePgQueryResultHKT, +} from "drizzle-orm/node-postgres"; +import { + PgDialect, + type PgInsertConfig, + type PgInsertValue, + type PgQueryResultHKT, + type PgSession, + type PgTable, + type PgUpdateSetSource, + PgDatabase as _PgDatabase, + PgDeleteBase as _PgDeleteBase, + PgInsertBase as _PgInsertBase, + PgInsertBuilder as _PgInsertBuilder, + PgUpdateBase as _PgUpdateBase, + PgUpdateBuilder as _PgUpdateBuilder, +} from "drizzle-orm/pg-core"; +import type { Pool } from "pg"; +import { getReorgTable } from "./sql.js"; + +export const onchain = Symbol.for("ponder:onchain"); + +export type Drizzle< + TSchema extends Record = Record, +> = PgDatabase; + +export type Schema = { [name: string]: unknown }; + +export const createDrizzleDb = < + TSchema extends Record = Record, +>( + database: Pick, + config: DrizzleConfig = {}, +): Drizzle => { + const dialect = new PgDialect(); + + let schema: RelationalSchemaConfig | undefined; + if (config.schema) { + const tablesConfig = extractTablesRelationalConfig( + config.schema, + createTableRelationsHelpers, + ); + schema = { + fullSchema: config.schema, + schema: tablesConfig.tables, + tableNamesMap: tablesConfig.tableNamesMap, + }; + } + + const driver = new NodePgDriver(database.driver.user as Pool, dialect); + const session = driver.createSession(schema); + return new PgDatabase(dialect, session, schema) as Drizzle; +}; + +class PgDatabase< + TQueryResult extends PgQueryResultHKT, + TFullSchema extends Record = Record, + TSchema extends + TablesRelationalConfig = ExtractTablesWithRelations, +> extends _PgDatabase { + checkpoint: string | undefined; + mode: "historical" | "realtime"; + + constructor( + /** @internal */ + readonly dialect: PgDialect, + /** @internal */ + readonly session: PgSession, + schema: RelationalSchemaConfig | undefined, + ) { + super(dialect, session, schema); + this.mode = "historical"; + } + + override insert( + table: TTable, + ): _PgInsertBuilder { + return this.mode === "historical" || !(onchain in table) + ? super.insert(table) + : new PgInsertBuilder( + this.checkpoint!, + table, + this.session, + this.dialect, + ); + } + + override update( + table: TTable, + ): _PgUpdateBuilder { + return this.mode === "historical" || !(onchain in table) + ? super.update(table) + : new PgUpdateBuilder( + this.checkpoint!, + table, + this.session, + this.dialect, + ); + } + + override delete( + table: TTable, + ): _PgDeleteBase { + // @ts-ignore + return this.mode === "historical" || !(onchain in table) + ? super.delete(table) + : new PgDeleteBase(this.checkpoint!, table, this.session, this.dialect); + } +} + +class PgInsertBuilder< + TTable extends PgTable, + TQueryResult extends PgQueryResultHKT, +> extends _PgInsertBuilder { + constructor( + private checkpoint: string, + table: TTable, + session: PgSession, + dialect: PgDialect, + withList?: Subquery[], + ) { + super(table, session, dialect, withList); + } + + override values( + value: PgInsertValue, + ): PgInsertBase; + override values( + values: PgInsertValue[], + ): PgInsertBase; + override values( + values: PgInsertValue | PgInsertValue[], + ): PgInsertBase { + values = Array.isArray(values) ? values : [values]; + if (values.length === 0) { + throw new Error("values() must be called with at least one value"); + } + const mappedValues = values.map((entry) => { + const result: Record = {}; + // @ts-ignore + const cols = this.table[Table.Symbol.Columns]; + for (const colKey of Object.keys(entry)) { + const colValue = entry[colKey as keyof typeof entry]; + result[colKey] = is(colValue, SQL) + ? colValue + : new Param(colValue, cols[colKey]); + } + return result; + }); + + return new PgInsertBase( + this.checkpoint, + // @ts-ignore + this.table, + mappedValues, + // @ts-ignore + this.session, + // @ts-ignore + this.dialect, + // @ts-ignore + this.withList, + ); + } +} + +class PgUpdateBuilder< + TTable extends PgTable, + TQueryResult extends PgQueryResultHKT, +> extends _PgUpdateBuilder { + constructor( + private checkpoint: string, + table: TTable, + session: PgSession, + dialect: PgDialect, + withList?: Subquery[], + ) { + super(table, session, dialect, withList); + } + + override set( + values: PgUpdateSetSource, + ): PgUpdateBase { + const entries: [string, UpdateSet[string]][] = Object.entries(values) + .filter(([, value]) => value !== undefined) + .map(([key, value]) => { + if (is(value, SQL)) { + return [key, value]; + } else { + // @ts-ignore + return [key, new Param(value, this.table[Table.Symbol.Columns][key])]; + } + }); + + if (entries.length === 0) { + throw new Error("No values to set"); + } + + return new PgUpdateBase( + this.checkpoint, + // @ts-ignore + this.table, + Object.fromEntries(entries), + // @ts-ignore + this.session, + // @ts-ignore + this.dialect, + // @ts-ignore + this.withList, + ); + } +} + +class PgInsertBase< + TTable extends PgTable, + TQueryResult extends PgQueryResultHKT, + TReturning extends Record | undefined = undefined, + TDynamic extends boolean = false, + TExcludedMethods extends string = never, +> extends _PgInsertBase< + TTable, + TQueryResult, + TReturning, + TDynamic, + TExcludedMethods +> { + constructor( + private checkpoint: string, + table: TTable, + values: PgInsertConfig["values"], + session: PgSession, + dialect: PgDialect, + withList?: Subquery[], + ) { + super(table, values, session, dialect, withList); + } + + override execute: ReturnType["execute"] = async ( + placeholderValues, + ) => { + const operation = new Param(0); + const checkpoint = new Param(this.checkpoint); + + // @ts-ignore + for (const v of this.config.values) { + v.operation = operation; + v.checkpoint = checkpoint; + } + + // @ts-ignore + const table = this.config.table; + // @ts-ignore + this.config.table = getReorgTable(this.config.table); + + // @ts-ignore + await this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.dialect.buildInsertQuery(this.config)), + ) + .execute(placeholderValues); + + // @ts-ignore + this.config.table = table; + + // @ts-ignore + return this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.getSQL()), + // @ts-ignore + this.config.returning, + undefined, + true, + ) + .execute(placeholderValues); + }; +} + +class PgUpdateBase< + TTable extends PgTable, + TQueryResult extends PgQueryResultHKT, + TReturning extends Record | undefined = undefined, + TDynamic extends boolean = false, + TExcludedMethods extends string = never, +> extends _PgUpdateBase< + TTable, + TQueryResult, + TReturning, + TDynamic, + TExcludedMethods +> { + constructor( + private checkpoint: string, + table: TTable, + set: UpdateSet, + session: PgSession, + dialect: PgDialect, + withList?: Subquery[], + ) { + super(table, set, session, dialect, withList); + } + + override execute: ReturnType["execute"] = async ( + placeholderValues, + ) => { + // @ts-ignore + this.config.fields = getTableColumns(this.config.table); + // @ts-ignore + this.config.setOperators = []; + // @ts-ignore + const fieldsList = Object.entries(this.config.fields).map( + ([name, field]) => ({ + path: [name], + field, + }), + ); + + // @ts-ignore + const select = await this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.dialect.buildSelectQuery(this.config)), + fieldsList, + undefined, + true, + ) + .execute(placeholderValues); + + const operation = new Param(1); + const checkpoint = new Param(this.checkpoint); + + // @ts-ignore + const values = select.map((entry) => { + const result: Record = {}; + // @ts-ignore + const cols = this.config.table[Table.Symbol.Columns]; + for (const colKey of Object.keys(entry)) { + const colValue = entry[colKey as keyof typeof entry]; + result[colKey] = is(colValue, SQL) + ? colValue + : new Param(colValue, cols[colKey]); + } + result.operation = operation; + result.checkpoint = checkpoint; + + return result; + }); + + // @ts-ignore + const table = this.config.table; + // @ts-ignore + this.config.table = getReorgTable(this.config.table); + // @ts-ignore + this.config.values = values; + + // @ts-ignore + await this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.dialect.buildInsertQuery(this.config)), + ) + .execute(placeholderValues); + + // @ts-ignore + this.config.table = table; + + // @ts-ignore + return this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.getSQL()), + // @ts-ignore + this.config.returning, + undefined, + true, + ) + .execute(placeholderValues); + }; +} + +class PgDeleteBase< + TTable extends PgTable, + TQueryResult extends PgQueryResultHKT, + TReturning extends Record | undefined = undefined, + TDynamic extends boolean = false, + TExcludedMethods extends string = never, +> extends _PgDeleteBase< + TTable, + TQueryResult, + TReturning, + TDynamic, + TExcludedMethods +> { + constructor( + private checkpoint: string, + table: TTable, + session: PgSession, + dialect: PgDialect, + withList?: Subquery[], + ) { + super(table, session, dialect, withList); + } + + override execute: ReturnType["execute"] = async ( + placeholderValues, + ) => { + // @ts-ignore + this.config.fields = getTableColumns(this.config.table); + // @ts-ignore + this.config.setOperators = []; + // @ts-ignore + const fieldsList = Object.entries(this.config.fields).map( + ([name, field]) => ({ + path: [name], + field, + }), + ); + + // @ts-ignore + const select = await this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.dialect.buildSelectQuery(this.config)), + fieldsList, + undefined, + true, + ) + .execute(placeholderValues); + + const operation = new Param(2); + const checkpoint = new Param(this.checkpoint); + + // @ts-ignore + const values = select.map((entry) => { + const result: Record = {}; + // @ts-ignore + const cols = this.config.table[Table.Symbol.Columns]; + for (const colKey of Object.keys(entry)) { + const colValue = entry[colKey as keyof typeof entry]; + result[colKey] = is(colValue, SQL) + ? colValue + : new Param(colValue, cols[colKey]); + } + result.operation = operation; + result.checkpoint = checkpoint; + + return result; + }); + + // @ts-ignore + const table = this.config.table; + // @ts-ignore + this.config.table = getReorgTable(this.config.table); + // @ts-ignore + this.config.values = values; + + // @ts-ignore + await this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.dialect.buildInsertQuery(this.config)), + ) + .execute(placeholderValues); + + // @ts-ignore + this.config.table = table; + + // @ts-ignore + return this.session + .prepareQuery( + // @ts-ignore + this.dialect.sqlToQuery(this.getSQL()), + // @ts-ignore + this.config.returning, + undefined, + true, + ) + .execute(placeholderValues); + }; +} diff --git a/packages/core/src/drizzle/list.ts b/packages/core/src/drizzle/list.ts deleted file mode 100644 index b16776957..000000000 --- a/packages/core/src/drizzle/list.ts +++ /dev/null @@ -1,51 +0,0 @@ -import type { Scalar } from "@/schema/common.js"; -import { entityKind } from "drizzle-orm"; -import { - type AnyPgTable, - PgColumn, - PgColumnBuilder, -} from "drizzle-orm/pg-core"; - -export class PgListBuilder extends PgColumnBuilder { - static override readonly [entityKind]: string = "PgListBuilder"; - element: Scalar; - - constructor(columnName: string, element: Scalar) { - super(columnName, "string", "PgList"); - this.element = element; - } - - build(table: AnyPgTable) { - return new PgList(table, this.config, this.element); - } -} - -export class PgList extends PgColumn { - static override readonly [entityKind]: string = "PgList"; - element: Scalar; - - constructor( - table: AnyPgTable, - config: PgListBuilder["config"], - element: Scalar, - ) { - super(table, config); - this.element = element; - } - - getSQLType(): string { - return "text"; - } - - override mapFromDriverValue(value: string) { - return this.element === "bigint" - ? JSON.parse(value).map(BigInt) - : JSON.parse(value); - } - - override mapToDriverValue(value: Array): string { - return this.element === "bigint" - ? JSON.stringify(value.map(String)) - : JSON.stringify(value); - } -} diff --git a/packages/core/src/drizzle/runtime.test.ts b/packages/core/src/drizzle/runtime.test.ts deleted file mode 100644 index f56017052..000000000 --- a/packages/core/src/drizzle/runtime.test.ts +++ /dev/null @@ -1,267 +0,0 @@ -import { - setupCommon, - setupDatabaseServices, - setupIsolatedDatabase, -} from "@/_test/setup.js"; -import type { Context } from "@/hono/context.js"; -import type { HistoricalStore } from "@/indexing-store/store.js"; -import { createSchema } from "@/schema/schema.js"; -import { eq } from "drizzle-orm"; -import { beforeEach, expect, test } from "vitest"; -import type { DrizzleDb } from "./db.js"; -import { createDrizzleDb, createDrizzleTables } from "./runtime.js"; - -beforeEach(setupCommon); -beforeEach(setupIsolatedDatabase); - -test("runtime select", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - }), - })); - - const { database, cleanup, indexingStore } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ tableName: "table", id: "kyle" }); - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const db = createDrizzleDb(database) as unknown as DrizzleDb; - - const drizzleTables = createDrizzleTables(schema, database) as Context< - typeof schema - >["tables"]; - - const rows = await db.select().from(drizzleTables.table); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ id: "kyle" }); - - await cleanup(); -}); - -test("select hex", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.hex(), - }), - })); - - const { database, cleanup, indexingStore } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ tableName: "table", id: "0x1" }); - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const db = createDrizzleDb(database) as unknown as DrizzleDb; - - const drizzleTables = createDrizzleTables(schema, database) as Context< - typeof schema - >["tables"]; - - const rows = await db.select().from(drizzleTables.table); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ id: "0x01" }); - - await cleanup(); -}); - -test("select bigint", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.bigint(), - }), - })); - - const { database, cleanup, indexingStore } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ tableName: "table", id: 1n }); - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const db = createDrizzleDb(database) as unknown as DrizzleDb; - - const drizzleTables = createDrizzleTables(schema, database) as Context< - typeof schema - >["tables"]; - - const rows = await db.select().from(drizzleTables.table); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ id: 1n }); - - await cleanup(); -}); - -test("select json", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - json: p.json(), - }), - })); - - const { database, cleanup, indexingStore } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ - tableName: "table", - id: "1", - data: { - json: { - prop: 52, - }, - }, - }); - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const db = createDrizzleDb(database) as unknown as DrizzleDb; - - const drizzleTables = createDrizzleTables(schema, database) as Context< - typeof schema - >["tables"]; - - const rows = await db.select().from(drizzleTables.table); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ id: "1", json: { prop: 52 } }); - - await cleanup(); -}); - -test("select enum", async (context) => { - const schema = createSchema((p) => ({ - en: p.createEnum(["hi", "low"]), - table: p.createTable({ - id: p.string(), - en: p.enum("en"), - }), - })); - - const { database, cleanup, indexingStore } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ - tableName: "table", - id: "1", - data: { en: "hi" }, - }); - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const db = createDrizzleDb(database) as unknown as DrizzleDb; - - const drizzleTables = createDrizzleTables(schema, database) as Context< - typeof schema - >["tables"]; - - const rows = await db.select().from(drizzleTables.table); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ id: "1", en: "hi" }); - - await cleanup(); -}); - -test("select list", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - list: p.string().list(), - }), - })); - - const { database, cleanup, indexingStore } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ - tableName: "table", - id: "1", - data: { - list: ["big", "dog"], - }, - }); - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const db = createDrizzleDb(database) as unknown as DrizzleDb; - - const drizzleTables = createDrizzleTables(schema, database) as Context< - typeof schema - >["tables"]; - - const rows = await db.select().from(drizzleTables.table); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ id: "1", list: ["big", "dog"] }); - - await cleanup(); -}); - -test("select with join", async (context) => { - const schema = createSchema((p) => ({ - account: p.createTable({ - id: p.hex(), - name: p.string(), - age: p.int(), - }), - nft: p.createTable({ - id: p.bigint(), - owner: p.hex().references("account.id"), - }), - })); - - const { database, cleanup, indexingStore } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ - tableName: "account", - id: "0x1", - data: { - name: "kyle", - age: 52, - }, - }); - await indexingStore.create({ - tableName: "nft", - id: 10n, - data: { owner: "0x1" }, - }); - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const db = createDrizzleDb(database) as unknown as DrizzleDb; - - const drizzleTables = createDrizzleTables(schema, database) as Context< - typeof schema - >["tables"]; - - const rows = await db - .select() - .from(drizzleTables.account) - .fullJoin( - drizzleTables.nft, - eq(drizzleTables.account.id, drizzleTables.nft.owner), - ); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ - account: { id: "0x01", name: "kyle", age: 52 }, - nft: { id: 10n, owner: "0x01" }, - }); - - await cleanup(); -}); diff --git a/packages/core/src/drizzle/runtime.ts b/packages/core/src/drizzle/runtime.ts deleted file mode 100644 index ef69483c7..000000000 --- a/packages/core/src/drizzle/runtime.ts +++ /dev/null @@ -1,211 +0,0 @@ -import type { Database } from "@/database/index.js"; -import type { Scalar, Schema } from "@/schema/common.js"; -import { - isEnumColumn, - isJSONColumn, - isListColumn, - isMaterialColumn, - isOptionalColumn, - isReferenceColumn, - isScalarColumn, -} from "@/schema/utils.js"; -import { getTables } from "@/schema/utils.js"; -import { drizzle as drizzlePg } from "drizzle-orm/node-postgres"; -import { pgSchema, pgTable } from "drizzle-orm/pg-core"; -import { - doublePrecision as PgDoublePrecision, - integer as PgInteger, - jsonb as PgJsonb, - numeric as PgNumeric, - text as PgText, -} from "drizzle-orm/pg-core"; -import { - integer as SQLiteInteger, - real as SQLiteReal, - text as SQLiteText, -} from "drizzle-orm/sqlite-core"; -import type { Pool } from "pg"; -import { PgHexBuilder } from "./hex.js"; -import { PgListBuilder } from "./list.js"; - -export const createDrizzleDb = (database: Database) => { - return drizzlePg(database.driver.readonly as Pool); -}; - -type PostgresTable = Parameters[1]; -type DrizzleTable = { [tableName: string]: any }; - -export const createDrizzleTables = ({ - schema, - database, -}: { - schema: Schema; - database: Database; -}) => { - const drizzleTables: { [tableName: string]: DrizzleTable } = {}; - - for (const [tableName, { table }] of Object.entries(getTables(schema))) { - const drizzleColumns: DrizzleTable = {}; - - for (const [columnName, column] of Object.entries(table)) { - if (isMaterialColumn(column)) { - if (isJSONColumn(column)) { - drizzleColumns[columnName] = convertJsonColumn( - columnName, - database.dialect, - ); - } else if (isEnumColumn(column)) { - if (isListColumn(column)) { - drizzleColumns[columnName] = convertListColumn( - columnName, - database.dialect, - "string", - ); - } else { - drizzleColumns[columnName] = convertEnumColumn( - columnName, - database.dialect, - ); - } - } else if (isScalarColumn(column) || isReferenceColumn(column)) { - if (isListColumn(column)) { - drizzleColumns[columnName] = convertListColumn( - columnName, - database.dialect, - column[" scalar"], - ); - } else { - switch (column[" scalar"]) { - case "string": - drizzleColumns[columnName] = convertStringColumn( - columnName, - database.dialect, - ); - break; - - case "int": - drizzleColumns[columnName] = convertIntColumn( - columnName, - database.dialect, - ); - break; - - case "boolean": - drizzleColumns[columnName] = convertBooleanColumn( - columnName, - database.dialect, - ); - break; - - case "float": - drizzleColumns[columnName] = convertFloatColumn( - columnName, - database.dialect, - ); - break; - - case "hex": - drizzleColumns[columnName] = convertHexColumn( - columnName, - database.dialect, - ); - break; - - case "bigint": - drizzleColumns[columnName] = convertBigintColumn( - columnName, - database.dialect, - ); - break; - } - } - - // apply column constraints - if (columnName === "id") { - drizzleColumns[columnName] = - drizzleColumns[columnName]!.primaryKey(); - } else if (isOptionalColumn(column) === false) { - drizzleColumns[columnName] = drizzleColumns[columnName]!.notNull(); - } - } - } - } - - // Note: this is to avoid an error thrown by drizzle when - // setting schema to "public". - if (database.namespace === "public") { - drizzleTables[tableName] = pgTable( - tableName, - drizzleColumns as PostgresTable, - ); - } else { - drizzleTables[tableName] = pgSchema(database.namespace).table( - tableName, - drizzleColumns as PostgresTable, - ); - } - } - - return drizzleTables; -}; - -export const ponderHex = (columnName: string) => new PgHexBuilder(columnName); -export const ponderBigint = (columnName: string) => - PgNumeric(columnName, { precision: 78 }); - -const convertStringColumn = ( - columnName: string, - kind: "sqlite" | "postgres", -) => { - return kind === "sqlite" ? SQLiteText(columnName) : PgText(columnName); -}; - -const convertIntColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" ? SQLiteInteger(columnName) : PgInteger(columnName); -}; - -const convertFloatColumn = ( - columnName: string, - kind: "sqlite" | "postgres", -) => { - return kind === "sqlite" - ? SQLiteReal(columnName) - : PgDoublePrecision(columnName); -}; - -const convertBooleanColumn = ( - columnName: string, - kind: "sqlite" | "postgres", -) => { - return kind === "sqlite" ? SQLiteInteger(columnName) : PgInteger(columnName); -}; - -const convertHexColumn = (columnName: string, _kind: "sqlite" | "postgres") => { - return new PgHexBuilder(columnName); -}; - -const convertBigintColumn = ( - columnName: string, - _kind: "sqlite" | "postgres", -) => { - return PgNumeric(columnName, { precision: 78 }); -}; - -const convertListColumn = ( - columnName: string, - _kind: "sqlite" | "postgres", - element: Scalar, -) => { - return new PgListBuilder(columnName, element); -}; - -const convertJsonColumn = ( - columnName: string, - _kind: "sqlite" | "postgres", -) => { - return PgJsonb(columnName); -}; - -const convertEnumColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" ? SQLiteText(columnName) : PgText(columnName); -}; diff --git a/packages/core/src/drizzle/sql.ts b/packages/core/src/drizzle/sql.ts new file mode 100644 index 000000000..83ebcc0a1 --- /dev/null +++ b/packages/core/src/drizzle/sql.ts @@ -0,0 +1,252 @@ +import { Table, is } from "drizzle-orm"; +import { + PgColumn, + PgEnumColumn, + type PgTable, + type TableConfig, + getTableConfig, + integer, + pgTable, + serial, + varchar, +} from "drizzle-orm/pg-core"; + +export const pgNativeTypes = new Set([ + "uuid", + "smallint", + "integer", + "bigint", + "boolean", + "text", + "varchar", + "serial", + "bigserial", + "decimal", + "numeric", + "real", + "json", + "jsonb", + "time", + "time with time zone", + "time without time zone", + "time", + "timestamp", + "timestamp with time zone", + "timestamp without time zone", + "date", + "interval", + "bigint", + "bigserial", + "double precision", + "interval year", + "interval month", + "interval day", + "interval hour", + "interval minute", + "interval second", + "interval year to month", + "interval day to hour", + "interval day to minute", + "interval day to second", + "interval hour to minute", + "interval hour to second", + "interval minute to second", +]); + +const isPgNativeType = (it: string) => { + if (pgNativeTypes.has(it)) return true; + const toCheck = it.replace(/ /g, ""); + return ( + toCheck.startsWith("varchar(") || + toCheck.startsWith("char(") || + toCheck.startsWith("numeric(") || + toCheck.startsWith("timestamp(") || + toCheck.startsWith("doubleprecision[") || + toCheck.startsWith("intervalyear(") || + toCheck.startsWith("intervalmonth(") || + toCheck.startsWith("intervalday(") || + toCheck.startsWith("intervalhour(") || + toCheck.startsWith("intervalminute(") || + toCheck.startsWith("intervalsecond(") || + toCheck.startsWith("intervalyeartomonth(") || + toCheck.startsWith("intervaldaytohour(") || + toCheck.startsWith("intervaldaytominute(") || + toCheck.startsWith("intervaldaytosecond(") || + toCheck.startsWith("intervalhourtominute(") || + toCheck.startsWith("intervalhourtosecond(") || + toCheck.startsWith("intervalminutetosecond(") || + toCheck.startsWith("vector(") || + toCheck.startsWith("geometry(") || + /^(\w+)(\[\d*])+$/.test(it) + ); +}; + +/** @see https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-kit/src/sqlgenerator.ts#L134 */ + +export const generateTableSQL = ({ + table, + namespace, + namePrefix, + extraColumns, +}: { + table: PgTable; + namespace: string; + namePrefix?: string; + extraColumns?: PgColumn[]; +}) => { + const config = getTableConfig(table); + const tableName = config.name; + const columns = config.columns; + const primaryKeys = config.primaryKeys; + + let statement = ""; + const name = namespace + ? `"${namespace}"."${namePrefix ?? ""}${tableName}"` + : `"${namePrefix ?? ""}${tableName}"`; + + statement += `CREATE TABLE IF NOT EXISTS ${name} (\n`; + for (let i = 0; i < columns.length; i++) { + const column = columns[i]!; + + const primaryKeyStatement = + column.primary && extraColumns === undefined ? " PRIMARY KEY" : ""; + const notNullStatement = + column.notNull && !column.generatedIdentity ? " NOT NULL" : ""; + const defaultStatement = + column.default !== undefined ? ` DEFAULT ${column.default}` : ""; + + const uniqueConstraint = column.isUnique + ? ` CONSTRAINT "${column.uniqueName}" UNIQUE${column.uniqueType === "not distinct" ? " NULLS NOT DISTINCT" : ""}` + : ""; + + const typeSchema = is(column, PgEnumColumn) + ? column.enum.schema || "public" + : undefined; + + const schemaPrefix = + typeSchema && typeSchema !== "public" ? `"${typeSchema}".` : ""; + + const type = isPgNativeType(column.getSQLType()) + ? column.getSQLType() + : `${schemaPrefix}"${column.getSQLType()}"`; + const generated = column.generated; + + const generatedStatement = generated + ? ` GENERATED ALWAYS AS (${generated?.as}) STORED` + : ""; + + // const unsquashedIdentity = column.generatedIdentity + // ? PgSquasher.unsquashIdentity(column.identity) + // : undefined; + + // const identityWithSchema = schema + // ? `"${schema}"."${unsquashedIdentity?.name}"` + // : `"${unsquashedIdentity?.name}"`; + + // const identity = unsquashedIdentity + // ? ` GENERATED ${ + // unsquashedIdentity.type === "always" ? "ALWAYS" : "BY DEFAULT" + // } AS IDENTITY (sequence name ${identityWithSchema}${ + // unsquashedIdentity.increment + // ? ` INCREMENT BY ${unsquashedIdentity.increment}` + // : "" + // }${ + // unsquashedIdentity.minValue + // ? ` MINVALUE ${unsquashedIdentity.minValue}` + // : "" + // }${ + // unsquashedIdentity.maxValue + // ? ` MAXVALUE ${unsquashedIdentity.maxValue}` + // : "" + // }${ + // unsquashedIdentity.startWith + // ? ` START WITH ${unsquashedIdentity.startWith}` + // : "" + // }${unsquashedIdentity.cache ? ` CACHE ${unsquashedIdentity.cache}` : ""}${ + // unsquashedIdentity.cycle ? ` CYCLE` : "" + // })` + // : ""; + + statement += `\t"${column.name}" ${type}${primaryKeyStatement}${defaultStatement}${generatedStatement}${notNullStatement}${uniqueConstraint}`; + statement += + i === columns.length - 1 && extraColumns === undefined ? "" : ",\n"; + } + + if (extraColumns) { + for (let i = 0; i < extraColumns.length; i++) { + const column = extraColumns[i]!; + + const primaryKeyStatement = column.primary ? " PRIMARY KEY" : ""; + const notNullStatement = + column.notNull && !column.generatedIdentity ? " NOT NULL" : ""; + + const type = column.getSQLType(); + + statement += `\t"${column.name}" ${type}${primaryKeyStatement}${notNullStatement}`; + statement += i === extraColumns.length - 1 ? "" : ",\n"; + } + } + + // TODO(kyle) indexes + + if ( + extraColumns === undefined && + typeof primaryKeys !== "undefined" && + primaryKeys.length > 0 + ) { + statement += ",\n"; + + statement += `\tCONSTRAINT "${primaryKeys[0]!.getName()}" PRIMARY KEY(\"${primaryKeys[0]!.columns.map((c) => c.name).join(`","`)}\")`; + // statement += `\n`; + } + + // if ( + // typeof uniqueConstraints !== "undefined" && + // uniqueConstraints.length > 0 + // ) { + // for (const uniqueConstraint of uniqueConstraints) { + // statement += ",\n"; + // const unsquashedUnique = PgSquasher.unsquashUnique(uniqueConstraint); + // statement += `\tCONSTRAINT "${unsquashedUnique.name}" UNIQUE${ + // unsquashedUnique.nullsNotDistinct ? " NULLS NOT DISTINCT" : "" + // }(\"${unsquashedUnique.columns.join(`","`)}\")`; + // // statement += `\n`; + // } + // } + statement += "\n);"; + statement += "\n"; + + return statement; +}; + +export const getPrimaryKeyColumns = (table: PgTable): string[] => { + const tableConfig = getTableConfig(table); + if (tableConfig.primaryKeys.length > 0) { + return tableConfig.primaryKeys[0]!.columns.map((c) => c.name); + } + + const pkColumn = tableConfig.columns.find((c) => c.primary)!; + + return [pkColumn.name]; +}; + +export const getReorgTable = (table: PgTable) => { + const config = getTableConfig(table); + + const t = pgTable(`_ponder_reorg__${config.name}`, { + operation_id: serial("operation_id").notNull().primaryKey(), + operation: integer("operation").notNull(), + checkpoint: varchar("checkpoint", { + length: 75, + }).notNull(), + }); + + for (const [field, col] of Object.entries(table)) { + if (is(col, PgColumn)) { + // @ts-ignore + t[Table.Symbol.Columns][field] = col; + } + } + + return t; +}; diff --git a/packages/core/src/drizzle/table.test-d.ts b/packages/core/src/drizzle/table.test-d.ts deleted file mode 100644 index 7c57393be..000000000 --- a/packages/core/src/drizzle/table.test-d.ts +++ /dev/null @@ -1,152 +0,0 @@ -import { createSchema } from "@/index.js"; -import { eq } from "drizzle-orm"; -import type { Hex } from "viem"; -import { expectTypeOf, test } from "vitest"; -import type { DrizzleDb } from "./db.js"; -import type { DrizzleTable } from "./table.js"; - -test("select query promise", async () => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - name: p.int().optional(), - }), - })); - - const table = {} as DrizzleTable< - "table", - (typeof schema)["table"]["table"], - typeof schema - >; - - const result = await ({} as DrizzleDb).select({ id: table.id }).from(table); - // ^? - - expectTypeOf<{ id: string }[]>(result); -}); - -test("select optional column", async () => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - name: p.int().optional(), - }), - })); - - const table = {} as DrizzleTable< - "table", - (typeof schema)["table"]["table"], - typeof schema - >; - - const result = await ({} as DrizzleDb).select().from(table); - // ^? - - expectTypeOf<{ id: string; name: number | null }[]>(result); -}); - -test("select enum", async () => { - const schema = createSchema((p) => ({ - e: p.createEnum(["yes", "no"]), - table: p.createTable({ - id: p.string(), - e: p.enum("e"), - }), - })); - - const table = {} as DrizzleTable< - "table", - (typeof schema)["table"]["table"], - typeof schema - >; - - const result = await ({} as DrizzleDb).select().from(table); - // ^? - - expectTypeOf<{ id: string; e: "yes" | "no" }[]>(result); -}); - -test("select json", async () => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - json: p.json<{ a: number; b: string }>(), - }), - })); - - const table = {} as DrizzleTable< - "table", - (typeof schema)["table"]["table"], - typeof schema - >; - - const result = await ({} as DrizzleDb).select().from(table); - // ^? - - expectTypeOf<{ id: string; json: { a: number; b: string } }[]>(result); -}); - -test("select list", async () => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - list: p.string().list(), - }), - })); - - const table = {} as DrizzleTable< - "table", - (typeof schema)["table"]["table"], - typeof schema - >; - - const result = await ({} as DrizzleDb).select().from(table); - // ^? - - expectTypeOf<{ id: string; list: string[] }[]>(result); -}); - -test("select join", async () => { - const schema = createSchema((p) => ({ - account: p.createTable({ - id: p.hex(), - name: p.string(), - age: p.int(), - }), - nft: p.createTable({ - id: p.bigint(), - owner: p.hex().references("account.id"), - }), - })); - - const account = {} as DrizzleTable< - "account", - (typeof schema)["account"]["table"], - typeof schema - >; - const nft = {} as DrizzleTable< - "nft", - (typeof schema)["nft"]["table"], - typeof schema - >; - - const result = await ({} as DrizzleDb) - // ^? - .select() - .from(account) - .fullJoin(nft, eq(account.id, nft.owner)); - - expectTypeOf< - { - account: { - id: Hex; - name: string; - age: number; - } | null; - nft: { - id: bigint; - owner: Hex; - } | null; - }[] - >(result); -}); diff --git a/packages/core/src/drizzle/table.ts b/packages/core/src/drizzle/table.ts deleted file mode 100644 index 98e8ba895..000000000 --- a/packages/core/src/drizzle/table.ts +++ /dev/null @@ -1,52 +0,0 @@ -import type { - EnumColumn, - ExtractNonVirtualColumnNames, - JSONColumn, - Schema as PonderSchema, - Table as PonderTable, - ReferenceColumn, - ScalarColumn, -} from "@/schema/common.js"; -import type { InferColumnType } from "@/schema/infer.js"; -import type { BuildColumns, ColumnBuilderBase } from "drizzle-orm"; -import type { PgTableWithColumns } from "drizzle-orm/pg-core"; - -/** - * Performs type transformation between Ponder and Drizzle column representation. - * - * @returns PgTableWithColumns - */ -export type DrizzleTable< - tableName extends string, - table extends PonderTable, - schema extends PonderSchema, -> = PgTableWithColumns<{ - name: tableName; - schema: undefined; - columns: BuildColumns< - tableName, - { - [columnName in ExtractNonVirtualColumnNames]: ColumnBuilderBase<{ - name: columnName & string; - dataType: "custom"; - columnType: "ponder"; - data: InferColumnType; - driverParam: unknown; - enumValues: undefined; - generated: undefined; - notNull: (table[columnName] & - ( - | ScalarColumn - | ReferenceColumn - | EnumColumn - | JSONColumn - ))[" optional"] extends true - ? false - : true; - primaryKey: columnName extends "id" ? true : false; - }>; - }, - "pg" - >; - dialect: "pg"; -}>; diff --git a/packages/core/src/graphql/buildGraphqlSchema.test.ts b/packages/core/src/graphql/buildGraphqlSchema.test.ts deleted file mode 100644 index bfc2af2d1..000000000 --- a/packages/core/src/graphql/buildGraphqlSchema.test.ts +++ /dev/null @@ -1,3097 +0,0 @@ -import { - setupCommon, - setupDatabaseServices, - setupIsolatedDatabase, -} from "@/_test/setup.js"; -import { getMetadataStore } from "@/indexing-store/metadata.js"; -import type { IndexingStore } from "@/indexing-store/store.js"; -import { createSchema } from "@/schema/schema.js"; -import { encodeCheckpoint, zeroCheckpoint } from "@/utils/checkpoint.js"; -import { type GraphQLType, execute, parse } from "graphql"; -import { beforeEach, expect, test } from "vitest"; -import { buildGraphQLSchema } from "./buildGraphqlSchema.js"; -import { buildLoaderCache } from "./buildLoaderCache.js"; - -beforeEach(setupCommon); -beforeEach(setupIsolatedDatabase); - -const create = async (id: string, indexingStore: IndexingStore) => { - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id, - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); -}; - -test("scalar", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - string - int - float - boolean - hex - bigint - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - }); - - await cleanup(); -}); - -test("scalar list", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string().list(), - int: p.int().list(), - float: p.float().list(), - boolean: p.boolean().list(), - hex: p.hex().list(), - bigint: p.bigint().list(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: ["0"], - int: [0], - float: [0], - boolean: [false], - hex: ["0x0"], - bigint: [0n], - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - string - int - float - boolean - hex - bigint - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - string: ["0"], - int: [0], - float: [0], - boolean: [false], - hex: ["0x0"], - bigint: ["0"], - }, - }); - - await cleanup(); -}); - -test("scalar optional", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string().optional(), - int: p.int().optional(), - float: p.float().optional(), - boolean: p.boolean().optional(), - hex: p.hex().optional(), - bigint: p.bigint().optional(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: null, - int: null, - float: null, - boolean: null, - hex: null, - bigint: null, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - string - int - float - boolean - hex - bigint - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - string: null, - int: null, - float: null, - boolean: null, - hex: null, - bigint: null, - }, - }); - - await cleanup(); -}); - -test("scalar optional list", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string().optional().list(), - int: p.int().optional().list(), - float: p.float().optional().list(), - boolean: p.boolean().optional().list(), - hex: p.hex().optional().list(), - bigint: p.bigint().optional().list(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: null, - int: null, - float: null, - boolean: null, - hex: null, - bigint: null, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - string - int - float - boolean - hex - bigint - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - string: null, - int: null, - float: null, - boolean: null, - hex: null, - bigint: null, - }, - }); - - await cleanup(); -}); - -test("json", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - json: p.json(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - json: { kevin: 52 }, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - json - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - json: { kevin: 52 }, - }, - }); - - await cleanup(); -}); - -test("enum", async (context) => { - const schema = createSchema((p) => ({ - enum: p.createEnum(["A", "B"]), - table: p.createTable({ - id: p.string(), - enum: p.enum("enum"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - enum: "A", - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - enum - } - } -`); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - enum: "A", - }, - }); - - await cleanup(); -}); - -test("enum optional", async (context) => { - const schema = createSchema((p) => ({ - enum: p.createEnum(["A", "B"]), - table: p.createTable({ - id: p.string(), - enum: p.enum("enum").optional(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - enum: null, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - enum - } -} -`); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - enum: null, - }, - }); - - await cleanup(); -}); - -test("enum list", async (context) => { - const schema = createSchema((p) => ({ - enum: p.createEnum(["A", "B"]), - table: p.createTable({ - id: p.string(), - enum: p.enum("enum").list(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - enum: ["A"], - }, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "1", - data: { - enum: ["B"], - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - enum - } - } -`); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - enum: ["A"], - }, - }); - - await cleanup(); -}); - -test("enum optional list", async (context) => { - const schema = createSchema((p) => ({ - enum: p.createEnum(["A", "B"]), - table: p.createTable({ - id: p.string(), - enum: p.enum("enum").optional().list(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - enum: null, - }, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "1", - data: { - enum: null, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - enum - } - } -`); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - enum: null, - }, - }); - - await cleanup(); -}); - -test("one", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - - ref: p.string().references("table.id"), - one: p.one("ref"), - - refNull: p.string().references("table.id").optional(), - oneNull: p.one("refNull"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - ref: "0", - refNull: null, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - one { - id - } - oneNull { - id - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { - readonlyStore: indexingStore, - getLoader: buildLoaderCache({ store: indexingStore }), - }, - }); - - expect(result.data).toMatchObject({ - table: { - one: { - id: "0", - }, - oneNull: null, - }, - }); - - await cleanup(); -}); - -test("many", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - - ref: p.string().references("many.id"), - // refNull: p.string().references("many.id").optional(), - }), - many: p.createTable({ - id: p.string(), - manyCol: p.many("table.ref"), - // manyNull: p.many("table.refNull"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - ref: "0", - // refNull: null, - }, - }); - - await indexingStore.create({ - tableName: "many", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - many(id: "0") { - manyCol { - items { - id - } - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { - readonlyStore: indexingStore, - getLoader: buildLoaderCache({ store: indexingStore }), - }, - }); - - expect(result.data).toMatchObject({ - many: { - manyCol: { - items: [ - { - id: "0", - }, - ], - }, - }, - }); - - await cleanup(); -}); - -test("many w/ filter", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - col: p.string(), - ref: p.string().references("many.id"), - }), - many: p.createTable({ - id: p.string(), - manyCol: p.many("table.ref"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - col: "kevin", - ref: "0", - }, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "1", - data: { - col: "kyle", - ref: "0", - }, - }); - - await indexingStore.create({ - tableName: "many", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - many(id: "0") { - manyCol (where: {col: "kevin"}) { - items { - id - } - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { - readonlyStore: indexingStore, - getLoader: buildLoaderCache({ store: indexingStore }), - }, - }); - - expect(result.data).toMatchObject({ - many: { - manyCol: { - items: [ - { - id: "0", - }, - ], - }, - }, - }); - - await cleanup(); -}); - -test("bigint id", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: 0n, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0") { - id - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0", - }, - }); - - await cleanup(); -}); - -test("hex id", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.hex(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0x00", - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - table(id: "0x00") { - id - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - table: { - id: "0x00", - }, - }); - - await cleanup(); -}); - -test("filter string eq", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { string: "0" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter string in", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { string_in: ["0", "2"] }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter string contains", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "string", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { string_contains: "tr" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "string", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter string starts with", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "string", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { string_starts_with: "str" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "string", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter string not ends with", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "string", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { string_not_ends_with: "str" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "string", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter int eq", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { int: 0 }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter int gt", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "0", - int: 1, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { int_gt: 0 }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 1, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter int lte", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { int_lte: 0 }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter int in", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { int_in: [0, 2] }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter float eq", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { float: 0 }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter float gt", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "0", - int: 0, - float: 1, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { float_gt: 0 }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 1, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter float lte", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { float_lte: 0 }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter float in", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { float_in: [0, 2] }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter bigint eq", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { bigint: "0" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter bigint gt", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 1n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { bigint_gt: "0" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "1", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter bigint lte", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { bigint_lte: "0" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter bigint in", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { bigint_in: ["0", "2"] }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filer hex eq", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { hex: "0x00" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter hex gt", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x1", - bigint: 0n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (where: { hex_gt: "0x00" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x01", - bigint: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter string list eq", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string().list(), - int: p.int().list(), - float: p.float().list(), - boolean: p.boolean().list(), - hex: p.hex().list(), - bigint: p.bigint().list(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: ["0"], - int: [0], - float: [0], - boolean: [false], - hex: ["0x0"], - bigint: [0n], - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(where: { string: ["0"] }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: ["0"], - int: [0], - float: [0], - boolean: [false], - hex: ["0x0"], - bigint: ["0"], - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter string list has", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string().list(), - int: p.int().list(), - float: p.float().list(), - boolean: p.boolean().list(), - hex: p.hex().list(), - bigint: p.bigint().list(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: ["0"], - int: [0], - float: [0], - boolean: [false], - hex: ["0x0"], - bigint: [0n], - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(where: { string_has: "0" }) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - string: ["0"], - int: [0], - float: [0], - boolean: [false], - hex: ["0x0"], - bigint: ["0"], - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter enum eq", async (context) => { - const schema = createSchema((p) => ({ - enum: p.createEnum(["A", "B"]), - table: p.createTable({ - id: p.string(), - enum: p.enum("enum"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - enum: "A", - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(enum: "A") { - items{ - id - enum - } - } - } -`); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - enum: "A", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter enum in", async (context) => { - const schema = createSchema((p) => ({ - enum: p.createEnum(["A", "B"]), - table: p.createTable({ - id: p.string(), - enum: p.enum("enum"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - enum: "A", - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(enum_in: ["A"]) { - items{ - id - enum - } - } - } -`); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - enum: "A", - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter ref eq", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - - ref: p.string().references("table.id"), - one: p.one("ref"), - - refNull: p.string().references("table.id").optional(), - oneNull: p.one("refNull"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - ref: "0", - refNull: null, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(where: { ref: "0" }) { - items { - one { - id - } - oneNull - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { - readonlyStore: indexingStore, - getLoader: buildLoaderCache({ store: indexingStore }), - }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - one: { - id: "0", - }, - oneNull: null, - }, - ], - }, - }); - - await cleanup(); -}); - -test("filter ref in", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - - ref: p.string().references("table.id"), - one: p.one("ref"), - - refNull: p.string().references("table.id").optional(), - oneNull: p.one("refNull"), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - ref: "0", - refNull: null, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(where: { ref_in: ["0", "2"] }) { - items { - one { - id - } - - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { - readonlyStore: indexingStore, - getLoader: buildLoaderCache({ store: indexingStore }), - }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - one: { - id: "0", - }, - }, - ], - }, - }); - - await cleanup(); -}); - -test("order int asc", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "1", - data: { - string: "0", - int: 1_000, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "2", - data: { - string: "0", - int: 5, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(orderBy: "int", orderDirection: "asc") { - items { - id - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - }, - { - id: "2", - }, - { - id: "1", - }, - ], - }, - }); - - await cleanup(); -}); - -test("order bigint asc", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "1", - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 1_000n, - }, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "2", - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 5n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(orderBy: "bigint", orderDirection: "asc") { - items { - id - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "0", - }, - { - id: "2", - }, - { - id: "1", - }, - ], - }, - }); - - await cleanup(); -}); - -test("order bigint desc", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await create("0", indexingStore); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "1", - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 1_000n, - }, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "2", - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 5n, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables(orderBy: "bigint", orderDirection: "desc") { - items { - id - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - expect(result.data).toMatchObject({ - tables: { - items: [ - { - id: "1", - }, - { - id: "2", - }, - { - id: "0", - }, - ], - }, - }); - - await cleanup(); -}); - -test("limit default", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - for (let i = 0; i < 100; i++) { - await create(String(i), indexingStore); - } - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - // @ts-ignore - expect(result.data.tables.items).toHaveLength(50); - - await cleanup(); -}); - -test("limit", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - for (let i = 0; i < 100; i++) { - await create(String(i), indexingStore); - } - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (limit: 15) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - // @ts-ignore - expect(result.data.tables.items).toHaveLength(15); - - await cleanup(); -}); - -test("limit error", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - // for (let i = 0; i < 100; i++) { - // await create(String(i), indexingStore); - // } - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - tables (limit: 1005) { - items { - id - string - int - float - boolean - hex - bigint - } - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore }, - }); - - // @ts-ignore - expect(result.errors[0].message).toBe( - "Invalid limit. Got 1005, expected <=1000.", - ); - - await cleanup(); -}); - -test("filter type has correct suffixes and types", () => { - const s = createSchema((p) => ({ - SimpleEnum: p.createEnum(["VALUE", "ANOTHER_VALUE"]), - RelatedTableStringId: p.createTable({ id: p.string() }), - RelatedTableBigIntId: p.createTable({ id: p.bigint() }), - Table: p.createTable({ - id: p.string(), - int: p.int(), - float: p.float(), - bool: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - enum: p.enum("SimpleEnum"), - listString: p.string().list(), - listBigInt: p.bigint().list(), - listEnum: p.enum("SimpleEnum").list(), - relatedTableStringId: p.string().references("RelatedTableStringId.id"), - relatedTableBigIntId: p.bigint().references("RelatedTableBigIntId.id"), - relatedTableString: p.one("relatedTableStringId"), - }), - })); - - const serverSchema = buildGraphQLSchema(s); - - const typeMap = serverSchema.getTypeMap(); - - const tableFilterType = typeMap.TableFilter!; - const fields = (tableFilterType.toConfig() as any).fields as Record< - string, - { name: string; type: GraphQLType } - >; - - const fieldsPretty = Object.entries(fields).reduce>( - (acc, [key, value]) => { - acc[key] = value.type.toString(); - return acc; - }, - {}, - ); - - expect(fieldsPretty).toMatchObject({ - id: "String", - id_not: "String", - id_in: "[String]", - id_not_in: "[String]", - id_contains: "String", - id_not_contains: "String", - id_starts_with: "String", - id_ends_with: "String", - id_not_starts_with: "String", - id_not_ends_with: "String", - int: "Int", - int_not: "Int", - int_in: "[Int]", - int_not_in: "[Int]", - int_gt: "Int", - int_lt: "Int", - int_gte: "Int", - int_lte: "Int", - float: "Float", - float_not: "Float", - float_in: "[Float]", - float_not_in: "[Float]", - float_gt: "Float", - float_lt: "Float", - float_gte: "Float", - float_lte: "Float", - bool: "Boolean", - bool_not: "Boolean", - bool_in: "[Boolean]", - bool_not_in: "[Boolean]", - hex: "String", - hex_gt: "String", - hex_lt: "String", - hex_gte: "String", - hex_lte: "String", - hex_not: "String", - hex_in: "[String]", - hex_not_in: "[String]", - bigint: "BigInt", - bigint_not: "BigInt", - bigint_in: "[BigInt]", - bigint_not_in: "[BigInt]", - bigint_gt: "BigInt", - bigint_lt: "BigInt", - bigint_gte: "BigInt", - bigint_lte: "BigInt", - enum: "SimpleEnum", - enum_not: "SimpleEnum", - enum_in: "[SimpleEnum]", - enum_not_in: "[SimpleEnum]", - listString: "[String]", - listString_not: "[String]", - listString_has: "String", - listString_not_has: "String", - listBigInt: "[BigInt]", - listBigInt_not: "[BigInt]", - listBigInt_has: "BigInt", - listBigInt_not_has: "BigInt", - listEnum: "[SimpleEnum]", - listEnum_not: "[SimpleEnum]", - listEnum_has: "SimpleEnum", - listEnum_not_has: "SimpleEnum", - relatedTableStringId: "String", - relatedTableStringId_not: "String", - relatedTableStringId_in: "[String]", - relatedTableStringId_not_in: "[String]", - relatedTableStringId_contains: "String", - relatedTableStringId_not_contains: "String", - relatedTableStringId_starts_with: "String", - relatedTableStringId_ends_with: "String", - relatedTableStringId_not_starts_with: "String", - relatedTableStringId_not_ends_with: "String", - relatedTableBigIntId: "BigInt", - relatedTableBigIntId_not: "BigInt", - relatedTableBigIntId_in: "[BigInt]", - relatedTableBigIntId_not_in: "[BigInt]", - relatedTableBigIntId_gt: "BigInt", - relatedTableBigIntId_lt: "BigInt", - relatedTableBigIntId_gte: "BigInt", - relatedTableBigIntId_lte: "BigInt", - }); -}); - -test("metadata", async (context) => { - const schema = createSchema(() => ({})); - - const { indexingStore, cleanup, database } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - const metadataStore = getMetadataStore({ - dialect: database.dialect, - db: database.qb.user, - }); - - await metadataStore.setStatus({ - mainnet: { - ready: true, - block: { - number: 10, - timestamp: 20, - }, - }, - }); - - const graphqlSchema = buildGraphQLSchema(schema); - - const document = parse(` - query { - _meta { - status - } - } - `); - - const result = await execute({ - schema: graphqlSchema, - document, - contextValue: { readonlyStore: indexingStore, metadataStore }, - }); - - expect(result.data).toMatchObject({ - _meta: { - status: { - mainnet: { - ready: true, - block: { - number: 10, - timestamp: 20, - }, - }, - }, - }, - }); - - await cleanup(); -}); diff --git a/packages/core/src/graphql/buildGraphqlSchema.ts b/packages/core/src/graphql/buildGraphqlSchema.ts deleted file mode 100644 index 1cc918e9b..000000000 --- a/packages/core/src/graphql/buildGraphqlSchema.ts +++ /dev/null @@ -1,71 +0,0 @@ -import type { MetadataStore, ReadonlyStore } from "@/indexing-store/store.js"; -import type { Schema } from "@/schema/common.js"; -import { getTables } from "@/schema/utils.js"; -import { - type GraphQLFieldConfig, - GraphQLObjectType, - GraphQLSchema, -} from "graphql"; -import type { GetLoader } from "./buildLoaderCache.js"; -import { buildEntityTypes } from "./entity.js"; -import { buildEnumTypes } from "./enum.js"; -import { buildEntityFilterTypes } from "./filter.js"; -import { metadataEntity } from "./metadata.js"; -import { buildPluralField } from "./plural.js"; -import { buildSingularField } from "./singular.js"; - -// TODO(kyle) stricter type -export type Parent = Record; -export type Context = { - getLoader: GetLoader; - readonlyStore: ReadonlyStore; - metadataStore: MetadataStore; -}; - -export const buildGraphQLSchema = (schema: Schema): GraphQLSchema => { - const queryFields: Record> = {}; - - const { enumTypes } = buildEnumTypes({ schema }); - const { entityFilterTypes } = buildEntityFilterTypes({ schema, enumTypes }); - const { entityTypes, entityPageTypes } = buildEntityTypes({ - schema, - enumTypes, - entityFilterTypes, - }); - - for (const [tableName, { table }] of Object.entries(getTables(schema))) { - const entityType = entityTypes[tableName]!; - const entityPageType = entityPageTypes[tableName]!; - const entityFilterType = entityFilterTypes[tableName]!; - - const singularFieldName = - tableName.charAt(0).toLowerCase() + tableName.slice(1); - queryFields[singularFieldName] = buildSingularField({ - tableName, - table, - entityType, - }); - - const pluralFieldName = `${singularFieldName}s`; - queryFields[pluralFieldName] = buildPluralField({ - tableName, - entityPageType, - entityFilterType, - }); - } - - queryFields._meta = { - type: metadataEntity, - resolve: async (_source, _args, context) => { - const status = await context.metadataStore.getStatus(); - return { status }; - }, - }; - - return new GraphQLSchema({ - query: new GraphQLObjectType({ - name: "Query", - fields: queryFields, - }), - }); -}; diff --git a/packages/core/src/graphql/buildLoaderCache.ts b/packages/core/src/graphql/buildLoaderCache.ts deleted file mode 100644 index bfb6fbeb0..000000000 --- a/packages/core/src/graphql/buildLoaderCache.ts +++ /dev/null @@ -1,28 +0,0 @@ -import type { ReadonlyStore } from "@/indexing-store/store.js"; -import DataLoader from "dataloader"; - -export type GetLoader = ReturnType; - -export function buildLoaderCache({ store }: { store: ReadonlyStore }) { - const loaderCache: Record< - string, - DataLoader | undefined - > = {}; - - return ({ tableName }: { tableName: string }) => { - const loader = (loaderCache[tableName] ??= new DataLoader( - async (ids) => { - const rows = await store.findMany({ - tableName, - where: { id: { in: ids } }, - limit: ids.length, - }); - - return ids.map((id) => rows.items.find((row) => row.id === id)); - }, - { maxBatchSize: 1_000 }, - )); - - return loader; - }; -} diff --git a/packages/core/src/graphql/entity.ts b/packages/core/src/graphql/entity.ts deleted file mode 100644 index ef5697248..000000000 --- a/packages/core/src/graphql/entity.ts +++ /dev/null @@ -1,187 +0,0 @@ -import type { ReferenceColumn, Schema } from "@/schema/common.js"; -import { - extractReferenceTable, - getTables, - isEnumColumn, - isJSONColumn, - isListColumn, - isManyColumn, - isOneColumn, - isOptionalColumn, -} from "@/schema/utils.js"; -import { - GraphQLBoolean, - type GraphQLFieldResolver, - type GraphQLInputObjectType, -} from "graphql"; -import { - type GraphQLEnumType, - type GraphQLFieldConfigMap, - GraphQLInt, - GraphQLList, - GraphQLNonNull, - GraphQLObjectType, - GraphQLString, -} from "graphql"; -import type { Context, Parent } from "./buildGraphqlSchema.js"; -import { buildWhereObject } from "./filter.js"; -import { GraphQLJSON } from "./graphQLJson.js"; -import type { PluralResolver } from "./plural.js"; -import { SCALARS } from "./scalar.js"; - -const GraphQLPageInfo = new GraphQLObjectType({ - name: "PageInfo", - fields: { - hasNextPage: { type: new GraphQLNonNull(GraphQLBoolean) }, - hasPreviousPage: { type: new GraphQLNonNull(GraphQLBoolean) }, - startCursor: { type: GraphQLString }, - endCursor: { type: GraphQLString }, - }, -}); - -export const buildEntityTypes = ({ - schema, - enumTypes, - entityFilterTypes, -}: { - schema: Schema; - enumTypes: Record; - entityFilterTypes: Record; -}) => { - const entityTypes: Record> = {}; - const entityPageTypes: Record = {}; - - for (const [tableName, { table }] of Object.entries(getTables(schema))) { - entityTypes[tableName] = new GraphQLObjectType({ - name: tableName, - fields: () => { - const fieldConfigMap: GraphQLFieldConfigMap = {}; - - Object.entries(table).forEach(([columnName, column]) => { - if (isOneColumn(column)) { - // Column must resolve the foreign key of the referenced column - // Note: this relies on the fact that reference columns can't be lists. - const referenceColumn = table[ - column[" reference"] - ] as ReferenceColumn; - const referencedTable = extractReferenceTable(referenceColumn); - - const resolver: GraphQLFieldResolver = async ( - parent, - _args, - context, - ) => { - // The parent object gets passed in here containing reference column values. - const relatedRecordId = parent[column[" reference"]]; - // Note: Don't query with a null or undefined id, indexing store will throw error. - if (relatedRecordId === null || relatedRecordId === undefined) - return null; - - const loader = context.getLoader({ - tableName: referencedTable, - }); - - return await loader.load(relatedRecordId); - }; - - fieldConfigMap[columnName] = { - type: isOptionalColumn(referenceColumn) - ? entityTypes[referencedTable]! - : new GraphQLNonNull(entityTypes[referencedTable]!), - resolve: resolver, - }; - } else if (isManyColumn(column)) { - const resolver: PluralResolver = async (parent, args, context) => { - const { where, orderBy, orderDirection, limit, after, before } = - args; - - const whereObject = where ? buildWhereObject(where) : {}; - // Add the parent record ID to the where object. - // Note that this overrides any existing equals condition. - (whereObject[column[" referenceColumn"]] ??= {}).equals = - parent.id; - - const orderByObject = orderBy - ? { [orderBy]: orderDirection ?? "asc" } - : undefined; - - // Query for the IDs of the matching records. - // TODO: Update query to only fetch IDs, not entire records. - const result = await context.readonlyStore.findMany({ - tableName: column[" referenceTable"], - where: whereObject, - orderBy: orderByObject, - limit, - before, - after, - }); - - // Load entire records objects using the loader. - const loader = context.getLoader({ - tableName: column[" referenceTable"], - }); - - const ids = result.items.map((item) => item.id); - const items = await loader.loadMany(ids); - - return { items, pageInfo: result.pageInfo }; - }; - - fieldConfigMap[columnName] = { - type: entityPageTypes[column[" referenceTable"]]!, - args: { - where: { type: entityFilterTypes[column[" referenceTable"]]! }, - orderBy: { type: GraphQLString }, - orderDirection: { type: GraphQLString }, - before: { type: GraphQLString }, - after: { type: GraphQLString }, - limit: { type: GraphQLInt }, - }, - resolve: resolver, - }; - } else if (isJSONColumn(column)) { - fieldConfigMap[columnName] = { - type: isOptionalColumn(column) - ? GraphQLJSON - : new GraphQLNonNull(GraphQLJSON), - }; - } else { - const type = isEnumColumn(column) - ? enumTypes[column[" enum"]]! - : SCALARS[column[" scalar"]]; - if (isListColumn(column)) { - const listType = new GraphQLList(new GraphQLNonNull(type)); - fieldConfigMap[columnName] = { - type: isOptionalColumn(column) - ? listType - : new GraphQLNonNull(listType), - }; - } else { - fieldConfigMap[columnName] = { - type: isOptionalColumn(column) - ? type - : new GraphQLNonNull(type), - }; - } - } - }); - - return fieldConfigMap; - }, - }); - - entityPageTypes[tableName] = new GraphQLObjectType({ - name: `${tableName}Page`, - fields: () => ({ - items: { - type: new GraphQLNonNull( - new GraphQLList(new GraphQLNonNull(entityTypes[tableName]!)), - ), - }, - pageInfo: { type: new GraphQLNonNull(GraphQLPageInfo) }, - }), - }); - } - - return { entityTypes, entityPageTypes }; -}; diff --git a/packages/core/src/graphql/enum.ts b/packages/core/src/graphql/enum.ts deleted file mode 100644 index c3bf5a334..000000000 --- a/packages/core/src/graphql/enum.ts +++ /dev/null @@ -1,19 +0,0 @@ -import type { Schema } from "@/schema/common.js"; -import { getEnums } from "@/schema/utils.js"; -import { GraphQLEnumType } from "graphql"; - -export function buildEnumTypes({ schema }: { schema: Schema }) { - const enumTypes: Record = {}; - - for (const [enumName, _enum] of Object.entries(getEnums(schema))) { - enumTypes[enumName] = new GraphQLEnumType({ - name: enumName, - values: _enum.reduce( - (acc: Record, cur) => ({ ...acc, [cur]: {} }), - {}, - ), - }); - } - - return { enumTypes }; -} diff --git a/packages/core/src/graphql/filter.test.ts b/packages/core/src/graphql/filter.test.ts deleted file mode 100644 index a2c001250..000000000 --- a/packages/core/src/graphql/filter.test.ts +++ /dev/null @@ -1,69 +0,0 @@ -import { expect, test } from "vitest"; -import { buildWhereObject } from "./filter.js"; - -test("buildWhereObject transforms equals condition correctly", () => { - const where = { name: "John" }; - const expected = { name: { equals: "John" } }; - - expect(buildWhereObject(where)).toEqual(expected); -}); - -test("buildWhereObject transforms not condition correctly", () => { - const where = { age_not: 30 }; - const expected = { age: { not: 30 } }; - - expect(buildWhereObject(where)).toEqual(expected); -}); - -test("buildWhereObject transforms in condition correctly", () => { - const where = { category_in: ["books", "electronics"] }; - const expected = { category: { in: ["books", "electronics"] } }; - - expect(buildWhereObject(where)).toEqual(expected); -}); - -test("buildWhereObject handles complex conditions with and/or correctly", () => { - const where = { - name_not: "Peter", - AND: [{ name_contains: "John" }, { age_gt: 20 }], - OR: [{ country: "USA" }, { country: "Canada" }], - }; - const expected = { - name: { not: "Peter" }, - AND: [{ name: { contains: "John" } }, { age: { gt: 20 } }], - OR: [{ country: { equals: "USA" } }, { country: { equals: "Canada" } }], - }; - - expect(buildWhereObject(where)).toEqual(expected); -}); - -test("buildWhereObject transforms has condition correctly", () => { - const where = { - list_has: "0x0", - }; - const expected = { - list: { has: "0x0" }, - }; - - expect(buildWhereObject(where)).toEqual(expected); -}); - -test.skip("buildWhereObject handles two conditions for the same field", () => { - const where = { timestamp_gte: 1630608704, timestamp_lte: 1630605241 }; - const expected = { timestamp: { gte: 1630608704, lte: 1630605241 } }; - - expect(buildWhereObject(where)).toEqual(expected); -}); - -test("buildWhereObject throws error on unknown condition", () => { - const where = { name_like: "John" }; - expect(() => buildWhereObject(where)).toThrow( - "Invalid query: Unknown where condition: name_like", - ); -}); - -test("buildWhereObject returns an empty object when where is empty", () => { - const where = {}; - const expected = {}; - expect(buildWhereObject(where)).toEqual(expected); -}); diff --git a/packages/core/src/graphql/filter.ts b/packages/core/src/graphql/filter.ts deleted file mode 100644 index 4febd0ed6..000000000 --- a/packages/core/src/graphql/filter.ts +++ /dev/null @@ -1,177 +0,0 @@ -import { BuildError } from "@/common/errors.js"; -import type { Schema } from "@/schema/common.js"; -import { - getTables, - isEnumColumn, - isJSONColumn, - isListColumn, - isManyColumn, - isOneColumn, - isReferenceColumn, - isScalarColumn, -} from "@/schema/utils.js"; -import { - type GraphQLEnumType, - type GraphQLInputFieldConfigMap, - GraphQLInputObjectType, -} from "graphql"; -import { GraphQLList } from "graphql"; -import { SCALARS } from "./scalar.js"; - -const filterOperators = { - universal: ["", "_not"], - singular: ["_in", "_not_in"], - plural: ["_has", "_not_has"], - numeric: ["_gt", "_lt", "_gte", "_lte"], - string: [ - "_contains", - "_not_contains", - "_starts_with", - "_ends_with", - "_not_starts_with", - "_not_ends_with", - ], -} as const; - -export const buildEntityFilterTypes = ({ - schema, - enumTypes, -}: { schema: Schema; enumTypes: Record }) => { - const entityFilterTypes: Record = {}; - - for (const [tableName, { table }] of Object.entries(getTables(schema))) { - const filterType = new GraphQLInputObjectType({ - name: `${tableName}Filter`, - fields: () => { - const filterFields: GraphQLInputFieldConfigMap = { - // Logical operators - AND: { type: new GraphQLList(filterType) }, - OR: { type: new GraphQLList(filterType) }, - }; - - Object.entries(table).forEach(([columnName, column]) => { - // Note: Only include non-virtual columns in plural fields - if (isOneColumn(column)) return; - if (isManyColumn(column)) return; - if (isJSONColumn(column)) return; - - const type = isEnumColumn(column) - ? enumTypes[column[" enum"]]! - : SCALARS[column[" scalar"]]; - - if (isListColumn(column)) { - // List fields => universal, plural - filterOperators.universal.forEach((suffix) => { - filterFields[`${columnName}${suffix}`] = { - type: new GraphQLList(type), - }; - }); - - filterOperators.plural.forEach((suffix) => { - filterFields[`${columnName}${suffix}`] = { - type, - }; - }); - } else { - // Scalar fields => universal, singular, numeric OR string depending on base type - // Note: Booleans => universal and singular only. - filterOperators.universal.forEach((suffix) => { - filterFields[`${columnName}${suffix}`] = { - type, - }; - }); - - filterOperators.singular.forEach((suffix) => { - filterFields[`${columnName}${suffix}`] = { - type: new GraphQLList(type), - }; - }); - - if ( - (isScalarColumn(column) || isReferenceColumn(column)) && - ["int", "bigint", "float", "hex"].includes(column[" scalar"]) - ) { - filterOperators.numeric.forEach((suffix) => { - filterFields[`${columnName}${suffix}`] = { - type: type, - }; - }); - } - - if ( - (isScalarColumn(column) || isReferenceColumn(column)) && - "string" === column[" scalar"] - ) { - filterOperators.string.forEach((suffix) => { - filterFields[`${columnName}${suffix}`] = { - type: type, - }; - }); - } - } - }); - - return filterFields; - }, - }); - - entityFilterTypes[tableName] = filterType; - } - - return { entityFilterTypes }; -}; - -const graphqlFilterToStoreCondition = { - "": "equals", - not: "not", - in: "in", - not_in: "notIn", - has: "has", - not_has: "notHas", - gt: "gt", - lt: "lt", - gte: "gte", - lte: "lte", - contains: "contains", - not_contains: "notContains", - starts_with: "startsWith", - not_starts_with: "notStartsWith", - ends_with: "endsWith", - not_ends_with: "notEndsWith", -} as const; - -export function buildWhereObject(where: Record) { - const whereObject: Record = {}; - - for (const [whereKey, rawValue] of Object.entries(where)) { - // Handle the `and` and `or` operators. - if (whereKey === "AND" || whereKey === "OR") { - if (!Array.isArray(rawValue)) { - throw new BuildError( - `Invalid query: Expected an array for the ${whereKey} operator. Got: ${rawValue}`, - ); - } - - whereObject[whereKey] = rawValue.map(buildWhereObject); - continue; - } - - const [fieldName, condition_] = whereKey.split(/_(.*)/s); - // This is a hack to handle the "" operator, which the regex above doesn't handle - const condition = ( - condition_ === undefined ? "" : condition_ - ) as keyof typeof graphqlFilterToStoreCondition; - - const storeCondition = graphqlFilterToStoreCondition[condition]; - if (!storeCondition) { - throw new BuildError( - `Invalid query: Unknown where condition: ${fieldName}_${condition}`, - ); - } - - whereObject[fieldName!] ||= {}; - whereObject[fieldName!][storeCondition] = rawValue; - } - - return whereObject; -} diff --git a/packages/core/src/graphql/graphQLJson.ts b/packages/core/src/graphql/graphQLJson.ts deleted file mode 100644 index 083d559dc..000000000 --- a/packages/core/src/graphql/graphQLJson.ts +++ /dev/null @@ -1,63 +0,0 @@ -import { - type GraphQLScalarLiteralParser, - GraphQLScalarType, - Kind, - type ObjectValueNode, - type ValueNode, - print, -} from "graphql"; - -// Modified from https://github.com/taion/graphql-type-json/blob/master/src/index.js - -export const GraphQLJSON = new GraphQLScalarType({ - name: "JSON", - description: - "The `JSON` scalar type represents JSON values as specified by [ECMA-404](http://www.ecma-international.org/publications/files/ECMA-ST/ECMA-404.pdf).", - serialize: (x) => x, - parseValue: (x) => x, - parseLiteral: (ast, variables) => { - if (ast.kind !== Kind.OBJECT) { - throw new TypeError( - `JSONObject cannot represent non-object value: ${print(ast)}`, - ); - } - - return parseObject(ast, variables); - }, -}); - -const parseLiteral = ( - ast: ValueNode, - variables: Parameters[1], -): ReturnType> => { - switch (ast.kind) { - case Kind.STRING: - case Kind.BOOLEAN: - return ast.value; - case Kind.INT: - case Kind.FLOAT: - return Number.parseFloat(ast.value); - case Kind.OBJECT: - return parseObject(ast, variables); - case Kind.LIST: - return ast.values.map((n) => parseLiteral(n, variables)); - case Kind.NULL: - return null; - case Kind.VARIABLE: - return variables ? variables[ast.name.value] : undefined; - default: - throw new TypeError(`JSON cannot represent value: ${print(ast)}`); - } -}; - -const parseObject = ( - ast: ObjectValueNode, - variables: Parameters[1], -) => { - const value = Object.create(null); - ast.fields.forEach((field) => { - value[field.name.value] = parseLiteral(field.value, variables); - }); - - return value; -}; diff --git a/packages/core/src/graphql/index.test.ts b/packages/core/src/graphql/index.test.ts deleted file mode 100644 index a6e80ea11..000000000 --- a/packages/core/src/graphql/index.test.ts +++ /dev/null @@ -1,316 +0,0 @@ -import { - setupCommon, - setupDatabaseServices, - setupIsolatedDatabase, -} from "@/_test/setup.js"; -import type { HistoricalStore, ReadonlyStore } from "@/indexing-store/store.js"; -import type { Schema } from "@/schema/common.js"; -import { createSchema } from "@/schema/schema.js"; -import { encodeCheckpoint, zeroCheckpoint } from "@/utils/checkpoint.js"; -import { Hono } from "hono"; -import { createMiddleware } from "hono/factory"; -import { beforeEach, expect, test } from "vitest"; -import { graphql } from "./index.js"; - -beforeEach(setupCommon); -beforeEach(setupIsolatedDatabase); - -const contextMiddleware = (schema: Schema, readonlyStore: ReadonlyStore) => - createMiddleware(async (c, next) => { - c.set("readonlyStore", readonlyStore); - c.set("schema", schema); - await next(); - }); - -test("graphQLMiddleware serves request", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { indexingStore, readonlyStore, cleanup } = await setupDatabaseServices( - context, - { schema }, - ); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(zeroCheckpoint), - id: "0", - data: { - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x0", - bigint: 0n, - }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const app = new Hono() - .use(contextMiddleware(schema, readonlyStore)) - .use("/graphql", graphql()); - - const response = await app.request("/graphql", { - method: "POST", - headers: { - "Content-Type": "application/json", - }, - body: JSON.stringify({ - query: ` - query { - table(id: "0") { - id - string - int - float - boolean - hex - bigint - } - } - `, - }), - }); - - expect(response.status).toBe(200); - - expect(await response.json()).toMatchObject({ - data: { - table: { - id: "0", - string: "0", - int: 0, - float: 0, - boolean: false, - hex: "0x00", - bigint: "0", - }, - }, - }); - - await cleanup(); -}); - -test("graphQLMiddleware throws error when extra filter is applied", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - string: p.string(), - int: p.int(), - float: p.float(), - boolean: p.boolean(), - hex: p.hex(), - bigint: p.bigint(), - }), - })); - - const { readonlyStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const app = new Hono() - .use(contextMiddleware(schema, readonlyStore)) - .use("/graphql", graphql()); - - const response = await app.request("/graphql", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - query: ` - { - table(id: "0", doesntExist: "kevin") { - id - string - int - float - boolean - hex - bigint - } - } - `, - }), - }); - - expect(response.status).toBe(200); - const body = await response.json(); - expect(body.errors[0].message).toBe( - 'Unknown argument "doesntExist" on field "Query.table".', - ); - - await cleanup(); -}); - -test("graphQLMiddleware throws error for token limit", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ id: p.string() }), - })); - - const { readonlyStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const app = new Hono() - .use(contextMiddleware(schema, readonlyStore)) - .use("/graphql", graphql({ maxOperationTokens: 3 })); - - const response = await app.request("/graphql", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - query: ` - { - __schema { - types { - fields { - type { - fields { - type { - description - } - } - } - } - } - } - } - `, - }), - }); - - expect(response.status).toBe(200); - const body = await response.json(); - expect(body.errors[0].message).toBe( - "Syntax Error: Token limit of 3 exceeded.", - ); - - await cleanup(); -}); - -test("graphQLMiddleware throws error for depth limit", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ id: p.string() }), - })); - - const { readonlyStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const app = new Hono() - .use(contextMiddleware(schema, readonlyStore)) - .use("/graphql", graphql({ maxOperationDepth: 5 })); - - const response = await app.request("/graphql", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - query: ` - { - __schema { - types { - fields { - type { - fields { - type { - description - } - } - } - } - } - } - } - `, - }), - }); - - expect(response.status).toBe(200); - const body = await response.json(); - expect(body.errors[0].message).toBe( - "Syntax Error: Query depth limit of 5 exceeded, found 7.", - ); - - await cleanup(); -}); - -test("graphQLMiddleware throws error for max aliases", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ id: p.string() }), - })); - - const { readonlyStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const app = new Hono() - .use(contextMiddleware(schema, readonlyStore)) - .use("/graphql", graphql({ maxOperationAliases: 2 })); - - const response = await app.request("/graphql", { - method: "POST", - headers: { "Content-Type": "application/json" }, - body: JSON.stringify({ - query: ` - { - __schema { - types { - fields { - type { - alias1: fields { - type { - description - } - } - alias2: fields { - type { - description - } - } - alias3: fields { - type { - description - } - } - } - } - } - } - } - `, - }), - }); - - expect(response.status).toBe(200); - const body = await response.json(); - expect(body.errors[0].message).toBe( - "Syntax Error: Aliases limit of 2 exceeded, found 3.", - ); - - await cleanup(); -}); - -test("graphQLMiddleware interactive", async (context) => { - const { readonlyStore, cleanup } = await setupDatabaseServices(context, { - schema: {}, - }); - - const app = new Hono() - .use(contextMiddleware({}, readonlyStore)) - .use("/graphql", graphql({ maxOperationAliases: 2 })); - - const response = await app.request("/graphql"); - - expect(response.status).toBe(200); - - await cleanup(); -}); diff --git a/packages/core/src/graphql/index.ts b/packages/core/src/graphql/index.ts deleted file mode 100644 index bdabd7650..000000000 --- a/packages/core/src/graphql/index.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { graphiQLHtml } from "@/ui/graphiql.html.js"; -import { maxAliasesPlugin } from "@escape.tech/graphql-armor-max-aliases"; -import { maxDepthPlugin } from "@escape.tech/graphql-armor-max-depth"; -import { maxTokensPlugin } from "@escape.tech/graphql-armor-max-tokens"; -import { type YogaServerInstance, createYoga } from "graphql-yoga"; -import { createMiddleware } from "hono/factory"; -import { buildGraphQLSchema } from "./buildGraphqlSchema.js"; -import { buildLoaderCache } from "./buildLoaderCache.js"; - -/** - * Middleware for GraphQL with an interactive web view. - * - * - Docs: https://ponder.sh/docs/query/api-functions#register-graphql-middleware - * - * @example - * import { ponder } from "@/generated"; - * import { graphql } from "@ponder/core"; - * - * ponder.use("/graphql", graphql()); - * - */ -export const graphql = ( - { - maxOperationTokens = 1000, - maxOperationDepth = 100, - maxOperationAliases = 30, - }: { - maxOperationTokens?: number; - maxOperationDepth?: number; - maxOperationAliases?: number; - } = { - // Default limits are from Apollo: - // https://www.apollographql.com/blog/prevent-graph-misuse-with-operation-size-and-complexity-limit - maxOperationTokens: 1000, - maxOperationDepth: 100, - maxOperationAliases: 30, - }, -) => { - let yoga: YogaServerInstance | undefined = undefined; - - return createMiddleware(async (c) => { - if (c.req.method === "GET") { - return c.html(graphiQLHtml(c.req.path)); - } - - if (yoga === undefined) { - const readonlyStore = c.get("readonlyStore"); - const metadataStore = c.get("metadataStore"); - const schema = c.get("schema"); - const graphqlSchema = buildGraphQLSchema(schema); - - yoga = createYoga({ - schema: graphqlSchema, - context: () => { - const getLoader = buildLoaderCache({ store: readonlyStore }); - return { readonlyStore, metadataStore, getLoader }; - }, - graphqlEndpoint: c.req.path, - maskedErrors: process.env.NODE_ENV === "production", - logging: false, - graphiql: false, - parserAndValidationCache: false, - plugins: [ - maxTokensPlugin({ n: maxOperationTokens }), - maxDepthPlugin({ - n: maxOperationDepth, - ignoreIntrospection: false, - }), - maxAliasesPlugin({ - n: maxOperationAliases, - allowList: [], - }), - ], - }); - } - - const response = await yoga.handle(c.req.raw); - // TODO: Figure out why Yoga is returning 500 status codes for GraphQL errors. - // @ts-expect-error - response.status = 200; - // @ts-expect-error - response.statusText = "OK"; - - return response; - }); -}; diff --git a/packages/core/src/graphql/metadata.ts b/packages/core/src/graphql/metadata.ts deleted file mode 100644 index cdf527dbd..000000000 --- a/packages/core/src/graphql/metadata.ts +++ /dev/null @@ -1,7 +0,0 @@ -import { GraphQLObjectType } from "graphql"; -import { GraphQLJSON } from "./graphQLJson.js"; - -export const metadataEntity = new GraphQLObjectType({ - name: "_meta", - fields: { status: { type: GraphQLJSON } }, -}); diff --git a/packages/core/src/graphql/plural.ts b/packages/core/src/graphql/plural.ts deleted file mode 100644 index a10161759..000000000 --- a/packages/core/src/graphql/plural.ts +++ /dev/null @@ -1,64 +0,0 @@ -import { - type GraphQLFieldConfig, - type GraphQLFieldResolver, - type GraphQLInputObjectType, - GraphQLInt, - GraphQLNonNull, - type GraphQLObjectType, - GraphQLString, -} from "graphql"; -import type { Context, Parent } from "./buildGraphqlSchema.js"; -import { buildWhereObject } from "./filter.js"; - -type PluralArgs = { - where?: { [key: string]: number | string }; - after?: string; - before?: string; - limit?: number; - orderBy?: string; - orderDirection?: "asc" | "desc"; -}; - -export type PluralResolver = GraphQLFieldResolver; - -export const buildPluralField = ({ - tableName, - entityPageType, - entityFilterType, -}: { - tableName: string; - entityPageType: GraphQLObjectType; - entityFilterType: GraphQLInputObjectType; -}): GraphQLFieldConfig => { - const resolver: PluralResolver = async (_, args, context) => { - const { where, orderBy, orderDirection, before, limit, after } = args; - - const whereObject = where ? buildWhereObject(where) : {}; - - const orderByObject = orderBy - ? { [orderBy]: orderDirection || "asc" } - : undefined; - - return await context.readonlyStore.findMany({ - tableName, - where: whereObject, - orderBy: orderByObject, - limit, - before, - after, - }); - }; - - return { - type: new GraphQLNonNull(entityPageType), - args: { - where: { type: entityFilterType }, - orderBy: { type: GraphQLString }, - orderDirection: { type: GraphQLString }, - before: { type: GraphQLString }, - after: { type: GraphQLString }, - limit: { type: GraphQLInt }, - }, - resolve: resolver, - }; -}; diff --git a/packages/core/src/graphql/scalar.ts b/packages/core/src/graphql/scalar.ts deleted file mode 100644 index 46b7f7d97..000000000 --- a/packages/core/src/graphql/scalar.ts +++ /dev/null @@ -1,33 +0,0 @@ -import { BuildError } from "@/common/errors.js"; -import type { Scalar } from "@/schema/common.js"; -import { - GraphQLBoolean, - GraphQLFloat, - GraphQLInt, - GraphQLScalarType, - GraphQLString, -} from "graphql"; - -const GraphQLBigInt = new GraphQLScalarType({ - name: "BigInt", - serialize: (value) => String(value), - parseValue: (value) => BigInt(value as any), - parseLiteral: (value) => { - if (value.kind === "StringValue") { - return BigInt(value.value); - } else { - throw new BuildError( - `Invalid value kind provided for field of type BigInt: ${value.kind}. Expected: StringValue`, - ); - } - }, -}); - -export const SCALARS: { [type in Scalar]: GraphQLScalarType } = { - int: GraphQLInt, - float: GraphQLFloat, - string: GraphQLString, - boolean: GraphQLBoolean, - bigint: GraphQLBigInt, - hex: GraphQLString, -}; diff --git a/packages/core/src/graphql/singular.ts b/packages/core/src/graphql/singular.ts deleted file mode 100644 index 1f9076846..000000000 --- a/packages/core/src/graphql/singular.ts +++ /dev/null @@ -1,45 +0,0 @@ -import type { Table } from "@/schema/common.js"; -import type { GraphQLObjectType } from "graphql"; -import { - type GraphQLFieldConfig, - type GraphQLFieldResolver, - GraphQLNonNull, -} from "graphql"; -import type { Context, Parent } from "./buildGraphqlSchema.js"; -import { SCALARS } from "./scalar.js"; - -type SingularArgs = { - id?: string; -}; -type SingularResolver = GraphQLFieldResolver; - -export const buildSingularField = ({ - tableName, - table, - entityType, -}: { - tableName: string; - table: Table; - entityType: GraphQLObjectType; -}): GraphQLFieldConfig => { - const resolver: SingularResolver = async (_, args, context) => { - const { id } = args; - - if (id === undefined) return null; - - const entityInstance = await context.readonlyStore.findUnique({ - tableName, - id, - }); - - return entityInstance; - }; - - return { - type: entityType, - args: { - id: { type: new GraphQLNonNull(SCALARS[table.id[" scalar"]]) }, - }, - resolve: resolver, - }; -}; diff --git a/packages/core/src/hono/context.ts b/packages/core/src/hono/context.ts index 067b2dfc7..556d2eac2 100644 --- a/packages/core/src/hono/context.ts +++ b/packages/core/src/hono/context.ts @@ -1,12 +1,13 @@ -import type { Schema } from "@/schema/common.js"; -import type { ApiContext } from "@/types/api.js"; +import type { Drizzle, Schema } from "@/drizzle/index.js"; import type { Env, Context as HonoContext, Input } from "hono"; export type Context< schema extends Schema = Schema, path extends string = string, input extends Input = {}, -> = ApiContext & { +> = { + db: Drizzle; +} & { /** * Hono request object. * @@ -49,4 +50,6 @@ export type MiddlewareContext< schema extends Schema = Schema, path extends string = string, input extends Input = {}, -> = ApiContext & HonoContext; +> = { + db: Drizzle; +} & HonoContext; diff --git a/packages/core/src/hono/handler.ts b/packages/core/src/hono/handler.ts index 725a95764..43c945a3b 100644 --- a/packages/core/src/hono/handler.ts +++ b/packages/core/src/hono/handler.ts @@ -1,4 +1,4 @@ -import type { Schema } from "@/schema/common.js"; +import type { Schema } from "@/drizzle/index.js"; import type { ApiRegistry } from "@/types/api.js"; import type { BlankInput, HandlerResponse, Input, Next } from "hono/types"; import type { Context, MiddlewareContext } from "./context.js"; diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index fc21d95bd..1c406be36 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -1,5 +1,4 @@ export { createConfig } from "@/config/config.js"; -export { createSchema } from "@/schema/schema.js"; export type { Block, Log, @@ -24,6 +23,4 @@ export type NetworkConfig = Prettify; export type BlockConfig = Prettify; export type DatabaseConfig = Prettify; -export { graphql } from "@/graphql/index.js"; - -export { ponderHex, ponderBigint } from "@/drizzle/runtime.js"; +// export { graphql } from "@/graphql/index.js"; diff --git a/packages/core/src/indexing-store/historical.test.ts b/packages/core/src/indexing-store/historical.test.ts deleted file mode 100644 index f430c3ea4..000000000 --- a/packages/core/src/indexing-store/historical.test.ts +++ /dev/null @@ -1,1184 +0,0 @@ -import { - setupCommon, - setupDatabaseServices, - setupIsolatedDatabase, -} from "@/_test/setup.js"; -import { - BigIntSerializationError, - CheckConstraintError, - RecordNotFoundError, - UniqueConstraintError, -} from "@/common/errors.js"; -import { createSchema } from "@/schema/schema.js"; -import { beforeEach, expect, test } from "vitest"; -import type { HistoricalStore } from "./store.js"; - -beforeEach(setupCommon); -beforeEach(setupIsolatedDatabase); - -const schema = createSchema((p) => ({ - PetKind: p.createEnum(["CAT", "DOG"]), - Pet: p.createTable({ - id: p.string(), - name: p.string(), - age: p.int().optional(), - bigAge: p.bigint().optional(), - kind: p.enum("PetKind").optional(), - rating: p.float().optional(), - json: p.json().optional(), - }), - Person: p.createTable({ - id: p.string(), - name: p.string(), - }), -})); - -const hexSchema = createSchema((p) => ({ - table: p.createTable({ - id: p.hex(), - n: p.int(), - }), -})); - -test("findUnique()", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("findUnique() w/ cache miss", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("findMany()", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const instance = await indexingStore.findMany({ - tableName: "Pet", - }); - expect(instance.items).toHaveLength(1); - expect(instance.items[0]).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("create() inserts a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("create() throws UniqueConstraintError", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip" }, - }); - - const error = await indexingStore - .create({ - tableName: "Pet", - - id: "id1", - data: { name: "Skip", age: 13 }, - }) - .catch((_error) => _error); - - expect(error).instanceOf(UniqueConstraintError); - - await cleanup(); -}); - -test("create() respects optional fields", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", kind: "CAT" }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: null }); - - await cleanup(); -}); - -test("create() throws on invalid json", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const error = await indexingStore - .create({ - tableName: "Pet", - - id: "id1", - data: { - name: "Skip", - age: 12, - json: { - kevin: 52n, - }, - }, - }) - .catch((_error) => _error); - - expect(error).instanceOf(BigIntSerializationError); - - expect(error.message?.includes("Do not know how to serialize a BigInt")).toBe( - true, - ); - - await cleanup(); -}); - -test("create() accepts enums", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", kind: "CAT" }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", kind: "CAT" }); - - await cleanup(); -}); - -test("create() throws on invalid enum value", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const error = await indexingStore - .create({ - tableName: "Pet", - - id: "id1", - data: { name: "Skip", kind: "NOTACAT" }, - }) - .catch((error) => error); - - expect(error).toBeInstanceOf(CheckConstraintError); - - await cleanup(); -}); - -test("create() accepts BigInt fields as bigint and returns as bigint", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", bigAge: 100n }); - - await cleanup(); -}); - -test("create() accepts float fields as float and returns as float", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", rating: 1.0 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", rating: 1.0 }); - - await cleanup(); -}); - -test("create() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - }); - - const instance = await indexingStore.create({ - tableName: "table", - id: "0xa", - data: { n: 1 }, - }); - - expect(instance).toMatchObject({ id: "0x0a", n: 1 }); - - await cleanup(); -}); - -test("update() updates a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", bigAge: 100n }); - - await indexingStore.update({ - tableName: "Pet", - id: "id1", - data: { name: "Peanut Butter" }, - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ id: "id1", name: "Peanut Butter" }); - - await cleanup(); -}); - -test("update() updates a record using an update function", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", bigAge: 100n }); - - await indexingStore.update({ - tableName: "Pet", - id: "id1", - data: ({ current }) => ({ - name: `${current.name} and Skipper`, - }), - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ - id: "id1", - name: "Skip and Skipper", - }); - - await cleanup(); -}); - -test("update() with an empty update object returns the original record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const record = await indexingStore.update({ - tableName: "Pet", - id: "id1", - data: {}, - }); - - expect(record).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("update() with an update function that returns an empty object returns the record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const record = await indexingStore.update({ - tableName: "Pet", - id: "id1", - data: ({ current }) => { - if (current.name === "blah") return { name: "newBlah" }; - return {}; - }, - }); - - expect(record).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("update() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - }); - - await indexingStore.create({ - tableName: "table", - id: "0x0a", - data: { n: 1 }, - }); - - await indexingStore.update({ - tableName: "table", - id: "0x0A", - data: { n: 2 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "table", - id: "0x0A", - }); - expect(instance).toMatchObject({ id: "0x0a", n: 2 }); - - await cleanup(); -}); - -test("update() throws RecordNotFoundError", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - const error = await indexingStore - .update({ - tableName: "Pet", - id: "id1", - data: { name: "Peanut Butter" }, - }) - .catch((err) => err); - - expect(error).instanceOf(RecordNotFoundError); - - await cleanup(); -}); - -test("update() w/ cache miss", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const updatedInstance = await indexingStore.update({ - tableName: "Pet", - id: "id1", - data: { name: "Peanut Butter" }, - }); - - expect(updatedInstance).toMatchObject({ id: "id1", name: "Peanut Butter" }); - - await cleanup(); -}); - -test("update() w/ find cache", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - await indexingStore.findUnique({ tableName: "Pet", id: "id1" }); - - const updatedInstance = await indexingStore.update({ - tableName: "Pet", - id: "id1", - data: { name: "Peanut Butter" }, - }); - - expect(updatedInstance).toMatchObject({ id: "id1", name: "Peanut Butter" }); - - const findInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(findInstance).toMatchObject({ id: "id1", name: "Peanut Butter" }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const rows = await database.qb.user.selectFrom("Pet").selectAll().execute(); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ - id: "id1", - name: "Peanut Butter", - }); - - await cleanup(); -}); - -test("upsert() inserts a new record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: { name: "Skip", age: 12 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("upsert() updates a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: { name: "Skip", age: 24 }, - update: { name: "Jelly" }, - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ id: "id1", name: "Jelly", age: 12 }); - - await cleanup(); -}); - -test("upsert() with an empty update object returns the original record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const record = await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: { name: "Yellow", age: 14 }, - update: {}, - }); - - expect(record).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("upsert() with an update function that returns an empty object returns the record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const record = await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: { name: "Yellow", age: 14 }, - update: ({ current }) => { - if (current.name === "blah") return { name: "newBlah" }; - return {}; - }, - }); - - expect(record).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("upsert() updates a record using an update function", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: { name: "Skip", age: 24 }, - update: ({ current }) => ({ - age: (current.age as number) - 5, - }), - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ id: "id1", name: "Skip", age: 7 }); - - await cleanup(); -}); - -test("upsert() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - }); - - await indexingStore.create({ - tableName: "table", - id: "0x0a", - data: { n: 1 }, - }); - - await indexingStore.upsert({ - tableName: "table", - id: "0xA", - create: { n: 0 }, - update: { n: 2 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "table", - id: "0xA", - }); - expect(instance).toMatchObject({ id: "0x0a", n: 2 }); - - await cleanup(); -}); - -test("upsert() w/ cache miss", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const updatedInstance = await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: { name: "Skip", age: 24 }, - update: { name: "Jelly" }, - }); - - expect(updatedInstance).toMatchObject({ id: "id1", name: "Jelly", age: 12 }); - - await cleanup(); -}); - -test("upsert() w/ find cache", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - // add pet.id1 to find cache - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - const createInstance = await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: { name: "Peanut Butter" }, - update: {}, - }); - - expect(createInstance).toMatchObject({ id: "id1", name: "Peanut Butter" }); - - let findInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(findInstance).toMatchObject({ id: "id1", name: "Peanut Butter" }); - - // add pet.id1 to find cache, remove from create cache - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - const updateInstance = await indexingStore.upsert({ - tableName: "Pet", - id: "id1", - create: {}, - update: { name: "Kevin" }, - }); - - expect(updateInstance).toMatchObject({ id: "id1", name: "Kevin" }); - - findInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(findInstance).toMatchObject({ id: "id1", name: "Kevin" }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const rows = await database.qb.user.selectFrom("Pet").selectAll().execute(); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ - id: "id1", - name: "Kevin", - }); - - await cleanup(); -}); - -test("delete() removes a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.delete({ - tableName: "Pet", - id: "id1", - }); - - const deletedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(deletedInstance).toBe(null); - - await cleanup(); -}); - -test("delete() w/ find cache", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - await indexingStore.findUnique({ tableName: "Pet", id: "id1" }); - - const _delete = await indexingStore.delete({ - tableName: "Pet", - id: "id1", - }); - - expect(_delete).toBe(true); - - const deletedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(deletedInstance).toBe(null); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const rows = await database.qb.user.selectFrom("Pet").selectAll().execute(); - - expect(rows).toHaveLength(0); - - await cleanup(); -}); - -test("delete() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - }); - - await indexingStore.create({ - tableName: "table", - id: "0xa", - data: { n: 1 }, - }); - - await indexingStore.delete({ - tableName: "table", - id: "0xA", - }); - - const deletedInstance = await indexingStore.findUnique({ - tableName: "table", - id: "0xa", - }); - - expect(deletedInstance).toBe(null); - - await cleanup(); -}); - -test("createMany() inserts multiple entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const createdItems = await indexingStore.createMany({ - tableName: "Pet", - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ], - }); - expect(createdItems.length).toBe(3); - - const { items } = await indexingStore.findMany({ tableName: "Pet" }); - expect(items.length).toBe(3); - - await cleanup(); -}); - -test("createMany() inserts a large number of entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const RECORD_COUNT = 10_000; - - const createdItems = await indexingStore.createMany({ - tableName: "Pet", - data: [...Array(RECORD_COUNT).keys()].map((i) => ({ - id: `id${i}`, - name: "Alice", - bigAge: BigInt(i), - })), - }); - expect(createdItems.length).toBe(RECORD_COUNT); - - const { pageInfo } = await indexingStore.findMany({ - tableName: "Pet", - limit: 1_000, - }); - const { items } = await indexingStore.findMany({ - tableName: "Pet", - after: pageInfo.endCursor, - limit: 1_000, - }); - expect(items.length).toBe(1_000); - - await cleanup(); -}); - -test("updateMany() updates multiple entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ], - }); - - const updateditems = await indexingStore.updateMany({ - tableName: "Pet", - where: { bigAge: { gt: 50n } }, - data: { bigAge: 300n }, - }); - - expect(updateditems.length).toBe(2); - - const { items } = await indexingStore.findMany({ tableName: "Pet" }); - - expect(items.map((i) => i.bigAge)).toMatchObject([300n, 10n, 300n]); - - await cleanup(); -}); - -test("updateMany() updates using a function", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ], - }); - - const updateditems = await indexingStore.updateMany({ - tableName: "Pet", - where: { bigAge: { gt: 50n } }, - data: () => ({ bigAge: 300n }), - }); - - expect(updateditems.length).toBe(2); - - const { items } = await indexingStore.findMany({ tableName: "Pet" }); - - expect(items.map((i) => i.bigAge)).toMatchObject([300n, 10n, 300n]); - - await cleanup(); -}); - -test("updateMany() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - }); - - await indexingStore.create({ - tableName: "table", - id: "0x0a", - data: { n: 1 }, - }); - - await indexingStore.updateMany({ - tableName: "table", - where: { n: { gt: 0 } }, - data: { n: 2 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "table", - id: "0x0a", - }); - expect(instance).toMatchObject({ id: "0x0a", n: 2 }); - - await cleanup(); -}); - -test("updateMany() updates a large number of entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const RECORD_COUNT = 1_000; - - await indexingStore.createMany({ - tableName: "Pet", - data: [...Array(RECORD_COUNT).keys()].map((i) => ({ - id: `id${i}`, - name: "Alice", - bigAge: BigInt(i), - })), - }); - - const updatedItems = await indexingStore.updateMany({ - tableName: "Pet", - where: {}, - data: ({ current }) => ({ - bigAge: (current.bigAge as bigint) + 1n, - }), - }); - expect(updatedItems.length).toBe(RECORD_COUNT); - - await cleanup(); -}); - -test("flush() insert", async (context) => { - const { indexingStore, cleanup, database } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const rows = await database.qb.user.selectFrom("Pet").selectAll().execute(); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ - id: "id1", - name: "Skip", - age: 12, - }); - - await cleanup(); -}); - -test("flush() update", async (context) => { - const { indexingStore, cleanup, database } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - await indexingStore.create({ - tableName: "Pet", - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - await indexingStore.update({ - tableName: "Pet", - id: "id1", - data: { name: "Peanut Butter" }, - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const rows = await database.qb.user.selectFrom("Pet").selectAll().execute(); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ - id: "id1", - name: "Peanut Butter", - age: 12, - }); - - await cleanup(); -}); - -test("flush() partial", async (context) => { - const { indexingStore, cleanup, database } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - await indexingStore.createMany({ - tableName: "Pet", - data: [ - { id: "id0", name: "Skip" }, - { id: "id1", name: "Skip" }, - { id: "id2", name: "Foo" }, - { id: "id3", name: "Bar" }, - { id: "id4", name: "Skip" }, - { id: "id5", name: "Foo" }, - { id: "id6", name: "Bar" }, - { id: "id7", name: "Skip" }, - { id: "id8", name: "Foo" }, - { id: "id9", name: "Bar" }, - ], - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: false }); - - const rows = await database.qb.user.selectFrom("Pet").selectAll().execute(); - - expect(rows).toHaveLength(4); - expect(rows[0]).toMatchObject({ - id: "id0", - name: "Skip", - }); - - await cleanup(); -}); - -test("flush() skips update w/ no data", async (context) => { - const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - }), - })); - - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - }, - ); - - await indexingStore.create({ - tableName: "table", - id: "id", - }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const instance = await indexingStore.upsert({ - tableName: "table", - id: "id", - }); - - expect(instance).toMatchObject({ id: "id" }); - - await (indexingStore as HistoricalStore).flush({ isFullFlush: true }); - - const rows = await database.qb.user.selectFrom("table").selectAll().execute(); - - expect(rows).toHaveLength(1); - expect(rows[0]).toMatchObject({ - id: "id", - }); - - await cleanup(); -}); diff --git a/packages/core/src/indexing-store/historical.ts b/packages/core/src/indexing-store/historical.ts deleted file mode 100644 index ca77bb53e..000000000 --- a/packages/core/src/indexing-store/historical.ts +++ /dev/null @@ -1,877 +0,0 @@ -import type { Common } from "@/common/common.js"; -import { - FlushError, - RecordNotFoundError, - UniqueConstraintError, -} from "@/common/errors.js"; -import type { HeadlessKysely } from "@/database/kysely.js"; -import type { Schema, Table } from "@/schema/common.js"; -import { - getTables, - isMaterialColumn, - isReferenceColumn, - isScalarColumn, -} from "@/schema/utils.js"; -import type { - DatabaseRecord, - DatabaseValue, - UserId, - UserRecord, - UserValue, -} from "@/types/schema.js"; -import { createQueue } from "@ponder/common"; -import { sql } from "kysely"; -import { type Hex, padHex } from "viem"; -import type { - HistoricalStore, - OrderByInput, - ReadonlyStore, - WhereInput, -} from "./store.js"; -import { - decodeRecord, - encodeRecord, - encodeValue, - validateRecord, -} from "./utils/encoding.js"; -import { parseStoreError } from "./utils/errors.js"; -import { buildWhereConditions } from "./utils/filter.js"; - -/** Cache entries that need to be created in the database. */ -type InsertEntry = { - type: "insert"; - opIndex: number; - bytes: number; - record: UserRecord; -}; - -/** Cache entries that need to be updated in the database. */ -type UpdateEntry = { - type: "update"; - opIndex: number; - bytes: number; - record: UserRecord; -}; - -/** - * Cache entries that mirror the database. Can be `null`, - * meaning the entry doesn't exist in the cache. - */ -export type FindEntry = { - type: "find"; - opIndex: number; - bytes: number; - record: UserRecord | null; -}; - -type Entry = InsertEntry | UpdateEntry | FindEntry; - -export type Key = string | number; - -/** - * An in-memory representation of the indexing store. Every entry is - * normalized, validated, and guaranteed to not share any references - * with user-land. - */ -type StoreCache = { - [tableName: string]: { [key: Key]: Entry }; -}; - -export const getHistoricalStore = ({ - dialect, - schema, - readonlyStore, - db, - common, - isCacheExhaustive: _isCacheExhaustive, -}: { - dialect: "sqlite" | "postgres"; - schema: Schema; - readonlyStore: ReadonlyStore; - db: HeadlessKysely; - common: Common; - isCacheExhaustive: boolean; -}): HistoricalStore => { - const maxSizeBytes = common.options.indexingCacheMaxBytes; - const storeCache: StoreCache = {}; - const tables = getTables(schema); - - common.logger.debug({ - service: "indexing", - msg: `Using a ${Math.round(maxSizeBytes / (1024 * 1024))} MB indexing cache`, - }); - - /** True if the cache contains the complete state of the store. */ - let isCacheExhaustive = _isCacheExhaustive; - - /** Number of rows in cache. */ - let cacheSize = 0; - /** Estimated number of bytes used by cache. */ - let cacheSizeBytes = 0; - /** LRU counter. */ - let totalCacheOps = 0; - - for (const tableName of Object.keys(tables)) { - storeCache[tableName] = {}; - } - - /** - * Hex values must be normalized to mirror the `UInt8Array` - * encoding. i.e. "0xa", "0xA", "0x0a", "0x0A" are all equivalent. - */ - const normalizeHex = (hex: Hex) => - padHex(hex, { - size: Math.ceil((hex.length - 2) / 2), - dir: "left", - }).toLowerCase(); - - const getCacheKey = (id: UserId, tableName: string): Key => { - if (tables[tableName]!.table.id[" scalar"] === "hex") - return normalizeHex(id as Hex); - if (typeof id === "bigint") return `#Bigint.${id}`; - return id; - }; - - /** - * Updates a record as if it had been encoded, stored in the database, - * and then decoded. This is required to normalize p.hex() column values - * and nullable column values. - */ - const normalizeRecord = (record: UserRecord, tableName: string) => { - for (const [columnName, column] of Object.entries( - tables[tableName]!.table, - )) { - // optional columns are null - if (isMaterialColumn(column) && record[columnName] === undefined) { - record[columnName] = null; - } - // hex is lowercase byte encoded - if ( - (isScalarColumn(column) || isReferenceColumn(column)) && - column[" scalar"] === "hex" && - typeof record[columnName] === "string" - ) { - record[columnName] = normalizeHex(record[columnName] as Hex); - } - } - }; - - const shouldFlush = () => cacheSizeBytes > maxSizeBytes; - - const flush = createQueue({ - concurrency: 1, - initialStart: true, - browser: false, - worker: async ({ isFullFlush }: { isFullFlush: boolean }) => { - const flushIndex = - totalCacheOps - - cacheSize * (1 - common.options.indexingCacheFlushRatio); - - await Promise.all( - Object.entries(storeCache).map(async ([tableName, tableStoreCache]) => { - const table = (schema[tableName] as { table: Table }).table; - const cacheEntries = Object.values(tableStoreCache); - const batchSize = Math.round( - common.options.databaseMaxQueryParameters / - Object.keys(table).length, - ); - - let insertRecords: UserRecord[]; - - if (isFullFlush) { - insertRecords = cacheEntries - .filter(({ type }) => type === "insert") - .map(({ record }) => record!); - } else { - insertRecords = cacheEntries - .filter( - ({ type, opIndex }) => - type === "insert" && opIndex < flushIndex, - ) - .map(({ record }) => record!); - } - - if (insertRecords.length !== 0) { - common.logger.debug({ - service: "indexing", - msg: `Inserting ${insertRecords.length} cached '${tableName}' records into the database`, - }); - - for ( - let i = 0, len = insertRecords.length; - i < len; - i += batchSize - ) { - await db.wrap({ method: `${tableName}.flush` }, async () => { - const _insertRecords = insertRecords - .slice(i, i + batchSize) - // skip validation because its already occurred in the store method - .map((record) => - encodeRecord({ - record, - table, - schema, - dialect, - skipValidation: true, - }), - ); - - await db - .insertInto(tableName) - .values(_insertRecords) - .execute() - .catch((_error) => { - const error = _error as Error; - common.logger.error({ - service: "indexing", - msg: "Internal error occurred while flushing cache. Please report this error here: https://github.com/ponder-sh/ponder/issues", - }); - throw new FlushError(error.message); - }); - }); - } - } - - // Exit early if the table only has an "id" column. - if (Object.values(table).filter(isMaterialColumn).length === 1) { - return; - } - - let updateRecords: UserRecord[]; - - if (isFullFlush) { - updateRecords = cacheEntries - .filter(({ type }) => type === "update") - .map(({ record }) => record!); - } else { - updateRecords = cacheEntries - .filter( - ({ type, opIndex }) => - type === "update" && opIndex < flushIndex, - ) - .map(({ record }) => record!); - } - - if (updateRecords.length !== 0) { - common.logger.debug({ - service: "indexing", - msg: `Updating ${updateRecords.length} cached '${tableName}' records in the database`, - }); - - for ( - let i = 0, len = updateRecords.length; - i < len; - i += batchSize - ) { - await db.wrap({ method: `${tableName}.flush` }, async () => { - const _updateRecords = updateRecords - .slice(i, i + batchSize) - // skip validation because its already occurred in the store method - .map((record) => - encodeRecord({ - record, - table, - schema, - dialect, - skipValidation: true, - }), - ); - - await db - .insertInto(tableName) - .values(_updateRecords) - .onConflict((oc) => - oc.column("id").doUpdateSet((eb) => - Object.entries(table).reduce( - (acc, [colName, column]) => { - if (colName !== "id") { - if (isMaterialColumn(column)) { - acc[colName] = eb.ref(`excluded.${colName}`); - } - } - return acc; - }, - {}, - ), - ), - ) - .execute() - .catch((_error) => { - const error = _error as Error; - common.logger.error({ - service: "indexing", - msg: "Internal error occurred while flushing cache. Please report this error here: https://github.com/ponder-sh/ponder/issues", - }); - throw new FlushError(error.message); - }); - }); - } - } - }), - ); - - if (isFullFlush) { - for (const tableName of Object.keys(tables)) { - storeCache[tableName] = {}; - } - cacheSize = 0; - cacheSizeBytes = 0; - } else { - for (const [tableName, tableStoreCache] of Object.entries(storeCache)) { - for (const [key, { opIndex }] of Object.entries(tableStoreCache)) { - if (opIndex < flushIndex) { - const bytes = storeCache[tableName]![key]!.bytes; - delete storeCache[tableName]![key]; - - cacheSize--; - cacheSizeBytes -= bytes; - } - } - } - } - - isCacheExhaustive = false; - }, - }).add; - - const _findUnique = async ({ - tableName, - id, - }: { - tableName: string; - id: UserId; - }) => { - const table = tables[tableName]!.table; - - const encodedId = encodeValue({ - value: id, - column: table.id, - dialect, - }); - - const record = await db - .selectFrom(tableName) - .selectAll() - .where("id", "=", encodedId) - .executeTakeFirst(); - - if (record === undefined) return null; - - return decodeRecord({ record, table, dialect }); - }; - - return { - findUnique: async ({ - tableName, - id: _id, - }: { - tableName: string; - id: UserId; - }) => { - if (shouldFlush()) await flush({ isFullFlush: false }); - - return db.wrap({ method: `${tableName}.findUnique` }, async () => { - const id = structuredClone(_id); - const cacheKey = getCacheKey(id, tableName); - - const cacheEntry = storeCache[tableName]![cacheKey]; - if (cacheEntry !== undefined) { - cacheEntry.opIndex = totalCacheOps++; - return structuredClone(cacheEntry.record); - } - - // At this point if cache is exhaustive, findUnique will always return null - const record = isCacheExhaustive - ? null - : await _findUnique({ tableName, id }); - - const bytes = getBytesSize(record); - - // add "find" entry to cache - storeCache[tableName]![cacheKey] = { - type: "find", - opIndex: totalCacheOps++, - bytes, - record, - }; - - cacheSizeBytes += bytes; - cacheSize++; - - return structuredClone(record); - }); - }, - findMany: async (arg: { - tableName: string; - where?: WhereInput; - orderBy?: OrderByInput; - before?: string | null; - after?: string | null; - limit?: number; - }) => { - await flush({ isFullFlush: true }); - return readonlyStore.findMany(arg); - }, - create: async ({ - tableName, - id: _id, - data = {}, - }: { - tableName: string; - id: UserId; - data?: Omit; - }) => { - if (shouldFlush()) await flush({ isFullFlush: false }); - - return db.wrap({ method: `${tableName}.create` }, async () => { - const id = structuredClone(_id); - const cacheKey = getCacheKey(id, tableName); - - // Check cache truthiness, will be false if record is null. - if (storeCache[tableName]![cacheKey]?.record) { - throw new UniqueConstraintError( - `Unique constraint failed for '${tableName}.id'.`, - ); - } - - // copy user-land record - const record = structuredClone(data) as UserRecord; - record.id = id; - - normalizeRecord(record, tableName); - - validateRecord({ record, table: tables[tableName]!.table, schema }); - - const bytes = getBytesSize(record); - - storeCache[tableName]![cacheKey] = { - type: "insert", - opIndex: totalCacheOps++, - bytes, - record, - }; - - cacheSizeBytes += bytes; - cacheSize++; - - return structuredClone(record); - }); - }, - createMany: async ({ - tableName, - data, - }: { - tableName: string; - data: UserRecord[]; - }) => { - if (shouldFlush()) await flush({ isFullFlush: false }); - - return db.wrap({ method: `${tableName}.createMany` }, async () => { - for (const _record of data) { - const cacheKey = getCacheKey(_record.id, tableName); - - // Check cache truthiness, will be false if record is null. - if (storeCache[tableName]![cacheKey]?.record) { - throw new UniqueConstraintError( - `Unique constraint failed for '${tableName}.id'.`, - ); - } - - // copy user-land record - const record = structuredClone(_record); - - normalizeRecord(record, tableName); - - validateRecord({ record, table: tables[tableName]!.table, schema }); - - const bytes = getBytesSize(record); - - storeCache[tableName]![cacheKey] = { - type: "insert", - opIndex: totalCacheOps++, - bytes, - record, - }; - - cacheSizeBytes += bytes; - } - - cacheSize += data.length; - - const returnData = structuredClone(data); - for (const record of data) { - normalizeRecord(record, tableName); - } - return returnData; - }); - }, - update: async ({ - tableName, - id: _id, - data = {}, - }: { - tableName: string; - id: UserId; - data?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - }) => { - if (shouldFlush()) await flush({ isFullFlush: false }); - - return db.wrap({ method: `${tableName}.findUnique` }, async () => { - const id = structuredClone(_id); - const cacheKey = getCacheKey(id, tableName); - - let cacheEntry = storeCache[tableName]![cacheKey]; - - if (cacheEntry === undefined) { - const record = isCacheExhaustive - ? null - : await _findUnique({ tableName, id }); - - if (record === null) { - throw new RecordNotFoundError( - "No existing record was found with the specified ID", - ); - } - - // Note: a "spoof" cache entry is created - cacheEntry = { type: "update", opIndex: 0, bytes: 0, record }; - - storeCache[tableName]![cacheKey] = cacheEntry; - } else { - if (cacheEntry.record === null) { - throw new RecordNotFoundError( - "No existing record was found with the specified ID", - ); - } - - if (cacheEntry.type === "find") { - // move cache entry to "update" - (cacheEntry.type as Entry["type"]) = "update"; - } - } - - const update = - typeof data === "function" - ? data({ current: structuredClone(cacheEntry.record!) }) - : data; - - // copy user-land record - const record = cacheEntry.record!; - for (const [key, value] of Object.entries(structuredClone(update))) { - record[key] = value; - } - - normalizeRecord(record, tableName); - - validateRecord({ record, table: tables[tableName]!.table, schema }); - - const bytes = getBytesSize(record); - - cacheEntry.record = record; - cacheEntry.opIndex = totalCacheOps++; - cacheEntry.bytes = bytes; - - return structuredClone(record); - }); - }, - updateMany: async ({ - tableName, - where, - data = {}, - }: { - tableName: string; - where: WhereInput; - data?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - }) => { - await flush({ isFullFlush: true }); - - const table = (schema[tableName] as { table: Table }).table; - - if (typeof data === "function") { - const query = db - .selectFrom(tableName) - .selectAll() - .where((eb) => buildWhereConditions({ eb, where, table, dialect })) - .orderBy("id", "asc"); - - const records: UserRecord[] = []; - let cursor: DatabaseValue = null; - - while (true) { - const _records = await db.wrap( - { method: `${tableName}.updateMany` }, - async () => { - const latestRecords: DatabaseRecord[] = await query - .limit(common.options.databaseMaxRowLimit) - .$if(cursor !== null, (qb) => qb.where("id", ">", cursor)) - .execute(); - - const records: DatabaseRecord[] = []; - - for (const latestRecord of latestRecords) { - const current = decodeRecord({ - record: latestRecord, - table, - dialect, - }); - const updateObject = data({ current }); - // Here, `latestRecord` is already encoded, so we need to exclude it from `encodeRecord`. - const updateRecord = { - id: latestRecord.id, - ...encodeRecord({ - record: updateObject, - table, - schema, - dialect, - skipValidation: false, - }), - }; - - const record = await db - .updateTable(tableName) - .set(updateRecord) - .where("id", "=", latestRecord.id) - .returningAll() - .executeTakeFirstOrThrow() - .catch((err) => { - throw parseStoreError(err, updateObject); - }); - records.push(record); - } - - return records.map((record) => - decodeRecord({ record, table, dialect }), - ); - }, - ); - - records.push(..._records); - - if (_records.length === 0) { - break; - } else { - cursor = encodeValue({ - value: _records[_records.length - 1]!.id, - column: table.id, - dialect, - }); - } - } - - return records; - } else { - return db.wrap({ method: `${tableName}.updateMany` }, async () => { - const updateRecord = encodeRecord({ - record: data, - table, - schema, - dialect, - skipValidation: false, - }); - - const records = await db - .with("latestRows(id)", (db) => - db - .selectFrom(tableName) - .select("id") - .where((eb) => - buildWhereConditions({ eb, where, table, dialect }), - ), - ) - .updateTable(tableName) - .set(updateRecord) - .from("latestRows") - .where(`${tableName}.id`, "=", sql.ref("latestRows.id")) - .returningAll() - .execute() - .catch((err) => { - throw parseStoreError(err, data); - }); - - return records.map((record) => - decodeRecord({ record, table, dialect }), - ); - }); - } - }, - upsert: async ({ - tableName, - id: _id, - create = {}, - update = {}, - }: { - tableName: string; - id: UserId; - create?: Omit; - update?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - }) => { - if (shouldFlush()) await flush({ isFullFlush: false }); - - return db.wrap({ method: `${tableName}.upsert` }, async () => { - const id = structuredClone(_id); - const cacheKey = getCacheKey(id, tableName); - - let cacheEntry = storeCache[tableName]![cacheKey]; - - if (cacheEntry === undefined) { - if (isCacheExhaustive === false) { - const record = await _findUnique({ tableName, id }); - - if (record !== null) { - // Note: a "spoof" cache entry is created - cacheEntry = { type: "update", opIndex: 0, bytes: 0, record }; - storeCache[tableName]![cacheKey] = cacheEntry; - } - - // Note: an "insert" cache entry will be created if the record is null, - // so don't need to create it here. - } - } else { - if (cacheEntry.type === "find") { - if (cacheEntry.record === null) { - // cache entry will be moved to "insert" - (cacheEntry.type as Entry["type"]) = "insert"; - } else { - // move cache entry to "update" - (cacheEntry.type as Entry["type"]) = "update"; - } - } - } - - // Check cache truthiness, will be false if record is null. - if (cacheEntry?.record) { - // update branch - const _update = - typeof update === "function" - ? update({ current: structuredClone(cacheEntry.record) }) - : update; - - // copy user-land record - const record = cacheEntry.record; - for (const [key, value] of Object.entries(structuredClone(_update))) { - record[key] = value; - } - - normalizeRecord(record, tableName); - - validateRecord({ record, table: tables[tableName]!.table, schema }); - - const bytes = getBytesSize(record); - - cacheEntry.record = record; - cacheEntry.opIndex = totalCacheOps++; - cacheEntry.bytes = bytes; - - return structuredClone(record); - } else { - // insert/create branch - - // copy user-land record - const record = structuredClone(create) as UserRecord; - record.id = id; - - normalizeRecord(record, tableName); - - validateRecord({ record, table: tables[tableName]!.table, schema }); - - const bytes = getBytesSize(record); - - storeCache[tableName]![cacheKey] = { - type: "insert", - opIndex: totalCacheOps++, - bytes, - record, - }; - - cacheSize++; - cacheSizeBytes += bytes; - - return structuredClone(record); - } - }); - }, - delete: async ({ - tableName, - id: _id, - }: { - tableName: string; - id: UserId; - }) => { - if (shouldFlush()) await flush({ isFullFlush: false }); - - return db.wrap({ method: `${tableName}.delete` }, async () => { - const id = structuredClone(_id); - const cacheKey = getCacheKey(id, tableName); - - const cacheEntry = storeCache[tableName]![cacheKey]; - - if (cacheEntry !== undefined) { - // delete from cache - const bytes = cacheEntry.bytes; - delete storeCache[tableName]![cacheKey]; - cacheSize--; - cacheSizeBytes -= bytes; - } - - if (isCacheExhaustive || cacheEntry?.record === null) { - return false; - } else { - const table = (schema[tableName] as { table: Table }).table; - - const deletedRecord = await db - .deleteFrom(tableName) - .where( - "id", - "=", - encodeValue({ value: id, column: table.id, dialect }), - ) - .returning(["id"]) - .executeTakeFirst() - .catch((err) => { - throw parseStoreError(err, { id }); - }); - - return !!deletedRecord; - } - }); - }, - flush, - }; -}; - -export const getBytesSize = (value: UserRecord | UserValue) => { - // size of metadata - let size = 16; - - if (typeof value === "number") { - // p.float, p.int - size += 8; - } else if (typeof value === "string") { - // p.hex, p.string, p.enum - size += 2 * value.length; - } else if (typeof value === "boolean") { - // p.boolean - size += 4; - } else if (typeof value === "bigint") { - // p.bigint - size += 48; - } else if (value === null || value === undefined) { - size += 8; - } else if (Array.isArray(value)) { - for (const e of value) { - size += getBytesSize(e); - } - } else { - for (const col of Object.values(value)) { - size += getBytesSize(col); - } - } - - return size; -}; diff --git a/packages/core/src/indexing-store/metadata.ts b/packages/core/src/indexing-store/metadata.ts index 757f23809..bdf8e2fd6 100644 --- a/packages/core/src/indexing-store/metadata.ts +++ b/packages/core/src/indexing-store/metadata.ts @@ -1,12 +1,14 @@ import type { HeadlessKysely } from "@/database/kysely.js"; import type { Status } from "@/sync/index.js"; -import type { MetadataStore } from "./store.js"; + +export type MetadataStore = { + setStatus: (status: Status) => Promise; + getStatus: () => Promise; +}; export const getMetadataStore = ({ - dialect, db, }: { - dialect: "sqlite" | "postgres"; db: HeadlessKysely; }): MetadataStore => ({ getStatus: async () => { @@ -19,9 +21,7 @@ export const getMetadataStore = ({ if (metadata!.value === null) return null; - return dialect === "sqlite" - ? (JSON.parse(metadata!.value) as Status) - : (metadata!.value as Status); + return metadata!.value as Status; }); }, setStatus: (status: Status) => { @@ -30,11 +30,11 @@ export const getMetadataStore = ({ .insertInto("_ponder_meta") .values({ key: "status", - value: dialect === "sqlite" ? JSON.stringify(status) : status, + value: status, }) .onConflict((oc) => oc.column("key").doUpdateSet({ - value: dialect === "sqlite" ? JSON.stringify(status) : status, + value: status, }), ) .execute(); diff --git a/packages/core/src/indexing-store/readonly.test.ts b/packages/core/src/indexing-store/readonly.test.ts deleted file mode 100644 index 73d85ebc0..000000000 --- a/packages/core/src/indexing-store/readonly.test.ts +++ /dev/null @@ -1,679 +0,0 @@ -import { - setupCommon, - setupDatabaseServices, - setupIsolatedDatabase, -} from "@/_test/setup.js"; -import { createSchema } from "@/schema/schema.js"; -import { - type Checkpoint, - encodeCheckpoint, - zeroCheckpoint, -} from "@/utils/checkpoint.js"; -import { beforeEach, expect, test } from "vitest"; - -beforeEach(setupCommon); -beforeEach(setupIsolatedDatabase); - -const schema = createSchema((p) => ({ - PetKind: p.createEnum(["CAT", "DOG"]), - Pet: p.createTable({ - id: p.string(), - name: p.string(), - age: p.int().optional(), - bigAge: p.bigint().optional(), - list: p.string().list().optional(), - kind: p.enum("PetKind").optional(), - rating: p.float().optional(), - json: p.json().optional(), - }), - Person: p.createTable({ - id: p.string(), - name: p.string(), - }), -})); - -const hexSchema = createSchema((p) => ({ - table: p.createTable({ - id: p.hex(), - n: p.int(), - }), -})); - -function createCheckpoint(index: number): Checkpoint { - return { ...zeroCheckpoint, blockTimestamp: index }; -} - -test("findUnique() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "0x0a", - data: { n: 1 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "table", - id: "0x0A", - }); - expect(instance).toMatchObject({ id: "0x0a", n: 1 }); - - await cleanup(); -}); - -test("findUnique() deserializes json", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { - name: "Skip", - age: 12, - json: { - kevin: 52, - }, - }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ - name: "Skip", - age: 12, - json: { - kevin: 52, - }, - }); - - await cleanup(); -}); - -test("findMany() returns current versions of all records", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(8)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - await indexingStore.update({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "SkipUpdated" }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id2", - data: { name: "Foo" }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id3", - data: { name: "Bar", bigAge: 100n }, - }); - - const { items } = await indexingStore.findMany({ tableName: "Pet" }); - expect(items).toHaveLength(3); - expect(items.map((i) => i.name)).toMatchObject(["SkipUpdated", "Foo", "Bar"]); - - await cleanup(); -}); - -test("findMany() orders by bigint field", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", bigAge: 105n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id2", - data: { name: "Foo", bigAge: 10n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id3", - data: { name: "Bar", bigAge: 190n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id4", - data: { name: "Patch" }, - }); - - const { items } = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { bigAge: "asc" }, - }); - expect(items.map((i) => i.bigAge)).toMatchObject([null, 10n, 105n, 190n]); - - await cleanup(); -}); - -test("findMany() filters on bigint gt", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", bigAge: 105n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id2", - data: { name: "Foo", bigAge: 10n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id3", - data: { name: "Bar", bigAge: 190n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id4", - data: { name: "Patch" }, - }); - - const { items } = await indexingStore.findMany({ - tableName: "Pet", - where: { bigAge: { gt: 50n } }, - }); - - expect(items.map((i) => i.bigAge)).toMatchObject([105n, 190n]); - - await cleanup(); -}); - -test("findMany() filters with complex OR condition", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston", age: 12 }, - ], - }); - - const { items } = await indexingStore.findMany({ - tableName: "Pet", - where: { - OR: [ - { bigAge: { gt: 50n } }, - { AND: [{ name: "Foo" }, { bigAge: { lt: 20n } }] }, - ], - }, - }); - - expect(items).toMatchObject([ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ]); - - await cleanup(); -}); - -test("findMany() sorts and filters together", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", bigAge: 105n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id2", - data: { name: "Foo", bigAge: 10n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id3", - data: { name: "Bar", bigAge: 190n }, - }); - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id4", - data: { name: "Zarbar" }, - }); - - const { items } = await indexingStore.findMany({ - tableName: "Pet", - where: { name: { endsWith: "ar" } }, - orderBy: { name: "asc" }, - }); - - expect(items.map((i) => i.name)).toMatchObject(["Bar", "Zarbar"]); - - await cleanup(); -}); - -test("findMany() errors on invalid filter condition", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - expect(() => - indexingStore.findMany({ - tableName: "Pet", - where: { name: { invalidWhereCondition: "ar" } }, - }), - ).rejects.toThrow( - "Invalid filter condition for column 'name'. Got 'invalidWhereCondition', expected one of ['equals', 'not', 'in', 'notIn', 'contains', 'notContains', 'startsWith', 'notStartsWith', 'endsWith', 'notEndsWith']", - ); - - await cleanup(); -}); - -test("findMany() cursor pagination ascending", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip" }, - { id: "id2", name: "Foo" }, - { id: "id3", name: "Bar" }, - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston" }, - { id: "id6", name: "Book" }, - { id: "id7", name: "Shea" }, - { id: "id8", name: "Snack" }, - { id: "id9", name: "Last" }, - ], - }); - - const resultOne = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { id: "asc" }, - limit: 5, - }); - - expect( - resultOne.items.map((i) => ({ id: i.id, name: i.name })), - ).toMatchObject([ - { id: "id1", name: "Skip" }, - { id: "id2", name: "Foo" }, - { id: "id3", name: "Bar" }, - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston" }, - ]); - expect(resultOne.pageInfo).toMatchObject({ - startCursor: expect.any(String), - endCursor: expect.any(String), - hasPreviousPage: false, - hasNextPage: true, - }); - - const resultTwo = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { id: "asc" }, - after: resultOne.pageInfo.endCursor, - }); - - expect( - resultTwo.items.map((i) => ({ id: i.id, name: i.name })), - ).toMatchObject([ - { id: "id6", name: "Book" }, - { id: "id7", name: "Shea" }, - { id: "id8", name: "Snack" }, - { id: "id9", name: "Last" }, - ]); - expect(resultTwo.pageInfo).toMatchObject({ - startCursor: expect.any(String), - endCursor: expect.any(String), - hasPreviousPage: true, - hasNextPage: false, - }); - - const resultThree = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { id: "asc" }, - before: resultTwo.pageInfo.startCursor, - limit: 2, - }); - - expect( - resultThree.items.map((i) => ({ id: i.id, name: i.name })), - ).toMatchObject([ - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston" }, - ]); - expect(resultThree.pageInfo).toMatchObject({ - startCursor: expect.any(String), - endCursor: expect.any(String), - hasPreviousPage: true, - hasNextPage: true, - }); - - await cleanup(); -}); - -test("findMany() cursor pagination descending", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston", age: 12 }, - ], - }); - - const resultOne = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { name: "desc" }, - limit: 2, - }); - - expect( - resultOne.items.map((i) => ({ id: i.id, name: i.name })), - ).toMatchObject([ - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston" }, - ]); - expect(resultOne.pageInfo).toMatchObject({ - startCursor: expect.any(String), - endCursor: expect.any(String), - hasPreviousPage: false, - hasNextPage: true, - }); - - const resultTwo = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { name: "desc" }, - after: resultOne.pageInfo.endCursor, - }); - - expect( - resultTwo.items.map((i) => ({ id: i.id, name: i.name })), - ).toMatchObject([ - { id: "id1", name: "Skip" }, - { id: "id2", name: "Foo" }, - { id: "id3", name: "Bar" }, - ]); - expect(resultTwo.pageInfo).toMatchObject({ - startCursor: expect.any(String), - endCursor: expect.any(String), - hasPreviousPage: true, - hasNextPage: false, - }); - - const resultThree = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { name: "desc" }, - before: resultTwo.pageInfo.startCursor, - limit: 1, - }); - - expect( - resultThree.items.map((i) => ({ id: i.id, name: i.name })), - ).toMatchObject([{ id: "id5", name: "Winston" }]); - expect(resultThree.pageInfo).toMatchObject({ - startCursor: expect.any(String), - endCursor: expect.any(String), - hasPreviousPage: true, - hasNextPage: true, - }); - - await cleanup(); -}); - -test("findMany() returns start and end cursor if limited", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston", age: 12 }, - ], - }); - - const resultOne = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { name: "asc" }, - }); - - expect( - resultOne.items.map((i) => ({ id: i.id, name: i.name })), - ).toMatchObject([ - { id: "id3", name: "Bar" }, - { id: "id2", name: "Foo" }, - { id: "id1", name: "Skip" }, - { id: "id5", name: "Winston" }, - { id: "id4", name: "Zarbar" }, - ]); - expect(resultOne.pageInfo).toMatchObject({ - startCursor: expect.any(String), - endCursor: expect.any(String), - hasPreviousPage: false, - hasNextPage: false, - }); - - await cleanup(); -}); - -test("findMany() returns hasPreviousPage if no results", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - { id: "id4", name: "Zarbar" }, - { id: "id5", name: "Winston", age: 12 }, - ], - }); - - const resultOne = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { name: "asc" }, - }); - - const resultTwo = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { name: "asc" }, - after: resultOne.pageInfo.endCursor, - }); - - expect(resultTwo.items).toHaveLength(0); - expect(resultTwo.pageInfo).toMatchObject({ - startCursor: null, - endCursor: null, - hasPreviousPage: true, - hasNextPage: false, - }); - - await cleanup(); -}); - -test("findMany() errors on orderBy object with multiple keys", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - expect(() => - indexingStore.findMany({ - tableName: "Pet", - orderBy: { name: "asc", bigAge: "desc" }, - }), - ).rejects.toThrow("Invalid sort. Cannot sort by multiple columns."); - - await cleanup(); -}); - -test("findMany() ordering secondary sort inherits primary", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - { id: "id4", name: "Zarbar", bigAge: 10n }, - ], - }); - - const resultOne = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { bigAge: "desc" }, - }); - - expect(resultOne.items).toMatchObject([ - { id: "id3", name: "Bar", bigAge: 190n }, - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id4", name: "Zarbar", bigAge: 10n }, // secondary sort by ID is descending - { id: "id2", name: "Foo", bigAge: 10n }, - ]); - - const resultTwo = await indexingStore.findMany({ - tableName: "Pet", - orderBy: { bigAge: "asc" }, - }); - - expect(resultTwo.items).toMatchObject([ - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id4", name: "Zarbar", bigAge: 10n }, // secondary sort by ID is ascending - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ]); - - await cleanup(); -}); - -test("findMany() where list", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", list: ["kevin", "kyle", "jay"] }, - { id: "id2", name: "Foo", list: ["widget", "gadget"] }, - ], - }); - - const resultOne = await indexingStore.findMany({ - tableName: "Pet", - where: { list: { has: "kevin" } }, - }); - - expect(resultOne.items).toMatchObject([ - { id: "id1", name: "Skip", list: ["kevin", "kyle", "jay"] }, - ]); - - await cleanup(); -}); - -test("findMany() where hex list", async (context) => { - const hexSchema = createSchema((p) => ({ - table: p.createTable({ - id: p.hex(), - list: p.hex().list(), - }), - })); - - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - }); - - await indexingStore.createMany({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "0x00", list: ["0x0A", "0x0B"] }, - { id: "0x01", list: ["0x0a", "0x0b", "0x0c"] }, - ], - }); - - const resultOne = await indexingStore.findMany({ - tableName: "table", - where: { list: { has: "0x0a" } }, - }); - - expect(resultOne.items).toMatchObject([ - { id: "0x00", list: ["0x0a", "0x0b"] }, - { id: "0x01", list: ["0x0a", "0x0b", "0x0c"] }, - ]); - - const resultTwo = await indexingStore.findMany({ - tableName: "table", - where: { list: { has: "0x0c" } }, - }); - - expect(resultTwo.items).toMatchObject([ - { id: "0x01", list: ["0x0a", "0x0b", "0x0c"] }, - ]); - - await cleanup(); -}); diff --git a/packages/core/src/indexing-store/readonly.ts b/packages/core/src/indexing-store/readonly.ts deleted file mode 100644 index 87a4b4f8c..000000000 --- a/packages/core/src/indexing-store/readonly.ts +++ /dev/null @@ -1,290 +0,0 @@ -import type { Common } from "@/common/common.js"; -import { StoreError } from "@/common/errors.js"; -import type { HeadlessKysely } from "@/database/kysely.js"; -import type { MaterialColumn, Schema, Table } from "@/schema/common.js"; -import type { UserId } from "@/types/schema.js"; -import { sql } from "kysely"; -import type { OrderByInput, ReadonlyStore, WhereInput } from "./store.js"; -import { - buildCursorConditions, - decodeCursor, - encodeCursor, -} from "./utils/cursor.js"; -import { decodeRecord, encodeValue } from "./utils/encoding.js"; -import { buildWhereConditions } from "./utils/filter.js"; -import { - buildOrderByConditions, - reverseOrderByConditions, -} from "./utils/sort.js"; - -const DEFAULT_LIMIT = 50 as const; - -export const getReadonlyStore = ({ - dialect, - schema, - db, - common, -}: { - dialect: "sqlite" | "postgres"; - schema: Schema; - db: HeadlessKysely; - common: Common; -}): ReadonlyStore => ({ - findUnique: async ({ - tableName, - id, - }: { - tableName: string; - id: UserId; - }) => { - const table = (schema[tableName] as { table: Table }).table; - - return db.wrap({ method: `${tableName}.findUnique` }, async () => { - const encodedId = encodeValue({ - value: id, - column: table.id, - dialect, - }); - - const record = await db - .selectFrom(tableName) - .selectAll() - .where("id", "=", encodedId) - .executeTakeFirst(); - - if (record === undefined) return null; - - return decodeRecord({ record, table, dialect }); - }); - }, - findMany: async ({ - tableName, - where, - orderBy, - before = null, - after = null, - limit = DEFAULT_LIMIT, - }: { - tableName: string; - where?: WhereInput; - orderBy?: OrderByInput; - before?: string | null; - after?: string | null; - limit?: number; - }) => { - const table = (schema[tableName] as { table: Table }).table; - - return db.wrap({ method: `${tableName}.findMany` }, async () => { - let query = db.selectFrom(tableName).selectAll(); - - if (where) { - query = query.where((eb) => - buildWhereConditions({ eb, where, table, dialect }), - ); - } - - const orderByConditions = buildOrderByConditions({ orderBy, table }); - for (const [column, direction] of orderByConditions) { - query = query.orderBy( - column, - dialect === "sqlite" - ? direction - : direction === "asc" - ? sql`asc nulls first` - : sql`desc nulls last`, - ); - } - const orderDirection = orderByConditions[0]![1]; - - if (limit > common.options.databaseMaxRowLimit) { - throw new StoreError( - `Invalid limit. Got ${limit}, expected <=${common.options.databaseMaxRowLimit}.`, - ); - } - - if (after !== null && before !== null) { - throw new StoreError("Cannot specify both before and after cursors."); - } - - let startCursor = null; - let endCursor = null; - let hasPreviousPage = false; - let hasNextPage = false; - - // Neither cursors are specified, apply the order conditions and execute. - if (after === null && before === null) { - query = query.limit(limit + 1); - const records = await query - .execute() - .then((records) => - records.map((record) => decodeRecord({ record, table, dialect })), - ); - - if (records.length === limit + 1) { - records.pop(); - hasNextPage = true; - } - - startCursor = - records.length > 0 - ? encodeCursor(records[0]!, orderByConditions) - : null; - endCursor = - records.length > 0 - ? encodeCursor(records[records.length - 1]!, orderByConditions) - : null; - - return { - items: records, - pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor }, - }; - } - - if (after !== null) { - // User specified an 'after' cursor. - const rawCursorValues = decodeCursor(after, orderByConditions); - const cursorValues = rawCursorValues.map(([columnName, value]) => [ - columnName, - encodeValue({ - value, - column: table[columnName] as MaterialColumn, - dialect, - }), - ]) satisfies [string, any][]; - query = query - .where((eb) => - buildCursorConditions(cursorValues, "after", orderDirection, eb), - ) - .limit(limit + 2); - - const records = await query - .execute() - .then((records) => - records.map((record) => decodeRecord({ record, table, dialect })), - ); - - if (records.length === 0) { - return { - items: records, - pageInfo: { - hasNextPage, - hasPreviousPage, - startCursor, - endCursor, - }, - }; - } - - // If the cursor of the first returned record equals the `after` cursor, - // `hasPreviousPage` is true. Remove that record. - if (encodeCursor(records[0]!, orderByConditions) === after) { - records.shift(); - hasPreviousPage = true; - } else { - // Otherwise, remove the last record. - records.pop(); - } - - // Now if the length of the records is still equal to limit + 1, - // there is a next page. - if (records.length === limit + 1) { - records.pop(); - hasNextPage = true; - } - - // Now calculate the cursors. - startCursor = - records.length > 0 - ? encodeCursor(records[0]!, orderByConditions) - : null; - endCursor = - records.length > 0 - ? encodeCursor(records[records.length - 1]!, orderByConditions) - : null; - - return { - items: records, - pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor }, - }; - } else { - // User specified a 'before' cursor. - const rawCursorValues = decodeCursor(before!, orderByConditions); - const cursorValues = rawCursorValues.map(([columnName, value]) => [ - columnName, - encodeValue({ - value, - column: table[columnName] as MaterialColumn, - dialect, - }), - ]) satisfies [string, any][]; - query = query - .where((eb) => - buildCursorConditions(cursorValues, "before", orderDirection, eb), - ) - .limit(limit + 2); - - // Reverse the order by conditions to get the previous page. - query = query.clearOrderBy(); - const reversedOrderByConditions = - reverseOrderByConditions(orderByConditions); - for (const [column, direction] of reversedOrderByConditions) { - query = query.orderBy(column, direction); - } - - const records = await query.execute().then((records) => - records - .map((record) => decodeRecord({ record, table, dialect })) - // Reverse the records again, back to the original order. - .reverse(), - ); - - if (records.length === 0) { - return { - items: records, - pageInfo: { - hasNextPage, - hasPreviousPage, - startCursor, - endCursor, - }, - }; - } - - // If the cursor of the last returned record equals the `before` cursor, - // `hasNextPage` is true. Remove that record. - if ( - encodeCursor(records[records.length - 1]!, orderByConditions) === - before - ) { - records.pop(); - hasNextPage = true; - } else { - // Otherwise, remove the first record. - records.shift(); - } - - // Now if the length of the records is equal to limit + 1, we know - // there is a previous page. - if (records.length === limit + 1) { - records.shift(); - hasPreviousPage = true; - } - - // Now calculate the cursors. - startCursor = - records.length > 0 - ? encodeCursor(records[0]!, orderByConditions) - : null; - endCursor = - records.length > 0 - ? encodeCursor(records[records.length - 1]!, orderByConditions) - : null; - - return { - items: records, - pageInfo: { hasNextPage, hasPreviousPage, startCursor, endCursor }, - }; - } - }); - }, -}); diff --git a/packages/core/src/indexing-store/realtime.test.ts b/packages/core/src/indexing-store/realtime.test.ts deleted file mode 100644 index 9b7d78c9c..000000000 --- a/packages/core/src/indexing-store/realtime.test.ts +++ /dev/null @@ -1,897 +0,0 @@ -import { - setupCommon, - setupDatabaseServices, - setupIsolatedDatabase, -} from "@/_test/setup.js"; -import { - CheckConstraintError, - UniqueConstraintError, -} from "@/common/errors.js"; -import { createSchema } from "@/schema/schema.js"; -import { - type Checkpoint, - encodeCheckpoint, - zeroCheckpoint, -} from "@/utils/checkpoint.js"; -import { beforeEach, expect, test } from "vitest"; - -beforeEach(setupCommon); -beforeEach(setupIsolatedDatabase); - -const schema = createSchema((p) => ({ - PetKind: p.createEnum(["CAT", "DOG"]), - Pet: p.createTable({ - id: p.string(), - name: p.string(), - age: p.int().optional(), - bigAge: p.bigint().optional(), - kind: p.enum("PetKind").optional(), - rating: p.float().optional(), - }), - Person: p.createTable({ - id: p.string(), - name: p.string(), - }), -})); - -const hexSchema = createSchema((p) => ({ - table: p.createTable({ - id: p.hex(), - n: p.int(), - }), -})); - -function createCheckpoint(index: number): Checkpoint { - return { ...zeroCheckpoint, blockTimestamp: index }; -} - -test("create() inserts a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("create() throws on unique constraint violation", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip" }, - }); - - const error = await indexingStore - .create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 13 }, - }) - .catch((_error) => _error); - - expect(error).instanceOf(UniqueConstraintError); - - await cleanup(); -}); - -test("create() respects optional fields", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", kind: "CAT" }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: null }); - - await cleanup(); -}); - -test("create() accepts enums", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", kind: "CAT" }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", kind: "CAT" }); - - await cleanup(); -}); - -test("create() throws on invalid enum value", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - const error = await indexingStore - .create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", kind: "NOTACAT" }, - }) - .catch((error) => error); - - expect(error).toBeInstanceOf(CheckConstraintError); - - await cleanup(); -}); - -test("create() accepts BigInt fields as bigint and returns as bigint", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", bigAge: 100n }); - - await cleanup(); -}); - -test("create() accepts float fields as float and returns as float", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", rating: 1.0 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - - expect(instance).toMatchObject({ id: "id1", name: "Skip", rating: 1.0 }); - - await cleanup(); -}); - -test("create() inserts into the log table", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - indexing: "realtime", - }, - ); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - - const logs = await database.qb.user - .selectFrom("_ponder_reorg__Pet") - .selectAll() - .execute(); - - expect(logs).toMatchObject([ - { - id: "id1", - checkpoint: encodeCheckpoint(createCheckpoint(10)), - operation: 0, - }, - ]); - - await cleanup(); -}); - -test("update() updates a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", bigAge: 100n }); - - await indexingStore.update({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(11)), - id: "id1", - data: { name: "Peanut Butter" }, - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ id: "id1", name: "Peanut Butter" }); - - await cleanup(); -}); - -test("update() updates a record using an update function", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", bigAge: 100n }); - - await indexingStore.update({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(11)), - id: "id1", - data: ({ current }) => ({ - name: `${current.name} and Skipper`, - }), - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ - id: "id1", - name: "Skip and Skipper", - }); - - await cleanup(); -}); - -test("update() inserts into the log table", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - indexing: "realtime", - }, - ); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", bigAge: 100n }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", bigAge: 100n }); - - await indexingStore.update({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(11)), - id: "id1", - data: { name: "Peanut Butter" }, - }); - - const logs = await database.qb.user - .selectFrom("_ponder_reorg__Pet") - .selectAll() - .execute(); - - expect(logs).toHaveLength(2); - expect(logs[1]).toMatchObject({ - id: "id1", - checkpoint: encodeCheckpoint(createCheckpoint(11)), - operation: 1, - }); - - await cleanup(); -}); - -test("upsert() inserts a new record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.upsert({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - create: { name: "Skip", age: 12 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await cleanup(); -}); - -test("upsert() updates a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.upsert({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(12)), - id: "id1", - create: { name: "Skip", age: 24 }, - update: { name: "Jelly" }, - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ id: "id1", name: "Jelly", age: 12 }); - - await cleanup(); -}); - -test("upsert() updates a record using an update function", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.upsert({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(12)), - id: "id1", - create: { name: "Skip", age: 24 }, - update: ({ current }) => ({ - age: (current.age as number) - 5, - }), - }); - - const updatedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(updatedInstance).toMatchObject({ id: "id1", name: "Skip", age: 7 }); - - await cleanup(); -}); - -test("upsert() inserts into the log table", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - indexing: "realtime", - }, - ); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.upsert({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(12)), - id: "id1", - create: { name: "Skip", age: 24 }, - update: { name: "Jelly" }, - }); - - const logs = await database.qb.user - .selectFrom("_ponder_reorg__Pet") - .selectAll() - .execute(); - - expect(logs).toHaveLength(2); - expect(logs[1]).toMatchObject({ - id: "id1", - checkpoint: encodeCheckpoint(createCheckpoint(12)), - operation: 1, - }); - - await cleanup(); -}); - -test("delete() removes a record", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.delete({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(15)), - id: "id1", - }); - - const deletedInstance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(deletedInstance).toBe(null); - - await cleanup(); -}); - -test("delete() inserts into the log table", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - indexing: "realtime", - }, - ); - - await indexingStore.create({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "id1", - data: { name: "Skip", age: 12 }, - }); - const instance = await indexingStore.findUnique({ - tableName: "Pet", - id: "id1", - }); - expect(instance).toMatchObject({ id: "id1", name: "Skip", age: 12 }); - - await indexingStore.delete({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(15)), - id: "id1", - }); - - const logs = await database.qb.user - .selectFrom("_ponder_reorg__Pet") - .selectAll() - .execute(); - - expect(logs).toHaveLength(2); - expect(logs[1]).toMatchObject({ - id: "id1", - checkpoint: encodeCheckpoint(createCheckpoint(15)), - operation: 2, - }); - - await cleanup(); -}); - -test("createMany() inserts multiple entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - const createdItems = await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ], - }); - expect(createdItems.length).toBe(3); - - const { items } = await indexingStore.findMany({ tableName: "Pet" }); - expect(items.length).toBe(3); - - await cleanup(); -}); - -test("createMany() inserts a large number of entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - const RECORD_COUNT = 100_000; - - const createdItems = await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [...Array(RECORD_COUNT).keys()].map((i) => ({ - id: `id${i}`, - name: "Alice", - bigAge: BigInt(i), - })), - }); - expect(createdItems.length).toBe(RECORD_COUNT); - - const { pageInfo } = await indexingStore.findMany({ - tableName: "Pet", - limit: 1_000, - }); - const { items } = await indexingStore.findMany({ - tableName: "Pet", - after: pageInfo.endCursor, - limit: 1_000, - }); - expect(items.length).toBe(1_000); - - await cleanup(); -}); - -test("createMany() inserts into the log table", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - indexing: "realtime", - }, - ); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ], - }); - - const logs = await database.qb.user - .selectFrom("_ponder_reorg__Pet") - .selectAll() - .execute(); - - expect(logs).toHaveLength(3); - expect(logs).toMatchObject([ - { - id: "id1", - checkpoint: encodeCheckpoint(createCheckpoint(10)), - operation: 0, - }, - { - id: "id2", - checkpoint: encodeCheckpoint(createCheckpoint(10)), - operation: 0, - }, - { - id: "id3", - checkpoint: encodeCheckpoint(createCheckpoint(10)), - operation: 0, - }, - ]); - - await cleanup(); -}); - -test("updateMany() updates multiple entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - indexing: "realtime", - }); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ], - }); - - const updateditems = await indexingStore.updateMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(11)), - where: { bigAge: { gt: 50n } }, - data: { bigAge: 300n }, - }); - - expect(updateditems.length).toBe(2); - - const { items } = await indexingStore.findMany({ tableName: "Pet" }); - - expect(items.map((i) => i.bigAge)).toMatchObject([300n, 10n, 300n]); - - await cleanup(); -}); - -test("updateMany() inserts into the log table", async (context) => { - const { indexingStore, database, cleanup } = await setupDatabaseServices( - context, - { - schema, - indexing: "realtime", - }, - ); - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [ - { id: "id1", name: "Skip", bigAge: 105n }, - { id: "id2", name: "Foo", bigAge: 10n }, - { id: "id3", name: "Bar", bigAge: 190n }, - ], - }); - - await indexingStore.updateMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(11)), - where: { bigAge: { gt: 50n } }, - data: { bigAge: 300n }, - }); - - const logs = await database.qb.user - .selectFrom("_ponder_reorg__Pet") - .selectAll() - .execute(); - - expect(logs).toHaveLength(5); - expect(logs[3]).toMatchObject({ - id: "id1", - checkpoint: encodeCheckpoint(createCheckpoint(11)), - operation: 1, - }); - expect(logs[4]).toMatchObject({ - id: "id3", - checkpoint: encodeCheckpoint(createCheckpoint(11)), - operation: 1, - }); - - await cleanup(); -}); - -test("updateMany() updates a large number of entities", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema, - }); - - const RECORD_COUNT = 1_000; - - await indexingStore.createMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - data: [...Array(RECORD_COUNT).keys()].map((i) => ({ - id: `id${i}`, - name: "Alice", - bigAge: BigInt(i), - })), - }); - - const updatedItems = await indexingStore.updateMany({ - tableName: "Pet", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - where: {}, - data: ({ current }) => ({ - bigAge: (current.bigAge as bigint) + 1n, - }), - }); - expect(updatedItems.length).toBe(RECORD_COUNT); - - await cleanup(); -}); - -test("update() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "0x0a", - data: { n: 1 }, - }); - - await indexingStore.update({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "0x0A", - data: { n: 2 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "table", - id: "0x0A", - }); - expect(instance).toMatchObject({ id: "0x0a", n: 2 }); - - await cleanup(); -}); - -test("updateMany() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "0x0a", - data: { n: 1 }, - }); - - await indexingStore.updateMany({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - where: { n: { gt: 0 } }, - data: { n: 2 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "table", - id: "0x0a", - }); - expect(instance).toMatchObject({ id: "0x0a", n: 2 }); - - await cleanup(); -}); - -test("upsert() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "0x0a", - data: { n: 1 }, - }); - - await indexingStore.upsert({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "0xA", - update: { n: 2 }, - }); - - const instance = await indexingStore.findUnique({ - tableName: "table", - id: "0xA", - }); - expect(instance).toMatchObject({ id: "0x0a", n: 2 }); - - await cleanup(); -}); - -test("delete() works with hex case sensitivity", async (context) => { - const { indexingStore, cleanup } = await setupDatabaseServices(context, { - schema: hexSchema, - indexing: "realtime", - }); - - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(10)), - id: "0xa", - data: { n: 1 }, - }); - - await indexingStore.delete({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint(createCheckpoint(25)), - id: "0xA", - }); - - const deletedInstance = await indexingStore.findUnique({ - tableName: "table", - id: "0xa", - }); - - expect(deletedInstance).toBe(null); - - await cleanup(); -}); diff --git a/packages/core/src/indexing-store/realtime.ts b/packages/core/src/indexing-store/realtime.ts deleted file mode 100644 index 406907137..000000000 --- a/packages/core/src/indexing-store/realtime.ts +++ /dev/null @@ -1,469 +0,0 @@ -import type { Common } from "@/common/common.js"; -import type { HeadlessKysely } from "@/database/kysely.js"; -import type { Schema, Table } from "@/schema/common.js"; -import type { - DatabaseRecord, - DatabaseValue, - UserId, - UserRecord, -} from "@/types/schema.js"; -import type { WhereInput, WriteStore } from "./store.js"; -import { decodeRecord, encodeRecord, encodeValue } from "./utils/encoding.js"; -import { parseStoreError } from "./utils/errors.js"; -import { buildWhereConditions } from "./utils/filter.js"; - -export const getRealtimeStore = ({ - dialect, - schema, - db, - common, -}: { - dialect: "sqlite" | "postgres"; - schema: Schema; - db: HeadlessKysely; - common: Common; -}): WriteStore<"realtime"> => ({ - create: ({ - tableName, - encodedCheckpoint, - id, - data = {}, - }: { - tableName: string; - encodedCheckpoint: string; - id: UserId; - data?: Omit; - }) => { - const table = (schema[tableName] as { table: Table }).table; - - return db.wrap({ method: `${tableName}.create` }, async () => { - const createRecord = encodeRecord({ - record: { id, ...data }, - table, - dialect, - schema, - skipValidation: false, - }); - - return await db.transaction().execute(async (tx) => { - const record = await tx - .insertInto(tableName) - .values(createRecord) - .returningAll() - .executeTakeFirstOrThrow() - .catch((err) => { - throw parseStoreError(err, { id, ...data }); - }); - - await tx - .insertInto(`_ponder_reorg__${tableName}`) - .values({ - operation: 0, - id: createRecord.id, - checkpoint: encodedCheckpoint, - }) - .execute(); - - return decodeRecord({ record: record, table, dialect }); - }); - }); - }, - createMany: ({ - tableName, - encodedCheckpoint, - data, - }: { - tableName: string; - encodedCheckpoint: string; - data: UserRecord[]; - }) => { - const table = (schema[tableName] as { table: Table }).table; - - return db.wrap({ method: `${tableName}.createMany` }, async () => { - const records: DatabaseRecord[] = []; - await db.transaction().execute(async (tx) => { - const batchSize = Math.round( - common.options.databaseMaxQueryParameters / Object.keys(table).length, - ); - for (let i = 0, len = data.length; i < len; i += batchSize) { - const createRecords = data.slice(i, i + batchSize).map((d) => - encodeRecord({ - record: d, - table, - dialect, - schema, - skipValidation: false, - }), - ); - - const _records = await tx - .insertInto(tableName) - .values(createRecords) - .returningAll() - .execute() - .catch((err) => { - throw parseStoreError(err, data.length > 0 ? data[0]! : {}); - }); - - records.push(..._records); - - await tx - .insertInto(`_ponder_reorg__${tableName}`) - .values( - createRecords.map((record) => ({ - operation: 0, - id: record.id, - checkpoint: encodedCheckpoint, - })), - ) - .execute(); - } - }); - - return records.map((record) => decodeRecord({ record, table, dialect })); - }); - }, - update: ({ - tableName, - encodedCheckpoint, - id, - data = {}, - }: { - tableName: string; - encodedCheckpoint: string; - id: UserId; - data?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - }) => { - const table = (schema[tableName] as { table: Table }).table; - - return db.wrap({ method: `${tableName}.update` }, async () => { - const encodedId = encodeValue({ value: id, column: table.id, dialect }); - - const record = await db.transaction().execute(async (tx) => { - const latestRecord = await tx - .selectFrom(tableName) - .selectAll() - .where("id", "=", encodedId) - .executeTakeFirstOrThrow() - .catch((err) => { - throw parseStoreError(err, { id, data: "(function)" }); - }); - - const updateObject = - typeof data === "function" - ? data({ - current: decodeRecord({ - record: latestRecord, - table, - dialect, - }), - }) - : data; - const updateRecord = encodeRecord({ - record: { id, ...updateObject }, - table, - dialect, - schema, - skipValidation: false, - }); - - const updateResult = await tx - .updateTable(tableName) - .set(updateRecord) - .where("id", "=", encodedId) - .returningAll() - .executeTakeFirstOrThrow() - .catch((err) => { - throw parseStoreError(err, { id, ...updateObject }); - }); - - await tx - .insertInto(`_ponder_reorg__${tableName}`) - .values({ - operation: 1, - checkpoint: encodedCheckpoint, - ...latestRecord, - }) - .execute(); - - return updateResult; - }); - - const result = decodeRecord({ record: record, table, dialect }); - - return result; - }); - }, - updateMany: async ({ - tableName, - encodedCheckpoint, - where, - data = {}, - }: { - tableName: string; - encodedCheckpoint: string; - where: WhereInput; - data?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - }) => { - const table = (schema[tableName] as { table: Table }).table; - - const records: UserRecord[] = []; - let cursor: DatabaseValue = null; - - while (true) { - const _records = await db.wrap( - { method: `${tableName}.updateMany` }, - () => - db.transaction().execute(async (tx) => { - const latestRecords: DatabaseRecord[] = await tx - .selectFrom(tableName) - .selectAll() - .where((eb) => - buildWhereConditions({ - eb, - where, - table, - dialect, - }), - ) - .orderBy("id", "asc") - .limit(common.options.databaseMaxRowLimit) - .$if(cursor !== null, (qb) => qb.where("id", ">", cursor)) - .execute(); - - const records: DatabaseRecord[] = []; - - for (const latestRecord of latestRecords) { - const updateObject = - typeof data === "function" - ? data({ - current: decodeRecord({ - record: latestRecord, - table, - dialect, - }), - }) - : data; - - // Here, `latestRecord` is already encoded, so we need to exclude it from `encodeRecord`. - const updateRecord = { - id: latestRecord.id, - ...encodeRecord({ - record: updateObject, - table, - dialect, - schema, - skipValidation: false, - }), - }; - - const record = await tx - .updateTable(tableName) - .set(updateRecord) - .where("id", "=", latestRecord.id) - .returningAll() - .executeTakeFirstOrThrow() - .catch((err) => { - throw parseStoreError(err, updateObject); - }); - - records.push(record); - - await tx - .insertInto(`_ponder_reorg__${tableName}`) - .values({ - operation: 1, - checkpoint: encodedCheckpoint, - ...latestRecord, - }) - .execute(); - } - - return records.map((record) => - decodeRecord({ record, table, dialect }), - ); - }), - ); - - records.push(..._records); - - if (_records.length === 0) { - break; - } else { - cursor = encodeValue({ - value: _records[_records.length - 1]!.id, - column: table.id, - dialect, - }); - } - } - - return records; - }, - upsert: ({ - tableName, - encodedCheckpoint, - id, - create = {}, - update = {}, - }: { - tableName: string; - encodedCheckpoint: string; - id: UserId; - create?: Omit; - update?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - }) => { - const table = (schema[tableName] as { table: Table }).table; - - return db.wrap({ method: `${tableName}.upsert` }, async () => { - const encodedId = encodeValue({ value: id, column: table.id, dialect }); - const createRecord = encodeRecord({ - record: { id, ...create }, - table, - dialect, - schema, - skipValidation: false, - }); - - const record = await db.transaction().execute(async (tx) => { - // Find the latest version of this instance. - const latestRecord = await tx - .selectFrom(tableName) - .selectAll() - .where("id", "=", encodedId) - .executeTakeFirst(); - - // If there is no latest version, insert a new version using the create data. - if (latestRecord === undefined) { - const record = await tx - .insertInto(tableName) - .values(createRecord) - .returningAll() - .executeTakeFirstOrThrow() - .catch((err) => { - const prettyObject: any = { id }; - for (const [key, value] of Object.entries(create)) - prettyObject[`create.${key}`] = value; - if (typeof update === "function") { - prettyObject.update = "(function)"; - } else { - for (const [key, value] of Object.entries(update)) - prettyObject[`update.${key}`] = value; - } - throw parseStoreError(err, prettyObject); - }); - - await tx - .insertInto(`_ponder_reorg__${tableName}`) - .values({ - operation: 0, - id: createRecord.id, - checkpoint: encodedCheckpoint, - }) - .execute(); - - return record; - } - - const updateObject = - typeof update === "function" - ? update({ - current: decodeRecord({ - record: latestRecord, - table, - dialect, - }), - }) - : update; - const updateRecord = encodeRecord({ - record: { id, ...updateObject }, - table, - dialect, - schema, - skipValidation: false, - }); - - const record = await tx - .updateTable(tableName) - .set(updateRecord) - .where("id", "=", encodedId) - .returningAll() - .executeTakeFirstOrThrow() - .catch((err) => { - const prettyObject: any = { id }; - for (const [key, value] of Object.entries(create)) - prettyObject[`create.${key}`] = value; - for (const [key, value] of Object.entries(updateObject)) - prettyObject[`update.${key}`] = value; - throw parseStoreError(err, prettyObject); - }); - - await tx - .insertInto(`_ponder_reorg__${tableName}`) - .values({ - operation: 1, - checkpoint: encodedCheckpoint, - ...latestRecord, - }) - .execute(); - - return record; - }); - - return decodeRecord({ record, table, dialect }); - }); - }, - delete: ({ - tableName, - encodedCheckpoint, - id, - }: { - tableName: string; - encodedCheckpoint: string; - id: UserId; - }) => { - const table = (schema[tableName] as { table: Table }).table; - - return db.wrap({ method: `${tableName}.delete` }, async () => { - const encodedId = encodeValue({ value: id, column: table.id, dialect }); - - const isDeleted = await db.transaction().execute(async (tx) => { - const record = await tx - .selectFrom(tableName) - .selectAll() - .where("id", "=", encodedId) - .executeTakeFirst(); - - const deletedRecord = await tx - .deleteFrom(tableName) - .where("id", "=", encodedId) - .returning(["id"]) - .executeTakeFirst() - .catch((err) => { - throw parseStoreError(err, { id }); - }); - - if (record !== undefined) { - await tx - .insertInto(`_ponder_reorg__${tableName}`) - .values({ - operation: 2, - checkpoint: encodedCheckpoint, - ...record, - }) - .execute(); - } - - return !!deletedRecord; - }); - - return isDeleted; - }); - }, -}); diff --git a/packages/core/src/indexing-store/store.bench.ts b/packages/core/src/indexing-store/store.bench.ts deleted file mode 100644 index 9c839df89..000000000 --- a/packages/core/src/indexing-store/store.bench.ts +++ /dev/null @@ -1,178 +0,0 @@ -import { - setupCommon, - setupDatabaseServices, - setupIsolatedDatabase, -} from "@/_test/setup.js"; -import { createSchema } from "@/schema/schema.js"; -import { encodeCheckpoint, zeroCheckpoint } from "@/utils/checkpoint.js"; -import { range } from "@/utils/range.js"; -import { type TestContext, bench } from "vitest"; -import type { IndexingStore } from "./store.js"; - -let context: TestContext; -let indexingStore: IndexingStore; -let cleanup: () => Promise; - -let count = 50_000; - -const schema = createSchema((p) => ({ - table: p.createTable({ - id: p.string(), - name: p.string(), - bigAge: p.bigint(), - }), -})); - -const setup = async () => { - context = {} as TestContext; - - setupCommon(context); - const cleanupDatabase = await setupIsolatedDatabase(context); - const { indexingStore: indexingStore_, cleanup: cleanupIndexingStore } = - await setupDatabaseServices(context, { - schema, - }); - - indexingStore = indexingStore_; - cleanup = async () => { - await cleanupIndexingStore(); - await cleanupDatabase(); - }; - - await indexingStore.createMany({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint({ - ...zeroCheckpoint, - blockTimestamp: count, - }), - data: range(0, count).map((i) => ({ - id: `${i}`, - name: "Kevin", - bigAge: 22n, - })), - }); -}; - -const teardown = async () => { - await cleanup(); -}; - -bench( - "create", - async () => { - await indexingStore.create({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint({ - ...zeroCheckpoint, - blockTimestamp: count, - }), - id: (count++).toString(), - data: { name: "Kyle", bigAge: 10n }, - }); - }, - { setup, teardown }, -); - -bench( - "update", - async () => { - await indexingStore.update({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint({ - ...zeroCheckpoint, - blockTimestamp: count, - }), - id: "500", - data: { name: "Kyle" }, - }); - }, - { setup, teardown }, -); - -bench( - "upsert", - async () => { - await indexingStore.upsert({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint({ - ...zeroCheckpoint, - blockTimestamp: count, - }), - id: (count++).toString(), - create: { name: "Kyle", bigAge: 23n }, - update: { name: "Kyle" }, - }); - }, - { setup, teardown }, -); - -bench( - "delete", - async () => { - await indexingStore.delete({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint({ - ...zeroCheckpoint, - blockTimestamp: count, - }), - id: (count--).toString(), - }); - }, - { setup, teardown }, -); - -bench( - "findUnique", - async () => { - await indexingStore.findUnique({ - tableName: "table", - id: "500", - }); - }, - { setup, teardown }, -); - -bench( - "findMany", - async () => { - await indexingStore.findMany({ - tableName: "table", - }); - }, - { setup, teardown }, -); - -bench( - "createMany", - async () => { - await indexingStore.createMany({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint({ - ...zeroCheckpoint, - blockTimestamp: count, - }), - data: [ - { id: (count++).toString(), name: "Kevin", bigAge: 22n }, - { id: (count++).toString(), name: "Kevin", bigAge: 22n }, - { id: (count++).toString(), name: "Kevin", bigAge: 22n }, - ], - }); - }, - { setup, teardown }, -); - -bench( - "updateMany", - async () => { - await indexingStore.updateMany({ - tableName: "table", - encodedCheckpoint: encodeCheckpoint({ - ...zeroCheckpoint, - blockTimestamp: count, - }), - data: { name: "Kevin", bigAge: 22n }, - where: { id: { equals: "500" } }, - }); - }, - { setup, teardown }, -); diff --git a/packages/core/src/indexing-store/store.ts b/packages/core/src/indexing-store/store.ts deleted file mode 100644 index 0bc54e6b5..000000000 --- a/packages/core/src/indexing-store/store.ts +++ /dev/null @@ -1,156 +0,0 @@ -import type { Status } from "@/sync/index.js"; -import type { - UserId, - UserRecord, - UserTable, - UserValue, -} from "@/types/schema.js"; -import type { Prettify } from "@/types/utils.js"; -import type { Hex } from "viem"; - -export type ReadonlyStore = { - findUnique(options: { - tableName: string; - id: UserId; - }): Promise; - - findMany(options: { - tableName: string; - where?: WhereInput; - orderBy?: OrderByInput; - before?: string | null; - after?: string | null; - limit?: number; - }): Promise<{ - items: UserRecord[]; - pageInfo: { - startCursor: string | null; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - }; - }>; -}; - -export type WriteStore< - env extends "historical" | "realtime", - /// - checkpointProp = env extends "realtime" - ? { encodedCheckpoint: string } - : { encodedCheckpoint?: never }, -> = { - create( - options: { - tableName: string; - id: UserId; - data?: Omit; - } & checkpointProp, - ): Promise; - - createMany( - options: { - tableName: string; - data: UserRecord[]; - } & checkpointProp, - ): Promise; - - update( - options: { - tableName: string; - id: UserId; - data?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - } & checkpointProp, - ): Promise; - - updateMany( - options: { - tableName: string; - where?: WhereInput; - data?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - } & checkpointProp, - ): Promise; - - upsert( - options: { - tableName: string; - id: UserId; - create?: Omit; - update?: - | Partial> - | ((args: { current: UserRecord }) => Partial>); - } & checkpointProp, - ): Promise; - - delete( - options: { - tableName: string; - id: UserId; - } & checkpointProp, - ): Promise; -}; - -export type RealtimeStore = ReadonlyStore & WriteStore<"realtime">; - -export type HistoricalStore = ReadonlyStore & - WriteStore<"historical"> & { - flush: (arg: { isFullFlush: boolean }) => Promise; - }; - -export type MetadataStore = { - setStatus: (status: Status) => Promise; - getStatus: () => Promise; -}; - -export type IndexingStore< - env extends "historical" | "realtime" = "historical" | "realtime", -> = ReadonlyStore & WriteStore; - -type OperatorMap = { - equals?: column; - not?: column; -} & (column extends unknown[] - ? { - has?: column[number]; - notHas?: column[number]; - } - : { - in?: column[]; - notIn?: column[]; - }) & - (column extends string - ? column extends Hex - ? {} - : { - contains?: column; - notContains?: column; - startsWith?: column; - notStartsWith?: column; - endsWith?: column; - notEndsWith?: column; - } - : {}) & - (column extends number | bigint | Hex - ? { - gt?: column; - gte?: column; - lt?: column; - lte?: column; - } - : {}); - -export type WhereInput
= { - [columnName in keyof table]?: - | Prettify> - | table[columnName]; -} & { - AND?: Prettify>[]; - OR?: Prettify>[]; -}; - -export type OrderByInput = { - [ColumnName in columns]?: "asc" | "desc"; -}; diff --git a/packages/core/src/indexing-store/utils/cursor.test.ts b/packages/core/src/indexing-store/utils/cursor.test.ts deleted file mode 100644 index 996affff4..000000000 --- a/packages/core/src/indexing-store/utils/cursor.test.ts +++ /dev/null @@ -1,113 +0,0 @@ -import { createSchema } from "@/schema/schema.js"; -import { expect, test } from "vitest"; -import { decodeCursor, encodeCursor } from "./cursor.js"; -import { buildOrderByConditions } from "./sort.js"; - -const schema = createSchema((p) => ({ - PetKind: p.createEnum(["CAT", "DOG"]), - Pet: p.createTable({ - id: p.string(), - names: p.string().list(), - age: p.int().optional(), - bigAge: p.bigint().optional(), - bigAges: p.bigint().list(), - kind: p.enum("PetKind").optional(), - personId: p.bigint().references("Person.id"), - person: p.one("personId"), - }), - Person: p.createTable({ - id: p.bigint(), - }), -})); - -test("cursor encoding handles default order by condition", () => { - const orderByConditions = buildOrderByConditions({ - orderBy: { id: "asc" }, - table: schema.Pet.table, - }); - - const record = { id: "abc" }; - - const decoded = decodeCursor( - encodeCursor(record, orderByConditions), - orderByConditions, - ); - - expect(decoded).toEqual([["id", "abc"]]); -}); - -test("cursor encoding handles custom order by condition", () => { - const orderByConditions = buildOrderByConditions({ - orderBy: { age: "desc" }, - table: schema.Pet.table, - }); - - const record = { id: "abc", age: 10 }; - - const decoded = decodeCursor( - encodeCursor(record, orderByConditions), - orderByConditions, - ); - - expect(decoded).toEqual([ - ["age", 10], - ["id", "abc"], - ]); -}); - -test("cursor encoding handles null values", () => { - const orderByConditions = buildOrderByConditions({ - orderBy: { age: "desc" }, - table: schema.Pet.table, - }); - - const record = { id: "abc", age: null }; - - const decoded = decodeCursor( - encodeCursor(record, orderByConditions), - orderByConditions, - ); - - expect(decoded).toEqual([ - ["age", null], - ["id", "abc"], - ]); -}); - -test("cursor encoding handles bigint values", () => { - const orderByConditions = buildOrderByConditions({ - orderBy: { bigAge: "desc" }, - table: schema.Pet.table, - }); - - const record = { id: "abc", bigAge: 20n }; - - const decoded = decodeCursor( - encodeCursor(record, orderByConditions), - orderByConditions, - ); - - expect(decoded).toEqual([ - ["bigAge", 20n], - ["id", "abc"], - ]); -}); - -test("cursor encoding handles bigint list values", () => { - const orderByConditions = buildOrderByConditions({ - orderBy: { bigAges: "desc" }, - table: schema.Pet.table, - }); - - const record = { id: "abc", bigAges: [20n, -12n] }; - - const decoded = decodeCursor( - encodeCursor(record, orderByConditions), - orderByConditions, - ); - - expect(decoded).toEqual([ - ["bigAges", [20n, -12n]], - ["id", "abc"], - ]); -}); diff --git a/packages/core/src/indexing-store/utils/cursor.ts b/packages/core/src/indexing-store/utils/cursor.ts deleted file mode 100644 index 199ac304d..000000000 --- a/packages/core/src/indexing-store/utils/cursor.ts +++ /dev/null @@ -1,82 +0,0 @@ -import { StoreError } from "@/common/errors.js"; -import type { UserRecord } from "@/types/schema.js"; -import { deserialize, serialize } from "@/utils/serialize.js"; -import type { ExpressionBuilder } from "kysely"; -import type { OrderByConditions } from "./sort.js"; - -export function encodeCursor( - record: UserRecord, - orderByConditions: OrderByConditions, -) { - const cursorValues = orderByConditions.map(([columnName]) => [ - columnName, - record[columnName], - ]); - - return Buffer.from(serialize(cursorValues)).toString("base64"); -} - -export function decodeCursor( - cursor: string, - orderByConditions: OrderByConditions, -) { - const cursorValues = deserialize<[string, any][]>( - Buffer.from(cursor, "base64").toString(), - ); - - // Validate cursor values against order by conditions. - if (cursorValues.length !== orderByConditions.length) { - throw new StoreError( - `Invalid cursor. Got ${cursorValues.length}, ${orderByConditions.length} conditions`, - ); - } - - for (const [index, [columnName]] of orderByConditions.entries()) { - if (cursorValues[index]![0] !== columnName) { - throw new StoreError( - `Invalid cursor. Got column '${ - cursorValues[index]![0] - }' at index ${index}, expected '${columnName}'.`, - ); - } - } - - return cursorValues; -} - -export function buildCursorConditions( - cursorValues: [string, any][], - kind: "after" | "before", - direction: "asc" | "desc", - eb: ExpressionBuilder, -) { - const comparator = - kind === "after" - ? direction === "asc" - ? ">" // after, asc - : "<" // after, desc - : direction === "asc" - ? "<" // before, asc - : ">"; // before, desc - const comparatorOrEquals = `${comparator}=` as const; - - if (cursorValues.length === 1) { - const [columnName, value] = cursorValues[0]!; - return eb.eb(columnName, comparatorOrEquals, value); - } else if (cursorValues.length === 2) { - const [columnName1, value1] = cursorValues[0]!; - const [columnName2, value2] = cursorValues[1]!; - - return eb.or([ - eb.eb(columnName1, comparator, value1), - eb.and([ - eb.eb(columnName1, "=", value1), - eb.eb(columnName2, comparatorOrEquals, value2), - ]), - ]); - } else { - throw new StoreError( - `Invalid cursor. Got ${cursorValues.length} value pairs, expected 1 or 2.`, - ); - } -} diff --git a/packages/core/src/indexing-store/utils/encoding.ts b/packages/core/src/indexing-store/utils/encoding.ts deleted file mode 100644 index 62fe22157..000000000 --- a/packages/core/src/indexing-store/utils/encoding.ts +++ /dev/null @@ -1,397 +0,0 @@ -import { - BigIntSerializationError, - CheckConstraintError, - NotNullConstraintError, - StoreError, -} from "@/common/errors.js"; -import type { - Column, - EnumColumn, - JSONColumn, - MaterialColumn, - ReferenceColumn, - Scalar, - ScalarColumn, - Schema, - Table, -} from "@/schema/common.js"; -import { - getEnums, - isEnumColumn, - isJSONColumn, - isListColumn, - isManyColumn, - isMaterialColumn, - isOptionalColumn, - isReferenceColumn, - isScalarColumn, -} from "@/schema/utils.js"; -import type { - DatabaseRecord, - DatabaseValue, - UserRecord, - UserValue, -} from "@/types/schema.js"; -import { decodeToBigInt, encodeAsText } from "@/utils/encoding.js"; -import { never } from "@/utils/never.js"; -import { type Hex, bytesToHex, hexToBytes, isHex } from "viem"; - -const scalarToTsType = { - int: "number", - float: "number", - bigint: "bigint", - boolean: "boolean", - string: "string", - hex: "`0x${string}`", -} as const satisfies { [key in Scalar]: string }; - -/** - * Convert a user-land record into a database-ready object. - */ -export function encodeRecord({ - record, - table, - schema, - dialect, - skipValidation, -}: { - record: Partial; - table: Table; - schema: Schema; - dialect: "sqlite" | "postgres"; - skipValidation: boolean; -}): DatabaseRecord { - const instance: DatabaseRecord = {}; - - if (skipValidation === false) validateRecord({ record, table, schema }); - - // user data is considered to be valid at this point - for (const [columnName, value] of Object.entries(record)) { - const column = table[columnName] as MaterialColumn; - - instance[columnName] = encodeValue({ - value, - column, - dialect, - }); - } - - return instance; -} - -/** - * Convert a user-land value into a database-ready value. - */ -export function encodeValue( - { - value, - column, - dialect, - }: { - value: UserValue; - column: MaterialColumn; - dialect: "sqlite" | "postgres"; - }, - // @ts-ignore -): DatabaseValue { - switch (column[" type"]) { - case "enum": { - if (isOptionalColumn(column) && (value === undefined || value === null)) { - return null; - } - - if (isListColumn(column)) { - return JSON.stringify(value); - } - - return value as string; - } - - case "json": { - if (dialect === "postgres") return value as Object; - return JSON.stringify(value); - } - - case "reference": - case "scalar": { - if (isOptionalColumn(column) && (value === undefined || value === null)) { - return null; - } - - if (isListColumn(column)) { - if (column[" scalar"] === "bigint") { - return JSON.stringify((value as bigint[]).map(String)); - } else if (column[" scalar"] === "hex") { - return JSON.stringify( - (value as string[]).map((v) => (v as string).toLowerCase()), - ); - } else { - return JSON.stringify(value); - } - } - - switch (column[" scalar"]) { - case "string": - case "int": - case "float": - return value as DatabaseValue; - case "hex": - return Buffer.from(hexToBytes(value as Hex)); - case "bigint": - return dialect === "sqlite" - ? encodeAsText(value as bigint) - : (value as bigint); - case "boolean": - return value ? 1 : 0; - - default: - never(column[" scalar"]); - } - - break; - } - - default: - never(column); - } -} - -export function validateRecord({ - record, - table, - schema, -}: { - record: Partial; - table: Table; - schema: Schema; -}): void { - for (const [columnName, value] of Object.entries(record)) { - const column = table[columnName]; - if (!column) { - throw new StoreError( - `Invalid record: Column does not exist. Got ${columnName}, expected one of [${Object.keys( - table, - ) - .filter( - (column) => - isScalarColumn(table[column]!) || - isReferenceColumn(table[column]!) || - isEnumColumn(table[column]!) || - isJSONColumn(table[column]!), - ) - .join(", ")}]`, - ); - } - - validateValue({ value, column, schema }); - } -} - -function validateValue({ - value, - column, - schema, -}: { - value: UserValue; - column: Column; - schema: Schema; -}): void { - switch (column[" type"]) { - case "enum": { - if (isOptionalColumn(column) && (value === undefined || value === null)) { - break; - } - - if (isListColumn(column)) { - if (!Array.isArray(value)) { - throw new StoreError( - `Unable to encode ${value} as a list. Got type '${typeof value}' but expected type 'string[]'.`, - ); - } - } else if (typeof value !== "string") { - throw new StoreError( - `Unable to encode ${value} as an enum. Got type '${typeof value}' but expected type 'string'.`, - ); - } else { - if (getEnums(schema)[column[" enum"]]!.includes(value) === false) { - throw new CheckConstraintError( - `Unable to encode ${value} as a '${ - column[" enum"] - }' enum. Got '${value}' but expected one of [${getEnums(schema)[ - column[" enum"] - ]!.join(", ")}].`, - ); - } - } - - break; - } - - case "json": { - try { - JSON.stringify(value); - } catch (_error) { - const error = new BigIntSerializationError( - (_error as TypeError).message, - ); - error.meta.push( - "Hint:\n The JSON column type does not support BigInt values. Use the replaceBigInts() helper function before inserting into the database. Docs: https://ponder.sh/docs/utilities/replace-bigints", - ); - throw error; - } - - break; - } - - case "reference": - case "scalar": { - if (value === undefined || value === null) { - if (isOptionalColumn(column)) break; - const error = new NotNullConstraintError( - `Unable to encode ${value} as a ${ - column[" scalar"] - }. Got '${typeof value}' but expected type '${scalarToTsType[column[" scalar"]]}'.`, - ); - error.meta.push( - "Hint:\n Use the .optional() modifier to allow for null or undefined values.", - ); - throw error; - } - - if (isListColumn(column)) { - // Note: We are not checking the types of the list elements. - if (!Array.isArray(value)) { - throw new StoreError( - `Unable to encode ${value} as a list. Got type '${typeof value}' but expected type '${ - scalarToTsType[column[" scalar"]] - }[]'.`, - ); - } - - break; - } - - switch (column[" scalar"]) { - case "string": { - if (typeof value !== "string") { - throw new StoreError( - `Unable to encode ${value} as a string. Got type '${typeof value}' but expected type 'string'.`, - ); - } - break; - } - case "hex": { - if (typeof value !== "string" || !isHex(value)) { - throw new StoreError( - `Unable to encode ${value} as a hex. Got type '${typeof value}' but expected type '\`0x\${string}\`'.`, - ); - } - break; - } - - case "int": - case "float": { - if (typeof value !== "number") { - throw new StoreError( - `Unable to encode ${value} as an ${ - column[" scalar"] - }. Got type '${typeof value}' but expected type 'number'.`, - ); - } - break; - } - - case "bigint": { - if (typeof value !== "bigint") { - throw new StoreError( - `Unable to encode ${value} as a bigint. Got type '${typeof value}' but expected type 'bigint'.`, - ); - } - break; - } - - case "boolean": { - if (typeof value !== "boolean") { - throw new StoreError( - `Unable to encode ${value} as a boolean. Got type '${typeof value}' but expected type 'boolean'.`, - ); - } - break; - } - - default: - never(column[" scalar"]); - } - - break; - } - - case "one": - case "many": { - throw new StoreError( - `Unable to encode ${value} into a "${isManyColumn(column) ? "many" : "one"}" column. "${ - isManyColumn(column) ? "many" : "one" - }" columns are virtual and therefore should not be given a value.`, - ); - } - - default: - never(column); - } -} - -export function decodeRecord({ - record, - table, - dialect, -}: { - record: DatabaseRecord; - table: Table; - dialect: "sqlite" | "postgres"; -}): UserRecord { - const instance = {} as UserRecord; - - for (const [columnName, column] of Object.entries(table)) { - if (isMaterialColumn(column)) { - instance[columnName] = decodeValue({ - value: record[columnName]!, - column, - dialect, - }); - } - } - - return instance; -} - -function decodeValue({ - value, - column, - dialect, -}: { - value: DatabaseValue; - column: ScalarColumn | ReferenceColumn | EnumColumn | JSONColumn; - dialect: "sqlite" | "postgres"; -}): UserValue { - if (value === null) return null; - else if (isEnumColumn(column)) { - if (isListColumn(column)) { - return JSON.parse(value as string); - } - return value as UserValue; - } else if (isJSONColumn(column)) { - return dialect === "postgres" ? value : JSON.parse(value as string); - } else if (isListColumn(column)) { - return column[" scalar"] === "bigint" - ? JSON.parse(value as string).map(BigInt) - : JSON.parse(value as string); - } else if (column[" scalar"] === "boolean") { - return value === 1; - } else if (column[" scalar"] === "hex") { - return bytesToHex(value as Buffer); - } else if (column[" scalar"] === "bigint" && dialect === "sqlite") { - return decodeToBigInt(value as string); - } else { - return value as UserValue; - } -} diff --git a/packages/core/src/indexing-store/utils/errors.ts b/packages/core/src/indexing-store/utils/errors.ts deleted file mode 100644 index f4e334f0c..000000000 --- a/packages/core/src/indexing-store/utils/errors.ts +++ /dev/null @@ -1,46 +0,0 @@ -import { - BigIntSerializationError, - CheckConstraintError, - NotNullConstraintError, - RecordNotFoundError, - UniqueConstraintError, - getBaseError, -} from "@/common/errors.js"; -import { prettyPrint } from "@/utils/print.js"; - -export function parseStoreError(err: unknown, args: Record) { - let error = getBaseError(err); - - if (error.message?.includes("no result")) { - error = new RecordNotFoundError( - "No existing record was found with the specified ID", - ); - } else if ( - error.message?.includes("UNIQUE constraint failed") || - error.message?.includes("violates unique constraint") - ) { - error = new UniqueConstraintError(error.message); - error.meta.push( - "Hints:\n Did you forget to await the promise returned by a store method?\n Did you mean to do an upsert?", - ); - } else if ( - error.message?.includes("NOT NULL constraint failed") || - error.message?.includes("violates not-null constraint") - ) { - error = new NotNullConstraintError(error.message); - } else if ( - error.message?.includes("CHECK constraint failed") || - error.message?.includes("violates check constraint") - ) { - error = new CheckConstraintError(error.message); - } else if (error.message?.includes("Do not know how to serialize a BigInt")) { - error = new BigIntSerializationError(error.message); - error.meta.push( - "Hint:\n The JSON column type does not support BigInt values. Use the replaceBigInts() helper function before inserting into the database. Docs: https://ponder.sh/docs/utilities/replace-bigints", - ); - } - - error.meta.push(`Store method arguments:\n${prettyPrint(args)}`); - - return error; -} diff --git a/packages/core/src/indexing-store/utils/filter.test.ts b/packages/core/src/indexing-store/utils/filter.test.ts deleted file mode 100644 index 92a056e2f..000000000 --- a/packages/core/src/indexing-store/utils/filter.test.ts +++ /dev/null @@ -1,208 +0,0 @@ -import { createSchema } from "@/schema/schema.js"; -import type { ExpressionBuilder } from "kysely"; -import { expect, test } from "vitest"; -import { buildWhereConditions } from "./filter.js"; - -const schema = createSchema((p) => ({ - PetKind: p.createEnum(["CAT", "DOG"]), - Pet: p.createTable({ - id: p.string(), - names: p.string().list(), - age: p.int().optional(), - bigAge: p.bigint().optional(), - kind: p.enum("PetKind").optional(), - personId: p.bigint().references("Person.id"), - person: p.one("personId"), - }), - Person: p.createTable({ - id: p.bigint(), - }), -})); - -const buildMockEb = () => { - return { - eb: (...args: any[]) => args, - and: (...args: any[]) => ({ and: args[0] }), - or: (...args: any[]) => ({ or: args[0] }), - } as unknown as ExpressionBuilder; -}; - -test("buildWhereConditions handles equals shortcut", () => { - const conditions = buildWhereConditions({ - eb: buildMockEb(), - where: { id: "abc" }, - table: schema.Pet.table, - dialect: "sqlite", - }); - - expect(conditions).toEqual({ - and: [["id", "=", "abc"]], - }); -}); - -test("buildWhereConditions handles not", () => { - const conditions = buildWhereConditions({ - eb: buildMockEb(), - where: { id: { not: "abc" } }, - table: schema.Pet.table, - dialect: "sqlite", - }); - - expect(conditions).toEqual({ - and: [["id", "!=", "abc"]], - }); -}); - -test("buildWhereConditions handles multiple conditions for one column", () => { - const conditions = buildWhereConditions({ - eb: buildMockEb(), - where: { id: { contains: "abc", notStartsWith: "z" } }, - table: schema.Pet.table, - dialect: "sqlite", - }); - - expect(conditions).toEqual({ - and: [ - ["id", "like", "%abc%"], - ["id", "not like", "z%"], - ], - }); -}); - -test("buildWhereConditions uses specified encoding", () => { - const conditionsSqlite = buildWhereConditions({ - eb: buildMockEb(), - where: { bigAge: { lt: 10n } }, - table: schema.Pet.table, - dialect: "sqlite", - }); - - expect(conditionsSqlite).toEqual({ - and: [ - [ - "bigAge", - "<", - "0000000000000000000000000000000000000000000000000000000000000000000000000000010", - ], - ], - }); - - const conditionsPostgres = buildWhereConditions({ - eb: buildMockEb(), - where: { bigAge: { lt: 10n } }, - table: schema.Pet.table, - dialect: "postgres", - }); - - expect(conditionsPostgres).toEqual({ - and: [["bigAge", "<", 10n]], - }); -}); - -test("buildWhereConditions handles list filters with encoding", () => { - const conditions = buildWhereConditions({ - eb: buildMockEb(), - where: { bigAge: { in: [12n, 15n] } }, - table: schema.Pet.table, - dialect: "sqlite", - }); - - expect(conditions).toEqual({ - and: [ - [ - "bigAge", - "in", - [ - "0000000000000000000000000000000000000000000000000000000000000000000000000000012", - "0000000000000000000000000000000000000000000000000000000000000000000000000000015", - ], - ], - ], - }); -}); - -test("buildWhereConditions filters on reference column", () => { - const conditions = buildWhereConditions({ - eb: buildMockEb(), - where: { personId: 5n }, - table: schema.Pet.table, - dialect: "postgres", - }); - - expect(conditions).toEqual({ - and: [["personId", "=", 5n]], - }); -}); - -test("buildWhereConditions handles list column 'has' and 'notHas' special case", () => { - const conditions = buildWhereConditions({ - eb: buildMockEb(), - where: { names: { has: "Marty" } }, - table: schema.Pet.table, - dialect: "sqlite", - }); - - expect(conditions).toEqual({ and: [["names", "like", "%Marty%"]] }); -}); - -test("buildWhereConditions handles or operator", () => { - const conditions = buildWhereConditions({ - eb: buildMockEb(), - where: { - bigAge: { lt: 10n }, - OR: [{ id: { contains: "abc" } }, { id: { notStartsWith: "z" } }], - }, - table: schema.Pet.table, - dialect: "postgres", - }); - - expect(conditions).toEqual({ - and: [ - ["bigAge", "<", 10n], - { - or: [ - { and: [["id", "like", "%abc%"]] }, - { and: [["id", "not like", "z%"]] }, - ], - }, - ], - }); -}); - -test("buildWhereConditions throws for unknown column", () => { - expect(() => - buildWhereConditions({ - eb: buildMockEb(), - where: { someFakeColumn: { equals: false } }, - table: schema.Pet.table, - dialect: "sqlite", - }), - ).toThrow( - "Invalid filter. Column does not exist. Got 'someFakeColumn', expected one of ['id', 'names', 'age', 'bigAge', 'kind', 'personId']", - ); -}); - -test("buildWhereConditions throws for virtual column", () => { - expect(() => - buildWhereConditions({ - eb: buildMockEb(), - where: { person: { equals: 5n } }, - table: schema.Pet.table, - dialect: "sqlite", - }), - ).toThrow("Invalid filter. Cannot filter on virtual column 'person'"); -}); - -test("buildWhereConditions throws for invalid filter condition", () => { - expect(() => - buildWhereConditions({ - eb: buildMockEb(), - // @ts-ignore - where: { personId: { notACondition: 5n } }, - table: schema.Pet.table, - dialect: "sqlite", - }), - ).toThrow( - "Invalid filter condition for column 'personId'. Got 'notACondition', expected one of ['equals', 'not', 'in', 'notIn', 'gt', 'lt', 'gte', 'lte']", - ); -}); diff --git a/packages/core/src/indexing-store/utils/filter.ts b/packages/core/src/indexing-store/utils/filter.ts deleted file mode 100644 index 7f437abab..000000000 --- a/packages/core/src/indexing-store/utils/filter.ts +++ /dev/null @@ -1,195 +0,0 @@ -import { StoreError } from "@/common/errors.js"; -import type { ScalarColumn, Table } from "@/schema/common.js"; -import { - isEnumColumn, - isJSONColumn, - isListColumn, - isManyColumn, - isOneColumn, - isReferenceColumn, - isScalarColumn, -} from "@/schema/utils.js"; -import type { - ComparisonOperatorExpression, - ExpressionBuilder, - ExpressionWrapper, -} from "kysely"; -import { encodeValue } from "./encoding.js"; - -const filterValidityMap = { - boolean: { - singular: ["equals", "not", "in", "notIn"], - list: ["equals", "not", "has", "notHas"], - }, - string: { - singular: [ - "equals", - "not", - "in", - "notIn", - "contains", - "notContains", - "startsWith", - "notStartsWith", - "endsWith", - "notEndsWith", - ], - list: ["equals", "not", "has", "notHas"], - }, - hex: { - singular: ["equals", "not", "in", "notIn", "gt", "lt", "gte", "lte"], - list: ["equals", "not", "has", "notHas"], - }, - int: { - singular: ["equals", "not", "in", "notIn", "gt", "lt", "gte", "lte"], - list: ["equals", "not", "has", "notHas"], - }, - bigint: { - singular: ["equals", "not", "in", "notIn", "gt", "lt", "gte", "lte"], - list: ["equals", "not", "has", "notHas"], - }, - float: { - singular: ["equals", "not", "in", "notIn", "gt", "lt", "gte", "lte"], - list: ["equals", "not", "has", "notHas"], - }, -}; - -const filterEncodingMap: { - [condition: string]: ( - value: any, - encode: (v: any) => any, - ) => [comparator: ComparisonOperatorExpression, value: any]; -} = { - // Universal - equals: (value, encode) => - value === null ? ["is", null] : ["=", encode(value)], - not: (value, encode) => - value === null ? ["is not", null] : ["!=", encode(value)], - // Singular - in: (value, encode) => ["in", value.map(encode)], - notIn: (value, encode) => ["not in", value.map(encode)], - // Plural/list - has: (value, encode) => ["like", `%${encode(value)}%`], - notHas: (value, encode) => ["not like", `%${encode(value)}%`], - // Numeric - gt: (value, encode) => [">", encode(value)], - lt: (value, encode) => ["<", encode(value)], - gte: (value, encode) => [">=", encode(value)], - lte: (value, encode) => ["<=", encode(value)], - // String - contains: (value, encode) => ["like", `%${encode(value)}%`], - notContains: (value, encode) => ["not like", `%${encode(value)}%`], - startsWith: (value, encode) => ["like", `${encode(value)}%`], - notStartsWith: (value, encode) => ["not like", `${encode(value)}%`], - endsWith: (value, encode) => ["like", `%${encode(value)}`], - notEndsWith: (value, encode) => ["not like", `%${encode(value)}`], -} as const; - -export function buildWhereConditions({ - eb, - where, - table, - dialect, -}: { - eb: ExpressionBuilder; - where: Record; - table: Table; - dialect: "sqlite" | "postgres"; -}) { - const exprs: ExpressionWrapper[] = []; - - for (const [columnName, rhs] of Object.entries(where)) { - if (columnName === "AND" || columnName === "OR") { - if (!Array.isArray(rhs)) { - throw new StoreError( - `Invalid filter. Expected an array for logical operator '${columnName}', got '${rhs}'.`, - ); - } - - const nestedExprs = rhs.map((nestedWhere) => - buildWhereConditions({ eb, where: nestedWhere, table, dialect }), - ); - - exprs.push(eb[columnName === "AND" ? "and" : "or"](nestedExprs)); - continue; - } - - const column = table[columnName]; - - if (!column) { - throw new StoreError( - `Invalid filter. Column does not exist. Got '${columnName}', expected one of [${Object.keys( - table, - ) - .filter( - (columnName) => - isScalarColumn(table[columnName]!) || - isReferenceColumn(table[columnName]!) || - isEnumColumn(table[columnName]!) || - isJSONColumn(table[columnName]!), - ) - .map((c) => `'${c}'`) - .join(", ")}]`, - ); - } - - if (isOneColumn(column) || isManyColumn(column)) { - throw new StoreError( - `Invalid filter. Cannot filter on virtual column '${columnName}'.`, - ); - } - - if (isJSONColumn(column)) { - throw new StoreError( - `Invalid filter. Cannot filter on json column '${columnName}'.`, - ); - } - - // Handle the shortcut case for `equals`, e.g. { user: "abc" }. - const conditionsForColumn = - Array.isArray(rhs) || typeof rhs !== "object" ? { equals: rhs } : rhs; - - for (const [condition, value] of Object.entries(conditionsForColumn)) { - const filterType = isEnumColumn(column) ? "string" : column[" scalar"]; - - const allowedConditions = - filterValidityMap[filterType]?.[ - isListColumn(column) ? "list" : "singular" - ]; - if (!allowedConditions.includes(condition)) { - throw new StoreError( - `Invalid filter condition for column '${columnName}'. Got '${condition}', expected one of [${allowedConditions - .map((c) => `'${c}'`) - .join(", ")}]`, - ); - } - - const filterEncodingFn = filterEncodingMap[condition]; - - // Handle special case for list column types `has` and `notHas`. - // We need to use the singular encoding function for the arguments. - const encode = (v: any) => { - const isListCondition = - isListColumn(column) && - (condition === "has" || condition === "notHas"); - - if (isListCondition) { - // Must encode the value the same way that it is encoded as a list in - // `encodeValue`. - if ((column as ScalarColumn)[" scalar"] === "bigint") { - return String(v as bigint); - } else if ((column as ScalarColumn)[" scalar"] === "hex") { - return (v as string).toLowerCase(); - } - return v; - } - return encodeValue({ value: v, column, dialect }); - }; - - const [comparator, encodedValue] = filterEncodingFn!(value, encode); - exprs.push(eb.eb(columnName, comparator, encodedValue)); - } - } - - return eb.and(exprs); -} diff --git a/packages/core/src/indexing-store/utils/sort.test.ts b/packages/core/src/indexing-store/utils/sort.test.ts deleted file mode 100644 index d6b87dc4e..000000000 --- a/packages/core/src/indexing-store/utils/sort.test.ts +++ /dev/null @@ -1,129 +0,0 @@ -import { createSchema } from "@/schema/schema.js"; -import { expect, test } from "vitest"; -import { buildOrderByConditions, reverseOrderByConditions } from "./sort.js"; - -const schema = createSchema((p) => ({ - PetKind: p.createEnum(["CAT", "DOG"]), - Pet: p.createTable({ - id: p.string(), - names: p.string().list(), - age: p.int().optional(), - bigAge: p.bigint().optional(), - kind: p.enum("PetKind").optional(), - personId: p.bigint().references("Person.id"), - person: p.one("personId"), - json: p.json().optional(), - }), - Person: p.createTable({ - id: p.bigint(), - }), -})); - -test("buildOrderByConditions defaults to id ascending", () => { - const conditions = buildOrderByConditions({ - orderBy: undefined, - table: schema.Pet.table, - }); - - expect(conditions).toEqual([["id", "asc"]]); -}); - -test("buildOrderByConditions adds secondary sort for non-id columns using the same direction", () => { - const conditionsAsc = buildOrderByConditions({ - orderBy: { names: "asc" }, - table: schema.Pet.table, - }); - - expect(conditionsAsc).toEqual([ - ["names", "asc"], - ["id", "asc"], - ]); - - const conditionsDesc = buildOrderByConditions({ - orderBy: { names: "desc" }, - table: schema.Pet.table, - }); - - expect(conditionsDesc).toEqual([ - ["names", "desc"], - ["id", "desc"], - ]); -}); - -test("buildOrderByConditions throws for sorting on multiple columns", () => { - expect(() => - buildOrderByConditions({ - orderBy: { names: "desc", age: "asc" }, - table: schema.Pet.table, - }), - ).toThrow("Cannot sort by multiple columns."); -}); - -test("buildOrderByConditions throws for unknown column", () => { - expect(() => - buildOrderByConditions({ - orderBy: { someFakeColumn: "asc" }, - table: schema.Pet.table, - }), - ).toThrow( - "Invalid sort. Column does not exist. Got 'someFakeColumn', expected one of ['id', 'names', 'age', 'bigAge', 'kind', 'personId', 'json']", - ); -}); - -test("buildOrderByConditions throws for virtual column", () => { - expect(() => - buildOrderByConditions({ - orderBy: { person: "desc" }, - table: schema.Pet.table, - }), - ).toThrow("Invalid sort. Cannot sort on virtual column 'person'"); -}); - -test("buildOrderByConditions throws for json column", () => { - expect(() => - buildOrderByConditions({ - orderBy: { json: "desc" }, - table: schema.Pet.table, - }), - ).toThrow("Invalid sort. Cannot sort on json column 'json'"); -}); - -test("buildOrderByConditions throws for invalid order direction", () => { - expect(() => - buildOrderByConditions({ - // @ts-ignore - orderBy: { personId: "aaaaasc" }, - table: schema.Pet.table, - }), - ).toThrow("Invalid sort direction. Got 'aaaaasc', expected 'asc' or 'desc'"); -}); - -test("reverseOrderByConditions reverses with one condition", () => { - const conditions = buildOrderByConditions({ - orderBy: undefined, - table: schema.Pet.table, - }); - - expect(conditions).toEqual([["id", "asc"]]); - - const reversedConditions = reverseOrderByConditions(conditions); - expect(reversedConditions).toEqual([["id", "desc"]]); -}); - -test("reverseOrderByConditions reverses with two conditions", () => { - const conditions = buildOrderByConditions({ - orderBy: { names: "desc" }, - table: schema.Pet.table, - }); - - expect(conditions).toEqual([ - ["names", "desc"], - ["id", "desc"], - ]); - - const reversedConditions = reverseOrderByConditions(conditions); - expect(reversedConditions).toEqual([ - ["names", "asc"], - ["id", "asc"], - ]); -}); diff --git a/packages/core/src/indexing-store/utils/sort.ts b/packages/core/src/indexing-store/utils/sort.ts deleted file mode 100644 index e4695516f..000000000 --- a/packages/core/src/indexing-store/utils/sort.ts +++ /dev/null @@ -1,86 +0,0 @@ -import { StoreError } from "@/common/errors.js"; -import type { Table } from "@/schema/common.js"; -import { - isEnumColumn, - isJSONColumn, - isManyColumn, - isOneColumn, - isReferenceColumn, - isScalarColumn, -} from "@/schema/utils.js"; -import type { OrderByInput } from "../store.js"; - -export type OrderByConditions = [ - columnName: string, - direction: "asc" | "desc", -][]; - -export function buildOrderByConditions({ - orderBy, - table, -}: { - orderBy: OrderByInput | undefined; - table: Table; -}): OrderByConditions { - if (!orderBy) { - return [["id", "asc"]]; - } - - const conditions = Object.entries(orderBy); - if (conditions.length > 1) - throw new StoreError("Invalid sort. Cannot sort by multiple columns."); - - const [columnName, orderDirection] = conditions[0]!; - - // Validate column name. - const column = table[columnName]; - if (!column) { - throw new StoreError( - `Invalid sort. Column does not exist. Got '${columnName}', expected one of [${Object.keys( - table, - ) - .filter( - (columnName) => - isScalarColumn(table[columnName]!) || - isReferenceColumn(table[columnName]!) || - isEnumColumn(table[columnName]!) || - isJSONColumn(table[columnName]!), - ) - .map((c) => `'${c}'`) - .join(", ")}]`, - ); - } - if (isOneColumn(column) || isManyColumn(column)) { - throw new StoreError( - `Invalid sort. Cannot sort on virtual column '${columnName}'.`, - ); - } - - if (isJSONColumn(column)) { - throw new StoreError( - `Invalid sort. Cannot sort on json column '${columnName}'.`, - ); - } - - if (orderDirection === undefined || !["asc", "desc"].includes(orderDirection)) - throw new StoreError( - `Invalid sort direction. Got '${orderDirection}', expected 'asc' or 'desc'.`, - ); - - const orderByConditions: OrderByConditions = [[columnName, orderDirection]]; - - // If the specified order by column is not the ID column, add the ID column - // as a secondary using the same order to enforce a consistent sort. - if (columnName !== "id") { - orderByConditions.push(["id", orderDirection]); - } - - return orderByConditions; -} - -export function reverseOrderByConditions(orderByConditions: OrderByConditions) { - return orderByConditions.map(([columnName, direction]) => [ - columnName, - direction === "asc" ? "desc" : "asc", - ]) satisfies OrderByConditions; -} diff --git a/packages/core/src/indexing/index.ts b/packages/core/src/indexing/index.ts index ed1b4da7d..a899c0611 100644 --- a/packages/core/src/indexing/index.ts +++ b/packages/core/src/indexing/index.ts @@ -4,7 +4,6 @@ import { kill, processEvents, processSetupEvents, - updateIndexingStore, updateTotalSeconds, } from "./service.js"; import type { Context, Service } from "./service.js"; @@ -14,7 +13,6 @@ const methods = { kill, processEvents, processSetupEvents, - updateIndexingStore, updateTotalSeconds, }; diff --git a/packages/core/src/indexing/ponderActions.ts b/packages/core/src/indexing/ponderActions.ts index 73a4e1933..9b5b31a63 100644 --- a/packages/core/src/indexing/ponderActions.ts +++ b/packages/core/src/indexing/ponderActions.ts @@ -1,4 +1,3 @@ -import { getTables } from "@/schema/utils.js"; import type { Prettify } from "@/types/utils.js"; import type { Abi, @@ -30,7 +29,7 @@ import { multicall as viemMulticall, readContract as viemReadContract, } from "viem/actions"; -import type { Service, create } from "./service.js"; +import type { Service } from "./service.js"; export type BlockOptions = | { @@ -192,118 +191,3 @@ export const buildCachedActions = ( }), }); }; - -export const buildDb = ({ - common, - schema, - indexingStore, - contextState, -}: Pick[0], "common" | "schema" | "indexingStore"> & { - contextState: Pick< - Service["currentEvent"]["contextState"], - "encodedCheckpoint" - >; -}) => { - return Object.keys(getTables(schema)).reduce< - Service["currentEvent"]["context"]["db"] - >((acc, tableName) => { - acc[tableName] = { - findUnique: async ({ id }) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.findUnique(id=${id})`, - }); - return indexingStore.findUnique({ - tableName, - id, - }); - }, - findMany: async ({ where, orderBy, limit, before, after } = {}) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.findMany`, - }); - return indexingStore.findMany({ - tableName, - where, - orderBy, - limit, - before, - after, - }); - }, - create: async ({ id, data }) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.create(id=${id})`, - }); - return indexingStore.create({ - tableName, - encodedCheckpoint: contextState.encodedCheckpoint, - id, - data, - }); - }, - createMany: async ({ data }) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.createMany(count=${data.length})`, - }); - return indexingStore.createMany({ - tableName, - encodedCheckpoint: contextState.encodedCheckpoint, - data, - }); - }, - update: async ({ id, data }) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.update(id=${id})`, - }); - return indexingStore.update({ - tableName, - encodedCheckpoint: contextState.encodedCheckpoint, - id, - data, - }); - }, - updateMany: async ({ where, data }) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.updateMany`, - }); - return indexingStore.updateMany({ - tableName, - encodedCheckpoint: contextState.encodedCheckpoint, - where, - data, - }); - }, - upsert: async ({ id, create, update }) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.upsert(id=${id})`, - }); - return indexingStore.upsert({ - tableName, - encodedCheckpoint: contextState.encodedCheckpoint, - id, - create, - update, - }); - }, - delete: async ({ id }) => { - common.logger.trace({ - service: "store", - msg: `${tableName}.delete(id=${id})`, - }); - return indexingStore.delete({ - tableName, - encodedCheckpoint: contextState.encodedCheckpoint, - id, - }); - }, - }; - return acc; - }, {}); -}; diff --git a/packages/core/src/indexing/service.ts b/packages/core/src/indexing/service.ts index e5b94e478..c379db9d4 100644 --- a/packages/core/src/indexing/service.ts +++ b/packages/core/src/indexing/service.ts @@ -1,16 +1,14 @@ import type { IndexingFunctions } from "@/build/configAndIndexingFunctions.js"; import type { Common } from "@/common/common.js"; import type { Network } from "@/config/networks.js"; -import type { IndexingStore } from "@/indexing-store/store.js"; -import type { Schema } from "@/schema/common.js"; +import type { Database } from "@/database/index.js"; +import type { Drizzle, Schema } from "@/drizzle/index.js"; import type { Sync } from "@/sync/index.js"; import { type ContractSource, type Source, isAddressFactory, } from "@/sync/source.js"; -import type { DatabaseModel } from "@/types/model.js"; -import type { UserRecord } from "@/types/schema.js"; import { type Checkpoint, decodeCheckpoint, @@ -30,16 +28,12 @@ import type { SetupEvent, } from "../sync/events.js"; import { addStackTrace } from "./addStackTrace.js"; -import { - type ReadOnlyClient, - buildCachedActions, - buildDb, -} from "./ponderActions.js"; +import { type ReadOnlyClient, buildCachedActions } from "./ponderActions.js"; export type Context = { network: { chainId: number; name: string }; client: ReadOnlyClient; - db: Record>; + db: Drizzle; contracts: Record< string, { @@ -55,7 +49,6 @@ export type Service = { // static common: Common; indexingFunctions: IndexingFunctions; - indexingStore: IndexingStore; // state isKilled: boolean; @@ -71,7 +64,6 @@ export type Service = { */ currentEvent: { contextState: { - encodedCheckpoint: string; blockNumber: bigint; }; context: Context; @@ -89,19 +81,16 @@ export const create = ({ sources, networks, sync, - indexingStore, - schema, + database, }: { indexingFunctions: IndexingFunctions; common: Common; sources: Source[]; networks: Network[]; sync: Sync; - indexingStore: IndexingStore; - schema: Schema; + database: Database; }): Service => { const contextState: Service["currentEvent"]["contextState"] = { - encodedCheckpoint: undefined!, blockNumber: undefined!, }; const clientByChainId: Service["clientByChainId"] = {}; @@ -154,9 +143,6 @@ export const create = ({ }; } - // build db - const db = buildDb({ common, schema, indexingStore, contextState }); - // build cachedActions const cachedActions = buildCachedActions(contextState); @@ -179,7 +165,6 @@ export const create = ({ return { common, indexingFunctions, - indexingStore, isKilled: false, eventCount, startCheckpoint: decodeCheckpoint(sync.getStartCheckpoint()), @@ -189,7 +174,7 @@ export const create = ({ network: { name: undefined!, chainId: undefined! }, contracts: undefined!, client: undefined!, - db, + db: database.drizzle, }, }, networkByChainId, @@ -198,20 +183,6 @@ export const create = ({ }; }; -export const updateIndexingStore = async ( - indexingService: Service, - { indexingStore, schema }: { indexingStore: IndexingStore; schema: Schema }, -) => { - const db = buildDb({ - common: indexingService.common, - schema, - indexingStore, - contextState: indexingService.currentEvent.contextState, - }); - - indexingService.currentEvent.context.db = db; -}; - export const processSetupEvents = async ( indexingService: Service, { @@ -441,7 +412,7 @@ const executeSetup = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.contextState.encodedCheckpoint = event.checkpoint; + currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.block; const endClock = startClock(); @@ -501,7 +472,7 @@ const executeLog = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.contextState.encodedCheckpoint = event.checkpoint; + currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.event.block.number; const endClock = startClock(); @@ -565,7 +536,7 @@ const executeBlock = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.contextState.encodedCheckpoint = event.checkpoint; + currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.event.block.number; const endClock = startClock(); @@ -635,7 +606,7 @@ const executeCallTrace = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.contextState.encodedCheckpoint = event.checkpoint; + currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.event.block.number; const endClock = startClock(); diff --git a/packages/core/src/schema/columns.test-d.ts b/packages/core/src/schema/columns.test-d.ts deleted file mode 100644 index 3a24d216e..000000000 --- a/packages/core/src/schema/columns.test-d.ts +++ /dev/null @@ -1,333 +0,0 @@ -import { assertType, test } from "vitest"; -import { _enum, index, json, many, one, string } from "./columns.js"; - -test("base", () => { - const c = string(); - // ^? - - assertType( - {} as unknown as "optional" | "list" | "references", - ); - assertType>( - {} as unknown as { - " type": "scalar"; - " scalar": "string"; - " optional": false; - " list": false; - }, - ); -}); - -test("optional", () => { - const c = string().optional(); - // ^? - - assertType({} as unknown as "list" | "references"); - assertType>( - {} as unknown as { - " type": "scalar"; - " scalar": "string"; - " optional": true; - " list": false; - }, - ); -}); - -test("list", () => { - const c = string().list(); - // ^? - - assertType({} as unknown as "optional"); - assertType>( - {} as unknown as { - " type": "scalar"; - " scalar": "string"; - " optional": false; - " list": true; - }, - ); -}); - -test("optional + list", () => { - const c = string().optional().list(); - // ^? - - assertType>( - {} as unknown as { - " type": "scalar"; - " scalar": "string"; - " optional": true; - " list": true; - }, - ); -}); - -test("list + optional", () => { - const c = string().list().optional(); - // ^? - - assertType>( - {} as unknown as { - " type": "scalar"; - " scalar": "string"; - " optional": true; - " list": true; - }, - ); -}); - -test("references", () => { - const c = string().references("OtherTable.id"); - // ^? - - assertType({} as unknown as "optional"); - assertType>( - {} as unknown as { - " type": "reference"; - " scalar": "string"; - " optional": false; - " reference": "OtherTable.id"; - }, - ); -}); - -test("references + optional", () => { - const c = string().references("OtherTable.id").optional(); - // ^? - - assertType>( - {} as unknown as { - " type": "reference"; - " scalar": "string"; - " optional": true; - " reference": "OtherTable.id"; - }, - ); -}); - -test("optional + references", () => { - const c = string().optional().references("OtherTable.id"); - // ^? - - assertType>( - {} as unknown as { - " type": "reference"; - " scalar": "string"; - " optional": true; - " reference": "OtherTable.id"; - }, - ); -}); - -test("json", () => { - const c = json(); - // ^? - - assertType>( - {} as unknown as { - " type": "json"; - " json": unknown; - " optional": false; - }, - ); -}); - -test("json w/ type", () => { - const c = json<{ a: number; b: string }>(); - // ^? - - assertType>( - {} as unknown as { - " type": "json"; - " json": { a: number; b: string }; - " optional": false; - }, - ); -}); - -test("json optional", () => { - const c = json().optional(); - // ^? - - assertType>( - {} as unknown as { - " type": "json"; - " json": unknown; - " optional": true; - }, - ); -}); - -test("one", () => { - const c = one("column"); - // ^? - - assertType( - {} as unknown as { " type": "one"; " reference": "column" }, - ); -}); - -test("many", () => { - const c = many("table.column"); - // ^? - - assertType( - {} as unknown as { - " type": "many"; - " referenceTable": "table"; - " referenceColumn": "column"; - }, - ); -}); - -test("enum", () => { - const e = _enum("enum"); - // ^? - - assertType({} as unknown as "optional" | "list"); - assertType>( - {} as unknown as { - " type": "enum"; - " enum": "enum"; - " optional": false; - " list": false; - }, - ); -}); - -test("enum optional", () => { - const e = _enum("enum").optional(); - // ^? - - assertType({} as unknown as "list"); - assertType>( - {} as unknown as { - " type": "enum"; - " enum": "enum"; - " optional": true; - " list": false; - }, - ); -}); - -test("enum optional + list", () => { - const e = _enum("enum").optional().list(); - // ^? - - assertType({} as unknown as never); - assertType( - {} as unknown as { - " type": "enum"; - " enum": "enum"; - " optional": true; - " list": true; - }, - ); -}); - -test("enum list + optional", () => { - const e = _enum("enum").list().optional(); - // ^? - - assertType({} as unknown as never); - assertType( - {} as unknown as { - " type": "enum"; - " enum": "enum"; - " optional": true; - " list": true; - }, - ); -}); - -test("index", () => { - const i = index("column"); - // ^? - - assertType( - {} as unknown as "asc" | "desc" | "nullsFirst" | "nullsLast", - ); - assertType>( - {} as unknown as { - " type": "index"; - " column": "column"; - " order": undefined; - " nulls": undefined; - }, - ); -}); - -test("index asc", () => { - const i = index("column").asc(); - // ^? - - assertType({} as unknown as "nullsFirst" | "nullsLast"); - assertType>( - {} as unknown as { - " type": "index"; - " column": "column"; - " order": "asc"; - " nulls": undefined; - }, - ); -}); - -test("index nullsFirst", () => { - const i = index("column").nullsFirst(); - // ^? - - assertType({} as unknown as "asc" | "desc"); - assertType>( - {} as unknown as { - " type": "index"; - " column": "column"; - " order": undefined; - " nulls": "first"; - }, - ); -}); - -test("index desc + nullsLast", () => { - const i = index("column").desc().nullsLast(); - // ^? - - assertType({} as unknown as never); - assertType( - {} as unknown as { - " type": "index"; - " column": "column"; - " order": "desc"; - " nulls": "last"; - }, - ); -}); - -test("index nullsLast + desc", () => { - const i = index("column").nullsLast().desc(); - // ^? - - assertType({} as unknown as never); - assertType( - {} as unknown as { - " type": "index"; - " column": "column"; - " order": "desc"; - " nulls": "last"; - }, - ); -}); - -test("index multi column", () => { - const i = index(["col1", "col2"]); - // ^? - - assertType({} as unknown as never); - assertType( - {} as unknown as { - " type": "index"; - " column": readonly ["col1", "col2"]; - " order": undefined; - " nulls": undefined; - }, - ); -}); diff --git a/packages/core/src/schema/columns.ts b/packages/core/src/schema/columns.ts deleted file mode 100644 index bc41c7ea7..000000000 --- a/packages/core/src/schema/columns.ts +++ /dev/null @@ -1,675 +0,0 @@ -import type { Prettify } from "@/types/utils.js"; -import type { - EnumColumn, - Index, - JSONColumn, - ReferenceColumn, - Scalar, - ScalarColumn, -} from "./common.js"; - -type Optional = () => BuilderScalarColumn< - column[" scalar"], - true, - column[" list"] ->; - -const optional = - (col: column): Optional => - // @ts-expect-error - () => { - const newCol = { - " type": col[" type"], - " scalar": col[" scalar"], - " optional": true, - " list": col[" list"], - } as const; - - if (newCol[" list"]) { - return newCol; - } else { - return { - ...newCol, - list: list(newCol), - references: references(newCol), - }; - } - }; - -type List = () => BuilderScalarColumn< - column[" scalar"], - column[" optional"], - true ->; - -const list = - (col: column): List => - // @ts-expect-error - () => { - const newCol = { - " type": col[" type"], - " scalar": col[" scalar"], - " optional": col[" optional"], - " list": true, - } as const; - - if (newCol[" optional"]) { - return newCol; - } else { - return { - ...newCol, - optional: optional(newCol), - }; - } - }; - -type EnumOptional = () => BuilderEnumColumn< - column[" enum"], - true, - column[" list"] ->; - -const enumOptional = - (col: column): EnumOptional => - // @ts-expect-error - () => { - const newCol = { - " type": col[" type"], - " enum": col[" enum"], - " optional": true, - " list": col[" list"], - } as const; - - if (newCol[" list"]) { - return newCol; - } else { - return { - ...newCol, - list: enumList(newCol), - }; - } - }; - -type EnumList = () => BuilderEnumColumn< - column[" enum"], - column[" optional"], - true ->; - -const enumList = - (col: column): EnumList => - // @ts-expect-error - () => { - const newCol = { - " type": col[" type"], - " enum": col[" enum"], - " optional": col[" optional"], - " list": true, - } as const; - - if (newCol[" optional"]) { - return newCol; - } else { - return { - ...newCol, - optional: enumOptional(newCol), - }; - } - }; - -type Asc = () => BuilderIndex< - index[" column"], - "asc", - index[" nulls"] ->; - -const asc = - (i: index): Asc => - // @ts-expect-error - () => { - const newIndex = { - " type": i[" type"], - " column": i[" column"], - " order": "asc", - " nulls": i[" nulls"], - } as const; - - if (newIndex[" nulls"] === undefined) { - return { - ...newIndex, - nullsFirst: nullsFirst(newIndex), - nullsLast: nullsLast(newIndex), - }; - } else { - return newIndex; - } - }; - -type Desc = () => BuilderIndex< - index[" column"], - "desc", - index[" nulls"] ->; - -const desc = - (i: index): Desc => - // @ts-expect-error - () => { - const newIndex = { - " type": i[" type"], - " column": i[" column"], - " order": "desc", - " nulls": i[" nulls"], - } as const; - - if (newIndex[" nulls"] === undefined) { - return { - ...newIndex, - nullsFirst: nullsFirst(newIndex), - nullsLast: nullsLast(newIndex), - }; - } else { - return newIndex; - } - }; - -type NullsFirst = () => BuilderIndex< - index[" column"], - index[" order"], - "first" ->; - -const nullsFirst = - (i: index): NullsFirst => - // @ts-expect-error - () => { - const newIndex = { - " type": i[" type"], - " column": i[" column"], - " order": i[" order"], - " nulls": "first", - } as const; - - if (newIndex[" order"] === undefined) { - return { - ...newIndex, - asc: asc(newIndex), - desc: desc(newIndex), - }; - } else { - return newIndex; - } - }; - -type NullsLast = () => BuilderIndex< - index[" column"], - index[" order"], - "last" ->; - -const nullsLast = - (i: index): NullsLast => - // @ts-expect-error - () => { - const newIndex = { - " type": i[" type"], - " column": i[" column"], - " order": i[" order"], - " nulls": "last", - } as const; - - if (newIndex[" order"] === undefined) { - return { - ...newIndex, - asc: asc(newIndex), - desc: desc(newIndex), - }; - } else { - return newIndex; - } - }; -type ReferenceOptional = - () => BuilderReferenceColumn; - -const referenceOptional = - ( - col: column, - ): ReferenceOptional => - () => { - return { - " type": col[" type"], - " scalar": col[" scalar"], - " optional": true, - " reference": col[" reference"], - }; - }; - -type References = < - reference extends string, ->( - ref: reference, -) => BuilderReferenceColumn; - -const references = - (col: column): References => - // @ts-expect-error - (ref: reference) => { - const newCol = { - " type": "reference", - " scalar": col[" scalar"], - " optional": col[" optional"], - " reference": ref, - } as const; - - if (newCol[" optional"]) { - return newCol; - } else { - return { ...newCol, optional: referenceOptional(newCol) }; - } - }; - -type JSONOptional = () => BuilderJSONColumn< - column[" json"], - true ->; - -const jsonOptional = - (col: column): JSONOptional => - () => { - return { - " type": "json", - " json": {} as (typeof col)[" json"], - " optional": true, - }; - }; - -const scalarColumn = - (_scalar: scalar) => - (): Prettify> => { - const column = { - " type": "scalar", - " scalar": _scalar, - " optional": false, - " list": false, - } as const; - - return { - ...column, - optional: optional(column), - list: list(column), - references: references(column), - }; - }; - -export type BuilderScalarColumn< - scalar extends Scalar = Scalar, - optional extends boolean = boolean, - list extends boolean = boolean, - /// - base extends ScalarColumn = ScalarColumn< - scalar, - optional, - list - >, -> = list extends false - ? optional extends false - ? base & { - /** - * Mark the column as optional. - * - * - Docs: https://ponder.sh/docs/schema#optional - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * o: p.int().optional(), - * }) - * })); - */ - optional: Optional; - /** - * Mark the column as a list. - * - * - Docs: https://ponder.sh/docs/schema#list - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * l: p.int().list(), - * }) - * })); - */ - list: List; - references: References; - } - : base & { - /** - * Mark the column as a list. - * - * - Docs: https://ponder.sh/docs/schema#list - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * l: p.int().list(), - * }) - * })) - */ - list: List; - /** - * Mark the column as a foreign key. - * - * - Docs: https://ponder.sh/docs/schema#foreign-key - * - * @param references Table that this column is a key of. - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * a: p.createTable({ - * id: p.string(), - * b_id: p.string.references("b.id"), - * }) - * b: p.createTable({ - * id: p.string(), - * }) - * })); - */ - references: References; - } - : optional extends false - ? base & { - /** - * Mark the column as optional. - * - * - Docs: https://ponder.sh/docs/schema#optional - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * o: p.int().optional(), - * }) - * })); - */ - optional: Optional; - } - : base; - -export type BuilderReferenceColumn< - scalar extends Scalar = Scalar, - optional extends boolean = boolean, - reference extends string = string, - /// - base extends ReferenceColumn = ReferenceColumn< - scalar, - optional, - reference - >, -> = optional extends false - ? base & { - /** - * Mark the column as optional. - * - * - Docs: https://ponder.sh/docs/schema#optional - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * o: p.int().optional(), - * }) - * }) - */ - optional: ReferenceOptional; - } - : base; - -export type BuilderJSONColumn< - type = any, - optional extends boolean = boolean, - /// - base extends JSONColumn = JSONColumn, -> = optional extends false - ? base & { - /** - * Mark the column as optional. - * - * - Docs: https://ponder.sh/docs/schema#optional - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * o: p.json().optional(), - * }) - * })); - */ - optional: JSONOptional; - } - : base; - -export type BuilderOneColumn = { - " type": "one"; - " reference": reference; -}; - -export type BuilderManyColumn< - referenceTable extends string = string, - referenceColumn extends string = string, -> = { - " type": "many"; - " referenceTable": referenceTable; - " referenceColumn": referenceColumn; -}; - -export type BuilderEnumColumn< - _enum extends string = string, - optional extends boolean = boolean, - list extends boolean = boolean, - /// - base extends EnumColumn<_enum, optional, list> = EnumColumn< - _enum, - optional, - list - >, -> = list extends false - ? optional extends false - ? base & { - /** - * Mark the column as optional. - * - * - Docs: https://ponder.sh/docs/schema#optional - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * e: p.createEnum(["ONE", "TWO"]) - * t: p.createTable({ - * id: p.string(), - * a: p.enum("e").optional(), - * }) - * })); - */ - optional: EnumOptional; - /** - * Mark the column as a list. - * - * - Docs: https://ponder.sh/docs/schema#list - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * e: p.createEnum(["ONE", "TWO"]) - * t: p.createTable({ - * id: p.string(), - * a: p.enum("e").list(), - * }) - * })); - */ - list: EnumList; - } - : base & { - /** - * Mark the column as a list. - * - * - Docs: https://ponder.sh/docs/schema#list - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * e: p.createEnum(["ONE", "TWO"]) - * t: p.createTable({ - * id: p.string(), - * a: p.enum("e").list(), - * }) - * })); - */ - list: EnumList; - } - : optional extends false - ? base & { - /** - * Mark the column as optional. - * - * - Docs: https://ponder.sh/docs/schema#optional - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * e: p.createEnum(["ONE", "TWO"]) - * t: p.createTable({ - * id: p.string(), - * a: p.enum("e").optional(), - * }) - * })); - */ - optional: EnumOptional; - } - : base; - -export type BuilderIndex< - column extends string | readonly string[] = string | readonly string[], - order extends "asc" | "desc" | undefined = "asc" | "desc" | undefined, - nulls extends "first" | "last" | undefined = "first" | "last" | undefined, - /// - base extends Index = Index, - isSingleColumn = column extends readonly string[] ? false : true, -> = order extends undefined - ? nulls extends undefined - ? isSingleColumn extends true - ? base & { - asc: Asc; - desc: Desc; - nullsFirst: NullsFirst; - nullsLast: NullsLast; - } - : base - : isSingleColumn extends true - ? base & { - asc: Asc; - desc: Desc; - } - : base - : nulls extends undefined - ? isSingleColumn extends true - ? base & { - nullsFirst: NullsFirst; - nullsLast: NullsLast; - } - : base - : base; - -export const string = scalarColumn("string"); -export const int = scalarColumn("int"); -export const float = scalarColumn("float"); -export const boolean = scalarColumn("boolean"); -export const hex = scalarColumn("hex"); -export const bigint = scalarColumn("bigint"); - -export const json = (): BuilderJSONColumn => { - const column = { - " type": "json", - " json": {} as type, - " optional": false, - } as const; - - return { - ...column, - optional: jsonOptional(column), - }; -}; - -export const one = ( - ref: reference, -): BuilderOneColumn => ({ - " type": "one", - " reference": ref, -}); - -export const many = < - referenceTable extends string = string, - referenceColumn extends string = string, ->( - ref: `${referenceTable}.${referenceColumn}`, -): BuilderManyColumn => ({ - " type": "many", - " referenceTable": ref.split(".")[0] as referenceTable, - " referenceColumn": ref.split(".")[1] as referenceColumn, -}); - -export const _enum = <_enum extends string>( - __enum: _enum, -): Prettify> => { - const column = { - " type": "enum", - " enum": __enum, - " optional": false, - " list": false, - } as const; - - return { - ...column, - optional: enumOptional(column), - list: enumList(column), - }; -}; - -export const index = ( - c: column, -): BuilderIndex => { - const index = { - " type": "index", - " column": c, - " order": undefined, - " nulls": undefined, - } as const; - - return { - ...index, - asc: asc(index), - desc: desc(index), - nullsFirst: nullsFirst(index), - nullsLast: nullsLast(index), - } as BuilderIndex; -}; diff --git a/packages/core/src/schema/common.ts b/packages/core/src/schema/common.ts deleted file mode 100644 index f749720ef..000000000 --- a/packages/core/src/schema/common.ts +++ /dev/null @@ -1,195 +0,0 @@ -export type Scalar = "string" | "int" | "float" | "boolean" | "hex" | "bigint"; -export type ID = "string" | "int" | "bigint" | "hex"; - -export type ScalarColumn< - scalar extends Scalar = Scalar, - optional extends boolean = boolean, - list extends boolean = boolean, -> = { - " type": "scalar"; - " scalar": scalar; - " optional": optional; - " list": list; -}; - -export type IdColumn = ScalarColumn; - -export type ReferenceColumn< - scalar extends Scalar = Scalar, - optional extends boolean = boolean, - reference extends string = string, -> = { - " type": "reference"; - " scalar": scalar; - " optional": optional; - " reference": reference; -}; - -export type JSONColumn = { - " type": "json"; - " json": type; - " optional": optional; -}; - -export type OneColumn = { - " type": "one"; - " reference": reference; -}; - -export type ManyColumn< - referenceTable extends string = string, - referenceColumn extends string = string, -> = { - " type": "many"; - " referenceTable": referenceTable; - " referenceColumn": referenceColumn; -}; - -export type EnumColumn< - _enum extends string = string, - optional extends boolean = boolean, - list extends boolean = boolean, -> = { - " type": "enum"; - " enum": _enum; - " optional": optional; - " list": list; -}; - -export type Index< - column extends string | readonly string[] = string | readonly string[], - order extends "asc" | "desc" | undefined = "asc" | "desc" | undefined, - nulls extends "first" | "last" | undefined = "first" | "last" | undefined, -> = { - " type": "index"; - " column": column; - " order": order; - " nulls": nulls; -}; - -export type Column = - | ScalarColumn - | ReferenceColumn - | JSONColumn - | OneColumn - | ManyColumn - | EnumColumn; - -export type MaterialColumn = Exclude; - -export type Table = { id: IdColumn } & { - [columnName: string]: Column; -}; - -export type Enum = readonly string[]; - -export type Constraints = { - [name: string]: Index; -}; - -export type IsTable = a extends readonly unknown[] - ? false - : true; - -export type Schema = { - [name: string]: { table: Table; constraints: Constraints } | Enum; -}; - -export type ExtractTableNames< - schema extends Schema | unknown, - /// - names = keyof schema & string, -> = names extends names - ? schema[names & keyof schema] extends { - table: Table; - constraints: Constraints; - } - ? names - : never - : never; - -export type ExtractEnumNames< - schema extends Schema | unknown, - /// - names = keyof schema & string, -> = names extends names - ? schema[names & keyof schema] extends Enum - ? names - : never - : never; - -export type ExtractOptionalColumnNames< - tableAndConstraints extends - | { table: Table; constraints: Constraints } - | unknown, - /// - table = tableAndConstraints extends { table: Table; constraints: Constraints } - ? tableAndConstraints["table"] - : Table, - columnNames = keyof table & string, -> = columnNames extends columnNames - ? table[columnNames & keyof table] extends - | ScalarColumn - | ReferenceColumn - | JSONColumn - | EnumColumn - ? table[columnNames & keyof table][" optional"] extends true - ? columnNames - : never - : never - : never; - -export type ExtractRequiredColumnNames< - tableAndConstraints extends - | { table: Table; constraints: Constraints } - | unknown, - /// - table = tableAndConstraints extends { table: Table; constraints: Constraints } - ? tableAndConstraints["table"] - : Table, - columnNames = keyof table & string, -> = columnNames extends columnNames - ? table[columnNames & keyof table] extends - | ScalarColumn - | ReferenceColumn - | JSONColumn - | EnumColumn - ? table[columnNames & keyof table][" optional"] extends false - ? columnNames - : never - : never - : never; - -export type ExtractReferenceColumnNames< - tableAndConstraints extends - | { table: Table; constraints: Constraints } - | unknown, - referenceTable extends string = string, - /// - table = tableAndConstraints extends { table: Table; constraints: Constraints } - ? tableAndConstraints["table"] - : Table, - columnNames = keyof table & string, -> = columnNames extends columnNames - ? table[columnNames & keyof table] extends ReferenceColumn< - Scalar, - boolean, - `${referenceTable}.id` - > - ? columnNames - : never - : never; - -export type ExtractNonVirtualColumnNames< - table extends Table | unknown, - /// - columnNames = keyof table & string, -> = columnNames extends columnNames - ? table[columnNames & keyof table] extends - | ReferenceColumn - | ScalarColumn - | EnumColumn - | JSONColumn - ? columnNames - : never - : never; diff --git a/packages/core/src/schema/infer.test-d.ts b/packages/core/src/schema/infer.test-d.ts deleted file mode 100644 index 3121a94f9..000000000 --- a/packages/core/src/schema/infer.test-d.ts +++ /dev/null @@ -1,118 +0,0 @@ -import type { Hex } from "viem"; -import { assertType, test } from "vitest"; -import type { - EnumColumn, - JSONColumn, - ManyColumn, - OneColumn, - ReferenceColumn, - ScalarColumn, -} from "./common.js"; -import type { - InferColumnType, - InferScalarType, - InferTableType, -} from "./infer.js"; - -test("infer scalar string", () => { - type inferred = InferScalarType<"string">; - // ^? - - assertType({} as unknown as string); -}); - -test("infer scalar boolean", () => { - type inferred = InferScalarType<"boolean">; - // ^? - - assertType({} as unknown as boolean); -}); - -test("infer scalar int", () => { - type inferred = InferScalarType<"int">; - // ^? - - assertType({} as unknown as number); -}); - -test("infer scalar float", () => { - type inferred = InferScalarType<"float">; - // ^? - - assertType({} as unknown as number); -}); - -test("infer scalar bigint", () => { - type inferred = InferScalarType<"bigint">; - // ^? - - assertType({} as unknown as bigint); -}); - -test("infer scalar hex", () => { - type inferred = InferScalarType<"hex">; - // ^? - - assertType({} as unknown as Hex); -}); - -test("infer column not list", () => { - type inferred = InferColumnType< - // ^? - ScalarColumn<"string", false, false>, - unknown - >; - - assertType({} as unknown as string); -}); - -test("infer column list", () => { - type inferred = InferColumnType, unknown>; - // ^? - - assertType({} as unknown as string[]); -}); - -test("infer json", () => { - type inferred = InferColumnType< - // ^? - JSONColumn<{ a: number; b: string }, false>, - unknown - >; - - assertType({} as unknown as { a: number; b: string }); -}); - -test("infer enum", () => { - type inferred = InferColumnType, { enum: ["one", "two"] }>; - // ^? - - assertType({} as unknown as "one" | "two"); -}); - -test("infer table", () => { - type inferred = InferTableType< - // ^? - { - table: { - id: ScalarColumn<"string", false, false>; - col: ScalarColumn<"string", true, false>; - ref: ReferenceColumn<"string", false, "table.id">; - one: OneColumn<"ref">; - many: ManyColumn<"table", "col">; - enum: EnumColumn<"enum", false, false>; - }; - constraints: {}; - }, - { enum: ["one", "two"] } - >; - - assertType( - {} as unknown as { - id: string; - ref: string; - col?: string | undefined; - enum: "one" | "two"; - }, - ); -}); diff --git a/packages/core/src/schema/infer.ts b/packages/core/src/schema/infer.ts deleted file mode 100644 index 0c176a898..000000000 --- a/packages/core/src/schema/infer.ts +++ /dev/null @@ -1,72 +0,0 @@ -import type { Prettify } from "@/types/utils.js"; -import type { Hex } from "viem"; -import type { - Column, - Constraints, - Enum, - EnumColumn, - ExtractOptionalColumnNames, - ExtractRequiredColumnNames, - ExtractTableNames, - JSONColumn, - ReferenceColumn, - Scalar, - ScalarColumn, - Schema, - Table, -} from "./common.js"; - -export type InferScalarType = scalar extends "string" - ? string - : scalar extends "int" - ? number - : scalar extends "float" - ? number - : scalar extends "boolean" - ? boolean - : scalar extends "hex" - ? Hex - : scalar extends "bigint" - ? bigint - : never; - -export type InferColumnType< - column extends Column | unknown, - schema extends Schema | unknown, -> = column extends ScalarColumn - ? column[" list"] extends true - ? InferScalarType[] - : InferScalarType - : column extends ReferenceColumn - ? InferScalarType - : column extends JSONColumn - ? column[" json"] - : column extends EnumColumn - ? (schema[column[" enum"] & keyof schema] & Enum)[number] - : never; - -export type InferTableType = table extends { - table: Table; - constraints: Constraints; -} - ? Prettify< - { - [columnName in ExtractRequiredColumnNames
]: InferColumnType< - table["table"][columnName], - schema - >; - } & { - [columnName in ExtractOptionalColumnNames
]?: InferColumnType< - table["table"][columnName], - schema - >; - } - > - : never; - -export type InferSchemaType = { - [tableName in ExtractTableNames]: InferTableType< - schema[tableName], - schema - >; -}; diff --git a/packages/core/src/schema/schema.test-d.ts b/packages/core/src/schema/schema.test-d.ts deleted file mode 100644 index 3344269cf..000000000 --- a/packages/core/src/schema/schema.test-d.ts +++ /dev/null @@ -1,212 +0,0 @@ -import type { Hex } from "viem"; -import { assertType, test } from "vitest"; -import type { InferSchemaType } from "./infer.js"; -import { createSchema } from "./schema.js"; - -test("createSchema scalar", () => { - const schema = createSchema((p) => ({ t: p.createTable({ id: p.hex() }) })); - // ^? - - type inferred = InferSchemaType; - // ^? - - assertType({} as unknown as { t: { id: Hex } }); -}); - -test("createSchema reference", () => { - const schema = createSchema((p) => ({ - // ^? - t1: p.createTable({ - id: p.hex(), - }), - t2: p.createTable({ - id: p.hex(), - col: p.hex().references("t2.id"), - }), - })); - - type inferred = InferSchemaType; - // ^? - - assertType( - {} as unknown as { t1: { id: Hex }; t2: { id: Hex; col: Hex } }, - ); -}); - -test("createSchema reference error", () => { - createSchema((p) => ({ - // @ts-expect-error - t: p.createTable({ - id: p.hex(), - col: p.hex().references("t2.id"), - }), - })); -}); - -test("createSchema one", () => { - const schema = createSchema((p) => ({ - // ^? - t1: p.createTable({ - id: p.hex(), - }), - t2: p.createTable({ - id: p.hex(), - col1: p.hex().references("t1.id"), - col2: p.one("col1"), - }), - })); - - type inferred = InferSchemaType; - // ^? - - assertType( - {} as unknown as { t1: { id: Hex }; t2: { id: Hex; col1: Hex } }, - ); -}); - -test("createSchema one error", () => { - createSchema((p) => ({ - // ^? - // @ts-expect-error - t: p.createTable({ - id: p.hex(), - // @ts-expect-error - col: p.one("col"), - }), - })); -}); - -test("createSchema many", () => { - const schema = createSchema((p) => ({ - // ^? - t1: p.createTable({ - id: p.hex(), - many: p.many("t2.col1"), - }), - t2: p.createTable({ - id: p.hex(), - col1: p.hex().references("t1.id"), - col2: p.one("col1"), - }), - })); - - type inferred = InferSchemaType; - // ^? - - assertType( - {} as unknown as { t1: { id: Hex }; t2: { id: Hex; col1: Hex } }, - ); -}); - -test("createSchema many error wrong table", () => { - createSchema((p) => ({ - // ^? - // @ts-expect-error - t1: p.createTable({ - id: p.hex(), - many: p.many("t1.col1"), - }), - t2: p.createTable({ - id: p.hex(), - col1: p.hex().references("t1.id"), - col2: p.one("col1"), - }), - })); -}); - -test("createSchema many error wrong column", () => { - createSchema((p) => ({ - // ^? - // @ts-expect-error - t1: p.createTable({ - id: p.hex(), - many: p.many("t2.col2"), - }), - t2: p.createTable({ - id: p.hex(), - col1: p.hex().references("t1.id"), - col2: p.one("col1"), - }), - })); -}); - -test("createSchema many self reference", () => { - const schema = createSchema((p) => ({ - // ^? - t: p.createTable({ - id: p.hex(), - col1: p.hex().references("t.id"), - col2: p.one("col1"), - many: p.many("t.col1"), - }), - })); - - type inferred = InferSchemaType; - // ^? - - assertType({} as unknown as { t: { id: Hex; col1: Hex } }); -}); - -test("createSchema enum", () => { - const schema = createSchema((p) => ({ - // ^? - e: p.createEnum(["one", "two"]), - t: p.createTable({ - id: p.string(), - enum: p.enum("e"), - }), - })); - - type inferred = InferSchemaType; - // ^? - - assertType( - {} as unknown as { t: { id: Hex; enum: "one" | "two" } }, - ); -}); - -test("createSchema enum error", () => { - createSchema((p) => ({ - e: p.createEnum(["one", "two"]), - // @ts-expect-error - t: p.createTable({ - id: p.string(), - enum: p.enum("a"), - }), - })); -}); - -test("createSchema index", () => { - const schema = createSchema((p) => ({ - // ^? - t: p.createTable( - { - id: p.string(), - }, - { - idIndex: p.index(["id"]), - }, - ), - })); - - type inferred = InferSchemaType; - // ^? - - assertType({} as unknown as { t: { id: string } }); -}); - -test("createSchema index error", () => { - createSchema((p) => ({ - // ^? - // @ts-expect-error - t: p.createTable( - { - id: p.string(), - }, - { - // @ts-expect-error - idIndex: p.index("idd"), - }, - ), - })); -}); diff --git a/packages/core/src/schema/schema.ts b/packages/core/src/schema/schema.ts deleted file mode 100644 index c91a97f58..000000000 --- a/packages/core/src/schema/schema.ts +++ /dev/null @@ -1,378 +0,0 @@ -import { - type BuilderEnumColumn, - type BuilderIndex, - type BuilderJSONColumn, - type BuilderManyColumn, - type BuilderOneColumn, - type BuilderScalarColumn, - _enum, - bigint, - boolean, - float, - hex, - index, - int, - json, - many, - one, - string, -} from "./columns.js"; -import type { - Column, - Constraints, - EnumColumn, - ExtractEnumNames, - ExtractNonVirtualColumnNames, - ExtractReferenceColumnNames, - ExtractTableNames, - IdColumn, - Index, - JSONColumn, - ManyColumn, - OneColumn, - ReferenceColumn, - ScalarColumn, - Schema, - Table, -} from "./common.js"; - -type GetTable< - table, - tableName extends string = string, - schema = {}, - /// - tableNames extends string = {} extends schema - ? string - : ExtractTableNames, - enumNames extends string = {} extends schema - ? string - : ExtractEnumNames, -> = {} extends table - ? {} - : table extends { - id: IdColumn; - } - ? { - [columnName in keyof table]: table[columnName] extends ScalarColumn - ? ScalarColumn - : table[columnName] extends ReferenceColumn - ? ReferenceColumn< - table[columnName][" scalar"], - table[columnName][" optional"], - `${tableNames}.id` - > - : table[columnName] extends JSONColumn - ? JSONColumn - : table[columnName] extends OneColumn - ? OneColumn> - : table[columnName] extends ManyColumn - ? {} extends schema - ? ManyColumn - : table[columnName] extends ManyColumn - ? ManyColumn< - table[columnName][" referenceTable"], - ExtractReferenceColumnNames< - schema[table[columnName][" referenceTable"] & - keyof schema], - tableName - > & - string - > - : ManyColumn> - : table[columnName] extends EnumColumn - ? EnumColumn - : Column; - } - : { id: IdColumn } & { - [columnName: string]: Column; - }; - -type GetConstraints< - constraints, - table, - /// - columnName extends string = ExtractNonVirtualColumnNames
, -> = {} extends constraints - ? {} - : { - [name in keyof constraints]: Index; - }; - -export const createTable = ( - t: GetTable
, - c?: GetConstraints, -): { table: table; constraints: constraints } => ({ - table: t as table, - constraints: c as constraints, -}); - -export const createEnum = (e: _enum) => - e; - -const P = { - createTable, - createEnum, - string, - bigint, - int, - float, - hex, - boolean, - json, - one, - many, - enum: _enum, - index, -}; - -type P = { - /** - * Create a database table. - * - * - Docs: https://ponder.sh/docs/schema#tables - * - * @example - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * }) - * })); - */ - createTable: ( - t: GetTable
, - c?: GetConstraints, - ) => { table: table; constraints: constraints }; - /** - * Create an Enum type for the database. - * - * - Docs: https://ponder.sh/docs/schema#tables - * - * @example - * export default createSchema((p) => ({ - * e: p.createEnum(["ONE", "TWO"]) - * t: p.createTable({ - * id: p.string(), - * a: p.enum("e"), - * }) - * })); - */ - - createEnum: (e: _enum) => _enum; - /** - * Primitive `string` column type. - * - * - Docs: https://ponder.sh/docs/schema#primitives - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * }) - * })); - */ - string: () => BuilderScalarColumn<"string", false, false>; - /** - * Primitive `bigint` column type. - * - * - Docs: https://ponder.sh/docs/schema#primitives - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.bigint(), - * }) - * })); - */ - bigint: () => BuilderScalarColumn<"bigint", false, false>; - /** - * Primitive `int` column type. - * - * - Docs: https://ponder.sh/docs/schema#primitives - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.int(), - * }) - * })); - */ - int: () => BuilderScalarColumn<"int", false, false>; - /** - * Primitive `float` column type. - * - * - Docs: https://ponder.sh/docs/schema#primitives - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * f: p.float(), - * }) - * })); - */ - - float: () => BuilderScalarColumn<"float", false, false>; - /** - * Primitive `hex` column type. - * - * - Docs: https://ponder.sh/docs/schema#primitives - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.hex(), - * }) - * })); - */ - hex: () => BuilderScalarColumn<"hex", false, false>; - /** - * Primitive `boolean` column type. - * - * - Docs: https://ponder.sh/docs/schema#primitives - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * b: p.boolean(), - * }) - * })); - */ - boolean: () => BuilderScalarColumn<"boolean", false, false>; - /** - * Primitive `JSON` column type. - * - * - Docs: https://ponder.sh/docs/schema#primitives - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * b: p.json(), - * }) - * })); - */ - json: () => BuilderJSONColumn; - /** - * One-to-one column type.`one` columns don't exist in the database. They are only present when querying data from the GraphQL API. - * - * - Docs: https://ponder.sh/docs/schema#one-to-one - * - * @param reference Reference column to be resolved. - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * a: p.createTable({ - * id: p.string(), - * b_id: p.string.references("b.id"), - * b: p.one("b_id"), - * }) - * b: p.createTable({ - * id: p.string(), - * }) - * })); - */ - one: ( - ref: reference, - ) => BuilderOneColumn; - /** - * Many-to-one column type. `many` columns don't exist in the database. They are only present when querying data from the GraphQL API. - * - * - Docs: https://ponder.sh/docs/schema#one-to-many - * - * @param reference Reference column that references the `id` column of the current table. - * - * @example - * import { createSchema } from "@ponder/core"; - * - * export default createSchema((p) => ({ - * a: p.createTable({ - * id: p.string(), - * ref: p.string.references("b.id"), - * }) - * b: p.createTable({ - * id: p.string(), - * m: p.many("a.ref"), - * }) - * })); - */ - many: ( - ref: `${referenceTable}.${referenceColumn}`, - ) => BuilderManyColumn; - /** - * Custom defined allowable value column type. - * - * - Docs: https://ponder.sh/docs/schema#enum - * - * @param type Enum defined elsewhere in the schema with `p.createEnum()`. - * - * @example - * export default createSchema((p) => ({ - * e: p.createEnum(["ONE", "TWO"]) - * t: p.createTable({ - * id: p.string(), - * a: p.enum("e"), - * }) - * })); - */ - enum: <_enum extends string>( - __enum: _enum, - ) => BuilderEnumColumn<_enum, false, false>; - /** - * Create a table index. - * - * - Docs: https://ponder.sh/docs/schema#indexes - * - * @param columns Column or columns to include in the index. - * - * @example - * export default createSchema((p) => ({ - * t: p.createTable({ - * id: p.string(), - * age: p.int(), - * }, { - * ageIndex: p.index("age"), - * }) - * })); - */ - index: ( - c: column, - ) => BuilderIndex; -}; - -type CreateSchemaParameters = {} extends schema - ? {} - : { - [tableName in keyof schema]: schema[tableName] extends { - table: infer table extends Table; - constraints: infer constraints extends Constraints; - } - ? { - table: GetTable; - constraints: GetConstraints; - } - : readonly string[]; - }; - -export const createSchema = ( - _schema: (p: P) => CreateSchemaParameters, -): unknown extends schema ? Schema : schema => { - // @ts-ignore - return _schema(P) as schema; -}; diff --git a/packages/core/src/schema/utils.ts b/packages/core/src/schema/utils.ts deleted file mode 100644 index 652ab406e..000000000 --- a/packages/core/src/schema/utils.ts +++ /dev/null @@ -1,95 +0,0 @@ -import type { - Column, - Constraints, - Enum, - EnumColumn, - JSONColumn, - ManyColumn, - MaterialColumn, - OneColumn, - ReferenceColumn, - ScalarColumn, - Schema, - Table, -} from "./common.js"; - -export const isScalarColumn = (column: Column): column is ScalarColumn => - column[" type"] === "scalar"; - -export const isReferenceColumn = (column: Column): column is ReferenceColumn => - column[" type"] === "reference"; - -export const isOneColumn = (column: Column): column is OneColumn => - column[" type"] === "one"; - -export const isManyColumn = (column: Column): column is ManyColumn => - column[" type"] === "many"; - -export const isJSONColumn = (column: Column): column is JSONColumn => - column[" type"] === "json"; - -export const isEnumColumn = (column: Column): column is EnumColumn => - column[" type"] === "enum"; - -export const isOptionalColumn = (column: Column): boolean => { - if (isManyColumn(column) || isOneColumn(column)) return false; - return column[" optional"]; -}; - -export const isListColumn = (column: Column): boolean => { - if ( - isManyColumn(column) || - isOneColumn(column) || - isReferenceColumn(column) || - isJSONColumn(column) - ) - return false; - return column[" list"]; -}; - -/** Returns true if the column corresponds to a column in the database */ -export const isMaterialColumn = (column: Column): column is MaterialColumn => - isScalarColumn(column) || - isReferenceColumn(column) || - isEnumColumn(column) || - isJSONColumn(column); - -export const isTable = ( - tableOrEnum: Schema[string], -): tableOrEnum is { table: Table; constraints: Constraints } => - !Array.isArray(tableOrEnum); - -export const isEnum = (tableOrEnum: Schema[string]): tableOrEnum is Enum => - Array.isArray(tableOrEnum); - -export const getTables = ( - schema: Schema, -): { [tableName: string]: { table: Table; constraints: Constraints } } => { - const tables: { - [tableName: string]: { table: Table; constraints: Constraints }; - } = {}; - - for (const [name, tableOrEnum] of Object.entries(schema)) { - if (isTable(tableOrEnum)) { - tables[name] = tableOrEnum; - } - } - - return tables; -}; - -export const getEnums = (schema: Schema): { [enumName: string]: Enum } => { - const enums: { [enumName: string]: Enum } = {}; - - for (const [name, tableOrEnum] of Object.entries(schema)) { - if (isEnum(tableOrEnum)) { - enums[name] = tableOrEnum; - } - } - - return enums; -}; - -export const extractReferenceTable = (ref: ReferenceColumn): string => { - return ref[" reference"].split(".")[0]!; -}; diff --git a/packages/core/src/server/index.ts b/packages/core/src/server/index.ts index 09a74b068..1ccf9e18a 100644 --- a/packages/core/src/server/index.ts +++ b/packages/core/src/server/index.ts @@ -1,15 +1,11 @@ import http from "node:http"; import type { Common } from "@/common/common.js"; import type { Database } from "@/database/index.js"; -import { createDrizzleDb, createDrizzleTables } from "@/drizzle/runtime.js"; -import { graphql } from "@/graphql/index.js"; +import type { Schema } from "@/drizzle/index.js"; import { type PonderRoutes, applyHonoRoutes } from "@/hono/index.js"; import { getMetadataStore } from "@/indexing-store/metadata.js"; -import { getReadonlyStore } from "@/indexing-store/readonly.js"; -import type { Schema } from "@/schema/common.js"; import { startClock } from "@/utils/timer.js"; import { serve } from "@hono/node-server"; -import { migrate } from "drizzle-orm/pglite/migrator"; import { Hono } from "hono"; import { cors } from "hono/cors"; import { createMiddleware } from "hono/factory"; @@ -33,20 +29,18 @@ export async function createServer({ routes: PonderRoutes; common: Common; schema: Schema; - offchainSchema?: { [name: string]: unknown }; database: Database; }): Promise { // Create hono app - const readonlyStore = getReadonlyStore({ - dialect: database.dialect, - schema, - db: database.qb.readonly, - common, - }); + // const readonlyStore = getReadonlyStore({ + // dialect: database.dialect, + // schema, + // db: database.qb.readonly, + // common, + // }); const metadataStore = getMetadataStore({ - dialect: database.dialect, db: database.qb.readonly, }); @@ -94,16 +88,11 @@ export async function createServer({ } }); - const db = createDrizzleDb(database); - const tables = createDrizzleTables({ schema, database }); - - await migrate(db, { migrationsFolder: common.options.migrationsDir }); + // await migrate(db, { migrationsFolder: common.options.migrationsDir }); // context required for graphql middleware and hono middleware const contextMiddleware = createMiddleware(async (c, next) => { - c.set("db", db); - c.set("tables", tables); - c.set("readonlyStore", readonlyStore); + c.set("db", database.drizzle); c.set("metadataStore", metadataStore); c.set("schema", schema); await next(); @@ -142,26 +131,26 @@ export async function createServer({ }) .use(contextMiddleware); - if (userRoutes.length === 0 && userApp.routes.length === 0) { - // apply graphql middleware if no custom api exists - hono.use("/graphql", graphql()); - hono.use("/", graphql()); - } else { - // apply user routes to hono instance, registering a custom error handler - applyHonoRoutes(hono, userRoutes, { db, tables }).onError((error, c) => - onError(error, c, common), - ); - - common.logger.debug({ - service: "server", - msg: `Detected a custom server with routes: [${userRoutes - .map(({ pathOrHandlers: [maybePathOrHandler] }) => maybePathOrHandler) - .filter((maybePathOrHandler) => typeof maybePathOrHandler === "string") - .join(", ")}]`, - }); + // if (userRoutes.length === 0 && userApp.routes.length === 0) { + // // apply graphql middleware if no custom api exists + // hono.use("/graphql", graphql()); + // hono.use("/", graphql()); + // } else { + // apply user routes to hono instance, registering a custom error handler + applyHonoRoutes(hono, userRoutes, { db: database.drizzle }).onError( + (error, c) => onError(error, c, common), + ); + + common.logger.debug({ + service: "server", + msg: `Detected a custom server with routes: [${userRoutes + .map(({ pathOrHandlers: [maybePathOrHandler] }) => maybePathOrHandler) + .filter((maybePathOrHandler) => typeof maybePathOrHandler === "string") + .join(", ")}]`, + }); - hono.route("/", userApp); - } + hono.route("/", userApp); + // } // Create nodejs server diff --git a/packages/core/src/types/api.ts b/packages/core/src/types/api.ts index 49b77ce4d..904f1bd78 100644 --- a/packages/core/src/types/api.ts +++ b/packages/core/src/types/api.ts @@ -1,27 +1,17 @@ -import type { DrizzleDb } from "@/drizzle/db.js"; -import type { DrizzleTable } from "@/drizzle/table.js"; +import type { Drizzle, Schema } from "@/drizzle/index.js"; import type { HandlerInterface, MiddlewareHandlerInterface, } from "@/hono/handler.js"; -import type { ExtractTableNames, Schema } from "@/schema/common.js"; import type { Hono } from "hono"; -export type ApiContext = { - db: DrizzleDb; - tables: { - [tableName in ExtractTableNames]: DrizzleTable< - tableName, - // @ts-ignore - schema[tableName]["table"], - schema - >; - }; -}; - export type ApiRegistry = { get: HandlerInterface; post: HandlerInterface; use: MiddlewareHandlerInterface; - hono: Hono<{ Variables: ApiContext }>; + hono: Hono<{ + Variables: { + db: Drizzle; + }; + }>; }; diff --git a/packages/core/src/types/model.test-d.ts b/packages/core/src/types/model.test-d.ts deleted file mode 100644 index f65f20dca..000000000 --- a/packages/core/src/types/model.test-d.ts +++ /dev/null @@ -1,18 +0,0 @@ -import type { InferSchemaType } from "@/schema/infer.js"; -import { createSchema } from "@/schema/schema.js"; -import { test } from "vitest"; -import type { DatabaseModel } from "./model.js"; - -test("model", () => { - const schema = createSchema((p) => ({ - name: p.createTable({ - id: p.bigint(), - }), - })); - - type s = InferSchemaType; - - // @ts-ignore - type _ = DatabaseModel; - // ^? -}); diff --git a/packages/core/src/types/model.ts b/packages/core/src/types/model.ts deleted file mode 100644 index f8c5c548a..000000000 --- a/packages/core/src/types/model.ts +++ /dev/null @@ -1,106 +0,0 @@ -import type { OrderByInput, WhereInput } from "@/indexing-store/store.js"; -import type { UserTable } from "./schema.js"; -import type { - HasOnlyIdProperty, - HasRequiredPropertiesOtherThanId, - Prettify, -} from "./utils.js"; - -export type StoreMethod = Prettify>; - -export type DatabaseModel
= { - create: ( - options: Prettify< - { - id: table["id"]; - } & (HasOnlyIdProperty
extends true - ? { data?: never } - : HasRequiredPropertiesOtherThanId
extends true - ? { data: Prettify> } - : { data?: Prettify> }) - >, - ) => Promise>; - - createMany: (options: { data: Prettify
[] }) => Promise< - Prettify
[] - >; - - update: ( - options: Prettify< - { - id: table["id"]; - } & (HasOnlyIdProperty
extends true - ? { data?: never } - : HasRequiredPropertiesOtherThanId
extends true - ? { - data: - | Prettify, "id">> - | ((options: { - current: Prettify
; - }) => Prettify, "id">>); - } - : { - data?: - | Prettify, "id">> - | ((options: { - current: Prettify
; - }) => Prettify, "id">>); - }) - >, - ) => Promise>; - - updateMany: (options: { - where: Prettify>; - data: - | Prettify, "id">> - | ((options: { - current: Prettify
; - }) => Prettify, "id">>); - }) => Promise[]>; - - upsert: ( - options: Prettify< - { - id: table["id"]; - } & (HasOnlyIdProperty
extends true - ? { create?: never; update?: never } - : HasRequiredPropertiesOtherThanId
extends true - ? { - create: Prettify>; - update: - | Prettify, "id">> - | ((options: { - current: Prettify
; - }) => Prettify, "id">>); - } - : { - create?: Prettify>; - update?: - | Prettify, "id">> - | ((options: { - current: Prettify
; - }) => Prettify, "id">>); - }) - >, - ) => Promise>; - - findUnique: (options: { id: table["id"] }) => Promise | null>; - - findMany: (options?: { - where?: Prettify>; - orderBy?: Prettify>; - limit?: number; - before?: string; - after?: string; - }) => Promise<{ - items: Prettify
[]; - pageInfo: { - startCursor: string | null; - endCursor: string | null; - hasNextPage: boolean; - hasPreviousPage: boolean; - }; - }>; - - delete: (options: { id: table["id"] }) => Promise; -}; diff --git a/packages/core/src/types/schema.ts b/packages/core/src/types/schema.ts deleted file mode 100644 index 72b6e4758..000000000 --- a/packages/core/src/types/schema.ts +++ /dev/null @@ -1,32 +0,0 @@ -import type { Hex } from "viem"; - -export type UserId = string | number | Hex | bigint; - -export type UserValue = - | string - | string[] - | number - | number[] - | boolean - | boolean[] - | Hex - | Hex[] - | bigint - | bigint[] - | object - | null - | undefined; - -export type UserRecord = { - id: string | number | Hex | bigint; - [columnName: string]: UserValue; -}; - -export type UserTable = { - id: string | number | Hex | bigint; - [columnName: string]: UserValue; -}; - -export type DatabaseValue = string | number | Buffer | bigint | object | null; - -export type DatabaseRecord = { [columnName: string]: DatabaseValue }; diff --git a/packages/core/src/types/utils.ts b/packages/core/src/types/utils.ts index 69d1898c7..b1bfc0c7b 100644 --- a/packages/core/src/types/utils.ts +++ b/packages/core/src/types/utils.ts @@ -10,41 +10,9 @@ export type Prettify = { [K in keyof T]: T[K]; } & {}; -/** - * @description Creates a type with required and non-null keys K from T. - * - * @example - * type Result = RequiredBy<{ a?: string, b: number | null, c: number }, 'a' | 'b'> - * // ^? { a: string, b: number, c: number } - */ -export type RequiredBy = Omit & { - [P in keyof Pick]: NonNullable; -}; - /** * @description Creates a type with all keys K from T as non-null. */ export type NonNull = { [P in keyof T]-?: NonNullable; }; - -/** - * @description Returns true if T only has a property named "id". - */ -export type HasOnlyIdProperty = Exclude extends never - ? true - : false; - -/** - * @description Creates a union of the names of all the required properties of T. - */ -type RequiredPropertyNames = { - [K in keyof T]-?: {} extends Pick ? never : K; -}[keyof T]; - -export type HasRequiredPropertiesOtherThanId = Exclude< - RequiredPropertyNames, - "id" -> extends never - ? false - : true; diff --git a/packages/core/src/types/virtual.test-d.ts b/packages/core/src/types/virtual.test-d.ts index feefac1a7..70a806db4 100644 --- a/packages/core/src/types/virtual.test-d.ts +++ b/packages/core/src/types/virtual.test-d.ts @@ -1,6 +1,5 @@ import { createConfig } from "@/config/config.js"; -import type { DrizzleDb } from "@/drizzle/db.js"; -import { createSchema, createTable } from "@/schema/schema.js"; +import type { Drizzle } from "@/drizzle/index.js"; import { http, type Abi, type Address, type Hex, parseAbiItem } from "viem"; import { assertType, test } from "vitest"; import type { @@ -10,7 +9,6 @@ import type { Transaction, TransactionReceipt, } from "./eth.js"; -import type { DatabaseModel } from "./model.js"; import type { Virtual } from "./virtual.js"; const event0 = parseAbiItem( @@ -82,12 +80,6 @@ const config = createConfig({ }, }); -const schema = createSchema((p) => ({ - table: createTable({ - id: p.string(), - }), -})); - test("FormatEventNames without filter", () => { type a = Virtual.FormatEventNames< // ^? @@ -207,21 +199,15 @@ test("FormatEventName with blocks", () => { }); test("Context db", () => { - type a = Virtual.Context["db"]; + type a = Virtual.Context["db"]; // ^? - type expectedDB = { table: DatabaseModel<{ id: string }> }; - - assertType({} as any as expectedDB); - assertType({} as any as a); + assertType({} as any as Drizzle); + assertType({} as any as a); }); test("Context single network", () => { - type a = Virtual.Context< - typeof config, - typeof schema, - "c1:Event0" - >["network"]; + type a = Virtual.Context["network"]; // ^? type expectedNetwork = { name: "mainnet"; chainId: 1 }; @@ -231,11 +217,7 @@ test("Context single network", () => { }); test("Context multi network", () => { - type a = Virtual.Context< - typeof config, - typeof schema, - "c2:Event1()" - >["network"]; + type a = Virtual.Context["network"]; // ^? type expectedNetwork = @@ -247,7 +229,7 @@ test("Context multi network", () => { }); test("Context block network", () => { - type a = Virtual.Context["network"]; + type a = Virtual.Context["network"]; // ^? type expectedNetwork = { name: "mainnet"; chainId: 1 }; @@ -257,11 +239,7 @@ test("Context block network", () => { }); test("Context client", () => { - type a = Virtual.Context< - typeof config, - typeof schema, - "c2:Event1()" - >["client"]; + type a = Virtual.Context["client"]; // ^? type expectedFunctions = @@ -278,11 +256,7 @@ test("Context client", () => { }); test("Context contracts", () => { - type a = Virtual.Context< - typeof config, - typeof schema, - "c2:Event1()" - >["contracts"]["c2"]; + type a = Virtual.Context["contracts"]["c2"]; // ^? type expectedAbi = [Event1, Event1Overloaded, Func1, Func1Overloaded]; @@ -307,7 +281,6 @@ test("Context network without event", () => { type a = Virtual.Context< // ^? typeof config, - typeof schema, Virtual.EventNames >["network"]; @@ -422,7 +395,7 @@ test("Event with block", () => { }); test("Registry", () => { - const ponder = {} as any as Virtual.Registry; + const ponder = {} as any as Virtual.Registry; ponder.on("c1:Event0", async ({ event, context }) => { event.name; @@ -438,9 +411,3 @@ test("Registry", () => { context.contracts.c2; }); }); - -test("Drizzle", () => { - type a = Virtual.Drizzle; - - assertType({} as any as { db: DrizzleDb; tables: { table: any } }); -}); diff --git a/packages/core/src/types/virtual.ts b/packages/core/src/types/virtual.ts index 9c3ffe5b4..81cf9b4b2 100644 --- a/packages/core/src/types/virtual.ts +++ b/packages/core/src/types/virtual.ts @@ -6,9 +6,8 @@ import type { SafeEventNames, SafeFunctionNames, } from "@/config/utilityTypes.js"; +import type { Drizzle, Schema } from "@/drizzle/index.js"; import type { ReadOnlyClient } from "@/indexing/ponderActions.js"; -import type { Schema as BuilderSchema } from "@/schema/common.js"; -import type { InferSchemaType } from "@/schema/infer.js"; import type { Block, CallTrace, @@ -16,8 +15,7 @@ import type { Transaction, TransactionReceipt, } from "@/types/eth.js"; -import type { DatabaseModel } from "@/types/model.js"; -import type { ApiRegistry, ApiContext as _ApiContext } from "./api.js"; +import type { ApiRegistry } from "./api.js"; import type { Prettify } from "./utils.js"; export namespace Virtual { @@ -158,7 +156,7 @@ export namespace Virtual { export type Context< config extends Config, - schema extends BuilderSchema, + schema extends Schema, name extends EventNames, /// sourceName extends ExtractSourceName = ExtractSourceName, @@ -220,28 +218,19 @@ export namespace Virtual { | "ccipRead" > >; - db: { - [key in keyof InferSchemaType]: DatabaseModel< - // @ts-ignore - InferSchemaType[key] - >; - }; + db: Drizzle; }; - export type Drizzle = _ApiContext; - export type IndexingFunctionArgs< config extends Config, - schema extends BuilderSchema, + schema extends Schema, name extends EventNames, > = { event: Event; context: Context; }; - export type Schema = InferSchemaType; - - export type Registry = { + export type Registry = { on: >( _name: name, indexingFunction: ( diff --git a/packages/core/tsup.config.ts b/packages/core/tsup.config.ts index bbc1b1d94..526e332a3 100644 --- a/packages/core/tsup.config.ts +++ b/packages/core/tsup.config.ts @@ -3,7 +3,7 @@ import { defineConfig } from "tsup"; export default defineConfig({ name: "@ponder/core", - entry: ["src/index.ts", "src/bin/ponder.ts"], + entry: ["src/index.ts", "src/bin/ponder.ts", "src/drizzle/db.ts"], outDir: "dist", format: ["esm", "cjs"], sourcemap: true, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 6a95bdb56..119182615 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -17,9 +17,6 @@ importers: '@changesets/cli': specifier: ^2.26.2 version: 2.27.1 - drizzle-kit: - specifier: ^0.22.8 - version: 0.22.8 drizzle-orm: specifier: ^0.33.0 version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) @@ -148,7 +145,7 @@ importers: specifier: workspace:* version: link:../../packages/core drizzle-kit: - specifier: ^0.22.8 + specifier: 0.22.8 version: 0.22.8 drizzle-orm: specifier: ^0.33.0 @@ -431,6 +428,12 @@ importers: '@ponder/core': specifier: workspace:* version: link:../../packages/core + drizzle-kit: + specifier: 0.22.8 + version: 0.22.8 + drizzle-orm: + specifier: ^0.33.0 + version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) hono: specifier: ^4.5.0 version: 4.5.0 @@ -511,7 +514,7 @@ importers: dependencies: forge-std: specifier: github:foundry-rs/forge-std - version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c + version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa examples/with-foundry/ponder: dependencies: @@ -4800,9 +4803,9 @@ packages: forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c} - version: 1.9.2 + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa} + version: 1.9.3 form-data@2.3.3: resolution: {integrity: sha512-1lLKB2Mu3aGP1Q/2eCOx0fNbRMe7XdwktwOruhfqqd0rIJWwN4Dh+E3hrPSlDCXnSR7UtZ1N38rVXm+6+MEhJQ==} @@ -12879,7 +12882,7 @@ snapshots: forever-agent@0.6.1: {} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/1ce7535a517406b9aec7ea1ea27c1b41376f712c: {} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa: {} form-data@2.3.3: dependencies: From 50a37260a651a4dff29ec7589b7a3103d9f1b65a Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Fri, 27 Sep 2024 17:30:40 -0400 Subject: [PATCH 08/29] prerelease --- packages/core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/package.json b/packages/core/package.json index ef0425b4f..e69b2a9fd 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@ponder/core", - "version": "0.6.3-next.1", + "version": "0.6.3-next.2", "description": "An open-source framework for crypto application backends", "license": "MIT", "type": "module", From 07503e5ce648369ea145a8ea37f885306195da37 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Mon, 30 Sep 2024 12:23:01 -0400 Subject: [PATCH 09/29] relaxed reorg table constraints --- packages/core/src/database/index.ts | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index 016d5813a..b5fc0f0c9 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -419,6 +419,12 @@ export const createDatabase = async (args: { return dialect === "sqlite" ? JSON.stringify(app) : (app as any); }; + /** + * Undo operations in user tables by using the `_ponder_reorg` metadata. + * + * Note: `_ponder_reorg` tables may contain operations that have not been applied to the + * underlying tables, but only be 1 operation at most. + */ const revert = async ({ tableName, checkpoint, @@ -489,6 +495,8 @@ export const createDatabase = async (args: { // @ts-ignore .insertInto(tableName) .values(log as any) + // @ts-ignore + .onConflict((oc) => oc.columns(primaryKeyColumns).doNothing()) .execute(); } } From e3a9fdec67ab5573acc51908eee30f00a01df5e8 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Mon, 30 Sep 2024 12:34:55 -0400 Subject: [PATCH 10/29] export relations --- packages/core/src/drizzle/db.ts | 1 + 1 file changed, 1 insertion(+) diff --git a/packages/core/src/drizzle/db.ts b/packages/core/src/drizzle/db.ts index 0bef69cff..476cc9b7c 100644 --- a/packages/core/src/drizzle/db.ts +++ b/packages/core/src/drizzle/db.ts @@ -40,6 +40,7 @@ export { sumDistinct, max, min, + relations, } from "drizzle-orm"; export { From 51da25e8749d63fce23bb5ef03b697d36151d0fb Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Tue, 1 Oct 2024 09:33:37 -0400 Subject: [PATCH 11/29] . --- packages/core/src/database/index.ts | 22 ++++++++++++---------- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index b5fc0f0c9..da424dc8a 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -312,9 +312,11 @@ export const createDatabase = async (args: { const drizzle = createDrizzleDb({ driver }, { schema: args.schema }); - await migrate(drizzle, { - migrationsFolder: args.common.options.migrationsDir, - }); + if (fs.existsSync(args.common.options.migrationsDir)) { + await migrate(drizzle, { + migrationsFolder: args.common.options.migrationsDir, + }); + } // Register metrics if (dialect === "sqlite") { @@ -893,13 +895,13 @@ export const createDatabase = async (args: { msg: `Reverting operations after finalized checkpoint (timestamp=${blockTimestamp} chainId=${chainId} block=${blockNumber})`, }); - // for (const tableName of tableNames) { - // await revert({ - // tableName, - // checkpoint: previousApp.checkpoint, - // tx, - // }); - // } + for (const tableName of tableNames) { + await revert({ + tableName, + checkpoint: previousApp.checkpoint, + tx, + }); + } return { status: "success", From 7d9a5e6addc088f2da6a801f70123926a3187825 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Mon, 9 Sep 2024 14:42:00 -0400 Subject: [PATCH 12/29] start pglite --- packages/core/package.json | 4 +- packages/core/src/bin/commands/serve.ts | 4 +- packages/core/src/bin/utils/run.ts | 5 - .../build/configAndIndexingFunctions.test.ts | 22 +- .../src/build/configAndIndexingFunctions.ts | 20 +- packages/core/src/common/metrics.ts | 2 - packages/core/src/config/config.ts | 4 +- packages/core/src/config/database.ts | 2 +- packages/core/src/database/index.ts | 479 +++----- packages/core/src/drizzle/bigint.ts | 35 - packages/core/src/drizzle/db.ts | 34 +- packages/core/src/drizzle/hex.ts | 34 +- packages/core/src/drizzle/json.ts | 34 - packages/core/src/drizzle/list.ts | 49 - packages/core/src/drizzle/runtime.ts | 196 +--- packages/core/src/drizzle/select.ts | 709 ------------ packages/core/src/drizzle/table.ts | 8 +- .../src/graphql/buildGraphqlSchema.test.ts | 5 +- packages/core/src/index.ts | 2 +- .../core/src/indexing-store/historical.ts | 33 +- .../core/src/indexing-store/metadata.test.ts | 10 +- packages/core/src/indexing-store/metadata.ts | 10 +- packages/core/src/indexing-store/readonly.ts | 23 +- packages/core/src/indexing-store/realtime.ts | 34 +- .../core/src/indexing-store/utils/encoding.ts | 22 +- .../src/indexing-store/utils/filter.test.ts | 40 - .../core/src/indexing-store/utils/filter.ts | 6 +- packages/core/src/server/index.test.ts | 1 - packages/core/src/server/index.ts | 2 - packages/core/src/sync-store/encoding.ts | 150 +-- packages/core/src/sync-store/index.ts | 208 ++-- .../sync-store/{postgres => }/migrations.ts | 0 .../core/src/sync-store/sqlite/migrations.ts | 1013 ----------------- packages/core/src/utils/encoding.test.ts | 100 -- packages/core/src/utils/encoding.ts | 59 - packages/core/src/utils/pg.ts | 6 + packages/core/src/utils/sqlite.ts | 87 -- pnpm-lock.yaml | 496 +++++--- 38 files changed, 761 insertions(+), 3187 deletions(-) delete mode 100644 packages/core/src/drizzle/bigint.ts delete mode 100644 packages/core/src/drizzle/json.ts delete mode 100644 packages/core/src/drizzle/select.ts rename packages/core/src/sync-store/{postgres => }/migrations.ts (100%) delete mode 100644 packages/core/src/sync-store/sqlite/migrations.ts delete mode 100644 packages/core/src/utils/encoding.test.ts delete mode 100644 packages/core/src/utils/encoding.ts delete mode 100644 packages/core/src/utils/sqlite.ts diff --git a/packages/core/package.json b/packages/core/package.json index d4527fbdd..0daacbbb0 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -45,13 +45,13 @@ "dependencies": { "@babel/code-frame": "^7.23.4", "@commander-js/extra-typings": "^12.0.1", + "@electric-sql/pglite": "^0.2.5", "@escape.tech/graphql-armor-max-aliases": "^2.3.0", "@escape.tech/graphql-armor-max-depth": "^2.2.0", "@escape.tech/graphql-armor-max-tokens": "^2.3.0", "@hono/node-server": "^1.12.2", "@ponder/utils": "workspace:*", "abitype": "^0.10.2", - "better-sqlite3": "^11.1.2", "commander": "^12.0.0", "conf": "^12.0.0", "dataloader": "^2.2.2", @@ -64,6 +64,7 @@ "http-terminator": "^3.2.0", "ink": "^4.4.1", "kysely": "^0.26.3", + "kysely-pglite": "^0.6.0", "pg": "^8.11.3", "pg-connection-string": "^2.6.2", "picocolors": "^1.0.0", @@ -77,7 +78,6 @@ }, "devDependencies": { "@types/babel__code-frame": "^7.0.6", - "@types/better-sqlite3": "^7.6.10", "@types/glob": "^8.1.0", "@types/node": "^20.10.0", "@types/pg": "^8.10.9", diff --git a/packages/core/src/bin/commands/serve.ts b/packages/core/src/bin/commands/serve.ts index 543362b01..45887b067 100644 --- a/packages/core/src/bin/commands/serve.ts +++ b/packages/core/src/bin/commands/serve.ts @@ -69,9 +69,9 @@ export async function serve({ cliOptions }: { cliOptions: CliOptions }) { const { databaseConfig, schema } = api.build; - if (databaseConfig.kind === "sqlite") { + if (databaseConfig.kind === "pglite") { await shutdown({ - reason: "The 'ponder serve' command does not support SQLite", + reason: "The 'ponder serve' command does not support PGlite", code: 1, }); return cleanup; diff --git a/packages/core/src/bin/utils/run.ts b/packages/core/src/bin/utils/run.ts index a90e2e0e8..30ccf7619 100644 --- a/packages/core/src/bin/utils/run.ts +++ b/packages/core/src/bin/utils/run.ts @@ -58,11 +58,9 @@ export async function run({ const syncStore = createSyncStore({ common, db: database.qb.sync, - dialect: database.dialect, }); const metadataStore = getMetadataStore({ - dialect: database.dialect, db: database.qb.user, }); @@ -135,14 +133,12 @@ export async function run({ }); const readonlyStore = getReadonlyStore({ - dialect: database.dialect, schema, db: database.qb.user, common, }); const historicalStore = getHistoricalStore({ - dialect: database.dialect, schema, readonlyStore, db: database.qb.user, @@ -228,7 +224,6 @@ export async function run({ indexingStore = { ...readonlyStore, ...getRealtimeStore({ - dialect: database.dialect, schema, db: database.qb.user, common, diff --git a/packages/core/src/build/configAndIndexingFunctions.test.ts b/packages/core/src/build/configAndIndexingFunctions.test.ts index 8f7f66b2b..ef85556d2 100644 --- a/packages/core/src/build/configAndIndexingFunctions.test.ts +++ b/packages/core/src/build/configAndIndexingFunctions.test.ts @@ -630,7 +630,7 @@ test("buildConfigAndIndexingFunctions() coerces NaN endBlock to undefined", asyn expect(sources[0]!.filter.toBlock).toBe(undefined); }); -test("buildConfigAndIndexingFunctions() database uses sqlite by default", async () => { +test("buildConfigAndIndexingFunctions() database uses pglite by default", async () => { const config = createConfig({ networks: { mainnet: { chainId: 1, transport: http() } }, contracts: { a: { network: "mainnet", abi: [event0] } }, @@ -646,16 +646,16 @@ test("buildConfigAndIndexingFunctions() database uses sqlite by default", async options, }); expect(databaseConfig).toMatchObject({ - kind: "sqlite", - directory: expect.stringContaining(path.join(".ponder", "sqlite")), + kind: "pglite", + directory: expect.stringContaining(path.join(".ponder", "pglite")), }); process.env.DATABASE_URL = prev; }); -test("buildConfigAndIndexingFunctions() database respects custom sqlite path", async () => { +test("buildConfigAndIndexingFunctions() database respects custom pglite path", async () => { const config = createConfig({ - database: { kind: "sqlite", directory: "custom-sqlite/directory" }, + database: { kind: "pglite", directory: "custom-pglite/directory" }, networks: { mainnet: { chainId: 1, transport: http() } }, contracts: { a: { network: "mainnet", abi: [event0] } }, }); @@ -667,14 +667,14 @@ test("buildConfigAndIndexingFunctions() database respects custom sqlite path", a }); expect(databaseConfig).toMatchObject({ - kind: "sqlite", - directory: expect.stringContaining(path.join("custom-sqlite", "directory")), + kind: "pglite", + directory: expect.stringContaining(path.join("custom-pglite", "directory")), }); }); -test("buildConfigAndIndexingFunctions() database uses sqlite if specified even if DATABASE_URL env var present", async () => { +test("buildConfigAndIndexingFunctions() database uses pglite if specified even if DATABASE_URL env var present", async () => { const config = createConfig({ - database: { kind: "sqlite" }, + database: { kind: "pglite" }, networks: { mainnet: { chainId: 1, transport: http() } }, contracts: { a: { network: "mainnet", abi: [event0] } }, }); @@ -687,8 +687,8 @@ test("buildConfigAndIndexingFunctions() database uses sqlite if specified even i options, }); expect(databaseConfig).toMatchObject({ - kind: "sqlite", - directory: expect.stringContaining(path.join(".ponder", "sqlite")), + kind: "pglite", + directory: expect.stringContaining(path.join(".ponder", "pglite")), }); vi.unstubAllEnvs(); diff --git a/packages/core/src/build/configAndIndexingFunctions.ts b/packages/core/src/build/configAndIndexingFunctions.ts index 67a0d9a94..26ececdce 100644 --- a/packages/core/src/build/configAndIndexingFunctions.ts +++ b/packages/core/src/build/configAndIndexingFunctions.ts @@ -41,13 +41,13 @@ export async function buildConfigAndIndexingFunctions({ // Build database. let databaseConfig: DatabaseConfig; - // Determine SQLite directory, preferring config.database.directory if available - const sqliteDir = - config.database?.kind === "sqlite" && config.database.directory + // Determine PGlite directory, preferring config.database.directory if available + const pgliteDir = + config.database?.kind === "pglite" && config.database.directory ? path.resolve(config.database.directory) - : path.join(ponderDir, "sqlite"); + : path.join(ponderDir, "pglite"); - const sqlitePrintPath = path.relative(rootDir, sqliteDir); + const pglitePrintPath = path.relative(rootDir, pgliteDir); if (config.database?.kind) { if (config.database.kind === "postgres") { @@ -111,10 +111,10 @@ export async function buildConfigAndIndexingFunctions({ } else { logs.push({ level: "info", - msg: `Using SQLite database in '${sqlitePrintPath}' (from ponder.config.ts)`, + msg: `Using PGlite database in '${pglitePrintPath}' (from ponder.config.ts)`, }); - databaseConfig = { kind: "sqlite", directory: sqliteDir }; + databaseConfig = { kind: "pglite", directory: pgliteDir }; } } else { let connectionString: string | undefined = undefined; @@ -164,13 +164,13 @@ export async function buildConfigAndIndexingFunctions({ schema, }; } else { - // Fall back to SQLite. + // Fall back to PGlite. logs.push({ level: "info", - msg: `Using SQLite database at ${sqlitePrintPath} (default)`, + msg: `Using PGlite database at ${pglitePrintPath} (default)`, }); - databaseConfig = { kind: "sqlite", directory: sqliteDir }; + databaseConfig = { kind: "pglite", directory: pgliteDir }; } } diff --git a/packages/core/src/common/metrics.ts b/packages/core/src/common/metrics.ts index 663111e38..9c949a2cc 100644 --- a/packages/core/src/common/metrics.ts +++ b/packages/core/src/common/metrics.ts @@ -61,8 +61,6 @@ export class MetricsService { ponder_postgres_query_queue_size: prometheus.Gauge<"pool"> = null!; ponder_postgres_query_total: prometheus.Counter<"pool"> = null!; - ponder_sqlite_query_total: prometheus.Counter<"database"> = null!; - constructor() { this.registry = new prometheus.Registry(); diff --git a/packages/core/src/config/config.ts b/packages/core/src/config/config.ts index c4b2f0b77..a9b4fdbc9 100644 --- a/packages/core/src/config/config.ts +++ b/packages/core/src/config/config.ts @@ -14,8 +14,8 @@ export type BlockConfig = { type DatabaseConfig = | { - kind: "sqlite"; - /** Directory path to use for SQLite database files. Default: `".ponder/sqlite"`. */ + kind: "pglite"; + /** Directory path to use for PGlite database files. Default: `".ponder/pglite"`. */ directory?: string; } | { diff --git a/packages/core/src/config/database.ts b/packages/core/src/config/database.ts index 241ab01ff..d87816bf7 100644 --- a/packages/core/src/config/database.ts +++ b/packages/core/src/config/database.ts @@ -4,7 +4,7 @@ import type { PoolConfig as RawPoolConfig } from "pg"; export type PoolConfig = Prettify; export type DatabaseConfig = - | { kind: "sqlite"; directory: string } + | { kind: "pglite"; directory: string } | { kind: "postgres"; poolConfig: PoolConfig; diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index 2dec76b88..484ac1cbe 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -1,4 +1,3 @@ -import fs from "node:fs"; import path from "node:path"; import type { Common } from "@/common/common.js"; import { NonRetryableError } from "@/common/errors.js"; @@ -18,8 +17,8 @@ import type { PonderSyncSchema } from "@/sync-store/encoding.js"; import { moveLegacyTables, migrationProvider as postgresMigrationProvider, -} from "@/sync-store/postgres/migrations.js"; -import { migrationProvider as sqliteMigrationProvider } from "@/sync-store/sqlite/migrations.js"; +} from "@/sync-store/migrations.js"; +import type { Status } from "@/sync/index.js"; import type { UserTable } from "@/types/schema.js"; import { decodeCheckpoint, @@ -28,12 +27,8 @@ import { } from "@/utils/checkpoint.js"; import { formatEta } from "@/utils/format.js"; import { createPool, createReadonlyPool } from "@/utils/pg.js"; -import { - type SqliteDatabase, - createReadonlySqliteDatabase, - createSqliteDatabase, -} from "@/utils/sqlite.js"; import { wait } from "@/utils/wait.js"; +import type { PGlite } from "@electric-sql/pglite"; import { Migrator, PostgresDialect, @@ -41,13 +36,12 @@ import { WithSchemaPlugin, sql, } from "kysely"; -import { SqliteDialect } from "kysely"; import type { Pool } from "pg"; import prometheus from "prom-client"; import { HeadlessKysely } from "./kysely.js"; export type Database< - dialect extends "sqlite" | "postgres" = "sqlite" | "postgres", + dialect extends "pglite" | "postgres" = "pglite" | "postgres", > = { dialect: dialect; namespace: string; @@ -88,7 +82,7 @@ type PonderApp = { type PonderInternalSchema = { _ponder_meta: { key: "status" | "app"; - value: string | null; + value: PonderApp | Status | null; }; } & { [_: `_ponder_reorg__${string}`]: { @@ -101,11 +95,11 @@ type PonderInternalSchema = { [tableName: string]: UserTable; }; -type Driver = dialect extends "sqlite" +type Driver = dialect extends "pglite" ? { - user: SqliteDatabase; - readonly: SqliteDatabase; - sync: SqliteDatabase; + user: PGlite; + readonly: PGlite; + sync: PGlite; } : { internal: Pool; @@ -125,15 +119,6 @@ type QueryBuilder = { sync: HeadlessKysely; }; -const scalarToSqliteType = { - boolean: "integer", - int: "integer", - float: "real", - string: "text", - bigint: "varchar(79)", - hex: "blob", -} as const; - const scalarToPostgresType = { boolean: "integer", int: "integer", @@ -159,18 +144,18 @@ export const createDatabase = (args: { let driver: Database["driver"]; let qb: Database["qb"]; - if (args.databaseConfig.kind === "sqlite") { - dialect = "sqlite"; + if (args.databaseConfig.kind === "pglite") { + dialect = "pglite"; namespace = "public"; const userFile = path.join(args.databaseConfig.directory, "public.db"); const syncFile = path.join(args.databaseConfig.directory, "ponder_sync.db"); - driver = { - user: createSqliteDatabase(userFile), - readonly: createReadonlySqliteDatabase(userFile), - sync: createSqliteDatabase(syncFile), - }; + // driver = { + // user: createSqliteDatabase(userFile), + // readonly: createReadonlySqliteDatabase(userFile), + // sync: createSqliteDatabase(syncFile), + // }; qb = { internal: new HeadlessKysely({ @@ -316,108 +301,81 @@ export const createDatabase = (args: { } // Register metrics - if (dialect === "sqlite") { - args.common.metrics.registry.removeSingleMetric( - "ponder_sqlite_query_total", - ); - args.common.metrics.ponder_sqlite_query_total = new prometheus.Counter({ - name: "ponder_sqlite_query_total", - help: "Number of queries submitted to the database", - labelNames: ["database"] as const, - registers: [args.common.metrics.registry], - }); - } else { - args.common.metrics.registry.removeSingleMetric( - "ponder_postgres_query_total", - ); - args.common.metrics.ponder_postgres_query_total = new prometheus.Counter({ - name: "ponder_postgres_query_total", - help: "Total number of queries submitted to the database", - labelNames: ["pool"] as const, - registers: [args.common.metrics.registry], - }); - args.common.metrics.registry.removeSingleMetric( - "ponder_postgres_pool_connections", - ); - args.common.metrics.ponder_postgres_pool_connections = new prometheus.Gauge( - { - name: "ponder_postgres_pool_connections", - help: "Number of connections in the pool", - labelNames: ["pool", "kind"] as const, - registers: [args.common.metrics.registry], - collect() { - this.set( - { pool: "internal", kind: "idle" }, - // @ts-ignore - driver.internal.idleCount, - ); - this.set( - { pool: "internal", kind: "total" }, - // @ts-ignore - driver.internal.totalCount, - ); + args.common.metrics.registry.removeSingleMetric( + "ponder_postgres_query_total", + ); + args.common.metrics.ponder_postgres_query_total = new prometheus.Counter({ + name: "ponder_postgres_query_total", + help: "Total number of queries submitted to the database", + labelNames: ["pool"] as const, + registers: [args.common.metrics.registry], + }); + + args.common.metrics.registry.removeSingleMetric( + "ponder_postgres_pool_connections", + ); + args.common.metrics.ponder_postgres_pool_connections = new prometheus.Gauge({ + name: "ponder_postgres_pool_connections", + help: "Number of connections in the pool", + labelNames: ["pool", "kind"] as const, + registers: [args.common.metrics.registry], + collect() { + this.set( + { pool: "internal", kind: "idle" }, + // @ts-ignore + driver.internal.idleCount, + ); + this.set( + { pool: "internal", kind: "total" }, + // @ts-ignore + driver.internal.totalCount, + ); - this.set( - { pool: "sync", kind: "idle" }, - (driver.sync as Pool).idleCount, - ); - this.set( - { pool: "sync", kind: "total" }, - (driver.sync as Pool).totalCount, - ); + this.set({ pool: "sync", kind: "idle" }, (driver.sync as Pool).idleCount); + this.set( + { pool: "sync", kind: "total" }, + (driver.sync as Pool).totalCount, + ); - this.set( - { pool: "user", kind: "idle" }, - (driver.user as Pool).idleCount, - ); - this.set( - { pool: "user", kind: "total" }, - (driver.user as Pool).totalCount, - ); + this.set({ pool: "user", kind: "idle" }, (driver.user as Pool).idleCount); + this.set( + { pool: "user", kind: "total" }, + (driver.user as Pool).totalCount, + ); - this.set( - { pool: "readonly", kind: "idle" }, - (driver.readonly as Pool).idleCount, - ); - this.set( - { pool: "readonly", kind: "total" }, - (driver.readonly as Pool).totalCount, - ); - }, - }, - ); + this.set( + { pool: "readonly", kind: "idle" }, + (driver.readonly as Pool).idleCount, + ); + this.set( + { pool: "readonly", kind: "total" }, + (driver.readonly as Pool).totalCount, + ); + }, + }); + + args.common.metrics.registry.removeSingleMetric( + "ponder_postgres_query_queue_size", + ); + args.common.metrics.ponder_postgres_query_queue_size = new prometheus.Gauge({ + name: "ponder_postgres_query_queue_size", + help: "Number of query requests waiting for an available connection", + labelNames: ["pool"] as const, + registers: [args.common.metrics.registry], + collect() { + // @ts-ignore + this.set({ pool: "internal" }, driver.internal.waitingCount); + this.set({ pool: "sync" }, (driver.sync as Pool).waitingCount); + this.set({ pool: "user" }, (driver.user as Pool).waitingCount); + this.set({ pool: "readonly" }, (driver.readonly as Pool).waitingCount); + }, + }); - args.common.metrics.registry.removeSingleMetric( - "ponder_postgres_query_queue_size", - ); - args.common.metrics.ponder_postgres_query_queue_size = new prometheus.Gauge( - { - name: "ponder_postgres_query_queue_size", - help: "Number of query requests waiting for an available connection", - labelNames: ["pool"] as const, - registers: [args.common.metrics.registry], - collect() { - // @ts-ignore - this.set({ pool: "internal" }, driver.internal.waitingCount); - this.set({ pool: "sync" }, (driver.sync as Pool).waitingCount); - this.set({ pool: "user" }, (driver.user as Pool).waitingCount); - this.set( - { pool: "readonly" }, - (driver.readonly as Pool).waitingCount, - ); - }, - }, - ); - } //////// // Helpers //////// - const encodeApp = (app: PonderApp) => { - return dialect === "sqlite" ? JSON.stringify(app) : (app as any); - }; - const revert = async ({ tableName, checkpoint, @@ -496,20 +454,11 @@ export const createDatabase = (args: { }); } - let migrator: Migrator; - - if (dialect === "sqlite") { - migrator = new Migrator({ - db: qb.sync as any, - provider: sqliteMigrationProvider, - }); - } else { - migrator = new Migrator({ - db: qb.sync as any, - provider: postgresMigrationProvider, - migrationTableSchema: "ponder_sync", - }); - } + const migrator = new Migrator({ + db: qb.sync as any, + provider: postgresMigrationProvider, + migrationTableSchema: "ponder_sync", + }); const { error } = await migrator.migrateToLatest(); if (error) throw error; @@ -524,136 +473,57 @@ export const createDatabase = (args: { // v0.6 migration - if (args.databaseConfig.kind === "sqlite") { - const ponderFile = path.join( - args.databaseConfig.directory, - "ponder.db", - ); - if (fs.existsSync(ponderFile)) { - const _driver = createSqliteDatabase(ponderFile); - const _orm = new HeadlessKysely({ - name: "user", - common: args.common, - dialect: new SqliteDialect({ database: _driver }), - }); - await qb.internal.wrap({ method: "setup" }, async () => { - const namespaceCount = await _orm - .selectFrom("namespace_lock") - .select(sql`count(*)`.as("count")) - .executeTakeFirst(); - - const tableNames = await _orm - .selectFrom("namespace_lock") - .select("schema") - .where("namespace", "=", namespace) - .executeTakeFirst() - .then((schema) => - schema === undefined - ? undefined - : Object.keys(JSON.parse(schema.schema).tables), - ); - if (tableNames) { - for (const tableName of tableNames) { - await qb.internal.schema - .dropTable(tableName) - .ifExists() - .execute(); - } - - await _orm - .deleteFrom("namespace_lock") - .where("namespace", "=", namespace) + const hasPonderSchema = await qb.internal + .selectFrom("information_schema.schemata") + .select("schema_name") + .where("schema_name", "=", "ponder") + .executeTakeFirst() + .then((schema) => schema?.schema_name === "ponder"); + + if (hasPonderSchema) { + await qb.internal.wrap({ method: "setup" }, async () => { + const namespaceCount = await qb.internal + .withSchema("ponder") + .selectFrom("namespace_lock") + .select(sql`count(*)`.as("count")) + .executeTakeFirst(); + + const tableNames = await qb.internal + .withSchema("ponder") + .selectFrom("namespace_lock") + .select("schema") + .where("namespace", "=", namespace) + .executeTakeFirst() + .then((schema: any | undefined) => + schema === undefined + ? undefined + : Object.keys(schema.schema.tables), + ); + if (tableNames) { + for (const tableName of tableNames) { + await qb.internal.schema + .dropTable(tableName) + .ifExists() + .cascade() .execute(); - - await _orm.destroy(); - _driver.close(); - - if (namespaceCount!.count === 1) { - fs.rmSync( - // @ts-ignore - path.join(args.databaseConfig.directory, "ponder.db"), - { - force: true, - }, - ); - fs.rmSync( - // @ts-ignore - path.join(args.databaseConfig.directory, "ponder.db-shm"), - { - force: true, - }, - ); - fs.rmSync( - // @ts-ignore - path.join(args.databaseConfig.directory, "ponder.db-wal"), - { - force: true, - }, - ); - args.common.logger.debug({ - service: "database", - msg: `Removed '.ponder/sqlite/ponder.db' file`, - }); - } } - }); - } - } else { - const hasPonderSchema = await qb.internal - .selectFrom("information_schema.schemata") - .select("schema_name") - .where("schema_name", "=", "ponder") - .executeTakeFirst() - .then((schema) => schema?.schema_name === "ponder"); - - if (hasPonderSchema) { - await qb.internal.wrap({ method: "setup" }, async () => { - const namespaceCount = await qb.internal - .withSchema("ponder") - .selectFrom("namespace_lock") - .select(sql`count(*)`.as("count")) - .executeTakeFirst(); - const tableNames = await qb.internal + await qb.internal .withSchema("ponder") - .selectFrom("namespace_lock") - .select("schema") + .deleteFrom("namespace_lock") .where("namespace", "=", namespace) - .executeTakeFirst() - .then((schema: any | undefined) => - schema === undefined - ? undefined - : Object.keys(schema.schema.tables), - ); - if (tableNames) { - for (const tableName of tableNames) { - await qb.internal.schema - .dropTable(tableName) - .ifExists() - .cascade() - .execute(); - } - - await qb.internal - .withSchema("ponder") - .deleteFrom("namespace_lock") - .where("namespace", "=", namespace) - .execute(); + .execute(); - if (namespaceCount!.count === 1) { - await qb.internal.schema - .dropSchema("ponder") - .cascade() - .execute(); + if (namespaceCount!.count === 1) { + await qb.internal.schema.dropSchema("ponder").cascade().execute(); - args.common.logger.debug({ - service: "database", - msg: `Removed 'ponder' schema`, - }); - } + args.common.logger.debug({ + service: "database", + msg: `Removed 'ponder' schema`, + }); } - }); - } + } + }); } await qb.internal.wrap({ method: "setup" }, async () => { @@ -738,9 +608,7 @@ export const createDatabase = (args: { // Non-list base columns builder = builder.addColumn( columnName, - (dialect === "sqlite" - ? scalarToSqliteType - : scalarToPostgresType)[column[" scalar"]], + scalarToPostgresType[column[" scalar"]], (col) => { if (isOptionalColumn(column) === false) col = col.notNull(); @@ -795,9 +663,7 @@ export const createDatabase = (args: { // Non-list base columns builder = builder.addColumn( columnName, - (dialect === "sqlite" - ? scalarToSqliteType - : scalarToPostgresType)[column[" scalar"]], + scalarToPostgresType[column[" scalar"]], (col) => { if (columnName === "id") col = col.notNull(); return col; @@ -807,10 +673,8 @@ export const createDatabase = (args: { } builder = builder - .addColumn( - "operation_id", - dialect === "sqlite" ? "integer" : "serial", - (col) => col.notNull().primaryKey(), + .addColumn("operation_id", "serial", (col) => + col.notNull().primaryKey(), ) .addColumn("checkpoint", "varchar(75)", (col) => col.notNull(), @@ -831,12 +695,8 @@ export const createDatabase = (args: { .select("value") .executeTakeFirst(); - const previousApp: PonderApp | undefined = - row === undefined - ? undefined - : dialect === "sqlite" - ? JSON.parse(row.value!) - : row.value; + const previousApp: PonderApp | null = + (row?.value as PonderApp) ?? null; const newApp = { is_locked: 1, @@ -860,7 +720,7 @@ export const createDatabase = (args: { .execute(); await tx .insertInto("_ponder_meta") - .values({ key: "app", value: encodeApp(newApp) }) + .values({ key: "app", value: newApp }) .execute(); args.common.logger.debug({ service: "database", @@ -908,12 +768,12 @@ export const createDatabase = (args: { await tx .updateTable("_ponder_meta") .set({ - value: encodeApp({ + value: { ...previousApp, is_locked: 1, is_dev: 0, heartbeat_at: Date.now(), - }), + }, }) .where("key", "=", "app") .execute(); @@ -978,7 +838,7 @@ export const createDatabase = (args: { await tx .updateTable("_ponder_meta") - .set({ value: encodeApp(newApp) }) + .set({ value: newApp }) .where("key", "=", "app") .execute(); @@ -1043,10 +903,7 @@ export const createDatabase = (args: { .updateTable("_ponder_meta") .where("key", "=", "app") .set({ - value: - dialect === "sqlite" - ? sql`json_set(value, '$.heartbeat_at', ${heartbeat})` - : sql`jsonb_set(value, '{heartbeat_at}', ${heartbeat})`, + value: sql`jsonb_set(value, '{heartbeat_at}', ${heartbeat})`, }) .execute(); @@ -1083,33 +940,21 @@ export const createDatabase = (args: { const order = index[" order"]; const nulls = index[" nulls"]; - if (dialect === "sqlite") { - const columns = Array.isArray(indexColumn) - ? indexColumn.map((ic) => `"${ic}"`).join(", ") - : `"${indexColumn}" ${order === "asc" ? "ASC" : order === "desc" ? "DESC" : ""}`; - - await qb.internal.executeQuery( - sql`CREATE INDEX ${sql.ref(indexName)} ON ${sql.table( - tableName, - )} (${sql.raw(columns)})`.compile(qb.internal), - ); - } else { - const columns = Array.isArray(indexColumn) - ? indexColumn.map((ic) => `"${ic}"`).join(", ") - : `"${indexColumn}" ${order === "asc" ? "ASC" : order === "desc" ? "DESC" : ""} ${ - nulls === "first" - ? "NULLS FIRST" - : nulls === "last" - ? "NULLS LAST" - : "" - }`; - - await qb.internal.executeQuery( - sql`CREATE INDEX ${sql.ref(indexName)} ON ${sql.table( - `${namespace}.${tableName}`, - )} (${sql.raw(columns)})`.compile(qb.internal), - ); - } + const columns = Array.isArray(indexColumn) + ? indexColumn.map((ic) => `"${ic}"`).join(", ") + : `"${indexColumn}" ${order === "asc" ? "ASC" : order === "desc" ? "DESC" : ""} ${ + nulls === "first" + ? "NULLS FIRST" + : nulls === "last" + ? "NULLS LAST" + : "" + }`; + + await qb.internal.executeQuery( + sql`CREATE INDEX ${sql.ref(indexName)} ON ${sql.table( + `${namespace}.${tableName}`, + )} (${sql.raw(columns)})`.compile(qb.internal), + ); }); args.common.logger.info({ @@ -1142,10 +987,7 @@ export const createDatabase = (args: { .updateTable("_ponder_meta") .where("key", "=", "app") .set({ - value: - dialect === "sqlite" - ? sql`json_set(value, '$.checkpoint', ${checkpoint})` - : sql`jsonb_set(value, '{checkpoint}', to_jsonb(${checkpoint}::varchar(75)))`, + value: sql`jsonb_set(value, '{checkpoint}', to_jsonb(${checkpoint}::varchar(75)))`, }) .execute(); @@ -1173,10 +1015,7 @@ export const createDatabase = (args: { .updateTable("_ponder_meta") .where("key", "=", "app") .set({ - value: - dialect === "sqlite" - ? sql`json_set(value, '$.is_locked', 0)` - : sql`jsonb_set(value, '{is_locked}', to_jsonb(0))`, + value: sql`jsonb_set(value, '{is_locked}', to_jsonb(0))`, }) .execute(); @@ -1190,7 +1029,7 @@ export const createDatabase = (args: { await qb.readonly.destroy(); await qb.sync.destroy(); - if (dialect === "sqlite") { + if (dialect === "pglite") { // @ts-ignore driver.user.close(); // @ts-ignore diff --git a/packages/core/src/drizzle/bigint.ts b/packages/core/src/drizzle/bigint.ts deleted file mode 100644 index 0e499df67..000000000 --- a/packages/core/src/drizzle/bigint.ts +++ /dev/null @@ -1,35 +0,0 @@ -import { decodeToBigInt, encodeAsText } from "@/utils/encoding.js"; -import { entityKind } from "drizzle-orm"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; - -export class SQLiteBigintBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteBigintBuilder"; - - constructor(columnName: string) { - super(columnName, "string", "SQLiteBigint"); - } - - build(table: AnySQLiteTable) { - return new SQLiteBigint(table, this.config); - } -} - -export class SQLiteBigint extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteBigint"; - - getSQLType(): string { - return "varchar(79)"; - } - - override mapFromDriverValue(value: string) { - return decodeToBigInt(value); - } - - override mapToDriverValue(value: bigint): string { - return encodeAsText(value as bigint); - } -} diff --git a/packages/core/src/drizzle/db.ts b/packages/core/src/drizzle/db.ts index 76b87d550..a2c7087a3 100644 --- a/packages/core/src/drizzle/db.ts +++ b/packages/core/src/drizzle/db.ts @@ -1,29 +1,7 @@ -import type { Column, SQLWrapper, SelectedFields, Table } from "drizzle-orm"; -import type { SelectBuilder } from "./select.js"; +import type { NodePgDatabase } from "drizzle-orm/node-postgres"; +import type { PgliteDatabase } from "drizzle-orm/pglite"; -export type DrizzleDb = { - select(): SelectBuilder; - select>( - fields: TSelection, - ): SelectBuilder; - select( - fields?: SelectedFields, - ): SelectBuilder | undefined, "async", void>; - /** - * Execute a raw read-only SQL query.. - * - * @example - * import { ponder } from "@/generated"; - * import { sql } from "@ponder/core"; - * - * ponder.get("/", async (c) => { - * const result = await c.db.execute(sql`SELECT * from "Accounts"`); - * return c.json(result); - * }); - * - * @see https://orm.drizzle.team/docs/sql - */ - execute: >( - query: SQLWrapper, - ) => Promise; -}; +export type DrizzleDb = Pick< + NodePgDatabase | PgliteDatabase, + "select" | "execute" +>; diff --git a/packages/core/src/drizzle/hex.ts b/packages/core/src/drizzle/hex.ts index 40708fd7a..25a84451a 100644 --- a/packages/core/src/drizzle/hex.ts +++ b/packages/core/src/drizzle/hex.ts @@ -4,11 +4,7 @@ import { PgColumn, PgColumnBuilder, } from "drizzle-orm/pg-core"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; + import { bytesToHex, hexToBytes } from "viem"; export class PgHexBuilder extends PgColumnBuilder { @@ -38,31 +34,3 @@ export class PgHex extends PgColumn { return Buffer.from(hexToBytes(value)); } } - -export class SQLiteHexBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteHexBuilder"; - - constructor(columnName: string) { - super(columnName, "buffer", "SQLiteHex"); - } - - build(table: AnySQLiteTable) { - return new SQLiteHex(table, this.config); - } -} - -export class SQLiteHex extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteHex"; - - getSQLType(): string { - return "blob"; - } - - override mapFromDriverValue(value: Buffer) { - return bytesToHex(value); - } - - override mapToDriverValue(value: `0x${string}`): Buffer { - return Buffer.from(hexToBytes(value)); - } -} diff --git a/packages/core/src/drizzle/json.ts b/packages/core/src/drizzle/json.ts deleted file mode 100644 index 1503ce56f..000000000 --- a/packages/core/src/drizzle/json.ts +++ /dev/null @@ -1,34 +0,0 @@ -import { entityKind } from "drizzle-orm"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; - -export class SQLiteJsonBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteJsonBuilder"; - - constructor(columnName: string) { - super(columnName, "json", "SQLiteJson"); - } - - build(table: AnySQLiteTable) { - return new SQLiteJson(table, this.config); - } -} - -export class SQLiteJson extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteJson"; - - getSQLType(): string { - return "jsonb"; - } - - override mapFromDriverValue(value: string) { - return JSON.parse(value); - } - - override mapToDriverValue(value: object): string { - return JSON.stringify(value); - } -} diff --git a/packages/core/src/drizzle/list.ts b/packages/core/src/drizzle/list.ts index 2139c96ce..d2cc37796 100644 --- a/packages/core/src/drizzle/list.ts +++ b/packages/core/src/drizzle/list.ts @@ -5,11 +5,6 @@ import { PgColumn, PgColumnBuilder, } from "drizzle-orm/pg-core"; -import { - type AnySQLiteTable, - SQLiteColumn, - SQLiteColumnBuilder, -} from "drizzle-orm/sqlite-core"; export class PgListBuilder extends PgColumnBuilder { static readonly [entityKind]: string = "PgListBuilder"; @@ -54,47 +49,3 @@ export class PgList extends PgColumn { : JSON.stringify(value); } } - -export class SQLiteListBuilder extends SQLiteColumnBuilder { - static readonly [entityKind]: string = "SQliteListBuilder"; - element: Scalar; - - constructor(columnName: string, element: Scalar) { - super(columnName, "string", "PgList"); - this.element = element; - } - - build(table: AnySQLiteTable) { - return new SQLiteList(table, this.config, this.element); - } -} - -export class SQLiteList extends SQLiteColumn { - static readonly [entityKind]: string = "SQLiteList"; - element: Scalar; - - constructor( - table: AnyPgTable, - config: SQLiteListBuilder["config"], - element: Scalar, - ) { - super(table, config); - this.element = element; - } - - getSQLType(): string { - return "text"; - } - - override mapFromDriverValue(value: string) { - return this.element === "bigint" - ? JSON.parse(value).map(BigInt) - : JSON.parse(value); - } - - override mapToDriverValue(value: Array): string { - return this.element === "bigint" - ? JSON.stringify(value.map(String)) - : JSON.stringify(value); - } -} diff --git a/packages/core/src/drizzle/runtime.ts b/packages/core/src/drizzle/runtime.ts index cbd5ab6e8..2d3457016 100644 --- a/packages/core/src/drizzle/runtime.ts +++ b/packages/core/src/drizzle/runtime.ts @@ -10,9 +10,6 @@ import { isScalarColumn, } from "@/schema/utils.js"; import { getTables } from "@/schema/utils.js"; -import type { SqliteDatabase } from "@/utils/sqlite.js"; -import { type Table, TableAliasProxyHandler } from "drizzle-orm"; -import { drizzle as drizzleSQLite } from "drizzle-orm/better-sqlite3"; import { drizzle as drizzlePg } from "drizzle-orm/node-postgres"; import { pgSchema, pgTable } from "drizzle-orm/pg-core"; import { @@ -22,67 +19,19 @@ import { numeric as PgNumeric, text as PgText, } from "drizzle-orm/pg-core"; -import type { View } from "drizzle-orm/sql"; -import { - integer as SQLiteInteger, - real as SQLiteReal, - text as SQLiteText, - sqliteTable, -} from "drizzle-orm/sqlite-core"; import type { Pool } from "pg"; -import { SQLiteBigintBuilder } from "./bigint.js"; -import { PgHexBuilder, SQLiteHexBuilder } from "./hex.js"; -import { SQLiteJsonBuilder } from "./json.js"; -import { PgListBuilder, SQLiteListBuilder } from "./list.js"; -import type { BuildAliasTable } from "./select.js"; +import { PgHexBuilder } from "./hex.js"; +import { PgListBuilder } from "./list.js"; export const createDrizzleDb = (database: Database) => { - if (database.dialect === "postgres") { - const drizzle = drizzlePg(database.driver.readonly as Pool); - return { - // @ts-ignore - select: (...args: any[]) => drizzle.select(...args), - execute: (query: any) => drizzle.execute(query), - }; - } else { - const drizzle = drizzleSQLite(database.driver.readonly as SqliteDatabase); - return { - // @ts-ignore - select: (...args: any[]) => drizzle.select(...args), - execute: (query: any) => { - try { - try { - return drizzle.all(query); - } catch (e) { - const error = e as Error; - if ( - error.name === "SqliteError" && - error.message === - "This statement does not return data. Use run() instead" - ) { - return drizzle.run(query); - } else { - throw error; - } - } - } catch (e) { - const error = e as Error; - if (error.cause) throw error.cause; - throw error; - } - }, - }; - } + const drizzle = drizzlePg(database.driver.readonly as Pool); + return { + // @ts-ignore + select: (...args: any[]) => drizzle.select(...args), + execute: (query: any) => drizzle.execute(query), + }; }; -export function alias( - table: tableOrView, - alias: alias, -): BuildAliasTable { - return new Proxy(table, new TableAliasProxyHandler(alias, false)) as any; -} - -type SQLiteTable = Parameters[1]; type PostgresTable = Parameters[1]; type DrizzleTable = { [tableName: string]: any }; @@ -95,72 +44,46 @@ export const createDrizzleTables = (schema: Schema, database: Database) => { for (const [columnName, column] of Object.entries(table)) { if (isMaterialColumn(column)) { if (isJSONColumn(column)) { - drizzleColumns[columnName] = convertJsonColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertJsonColumn(columnName); } else if (isEnumColumn(column)) { if (isListColumn(column)) { drizzleColumns[columnName] = convertListColumn( columnName, - database.dialect, "string", ); } else { - drizzleColumns[columnName] = convertEnumColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertEnumColumn(columnName); } } else if (isScalarColumn(column) || isReferenceColumn(column)) { if (isListColumn(column)) { drizzleColumns[columnName] = convertListColumn( columnName, - database.dialect, column[" scalar"], ); } else { switch (column[" scalar"]) { case "string": - drizzleColumns[columnName] = convertStringColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertStringColumn(columnName); break; case "int": - drizzleColumns[columnName] = convertIntColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertIntColumn(columnName); break; case "boolean": - drizzleColumns[columnName] = convertBooleanColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertBooleanColumn(columnName); break; case "float": - drizzleColumns[columnName] = convertFloatColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertFloatColumn(columnName); break; case "hex": - drizzleColumns[columnName] = convertHexColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertHexColumn(columnName); break; case "bigint": - drizzleColumns[columnName] = convertBigintColumn( - columnName, - database.dialect, - ); + drizzleColumns[columnName] = convertBigintColumn(columnName); break; } } @@ -176,24 +99,17 @@ export const createDrizzleTables = (schema: Schema, database: Database) => { } } - if (database.dialect === "postgres") { - // Note: this is to avoid an error thrown by drizzle when - // setting schema to "public". - if (database.namespace === "public") { - drizzleTables[tableName] = pgTable( - tableName, - drizzleColumns as PostgresTable, - ); - } else { - drizzleTables[tableName] = pgSchema(database.namespace).table( - tableName, - drizzleColumns as PostgresTable, - ); - } + // Note: this is to avoid an error thrown by drizzle when + // setting schema to "public". + if (database.namespace === "public") { + drizzleTables[tableName] = pgTable( + tableName, + drizzleColumns as PostgresTable, + ); } else { - drizzleTables[tableName] = sqliteTable( + drizzleTables[tableName] = pgSchema(database.namespace).table( tableName, - drizzleColumns as SQLiteTable, + drizzleColumns as PostgresTable, ); } } @@ -201,64 +117,38 @@ export const createDrizzleTables = (schema: Schema, database: Database) => { return drizzleTables; }; -const convertStringColumn = ( - columnName: string, - kind: "sqlite" | "postgres", -) => { - return kind === "sqlite" ? SQLiteText(columnName) : PgText(columnName); +const convertStringColumn = (columnName: string) => { + return PgText(columnName); }; -const convertIntColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" ? SQLiteInteger(columnName) : PgInteger(columnName); +const convertIntColumn = (columnName: string) => { + return PgInteger(columnName); }; -const convertFloatColumn = ( - columnName: string, - kind: "sqlite" | "postgres", -) => { - return kind === "sqlite" - ? SQLiteReal(columnName) - : PgDoublePrecision(columnName); +const convertFloatColumn = (columnName: string) => { + return PgDoublePrecision(columnName); }; -const convertBooleanColumn = ( - columnName: string, - kind: "sqlite" | "postgres", -) => { - return kind === "sqlite" ? SQLiteInteger(columnName) : PgInteger(columnName); +const convertBooleanColumn = (columnName: string) => { + return PgInteger(columnName); }; -const convertHexColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" - ? new SQLiteHexBuilder(columnName) - : new PgHexBuilder(columnName); +const convertHexColumn = (columnName: string) => { + return new PgHexBuilder(columnName); }; -const convertBigintColumn = ( - columnName: string, - kind: "sqlite" | "postgres", -) => { - return kind === "sqlite" - ? new SQLiteBigintBuilder(columnName) - : PgNumeric(columnName, { precision: 78 }); +const convertBigintColumn = (columnName: string) => { + return PgNumeric(columnName, { precision: 78 }); }; -const convertListColumn = ( - columnName: string, - kind: "sqlite" | "postgres", - element: Scalar, -) => { - return kind === "sqlite" - ? new SQLiteListBuilder(columnName, element) - : new PgListBuilder(columnName, element); +const convertListColumn = (columnName: string, element: Scalar) => { + return new PgListBuilder(columnName, element); }; -const convertJsonColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" - ? new SQLiteJsonBuilder(columnName) - : PgJsonb(columnName); +const convertJsonColumn = (columnName: string) => { + return PgJsonb(columnName); }; -const convertEnumColumn = (columnName: string, kind: "sqlite" | "postgres") => { - return kind === "sqlite" ? SQLiteText(columnName) : PgText(columnName); +const convertEnumColumn = (columnName: string) => { + return PgText(columnName); }; diff --git a/packages/core/src/drizzle/select.ts b/packages/core/src/drizzle/select.ts deleted file mode 100644 index dc6a592d2..000000000 --- a/packages/core/src/drizzle/select.ts +++ /dev/null @@ -1,709 +0,0 @@ -import type { - Assume, - Column, - MakeColumnConfig, - QueryPromise, - SelectedFields, - SelectedFieldsOrdered, - Subquery, - Table, - TableConfig, - UpdateTableConfig, - ValidateShape, - entityKind, -} from "drizzle-orm"; -import { TypedQueryBuilder } from "drizzle-orm/query-builders/query-builder"; -import type { - AddAliasToSelection, - AppendToNullabilityMap, - AppendToResult, - BuildSubquerySelection, - GetSelectTableName, - GetSelectTableSelection, - JoinNullability, - JoinType, - SelectMode, - SelectResult, - SetOperator, -} from "drizzle-orm/query-builders/select.types"; -import type { - ColumnsSelection, - Placeholder, - Query, - SQL, - View, -} from "drizzle-orm/sql"; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.ts#L54 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.ts#L50 - */ -export type SelectBuilder< - TSelection extends SelectedFields | undefined, - TResultType extends "sync" | "async", - TRunResult, - TBuilderMode extends "db" | "qb" = "db", -> = { - from: ( - source: TFrom, - ) => CreateSelectFromBuilderMode< - TBuilderMode, - GetSelectTableName, - TResultType, - TRunResult, - TSelection extends undefined ? GetSelectTableSelection : TSelection, - TSelection extends undefined ? "single" : "partial" - >; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.ts#L126 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.ts#L130 - */ -export abstract class SelectQueryBuilderBase< - THKT extends SelectHKTBase, - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode, - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult extends any[] = SelectResult< - TSelection, - TSelectMode, - TNullabilityMap - >[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, -> extends TypedQueryBuilder { - declare [entityKind]: string; - declare _: { - readonly hkt: THKT; - readonly tableName: TTableName; - readonly resultType: TResultType; - readonly runResult: TRunResult; - readonly selection: TSelection; - readonly selectMode: TSelectMode; - readonly nullabilityMap: TNullabilityMap; - readonly dynamic: TDynamic; - readonly excludedMethods: TExcludedMethods; - readonly result: TResult; - readonly selectedFields: TSelectedFields; - }; - - declare leftJoin: JoinFn; - declare rightJoin: JoinFn; - declare innerJoin: JoinFn; - declare fullJoin: JoinFn; - - private declare setOperator: >( - rightSelection: - | (( - setOperators: GetSetOperators, - ) => SetOperatorRightSelect) - | SetOperatorRightSelect, - ) => SelectWithout; - - declare union: typeof this.setOperator; - declare unionAll: typeof this.setOperator; - declare intersect: typeof this.setOperator; - declare intersectAll: typeof this.setOperator; - declare except: typeof this.setOperator; - declare exceptAll: typeof this.setOperator; - - declare where: ( - where: ((aliases: TSelection) => SQL | undefined) | SQL | undefined, - ) => SelectWithout; - - declare having: ( - having: - | ((aliases: this["_"]["selection"]) => SQL | undefined) - | SQL - | undefined, - ) => SelectWithout; - - declare groupBy: ( - ...columns: (Column | SQL)[] - ) => SelectWithout; - - declare orderBy: ( - ...columns: (Column | SQL)[] - ) => SelectWithout; - - declare limit: ( - limit: number | Placeholder, - ) => SelectWithout; - - declare offset: ( - offset: number | Placeholder, - ) => SelectWithout; - - declare toSQL: () => Query; - - declare as: ( - alias: TAlias, - ) => SubqueryWithSelection; - - declare $dynamic: () => SelectDynamic; -} - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.ts#L803 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.ts#L903 - */ -export type SelectBase< - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode = "single", - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult = SelectResult[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, -> = SelectQueryBuilderBase< - SelectHKT, - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode, - TNullabilityMap, - TDynamic, - TExcludedMethods, - // @ts-ignore - TResult, - TSelectedFields -> & - QueryPromise; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L31 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L30 - */ -export type SelectJoinConfig = { - on: SQL; - table: Table | Subquery | View | SQL; - alias: string | undefined; - joinType: JoinType; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L38 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L30 - */ -export type BuildAliasTable< - tableOrView extends Table | View, - alias extends string, -> = tableOrView extends Table - ? TableWithColumns< - UpdateTableConfig< - tableOrView["_"]["config"], - { - name: alias; - columns: MapColumnsToTableAlias; - } - > - > - : tableOrView extends View - ? ViewWithSelection< - alias, - tableOrView["_"]["existing"], - MapColumnsToTableAlias - > - : never; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L52 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L52 - */ -export type SelectConfig = { - withList?: Subquery[]; - fields: Record; - fieldsFlat?: SelectedFieldsOrdered; - where?: SQL; - having?: SQL; - table: Table | Subquery | View | SQL; - limit?: number | Placeholder; - offset?: number | Placeholder; - joins?: SelectJoinConfig[]; - orderBy?: (Column | SQL | SQL.Aliased)[]; - groupBy?: (Column | SQL | SQL.Aliased)[]; - distinct?: boolean; - setOperators: { - rightSelect: TypedQueryBuilder; - type: SetOperator; - isAll: boolean; - orderBy?: (Column | SQL | SQL.Aliased)[]; - limit?: number | Placeholder; - offset?: number | Placeholder; - }[]; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L75 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L82 - */ -export type Join< - T extends AnySelectQueryBuilder, - TDynamic extends boolean, - TJoinType extends JoinType, - TJoinedTable extends Table | Subquery | View | SQL, - TJoinedName extends - GetSelectTableName = GetSelectTableName, -> = T extends any - ? SelectWithout< - SelectKind< - T["_"]["hkt"], - T["_"]["tableName"], - T["_"]["resultType"], - T["_"]["runResult"], - AppendToResult< - T["_"]["tableName"], - T["_"]["selection"], - TJoinedName, - TJoinedTable extends Table - ? TJoinedTable["_"]["columns"] - : TJoinedTable extends Subquery | View - ? Assume< - TJoinedTable["_"]["selectedFields"], - SelectedFields - > - : never, - T["_"]["selectMode"] - >, - T["_"]["selectMode"] extends "partial" - ? T["_"]["selectMode"] - : "multiple", - AppendToNullabilityMap< - T["_"]["nullabilityMap"], - TJoinedName, - TJoinType - >, - T["_"]["dynamic"], - T["_"]["excludedMethods"] - >, - TDynamic, - T["_"]["excludedMethods"] - > - : never; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L106 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L111 - */ -export type JoinFn< - T extends AnySelectQueryBuilder, - TDynamic extends boolean, - TJoinType extends JoinType, -> = < - TJoinedTable extends Table | Subquery | View | SQL, - TJoinedName extends - GetSelectTableName = GetSelectTableName, ->( - table: TJoinedTable, - on: ((aliases: T["_"]["selection"]) => SQL | undefined) | SQL | undefined, -) => Join; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/query-builders/select.types.ts#L75 - */ -type MapColumnsToTableAlias< - TColumns extends ColumnsSelection, - TAlias extends string, -> = { - [Key in keyof TColumns]: TColumns[Key] extends Column - ? Column["_"], TAlias>> - : TColumns[Key]; -} & {}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L124 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L146 - */ -export type SelectHKTBase = { - tableName: string | undefined; - resultType: "sync" | "async"; - runResult: unknown; - selection: unknown; - selectMode: SelectMode; - nullabilityMap: unknown; - dynamic: boolean; - excludedMethods: string; - result: unknown; - selectedFields: unknown; - _type: unknown; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L138 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L158 - */ -export type SelectKind< - T extends SelectHKTBase, - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode, - TNullabilityMap extends Record, - TDynamic extends boolean, - TExcludedMethods extends string, - TResult = SelectResult[], - TSelectedFields = BuildSubquerySelection, -> = (T & { - tableName: TTableName; - resultType: TResultType; - runResult: TRunResult; - selection: TSelection; - selectMode: TSelectMode; - nullabilityMap: TNullabilityMap; - dynamic: TDynamic; - excludedMethods: TExcludedMethods; - result: TResult; - selectedFields: TSelectedFields; -})["_type"]; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L163 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L179 - */ -export interface SelectQueryBuilderHKT extends SelectHKTBase { - _type: SelectQueryBuilderBase< - SelectQueryBuilderHKT, - this["tableName"], - this["resultType"], - this["runResult"], - Assume, - this["selectMode"], - Assume>, - this["dynamic"], - this["excludedMethods"], - Assume, - Assume - >; -} - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L179 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L193 - */ -export interface SelectHKT extends SelectHKTBase { - _type: SelectBase< - this["tableName"], - this["resultType"], - this["runResult"], - Assume, - this["selectMode"], - Assume>, - this["dynamic"], - this["excludedMethods"], - Assume, - Assume - >; -} - -export type SetOperatorExcludedMethods = - | "leftJoin" - | "rightJoin" - | "innerJoin" - | "fullJoin" - | "where" - | "having" - | "groupBy"; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L204 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L206 - */ -export type CreateSelectFromBuilderMode< - TBuilderMode extends "db" | "qb", - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode, -> = TBuilderMode extends "db" - ? SelectBase - : SelectQueryBuilderBase< - SelectQueryBuilderHKT, - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode - >; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/query-builders/select.types.ts#L227 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/query-builders/select.types.ts#L224 - */ -type SelectWithout< - T extends AnySelectQueryBuilder, - TDynamic extends boolean, - K extends keyof T & string, - TResetExcluded extends boolean = false, -> = TDynamic extends true - ? T - : Omit< - SelectKind< - T["_"]["hkt"], - T["_"]["tableName"], - T["_"]["resultType"], - T["_"]["runResult"], - T["_"]["selection"], - T["_"]["selectMode"], - T["_"]["nullabilityMap"], - TDynamic, - TResetExcluded extends true ? K : T["_"]["excludedMethods"] | K, - T["_"]["result"], - T["_"]["selectedFields"] - >, - TResetExcluded extends true ? K : T["_"]["excludedMethods"] | K - >; - -export type SelectDynamic = SelectKind< - T["_"]["hkt"], - T["_"]["tableName"], - T["_"]["resultType"], - T["_"]["runResult"], - T["_"]["selection"], - T["_"]["selectMode"], - T["_"]["nullabilityMap"], - true, - never, - T["_"]["result"], - T["_"]["selectedFields"] ->; - -export type AnySelectQueryBuilder = SelectQueryBuilderBase< - any, - any, - any, - any, - any, - any, - any, - any, - any, - any, - any ->; - -export type AnySetOperatorInterface = SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - any ->; - -export interface SetOperatorInterface< - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TSelectMode extends SelectMode = "single", - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult extends any[] = SelectResult< - TSelection, - TSelectMode, - TNullabilityMap - >[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, -> { - _: { - readonly hkt: SelectHKTBase; - readonly tableName: TTableName; - readonly resultType: TResultType; - readonly runResult: TRunResult; - readonly selection: TSelection; - readonly selectMode: TSelectMode; - readonly nullabilityMap: TNullabilityMap; - readonly dynamic: TDynamic; - readonly excludedMethods: TExcludedMethods; - readonly result: TResult; - readonly selectedFields: TSelectedFields; - }; -} - -export type SetOperatorWithResult = SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - TResult, - any ->; - -export type SetOperatorRightSelect< - TValue extends SetOperatorWithResult, - TResult extends any[], -> = TValue extends SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - infer TValueResult, - any -> - ? ValidateShape< - TValueResult[number], - TResult[number], - TypedQueryBuilder - > - : TValue; - -export type SetOperatorRestSelect< - TValue extends readonly SetOperatorWithResult[], - TResult extends any[], -> = TValue extends [infer First, ...infer Rest] - ? First extends SetOperatorInterface< - any, - any, - any, - any, - any, - any, - any, - any, - infer TValueResult, - any - > - ? Rest extends AnySetOperatorInterface[] - ? [ - ValidateShape< - TValueResult[number], - TResult[number], - TypedQueryBuilder - >, - ...SetOperatorRestSelect, - ] - : ValidateShape< - TValueResult[number], - TResult[number], - TypedQueryBuilder[] - > - : never - : TValue; - -export type CreateSetOperatorFn = < - TTableName extends string | undefined, - TResultType extends "sync" | "async", - TRunResult, - TSelection extends ColumnsSelection, - TValue extends SetOperatorWithResult, - TRest extends SetOperatorWithResult[], - TSelectMode extends SelectMode = "single", - TNullabilityMap extends Record< - string, - JoinNullability - > = TTableName extends string ? Record : {}, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, - TResult extends any[] = SelectResult< - TSelection, - TSelectMode, - TNullabilityMap - >[], - TSelectedFields extends ColumnsSelection = BuildSubquerySelection< - TSelection, - TNullabilityMap - >, ->( - leftSelect: SetOperatorInterface< - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode, - TNullabilityMap, - TDynamic, - TExcludedMethods, - TResult, - TSelectedFields - >, - rightSelect: SetOperatorRightSelect, - ...restSelects: SetOperatorRestSelect -) => SelectWithout< - SelectBase< - TTableName, - TResultType, - TRunResult, - TSelection, - TSelectMode, - TNullabilityMap, - TDynamic, - TExcludedMethods, - TResult, - TSelectedFields - >, - false, - SetOperatorExcludedMethods, - true ->; - -export type GetSetOperators = { - union: CreateSetOperatorFn; - intersect: CreateSetOperatorFn; - except: CreateSetOperatorFn; - unionAll: CreateSetOperatorFn; -}; - -export type SubqueryWithSelection< - TSelection extends ColumnsSelection, - TAlias extends string, -> = Subquery> & - AddAliasToSelection; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/table.ts#L49 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/table.ts#L43 - */ -export type TableWithColumns = Table & { - [key in keyof T["columns"]]: T["columns"][key]; -}; - -/** - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/sqlite-core/view.ts#L154 - * https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/view.ts#L305 - */ -export type ViewWithSelection< - TName extends string, - TExisting extends boolean, - TSelection extends ColumnsSelection, -> = View & TSelection; diff --git a/packages/core/src/drizzle/table.ts b/packages/core/src/drizzle/table.ts index 6fe78fc6a..351e86a1f 100644 --- a/packages/core/src/drizzle/table.ts +++ b/packages/core/src/drizzle/table.ts @@ -9,7 +9,7 @@ import type { } from "@/schema/common.js"; import type { InferColumnType } from "@/schema/infer.js"; import type { BuildColumns, ColumnBuilderBase } from "drizzle-orm"; -import type { TableWithColumns } from "./select.js"; +import type { PgTableWithColumns } from "drizzle-orm/pg-core"; /** * Performs type transformation between Ponder and Drizzle column representation. @@ -20,7 +20,7 @@ export type DrizzleTable< tableName extends string, table extends PonderTable, schema extends PonderSchema, -> = TableWithColumns<{ +> = PgTableWithColumns<{ name: tableName; schema: undefined; columns: BuildColumns< @@ -45,7 +45,7 @@ export type DrizzleTable< primaryKey: columnName extends "id" ? true : false; }>; }, - "common" + "pg" >; - dialect: "common"; + dialect: "pg"; }>; diff --git a/packages/core/src/graphql/buildGraphqlSchema.test.ts b/packages/core/src/graphql/buildGraphqlSchema.test.ts index bfc2af2d1..f6ac4581c 100644 --- a/packages/core/src/graphql/buildGraphqlSchema.test.ts +++ b/packages/core/src/graphql/buildGraphqlSchema.test.ts @@ -3048,10 +3048,7 @@ test("metadata", async (context) => { }, ); - const metadataStore = getMetadataStore({ - dialect: database.dialect, - db: database.qb.user, - }); + const metadataStore = getMetadataStore({ db: database.qb.user }); await metadataStore.setStatus({ mainnet: { diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index abbfcd890..701cb8b98 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -59,4 +59,4 @@ export { min, } from "drizzle-orm"; -export { alias } from "@/drizzle/runtime.js"; +export { alias } from "drizzle-orm/pg-core"; diff --git a/packages/core/src/indexing-store/historical.ts b/packages/core/src/indexing-store/historical.ts index ca77bb53e..6a221639d 100644 --- a/packages/core/src/indexing-store/historical.ts +++ b/packages/core/src/indexing-store/historical.ts @@ -78,14 +78,12 @@ type StoreCache = { }; export const getHistoricalStore = ({ - dialect, schema, readonlyStore, db, common, isCacheExhaustive: _isCacheExhaustive, }: { - dialect: "sqlite" | "postgres"; schema: Schema; readonlyStore: ReadonlyStore; db: HeadlessKysely; @@ -211,7 +209,6 @@ export const getHistoricalStore = ({ record, table, schema, - dialect, skipValidation: true, }), ); @@ -272,7 +269,6 @@ export const getHistoricalStore = ({ record, table, schema, - dialect, skipValidation: true, }), ); @@ -346,7 +342,6 @@ export const getHistoricalStore = ({ const encodedId = encodeValue({ value: id, column: table.id, - dialect, }); const record = await db @@ -357,7 +352,7 @@ export const getHistoricalStore = ({ if (record === undefined) return null; - return decodeRecord({ record, table, dialect }); + return decodeRecord({ record, table }); }; return { @@ -595,7 +590,7 @@ export const getHistoricalStore = ({ const query = db .selectFrom(tableName) .selectAll() - .where((eb) => buildWhereConditions({ eb, where, table, dialect })) + .where((eb) => buildWhereConditions({ eb, where, table })) .orderBy("id", "asc"); const records: UserRecord[] = []; @@ -616,7 +611,6 @@ export const getHistoricalStore = ({ const current = decodeRecord({ record: latestRecord, table, - dialect, }); const updateObject = data({ current }); // Here, `latestRecord` is already encoded, so we need to exclude it from `encodeRecord`. @@ -626,7 +620,7 @@ export const getHistoricalStore = ({ record: updateObject, table, schema, - dialect, + skipValidation: false, }), }; @@ -643,9 +637,7 @@ export const getHistoricalStore = ({ records.push(record); } - return records.map((record) => - decodeRecord({ record, table, dialect }), - ); + return records.map((record) => decodeRecord({ record, table })); }, ); @@ -657,7 +649,6 @@ export const getHistoricalStore = ({ cursor = encodeValue({ value: _records[_records.length - 1]!.id, column: table.id, - dialect, }); } } @@ -669,7 +660,7 @@ export const getHistoricalStore = ({ record: data, table, schema, - dialect, + skipValidation: false, }); @@ -678,9 +669,7 @@ export const getHistoricalStore = ({ db .selectFrom(tableName) .select("id") - .where((eb) => - buildWhereConditions({ eb, where, table, dialect }), - ), + .where((eb) => buildWhereConditions({ eb, where, table })), ) .updateTable(tableName) .set(updateRecord) @@ -692,9 +681,7 @@ export const getHistoricalStore = ({ throw parseStoreError(err, data); }); - return records.map((record) => - decodeRecord({ record, table, dialect }), - ); + return records.map((record) => decodeRecord({ record, table })); }); } }, @@ -826,11 +813,7 @@ export const getHistoricalStore = ({ const deletedRecord = await db .deleteFrom(tableName) - .where( - "id", - "=", - encodeValue({ value: id, column: table.id, dialect }), - ) + .where("id", "=", encodeValue({ value: id, column: table.id })) .returning(["id"]) .executeTakeFirst() .catch((err) => { diff --git a/packages/core/src/indexing-store/metadata.test.ts b/packages/core/src/indexing-store/metadata.test.ts index c67d9c095..e2a37ce10 100644 --- a/packages/core/src/indexing-store/metadata.test.ts +++ b/packages/core/src/indexing-store/metadata.test.ts @@ -16,10 +16,7 @@ test("getMetadata() empty", async (context) => { const { database, cleanup } = await setupDatabaseServices(context, { schema, }); - const metadataStore = getMetadataStore({ - dialect: database.dialect, - db: database.qb.user, - }); + const metadataStore = getMetadataStore({ db: database.qb.user }); const status = await metadataStore.getStatus(); @@ -32,10 +29,7 @@ test("setMetadata()", async (context) => { const { database, cleanup } = await setupDatabaseServices(context, { schema, }); - const metadataStore = getMetadataStore({ - dialect: database.dialect, - db: database.qb.user, - }); + const metadataStore = getMetadataStore({ db: database.qb.user }); await metadataStore.setStatus({ mainnet: { block: { number: 10, timestamp: 10 }, ready: false }, diff --git a/packages/core/src/indexing-store/metadata.ts b/packages/core/src/indexing-store/metadata.ts index 757f23809..6de60808e 100644 --- a/packages/core/src/indexing-store/metadata.ts +++ b/packages/core/src/indexing-store/metadata.ts @@ -3,10 +3,8 @@ import type { Status } from "@/sync/index.js"; import type { MetadataStore } from "./store.js"; export const getMetadataStore = ({ - dialect, db, }: { - dialect: "sqlite" | "postgres"; db: HeadlessKysely; }): MetadataStore => ({ getStatus: async () => { @@ -19,9 +17,7 @@ export const getMetadataStore = ({ if (metadata!.value === null) return null; - return dialect === "sqlite" - ? (JSON.parse(metadata!.value) as Status) - : (metadata!.value as Status); + return metadata!.value as Status; }); }, setStatus: (status: Status) => { @@ -30,11 +26,11 @@ export const getMetadataStore = ({ .insertInto("_ponder_meta") .values({ key: "status", - value: dialect === "sqlite" ? JSON.stringify(status) : status, + value: status, }) .onConflict((oc) => oc.column("key").doUpdateSet({ - value: dialect === "sqlite" ? JSON.stringify(status) : status, + value: status, }), ) .execute(); diff --git a/packages/core/src/indexing-store/readonly.ts b/packages/core/src/indexing-store/readonly.ts index 87a4b4f8c..c57b18a63 100644 --- a/packages/core/src/indexing-store/readonly.ts +++ b/packages/core/src/indexing-store/readonly.ts @@ -20,12 +20,10 @@ import { const DEFAULT_LIMIT = 50 as const; export const getReadonlyStore = ({ - dialect, schema, db, common, }: { - dialect: "sqlite" | "postgres"; schema: Schema; db: HeadlessKysely; common: Common; @@ -43,7 +41,6 @@ export const getReadonlyStore = ({ const encodedId = encodeValue({ value: id, column: table.id, - dialect, }); const record = await db @@ -54,7 +51,7 @@ export const getReadonlyStore = ({ if (record === undefined) return null; - return decodeRecord({ record, table, dialect }); + return decodeRecord({ record, table }); }); }, findMany: async ({ @@ -78,20 +75,14 @@ export const getReadonlyStore = ({ let query = db.selectFrom(tableName).selectAll(); if (where) { - query = query.where((eb) => - buildWhereConditions({ eb, where, table, dialect }), - ); + query = query.where((eb) => buildWhereConditions({ eb, where, table })); } const orderByConditions = buildOrderByConditions({ orderBy, table }); for (const [column, direction] of orderByConditions) { query = query.orderBy( column, - dialect === "sqlite" - ? direction - : direction === "asc" - ? sql`asc nulls first` - : sql`desc nulls last`, + direction === "asc" ? sql`asc nulls first` : sql`desc nulls last`, ); } const orderDirection = orderByConditions[0]![1]; @@ -117,7 +108,7 @@ export const getReadonlyStore = ({ const records = await query .execute() .then((records) => - records.map((record) => decodeRecord({ record, table, dialect })), + records.map((record) => decodeRecord({ record, table })), ); if (records.length === limit + 1) { @@ -148,7 +139,6 @@ export const getReadonlyStore = ({ encodeValue({ value, column: table[columnName] as MaterialColumn, - dialect, }), ]) satisfies [string, any][]; query = query @@ -160,7 +150,7 @@ export const getReadonlyStore = ({ const records = await query .execute() .then((records) => - records.map((record) => decodeRecord({ record, table, dialect })), + records.map((record) => decodeRecord({ record, table })), ); if (records.length === 0) { @@ -214,7 +204,6 @@ export const getReadonlyStore = ({ encodeValue({ value, column: table[columnName] as MaterialColumn, - dialect, }), ]) satisfies [string, any][]; query = query @@ -233,7 +222,7 @@ export const getReadonlyStore = ({ const records = await query.execute().then((records) => records - .map((record) => decodeRecord({ record, table, dialect })) + .map((record) => decodeRecord({ record, table })) // Reverse the records again, back to the original order. .reverse(), ); diff --git a/packages/core/src/indexing-store/realtime.ts b/packages/core/src/indexing-store/realtime.ts index 406907137..812c58e72 100644 --- a/packages/core/src/indexing-store/realtime.ts +++ b/packages/core/src/indexing-store/realtime.ts @@ -13,12 +13,10 @@ import { parseStoreError } from "./utils/errors.js"; import { buildWhereConditions } from "./utils/filter.js"; export const getRealtimeStore = ({ - dialect, schema, db, common, }: { - dialect: "sqlite" | "postgres"; schema: Schema; db: HeadlessKysely; common: Common; @@ -40,7 +38,6 @@ export const getRealtimeStore = ({ const createRecord = encodeRecord({ record: { id, ...data }, table, - dialect, schema, skipValidation: false, }); @@ -64,7 +61,7 @@ export const getRealtimeStore = ({ }) .execute(); - return decodeRecord({ record: record, table, dialect }); + return decodeRecord({ record: record, table }); }); }); }, @@ -90,7 +87,6 @@ export const getRealtimeStore = ({ encodeRecord({ record: d, table, - dialect, schema, skipValidation: false, }), @@ -120,7 +116,7 @@ export const getRealtimeStore = ({ } }); - return records.map((record) => decodeRecord({ record, table, dialect })); + return records.map((record) => decodeRecord({ record, table })); }); }, update: ({ @@ -139,7 +135,7 @@ export const getRealtimeStore = ({ const table = (schema[tableName] as { table: Table }).table; return db.wrap({ method: `${tableName}.update` }, async () => { - const encodedId = encodeValue({ value: id, column: table.id, dialect }); + const encodedId = encodeValue({ value: id, column: table.id }); const record = await db.transaction().execute(async (tx) => { const latestRecord = await tx @@ -157,14 +153,12 @@ export const getRealtimeStore = ({ current: decodeRecord({ record: latestRecord, table, - dialect, }), }) : data; const updateRecord = encodeRecord({ record: { id, ...updateObject }, table, - dialect, schema, skipValidation: false, }); @@ -191,7 +185,7 @@ export const getRealtimeStore = ({ return updateResult; }); - const result = decodeRecord({ record: record, table, dialect }); + const result = decodeRecord({ record: record, table }); return result; }); @@ -227,7 +221,6 @@ export const getRealtimeStore = ({ eb, where, table, - dialect, }), ) .orderBy("id", "asc") @@ -244,7 +237,6 @@ export const getRealtimeStore = ({ current: decodeRecord({ record: latestRecord, table, - dialect, }), }) : data; @@ -255,7 +247,7 @@ export const getRealtimeStore = ({ ...encodeRecord({ record: updateObject, table, - dialect, + schema, skipValidation: false, }), @@ -283,9 +275,7 @@ export const getRealtimeStore = ({ .execute(); } - return records.map((record) => - decodeRecord({ record, table, dialect }), - ); + return records.map((record) => decodeRecord({ record, table })); }), ); @@ -297,7 +287,6 @@ export const getRealtimeStore = ({ cursor = encodeValue({ value: _records[_records.length - 1]!.id, column: table.id, - dialect, }); } } @@ -322,11 +311,11 @@ export const getRealtimeStore = ({ const table = (schema[tableName] as { table: Table }).table; return db.wrap({ method: `${tableName}.upsert` }, async () => { - const encodedId = encodeValue({ value: id, column: table.id, dialect }); + const encodedId = encodeValue({ value: id, column: table.id }); const createRecord = encodeRecord({ record: { id, ...create }, table, - dialect, + schema, skipValidation: false, }); @@ -377,14 +366,13 @@ export const getRealtimeStore = ({ current: decodeRecord({ record: latestRecord, table, - dialect, }), }) : update; const updateRecord = encodeRecord({ record: { id, ...updateObject }, table, - dialect, + schema, skipValidation: false, }); @@ -416,7 +404,7 @@ export const getRealtimeStore = ({ return record; }); - return decodeRecord({ record, table, dialect }); + return decodeRecord({ record, table }); }); }, delete: ({ @@ -431,7 +419,7 @@ export const getRealtimeStore = ({ const table = (schema[tableName] as { table: Table }).table; return db.wrap({ method: `${tableName}.delete` }, async () => { - const encodedId = encodeValue({ value: id, column: table.id, dialect }); + const encodedId = encodeValue({ value: id, column: table.id }); const isDeleted = await db.transaction().execute(async (tx) => { const record = await tx diff --git a/packages/core/src/indexing-store/utils/encoding.ts b/packages/core/src/indexing-store/utils/encoding.ts index 62fe22157..3b479b116 100644 --- a/packages/core/src/indexing-store/utils/encoding.ts +++ b/packages/core/src/indexing-store/utils/encoding.ts @@ -32,7 +32,6 @@ import type { UserRecord, UserValue, } from "@/types/schema.js"; -import { decodeToBigInt, encodeAsText } from "@/utils/encoding.js"; import { never } from "@/utils/never.js"; import { type Hex, bytesToHex, hexToBytes, isHex } from "viem"; @@ -52,13 +51,11 @@ export function encodeRecord({ record, table, schema, - dialect, skipValidation, }: { record: Partial; table: Table; schema: Schema; - dialect: "sqlite" | "postgres"; skipValidation: boolean; }): DatabaseRecord { const instance: DatabaseRecord = {}; @@ -72,7 +69,6 @@ export function encodeRecord({ instance[columnName] = encodeValue({ value, column, - dialect, }); } @@ -86,11 +82,9 @@ export function encodeValue( { value, column, - dialect, }: { value: UserValue; column: MaterialColumn; - dialect: "sqlite" | "postgres"; }, // @ts-ignore ): DatabaseValue { @@ -108,8 +102,7 @@ export function encodeValue( } case "json": { - if (dialect === "postgres") return value as Object; - return JSON.stringify(value); + return value as Object; } case "reference": @@ -138,9 +131,7 @@ export function encodeValue( case "hex": return Buffer.from(hexToBytes(value as Hex)); case "bigint": - return dialect === "sqlite" - ? encodeAsText(value as bigint) - : (value as bigint); + return value as bigint; case "boolean": return value ? 1 : 0; @@ -343,11 +334,9 @@ function validateValue({ export function decodeRecord({ record, table, - dialect, }: { record: DatabaseRecord; table: Table; - dialect: "sqlite" | "postgres"; }): UserRecord { const instance = {} as UserRecord; @@ -356,7 +345,6 @@ export function decodeRecord({ instance[columnName] = decodeValue({ value: record[columnName]!, column, - dialect, }); } } @@ -367,11 +355,9 @@ export function decodeRecord({ function decodeValue({ value, column, - dialect, }: { value: DatabaseValue; column: ScalarColumn | ReferenceColumn | EnumColumn | JSONColumn; - dialect: "sqlite" | "postgres"; }): UserValue { if (value === null) return null; else if (isEnumColumn(column)) { @@ -380,7 +366,7 @@ function decodeValue({ } return value as UserValue; } else if (isJSONColumn(column)) { - return dialect === "postgres" ? value : JSON.parse(value as string); + return value; } else if (isListColumn(column)) { return column[" scalar"] === "bigint" ? JSON.parse(value as string).map(BigInt) @@ -389,8 +375,6 @@ function decodeValue({ return value === 1; } else if (column[" scalar"] === "hex") { return bytesToHex(value as Buffer); - } else if (column[" scalar"] === "bigint" && dialect === "sqlite") { - return decodeToBigInt(value as string); } else { return value as UserValue; } diff --git a/packages/core/src/indexing-store/utils/filter.test.ts b/packages/core/src/indexing-store/utils/filter.test.ts index 92a056e2f..0007cef69 100644 --- a/packages/core/src/indexing-store/utils/filter.test.ts +++ b/packages/core/src/indexing-store/utils/filter.test.ts @@ -32,7 +32,6 @@ test("buildWhereConditions handles equals shortcut", () => { eb: buildMockEb(), where: { id: "abc" }, table: schema.Pet.table, - dialect: "sqlite", }); expect(conditions).toEqual({ @@ -45,7 +44,6 @@ test("buildWhereConditions handles not", () => { eb: buildMockEb(), where: { id: { not: "abc" } }, table: schema.Pet.table, - dialect: "sqlite", }); expect(conditions).toEqual({ @@ -58,7 +56,6 @@ test("buildWhereConditions handles multiple conditions for one column", () => { eb: buildMockEb(), where: { id: { contains: "abc", notStartsWith: "z" } }, table: schema.Pet.table, - dialect: "sqlite", }); expect(conditions).toEqual({ @@ -69,42 +66,11 @@ test("buildWhereConditions handles multiple conditions for one column", () => { }); }); -test("buildWhereConditions uses specified encoding", () => { - const conditionsSqlite = buildWhereConditions({ - eb: buildMockEb(), - where: { bigAge: { lt: 10n } }, - table: schema.Pet.table, - dialect: "sqlite", - }); - - expect(conditionsSqlite).toEqual({ - and: [ - [ - "bigAge", - "<", - "0000000000000000000000000000000000000000000000000000000000000000000000000000010", - ], - ], - }); - - const conditionsPostgres = buildWhereConditions({ - eb: buildMockEb(), - where: { bigAge: { lt: 10n } }, - table: schema.Pet.table, - dialect: "postgres", - }); - - expect(conditionsPostgres).toEqual({ - and: [["bigAge", "<", 10n]], - }); -}); - test("buildWhereConditions handles list filters with encoding", () => { const conditions = buildWhereConditions({ eb: buildMockEb(), where: { bigAge: { in: [12n, 15n] } }, table: schema.Pet.table, - dialect: "sqlite", }); expect(conditions).toEqual({ @@ -126,7 +92,6 @@ test("buildWhereConditions filters on reference column", () => { eb: buildMockEb(), where: { personId: 5n }, table: schema.Pet.table, - dialect: "postgres", }); expect(conditions).toEqual({ @@ -139,7 +104,6 @@ test("buildWhereConditions handles list column 'has' and 'notHas' special case", eb: buildMockEb(), where: { names: { has: "Marty" } }, table: schema.Pet.table, - dialect: "sqlite", }); expect(conditions).toEqual({ and: [["names", "like", "%Marty%"]] }); @@ -153,7 +117,6 @@ test("buildWhereConditions handles or operator", () => { OR: [{ id: { contains: "abc" } }, { id: { notStartsWith: "z" } }], }, table: schema.Pet.table, - dialect: "postgres", }); expect(conditions).toEqual({ @@ -175,7 +138,6 @@ test("buildWhereConditions throws for unknown column", () => { eb: buildMockEb(), where: { someFakeColumn: { equals: false } }, table: schema.Pet.table, - dialect: "sqlite", }), ).toThrow( "Invalid filter. Column does not exist. Got 'someFakeColumn', expected one of ['id', 'names', 'age', 'bigAge', 'kind', 'personId']", @@ -188,7 +150,6 @@ test("buildWhereConditions throws for virtual column", () => { eb: buildMockEb(), where: { person: { equals: 5n } }, table: schema.Pet.table, - dialect: "sqlite", }), ).toThrow("Invalid filter. Cannot filter on virtual column 'person'"); }); @@ -200,7 +161,6 @@ test("buildWhereConditions throws for invalid filter condition", () => { // @ts-ignore where: { personId: { notACondition: 5n } }, table: schema.Pet.table, - dialect: "sqlite", }), ).toThrow( "Invalid filter condition for column 'personId'. Got 'notACondition', expected one of ['equals', 'not', 'in', 'notIn', 'gt', 'lt', 'gte', 'lte']", diff --git a/packages/core/src/indexing-store/utils/filter.ts b/packages/core/src/indexing-store/utils/filter.ts index 7f437abab..faecee90d 100644 --- a/packages/core/src/indexing-store/utils/filter.ts +++ b/packages/core/src/indexing-store/utils/filter.ts @@ -89,12 +89,10 @@ export function buildWhereConditions({ eb, where, table, - dialect, }: { eb: ExpressionBuilder; where: Record; table: Table; - dialect: "sqlite" | "postgres"; }) { const exprs: ExpressionWrapper[] = []; @@ -107,7 +105,7 @@ export function buildWhereConditions({ } const nestedExprs = rhs.map((nestedWhere) => - buildWhereConditions({ eb, where: nestedWhere, table, dialect }), + buildWhereConditions({ eb, where: nestedWhere, table }), ); exprs.push(eb[columnName === "AND" ? "and" : "or"](nestedExprs)); @@ -183,7 +181,7 @@ export function buildWhereConditions({ } return v; } - return encodeValue({ value: v, column, dialect }); + return encodeValue({ value: v, column }); }; const [comparator, encodedValue] = filterEncodingFn!(value, encode); diff --git a/packages/core/src/server/index.test.ts b/packages/core/src/server/index.test.ts index 522afec5f..3a85f8a26 100644 --- a/packages/core/src/server/index.test.ts +++ b/packages/core/src/server/index.test.ts @@ -69,7 +69,6 @@ test("ready", async (context) => { }); await getMetadataStore({ - dialect: database.dialect, db: database.qb.user, }).setStatus({}); diff --git a/packages/core/src/server/index.ts b/packages/core/src/server/index.ts index 416307bd5..922b29b42 100644 --- a/packages/core/src/server/index.ts +++ b/packages/core/src/server/index.ts @@ -37,14 +37,12 @@ export async function createServer({ // Create hono app const readonlyStore = getReadonlyStore({ - dialect: database.dialect, schema, db: database.qb.readonly, common, }); const metadataStore = getMetadataStore({ - dialect: database.dialect, db: database.qb.readonly, }); diff --git a/packages/core/src/sync-store/encoding.ts b/packages/core/src/sync-store/encoding.ts index bb7703eea..4b1eefe97 100644 --- a/packages/core/src/sync-store/encoding.ts +++ b/packages/core/src/sync-store/encoding.ts @@ -11,42 +11,22 @@ import { maxCheckpoint, zeroCheckpoint, } from "@/utils/checkpoint.js"; -import { decodeToBigInt, encodeAsText } from "@/utils/encoding.js"; import { toLowerCase } from "@/utils/lowercase.js"; import type { Generated, Insertable } from "kysely"; import type { Address, Hash, Hex } from "viem"; import { hexToBigInt, hexToNumber } from "viem"; -const formatHex = (dialect: "sqlite" | "postgres", hex: Hex) => - dialect === "sqlite" ? encodeAsText(hex) : hexToBigInt(hex); - -export const formatBig = ( - dialect: "sqlite" | "postgres", - x: bigint | number, -): string | bigint => - dialect === "sqlite" - ? encodeAsText(x) - : typeof x === "number" - ? BigInt(x) - : x; - -export const parseBig = ( - dialect: "sqlite" | "postgres", - big: string | bigint, -): bigint => - dialect === "sqlite" ? decodeToBigInt(big as string) : (big as bigint); - type BlocksTable = { hash: Hash; chainId: number; checkpoint: string; - number: string | bigint; - timestamp: string | bigint; - baseFeePerGas: string | bigint | null; - difficulty: string | bigint; + number: bigint; + timestamp: bigint; + baseFeePerGas: bigint | null; + difficulty: bigint; extraData: Hex; - gasLimit: string | bigint; - gasUsed: string | bigint; + gasLimit: bigint; + gasUsed: bigint; logsBloom: Hex; miner: Address; mixHash: Hash | null; @@ -54,20 +34,18 @@ type BlocksTable = { parentHash: Hash; receiptsRoot: Hex; sha3Uncles: Hash | null; - size: string | bigint; + size: bigint; stateRoot: Hash; - totalDifficulty: string | bigint | null; + totalDifficulty: bigint | null; transactionsRoot: Hash; }; export const encodeBlock = ({ block, chainId, - dialect, }: { block: SyncBlock; chainId: number; - dialect: "sqlite" | "postgres"; }): Insertable => { return { hash: block.hash, @@ -81,14 +59,14 @@ export const encodeBlock = ({ eventIndex: zeroCheckpoint.eventIndex, }), baseFeePerGas: block.baseFeePerGas - ? formatHex(dialect, block.baseFeePerGas) + ? hexToBigInt(block.baseFeePerGas) : null, - difficulty: formatHex(dialect, block.difficulty), - number: formatHex(dialect, block.number), - timestamp: formatHex(dialect, block.timestamp), + difficulty: hexToBigInt(block.difficulty), + number: hexToBigInt(block.number), + timestamp: hexToBigInt(block.timestamp), extraData: block.extraData, - gasLimit: formatHex(dialect, block.gasLimit), - gasUsed: formatHex(dialect, block.gasUsed), + gasLimit: hexToBigInt(block.gasLimit), + gasUsed: hexToBigInt(block.gasUsed), logsBloom: block.logsBloom!, miner: toLowerCase(block.miner), mixHash: block.mixHash ?? null, @@ -96,10 +74,10 @@ export const encodeBlock = ({ parentHash: block.parentHash, receiptsRoot: block.receiptsRoot, sha3Uncles: block.sha3Uncles ?? null, - size: formatHex(dialect, block.size), + size: hexToBigInt(block.size), stateRoot: block.stateRoot, totalDifficulty: block.totalDifficulty - ? formatHex(dialect, block.totalDifficulty) + ? hexToBigInt(block.totalDifficulty) : null, transactionsRoot: block.transactionsRoot, }; @@ -110,7 +88,7 @@ type LogsTable = { chainId: number; checkpoint: string | null; blockHash: Hash; - blockNumber: string | bigint; + blockNumber: bigint; logIndex: number; transactionHash: Hash; transactionIndex: number; @@ -126,12 +104,10 @@ export const encodeLog = ({ log, block, chainId, - dialect, }: { log: SyncLog; block?: SyncBlock; chainId: number; - dialect: "sqlite" | "postgres"; }): Insertable => { return { id: `${log.blockHash}-${log.logIndex}`, @@ -148,7 +124,7 @@ export const encodeLog = ({ eventIndex: hexToBigInt(log.logIndex), }), blockHash: log.blockHash, - blockNumber: formatHex(dialect, log.blockNumber), + blockNumber: hexToBigInt(log.blockNumber), logIndex: hexToNumber(log.logIndex), transactionHash: log.transactionHash, transactionIndex: hexToNumber(log.transactionIndex), @@ -164,21 +140,21 @@ export const encodeLog = ({ type TransactionsTable = { hash: Hash; blockHash: Hash; - blockNumber: string | bigint; + blockNumber: bigint; from: Address; - gas: string | bigint; + gas: bigint; input: Hex; nonce: number; r: Hex | null; s: Hex | null; to: Address | null; transactionIndex: number; - v: string | bigint | null; - value: string | bigint; + v: bigint | null; + value: bigint; type: Hex; - gasPrice: string | bigint | null; - maxFeePerGas: string | bigint | null; - maxPriorityFeePerGas: string | bigint | null; + gasPrice: bigint | null; + maxFeePerGas: bigint | null; + maxPriorityFeePerGas: bigint | null; accessList: string | null; chainId: number; @@ -187,31 +163,27 @@ type TransactionsTable = { export const encodeTransaction = ({ transaction, chainId, - dialect, }: { transaction: SyncTransaction; chainId: number; - dialect: "sqlite" | "postgres"; }): Insertable => { return { hash: transaction.hash, chainId, blockHash: transaction.blockHash, - blockNumber: formatHex(dialect, transaction.blockNumber), + blockNumber: hexToBigInt(transaction.blockNumber), accessList: transaction.accessList ? JSON.stringify(transaction.accessList) : undefined, from: toLowerCase(transaction.from), - gas: formatHex(dialect, transaction.gas), - gasPrice: transaction.gasPrice - ? formatHex(dialect, transaction.gasPrice) - : null, + gas: hexToBigInt(transaction.gas), + gasPrice: transaction.gasPrice ? hexToBigInt(transaction.gasPrice) : null, input: transaction.input, maxFeePerGas: transaction.maxFeePerGas - ? formatHex(dialect, transaction.maxFeePerGas) + ? hexToBigInt(transaction.maxFeePerGas) : null, maxPriorityFeePerGas: transaction.maxPriorityFeePerGas - ? formatHex(dialect, transaction.maxPriorityFeePerGas) + ? hexToBigInt(transaction.maxPriorityFeePerGas) : null, nonce: hexToNumber(transaction.nonce), r: transaction.r ?? null, @@ -219,8 +191,8 @@ export const encodeTransaction = ({ to: transaction.to ? toLowerCase(transaction.to) : null, transactionIndex: hexToNumber(transaction.transactionIndex), type: transaction.type ?? "0x0", - value: formatHex(dialect, transaction.value), - v: transaction.v ? formatHex(dialect, transaction.v) : null, + value: hexToBigInt(transaction.value), + v: transaction.v ? hexToBigInt(transaction.v) : null, }; }; @@ -228,12 +200,12 @@ type TransactionReceiptsTable = { transactionHash: Hash; chainId: number; blockHash: Hash; - blockNumber: string | bigint; + blockNumber: bigint; contractAddress: Address | null; - cumulativeGasUsed: string | bigint; - effectiveGasPrice: string | bigint; + cumulativeGasUsed: bigint; + effectiveGasPrice: bigint; from: Address; - gasUsed: string | bigint; + gasUsed: bigint; logs: string; logsBloom: Hex; status: Hex; @@ -245,24 +217,22 @@ type TransactionReceiptsTable = { export const encodeTransactionReceipt = ({ transactionReceipt, chainId, - dialect, }: { transactionReceipt: SyncTransactionReceipt; chainId: number; - dialect: "sqlite" | "postgres"; }): Insertable => { return { transactionHash: transactionReceipt.transactionHash, chainId, blockHash: transactionReceipt.blockHash, - blockNumber: formatHex(dialect, transactionReceipt.blockNumber), + blockNumber: hexToBigInt(transactionReceipt.blockNumber), contractAddress: transactionReceipt.contractAddress ? toLowerCase(transactionReceipt.contractAddress) : null, - cumulativeGasUsed: formatHex(dialect, transactionReceipt.cumulativeGasUsed), - effectiveGasPrice: formatHex(dialect, transactionReceipt.effectiveGasPrice), + cumulativeGasUsed: hexToBigInt(transactionReceipt.cumulativeGasUsed), + effectiveGasPrice: hexToBigInt(transactionReceipt.effectiveGasPrice), from: toLowerCase(transactionReceipt.from), - gasUsed: formatHex(dialect, transactionReceipt.gasUsed), + gasUsed: hexToBigInt(transactionReceipt.gasUsed), logs: JSON.stringify(transactionReceipt.logs), logsBloom: transactionReceipt.logsBloom, status: transactionReceipt.status, @@ -278,14 +248,14 @@ type CallTracesTable = { checkpoint: string; callType: string; from: Address; - gas: string | bigint; + gas: bigint; input: Hex; to: Address; - value: string | bigint; + value: bigint; blockHash: Hex; - blockNumber: string | bigint; + blockNumber: bigint; error: string | null; - gasUsed: string | bigint | null; + gasUsed: bigint | null; output: Hex | null; subtraces: number; traceAddress: string; @@ -297,25 +267,23 @@ type CallTracesTable = { export function encodeCallTrace({ trace, chainId, - dialect, }: { trace: SyncCallTrace; chainId: number; - dialect: "sqlite" | "postgres"; }): Insertable> { return { id: `${trace.transactionHash}-${JSON.stringify(trace.traceAddress)}`, chainId, callType: trace.action.callType, from: toLowerCase(trace.action.from), - gas: formatHex(dialect, trace.action.gas), + gas: hexToBigInt(trace.action.gas), input: trace.action.input, to: toLowerCase(trace.action.to), - value: formatHex(dialect, trace.action.value), + value: hexToBigInt(trace.action.value), blockHash: trace.blockHash, - blockNumber: formatHex(dialect, trace.blockNumber), + blockNumber: hexToBigInt(trace.blockNumber), error: trace.error ?? null, - gasUsed: trace.result ? formatHex(dialect, trace.result.gasUsed) : null, + gasUsed: trace.result ? hexToBigInt(trace.result.gasUsed) : null, output: trace.result ? trace.result.output : null, subtraces: trace.subtraces, traceAddress: JSON.stringify(trace.traceAddress), @@ -328,7 +296,7 @@ export function encodeCallTrace({ type RpcRequestResultsTable = { request: string; chainId: number; - blockNumber: string | bigint; + blockNumber: bigint; result: string; }; @@ -346,8 +314,8 @@ type LogFiltersTable = { type LogFilterIntervalsTable = { id: Generated; logFilterId: string; - startBlock: string | bigint; - endBlock: string | bigint; + startBlock: bigint; + endBlock: bigint; }; type FactoryLogFiltersTable = { @@ -366,8 +334,8 @@ type FactoryLogFiltersTable = { type FactoryLogFilterIntervalsTable = { id: Generated; factoryId: string; - startBlock: string | bigint; - endBlock: string | bigint; + startBlock: bigint; + endBlock: bigint; }; type TraceFiltersTable = { @@ -380,8 +348,8 @@ type TraceFiltersTable = { type TraceFilterIntervalsTable = { id: Generated; traceFilterId: string; - startBlock: string | bigint; - endBlock: string | bigint; + startBlock: bigint; + endBlock: bigint; }; type FactoryTraceFiltersTable = { @@ -396,8 +364,8 @@ type FactoryTraceFiltersTable = { type FactoryTraceFilterIntervalsTable = { id: Generated; factoryId: string; - startBlock: string | bigint; - endBlock: string | bigint; + startBlock: bigint; + endBlock: bigint; }; type BlockFiltersTable = { @@ -410,8 +378,8 @@ type BlockFiltersTable = { type BlockFilterIntervalsTable = { id: Generated; blockFilterId: string; - startBlock: string | bigint; - endBlock: string | bigint; + startBlock: bigint; + endBlock: bigint; }; export type PonderSyncSchema = { diff --git a/packages/core/src/sync-store/index.ts b/packages/core/src/sync-store/index.ts index c7c9e9a57..b9f9d09cf 100644 --- a/packages/core/src/sync-store/index.ts +++ b/packages/core/src/sync-store/index.ts @@ -30,7 +30,6 @@ import type { } from "@/types/sync.js"; import type { NonNull } from "@/types/utils.js"; import { EVENT_TYPES, encodeCheckpoint } from "@/utils/checkpoint.js"; -import { decodeToBigInt } from "@/utils/encoding.js"; import { type Interval, intervalIntersectionMany, @@ -53,8 +52,6 @@ import { encodeLog, encodeTransaction, encodeTransactionReceipt, - formatBig, - parseBig, } from "./encoding.js"; export type SyncStore = { @@ -126,7 +123,6 @@ export type SyncStore = { }; const logFactorySQL = ( - sql: "sqlite" | "postgres", qb: SelectQueryBuilder, factory: LogFactory, ) => @@ -139,17 +135,13 @@ const logFactorySQL = ( ); const start = 2 + 12 * 2 + childAddressOffset * 2 + 1; const length = 20 * 2; - return sql === "sqlite" - ? ksql`'0x' || substring(data, ${start}, ${length})` - : ksql`'0x' || substring(data from ${start}::int for ${length}::int)`; + return ksql`'0x' || substring(data from ${start}::int for ${length}::int)`; } else { const start = 2 + 12 * 2 + 1; const length = 20 * 2; - return sql === "sqlite" - ? ksql`'0x' || substring(${ksql.ref(factory.childAddressLocation)}, ${start}, ${length})` - : ksql`'0x' || substring(${ksql.ref( - factory.childAddressLocation, - )} from ${start}::integer for ${length}::integer)`; + return ksql`'0x' || substring(${ksql.ref( + factory.childAddressLocation, + )} from ${start}::integer for ${length}::integer)`; } })().as("childAddress"), ) @@ -165,16 +157,14 @@ const logFactorySQL = ( export const createSyncStore = ({ common, db, - dialect, }: { common: Common; - dialect: "sqlite" | "postgres"; db: HeadlessKysely; }): SyncStore => ({ insertInterval: async ({ filter, interval }) => db.wrap({ method: "insertInterval" }, async () => { - const startBlock = formatBig(dialect, interval[0]); - const endBlock = formatBig(dialect, interval[1]); + const startBlock = BigInt(interval[0]); + const endBlock = BigInt(interval[1]); switch (filter.type) { case "log": { @@ -434,21 +424,17 @@ export const createSyncStore = ({ .execute(); const mergedIntervals = intervalUnion( - existingIntervals.map((i) => - dialect === "sqlite" - ? [ - Number(decodeToBigInt(i.startBlock as string)), - Number(decodeToBigInt(i.endBlock as string)), - ] - : [Number(i.startBlock), Number(i.endBlock)], - ), + existingIntervals.map((i) => [ + Number(i.startBlock), + Number(i.endBlock), + ]), ); const mergedIntervalRows = mergedIntervals.map( ([startBlock, endBlock]) => ({ [idCol as string]: fragment.id, - startBlock: formatBig(dialect, startBlock), - endBlock: formatBig(dialect, endBlock), + startBlock: BigInt(startBlock), + endBlock: BigInt(endBlock), }), ); @@ -488,14 +474,10 @@ export const createSyncStore = ({ .execute(); const union = intervalUnion( - _intervals.map(({ startBlock, endBlock }) => - dialect === "sqlite" - ? [ - Number(decodeToBigInt(startBlock as string)), - Number(decodeToBigInt(endBlock as string)), - ] - : [Number(startBlock), Number(endBlock)], - ), + _intervals.map(({ startBlock, endBlock }) => [ + Number(startBlock), + Number(endBlock), + ]), ); intervals.push(union); @@ -507,7 +489,7 @@ export const createSyncStore = ({ db.wrap({ method: "getChildAddresses" }, async () => { return await db .selectFrom("logs") - .$call((qb) => logFactorySQL(dialect, qb, filter)) + .$call((qb) => logFactorySQL(qb, filter)) .orderBy("id asc") .limit(limit) .execute() @@ -522,9 +504,7 @@ export const createSyncStore = ({ ksql`( values ${ksql.join(addresses.map((a) => ksql`( ${ksql.val(a)} )`))} )`, ) .with("childAddresses", (db) => - db - .selectFrom("logs") - .$call((qb) => logFactorySQL(dialect, qb, filter)), + db.selectFrom("logs").$call((qb) => logFactorySQL(qb, filter)), ) .selectFrom("addresses") .where( @@ -544,8 +524,7 @@ export const createSyncStore = ({ // input will have const batchSize = Math.floor( common.options.databaseMaxQueryParameters / - Object.keys(encodeLog({ log: logs[0]!.log, chainId, dialect })) - .length, + Object.keys(encodeLog({ log: logs[0]!.log, chainId })).length, ); /** @@ -562,9 +541,7 @@ export const createSyncStore = ({ .values( logs .slice(i, i + batchSize) - .map(({ log, block }) => - encodeLog({ log, block, chainId, dialect }), - ), + .map(({ log, block }) => encodeLog({ log, block, chainId })), ) .onConflict((oc) => oc.column("id").$call((qb) => @@ -586,8 +563,7 @@ export const createSyncStore = ({ // input will have const batchSize = Math.floor( common.options.databaseMaxQueryParameters / - Object.keys(encodeBlock({ block: blocks[0]!, chainId, dialect })) - .length, + Object.keys(encodeBlock({ block: blocks[0]!, chainId })).length, ); for (let i = 0; i < blocks.length; i += batchSize) { @@ -596,7 +572,7 @@ export const createSyncStore = ({ .values( blocks .slice(i, i + batchSize) - .map((block) => encodeBlock({ block, chainId, dialect })), + .map((block) => encodeBlock({ block, chainId })), ) .onConflict((oc) => oc.column("hash").doNothing()) .execute(); @@ -623,7 +599,6 @@ export const createSyncStore = ({ encodeTransaction({ transaction: transactions[0]!, chainId, - dialect, }), ).length, ); @@ -635,7 +610,7 @@ export const createSyncStore = ({ transactions .slice(i, i + batchSize) .map((transaction) => - encodeTransaction({ transaction, chainId, dialect }), + encodeTransaction({ transaction, chainId }), ), ) .onConflict((oc) => @@ -669,7 +644,6 @@ export const createSyncStore = ({ encodeTransactionReceipt({ transactionReceipt: transactionReceipts[0]!, chainId, - dialect, }), ).length, ); @@ -684,7 +658,6 @@ export const createSyncStore = ({ encodeTransactionReceipt({ transactionReceipt, chainId, - dialect, }), ), ) @@ -750,7 +723,7 @@ export const createSyncStore = ({ traces.push( // @ts-ignore ...traceByTransactionHash[transactionHash as Hex]!.traces.map( - (trace) => encodeCallTrace({ trace, chainId, dialect }), + (trace) => encodeCallTrace({ trace, chainId }), ), ); @@ -807,9 +780,7 @@ export const createSyncStore = ({ return qb.where( column, "in", - db - .selectFrom("logs") - .$call((qb) => logFactorySQL(dialect, qb, address)), + db.selectFrom("logs").$call((qb) => logFactorySQL(qb, address)), ); } if (Array.isArray(address)) return qb.where(column, "in", address); @@ -853,9 +824,9 @@ export const createSyncStore = ({ return qb; }) .$call((qb) => addressSQL(qb as any, filter.address, "address")) - .where("blockNumber", ">=", formatBig(dialect, filter.fromBlock)) + .where("blockNumber", ">=", BigInt(filter.fromBlock)) .$if(filter.toBlock !== undefined, (qb) => - qb.where("blockNumber", "<=", formatBig(dialect, filter.toBlock!)), + qb.where("blockNumber", "<=", BigInt(filter.toBlock!)), ); const callTraceSQL = ( @@ -884,9 +855,9 @@ export const createSyncStore = ({ .where(ksql`${ksql.ref("callTraces.error")} IS NULL`) .$call((qb) => addressSQL(qb as any, filter.fromAddress, "from")) .$call((qb) => addressSQL(qb, filter.toAddress, "to")) - .where("blockNumber", ">=", formatBig(dialect, filter.fromBlock)) + .where("blockNumber", ">=", BigInt(filter.fromBlock)) .$if(filter.toBlock !== undefined, (qb) => - qb.where("blockNumber", "<=", formatBig(dialect, filter.toBlock!)), + qb.where("blockNumber", "<=", BigInt(filter.toBlock!)), ); const blockSQL = ( @@ -909,9 +880,9 @@ export const createSyncStore = ({ .$if(filter !== undefined && filter.interval !== undefined, (qb) => qb.where(ksql`(number - ${filter.offset}) % ${filter.interval} = 0`), ) - .where("number", ">=", formatBig(dialect, filter.fromBlock)) + .where("number", ">=", BigInt(filter.fromBlock)) .$if(filter.toBlock !== undefined, (qb) => - qb.where("number", "<=", formatBig(dialect, filter.toBlock!)), + qb.where("number", "<=", BigInt(filter.toBlock!)), ); const rows = await db.wrap( @@ -1089,26 +1060,26 @@ export const createSyncStore = ({ checkpoint: row.event_checkpoint, block: { baseFeePerGas: row.block_baseFeePerGas - ? parseBig(dialect, row.block_baseFeePerGas) + ? row.block_baseFeePerGas : null, - difficulty: parseBig(dialect, row.block_difficulty), + difficulty: row.block_difficulty, extraData: row.block_extraData, - gasLimit: parseBig(dialect, row.block_gasLimit), - gasUsed: parseBig(dialect, row.block_gasUsed), + gasLimit: row.block_gasLimit, + gasUsed: row.block_gasUsed, hash: row.block_hash, logsBloom: row.block_logsBloom, miner: checksumAddress(row.block_miner), mixHash: row.block_mixHash, nonce: row.block_nonce, - number: parseBig(dialect, row.block_number), + number: row.block_number, parentHash: row.block_parentHash, receiptsRoot: row.block_receiptsRoot, sha3Uncles: row.block_sha3Uncles, - size: parseBig(dialect, row.block_size), + size: row.block_size, stateRoot: row.block_stateRoot, - timestamp: parseBig(dialect, row.block_timestamp), + timestamp: row.block_timestamp, totalDifficulty: row.block_totalDifficulty - ? parseBig(dialect, row.block_totalDifficulty) + ? row.block_totalDifficulty : null, transactionsRoot: row.block_transactionsRoot, }, @@ -1116,7 +1087,7 @@ export const createSyncStore = ({ ? { address: checksumAddress(row.log_address!), blockHash: row.log_blockHash, - blockNumber: parseBig(dialect, row.log_blockNumber!), + blockNumber: row.log_blockNumber, data: row.log_data, id: row.log_id as Log["id"], logIndex: Number(row.log_logIndex), @@ -1134,9 +1105,9 @@ export const createSyncStore = ({ transaction: hasTransaction ? { blockHash: row.tx_blockHash, - blockNumber: parseBig(dialect, row.tx_blockNumber), + blockNumber: row.tx_blockNumber, from: checksumAddress(row.tx_from), - gas: parseBig(dialect, row.tx_gas), + gas: row.tx_gas, hash: row.tx_hash, input: row.tx_input, nonce: Number(row.tx_nonce), @@ -1144,36 +1115,33 @@ export const createSyncStore = ({ s: row.tx_s, to: row.tx_to ? checksumAddress(row.tx_to) : row.tx_to, transactionIndex: Number(row.tx_transactionIndex), - value: parseBig(dialect, row.tx_value), - v: row.tx_v ? parseBig(dialect, row.tx_v) : null, + value: row.tx_value, + v: row.tx_v ? row.tx_v : null, ...(row.tx_type === "0x0" ? { type: "legacy", - gasPrice: parseBig(dialect, row.tx_gasPrice), + gasPrice: row.tx_gasPrice, } : row.tx_type === "0x1" ? { type: "eip2930", - gasPrice: parseBig(dialect, row.tx_gasPrice), + gasPrice: row.tx_gasPrice, accessList: JSON.parse(row.tx_accessList), } : row.tx_type === "0x2" ? { type: "eip1559", - maxFeePerGas: parseBig(dialect, row.tx_maxFeePerGas), - maxPriorityFeePerGas: parseBig( - dialect, - row.tx_maxPriorityFeePerGas, - ), + maxFeePerGas: row.tx_maxFeePerGas, + maxPriorityFeePerGas: row.tx_maxPriorityFeePerGas, } : row.tx_type === "0x7e" ? { type: "deposit", maxFeePerGas: row.tx_maxFeePerGas - ? parseBig(dialect, row.tx_maxFeePerGas) + ? row.tx_maxFeePerGas : undefined, maxPriorityFeePerGas: row.tx_maxPriorityFeePerGas - ? parseBig(dialect, row.tx_maxPriorityFeePerGas) + ? row.tx_maxPriorityFeePerGas : undefined, } : { @@ -1186,15 +1154,15 @@ export const createSyncStore = ({ id: row.callTrace_id, from: checksumAddress(row.callTrace_from), to: checksumAddress(row.callTrace_to), - gas: parseBig(dialect, row.callTrace_gas), - value: parseBig(dialect, row.callTrace_value), + gas: row.callTrace_gas, + value: row.callTrace_value, input: row.callTrace_input, output: row.callTrace_output, - gasUsed: parseBig(dialect, row.callTrace_gasUsed), + gasUsed: row.callTrace_gasUsed, subtraces: row.callTrace_subtraces, traceAddress: JSON.parse(row.callTrace_traceAddress), blockHash: row.callTrace_blockHash, - blockNumber: parseBig(dialect, row.callTrace_blockNumber), + blockNumber: row.callTrace_blockNumber, transactionHash: row.callTrace_transactionHash, transactionIndex: row.callTrace_transactionPosition, callType: row.callTrace_callType as CallTrace["callType"], @@ -1203,14 +1171,14 @@ export const createSyncStore = ({ transactionReceipt: hasTransactionReceipt ? { blockHash: row.txr_blockHash, - blockNumber: parseBig(dialect, row.txr_blockNumber), + blockNumber: row.txr_blockNumber, contractAddress: row.txr_contractAddress ? checksumAddress(row.txr_contractAddress) : null, - cumulativeGasUsed: parseBig(dialect, row.txr_cumulativeGasUsed), - effectiveGasPrice: parseBig(dialect, row.txr_effectiveGasPrice), + cumulativeGasUsed: row.txr_cumulativeGasUsed, + effectiveGasPrice: row.txr_effectiveGasPrice, from: checksumAddress(row.txr_from), - gasUsed: parseBig(dialect, row.txr_gasUsed), + gasUsed: row.txr_gasUsed, logs: JSON.parse(row.txr_logs).map((log: SyncLog) => ({ address: checksumAddress(log.address), blockHash: log.blockHash, @@ -1267,7 +1235,7 @@ export const createSyncStore = ({ .insertInto("rpcRequestResults") .values({ request, - blockNumber: formatBig(dialect, blockNumber), + blockNumber, chainId, result, }) @@ -1285,7 +1253,7 @@ export const createSyncStore = ({ .select("result") .where("request", "=", request) .where("chainId", "=", chainId) - .where("blockNumber", "=", formatBig(dialect, blockNumber)) + .where("blockNumber", "=", blockNumber) .executeTakeFirst(); return result?.result ?? null; @@ -1295,9 +1263,7 @@ export const createSyncStore = ({ if (blocks.length === 0) return; const hashes = blocks.map(({ hash }) => hash); - const numbers = blocks.map(({ number }) => - formatBig(dialect, hexToBigInt(number)), - ); + const numbers = blocks.map(({ number }) => hexToBigInt(number)); await db.deleteFrom("blocks").where("hash", "in", hashes).execute(); await db.deleteFrom("logs").where("blockHash", "in", hashes).execute(); @@ -1321,7 +1287,7 @@ export const createSyncStore = ({ .innerJoin("logFilters", "logFilterId", "logFilters.id") .select("logFilterId") .where("chainId", "=", chainId) - .where("startBlock", ">=", formatBig(dialect, fromBlock)), + .where("startBlock", ">=", BigInt(fromBlock)), ) .deleteFrom("logFilterIntervals") .where( @@ -1338,12 +1304,12 @@ export const createSyncStore = ({ .innerJoin("logFilters", "logFilterId", "logFilters.id") .select("logFilterId") .where("chainId", "=", chainId) - .where("startBlock", "<", formatBig(dialect, fromBlock)) - .where("endBlock", ">", formatBig(dialect, fromBlock)), + .where("startBlock", "<", BigInt(fromBlock)) + .where("endBlock", ">", BigInt(fromBlock)), ) .updateTable("logFilterIntervals") .set({ - endBlock: formatBig(dialect, fromBlock), + endBlock: BigInt(fromBlock), }) .where( "logFilterId", @@ -1364,7 +1330,7 @@ export const createSyncStore = ({ .select("factoryId") .where("chainId", "=", chainId) - .where("startBlock", ">=", formatBig(dialect, fromBlock)), + .where("startBlock", ">=", BigInt(fromBlock)), ) .deleteFrom("factoryLogFilterIntervals") .where( @@ -1386,12 +1352,12 @@ export const createSyncStore = ({ .select("factoryId") .where("chainId", "=", chainId) - .where("startBlock", "<", formatBig(dialect, fromBlock)) - .where("endBlock", ">", formatBig(dialect, fromBlock)), + .where("startBlock", "<", BigInt(fromBlock)) + .where("endBlock", ">", BigInt(fromBlock)), ) .updateTable("factoryLogFilterIntervals") .set({ - endBlock: formatBig(dialect, fromBlock), + endBlock: BigInt(fromBlock), }) .where( "factoryId", @@ -1407,7 +1373,7 @@ export const createSyncStore = ({ .innerJoin("traceFilters", "traceFilterId", "traceFilters.id") .select("traceFilterId") .where("chainId", "=", chainId) - .where("startBlock", ">=", formatBig(dialect, fromBlock)), + .where("startBlock", ">=", BigInt(fromBlock)), ) .deleteFrom("traceFilterIntervals") .where( @@ -1424,12 +1390,12 @@ export const createSyncStore = ({ .innerJoin("traceFilters", "traceFilterId", "traceFilters.id") .select("traceFilterId") .where("chainId", "=", chainId) - .where("startBlock", "<", formatBig(dialect, fromBlock)) - .where("endBlock", ">", formatBig(dialect, fromBlock)), + .where("startBlock", "<", BigInt(fromBlock)) + .where("endBlock", ">", BigInt(fromBlock)), ) .updateTable("traceFilterIntervals") .set({ - endBlock: formatBig(dialect, fromBlock), + endBlock: BigInt(fromBlock), }) .where( "traceFilterId", @@ -1449,7 +1415,7 @@ export const createSyncStore = ({ ) .select("factoryId") .where("chainId", "=", chainId) - .where("startBlock", ">=", formatBig(dialect, fromBlock)), + .where("startBlock", ">=", BigInt(fromBlock)), ) .deleteFrom("factoryTraceFilterIntervals") .where( @@ -1471,12 +1437,12 @@ export const createSyncStore = ({ .select("factoryId") .where("chainId", "=", chainId) - .where("startBlock", "<", formatBig(dialect, fromBlock)) - .where("endBlock", ">", formatBig(dialect, fromBlock)), + .where("startBlock", "<", BigInt(fromBlock)) + .where("endBlock", ">", BigInt(fromBlock)), ) .updateTable("factoryTraceFilterIntervals") .set({ - endBlock: formatBig(dialect, fromBlock), + endBlock: BigInt(fromBlock), }) .where( "factoryId", @@ -1492,7 +1458,7 @@ export const createSyncStore = ({ .innerJoin("blockFilters", "blockFilterId", "blockFilters.id") .select("blockFilterId") .where("chainId", "=", chainId) - .where("startBlock", ">=", formatBig(dialect, fromBlock)), + .where("startBlock", ">=", BigInt(fromBlock)), ) .deleteFrom("blockFilterIntervals") .where( @@ -1509,12 +1475,12 @@ export const createSyncStore = ({ .innerJoin("blockFilters", "blockFilterId", "blockFilters.id") .select("blockFilterId") .where("chainId", "=", chainId) - .where("startBlock", "<", formatBig(dialect, fromBlock)) - .where("endBlock", ">", formatBig(dialect, fromBlock)), + .where("startBlock", "<", BigInt(fromBlock)) + .where("endBlock", ">", BigInt(fromBlock)), ) .updateTable("blockFilterIntervals") .set({ - endBlock: formatBig(dialect, fromBlock), + endBlock: BigInt(fromBlock), }) .where( "blockFilterId", @@ -1526,32 +1492,32 @@ export const createSyncStore = ({ await tx .deleteFrom("logs") .where("chainId", "=", chainId) - .where("blockNumber", ">=", formatBig(dialect, fromBlock)) + .where("blockNumber", ">=", BigInt(fromBlock)) .execute(); await tx .deleteFrom("blocks") .where("chainId", "=", chainId) - .where("number", ">=", formatBig(dialect, fromBlock)) + .where("number", ">=", BigInt(fromBlock)) .execute(); await tx .deleteFrom("rpcRequestResults") .where("chainId", "=", chainId) - .where("blockNumber", ">=", formatBig(dialect, fromBlock)) + .where("blockNumber", ">=", BigInt(fromBlock)) .execute(); await tx .deleteFrom("callTraces") .where("chainId", "=", chainId) - .where("blockNumber", ">=", formatBig(dialect, fromBlock)) + .where("blockNumber", ">=", BigInt(fromBlock)) .execute(); await tx .deleteFrom("transactions") .where("chainId", "=", chainId) - .where("blockNumber", ">=", formatBig(dialect, fromBlock)) + .where("blockNumber", ">=", BigInt(fromBlock)) .execute(); await tx .deleteFrom("transactionReceipts") .where("chainId", "=", chainId) - .where("blockNumber", ">=", formatBig(dialect, fromBlock)) + .where("blockNumber", ">=", BigInt(fromBlock)) .execute(); }), ), diff --git a/packages/core/src/sync-store/postgres/migrations.ts b/packages/core/src/sync-store/migrations.ts similarity index 100% rename from packages/core/src/sync-store/postgres/migrations.ts rename to packages/core/src/sync-store/migrations.ts diff --git a/packages/core/src/sync-store/sqlite/migrations.ts b/packages/core/src/sync-store/sqlite/migrations.ts deleted file mode 100644 index bb3d39960..000000000 --- a/packages/core/src/sync-store/sqlite/migrations.ts +++ /dev/null @@ -1,1013 +0,0 @@ -import type { Kysely, Migration, MigrationProvider } from "kysely"; -import { sql } from "kysely"; - -const migrations: Record = { - "2023_05_15_0_initial": { - async up(db: Kysely) { - await db.schema - .createTable("blocks") - .addColumn("baseFeePerGas", "blob") // BigInt - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("difficulty", "blob", (col) => col.notNull()) // BigInt - .addColumn("extraData", "text", (col) => col.notNull()) - .addColumn("finalized", "integer", (col) => col.notNull()) // Boolean (0 or 1). - .addColumn("gasLimit", "blob", (col) => col.notNull()) // BigInt - .addColumn("gasUsed", "blob", (col) => col.notNull()) // BigInt - .addColumn("hash", "text", (col) => col.notNull().primaryKey()) - .addColumn("logsBloom", "text", (col) => col.notNull()) - .addColumn("miner", "text", (col) => col.notNull()) - .addColumn("mixHash", "text", (col) => col.notNull()) - .addColumn("nonce", "text", (col) => col.notNull()) - .addColumn("number", "blob", (col) => col.notNull()) // BigInt - .addColumn("parentHash", "text", (col) => col.notNull()) - .addColumn("receiptsRoot", "text", (col) => col.notNull()) - .addColumn("sha3Uncles", "text", (col) => col.notNull()) - .addColumn("size", "blob", (col) => col.notNull()) // BigInt - .addColumn("stateRoot", "text", (col) => col.notNull()) - .addColumn("timestamp", "blob", (col) => col.notNull()) // BigInt - .addColumn("totalDifficulty", "blob", (col) => col.notNull()) // BigInt - .addColumn("transactionsRoot", "text", (col) => col.notNull()) - .execute(); - - await db.schema - .createTable("transactions") - .addColumn("accessList", "text") - .addColumn("blockHash", "text", (col) => col.notNull()) - .addColumn("blockNumber", "blob", (col) => col.notNull()) // BigInt - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("finalized", "integer", (col) => col.notNull()) // Boolean (0 or 1). - .addColumn("from", "text", (col) => col.notNull()) - .addColumn("gas", "blob", (col) => col.notNull()) // BigInt - .addColumn("gasPrice", "blob") // BigInt - .addColumn("hash", "text", (col) => col.notNull().primaryKey()) - .addColumn("input", "text", (col) => col.notNull()) - .addColumn("maxFeePerGas", "blob") // BigInt - .addColumn("maxPriorityFeePerGas", "blob") // BigInt - .addColumn("nonce", "integer", (col) => col.notNull()) - .addColumn("r", "text", (col) => col.notNull()) - .addColumn("s", "text", (col) => col.notNull()) - .addColumn("to", "text") - .addColumn("transactionIndex", "integer", (col) => col.notNull()) - .addColumn("type", "text", (col) => col.notNull()) - .addColumn("value", "blob", (col) => col.notNull()) // BigInt - .addColumn("v", "blob", (col) => col.notNull()) // BigInt - .execute(); - - await db.schema - .createTable("logs") - .addColumn("address", "text", (col) => col.notNull()) - .addColumn("blockHash", "text", (col) => col.notNull()) - .addColumn("blockNumber", "blob", (col) => col.notNull()) // BigInt - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("data", "text", (col) => col.notNull()) - .addColumn("finalized", "integer", (col) => col.notNull()) // Boolean (0 or 1). - .addColumn("id", "text", (col) => col.notNull().primaryKey()) - .addColumn("logIndex", "integer", (col) => col.notNull()) - .addColumn("topic0", "text") - .addColumn("topic1", "text") - .addColumn("topic2", "text") - .addColumn("topic3", "text") - .addColumn("transactionHash", "text", (col) => col.notNull()) - .addColumn("transactionIndex", "integer", (col) => col.notNull()) - .execute(); - - await db.schema - .createTable("contractReadResults") - .addColumn("address", "text", (col) => col.notNull()) - .addColumn("blockNumber", "blob", (col) => col.notNull()) // BigInt - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("data", "text", (col) => col.notNull()) - .addColumn("finalized", "integer", (col) => col.notNull()) // Boolean (0 or 1). - .addColumn("result", "text", (col) => col.notNull()) - .addPrimaryKeyConstraint("contractReadResultPrimaryKey", [ - "chainId", - "blockNumber", - "address", - "data", - ]) - .execute(); - - await db.schema - .createTable("logFilterCachedRanges") - .addColumn("endBlock", "blob", (col) => col.notNull()) // BigInt - .addColumn("endBlockTimestamp", "blob", (col) => col.notNull()) // BigInt - .addColumn("filterKey", "text", (col) => col.notNull()) - // The `id` column should not be included in INSERT statements. - // This column uses SQLite's ROWID() function (simple autoincrement). - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) - .addColumn("startBlock", "blob", (col) => col.notNull()) // BigInt - .execute(); - }, - }, - "2023_06_20_0_indices": { - async up(db: Kysely) { - await db.schema - .createIndex("log_events_index") - .on("logs") - .columns(["address", "chainId", "blockHash"]) - .execute(); - - await db.schema - .createIndex("blocks_index") - .on("blocks") - .columns(["timestamp", "number"]) - .execute(); - - await db.schema - .createIndex("logFilterCachedRanges_index") - .on("logFilterCachedRanges") - .columns(["filterKey"]) - .execute(); - }, - }, - "2023_07_18_0_better_indices": { - async up(db: Kysely) { - // Drop old indices. - await db.schema.dropIndex("log_events_index").execute(); - await db.schema.dropIndex("blocks_index").execute(); - - // Block hash is a join key. - await db.schema - .createIndex("log_block_hash_index") - .on("logs") - .column("blockHash") - .execute(); - - // Chain ID, address and topic0 are all used in WHERE clauses. - await db.schema - .createIndex("log_chain_id_index") - .on("logs") - .column("chainId") - .execute(); - await db.schema - .createIndex("log_address_index") - .on("logs") - .column("address") - .execute(); - await db.schema - .createIndex("log_topic0_index") - .on("logs") - .column("topic0") - .execute(); - - // Block timestamp and number are both used in WHERE and SORT clauses. - await db.schema - .createIndex("block_timestamp_index") - .on("blocks") - .column("timestamp") - .execute(); - await db.schema - .createIndex("block_number_index") - .on("blocks") - .column("number") - .execute(); - }, - }, - "2023_07_24_0_drop_finalized": { - async up(db: Kysely) { - await db.schema.alterTable("blocks").dropColumn("finalized").execute(); - await db.schema - .alterTable("transactions") - .dropColumn("finalized") - .execute(); - await db.schema.alterTable("logs").dropColumn("finalized").execute(); - await db.schema - .alterTable("contractReadResults") - .dropColumn("finalized") - .execute(); - }, - }, - "2023_09_19_0_new_sync_design": { - async up(db: Kysely) { - /** This table is no longer being used. */ - await db.schema.dropTable("logFilterCachedRanges").execute(); - - /** Drop and re-create all tables to fix bigint encoding. */ - await db.schema.dropTable("blocks").execute(); - await db.schema - .createTable("blocks") - .addColumn("baseFeePerGas", "varchar(79)") - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("difficulty", "varchar(79)", (col) => col.notNull()) - .addColumn("extraData", "text", (col) => col.notNull()) - .addColumn("gasLimit", "varchar(79)", (col) => col.notNull()) - .addColumn("gasUsed", "varchar(79)", (col) => col.notNull()) - .addColumn("hash", "varchar(66)", (col) => col.notNull().primaryKey()) - .addColumn("logsBloom", "varchar(514)", (col) => col.notNull()) - .addColumn("miner", "varchar(42)", (col) => col.notNull()) - .addColumn("mixHash", "varchar(66)", (col) => col.notNull()) - .addColumn("nonce", "varchar(18)", (col) => col.notNull()) - .addColumn("number", "varchar(79)", (col) => col.notNull()) - .addColumn("parentHash", "varchar(66)", (col) => col.notNull()) - .addColumn("receiptsRoot", "varchar(66)", (col) => col.notNull()) - .addColumn("sha3Uncles", "varchar(66)", (col) => col.notNull()) - .addColumn("size", "varchar(79)", (col) => col.notNull()) - .addColumn("stateRoot", "varchar(66)", (col) => col.notNull()) - .addColumn("timestamp", "varchar(79)", (col) => col.notNull()) - .addColumn("totalDifficulty", "varchar(79)", (col) => col.notNull()) - .addColumn("transactionsRoot", "varchar(66)", (col) => col.notNull()) - .execute(); - await db.schema - .createIndex("blockTimestampIndex") - .on("blocks") - .column("timestamp") - .execute(); - await db.schema - .createIndex("blockNumberIndex") - .on("blocks") - .column("number") - .execute(); - - await db.schema.dropTable("transactions").execute(); - await db.schema - .createTable("transactions") - .addColumn("accessList", "text") - .addColumn("blockHash", "varchar(66)", (col) => col.notNull()) - .addColumn("blockNumber", "varchar(79)", (col) => col.notNull()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("from", "varchar(42)", (col) => col.notNull()) - .addColumn("gas", "varchar(79)", (col) => col.notNull()) - .addColumn("gasPrice", "varchar(79)") - .addColumn("hash", "varchar(66)", (col) => col.notNull().primaryKey()) - .addColumn("input", "text", (col) => col.notNull()) - .addColumn("maxFeePerGas", "varchar(79)") - .addColumn("maxPriorityFeePerGas", "varchar(79)") - .addColumn("nonce", "integer", (col) => col.notNull()) - .addColumn("r", "varchar(66)", (col) => col.notNull()) - .addColumn("s", "varchar(66)", (col) => col.notNull()) - .addColumn("to", "varchar(42)") - .addColumn("transactionIndex", "integer", (col) => col.notNull()) - .addColumn("type", "text", (col) => col.notNull()) - .addColumn("value", "varchar(79)", (col) => col.notNull()) - .addColumn("v", "varchar(79)", (col) => col.notNull()) - .execute(); - - await db.schema.dropTable("logs").execute(); - await db.schema - .createTable("logs") - .addColumn("address", "varchar(42)", (col) => col.notNull()) - .addColumn("blockHash", "varchar(66)", (col) => col.notNull()) - .addColumn("blockNumber", "varchar(79)", (col) => col.notNull()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("data", "text", (col) => col.notNull()) - .addColumn("id", "text", (col) => col.notNull().primaryKey()) - .addColumn("logIndex", "integer", (col) => col.notNull()) - .addColumn("topic0", "varchar(66)") - .addColumn("topic1", "varchar(66)") - .addColumn("topic2", "varchar(66)") - .addColumn("topic3", "varchar(66)") - .addColumn("transactionHash", "varchar(66)", (col) => col.notNull()) - .addColumn("transactionIndex", "integer", (col) => col.notNull()) - .execute(); - await db.schema - .createIndex("logBlockHashIndex") - .on("logs") - .column("blockHash") - .execute(); - await db.schema - .createIndex("logChainIdIndex") - .on("logs") - .column("chainId") - .execute(); - await db.schema - .createIndex("logAddressIndex") - .on("logs") - .column("address") - .execute(); - await db.schema - .createIndex("logTopic0Index") - .on("logs") - .column("topic0") - .execute(); - - await db.schema.dropTable("contractReadResults").execute(); - await db.schema - .createTable("contractReadResults") - .addColumn("address", "varchar(42)", (col) => col.notNull()) - .addColumn("blockNumber", "varchar(79)", (col) => col.notNull()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("data", "text", (col) => col.notNull()) - .addColumn("result", "text", (col) => col.notNull()) - .addPrimaryKeyConstraint("contractReadResultPrimaryKey", [ - "chainId", - "blockNumber", - "address", - "data", - ]) - .execute(); - - /** Add new log filter and factory contract interval tables. */ - await db.schema - .createTable("logFilters") - .addColumn("id", "text", (col) => col.notNull().primaryKey()) // `${chainId}_${address}_${topic0}_${topic1}_${topic2}_${topic3}` - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("address", "varchar(66)") - .addColumn("topic0", "varchar(66)") - .addColumn("topic1", "varchar(66)") - .addColumn("topic2", "varchar(66)") - .addColumn("topic3", "varchar(66)") - .execute(); - await db.schema - .createTable("logFilterIntervals") - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) // Auto-increment - .addColumn("logFilterId", "text", (col) => - col.notNull().references("logFilters.id"), - ) - .addColumn("startBlock", "varchar(79)", (col) => col.notNull()) - .addColumn("endBlock", "varchar(79)", (col) => col.notNull()) - .execute(); - await db.schema - .createIndex("logFilterIntervalsLogFilterId") - .on("logFilterIntervals") - .column("logFilterId") - .execute(); - - await db.schema - .createTable("factories") - .addColumn("id", "text", (col) => col.notNull().primaryKey()) // `${chainId}_${address}_${eventSelector}_${childAddressLocation}` - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("address", "varchar(42)", (col) => col.notNull()) - .addColumn("eventSelector", "varchar(66)", (col) => col.notNull()) - .addColumn("childAddressLocation", "text", (col) => col.notNull()) // `topic${number}` or `offset${number}` - .addColumn("topic0", "varchar(66)") - .addColumn("topic1", "varchar(66)") - .addColumn("topic2", "varchar(66)") - .addColumn("topic3", "varchar(66)") - .execute(); - await db.schema - .createTable("factoryLogFilterIntervals") - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) // Auto-increment - .addColumn("factoryId", "text", (col) => - col.notNull().references("factories.id"), - ) - .addColumn("startBlock", "varchar(79)", (col) => col.notNull()) - .addColumn("endBlock", "varchar(79)", (col) => col.notNull()) - .execute(); - await db.schema - .createIndex("factoryLogFilterIntervalsFactoryId") - .on("factoryLogFilterIntervals") - .column("factoryId") - .execute(); - }, - }, - "2023_11_06_0_new_rpc_cache_design": { - async up(db: Kysely) { - await db.schema.dropTable("contractReadResults").execute(); - - /** - * Formatting for "request" field values: - * - * eth_call: eth_call_{to}_{data} - * eth_getBalance: eth_getBalance_{address} - * eth_getCode: eth_getCode_{address} - * eth_getStorageAt: eth_getStorageAt_{address}_{slot} - */ - await db.schema - .createTable("rpcRequestResults") - .addColumn("request", "text", (col) => col.notNull()) - .addColumn("blockNumber", "varchar(79)", (col) => col.notNull()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("result", "text", (col) => col.notNull()) - .addPrimaryKeyConstraint("rpcRequestResultPrimaryKey", [ - "request", - "chainId", - "blockNumber", - ]) - .execute(); - }, - }, - "2024_02_1_0_nullable_block_columns": { - async up(db: Kysely) { - // SQLite doesn't support dropping NOT NULL constraints. As a workaround: - // 1) Create a new column of the same type without NOT NULL. - // 2) Copy data from the old column to the new column. - // 3) Drop the old column. - // 4) Rename the new column to the old column's name. - - // Drop NOT NULL constraint from "blocks.mixHash". - await db.schema - .alterTable("blocks") - .addColumn("mixHash_temp_null", "varchar(66)") - .execute(); - await db - .updateTable("blocks") - .set((eb: any) => ({ - mixHash_temp_null: eb.selectFrom("blocks").select("mixHash"), - })) - .execute(); - await db.schema.alterTable("blocks").dropColumn("mixHash").execute(); - await db.schema - .alterTable("blocks") - .renameColumn("mixHash_temp_null", "mixHash") - .execute(); - - // Drop NOT NULL constraint from "blocks.nonce". - await db.schema - .alterTable("blocks") - .addColumn("nonce_temp_null", "varchar(18)") - .execute(); - await db - .updateTable("blocks") - .set((eb: any) => ({ - nonce_temp_null: eb.selectFrom("blocks").select("nonce"), - })) - .execute(); - await db.schema.alterTable("blocks").dropColumn("nonce").execute(); - await db.schema - .alterTable("blocks") - .renameColumn("nonce_temp_null", "nonce") - .execute(); - }, - }, - "2024_03_00_0_log_transaction_hash_index": { - async up(db: Kysely) { - await db.schema - .createIndex("log_transaction_hash_index") - .on("logs") - .column("transactionHash") - .execute(); - }, - }, - "2024_03_13_0_nullable_block_columns_sha3uncles": { - async up(db: Kysely) { - await columnDropNotNull({ - db, - table: "blocks", - column: "sha3Uncles", - columnType: "varchar(66)", - }); - }, - }, - "2024_03_14_0_nullable_transaction_rsv": { - async up(db: Kysely) { - await columnDropNotNull({ - db, - table: "transactions", - column: "r", - columnType: "varchar(66)", - }); - await columnDropNotNull({ - db, - table: "transactions", - column: "s", - columnType: "varchar(66)", - }); - await columnDropNotNull({ - db, - table: "transactions", - column: "v", - columnType: "varchar(79)", - }); - }, - }, - "2024_03_20_0_checkpoint_in_logs_table": { - async up(_db: Kysely) { - // no-op migration to avoid crashing databases that successfully ran this migration - return; - }, - }, - "2024_04_04_0_log_events_indexes": { - async up(db: Kysely) { - await db.schema.dropIndex("blockNumberIndex").ifExists().execute(); - await db.schema.dropIndex("blockTimestampIndex").ifExists().execute(); - - await db.schema - .createIndex("logBlockNumberIndex") - .on("logs") - .column("blockNumber") - .execute(); - }, - }, - "2024_04_14_0_nullable_block_total_difficulty": { - async up(db: Kysely) { - await columnDropNotNull({ - db, - table: "blocks", - column: "totalDifficulty", - columnType: "varchar(79)", - }); - }, - }, - "2024_04_14_1_add_checkpoint_column_to_logs_table": { - async up(db: Kysely) { - if (await hasCheckpointCol(db)) { - return; - } - await db.schema - .alterTable("logs") - .addColumn("checkpoint", "varchar(75)") - .execute(); - }, - }, - "2024_04_14_2_set_checkpoint_in_logs_table": { - async up(db: Kysely) { - await db.executeQuery( - sql` - CREATE TEMPORARY TABLE cp_vals AS - SELECT - logs.id, - substr(blocks.timestamp, -10, 10) || - substr('0000000000000000' || blocks.chainId, -16, 16) || - substr(blocks.number, -16, 16) || - substr('0000000000000000' || logs.transactionIndex, -16, 16) || - '5' || - substr('0000000000000000' || logs.logIndex, -16, 16) as checkpoint - FROM logs - JOIN blocks ON logs."blockHash" = blocks.hash - `.compile(db), - ); - - await db.executeQuery( - sql` - UPDATE logs - SET checkpoint=cp_vals.checkpoint - FROM cp_vals - WHERE logs.id = cp_vals.id - `.compile(db), - ); - }, - }, - "2024_04_14_3_index_on_logs_checkpoint": { - async up(db: Kysely) { - await db.schema - .createIndex("logs_checkpoint_index") - .ifNotExists() - .on("logs") - .column("checkpoint") - .execute(); - }, - }, - "2024_04_22_0_transaction_receipts": { - async up(db: Kysely) { - // Disable foriegn keys for the duration of this transaction. - await db.executeQuery(sql`PRAGMA foreign_keys = 0`.compile(db)); - - // Rename and update the existing tables to include the data we want. Note that - // these tables have constraints that we do NOT want. They won't get copied over. - await db.schema - .alterTable("logFilters") - .renameTo("logFilters_temp") - .execute(); - await db - .updateTable("logFilters_temp") - .set({ id: sql`"id" || '_0'` }) - .execute(); - await db.schema - .alterTable("logFilters_temp") - .addColumn("includeTransactionReceipts", "integer", (col) => - col.notNull().defaultTo(0), - ) - .execute(); - await db.schema - .alterTable("logFilterIntervals") - .renameTo("logFilterIntervals_temp") - .execute(); - await db - .updateTable("logFilterIntervals_temp") - .set({ logFilterId: sql`"logFilterId" || '_0'` }) - .execute(); - - await db.schema - .createTable("logFilters") - // `${chainId}_${address}_${topic0}_${topic1}_${topic2}_${topic3}_${includeTransactionReceipts}` - .addColumn("id", "text", (col) => col.notNull().primaryKey()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("address", "varchar(66)") - .addColumn("topic0", "varchar(66)") - .addColumn("topic1", "varchar(66)") - .addColumn("topic2", "varchar(66)") - .addColumn("topic3", "varchar(66)") - .addColumn("includeTransactionReceipts", "integer", (col) => - col.notNull(), - ) - .execute(); - await db.schema - .createTable("logFilterIntervals") - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) // Auto-increment - // Note that we removed the foreign key constraint here. - .addColumn("logFilterId", "text", (col) => col.notNull()) - .addColumn("startBlock", "varchar(79)", (col) => col.notNull()) - .addColumn("endBlock", "varchar(79)", (col) => col.notNull()) - .execute(); - // Copy data from temp tables to new tables. - await db.executeQuery( - sql`INSERT INTO "logFilters" SELECT * FROM "logFilters_temp"`.compile( - db, - ), - ); - await db.executeQuery( - sql`INSERT INTO "logFilterIntervals" SELECT * FROM "logFilterIntervals_temp"`.compile( - db, - ), - ); - // Drop the temp tables. - await db.schema.dropTable("logFilters_temp").execute(); - await db.schema.dropTable("logFilterIntervals_temp").execute(); - // Add back the index. - await db.schema - .createIndex("logFilterIntervalsLogFilterId") - .on("logFilterIntervals") - .column("logFilterId") - .execute(); - - // Repeat the same process for factories. - await db.schema - .alterTable("factories") - .renameTo("factories_temp") - .execute(); - await db - .updateTable("factories_temp") - .set({ id: sql`"id" || '_0'` }) - .execute(); - await db.schema - .alterTable("factories_temp") - .addColumn("includeTransactionReceipts", "integer", (col) => - col.notNull().defaultTo(0), - ) - .execute(); - await db.schema - .alterTable("factoryLogFilterIntervals") - .renameTo("factoryLogFilterIntervals_temp") - .execute(); - await db - .updateTable("factoryLogFilterIntervals_temp") - .set({ factoryId: sql`"factoryId" || '_0'` }) - .execute(); - await db.schema - .createTable("factories") - // `${chainId}_${address}_${eventSelector}_${childAddressLocation}_${topic0}_${topic1}_${topic2}_${topic3}_${includeTransactionReceipts}` - .addColumn("id", "text", (col) => col.notNull().primaryKey()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("address", "varchar(42)", (col) => col.notNull()) - .addColumn("eventSelector", "varchar(66)", (col) => col.notNull()) - .addColumn("childAddressLocation", "text", (col) => col.notNull()) // `topic${number}` or `offset${number}` - .addColumn("topic0", "varchar(66)") - .addColumn("topic1", "varchar(66)") - .addColumn("topic2", "varchar(66)") - .addColumn("topic3", "varchar(66)") - .addColumn("includeTransactionReceipts", "integer", (col) => - col.notNull(), - ) - .execute(); - await db.schema - .createTable("factoryLogFilterIntervals") - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) // Auto-increment - // Note that we removed the foreign key constraint here. - .addColumn("factoryId", "text", (col) => col.notNull()) - .addColumn("startBlock", "varchar(79)", (col) => col.notNull()) - .addColumn("endBlock", "varchar(79)", (col) => col.notNull()) - .execute(); - await db.executeQuery( - sql`INSERT INTO "factories" SELECT * FROM "factories_temp"`.compile(db), - ); - await db.executeQuery( - sql`INSERT INTO "factoryLogFilterIntervals" SELECT * FROM "factoryLogFilterIntervals_temp"`.compile( - db, - ), - ); - await db.schema.dropTable("factories_temp").execute(); - await db.schema.dropTable("factoryLogFilterIntervals_temp").execute(); - await db.schema - .createIndex("factoryLogFilterIntervalsFactoryId") - .on("factoryLogFilterIntervals") - .column("factoryId") - .execute(); - - await db.schema - .createTable("transactionReceipts") - .addColumn("blockHash", "varchar(66)", (col) => col.notNull()) - .addColumn("blockNumber", "varchar(79)", (col) => col.notNull()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("contractAddress", "varchar(66)") - .addColumn("cumulativeGasUsed", "varchar(79)", (col) => col.notNull()) - .addColumn("effectiveGasPrice", "varchar(79)", (col) => col.notNull()) - .addColumn("from", "varchar(42)", (col) => col.notNull()) - .addColumn("gasUsed", "varchar(79)", (col) => col.notNull()) - .addColumn("logs", "text", (col) => col.notNull()) - .addColumn("logsBloom", "varchar(514)", (col) => col.notNull()) - .addColumn("status", "text", (col) => col.notNull()) - .addColumn("to", "varchar(42)") - .addColumn("transactionHash", "varchar(66)", (col) => - col.notNull().primaryKey(), - ) - .addColumn("transactionIndex", "integer", (col) => col.notNull()) - .addColumn("type", "text", (col) => col.notNull()) - .execute(); - - await db.executeQuery(sql`PRAGMA foreign_keys = 1`.compile(db)); - }, - }, - "2024_04_23_0_block_filters": { - async up(db: Kysely) { - await db.schema - .createTable("blockFilters") - .addColumn("id", "text", (col) => col.notNull().primaryKey()) // `${chainId}_${interval}_${offset}` - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("interval", "integer", (col) => col.notNull()) - .addColumn("offset", "integer", (col) => col.notNull()) - .execute(); - await db.schema - .createTable("blockFilterIntervals") - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) // Auto-increment - .addColumn("blockFilterId", "text", (col) => - col.notNull().references("blockFilters.id"), - ) - .addColumn("startBlock", "varchar(79)", (col) => col.notNull()) - .addColumn("endBlock", "varchar(79)", (col) => col.notNull()) - .execute(); - await db.schema - .createIndex("blockFilterIntervalsBlockFilterId") - .on("blockFilterIntervals") - .column("blockFilterId") - .execute(); - - await db.schema - .alterTable("blocks") - .addColumn("checkpoint", "varchar(75)") - .execute(); - await db.executeQuery( - sql` - CREATE TEMPORARY TABLE bcp_vals AS - SELECT - blocks.hash, - substr(blocks.timestamp, -10, 10) || - substr('0000000000000000' || blocks.chainId, -16, 16) || - substr(blocks.number, -16, 16) || - '9999999999999999' || - '5' || - '0000000000000000' as checkpoint - FROM blocks - `.compile(db), - ); - await db.executeQuery( - sql` - UPDATE blocks - SET checkpoint=bcp_vals.checkpoint - FROM bcp_vals - WHERE blocks.hash = bcp_vals.hash - `.compile(db), - ); - - await db.schema.alterTable("blocks").renameTo("blocks_temp").execute(); - - await db.schema - .createTable("blocks") - .addColumn("baseFeePerGas", "varchar(79)") - .addColumn("difficulty", "varchar(79)", (col) => col.notNull()) - .addColumn("extraData", "text", (col) => col.notNull()) - .addColumn("gasLimit", "varchar(79)", (col) => col.notNull()) - .addColumn("gasUsed", "varchar(79)", (col) => col.notNull()) - .addColumn("hash", "varchar(66)", (col) => col.notNull().primaryKey()) - .addColumn("logsBloom", "varchar(514)", (col) => col.notNull()) - .addColumn("miner", "varchar(42)", (col) => col.notNull()) - .addColumn("mixHash", "varchar(66)", (col) => col.notNull()) - .addColumn("nonce", "varchar(18)", (col) => col.notNull()) - .addColumn("number", "varchar(79)", (col) => col.notNull()) - .addColumn("parentHash", "varchar(66)", (col) => col.notNull()) - .addColumn("receiptsRoot", "varchar(66)", (col) => col.notNull()) - .addColumn("sha3Uncles", "varchar(66)", (col) => col.notNull()) - .addColumn("size", "varchar(79)", (col) => col.notNull()) - .addColumn("stateRoot", "varchar(66)", (col) => col.notNull()) - .addColumn("timestamp", "varchar(79)", (col) => col.notNull()) - .addColumn("totalDifficulty", "varchar(79)", (col) => col.notNull()) - .addColumn("transactionsRoot", "varchar(66)", (col) => col.notNull()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("checkpoint", "varchar(75)", (col) => col.notNull()) - .execute(); - - await db.executeQuery( - sql`INSERT INTO "blocks" SELECT * FROM "blocks_temp"`.compile(db), - ); - - await db.schema.dropTable("blocks_temp").execute(); - - // The blocks.number index supports getEvents and deleteRealtimeData - await db.schema - .createIndex("blockNumberIndex") - .on("blocks") - .column("number") - .execute(); - // The blocks.chainId index supports getEvents and deleteRealtimeData - await db.schema - .createIndex("blockChainIdIndex") - .on("blocks") - .column("chainId") - .execute(); - // The blocks.number index supports getEvents - await db.schema - .createIndex("blockCheckpointIndex") - .on("blocks") - .column("checkpoint") - .execute(); - }, - }, - "2024_05_06_0_drop_not_null_block_columns": { - async up(db: Kysely) { - await columnDropNotNull({ - db, - table: "blocks", - column: "baseFeePerGas", - columnType: "varchar(79)", - }); - await columnDropNotNull({ - db, - table: "blocks", - column: "mixHash", - columnType: "varchar(66)", - }); - await columnDropNotNull({ - db, - table: "blocks", - column: "nonce", - columnType: "varchar(18)", - }); - await columnDropNotNull({ - db, - table: "blocks", - column: "sha3Uncles", - columnType: "varchar(66)", - }); - await columnDropNotNull({ - db, - table: "blocks", - column: "totalDifficulty", - columnType: "varchar(79)", - }); - }, - }, - "2024_05_07_0_trace_filters": { - async up(db: Kysely) { - // TODO(kyle) drop foreign key constraint on "blockFilterIntervals.blockFilterId". - - await db.schema - .createTable("traceFilters") - .addColumn("id", "text", (col) => col.notNull().primaryKey()) // `${chainId}_${fromAddress}_${toAddress}_${includeTransactionReceipts}` - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("fromAddress", "varchar(42)") - .addColumn("toAddress", "varchar(42)") - .execute(); - await db.schema - .createTable("traceFilterIntervals") - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) // Auto-increment - .addColumn("traceFilterId", "text", (col) => col.notNull()) - .addColumn("startBlock", "varchar(79)", (col) => col.notNull()) - .addColumn("endBlock", "varchar(79)", (col) => col.notNull()) - .execute(); - await db.schema - .createIndex("traceFilterIntervalsTraceFilterId") - .on("traceFilterIntervals") - .column("traceFilterId") - .execute(); - - await db.schema - .createTable("callTraces") - .addColumn("id", "text", (col) => col.notNull().primaryKey()) - .addColumn("callType", "text", (col) => col.notNull()) - .addColumn("from", "varchar(42)", (col) => col.notNull()) - .addColumn("gas", "varchar(79)", (col) => col.notNull()) - .addColumn("input", "text", (col) => col.notNull()) - .addColumn("to", "varchar(42)", (col) => col.notNull()) - .addColumn("value", "varchar(79)", (col) => col.notNull()) - .addColumn("blockHash", "varchar(66)", (col) => col.notNull()) - .addColumn("blockNumber", "varchar(79)", (col) => col.notNull()) - .addColumn("error", "text") - .addColumn("gasUsed", "varchar(79)") - .addColumn("output", "text") - .addColumn("subtraces", "integer", (col) => col.notNull()) - .addColumn("traceAddress", "text", (col) => col.notNull()) - .addColumn("transactionHash", "varchar(66)", (col) => col.notNull()) - .addColumn("transactionPosition", "integer", (col) => col.notNull()) - .addColumn("functionSelector", "varchar(10)", (col) => col.notNull()) - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("checkpoint", "varchar(75)", (col) => col.notNull()) - .execute(); - - // The callTraces.blockNumber index supports getEvents and deleteRealtimeData - await db.schema - .createIndex("callTracesBlockNumberIndex") - .on("callTraces") - .column("blockNumber") - .execute(); - - // The callTraces.functionSelector index supports getEvents - await db.schema - .createIndex("callTracesFunctionSelectorIndex") - .on("callTraces") - .column("functionSelector") - .execute(); - - // The callTraces.error index supports getEvents - await db.schema - .createIndex("callTracesErrorIndex") - .on("callTraces") - .column("error") - .execute(); - - // The callTraces.blockHash index supports getEvents - await db.schema - .createIndex("callTracesBlockHashIndex") - .on("callTraces") - .column("blockHash") - .execute(); - - // The callTraces.transactionHash index supports getEvents - await db.schema - .createIndex("callTracesTransactionHashIndex") - .on("callTraces") - .column("transactionHash") - .execute(); - - // The callTraces.checkpoint index supports getEvents - await db.schema - .createIndex("callTracesCheckpointIndex") - .on("callTraces") - .column("checkpoint") - .execute(); - - // The callTraces.chainId index supports getEvents - await db.schema - .createIndex("callTracesChainIdIndex") - .on("callTraces") - .column("chainId") - .execute(); - - // The callTraces.from index supports getEvents - await db.schema - .createIndex("callTracesFromIndex") - .on("callTraces") - .column("from") - .execute(); - - // The callTraces.to index supports getEvents - await db.schema - .createIndex("callTracesToIndex") - .on("callTraces") - .column("to") - .execute(); - - await db.schema - .alterTable("factories") - .renameTo("factoryLogFilters") - .execute(); - - await db.schema - .createTable("factoryTraceFilters") - .addColumn("id", "text", (col) => col.notNull().primaryKey()) // `${chainId}_${address}_${eventSelector}_${childAddressLocation}_${fromAddress}` - .addColumn("chainId", "integer", (col) => col.notNull()) - .addColumn("address", "varchar(42)", (col) => col.notNull()) - .addColumn("eventSelector", "varchar(66)", (col) => col.notNull()) - .addColumn("childAddressLocation", "text", (col) => col.notNull()) // `topic${number}` or `offset${number}` - .addColumn("fromAddress", "varchar(42)") - .execute(); - await db.schema - .createTable("factoryTraceFilterIntervals") - .addColumn("id", "integer", (col) => col.notNull().primaryKey()) // Auto-increment - .addColumn("factoryId", "text") - .addColumn("startBlock", "varchar(79)", (col) => col.notNull()) - .addColumn("endBlock", "varchar(79)", (col) => col.notNull()) - .execute(); - await db.schema - .createIndex("factoryTraceFilterIntervalsFactoryId") - .on("factoryTraceFilterIntervals") - .column("factoryId") - .execute(); - }, - }, -}; - -async function hasCheckpointCol(db: Kysely) { - const res = await db.executeQuery(sql`PRAGMA table_info("logs")`.compile(db)); - return res.rows.some((x: any) => x.name === "checkpoint"); -} - -const columnDropNotNull = async ({ - db, - table, - column, - columnType, -}: { - db: Kysely; - table: string; - column: string; - columnType: Parameters< - ReturnType["schema"]["alterTable"]>["addColumn"] - >[1]; -}) => { - const tempName = `${column}_temp_null`; - - await db.schema.alterTable(table).addColumn(tempName, columnType).execute(); - await db - .updateTable(table) - .set((eb: any) => ({ [tempName]: eb.selectFrom(table).select(column) })) - .execute(); - await db.schema.alterTable(table).dropColumn(column).execute(); - await db.schema.alterTable(table).renameColumn(tempName, column).execute(); -}; - -class StaticMigrationProvider implements MigrationProvider { - async getMigrations() { - return migrations; - } -} - -export const migrationProvider = new StaticMigrationProvider(); diff --git a/packages/core/src/utils/encoding.test.ts b/packages/core/src/utils/encoding.test.ts deleted file mode 100644 index e868bf2ff..000000000 --- a/packages/core/src/utils/encoding.test.ts +++ /dev/null @@ -1,100 +0,0 @@ -import { expect, test } from "vitest"; - -import { - EVM_MAX_UINT, - EVM_MIN_INT, - decodeToBigInt, - encodeAsText, -} from "./encoding.js"; - -test("encodeAsText handles small positive integer", () => { - const value = 101n; - - const encoded = encodeAsText(value); - expect(encoded).toBe( - "0000000000000000000000000000000000000000000000000000000000000000000000000000101", - ); - expect(decodeToBigInt(encoded)).toBe(value); -}); - -test("encodeAsText handles max positive integer", () => { - const value = EVM_MAX_UINT; - - const encoded = encodeAsText(value); - expect(encoded).toBe( - "0115792089237316195423570985008687907853269984665640564039457584007913129639935", - ); - expect(decodeToBigInt(encoded)).toBe(value); -}); - -test("encodeAsText throws if value is less than max negative int", () => { - const value = EVM_MAX_UINT + 1n; - - expect(() => encodeAsText(value)).toThrow( - "Value cannot be greater than EVM_MAX_UINT (115792089237316195423570985008687907853269984665640564039457584007913129639936)", - ); -}); - -test("encodeAsText handles small negative int", () => { - const value = -255n; - - const encoded = encodeAsText(value); - expect(encoded).toBe( - "-057896044618658097711785492504343953926634992332820282019728792003956564819713", - ); - expect(decodeToBigInt(encoded)).toBe(value); -}); - -test("encodeAsText handles max negative int", () => { - const value = EVM_MIN_INT; - - const encoded = encodeAsText(value); - expect(encoded).toBe( - "-000000000000000000000000000000000000000000000000000000000000000000000000000000", - ); - expect(decodeToBigInt(encoded)).toBe(value); -}); - -test("encodeAsText throws if value is less than max negative int", () => { - const value = EVM_MIN_INT - 1n; - - expect(() => encodeAsText(value)).toThrow( - "Value cannot be less than EVM_MIN_INT (-57896044618658097711785492504343953926634992332820282019728792003956564819969)", - ); -}); - -test("encodeAsText handles zero", () => { - const value = 0n; - - const encoded = encodeAsText(value); - expect(encoded).toBe( - "0000000000000000000000000000000000000000000000000000000000000000000000000000000", - ); - expect(decodeToBigInt(encoded)).toBe(value); -}); - -test("lexicographic sort works as expected", () => { - const values = [ - EVM_MAX_UINT, - 0n, - EVM_MIN_INT, - EVM_MAX_UINT - 1n, - 1_000n, - -500n, - EVM_MIN_INT + 1n, - ]; - - const encoded = values.map(encodeAsText); - const sorted = encoded.slice().sort(); - const decoded = sorted.map(decodeToBigInt); - - expect(decoded).toMatchObject([ - EVM_MIN_INT, - EVM_MIN_INT + 1n, - -500n, - 0n, - 1_000n, - EVM_MAX_UINT - 1n, - EVM_MAX_UINT, - ]); -}); diff --git a/packages/core/src/utils/encoding.ts b/packages/core/src/utils/encoding.ts deleted file mode 100644 index 7b29587c8..000000000 --- a/packages/core/src/utils/encoding.ts +++ /dev/null @@ -1,59 +0,0 @@ -import type { Hex } from "viem"; - -export const EVM_MAX_UINT = - 115792089237316195423570985008687907853269984665640564039457584007913129639935n; - -export const EVM_MIN_INT = - -57896044618658097711785492504343953926634992332820282019728792003956564819968n; - -/** - * Converts a integer into a 33-byte Buffer (sign byte followed by 32-byte value). - * Used as the storage encoding for EVM uint256 and int256 types to enable ordering - * using SQLite's default BLOB collation (memcmp). - * - * @param value Integer to be encoded. - * @returns 33-byte Buffer representing the encoded integer. - */ -export function encodeAsText(value: bigint | number | Hex) { - if (typeof value === "string" || typeof value === "number") - value = BigInt(value); - - if (value > EVM_MAX_UINT) - throw new Error(`Value cannot be greater than EVM_MAX_UINT (${value})`); - if (value < EVM_MIN_INT) - throw new Error(`Value cannot be less than EVM_MIN_INT (${value})`); - - const signChar = value >= 0n ? "0" : "-"; - - // If the value is negative, add the minimum integer to it. - if (value < 0n) value = value - EVM_MIN_INT; - - const chars = value.toString(10); - - // Pad the hex string with leading zeros and add the sign byte. - return signChar + chars.padStart(78, "0"); -} - -/** - * Converts an encoded 33-byte Buffer (sign byte followed by 32-byte value) into a BigInt. - * Used as the storage encoding for EVM uint256 and int256 types to enable ordering - * using SQLite's default BLOB collation (memcmp). - * - * @param value Integer to be encoded. - * @returns 33-byte Buffer representing the encoded integer. - */ -export function decodeToBigInt(text: string) { - if (typeof text === "bigint") return text; - - const signChar = text.at(0); - let valueChars = text.substring(1).replace(/^0+/, ""); - // If the value is 0, valueChars will be an empty string. - if (valueChars.length === 0) valueChars = "0"; - let value = BigInt(valueChars); - - // If the sign byte is negative, invert the value - - if (signChar === "-") value = value + EVM_MIN_INT; - - return value; -} diff --git a/packages/core/src/utils/pg.ts b/packages/core/src/utils/pg.ts index 2d8664d7b..228d8729a 100644 --- a/packages/core/src/utils/pg.ts +++ b/packages/core/src/utils/pg.ts @@ -1,6 +1,12 @@ +import { types } from "@electric-sql/pglite"; import pg, { type PoolConfig } from "pg"; import { prettyPrint } from "./print.js"; +const parse = { + [types.NUMERIC]: (x: string | null) => (x === null ? null : BigInt(x)), + [types.INT8]: (x: string | null) => (x === null ? null : Number(x)), +}; + // See https://github.com/brianc/node-pg-types for details. // Use BigInt for `numeric` types. pg.types.setTypeParser(pg.types.builtins.NUMERIC, BigInt); diff --git a/packages/core/src/utils/sqlite.ts b/packages/core/src/utils/sqlite.ts deleted file mode 100644 index bffd75f5f..000000000 --- a/packages/core/src/utils/sqlite.ts +++ /dev/null @@ -1,87 +0,0 @@ -import BetterSqlite3 from "better-sqlite3"; -import { ensureDirExists } from "./exists.js"; -import { prettyPrint } from "./print.js"; - -function improveSqliteErrors(database: BetterSqlite3.Database) { - const originalPrepare = database.prepare; - // @ts-ignore - database.prepare = (source: string) => { - let statement: any; - try { - statement = originalPrepare.apply(database, [source]); - } catch (error_) { - // This block is reachable if the database is closed, and possibly in other cases. - const error = error_ as Error & { detail?: string; meta?: string[] }; - error.name = "SqliteError"; - Error.captureStackTrace(error); - - error.meta = Array.isArray(error.meta) ? error.meta : []; - if (error.detail) error.meta.push(`Detail:\n ${error.detail}`); - error.meta.push(`Statement:\n ${statement}`); - - throw error; - } - - const wrapper = - (fn: (...args: any) => void) => - (...args: any) => { - try { - return fn.apply(statement, args); - } catch (error_) { - const error = error_ as Error & { detail?: string; meta?: string[] }; - error.name = "SqliteError"; - - let parameters = (args[0] ?? []) as string[]; - parameters = - parameters.length <= 25 - ? parameters - : parameters.slice(0, 26).concat(["..."]); - const params = parameters.reduce>( - (acc, parameter, idx) => { - acc[idx + 1] = parameter; - return acc; - }, - {}, - ); - - error.meta = Array.isArray(error.meta) ? error.meta : []; - if (error.detail) error.meta.push(`Detail:\n ${error.detail}`); - error.meta.push(`Statement:\n ${source}`); - error.meta.push(`Parameters:\n${prettyPrint(params)}`); - - throw error; - } - }; - - for (const method of ["run", "get", "all"]) { - // @ts-ignore - statement[method] = wrapper(statement[method]); - } - - return statement; - }; -} - -export type SqliteDatabase = BetterSqlite3.Database; - -export function createSqliteDatabase( - file: string, - options?: BetterSqlite3.Options, -): SqliteDatabase { - ensureDirExists(file); - const database = new BetterSqlite3(file, options); - improveSqliteErrors(database); - database.pragma("journal_mode = WAL"); - return database; -} - -export function createReadonlySqliteDatabase( - file: string, - options?: BetterSqlite3.Options, -): SqliteDatabase { - ensureDirExists(file); - const database = new BetterSqlite3(file, { readonly: true, ...options }); - improveSqliteErrors(database); - database.pragma("journal_mode = WAL"); - return database; -} diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index e504dabfe..68e2176c3 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -673,6 +673,9 @@ importers: '@commander-js/extra-typings': specifier: ^12.0.1 version: 12.0.1(commander@12.0.0) + '@electric-sql/pglite': + specifier: ^0.2.5 + version: 0.2.10 '@escape.tech/graphql-armor-max-aliases': specifier: ^2.3.0 version: 2.4.0 @@ -691,9 +694,6 @@ importers: abitype: specifier: ^0.10.2 version: 0.10.3(typescript@5.3.3)(zod@3.23.8) - better-sqlite3: - specifier: ^11.1.2 - version: 11.1.2 commander: specifier: ^12.0.0 version: 12.0.0 @@ -711,7 +711,7 @@ importers: version: 16.3.1 drizzle-orm: specifier: ^0.31.2 - version: 0.31.2(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) + version: 0.31.2(@electric-sql/pglite@0.2.10)(@opentelemetry/api@1.7.0)(@types/pg@8.10.9)(@types/react@18.2.46)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) glob: specifier: ^10.3.10 version: 10.3.10 @@ -730,6 +730,9 @@ importers: kysely: specifier: ^0.26.3 version: 0.26.3 + kysely-pglite: + specifier: ^0.6.0 + version: 0.6.1(@electric-sql/pglite@0.2.10)(kysely@0.26.3)(pg@8.11.3) pg: specifier: ^8.11.3 version: 8.11.3 @@ -764,9 +767,6 @@ importers: '@types/babel__code-frame': specifier: ^7.0.6 version: 7.0.6 - '@types/better-sqlite3': - specifier: ^7.6.10 - version: 7.6.10 '@types/glob': specifier: ^8.1.0 version: 8.1.0 @@ -1662,6 +1662,9 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@electric-sql/pglite@0.2.10': + resolution: {integrity: sha512-0TJF/1ouBweCtyZC4oHwx+dHGn/lP16KfEO/3q22RDuZUsV2saTuYAwb6eK3gBLzVdXG4dj4xZilvmBYEM/WQg==} + '@envelop/core@5.0.2': resolution: {integrity: sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw==} engines: {node: '>=18.0.0'} @@ -2354,6 +2357,10 @@ packages: resolution: {integrity: sha512-1QlPaHMhOORySCXkQyzjsIsy2GYTilOw3LkjeHkCgsPJQjAT4IclVytJusWktPbYNys9O+O4V23J44yomQvnBQ==} engines: {node: '>=14.0.0'} + '@oclif/core@4.0.27': + resolution: {integrity: sha512-9j92jHr6k2tjQ6/mIwNi46Gqw+qbPFQ02mxT5T8/nxO2fgsPL3qL0kb9SR1il5AVfqpgLIG3uLUcw87rgaioUg==} + engines: {node: '>=18.0.0'} + '@oclif/plugin-autocomplete@2.3.10': resolution: {integrity: sha512-Ow1AR8WtjzlyCtiWWPgzMyT8SbcDJFr47009riLioHa+MHX2BCDtVn2DVnN/E6b9JlPV5ptQpjefoRSNWBesmg==} engines: {node: '>=12.0.0'} @@ -2435,6 +2442,9 @@ packages: '@repeaterjs/repeater@3.0.5': resolution: {integrity: sha512-l3YHBLAol6d/IKnB9LhpD0cEZWAoe3eFKUyTYWmFmCO2Q/WOckxLQAUyMZWwZV2M/m3+4vgRoaolFqaII82/TA==} + '@repeaterjs/repeater@3.0.6': + resolution: {integrity: sha512-Javneu5lsuhwNCryN+pXH93VPQ8g0dBX7wItHFgYiwQmzE1sVdg5tWHiOgHywzL2W21XQopa7IwIEnNbmeUJYA==} + '@rescript/std@9.0.0': resolution: {integrity: sha512-zGzFsgtZ44mgL4Xef2gOy1hrRVdrs9mcxCOOKZrIPsmbZW14yTkaF591GXxpQvjXiHtgZ/iA9qLyWH6oSReIxQ==} @@ -2537,6 +2547,14 @@ packages: '@sinclair/typebox@0.27.8': resolution: {integrity: sha512-+Fj43pSMwJs4KRrH/938Uf+uAELIgVBmQzg/q1YG10djyfA3TnrU8N8XzqCh/okZdszqBQTZf96idMfE5lnwTA==} + '@sindresorhus/is@7.0.1': + resolution: {integrity: sha512-QWLl2P+rsCJeofkDNIT3WFmb6NrRud1SUYW8dIhXK/46XFV8Q/g7Bsvib0Askb0reRLe+WYPeeE+l5cH7SlkuQ==} + engines: {node: '>=18'} + + '@sindresorhus/merge-streams@2.3.0': + resolution: {integrity: sha512-LtoMMhxAlorcGhmFYI+LhPgbPZCkgP6ra1YL604EeF6U98pLlQ3iWIGMdWSC+vWmPBWBNgmDBAhnAobLROJmwg==} + engines: {node: '>=18'} + '@svgr/babel-plugin-add-jsx-attribute@8.0.0': resolution: {integrity: sha512-b9MIk7yhdS1pMCZM8VeNfUlSKVRhsHZNMl5O9SfaX0l0t5wjdgu4IDzGB8bpnGBBOjGST3rRFVsaaEtI4W6f7g==} engines: {node: '>=14'} @@ -2664,9 +2682,6 @@ packages: '@types/babel__code-frame@7.0.6': resolution: {integrity: sha512-Anitqkl3+KrzcW2k77lRlg/GfLZLWXBuNgbEcIOU6M92yw42vsd3xV/Z/yAHEj8m+KUjL6bWOVOFqX8PFPJ4LA==} - '@types/better-sqlite3@7.6.10': - resolution: {integrity: sha512-TZBjD+yOsyrUJGmcUj6OS3JADk3+UZcNv3NOBqGkM09bZdi28fNZw8ODqbMOLfKCu7RYCO62/ldq1iHbzxqoPw==} - '@types/bn.js@5.1.5': resolution: {integrity: sha512-V46N0zwKRF5Q00AZ6hWtN0T8gGmDUaUzLWQvHFo5yThtVwK/VCenFY3wXVbOvNfajEpsTfQM4IN9k/d6gUVX3A==} @@ -3033,6 +3048,10 @@ packages: ansicolors@0.3.2: resolution: {integrity: sha512-QXu7BPrP29VllRxH8GwB7x5iX5qWKAAMLqKQGWTeLWVlNHNOpVMJ91dsxQAIWXpjuW5wqvxu3Jd/nRjrJ+0pqg==} + ansis@3.3.2: + resolution: {integrity: sha512-cFthbBlt+Oi0i9Pv/j6YdVWJh54CtjGACaMPCIrEV4Ha7HWsIjXDwseYV79TIL0B4+KfSwD5S70PeQDkPUd1rA==} + engines: {node: '>=15'} + any-promise@1.3.0: resolution: {integrity: sha512-7UvmKalWRt1wgjL1RrGxoSJW/0QZFIegpeGvZG9kjp8vrRu55XTHbwnqq2GpXm9uLbcuhxm3IqX9OB4MZR1b2A==} @@ -3236,9 +3255,6 @@ packages: peerDependencies: react: '>=16.8' - better-sqlite3@11.1.2: - resolution: {integrity: sha512-gujtFwavWU4MSPT+h9B+4pkvZdyOUkH54zgLdIrMmmmd4ZqiBIrRNBzNzYVFO417xo882uP5HBu4GjOfaSrIQw==} - binary-extensions@2.2.0: resolution: {integrity: sha512-jDctJ/IVQbZoJykoeHbhXpOlNBqGNcwXJKJog42E5HDPUwQTSdjCHdihjj0DlnheQ7blbT6dHOafNAiS8ooQKA==} engines: {node: '>=8'} @@ -3255,18 +3271,12 @@ packages: resolution: {integrity: sha512-GCJBVB5exbxzzvyt8MGDv/MeUjs6gkXDvf4xOIItRBptYl0Tz5sm1o/uG95YK0L0VeG5ajDu3hRtkBP2kzqC5w==} hasBin: true - bindings@1.5.0: - resolution: {integrity: sha512-p2q/t/mhvuOj/UeLlV6566GD/guowlr0hHxClI0W9m7MWYkL1F0hLo+0Aexs9HSPCtR1SXQ0TD3MMKrXZajbiQ==} - bintrees@1.0.2: resolution: {integrity: sha512-VOMgTMwjAaUG580SXn3LacVgjurrbMme7ZZNYGSSV7mmtY6QQRh0Eg3pwIcntQ77DErK1L0NxkbetjcoXzVwKw==} bl@1.2.3: resolution: {integrity: sha512-pvcNpa0UU69UT341rO6AYy4FVAIkUHuZXRIWbq+zHnsVcRzDDjIAhGuuYoi0d//cwIwtt4pkpKycWEfjdV+vww==} - bl@4.1.0: - resolution: {integrity: sha512-1W07cM9gS6DcLperZfFSj+bWLtaPGSOHWhPiGzXmvVJbRLdG82sH/Kn8EtW1VqWVA54AKf2h5k5BbnIbwF3h6w==} - bl@5.1.0: resolution: {integrity: sha512-tv1ZJHLfTDnXE6tMHv73YgSJaWR2AFuPwMntBe7XL/GBFHnT0CLnsHMogfk5+GzCDC5ZWarSCYaIGATZt9dNsQ==} @@ -3343,9 +3353,6 @@ packages: buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} - buffer@5.7.1: - resolution: {integrity: sha512-EHcyIPBQ4BSGlvjB16k5KgAJ27CIsHY/2JBmCRReo48y9rQ3MaUzWX3KVlBa4U7MyX02HdVj0K7C3WaB3ju7FQ==} - buffer@6.0.3: resolution: {integrity: sha512-FTiCpNxtwiZZHEZbcbTIcZjERVICn9yq/pDFkTl95/AxzD1naBctN7YO68riM/gLSDY7sdrMby8hofADYuuqOA==} @@ -3467,6 +3474,10 @@ packages: resolution: {integrity: sha512-Dr3sfKRP6oTcjf2JmUmFJfeVMvXBdegxB0iVQ5eb2V10uFJUCAS8OByZdVAyVb8xXNz3GjjTgj9kLWsZTqE6kw==} engines: {node: '>= 8.10.0'} + chokidar@3.6.0: + resolution: {integrity: sha512-7VT13fmjotKpGipCW9JEQAusEPE+Ei8nl6/g4FBAmIm0GOOLMua9NDDo/DWp0ZAxCr3cPq5ZpBqmPAQgDda2Pw==} + engines: {node: '>= 8.10.0'} + chownr@1.1.4: resolution: {integrity: sha512-jJ0bqzaylmJtVnNgzTeSOs8DPavpbYgEr/b0YL8/2GO3xJEhInFmhKMUnEJQjZumK7KXGFhUy89PrsJWlakBVg==} @@ -3622,6 +3633,10 @@ packages: resolution: {integrity: sha512-fIWyWUXrJ45cHCIQX+Ck1hrZDIf/9DR0P0Zewn3uNht28hbt5OfGUq8rRWsxi96pZWPyBEd0eY9ama01JTaknA==} engines: {node: '>=18'} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + constant-case@3.0.4: resolution: {integrity: sha512-I2hSBi7Vvs7BEuJDr5dDHfzb/Ruj3FyvFyh7KLilAjNQw3Be+xgqUBA2W6scVEcL0hL1dwPRtIqEPVUCKkSsyQ==} @@ -3931,6 +3946,15 @@ packages: supports-color: optional: true + debug@4.3.7: + resolution: {integrity: sha512-Er2nc/H7RrMXZBFCEim6TCmMk02Z8vLC2Rbi1KEBggpo0fS6l0S1nnapwmIi3yW/+GOJap1Krg4w0Hg80oCqgQ==} + engines: {node: '>=6.0'} + peerDependencies: + supports-color: '*' + peerDependenciesMeta: + supports-color: + optional: true + decamelize-keys@1.1.1: resolution: {integrity: sha512-WiPxgEirIV0/eIOMcnFBA3/IJZAZqKnwAwWyvvdi4lsr1WCN22nhdf/3db3DoZcUjTV2SqfzIwNyp6y2xs3nmg==} engines: {node: '>=0.10.0'} @@ -3942,10 +3966,6 @@ packages: decode-named-character-reference@1.0.2: resolution: {integrity: sha512-O8x12RzrUF8xyVcY0KJowWsmaJxQbmy0/EtnNtHRpsOcT7dFk5W598coHqBVpmWo1oQQfsCqfCmkZN5DJrZVdg==} - decompress-response@6.0.0: - resolution: {integrity: sha512-aW35yZM6Bb/4oJlZncMH2LCoZtJXTRxES17vE3hoRiowU2kWHaJKFkSBDnDR+cm9J+9QhXmREyIfv0pji9ejCQ==} - engines: {node: '>=10'} - dedent@0.7.0: resolution: {integrity: sha512-Q6fKUPqnAHAyhiUgFU7BUzLiv0kd8saH9al7tnu5Q/okj6dnupxyTgFIBjVzJATdfIAm9NAsvXNzjaKa+bxVyA==} @@ -3994,10 +4014,6 @@ packages: resolution: {integrity: sha512-reYkTUJAZb9gUuZ2RvVCNhVHdg62RHnJ7WJl8ftMi4diZ6NWlciOzQN88pUhSELEwflJht4oQDv0F0BMlwaYtA==} engines: {node: '>=8'} - detect-libc@2.0.3: - resolution: {integrity: sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==} - engines: {node: '>=8'} - detect-package-manager@2.0.1: resolution: {integrity: sha512-j/lJHyoLlWi6G1LDdLgvUtz60Zo5GEj+sVYtTVXnYLDPuzgC3llMxonXym9zIwhhUII8vjdw0LXxavpLqTbl1A==} engines: {node: '>=12'} @@ -4016,6 +4032,10 @@ packages: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} + diff@3.5.0: + resolution: {integrity: sha512-A46qtFgd+g7pDZinpnwiRJtxbC1hpgf0uzP3iG89scHk0AUC7A1TGxf5OiiOUv/JMZR8GOt8hL900hV0bOy5xA==} + engines: {node: '>=0.3.1'} + diff@4.0.2: resolution: {integrity: sha512-58lmxKSA4BNyLz+HHMUzlOEpg09FV+ev6ZMe3vJihgdxzgcwZ8VoEEPmALCZG9LmqfVoNMMKpttIYTVG6uDY7A==} engines: {node: '>=0.3.1'} @@ -4081,10 +4101,18 @@ packages: resolution: {integrity: sha512-GopVGCpVS1UKH75VKHGuQFqS1Gusej0z4FyQkPdwjil2gNIv+LNsqBlboOzpJFZKVT95GkCyWJbBSdFEFUWI2A==} engines: {node: '>=12'} + dotenv-expand@11.0.6: + resolution: {integrity: sha512-8NHi73otpWsZGBSZwwknTXS5pqMOrk9+Ssrna8xCaxkzEpU9OTf9R5ArQGVw03//Zmk9MOwLPng9WwndvpAJ5g==} + engines: {node: '>=12'} + dotenv@16.3.1: resolution: {integrity: sha512-IPzF4w4/Rd94bA9imS68tZBaYyBWSCE47V1RGuMrB94iyTOIEwRmVL2x/4An+6mETpLrKJ5hQkB8W4kFAadeIQ==} engines: {node: '>=12'} + dotenv@16.4.5: + resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} + engines: {node: '>=12'} + dotenv@8.6.0: resolution: {integrity: sha512-IrPdXQsk2BbzvCBGBOTmmSH5SodmqZNt4ERAZDmW4CT+tL8VtvinqywuANaFu4bOMWki16nqf0e4oC0QIaDr/g==} engines: {node: '>=10'} @@ -4182,6 +4210,11 @@ packages: ecc-jsbn@0.1.2: resolution: {integrity: sha512-eh9O+hwRHNbG4BLTjEl3nw044CkGm5X6LoaCf7LPp7UU8Qrt47JYNi6nPX8xjW97TKGKm1ouctg0QSpZe9qrnw==} + ejs@3.1.10: + resolution: {integrity: sha512-UeJmFfOrAQS8OJWPZ4qtgHyWExa088/MtK5UEyoJGFH67cDEXkZSviOiKRCZ4Xij0zxI3JECgYs3oKx+AizQBA==} + engines: {node: '>=0.10.0'} + hasBin: true + ejs@3.1.6: resolution: {integrity: sha512-9lt9Zse4hPucPkoP7FHDF0LQAlGyF9JVpnClFLFH3aSSbxmyoqINRpp/9wePWJTUl4KOQwRL72Iw3InHPDkoGw==} engines: {node: '>=0.10.0'} @@ -4496,10 +4529,6 @@ packages: resolution: {integrity: sha512-VyhnebXciFV2DESc+p6B+y0LjSm0krU4OgJN44qFAhBY0TJ+1V61tYD2+wHusZ6F9n5K+vl8k0sTy7PEfV4qpg==} engines: {node: '>=16.17'} - expand-template@2.0.3: - resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} - engines: {node: '>=6'} - extend-shallow@2.0.1: resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} engines: {node: '>=0.10.0'} @@ -4576,9 +4605,6 @@ packages: resolution: {integrity: sha512-7Gps/XWymbLk2QLYK4NzpMOrYjMhdIxXuIvy2QBsLE6ljuodKvdkWs/cpyJJ3CVIVpH0Oi1Hvg1ovbMzLdFBBg==} engines: {node: ^10.12.0 || >=12.0.0} - file-uri-to-path@1.0.0: - resolution: {integrity: sha512-0Zt+s3L7Vf1biwWZ29aARiVYLx7iMGnEUl9x33fbB/j3jR81u/O2LbqK+Bm1CDSNDKVtJ/YjwY7TUd5SkeLQLw==} - filelist@1.0.4: resolution: {integrity: sha512-w1cEuf3S+DrLCQL7ET6kz+gmlJdbq9J7yXCSjK/OZCPA+qEN1WyF4ZAf0YYJa4/shHJra2t/d/r8SV4Ji+x+8Q==} @@ -4763,8 +4789,9 @@ packages: getpass@0.1.7: resolution: {integrity: sha512-0fzj9JxOLfJ+XGLhR8ze3unN0KZCgZwiSSDz168VERjK8Wl8kVSdcu2kspd4s4wtAa1y/qrVRiAA0WclVsu0ng==} - github-from-package@0.0.0: - resolution: {integrity: sha512-SyHy3T1v2NUXn29OsWdxmK6RwHD+vkj3v8en8AOBZ1wBQ/hCAQ5bAQTD02kW4W9tUp/3Qh6J8r9EvntiyCmOOw==} + git-diff@2.0.6: + resolution: {integrity: sha512-/Iu4prUrydE3Pb3lCBMbcSNIf81tgGt0W1ZwknnyF62t3tHmtiJTRj0f+1ZIhp3+Rh0ktz1pJVoa7ZXUCskivA==} + engines: {node: '>= 4.8.0'} github-slugger@2.0.0: resolution: {integrity: sha512-IaOQ9puYtjrkq7Y0Ygl9KDZnrf/aiUJYUpVf89y8kyaxbRG7Y1SrX/jaumrv81vc61+kiMempujsM3Yw7w5qcw==} @@ -4817,6 +4844,10 @@ packages: resolution: {integrity: sha512-Y1zNGV+pzQdh7H39l9zgB4PJqjRNqydvdYCDG4HFXM4XuvSaQQlEc91IU1yALL8gUTDomgBAfz3XJdmUS+oo0w==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + globby@14.0.2: + resolution: {integrity: sha512-s3Fq41ZVh7vbbe2PN3nrW7yC7U7MFVc5c98/iTl9c2GawNMKx/J648KQRW6WKkuU8GIbbh2IXfIRQjOZnXcTnw==} + engines: {node: '>=18'} + globrex@0.1.2: resolution: {integrity: sha512-uHJgbwAMwNFf5mLst7IWLNg14x1CkeqglJb/K3doi4dw6q2IvAAmM/Y81kevy83wP+Sst+nutFTYOGg3d1lsxg==} @@ -5105,6 +5136,10 @@ packages: resolution: {integrity: sha512-5Hh7Y1wQbvY5ooGgPbDaL5iYLAPzMTUrjMulskHLH6wnv/A+1q5rgEaiuqEjB+oxGXIVZs1FF+R/KPN3ZSQYYg==} engines: {node: '>=12'} + interpret@1.4.0: + resolution: {integrity: sha512-agE4QfB2Lkp9uICn7BAqoscw4SZP9kTE2hxiFI3jBPmXJfdqiahTbUuKGsMoN2GtqL9AxhYioAcVvgsb1HvRbA==} + engines: {node: '>= 0.10'} + intersection-observer@0.12.2: resolution: {integrity: sha512-7m1vEcPCxXYI8HqnL8CKI6siDyD+eIWSwgB3DZA+ZTogxk9I4CDnj4wilt9x/+/QbHI4YG5YZNmC6458/e9Ktg==} @@ -5187,6 +5222,11 @@ packages: engines: {node: '>=8'} hasBin: true + is-docker@3.0.0: + resolution: {integrity: sha512-eljcgEDlEns/7AXFosB5K/2nCM4P7FQPkGc/DWLy5rmFEWvZayGrik1d9/QIY5nJ4f9YsVvBkA6kJpHn9rISdQ==} + engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} + hasBin: true + is-electron@2.2.2: resolution: {integrity: sha512-FO/Rhvz5tuw4MCWkpMzHFKWD2LsfHzIb7i6MdPYZ/KW7AlxawyLkqdy+jPZP1WubqEADE3O4FUENlJHDfQASRg==} @@ -5228,6 +5268,11 @@ packages: is-hexadecimal@2.0.1: resolution: {integrity: sha512-DgZQp241c8oO6cA1SbTEWiXeoxV42vlcJxgH+B3hi1AiqqKruZR3ZGF8In3fj4+/y/7rHvlOZLZtgJ/4ttYGZg==} + is-inside-container@1.0.0: + resolution: {integrity: sha512-KIYLCCJghfHZxqjYBE7rEy0OBuTd5xCHS7tHVgvCLkx7StIoaxwNW3hCALgEUjFfeRk+MG/Qxmp/vtETEF3tRA==} + engines: {node: '>=14.16'} + hasBin: true + is-interactive@1.0.0: resolution: {integrity: sha512-2HvIEKRoqS62guEC+qBjpvRubdX910WCMuJTZ+I9yvqKU2/12eSL549HMwtabb4oupdj2sMP50k+XJfB/8JE6w==} engines: {node: '>=8'} @@ -5350,6 +5395,10 @@ packages: resolution: {integrity: sha512-fKzAra0rGJUUBwGBgNkHZuToZcn+TtXHpeCgmkMJMMYx1sQDYaCSyjJBSCa2nH1DGm7s3n1oBnohoVTBaN7Lww==} engines: {node: '>=8'} + is-wsl@3.1.0: + resolution: {integrity: sha512-UcVfVfaK4Sc4m7X3dUSoHoozQGBEFeDC+zVo06t98xe8CzHSZZBekNXH+tu0NalHolcJ/QAGqS46Hef7QXBIMw==} + engines: {node: '>=16'} + isarray@0.0.1: resolution: {integrity: sha512-D2S+3GLxWH+uhrNEcoh/fnmYeP8E8/zHl644d/jdA0g2uyXvy3sb0qxotE+ne0LtccHknQzWwZEzhak7oJ0COQ==} @@ -5426,6 +5475,10 @@ packages: resolution: {integrity: sha512-gFqAIbuKyyso/3G2qhiO2OM6shY6EPP/R0+mkDbyspxKazh8BXDC5FiFsUjlczgdNz/vfra0da2y+aHrusLG/Q==} hasBin: true + jiti@2.0.0-beta.3: + resolution: {integrity: sha512-pmfRbVRs/7khFrSAYnSiJ8C0D5GvzkE4Ey2pAvUcJsw1ly/p+7ut27jbJrjY79BpAJQJ4gXYFtK6d1Aub+9baQ==} + hasBin: true + joycon@3.1.1: resolution: {integrity: sha512-34wB/Y7MW7bzjKRjUKTa46I2Z7eV62Rkhva+KkopW7Qvv/OSWBqvkSY7vusOPrNuZcUG3tApvdVgNB8POj3SPw==} engines: {node: '>=10'} @@ -5540,6 +5593,44 @@ packages: resolution: {integrity: sha512-o+NO+8WrRiQEE4/7nwRJhN1HWpVmJm511pBHUxPLtp0BUISzlBplORYSmTclCnJvQq2tKu/sgl3xVpkc7ZWuQQ==} engines: {node: '>=6'} + kysely-codegen@0.15.0: + resolution: {integrity: sha512-LPta2nQOyoEPDQ3w/Gsplc+2iyZPAsGvtWoS21VzOB0NDQ0B38Xy1gS8WlbGef542Zdw2eLJHxekud9DzVdNRw==} + hasBin: true + peerDependencies: + '@libsql/kysely-libsql': ^0.3.0 + '@tediousjs/connection-string': ^0.5.0 + better-sqlite3: '>=7.6.2' + kysely: ^0.27.0 + kysely-bun-worker: ^0.5.3 + mysql2: ^2.3.3 || ^3.0.0 + pg: ^8.8.0 + tarn: ^3.0.0 + tedious: ^16.6.0 || ^17.0.0 + peerDependenciesMeta: + '@libsql/kysely-libsql': + optional: true + '@tediousjs/connection-string': + optional: true + better-sqlite3: + optional: true + kysely-bun-worker: + optional: true + mysql2: + optional: true + pg: + optional: true + tarn: + optional: true + tedious: + optional: true + + kysely-pglite@0.6.1: + resolution: {integrity: sha512-+q9FS6km6Y9yLLxe4SAMu4cQA3qIOSqdZ9uidVDU7g90Z/ZEjDhEKX/Rk5xug0HoGpCfMLHC2XGLqiVMZXqnRw==} + hasBin: true + peerDependencies: + '@electric-sql/pglite': '*' + kysely: '*' + kysely@0.26.3: resolution: {integrity: sha512-yWSgGi9bY13b/W06DD2OCDDHQmq1kwTGYlQ4wpZkMOJqMGCstVCFIvxCCVG4KfY1/3G0MhDAcZsip/Lw8/vJWw==} engines: {node: '>=14.0.0'} @@ -5569,6 +5660,10 @@ packages: resolution: {integrity: sha512-K2U4W2Ff5ibV7j7ydLr+zLAkIg5JJ4lPn1Ltsdt+Tz/IjQ8buJ55pZAxoP34lqIiwtF9iAvtLv3JGv7CAyAg+g==} engines: {node: '>=14'} + lilconfig@3.1.2: + resolution: {integrity: sha512-eop+wDAvpItUys0FWkHIKeC9ybYrTGbU41U5K7+bttZZeohvnY7M9dZ5kB21GNWiFT2q1OoPTvncPCgSOVO5ow==} + engines: {node: '>=14'} + lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} @@ -5677,6 +5772,10 @@ packages: resolution: {integrity: sha512-niTvB4gqvtof056rRIrTZvjNYE4rCUzO6X/X+kYjd7WFxXeJ0NwEFnRxX6ehkvv3jTwrXnNdtAak5XYZuIyPFw==} engines: {node: '>=18'} + loglevel@1.9.2: + resolution: {integrity: sha512-HgMmCqIJSAKqo68l0rS2AanEWfkxaZ5wNiEFb5ggm08lDs9Xl2KxBlX3PTcaD2chBM1gXAYf491/M2Rv8Jwayg==} + engines: {node: '>= 0.6.0'} + long@4.0.0: resolution: {integrity: sha512-XsP+KhQif4bjX1kbuSiySJFNAehNxgLb6hPRGJ9QsUr8ajHkuXGdrHmFUTUUXhDwVX2R5bY4JNZEwbUiMhV+MA==} @@ -6045,10 +6144,6 @@ packages: resolution: {integrity: sha512-vqiC06CuhBTUdZH+RYl8sFrL096vA45Ok5ISO6sE/Mr1jRbGH4Csnhi8f3wKVl7x8mO4Au7Ir9D3Oyv1VYMFJw==} engines: {node: '>=12'} - mimic-response@3.1.0: - resolution: {integrity: sha512-z0yWI+4FDrrweS8Zmt4Ej5HdJmky15+L2e6Wgn3+iK5fWzb6T3fhNFq2+MeTRb064c6Wr4N/wv0DzQTjNzHNGQ==} - engines: {node: '>=10'} - min-indent@1.0.1: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} @@ -6074,6 +6169,10 @@ packages: resolution: {integrity: sha512-RHiac9mvaRw0x3AYRgDC1CxAP7HTcNrrECeA8YYJeWnpo+2Q5CegtZjaotWTWxDG3UeGA1coE05iH1mPjT/2mg==} engines: {node: '>=16 || 14 >=14.17'} + minimatch@9.0.5: + resolution: {integrity: sha512-G6T0ZX48xgozx7587koeX9Ys2NYy6Gmv//P89sEte9V9whIapMNF4idKxnW2QtCcLiTWlb/wfCabAtAFWhhBow==} + engines: {node: '>=16 || 14 >=14.17'} + minimist-options@4.1.0: resolution: {integrity: sha512-Q4r8ghd80yhO/0j1O3B2BjweX3fiHg9cdOwjJd2J76Q135c+NDxGCqdYKQ1SKBuFfgWbAUzBfvYjPUEeNgqN1A==} engines: {node: '>= 6'} @@ -6108,9 +6207,6 @@ packages: mj-context-menu@0.6.1: resolution: {integrity: sha512-7NO5s6n10TIV96d4g2uDpG7ZDpIhMh0QNfGdJw/W47JswFcosz457wqz/b5sAKvl12sxINGFCn80NZHKwxQEXA==} - mkdirp-classic@0.5.3: - resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} - mkdirp@0.5.6: resolution: {integrity: sha512-FP+p8RB8OWpF3YZBCrP5gtADmtXApB5AMLn+vdyA+PyxCjrCs00mjyUozssO33cwDeT3wNGdLxJ5M//YqtHAJw==} hasBin: true @@ -6152,9 +6248,6 @@ packages: engines: {node: ^10 || ^12 || ^13.7 || ^14 || >=15.0.1} hasBin: true - napi-build-utils@1.0.2: - resolution: {integrity: sha512-ONmRUqK7zj7DWX0D9ADe03wbwOBZxNAfF20PlGfCWQcD3+/MakShIHrMqx9YwPTfxDdF1zLeL+RGZiR9kGMLdg==} - native-abort-controller@1.0.4: resolution: {integrity: sha512-zp8yev7nxczDJMoP6pDxyD20IU0T22eX8VwN2ztDccKvSZhRaV33yP1BGwKSZfXuqWUzsXopVFjBdau9OOAwMQ==} peerDependencies: @@ -6212,10 +6305,6 @@ packages: no-case@3.0.4: resolution: {integrity: sha512-fgAN3jGAh+RoxUGZHTSOLJIqUc2wmoBwGR4tbpNAKmmovFoWq0OdRkb0VkldReO2a2iBT/OEulG9XSUc10r3zg==} - node-abi@3.62.0: - resolution: {integrity: sha512-CPMcGa+y33xuL1E0TcNIu4YyaZCxnnvkVaEXrsosR3FxN+fV8xvb7Mzpb7IgKler10qeMkE6+Dp8qJhpzdq35g==} - engines: {node: '>=10'} - node-addon-api@2.0.2: resolution: {integrity: sha512-Ntyt4AIXyaLIuMHF6IOoTakB3K+RWxwtsHNRxllEoA6vPwP9o4866g6YWDLUdnucilZhmkxiHwHr11gAENw+QA==} @@ -6521,6 +6610,10 @@ packages: resolution: {integrity: sha512-gDKb8aZMDeD/tZWs9P6+q0J9Mwkdl6xMV8TjnGP3qJVJ06bdMgkbBlLU8IdfOsIsFz2BW1rNVT3XuNEl8zPAvw==} engines: {node: '>=8'} + path-type@5.0.0: + resolution: {integrity: sha512-5HviZNaZcfqP95rwpv+1HDgUamezbqdSYTyzjTvwtJSnIH+3vnbmWsItli8OFEndS984VT55M3jduxZbX351gg==} + engines: {node: '>=12'} + pathe@1.1.1: resolution: {integrity: sha512-d+RQGp0MAYTIaDBIMmOfMwz3E+LOZnxx1HZd5R18mmCZY0QBlK0LDZfPc8FW8Ed2DlvsuE6PRjroDY+wg4+j/Q==} @@ -6708,11 +6801,6 @@ packages: resolution: {integrity: sha512-jEZnNbgb/3FNk+gNwtTcyz3j+62zIN+UTPotONfacVXJnoI70KScSkKdIR+rvP9tA2kjBSoHQxGwJuizs27o9A==} engines: {node: '>=15.0.0'} - prebuild-install@7.1.2: - resolution: {integrity: sha512-UnNke3IQb6sgarcZIDU3gbMeTp/9SSU1DAIkil7PrqG1vZlBtY5msYccSKSHDqa3hNg436IXK+SNImReuA1wEQ==} - engines: {node: '>=10'} - hasBin: true - preferred-pm@3.1.2: resolution: {integrity: sha512-nk7dKrcW8hfCZ4H6klWcdRknBOXWzNQByJ0oJyX97BOupsYD+FzLS4hflgEu/uPUEHZCuRfMxzCBsuWd7OzT8Q==} engines: {node: '>=10'} @@ -6783,9 +6871,6 @@ packages: pump@1.0.3: resolution: {integrity: sha512-8k0JupWme55+9tCVE+FS5ULT3K6AbgqrGa58lTT49RpyfwwcGedHqaC5LlQNdEAumn/wFsu6aPwkuPMioy8kqw==} - pump@3.0.0: - resolution: {integrity: sha512-LwZy+p3SFs1Pytd/jYct4wpv49HiYCqd9Rlc5ZVdk0V+8Yzv6jR5Blk3TRmPL1ft69TxP0IMZGJ+WPFU2BFhww==} - punycode@1.4.1: resolution: {integrity: sha512-jmYNElW7yvO7TV33CjSmvSiE2yco3bV2czu/OzDKdMNVZQWfxCblURLhf+47syQRBntjfLdd/H0egrzIG+oaFQ==} @@ -6818,6 +6903,10 @@ packages: resolution: {integrity: sha512-ARhCpm70fzdcvNQfPoy49IaanKkTlRWF2JMzqhcJbhSFRZv7nPTvZJdcY7301IPmvW+/p0RgIWnQDLJxifsQ7g==} engines: {node: '>=8'} + radash@12.1.0: + resolution: {integrity: sha512-b0Zcf09AhqKS83btmUeYBS8tFK7XL2e3RvLmZcm0sTdF1/UUlHSsjXdCcWNxe7yfmAlPve5ym0DmKGtTzP6kVQ==} + engines: {node: '>=14.18.0'} + randombytes@2.1.0: resolution: {integrity: sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ==} @@ -6897,6 +6986,10 @@ packages: receptacle@1.3.2: resolution: {integrity: sha512-HrsFvqZZheusncQRiEE7GatOAETrARKV/lnfYicIm8lbvp/JQOdADOfhjBd2DajvoszEyxSM6RlAAIZgEoeu/A==} + rechoir@0.6.2: + resolution: {integrity: sha512-HFM8rkZ+i3zrV+4LQjwQ0W+ez98pApMGM3HUrN04j3CqzPOzl9nmP15Y8YXNm8QHGv/eacOVEjqhmWpkRV0NAw==} + engines: {node: '>= 0.10'} + redent@3.0.0: resolution: {integrity: sha512-6tDA8g98We0zd0GvVeMT9arEOnTw9qM03L9cJXaCjrip1OO764RDBLBfrB4cwzNGDj5OA5ioymC9GkizgWJDUg==} engines: {node: '>=8'} @@ -7139,6 +7232,11 @@ packages: engines: {node: '>=10'} hasBin: true + semver@7.6.3: + resolution: {integrity: sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==} + engines: {node: '>=10'} + hasBin: true + sentence-case@3.0.4: resolution: {integrity: sha512-8LS0JInaQMCRoQ7YUytAo/xUu5W2XnQxV2HI/6uM6U7CITS1RqPElr30V6uIqyMKM9lJGRVFy5/4CuzcixNYSg==} @@ -7176,6 +7274,15 @@ packages: resolution: {integrity: sha512-7++dFhtcx3353uBaq8DDR4NuxBetBzC7ZQOhmTQInHEd6bSrXdiEyzCvG07Z44UYdLShWUyXt5M/yhz8ekcb1A==} engines: {node: '>=8'} + shelljs.exec@1.1.8: + resolution: {integrity: sha512-vFILCw+lzUtiwBAHV8/Ex8JsFjelFMdhONIsgKNLgTzeRckp2AOYRQtHJE/9LhNvdMmE27AGtzWx0+DHpwIwSw==} + engines: {node: '>= 4.0.0'} + + shelljs@0.8.5: + resolution: {integrity: sha512-TiwcRcrkhHvbrZbnRcFYMLl30Dfov3HKqzp5tO5b4pt6G/SezKcYhmDg15zXVBswHmctSAQKznqNW2LO5tTDow==} + engines: {node: '>=4'} + hasBin: true + shikiji@0.6.10: resolution: {integrity: sha512-WE+A5Y2ntM5hL3iJQujk97qr5Uj7PSIRXpQfrZ6h+JWPXZ8KBEDhFXc4lqNriaRq1WGOVPUT83XMOzmHiH3W8A==} deprecated: Shikiji is merged back to Shiki v1.0, please migrate over to get the latest updates @@ -7193,12 +7300,6 @@ packages: resolution: {integrity: sha512-bzyZ1e88w9O1iNJbKnOlvYTrWPDl46O1bG0D3XInv+9tkPrxrN8jUUTiFlDkkmKWgn1M6CfIA13SuGqOa9Korw==} engines: {node: '>=14'} - simple-concat@1.0.1: - resolution: {integrity: sha512-cSFtAPtRhljv69IK0hTVZQ+OfE9nePi/rtJmw5UjHeVyVroEqJXP1sFztKUy1qU+xvz3u/sfYJLa947b7nAN2Q==} - - simple-get@4.0.1: - resolution: {integrity: sha512-brv7p5WgH0jmQJr1ZDDfKDOSeWWg+OVypG99A/5vYGPqJ6pxiaHLy8nxtFjBA7oMa01ebA9gfh1uMCFqOuXxvA==} - simple-git-hooks@2.9.0: resolution: {integrity: sha512-waSQ5paUQtyGC0ZxlHmcMmD9I1rRXauikBwX31bX58l5vTOhCEcBC5Bi+ZDkPXTjDnZAF8TbCqKBY+9+sVPScw==} hasBin: true @@ -7515,17 +7616,10 @@ packages: tar-fs@1.16.3: resolution: {integrity: sha512-NvCeXpYx7OsmOh8zIOP/ebG55zZmxLE0etfWRbWok+q2Qo8x/vOR/IJT1taADXPe+jsiu9axDb3X4B+iIgNlKw==} - tar-fs@2.1.1: - resolution: {integrity: sha512-V0r2Y9scmbDRLCNex/+hYzvp/zyYjvFbHPNgVTKfQvVrb6guiE/fxP+XblDNR011utopbkex2nM4dHNV6GDsng==} - tar-stream@1.6.2: resolution: {integrity: sha512-rzS0heiNf8Xn7/mpdSVVSMAWAoy9bfb1WOTYC78Z0UQKeKa/CWS8FOq0lKGNa8DWKAn9gxjCvMLYc5PGXYlK2A==} engines: {node: '>= 0.8.0'} - tar-stream@2.2.0: - resolution: {integrity: sha512-ujeqbceABgwMZxEJnk2HDY2DlnUZ+9oEcb1KzTVfYHio0UE6dG71n60d8D2I4qNvleWrrXpmjpt7vZeF1LnMZQ==} - engines: {node: '>=6'} - tar@6.2.0: resolution: {integrity: sha512-/Wo7DcT0u5HUV486xg675HtjNd3BXZ6xDbzsCUZPt5iw8bTQ63bP0Raut3mvro9u+CUyq7YQd8Cx55fsZXxqLQ==} engines: {node: '>=10'} @@ -7806,6 +7900,10 @@ packages: resolution: {integrity: sha512-6t3foTQI9qne+OZoVQB/8x8rk2k1eVy1gRXhV3oFQ5T6R1dqQ1xtin3XqSlx3+ATBkliTaR/hHyJBm+LVPNM8w==} engines: {node: '>=4'} + unicorn-magic@0.1.0: + resolution: {integrity: sha512-lRfVq8fE8gz6QMBuDM6a+LO3IAzTi05H6gCVaUpir2E1Rwpo4ZUog45KpNXKC/Mn3Yb9UDuHumeFTo9iV/D9FQ==} + engines: {node: '>=18'} + unified@10.1.2: resolution: {integrity: sha512-pUSWAi/RAnVy1Pif2kAoeWNBa3JVrx0MId2LASj8G+7AiHWoKZNTomq6LG326T68U7/e263X6fTdcXIy7XnF7Q==} @@ -9275,6 +9373,8 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 + '@electric-sql/pglite@0.2.10': {} + '@envelop/core@5.0.2': dependencies: '@envelop/types': 5.0.0 @@ -10009,6 +10109,27 @@ snapshots: - '@types/node' - typescript + '@oclif/core@4.0.27': + dependencies: + ansi-escapes: 4.3.2 + ansis: 3.3.2 + clean-stack: 3.0.1 + cli-spinners: 2.9.2 + debug: 4.3.7(supports-color@8.1.1) + ejs: 3.1.10 + get-package-type: 0.1.0 + globby: 11.1.0 + indent-string: 4.0.0 + is-wsl: 3.1.0 + lilconfig: 3.1.2 + minimatch: 9.0.5 + semver: 7.6.3 + string-width: 4.2.3 + supports-color: 8.1.1 + widest-line: 3.1.0 + wordwrap: 1.0.0 + wrap-ansi: 7.0.0 + '@oclif/plugin-autocomplete@2.3.10(@types/node@20.11.24)(typescript@5.3.3)': dependencies: '@oclif/core': 2.15.0(@types/node@20.11.24)(typescript@5.3.3) @@ -10097,6 +10218,8 @@ snapshots: '@repeaterjs/repeater@3.0.5': {} + '@repeaterjs/repeater@3.0.6': {} + '@rescript/std@9.0.0': {} '@rollup/rollup-android-arm-eabi@4.9.2': @@ -10187,6 +10310,10 @@ snapshots: '@sinclair/typebox@0.27.8': {} + '@sindresorhus/is@7.0.1': {} + + '@sindresorhus/merge-streams@2.3.0': {} + '@svgr/babel-plugin-add-jsx-attribute@8.0.0(@babel/core@7.23.7)': dependencies: '@babel/core': 7.23.7 @@ -10326,10 +10453,6 @@ snapshots: '@types/babel__code-frame@7.0.6': {} - '@types/better-sqlite3@7.6.10': - dependencies: - '@types/node': 20.11.24 - '@types/bn.js@5.1.5': dependencies: '@types/node': 20.11.24 @@ -10730,6 +10853,8 @@ snapshots: ansicolors@0.3.2: {} + ansis@3.3.2: {} + any-promise@1.3.0: {} any-signal@2.1.2: @@ -10962,11 +11087,6 @@ snapshots: mathjax-full: 3.2.2 react: 18.2.0 - better-sqlite3@11.1.2: - dependencies: - bindings: 1.5.0 - prebuild-install: 7.1.2 - binary-extensions@2.2.0: {} binary-install-raw@0.0.13(debug@4.3.4): @@ -10981,10 +11101,6 @@ snapshots: binaryen@102.0.0-nightly.20211028: {} - bindings@1.5.0: - dependencies: - file-uri-to-path: 1.0.0 - bintrees@1.0.2: {} bl@1.2.3: @@ -10992,12 +11108,6 @@ snapshots: readable-stream: 2.3.8 safe-buffer: 5.2.1 - bl@4.1.0: - dependencies: - buffer: 5.7.1 - inherits: 2.0.4 - readable-stream: 3.6.2 - bl@5.1.0: dependencies: buffer: 6.0.3 @@ -11082,11 +11192,6 @@ snapshots: buffer-xor@1.0.3: {} - buffer@5.7.1: - dependencies: - base64-js: 1.5.1 - ieee754: 1.2.1 - buffer@6.0.3: dependencies: base64-js: 1.5.1 @@ -11231,6 +11336,18 @@ snapshots: optionalDependencies: fsevents: 2.3.3 + chokidar@3.6.0: + dependencies: + anymatch: 3.1.3 + braces: 3.0.2 + glob-parent: 5.1.2 + is-binary-path: 2.1.0 + is-glob: 4.0.3 + normalize-path: 3.0.0 + readdirp: 3.6.0 + optionalDependencies: + fsevents: 2.3.3 + chownr@1.1.4: {} chownr@2.0.0: {} @@ -11375,6 +11492,8 @@ snapshots: semver: 7.6.2 uint8array-extras: 0.3.0 + consola@3.2.3: {} + constant-case@3.0.4: dependencies: no-case: 3.0.4 @@ -11731,6 +11850,12 @@ snapshots: optionalDependencies: supports-color: 8.1.1 + debug@4.3.7(supports-color@8.1.1): + dependencies: + ms: 2.1.3 + optionalDependencies: + supports-color: 8.1.1 + decamelize-keys@1.1.1: dependencies: decamelize: 1.2.0 @@ -11742,10 +11867,6 @@ snapshots: dependencies: character-entities: 2.0.2 - decompress-response@6.0.0: - dependencies: - mimic-response: 3.1.0 - dedent@0.7.0: {} deep-eql@4.1.3: @@ -11786,8 +11907,6 @@ snapshots: detect-indent@6.1.0: {} - detect-libc@2.0.3: {} - detect-package-manager@2.0.1: dependencies: execa: 5.1.1 @@ -11804,6 +11923,8 @@ snapshots: diff-sequences@29.6.3: {} + diff@3.5.0: {} + diff@4.0.2: {} diff@5.1.0: {} @@ -11883,17 +12004,22 @@ snapshots: dotenv-expand@10.0.0: {} + dotenv-expand@11.0.6: + dependencies: + dotenv: 16.4.5 + dotenv@16.3.1: {} + dotenv@16.4.5: {} + dotenv@8.6.0: {} - drizzle-orm@0.31.2(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0): + drizzle-orm@0.31.2(@electric-sql/pglite@0.2.10)(@opentelemetry/api@1.7.0)(@types/pg@8.10.9)(@types/react@18.2.46)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0): optionalDependencies: + '@electric-sql/pglite': 0.2.10 '@opentelemetry/api': 1.7.0 - '@types/better-sqlite3': 7.6.10 '@types/pg': 8.10.9 '@types/react': 18.2.46 - better-sqlite3: 11.1.2 kysely: 0.26.3 pg: 8.11.3 react: 18.2.0 @@ -11907,6 +12033,10 @@ snapshots: jsbn: 0.1.1 safer-buffer: 2.1.2 + ejs@3.1.10: + dependencies: + jake: 10.8.7 + ejs@3.1.6: dependencies: jake: 10.8.7 @@ -12464,8 +12594,6 @@ snapshots: signal-exit: 4.1.0 strip-final-newline: 3.0.0 - expand-template@2.0.3: {} - extend-shallow@2.0.1: dependencies: is-extendable: 0.1.1 @@ -12539,8 +12667,6 @@ snapshots: dependencies: flat-cache: 3.2.0 - file-uri-to-path@1.0.0: {} - filelist@1.0.4: dependencies: minimatch: 5.1.6 @@ -12724,7 +12850,13 @@ snapshots: dependencies: assert-plus: 1.0.0 - github-from-package@0.0.0: {} + git-diff@2.0.6: + dependencies: + chalk: 2.4.2 + diff: 3.5.0 + loglevel: 1.9.2 + shelljs: 0.8.5 + shelljs.exec: 1.1.8 github-slugger@2.0.0: {} @@ -12798,6 +12930,15 @@ snapshots: merge2: 1.4.1 slash: 4.0.0 + globby@14.0.2: + dependencies: + '@sindresorhus/merge-streams': 2.3.0 + fast-glob: 3.3.2 + ignore: 5.3.0 + path-type: 5.0.0 + slash: 5.1.0 + unicorn-magic: 0.1.0 + globrex@0.1.2: {} gluegun@5.1.2(debug@4.3.4): @@ -13227,6 +13368,8 @@ snapshots: internmap@2.0.3: {} + interpret@1.4.0: {} + intersection-observer@0.12.2: {} ip-regex@4.3.0: {} @@ -13371,6 +13514,8 @@ snapshots: is-docker@2.2.1: {} + is-docker@3.0.0: {} + is-electron@2.2.2: {} is-extendable@0.1.1: {} @@ -13401,6 +13546,10 @@ snapshots: is-hexadecimal@2.0.1: {} + is-inside-container@1.0.0: + dependencies: + is-docker: 3.0.0 + is-interactive@1.0.0: {} is-interactive@2.0.0: {} @@ -13497,6 +13646,10 @@ snapshots: dependencies: is-docker: 2.2.1 + is-wsl@3.1.0: + dependencies: + is-inside-container: 1.0.0 + isarray@0.0.1: {} isarray@1.0.0: {} @@ -13586,6 +13739,8 @@ snapshots: jiti@1.21.0: {} + jiti@2.0.0-beta.3: {} + joycon@3.1.1: {} js-sha3@0.8.0: {} @@ -13681,6 +13836,42 @@ snapshots: kleur@4.1.5: {} + kysely-codegen@0.15.0(kysely@0.26.3)(pg@8.11.3): + dependencies: + chalk: 4.1.2 + dotenv: 16.4.5 + dotenv-expand: 11.0.6 + git-diff: 2.0.6 + kysely: 0.26.3 + micromatch: 4.0.5 + minimist: 1.2.8 + optionalDependencies: + pg: 8.11.3 + + kysely-pglite@0.6.1(@electric-sql/pglite@0.2.10)(kysely@0.26.3)(pg@8.11.3): + dependencies: + '@electric-sql/pglite': 0.2.10 + '@oclif/core': 4.0.27 + '@repeaterjs/repeater': 3.0.6 + '@sindresorhus/is': 7.0.1 + chokidar: 3.6.0 + consola: 3.2.3 + fs-extra: 11.2.0 + globby: 14.0.2 + jiti: 2.0.0-beta.3 + kysely: 0.26.3 + kysely-codegen: 0.15.0(kysely@0.26.3)(pg@8.11.3) + radash: 12.1.0 + transitivePeerDependencies: + - '@libsql/kysely-libsql' + - '@tediousjs/connection-string' + - better-sqlite3 + - kysely-bun-worker + - mysql2 + - pg + - tarn + - tedious + kysely@0.26.3: {} language-subtag-registry@0.3.22: {} @@ -13702,6 +13893,8 @@ snapshots: lilconfig@3.0.0: {} + lilconfig@3.1.2: {} + lines-and-columns@1.2.4: {} lint-staged@15.2.0: @@ -13811,6 +14004,8 @@ snapshots: strip-ansi: 7.1.0 wrap-ansi: 9.0.0 + loglevel@1.9.2: {} + long@4.0.0: {} long@5.2.3: {} @@ -14616,8 +14811,6 @@ snapshots: mimic-fn@4.0.0: {} - mimic-response@3.1.0: {} - min-indent@1.0.1: {} minimalistic-assert@1.0.1: {} @@ -14640,6 +14833,10 @@ snapshots: dependencies: brace-expansion: 2.0.1 + minimatch@9.0.5: + dependencies: + brace-expansion: 2.0.1 + minimist-options@4.1.0: dependencies: arrify: 1.0.1 @@ -14667,8 +14864,6 @@ snapshots: mj-context-menu@0.6.1: {} - mkdirp-classic@0.5.3: {} - mkdirp@0.5.6: dependencies: minimist: 1.2.8 @@ -14717,8 +14912,6 @@ snapshots: nanoid@3.3.7: {} - napi-build-utils@1.0.2: {} - native-abort-controller@1.0.4(abort-controller@3.0.0): dependencies: abort-controller: 3.0.0 @@ -14828,10 +15021,6 @@ snapshots: lower-case: 2.0.2 tslib: 2.6.2 - node-abi@3.62.0: - dependencies: - semver: 7.6.2 - node-addon-api@2.0.2: {} node-domexception@1.0.0: {} @@ -15146,6 +15335,8 @@ snapshots: path-type@4.0.0: {} + path-type@5.0.0: {} + pathe@1.1.1: {} pathval@1.1.1: {} @@ -15333,21 +15524,6 @@ snapshots: transitivePeerDependencies: - debug - prebuild-install@7.1.2: - dependencies: - detect-libc: 2.0.3 - expand-template: 2.0.3 - github-from-package: 0.0.0 - minimist: 1.2.8 - mkdirp-classic: 0.5.3 - napi-build-utils: 1.0.2 - node-abi: 3.62.0 - pump: 3.0.0 - rc: 1.2.8 - simple-get: 4.0.1 - tar-fs: 2.1.1 - tunnel-agent: 0.6.0 - preferred-pm@3.1.2: dependencies: find-up: 5.0.0 @@ -15424,11 +15600,6 @@ snapshots: end-of-stream: 1.4.4 once: 1.4.0 - pump@3.0.0: - dependencies: - end-of-stream: 1.4.4 - once: 1.4.0 - punycode@1.4.1: {} punycode@2.3.1: {} @@ -15451,6 +15622,8 @@ snapshots: quick-lru@4.0.1: {} + radash@12.1.0: {} + randombytes@2.1.0: dependencies: safe-buffer: 5.2.1 @@ -15558,6 +15731,10 @@ snapshots: dependencies: ms: 2.1.3 + rechoir@0.6.2: + dependencies: + resolve: 1.22.8 + redent@3.0.0: dependencies: indent-string: 4.0.0 @@ -15874,6 +16051,8 @@ snapshots: semver@7.6.2: {} + semver@7.6.3: {} + sentence-case@3.0.4: dependencies: no-case: 3.0.4 @@ -15914,6 +16093,14 @@ snapshots: shebang-regex@3.0.0: {} + shelljs.exec@1.1.8: {} + + shelljs@0.8.5: + dependencies: + glob: 7.2.3 + interpret: 1.4.0 + rechoir: 0.6.2 + shikiji@0.6.10: dependencies: hast-util-to-html: 9.0.2 @@ -15930,14 +16117,6 @@ snapshots: signal-exit@4.1.0: {} - simple-concat@1.0.1: {} - - simple-get@4.0.1: - dependencies: - decompress-response: 6.0.0 - once: 1.4.0 - simple-concat: 1.0.1 - simple-git-hooks@2.9.0: {} sisteransi@1.0.5: {} @@ -16298,13 +16477,6 @@ snapshots: pump: 1.0.3 tar-stream: 1.6.2 - tar-fs@2.1.1: - dependencies: - chownr: 1.1.4 - mkdirp-classic: 0.5.3 - pump: 3.0.0 - tar-stream: 2.2.0 - tar-stream@1.6.2: dependencies: bl: 1.2.3 @@ -16315,14 +16487,6 @@ snapshots: to-buffer: 1.1.1 xtend: 4.0.2 - tar-stream@2.2.0: - dependencies: - bl: 4.1.0 - end-of-stream: 1.4.4 - fs-constants: 1.0.0 - inherits: 2.0.4 - readable-stream: 3.6.2 - tar@6.2.0: dependencies: chownr: 2.0.0 @@ -16593,6 +16757,8 @@ snapshots: unicode-property-aliases-ecmascript@2.1.0: {} + unicorn-magic@0.1.0: {} + unified@10.1.2: dependencies: '@types/unist': 2.0.11 From 7d35596833bde6c381553f71342534aac395c9c0 Mon Sep 17 00:00:00 2001 From: kyscott18 <43524469+kyscott18@users.noreply.github.com> Date: Mon, 7 Oct 2024 16:12:22 -0400 Subject: [PATCH 13/29] update database api (#1141) * . * start new indexing store * upsert * start jsdoc * jsdoc * onchain vs offchain * use text as hex column type * faster * indexing store errors and retry * finish trigger based reorg * fix namespace support --- examples/feature-api-functions/src/index.ts | 87 +--- examples/feature-multichain/ponder.schema.ts | 12 +- examples/feature-multichain/src/index.ts | 16 +- examples/reference-erc20/src/index.ts | 87 +--- packages/core/src/bin/utils/run.ts | 6 +- packages/core/src/common/errors.ts | 9 + packages/core/src/database/index.ts | 95 +++- packages/core/src/drizzle/db.ts | 62 ++- packages/core/src/drizzle/hex.ts | 14 +- packages/core/src/drizzle/index.ts | 489 +------------------ packages/core/src/indexing-store/index.ts | 196 ++++++++ packages/core/src/indexing/service.ts | 12 +- packages/core/src/types/db.test.ts | 121 +++++ packages/core/src/types/db.ts | 199 ++++++++ packages/core/src/types/utils.ts | 2 + packages/core/src/types/virtual.ts | 5 +- 16 files changed, 742 insertions(+), 670 deletions(-) create mode 100644 packages/core/src/indexing-store/index.ts create mode 100644 packages/core/src/types/db.test.ts create mode 100644 packages/core/src/types/db.ts diff --git a/examples/feature-api-functions/src/index.ts b/examples/feature-api-functions/src/index.ts index 36b09c630..2d2844ae4 100644 --- a/examples/feature-api-functions/src/index.ts +++ b/examples/feature-api-functions/src/index.ts @@ -1,49 +1,20 @@ import { ponder } from "@/generated"; -import { and, eq } from "drizzle-orm"; import * as schema from "../ponder.schema"; ponder.on("ERC20:Transfer", async ({ event, context }) => { - // Create an "account" for the sender, or update the balance if it already exists. - - const from = await context.db.query.account.findFirst({ - where: eq(schema.account.address, event.args.from), - }); - - if (from === undefined) { - await context.db.insert(schema.account).values({ - address: event.args.from, - balance: 0n, - isOwner: false, - }); - } else { - await context.db - .update(schema.account) - .set({ - balance: from.balance - event.args.amount, - }) - .where(eq(schema.account.address, event.args.from)); - } - - // Create an "account" for the recipient, or update the balance if it already exists. - - const to = await context.db.query.account.findFirst({ - where: eq(schema.account.address, event.args.to), - }); - - if (to === undefined) { - await context.db.insert(schema.account).values({ - address: event.args.to, - balance: 0n, - isOwner: false, - }); - } else { - await context.db - .update(schema.account) - .set({ - balance: to.balance + event.args.amount, - }) - .where(eq(schema.account.address, event.args.to)); - } + await context.db + .upsert(schema.account, { address: event.args.from }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance - event.args.amount, + })); + + await context.db + .upsert(schema.account, { address: event.args.to }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance + event.args.amount, + })); // add row to "transfer_event". await context.db.insert(schema.transferEvent).values({ @@ -56,33 +27,13 @@ ponder.on("ERC20:Transfer", async ({ event, context }) => { ponder.on("ERC20:Approval", async ({ event, context }) => { // upsert "allowance". - - const allowance = await context.db.query.allowance.findFirst({ - where: and( - eq(schema.allowance.spender, event.args.spender), - eq(schema.allowance.owner, event.args.owner), - ), - }); - - if (allowance === undefined) { - await context.db.insert(schema.allowance).values({ - owner: event.args.owner, + await context.db + .upsert(schema.allowance, { spender: event.args.spender, - amount: event.args.amount, - }); - } else { - await context.db - .update(schema.allowance) - .set({ - amount: event.args.amount, - }) - .where( - and( - eq(schema.allowance.spender, event.args.spender), - eq(schema.allowance.owner, event.args.owner), - ), - ); - } + owner: event.args.owner, + }) + .insert({ amount: event.args.amount }) + .update({ amount: event.args.amount }); // add row to "approval_event". await context.db.insert(schema.approvalEvent).values({ diff --git a/examples/feature-multichain/ponder.schema.ts b/examples/feature-multichain/ponder.schema.ts index c13f8a8b6..f8acab389 100644 --- a/examples/feature-multichain/ponder.schema.ts +++ b/examples/feature-multichain/ponder.schema.ts @@ -1,8 +1,6 @@ -import { createSchema } from "@ponder/core"; +import { evmBigint, evmHex, onchainTable } from "@ponder/core/db"; -export default createSchema((p) => ({ - Account: p.createTable({ - id: p.hex(), - balance: p.bigint(), - }), -})); +export const account = onchainTable("account", { + address: evmHex("address").primaryKey(), + balance: evmBigint("balance").notNull(), +}); diff --git a/examples/feature-multichain/src/index.ts b/examples/feature-multichain/src/index.ts index 7cf369419..9e45cef20 100644 --- a/examples/feature-multichain/src/index.ts +++ b/examples/feature-multichain/src/index.ts @@ -1,15 +1,9 @@ import { ponder } from "@/generated"; +import { account } from "../ponder.schema"; ponder.on("weth9:Deposit", async ({ event, context }) => { - const { Account } = context.db; - - await Account.upsert({ - id: event.args.dst, - create: { - balance: event.args.wad, - }, - update: ({ current }) => ({ - balance: current.balance + event.args.wad, - }), - }); + await context.db + .upsert(account, { address: event.args.dst }) + .insert({ balance: event.args.wad }) + .update((row) => ({ balance: row.balance + event.args.wad })); }); diff --git a/examples/reference-erc20/src/index.ts b/examples/reference-erc20/src/index.ts index c2238534d..2d2844ae4 100644 --- a/examples/reference-erc20/src/index.ts +++ b/examples/reference-erc20/src/index.ts @@ -1,49 +1,20 @@ import { ponder } from "@/generated"; -import { and, eq } from "@ponder/core/db"; import * as schema from "../ponder.schema"; ponder.on("ERC20:Transfer", async ({ event, context }) => { - // Create an "account" for the sender, or update the balance if it already exists. - - const from = await context.db.query.account.findFirst({ - where: eq(schema.account.address, event.args.from), - }); - - if (from === undefined) { - await context.db.insert(schema.account).values({ - address: event.args.from, - balance: 0n, - isOwner: false, - }); - } else { - await context.db - .update(schema.account) - .set({ - balance: from.balance - event.args.amount, - }) - .where(eq(schema.account.address, event.args.from)); - } - - // Create an "account" for the recipient, or update the balance if it already exists. - - const to = await context.db.query.account.findFirst({ - where: eq(schema.account.address, event.args.to), - }); - - if (to === undefined) { - await context.db.insert(schema.account).values({ - address: event.args.to, - balance: 0n, - isOwner: false, - }); - } else { - await context.db - .update(schema.account) - .set({ - balance: to.balance + event.args.amount, - }) - .where(eq(schema.account.address, event.args.to)); - } + await context.db + .upsert(schema.account, { address: event.args.from }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance - event.args.amount, + })); + + await context.db + .upsert(schema.account, { address: event.args.to }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance + event.args.amount, + })); // add row to "transfer_event". await context.db.insert(schema.transferEvent).values({ @@ -56,33 +27,13 @@ ponder.on("ERC20:Transfer", async ({ event, context }) => { ponder.on("ERC20:Approval", async ({ event, context }) => { // upsert "allowance". - - const allowance = await context.db.query.allowance.findFirst({ - where: and( - eq(schema.allowance.spender, event.args.spender), - eq(schema.allowance.owner, event.args.owner), - ), - }); - - if (allowance === undefined) { - await context.db.insert(schema.allowance).values({ - owner: event.args.owner, + await context.db + .upsert(schema.allowance, { spender: event.args.spender, - amount: event.args.amount, - }); - } else { - await context.db - .update(schema.allowance) - .set({ - amount: event.args.amount, - }) - .where( - and( - eq(schema.allowance.spender, event.args.spender), - eq(schema.allowance.owner, event.args.owner), - ), - ); - } + owner: event.args.owner, + }) + .insert({ amount: event.args.amount }) + .update({ amount: event.args.amount }); // add row to "approval_event". await context.db.insert(schema.approvalEvent).values({ diff --git a/packages/core/src/bin/utils/run.ts b/packages/core/src/bin/utils/run.ts index 88418ad49..b768e7f57 100644 --- a/packages/core/src/bin/utils/run.ts +++ b/packages/core/src/bin/utils/run.ts @@ -109,6 +109,9 @@ export async function run({ if (result.status === "error") onReloadableError(result.error); + // overwrite the temporary "checkpoint" value in reorg tables + await database.complete({ checkpoint: event.checkpoint }); + await metadataStore.setStatus(status); break; @@ -197,9 +200,8 @@ export async function run({ await database.finalize({ checkpoint: sync.getFinalizedCheckpoint() }); - database.drizzle.mode = "realtime"; - // await database.createIndexes({ schema }); + await database.createTriggers(); sync.startRealtime(); diff --git a/packages/core/src/common/errors.ts b/packages/core/src/common/errors.ts index f0b13bc75..cf70aa2bd 100644 --- a/packages/core/src/common/errors.ts +++ b/packages/core/src/common/errors.ts @@ -91,6 +91,15 @@ export class CheckConstraintError extends NonRetryableError { } } +export class InvalidStoreMethodError extends NonRetryableError { + override name = "InvalidStoreMethodError"; + + constructor(message?: string | undefined) { + super(message); + Object.setPrototypeOf(this, CheckConstraintError.prototype); + } +} + export class BigIntSerializationError extends NonRetryableError { override name = "BigIntSerializationError"; diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index da424dc8a..b3b47cce7 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -3,12 +3,7 @@ import path from "node:path"; import type { Common } from "@/common/common.js"; import { NonRetryableError } from "@/common/errors.js"; import type { DatabaseConfig } from "@/config/database.js"; -import { - type Drizzle, - type Schema, - createDrizzleDb, - onchain, -} from "@/drizzle/index.js"; +import { type Drizzle, type Schema, onchain } from "@/drizzle/index.js"; import { generateTableSQL, getPrimaryKeyColumns } from "@/drizzle/sql.js"; import type { PonderSyncSchema } from "@/sync-store/encoding.js"; import { @@ -19,6 +14,7 @@ import { migrationProvider as sqliteMigrationProvider } from "@/sync-store/sqlit import { decodeCheckpoint, encodeCheckpoint, + maxCheckpoint, zeroCheckpoint, } from "@/utils/checkpoint.js"; import { formatEta } from "@/utils/format.js"; @@ -29,7 +25,8 @@ import { createSqliteDatabase, } from "@/utils/sqlite.js"; import { wait } from "@/utils/wait.js"; -import { is } from "drizzle-orm"; +import { getTableColumns, getTableName, is } from "drizzle-orm"; +import { drizzle as createDrizzle } from "drizzle-orm/node-postgres"; import { migrate } from "drizzle-orm/node-postgres/migrator"; import { PgTable, @@ -76,9 +73,11 @@ export type Database< * - Else, start */ setup(args: { buildId: string }): Promise<{ checkpoint: string }>; + createTriggers(): Promise; revert(args: { checkpoint: string }): Promise; finalize(args: { checkpoint: string }): Promise; // createIndexes(args: { schema: Schema }): Promise; + complete(args: { checkpoint: string }): Promise; kill(): Promise; }; @@ -310,7 +309,7 @@ export const createDatabase = async (args: { } } - const drizzle = createDrizzleDb({ driver }, { schema: args.schema }); + const drizzle = createDrizzle(driver.user as Pool, args.schema); if (fs.existsSync(args.common.options.migrationsDir)) { await migrate(drizzle, { @@ -731,6 +730,11 @@ export const createDatabase = async (args: { await sql .raw(generateTableSQL({ table, namespace })) .execute(tx); + + args.common.logger.info({ + service: "database", + msg: `Created table '${namespace}'.'${getTableName(table)}'`, + }); } } }; @@ -885,6 +889,20 @@ export const createDatabase = async (args: { // } // } + // Remove triggers + + const tableNames = Object.values(args.schema) + .filter((table): table is PgTable => is(table, PgTable)) + .map((table) => getTableConfig(table).name); + + for (const tableName of tableNames) { + await sql + .ref( + `DROP TRIGGER IF EXISTS ${tableName}_reorg ON "${namespace}"."${tableName}"`, + ) + .execute(tx); + } + // Revert unfinalized data const { blockTimestamp, chainId, blockNumber } = decodeCheckpoint( @@ -1063,6 +1081,50 @@ export const createDatabase = async (args: { // }), // ); // }, + async createTriggers() { + await qb.internal.wrap({ method: "createTriggers" }, async () => { + const tableNames = Object.values(args.schema) + .filter((table): table is PgTable => is(table, PgTable)) + .map((table) => getTableConfig(table).name); + + for (const tableName of tableNames) { + const columns = getTableColumns(args.schema[tableName]! as PgTable); + + const columnNames = Object.values(columns).map( + (column) => column.name, + ); + + await sql + .raw(` +CREATE OR REPLACE FUNCTION ${tableName}_reorg_operation() +RETURNS TRIGGER AS $$ +BEGIN + IF TG_OP = 'INSERT' THEN + INSERT INTO "_ponder_reorg__${tableName}" (${columnNames.join(",")}, operation, checkpoint) + VALUES (${columnNames.map((name) => `NEW.${name}`).join(",")}, 0, '${encodeCheckpoint(maxCheckpoint)}'); + ELSIF TG_OP = 'UPDATE' THEN + INSERT INTO "_ponder_reorg__${tableName}" (${columnNames.join(",")}, operation, checkpoint) + VALUES (${columnNames.map((name) => `OLD.${name}`).join(",")}, 1, '${encodeCheckpoint(maxCheckpoint)}'); + ELSIF TG_OP = 'DELETE' THEN + INSERT INTO "_ponder_reorg__${tableName}" (${columnNames.join(",")}, operation, checkpoint) + VALUES (${columnNames.map((name) => `OLD.${name}`).join(",")}, 2, '${encodeCheckpoint(maxCheckpoint)}'); + END IF; + RETURN NULL; +END; +$$ LANGUAGE plpgsql + `) + .execute(qb.internal); + + await sql + .raw(` +CREATE TRIGGER "${tableName}_reorg" +AFTER INSERT OR UPDATE OR DELETE ON "${namespace}"."${tableName}" +FOR EACH ROW EXECUTE FUNCTION ${tableName}_reorg_operation(); + `) + .execute(qb.internal); + } + }); + }, async revert({ checkpoint }) { const tableNames = Object.values(args.schema) .filter((table): table is PgTable => is(table, PgTable)) @@ -1111,6 +1173,23 @@ export const createDatabase = async (args: { msg: `Updated finalized checkpoint to (timestamp=${decoded.blockTimestamp} chainId=${decoded.chainId} block=${decoded.blockNumber})`, }); }, + async complete({ checkpoint }) { + const tableNames = Object.values(args.schema) + .filter((table): table is PgTable => is(table, PgTable)) + .map((table) => getTableConfig(table).name); + + await Promise.all( + tableNames.map((tableName) => + qb.internal.wrap({ method: "complete" }, async () => { + await qb.internal + .updateTable(`_ponder_reorg__${tableName}`) + .set({ checkpoint }) + .where("checkpoint", "=", encodeCheckpoint(maxCheckpoint)) + .execute(); + }), + ), + ); + }, async kill() { clearInterval(heartbeatInterval); diff --git a/packages/core/src/drizzle/db.ts b/packages/core/src/drizzle/db.ts index 476cc9b7c..b9083e392 100644 --- a/packages/core/src/drizzle/db.ts +++ b/packages/core/src/drizzle/db.ts @@ -1,4 +1,12 @@ -import { type PgTableFn, pgSchema, pgTable } from "drizzle-orm/pg-core"; +import type { BuildColumns, BuildExtraConfigColumns } from "drizzle-orm"; +import { + type PgColumnBuilderBase, + type PgTable, + type PgTableExtraConfig, + type TableConfig, + pgSchema, + pgTable, +} from "drizzle-orm/pg-core"; import { numeric } from "drizzle-orm/pg-core"; import { PgHexBuilder, type PgHexBuilderInitial } from "./hex.js"; import { onchain } from "./index.js"; @@ -83,7 +91,34 @@ export { exceptAll, } from "drizzle-orm/pg-core"; -export const onchainTable: PgTableFn = (name, columns, extraConfig) => { +export type OnchainTable = PgTable & { + [Key in keyof T["columns"]]: T["columns"][Key]; +} & { [onchain]: true }; + +export type OffchainTable = PgTable & { + [Key in keyof T["columns"]]: T["columns"][Key]; +}; + +/** + * Create an onchain table + * + * @returns The offchain table. + */ +export const onchainTable = < + name extends string, + columns extends Record, +>( + name: name, + columns: columns, + extraConfig?: ( + self: BuildExtraConfigColumns, + ) => PgTableExtraConfig, +): OnchainTable<{ + name: name; + schema: undefined; + columns: BuildColumns; + dialect: "pg"; +}> => { const table = pgTable(name, columns, extraConfig); /** @@ -95,8 +130,29 @@ export const onchainTable: PgTableFn = (name, columns, extraConfig) => { // @ts-ignore table[onchain] = true; + // @ts-ignore return table; }; export const offchainSchema = (name: T) => pgSchema(name); -export const offchainTable: PgTableFn = pgTable; + +/** + * Create an offchain table + * + * @returns The offchain table. + */ +export const offchainTable = < + name extends string, + columns extends Record, +>( + name: name, + columns: columns, + extraConfig?: ( + self: BuildExtraConfigColumns, + ) => PgTableExtraConfig, +): OffchainTable<{ + name: name; + schema: undefined; + columns: BuildColumns; + dialect: "pg"; +}> => pgTable(name, columns, extraConfig); diff --git a/packages/core/src/drizzle/hex.ts b/packages/core/src/drizzle/hex.ts index 0ed60c17e..bf2520fca 100644 --- a/packages/core/src/drizzle/hex.ts +++ b/packages/core/src/drizzle/hex.ts @@ -10,14 +10,13 @@ import { PgColumn, PgColumnBuilder, } from "drizzle-orm/pg-core"; -import { bytesToHex, hexToBytes } from "viem"; export type PgHexBuilderInitial = PgHexBuilder<{ name: TName; dataType: "string"; columnType: "PgHex"; data: `0x${string}`; - driverParam: Buffer; + driverParam: string; enumValues: undefined; generated: undefined; }>; @@ -49,14 +48,11 @@ export class PgHex< static readonly [entityKind]: string = "PgHex"; getSQLType(): string { - return "bytea"; + return "text"; } - override mapFromDriverValue(value: Buffer) { - return bytesToHex(value); - } - - override mapToDriverValue(value: `0x${string}`): Buffer { - return Buffer.from(hexToBytes(value)); + override mapToDriverValue(value: `0x${string}`) { + if (value.length % 2 === 0) return value.toLowerCase() as `0x${string}`; + return `0x0${value.slice(2)}`.toLowerCase() as `0x${string}`; } } diff --git a/packages/core/src/drizzle/index.ts b/packages/core/src/drizzle/index.ts index cedc10a11..d1d967f7a 100644 --- a/packages/core/src/drizzle/index.ts +++ b/packages/core/src/drizzle/index.ts @@ -1,31 +1,5 @@ -import type { Database } from "@/database/index.js"; +import type { NodePgDatabase } from "drizzle-orm/node-postgres"; import { - type DrizzleConfig, - type ExtractTablesWithRelations, - Param, - type RelationalSchemaConfig, - SQL, - type Subquery, - Table, - type TablesRelationalConfig, - type UpdateSet, - createTableRelationsHelpers, - extractTablesRelationalConfig, - getTableColumns, - is, -} from "drizzle-orm"; -import { - NodePgDriver, - type NodePgQueryResultHKT, -} from "drizzle-orm/node-postgres"; -import { - PgDialect, - type PgInsertConfig, - type PgInsertValue, - type PgQueryResultHKT, - type PgSession, - type PgTable, - type PgUpdateSetSource, PgDatabase as _PgDatabase, PgDeleteBase as _PgDeleteBase, PgInsertBase as _PgInsertBase, @@ -33,466 +7,11 @@ import { PgUpdateBase as _PgUpdateBase, PgUpdateBuilder as _PgUpdateBuilder, } from "drizzle-orm/pg-core"; -import type { Pool } from "pg"; -import { getReorgTable } from "./sql.js"; export const onchain = Symbol.for("ponder:onchain"); -export type Drizzle< - TSchema extends Record = Record, -> = PgDatabase; +export type Drizzle = + NodePgDatabase; export type Schema = { [name: string]: unknown }; - -export const createDrizzleDb = < - TSchema extends Record = Record, ->( - database: Pick, - config: DrizzleConfig = {}, -): Drizzle => { - const dialect = new PgDialect(); - - let schema: RelationalSchemaConfig | undefined; - if (config.schema) { - const tablesConfig = extractTablesRelationalConfig( - config.schema, - createTableRelationsHelpers, - ); - schema = { - fullSchema: config.schema, - schema: tablesConfig.tables, - tableNamesMap: tablesConfig.tableNamesMap, - }; - } - - const driver = new NodePgDriver(database.driver.user as Pool, dialect); - const session = driver.createSession(schema); - return new PgDatabase(dialect, session, schema) as Drizzle; -}; - -class PgDatabase< - TQueryResult extends PgQueryResultHKT, - TFullSchema extends Record = Record, - TSchema extends - TablesRelationalConfig = ExtractTablesWithRelations, -> extends _PgDatabase { - checkpoint: string | undefined; - mode: "historical" | "realtime"; - - constructor( - /** @internal */ - readonly dialect: PgDialect, - /** @internal */ - readonly session: PgSession, - schema: RelationalSchemaConfig | undefined, - ) { - super(dialect, session, schema); - this.mode = "historical"; - } - - override insert( - table: TTable, - ): _PgInsertBuilder { - return this.mode === "historical" || !(onchain in table) - ? super.insert(table) - : new PgInsertBuilder( - this.checkpoint!, - table, - this.session, - this.dialect, - ); - } - - override update( - table: TTable, - ): _PgUpdateBuilder { - return this.mode === "historical" || !(onchain in table) - ? super.update(table) - : new PgUpdateBuilder( - this.checkpoint!, - table, - this.session, - this.dialect, - ); - } - - override delete( - table: TTable, - ): _PgDeleteBase { - // @ts-ignore - return this.mode === "historical" || !(onchain in table) - ? super.delete(table) - : new PgDeleteBase(this.checkpoint!, table, this.session, this.dialect); - } -} - -class PgInsertBuilder< - TTable extends PgTable, - TQueryResult extends PgQueryResultHKT, -> extends _PgInsertBuilder { - constructor( - private checkpoint: string, - table: TTable, - session: PgSession, - dialect: PgDialect, - withList?: Subquery[], - ) { - super(table, session, dialect, withList); - } - - override values( - value: PgInsertValue, - ): PgInsertBase; - override values( - values: PgInsertValue[], - ): PgInsertBase; - override values( - values: PgInsertValue | PgInsertValue[], - ): PgInsertBase { - values = Array.isArray(values) ? values : [values]; - if (values.length === 0) { - throw new Error("values() must be called with at least one value"); - } - const mappedValues = values.map((entry) => { - const result: Record = {}; - // @ts-ignore - const cols = this.table[Table.Symbol.Columns]; - for (const colKey of Object.keys(entry)) { - const colValue = entry[colKey as keyof typeof entry]; - result[colKey] = is(colValue, SQL) - ? colValue - : new Param(colValue, cols[colKey]); - } - return result; - }); - - return new PgInsertBase( - this.checkpoint, - // @ts-ignore - this.table, - mappedValues, - // @ts-ignore - this.session, - // @ts-ignore - this.dialect, - // @ts-ignore - this.withList, - ); - } -} - -class PgUpdateBuilder< - TTable extends PgTable, - TQueryResult extends PgQueryResultHKT, -> extends _PgUpdateBuilder { - constructor( - private checkpoint: string, - table: TTable, - session: PgSession, - dialect: PgDialect, - withList?: Subquery[], - ) { - super(table, session, dialect, withList); - } - - override set( - values: PgUpdateSetSource, - ): PgUpdateBase { - const entries: [string, UpdateSet[string]][] = Object.entries(values) - .filter(([, value]) => value !== undefined) - .map(([key, value]) => { - if (is(value, SQL)) { - return [key, value]; - } else { - // @ts-ignore - return [key, new Param(value, this.table[Table.Symbol.Columns][key])]; - } - }); - - if (entries.length === 0) { - throw new Error("No values to set"); - } - - return new PgUpdateBase( - this.checkpoint, - // @ts-ignore - this.table, - Object.fromEntries(entries), - // @ts-ignore - this.session, - // @ts-ignore - this.dialect, - // @ts-ignore - this.withList, - ); - } -} - -class PgInsertBase< - TTable extends PgTable, - TQueryResult extends PgQueryResultHKT, - TReturning extends Record | undefined = undefined, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, -> extends _PgInsertBase< - TTable, - TQueryResult, - TReturning, - TDynamic, - TExcludedMethods -> { - constructor( - private checkpoint: string, - table: TTable, - values: PgInsertConfig["values"], - session: PgSession, - dialect: PgDialect, - withList?: Subquery[], - ) { - super(table, values, session, dialect, withList); - } - - override execute: ReturnType["execute"] = async ( - placeholderValues, - ) => { - const operation = new Param(0); - const checkpoint = new Param(this.checkpoint); - - // @ts-ignore - for (const v of this.config.values) { - v.operation = operation; - v.checkpoint = checkpoint; - } - - // @ts-ignore - const table = this.config.table; - // @ts-ignore - this.config.table = getReorgTable(this.config.table); - - // @ts-ignore - await this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.dialect.buildInsertQuery(this.config)), - ) - .execute(placeholderValues); - - // @ts-ignore - this.config.table = table; - - // @ts-ignore - return this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.getSQL()), - // @ts-ignore - this.config.returning, - undefined, - true, - ) - .execute(placeholderValues); - }; -} - -class PgUpdateBase< - TTable extends PgTable, - TQueryResult extends PgQueryResultHKT, - TReturning extends Record | undefined = undefined, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, -> extends _PgUpdateBase< - TTable, - TQueryResult, - TReturning, - TDynamic, - TExcludedMethods -> { - constructor( - private checkpoint: string, - table: TTable, - set: UpdateSet, - session: PgSession, - dialect: PgDialect, - withList?: Subquery[], - ) { - super(table, set, session, dialect, withList); - } - - override execute: ReturnType["execute"] = async ( - placeholderValues, - ) => { - // @ts-ignore - this.config.fields = getTableColumns(this.config.table); - // @ts-ignore - this.config.setOperators = []; - // @ts-ignore - const fieldsList = Object.entries(this.config.fields).map( - ([name, field]) => ({ - path: [name], - field, - }), - ); - - // @ts-ignore - const select = await this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.dialect.buildSelectQuery(this.config)), - fieldsList, - undefined, - true, - ) - .execute(placeholderValues); - - const operation = new Param(1); - const checkpoint = new Param(this.checkpoint); - - // @ts-ignore - const values = select.map((entry) => { - const result: Record = {}; - // @ts-ignore - const cols = this.config.table[Table.Symbol.Columns]; - for (const colKey of Object.keys(entry)) { - const colValue = entry[colKey as keyof typeof entry]; - result[colKey] = is(colValue, SQL) - ? colValue - : new Param(colValue, cols[colKey]); - } - result.operation = operation; - result.checkpoint = checkpoint; - - return result; - }); - - // @ts-ignore - const table = this.config.table; - // @ts-ignore - this.config.table = getReorgTable(this.config.table); - // @ts-ignore - this.config.values = values; - - // @ts-ignore - await this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.dialect.buildInsertQuery(this.config)), - ) - .execute(placeholderValues); - - // @ts-ignore - this.config.table = table; - - // @ts-ignore - return this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.getSQL()), - // @ts-ignore - this.config.returning, - undefined, - true, - ) - .execute(placeholderValues); - }; -} - -class PgDeleteBase< - TTable extends PgTable, - TQueryResult extends PgQueryResultHKT, - TReturning extends Record | undefined = undefined, - TDynamic extends boolean = false, - TExcludedMethods extends string = never, -> extends _PgDeleteBase< - TTable, - TQueryResult, - TReturning, - TDynamic, - TExcludedMethods -> { - constructor( - private checkpoint: string, - table: TTable, - session: PgSession, - dialect: PgDialect, - withList?: Subquery[], - ) { - super(table, session, dialect, withList); - } - - override execute: ReturnType["execute"] = async ( - placeholderValues, - ) => { - // @ts-ignore - this.config.fields = getTableColumns(this.config.table); - // @ts-ignore - this.config.setOperators = []; - // @ts-ignore - const fieldsList = Object.entries(this.config.fields).map( - ([name, field]) => ({ - path: [name], - field, - }), - ); - - // @ts-ignore - const select = await this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.dialect.buildSelectQuery(this.config)), - fieldsList, - undefined, - true, - ) - .execute(placeholderValues); - - const operation = new Param(2); - const checkpoint = new Param(this.checkpoint); - - // @ts-ignore - const values = select.map((entry) => { - const result: Record = {}; - // @ts-ignore - const cols = this.config.table[Table.Symbol.Columns]; - for (const colKey of Object.keys(entry)) { - const colValue = entry[colKey as keyof typeof entry]; - result[colKey] = is(colValue, SQL) - ? colValue - : new Param(colValue, cols[colKey]); - } - result.operation = operation; - result.checkpoint = checkpoint; - - return result; - }); - - // @ts-ignore - const table = this.config.table; - // @ts-ignore - this.config.table = getReorgTable(this.config.table); - // @ts-ignore - this.config.values = values; - - // @ts-ignore - await this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.dialect.buildInsertQuery(this.config)), - ) - .execute(placeholderValues); - - // @ts-ignore - this.config.table = table; - - // @ts-ignore - return this.session - .prepareQuery( - // @ts-ignore - this.dialect.sqlToQuery(this.getSQL()), - // @ts-ignore - this.config.returning, - undefined, - true, - ) - .execute(placeholderValues); - }; -} +type NoSchema = { [name: string]: never }; diff --git a/packages/core/src/indexing-store/index.ts b/packages/core/src/indexing-store/index.ts new file mode 100644 index 000000000..cac311eba --- /dev/null +++ b/packages/core/src/indexing-store/index.ts @@ -0,0 +1,196 @@ +import { InvalidStoreMethodError } from "@/common/errors.js"; +import type { Database } from "@/database/index.js"; +import { type Schema, onchain } from "@/drizzle/index.js"; +import type { Db } from "@/types/db.js"; +import { type SQL, type Table, and, eq } from "drizzle-orm"; +import { type PgTable, getTableConfig } from "drizzle-orm/pg-core"; + +export type IndexingStore = Db; + +const getKeyConditional = (table: Table, key: Object): SQL => { + // @ts-ignore + return and( + // @ts-ignore + ...Object.entries(key).map(([column, value]) => eq(table[column], value)), + ); +}; + +const checkOnchainTable = ( + table: Table, + method: "find" | "insert" | "update" | "upsert" | "delete", +) => { + if (onchain in table) return; + + throw new InvalidStoreMethodError( + method === "find" + ? `db.find() can only be used with onchain tables, and '${getTableConfig(table).name}' is an offchain table.` + : `Indexing functions can only write to onchain tables, and '${getTableConfig(table).name}' is an offchain table.`, + ); +}; + +export const createIndexingStore = ({ + database, +}: { database: Database }): IndexingStore => { + const wrap = database.qb.user.wrap; + + const indexingStore = { + find: (table, key) => + // @ts-ignore + wrap({ method: `${getTableConfig(table).name}.find()` }, () => { + checkOnchainTable(table as Table, "find"); + return database.drizzle + .select() + .from(table as PgTable) + .where(getKeyConditional(table as PgTable, key)) + .then((res) => (res.length === 0 ? undefined : res[0])); + }), + insert(table) { + return { + values: (values: any) => + wrap( + { method: `${getTableConfig(table as PgTable).name}.insert()` }, + async () => { + checkOnchainTable(table as Table, "insert"); + await database.drizzle.insert(table as PgTable).values(values); + }, + ), + }; + }, + // @ts-ignore + update(table, key) { + return { + set: (values: any) => + wrap( + { method: `${getTableConfig(table as PgTable).name}.update()` }, + async () => { + checkOnchainTable(table as Table, "update"); + if (typeof values === "function") { + const row = await indexingStore.find( + table as Table & { [onchain]: true }, + key, + ); + await indexingStore.update(table, key).set(values(row)); + } else { + await database.drizzle + .update(table as PgTable) + .set(values) + .where(getKeyConditional(table as PgTable, key)); + } + }, + ), + }; + }, + // @ts-ignore + upsert(table, key) { + return { + insert(valuesI: any) { + return { + update: (valuesU: any) => + wrap( + { method: `${getTableConfig(table as PgTable).name}.upsert()` }, + async () => { + checkOnchainTable(table as Table, "upsert"); + const row = await indexingStore.find( + table as Table & { [onchain]: true }, + key, + ); + + if (row === undefined) { + await indexingStore + .insert(table) + .values({ ...key, ...valuesI }); + } else { + if (typeof valuesU === "function") { + const values = valuesU(row); + await indexingStore.update(table, key).set(values); + } else { + await indexingStore.update(table, key).set(valuesU); + } + } + }, + ), + // biome-ignore lint/suspicious/noThenProperty: + then: () => + wrap( + { method: `${getTableConfig(table as PgTable).name}.upsert()` }, + async () => { + checkOnchainTable(table as Table, "upsert"); + const row = await indexingStore.find( + table as Table & { [onchain]: true }, + key, + ); + if (row === undefined) { + await indexingStore + .insert(table) + .values({ ...key, ...valuesI }); + } + }, + ), + }; + }, + update(valuesU: any) { + return { + insert: (valuesI: any) => + wrap( + { method: `${getTableConfig(table as PgTable).name}.upsert()` }, + async () => { + checkOnchainTable(table as Table, "upsert"); + const row = await indexingStore.find( + table as Table & { [onchain]: true }, + key, + ); + + if (row === undefined) { + await indexingStore + .insert(table) + .values({ ...key, ...valuesI }); + } else { + if (typeof valuesU === "function") { + const values = valuesU(row); + await indexingStore.update(table, key).set(values); + } else { + await indexingStore.update(table, key).set(valuesU); + } + } + }, + ), + // biome-ignore lint/suspicious/noThenProperty: + then: () => + wrap( + { method: `${getTableConfig(table as PgTable).name}.upsert()` }, + async () => { + checkOnchainTable(table as Table, "upsert"); + const row = await indexingStore.find( + table as Table & { [onchain]: true }, + key, + ); + if (row !== undefined) { + if (typeof valuesU === "function") { + const values = valuesU(row); + await indexingStore.update(table, key).set(values); + } else { + await indexingStore.update(table, key).set(valuesU); + } + } + }, + ), + }; + }, + }; + }, + delete: (table, key) => + wrap( + { method: `${getTableConfig(table as PgTable).name}.delete()` }, + async () => { + checkOnchainTable(table as Table, "upsert"); + await database.drizzle + .delete(table as Table) + .where(getKeyConditional(table as Table, key)); + }, + ), + raw: database.drizzle, + } satisfies IndexingStore; + + // @ts-ignore + return indexingStore; +}; diff --git a/packages/core/src/indexing/service.ts b/packages/core/src/indexing/service.ts index c379db9d4..f96ab958c 100644 --- a/packages/core/src/indexing/service.ts +++ b/packages/core/src/indexing/service.ts @@ -2,13 +2,15 @@ import type { IndexingFunctions } from "@/build/configAndIndexingFunctions.js"; import type { Common } from "@/common/common.js"; import type { Network } from "@/config/networks.js"; import type { Database } from "@/database/index.js"; -import type { Drizzle, Schema } from "@/drizzle/index.js"; +import type { Schema } from "@/drizzle/index.js"; +import { createIndexingStore } from "@/indexing-store/index.js"; import type { Sync } from "@/sync/index.js"; import { type ContractSource, type Source, isAddressFactory, } from "@/sync/source.js"; +import type { Db } from "@/types/db.js"; import { type Checkpoint, decodeCheckpoint, @@ -33,7 +35,7 @@ import { type ReadOnlyClient, buildCachedActions } from "./ponderActions.js"; export type Context = { network: { chainId: number; name: string }; client: ReadOnlyClient; - db: Drizzle; + db: Db; contracts: Record< string, { @@ -174,7 +176,7 @@ export const create = ({ network: { name: undefined!, chainId: undefined! }, contracts: undefined!, client: undefined!, - db: database.drizzle, + db: createIndexingStore({ database }), }, }, networkByChainId, @@ -412,7 +414,6 @@ const executeSetup = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.block; const endClock = startClock(); @@ -472,7 +473,6 @@ const executeLog = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.event.block.number; const endClock = startClock(); @@ -536,7 +536,6 @@ const executeBlock = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.event.block.number; const endClock = startClock(); @@ -606,7 +605,6 @@ const executeCallTrace = async ( currentEvent.context.network.name = networkByChainId[event.chainId]!.name; currentEvent.context.client = clientByChainId[event.chainId]!; currentEvent.context.contracts = contractsByChainId[event.chainId]!; - currentEvent.context.db.checkpoint = event.checkpoint; currentEvent.contextState.blockNumber = event.event.block.number; const endClock = startClock(); diff --git a/packages/core/src/types/db.test.ts b/packages/core/src/types/db.test.ts new file mode 100644 index 000000000..8d809060d --- /dev/null +++ b/packages/core/src/types/db.test.ts @@ -0,0 +1,121 @@ +import { offchainTable, onchainTable } from "@/drizzle/db.js"; +import { integer, primaryKey, serial, text } from "drizzle-orm/pg-core"; +import { test } from "vitest"; +import type { + Delete, + Find, + Insert, + IsSerialPrimaryKey, + Key, + Update, + Upsert, +} from "./db.js"; + +test("offchain table", () => { + const table = offchainTable("table", { + id: text("id").primaryKey(), + other: integer("other"), + }); + + const find: Find = () => {}; + find(table, { id: "kevin" }); +}); + +test("composite primary key", () => { + const table = onchainTable( + "table", + { + id: text("id").notNull(), + other: integer("other").notNull(), + }, + (table) => ({ + pk: primaryKey({ columns: [table.id, table.other] }), + }), + ); + + type t = Key; + // ^? +}); + +test("serial primary key", () => { + const table = onchainTable("table", { + id: serial("id").primaryKey(), + other: integer("other"), + }); + + type t = IsSerialPrimaryKey; + // ^? +}); + +test("find", () => { + const table = onchainTable("table", { + id: text("id").primaryKey(), + other: integer("other"), + }); + + const find: Find = () => {}; + const t = find(table, { id: "kevin" }); + // ^? +}); + +test("insert", () => { + const table = onchainTable("table", { + id: text("id").primaryKey(), + other: integer("other"), + }); + + const insert: Insert = () => {}; + const t = insert(table).values({ id: "kevin" }); + // ^? +}); + +test("update", () => { + const table = onchainTable("table", { + id: text("id").primaryKey(), + other: integer("other"), + }); + + const update: Update = () => {}; + const t = update(table, { id: "kevin" }).set({ other: 52 }); + // ^? +}); + +test("upsert", async () => { + const table = onchainTable("table", { + id: text("id").primaryKey(), + other: integer("other"), + }); + + const upsert: Upsert = () => {}; + const t1 = await upsert(table, { id: "kevin" }).insert({ other: 52 }); + // ^? + const t2 = await upsert(table, { id: "kevin" }).update({ other: 52 }); + // ^? + const t3 = await upsert(table, { id: "kevin" }) + // ^? + .insert({ other: 52 }) + .update({ other: 52 }); + const t4 = await upsert(table, { id: "kevin" }) + // ^? + .update({ other: 52 }) + .insert({ other: 52 }); + const t5 = await upsert(table, { id: "kevin" }) + // ^? + .insert({ other: 52 }) + .update((cur) => ({ other: cur.other ?? 99 })); + const t6 = await upsert(table, { id: "kevin" }) + // ^? + .update((cur) => ({ other: cur.other ?? 99 })) + .insert({ other: 52 }); +}); + +test("delete", () => { + const table = onchainTable("table", { + id: text("id").primaryKey(), + other: integer("other"), + }); + + const _delete: Delete = () => {}; + const t = _delete(table, { id: "kevin" }); + // ^? +}); diff --git a/packages/core/src/types/db.ts b/packages/core/src/types/db.ts new file mode 100644 index 000000000..df51a1a76 --- /dev/null +++ b/packages/core/src/types/db.ts @@ -0,0 +1,199 @@ +import type { Drizzle, Schema, onchain } from "@/drizzle/index.js"; +import type { + Column, + GetColumnData, + InferInsertModel, + InferSelectModel, + Table, +} from "drizzle-orm"; +import type { PonderTypeError, Prettify } from "./utils.js"; + +export type Db = { + /** + * Find a row + * + * @example + * ```ts twoslash + * const result = await db.find(table, { id: 10 }); + * ``` + * + * @param table - The table to select from. + * @param key - The primary key. + * @returns The row if it exists or undefined if it doesn't. + */ + find: Find; + /** + * Create new rows + * + * @example + * ```ts twoslash + * await db.insert(table).values({ id: 10, name: "joe" }); + * ``` + * + * @example + * ```ts twoslash + * await db.insert(table).values([ + * { id: 10, name: "joe" }, + * { id: 3, name: "rob" } + * ]); + * ``` + * + * @param table - The table to insert into. + */ + insert: Insert; + /** + * Update a row + * + * @example + * ```ts twoslash + * await db + * .update(table, { id: 10 }) + * .set({ age: 19 }); + * ``` + * + * @example + * ```ts twoslash + * await db + * .update(table, { id: 10 }) + * .set((row) => ({ age: row.age + 3 })); + * ``` + * + * @param table - The table to select from. + * @param key - The primary key. + */ + update: Update; + /** + * If row exists, update, else insert + * + * @example + * ```ts twoslash + * await db + * .upsert(table, { id: 10 }) + * .insert({ age: 23 }) + * .update({ age: 64 }); + * ``` + * + * @example + * ```ts twoslash + * await db + * .upsert(table, { id: 10 }) + * .insert({ age: 52 }) + * .update((row) => ({ age: row.age + 3 })); + * ``` + * + * @param table - The table to select from. + * @param key - The primary key. + */ + upsert: Upsert; + /** + * Delete a row + * + * @example + * ```ts twoslash + * const deleted = await db.delete(table, { id: 10 }); + * ``` + * + * @param table - The table to select from. + * @param key - The primary key. + * @returns `true` if the row existed. + */ + delete: Delete; + /** + * Access the raw drizzle object + */ + raw: Pick, "select">; +}; + +type InferPrimaryKey< + table extends Table, + /// + columns extends Record = table["_"]["columns"], + columnNames extends keyof columns & string = keyof columns & string, +> = columnNames extends columnNames + ? columns[columnNames]["_"]["isPrimaryKey"] extends true + ? columnNames + : never + : never; + +export type Key< + table extends Table, + /// + primaryKey extends keyof table["_"]["columns"] = InferPrimaryKey
, + hasPrimaryKey = [primaryKey] extends [never] ? false : true, +> = hasPrimaryKey extends true + ? { + [columnName in primaryKey]: GetColumnData< + table["_"]["columns"][columnName] + >; + } + : Partial>; + +export type IsSerialPrimaryKey< + table extends Table, + /// + primaryKey extends keyof table["_"]["columns"] = InferPrimaryKey
, +> = table["_"]["columns"][primaryKey]["columnType"] extends "PgSerial" + ? true + : false; + +export type Find =
( + table: table extends { [onchain]: true } + ? table + : PonderTypeError<`db.find() can only be used with onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, + key: Key
, +) => Promise | undefined>; + +export type Insert =
( + table: table extends { [onchain]: true } + ? table + : PonderTypeError<`Indexing functions can only write to onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, +) => { + values: ( + values: InferInsertModel
| InferInsertModel
[], + ) => Promise; +}; + +export type Update =
( + table: table extends { [onchain]: true } + ? table + : PonderTypeError<`Indexing functions can only write to onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, + key: Key
, +) => { + set: ( + values: + | Partial> + | ((row: InferSelectModel
) => Partial>), + ) => Promise; +}; + +export type Upsert = < + table extends Table, + /// + insertModel = InferInsertModel
, + selectModel = InferSelectModel
, + insertValues = Prettify>>, + updateFn = (row: selectModel) => Partial, +>( + table: table extends { [onchain]: true } + ? table + : PonderTypeError<`Indexing functions can only write to onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, + key: Key
, +) => { + /** Insert a row */ + insert: (values: insertValues) => { + /** Update the existing row */ + update: (values: Partial | updateFn) => Promise; + } & Promise; + /** Update the existing row */ + update: (values: Partial | updateFn) => { + /** Insert a row */ + insert: (values: insertValues) => Promise; + } & Promise; +}; + +export type Delete =
( + table: table extends { [onchain]: true } + ? table + : PonderTypeError<`Indexing functions can only write to onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, + key: Key
, +) => Promise; diff --git a/packages/core/src/types/utils.ts b/packages/core/src/types/utils.ts index b1bfc0c7b..0f9e6d084 100644 --- a/packages/core/src/types/utils.ts +++ b/packages/core/src/types/utils.ts @@ -16,3 +16,5 @@ export type Prettify = { export type NonNull = { [P in keyof T]-?: NonNullable; }; + +export type PonderTypeError = error; diff --git a/packages/core/src/types/virtual.ts b/packages/core/src/types/virtual.ts index 81cf9b4b2..7d442546f 100644 --- a/packages/core/src/types/virtual.ts +++ b/packages/core/src/types/virtual.ts @@ -6,7 +6,7 @@ import type { SafeEventNames, SafeFunctionNames, } from "@/config/utilityTypes.js"; -import type { Drizzle, Schema } from "@/drizzle/index.js"; +import type { Schema } from "@/drizzle/index.js"; import type { ReadOnlyClient } from "@/indexing/ponderActions.js"; import type { Block, @@ -16,6 +16,7 @@ import type { TransactionReceipt, } from "@/types/eth.js"; import type { ApiRegistry } from "./api.js"; +import type { Db } from "./db.js"; import type { Prettify } from "./utils.js"; export namespace Virtual { @@ -218,7 +219,7 @@ export namespace Virtual { | "ccipRead" > >; - db: Drizzle; + db: Db; }; export type IndexingFunctionArgs< From 231fb086c57beb8470ea6cfb339d3520b5e55532 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Mon, 7 Oct 2024 16:43:53 -0400 Subject: [PATCH 14/29] run codegen --- packages/core/src/bin/utils/run.ts | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/packages/core/src/bin/utils/run.ts b/packages/core/src/bin/utils/run.ts index b768e7f57..84913d429 100644 --- a/packages/core/src/bin/utils/run.ts +++ b/packages/core/src/bin/utils/run.ts @@ -1,4 +1,5 @@ import type { IndexingBuild } from "@/build/index.js"; +import { runCodegen } from "@/common/codegen.js"; import type { Common } from "@/common/common.js"; import { createDatabase } from "@/database/index.js"; import { getMetadataStore } from "@/indexing-store/metadata.js"; @@ -63,7 +64,7 @@ export async function run({ // starting the server so the app can become responsive more quickly. await database.migrateSync(); - // runCodegen({ common, graphqlSchema }); + runCodegen({ common }); // Note: can throw const sync = await createSync({ From 9245b42f92fb7767aaab98ad481440d746639e55 Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:09:39 -0400 Subject: [PATCH 15/29] fixes --- packages/core/src/database/index.ts | 3 +++ packages/core/src/indexing-store/index.ts | 12 +++++++++++- 2 files changed, 14 insertions(+), 1 deletion(-) diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index b3b47cce7..da382e3a0 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -1087,6 +1087,9 @@ export const createDatabase = async (args: { .filter((table): table is PgTable => is(table, PgTable)) .map((table) => getTableConfig(table).name); + // TODO: 1st was SQL names, 2nd was JS table names + // console.log(tableNames, Object.keys(args.schema)); + for (const tableName of tableNames) { const columns = getTableColumns(args.schema[tableName]! as PgTable); diff --git a/packages/core/src/indexing-store/index.ts b/packages/core/src/indexing-store/index.ts index cac311eba..030ab0a3b 100644 --- a/packages/core/src/indexing-store/index.ts +++ b/packages/core/src/indexing-store/index.ts @@ -1,4 +1,7 @@ -import { InvalidStoreMethodError } from "@/common/errors.js"; +import { + InvalidStoreMethodError, + RecordNotFoundError, +} from "@/common/errors.js"; import type { Database } from "@/database/index.js"; import { type Schema, onchain } from "@/drizzle/index.js"; import type { Db } from "@/types/db.js"; @@ -69,6 +72,13 @@ export const createIndexingStore = ({ table as Table & { [onchain]: true }, key, ); + + if (row === undefined) { + throw new RecordNotFoundError( + "No existing record was found with the specified ID", + ); + } + await indexingStore.update(table, key).set(values(row)); } else { await database.drizzle From b0cb570e027f893cfdd182e65b12ff4ce9d6bc98 Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Mon, 7 Oct 2024 20:18:12 -0400 Subject: [PATCH 16/29] rename --- packages/core/src/indexing-store/index.ts | 2 +- packages/core/src/types/db.ts | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/packages/core/src/indexing-store/index.ts b/packages/core/src/indexing-store/index.ts index 030ab0a3b..9705dc292 100644 --- a/packages/core/src/indexing-store/index.ts +++ b/packages/core/src/indexing-store/index.ts @@ -198,7 +198,7 @@ export const createIndexingStore = ({ .where(getKeyConditional(table as Table, key)); }, ), - raw: database.drizzle, + sql: database.drizzle, } satisfies IndexingStore; // @ts-ignore diff --git a/packages/core/src/types/db.ts b/packages/core/src/types/db.ts index df51a1a76..e22eeb84f 100644 --- a/packages/core/src/types/db.ts +++ b/packages/core/src/types/db.ts @@ -101,7 +101,7 @@ export type Db = { /** * Access the raw drizzle object */ - raw: Pick, "select">; + sql: Pick, "select" | "query">; }; type InferPrimaryKey< From 667ae35e02c75cd97b4da22a695e54022681cbb0 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Tue, 8 Oct 2024 10:09:55 -0400 Subject: [PATCH 17/29] fix distinction between sql and js table names --- packages/core/src/database/index.ts | 100 ++++++++++++++++------------ 1 file changed, 57 insertions(+), 43 deletions(-) diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index da382e3a0..c7f4160d3 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -427,20 +427,22 @@ export const createDatabase = async (args: { * underlying tables, but only be 1 operation at most. */ const revert = async ({ - tableName, + sqlTableName, + jsTableName, checkpoint, tx, }: { - tableName: string; + sqlTableName: string; + jsTableName: string; checkpoint: string; tx: Transaction; }) => { const primaryKeyColumns = getPrimaryKeyColumns( - args.schema[tableName] as PgTable, + args.schema[jsTableName] as PgTable, ); const rows = await tx - .deleteFrom(`_ponder_reorg__${tableName}`) + .deleteFrom(`_ponder_reorg__${sqlTableName}`) .returningAll() .where("checkpoint", ">", checkpoint) .execute(); @@ -504,10 +506,26 @@ export const createDatabase = async (args: { args.common.logger.info({ service: "database", - msg: `Reverted ${rows.length} unfinalized operations from '${tableName}' table`, + msg: `Reverted ${rows.length} unfinalized operations from '${sqlTableName}' table`, }); }; + const getJsTableNames = () => { + const tableNames = Object.entries(args.schema) + .filter(([, table]) => is(table, PgTable)) + .map(([tableName]) => tableName); + + return tableNames; + }; + + const getSQLTableNames = () => { + const tableNames = Object.values(args.schema) + .filter((table): table is PgTable => is(table, PgTable)) + .map((table) => getTableConfig(table).name); + + return tableNames; + }; + return { dialect, namespace, @@ -547,10 +565,6 @@ export const createDatabase = async (args: { }); }, async setup({ buildId }) { - const tableNames = Object.values(args.schema) - .filter((table): table is PgTable => is(table, PgTable)) - .map((table) => getTableConfig(table).name); - //////// // Migrate //////// @@ -787,7 +801,7 @@ export const createDatabase = async (args: { heartbeat_at: Date.now(), build_id: buildId, checkpoint: encodeCheckpoint(zeroCheckpoint), - table_names: tableNames, + table_names: getSQLTableNames(), } satisfies PonderApp; /** @@ -891,11 +905,10 @@ export const createDatabase = async (args: { // Remove triggers - const tableNames = Object.values(args.schema) - .filter((table): table is PgTable => is(table, PgTable)) - .map((table) => getTableConfig(table).name); + const sqlTableNames = getSQLTableNames(); + const jsTableNames = getJsTableNames(); - for (const tableName of tableNames) { + for (const tableName of sqlTableNames) { await sql .ref( `DROP TRIGGER IF EXISTS ${tableName}_reorg ON "${namespace}"."${tableName}"`, @@ -913,9 +926,10 @@ export const createDatabase = async (args: { msg: `Reverting operations after finalized checkpoint (timestamp=${blockTimestamp} chainId=${chainId} block=${blockNumber})`, }); - for (const tableName of tableNames) { + for (let i = 0; i < sqlTableNames.length; i++) { await revert({ - tableName, + sqlTableName: sqlTableNames[i]!, + jsTableName: jsTableNames[i]!, checkpoint: previousApp.checkpoint, tx, }); @@ -1083,15 +1097,14 @@ export const createDatabase = async (args: { // }, async createTriggers() { await qb.internal.wrap({ method: "createTriggers" }, async () => { - const tableNames = Object.values(args.schema) - .filter((table): table is PgTable => is(table, PgTable)) - .map((table) => getTableConfig(table).name); + const sqlTableNames = getSQLTableNames(); + const jsTableNames = getJsTableNames(); - // TODO: 1st was SQL names, 2nd was JS table names - // console.log(tableNames, Object.keys(args.schema)); + for (let i = 0; i < sqlTableNames.length; i++) { + const jsTableName = jsTableNames[i]!; + const sqlTableName = sqlTableNames[i]!; - for (const tableName of tableNames) { - const columns = getTableColumns(args.schema[tableName]! as PgTable); + const columns = getTableColumns(args.schema[jsTableName]! as PgTable); const columnNames = Object.values(columns).map( (column) => column.name, @@ -1099,17 +1112,17 @@ export const createDatabase = async (args: { await sql .raw(` -CREATE OR REPLACE FUNCTION ${tableName}_reorg_operation() +CREATE OR REPLACE FUNCTION ${sqlTableName}_reorg_operation() RETURNS TRIGGER AS $$ BEGIN IF TG_OP = 'INSERT' THEN - INSERT INTO "_ponder_reorg__${tableName}" (${columnNames.join(",")}, operation, checkpoint) + INSERT INTO "_ponder_reorg__${sqlTableName}" (${columnNames.join(",")}, operation, checkpoint) VALUES (${columnNames.map((name) => `NEW.${name}`).join(",")}, 0, '${encodeCheckpoint(maxCheckpoint)}'); ELSIF TG_OP = 'UPDATE' THEN - INSERT INTO "_ponder_reorg__${tableName}" (${columnNames.join(",")}, operation, checkpoint) + INSERT INTO "_ponder_reorg__${sqlTableName}" (${columnNames.join(",")}, operation, checkpoint) VALUES (${columnNames.map((name) => `OLD.${name}`).join(",")}, 1, '${encodeCheckpoint(maxCheckpoint)}'); ELSIF TG_OP = 'DELETE' THEN - INSERT INTO "_ponder_reorg__${tableName}" (${columnNames.join(",")}, operation, checkpoint) + INSERT INTO "_ponder_reorg__${sqlTableName}" (${columnNames.join(",")}, operation, checkpoint) VALUES (${columnNames.map((name) => `OLD.${name}`).join(",")}, 2, '${encodeCheckpoint(maxCheckpoint)}'); END IF; RETURN NULL; @@ -1120,24 +1133,29 @@ $$ LANGUAGE plpgsql await sql .raw(` -CREATE TRIGGER "${tableName}_reorg" -AFTER INSERT OR UPDATE OR DELETE ON "${namespace}"."${tableName}" -FOR EACH ROW EXECUTE FUNCTION ${tableName}_reorg_operation(); +CREATE TRIGGER "${sqlTableName}_reorg" +AFTER INSERT OR UPDATE OR DELETE ON "${namespace}"."${sqlTableName}" +FOR EACH ROW EXECUTE FUNCTION ${sqlTableName}_reorg_operation(); `) .execute(qb.internal); } }); }, async revert({ checkpoint }) { - const tableNames = Object.values(args.schema) - .filter((table): table is PgTable => is(table, PgTable)) - .map((table) => getTableConfig(table).name); + const sqlTableNames = getSQLTableNames(); + const jsTableNames = getJsTableNames(); + await qb.internal.wrap({ method: "revert" }, () => Promise.all( - tableNames.map((tableName) => - qb.internal - .transaction() - .execute((tx) => revert({ tableName, checkpoint, tx })), + sqlTableNames.map((sqlTableName, i) => + qb.internal.transaction().execute((tx) => + revert({ + sqlTableName, + jsTableName: jsTableNames[i]!, + checkpoint, + tx, + }), + ), ), ), ); @@ -1155,9 +1173,7 @@ FOR EACH ROW EXECUTE FUNCTION ${tableName}_reorg_operation(); }) .execute(); - const tableNames = Object.values(args.schema) - .filter((table): table is PgTable => is(table, PgTable)) - .map((table) => getTableConfig(table).name); + const tableNames = getSQLTableNames(); await Promise.all( tableNames.map((tableName) => @@ -1177,9 +1193,7 @@ FOR EACH ROW EXECUTE FUNCTION ${tableName}_reorg_operation(); }); }, async complete({ checkpoint }) { - const tableNames = Object.values(args.schema) - .filter((table): table is PgTable => is(table, PgTable)) - .map((table) => getTableConfig(table).name); + const tableNames = getSQLTableNames(); await Promise.all( tableNames.map((tableName) => From f9a31efa8dc059c447a9f3be0edc316a848bb3c6 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Tue, 8 Oct 2024 15:43:39 -0400 Subject: [PATCH 18/29] no drizzle peer dep --- examples/feature-api-functions/package.json | 1 - examples/reference-erc20/package.json | 1 - package.json | 1 - packages/core/package.json | 2 +- pnpm-lock.yaml | 84 +++++++++++++-------- 5 files changed, 55 insertions(+), 34 deletions(-) diff --git a/examples/feature-api-functions/package.json b/examples/feature-api-functions/package.json index 3b2614e0b..d513d8a41 100644 --- a/examples/feature-api-functions/package.json +++ b/examples/feature-api-functions/package.json @@ -14,7 +14,6 @@ "dependencies": { "@ponder/core": "workspace:*", "drizzle-kit": "0.22.8", - "drizzle-orm": "^0.33.0", "hono": "^4.5.0", "viem": "^2.21.3" }, diff --git a/examples/reference-erc20/package.json b/examples/reference-erc20/package.json index 94eacc9fd..b5819ad48 100644 --- a/examples/reference-erc20/package.json +++ b/examples/reference-erc20/package.json @@ -13,7 +13,6 @@ "dependencies": { "@ponder/core": "workspace:*", "drizzle-kit": "0.22.8", - "drizzle-orm": "^0.33.0", "hono": "^4.5.0", "viem": "^2.21.3" }, diff --git a/package.json b/package.json index db2aa671f..7d89c0cd0 100644 --- a/package.json +++ b/package.json @@ -17,7 +17,6 @@ "@biomejs/biome": "^1.8.1", "@changesets/changelog-github": "^0.4.8", "@changesets/cli": "^2.26.2", - "drizzle-orm": "^0.33.0", "hono": "4.5.0", "lint-staged": "^15.1.0", "simple-git-hooks": "^2.9.0", diff --git a/packages/core/package.json b/packages/core/package.json index e69b2a9fd..e163f773b 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -42,7 +42,6 @@ "typecheck": "tsc --noEmit" }, "peerDependencies": { - "drizzle-orm": "^0.31.2", "hono": ">=4.5", "typescript": ">=5.0.4", "viem": ">=2" @@ -67,6 +66,7 @@ "dataloader": "^2.2.2", "detect-package-manager": "^3.0.2", "dotenv": "^16.3.1", + "drizzle-orm": "0.33.0", "glob": "^10.3.10", "graphql": "^16.8.1", "graphql-yoga": "^5.3.0", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 119182615..9c99f7fc5 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,13 +13,10 @@ importers: version: 1.8.1 '@changesets/changelog-github': specifier: ^0.4.8 - version: 0.4.8(encoding@0.1.13) + version: 0.4.8 '@changesets/cli': specifier: ^2.26.2 version: 2.27.1 - drizzle-orm: - specifier: ^0.33.0 - version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) hono: specifier: 4.5.0 version: 4.5.0 @@ -34,7 +31,7 @@ importers: version: 5.0.4 viem: specifier: 2.21.3 - version: 2.21.3(typescript@5.0.4)(zod@3.23.8) + version: 2.21.3(typescript@5.0.4) benchmarks: devDependencies: @@ -147,15 +144,12 @@ importers: drizzle-kit: specifier: 0.22.8 version: 0.22.8 - drizzle-orm: - specifier: ^0.33.0 - version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) hono: specifier: ^4.5.0 version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3) devDependencies: '@types/node': specifier: ^20.10.0 @@ -431,15 +425,12 @@ importers: drizzle-kit: specifier: 0.22.8 version: 0.22.8 - drizzle-orm: - specifier: ^0.33.0 - version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) hono: specifier: ^4.5.0 version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3)(zod@3.23.8) + version: 2.21.3(typescript@5.3.3) devDependencies: '@types/node': specifier: ^20.10.0 @@ -514,7 +505,7 @@ importers: dependencies: forge-std: specifier: github:foundry-rs/forge-std - version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa + version: https://codeload.github.com/foundry-rs/forge-std/tar.gz/035de35f5e366c8d6ed142aec4ccb57fe2dd87d4 examples/with-foundry/ponder: dependencies: @@ -724,6 +715,9 @@ importers: dotenv: specifier: ^16.3.1 version: 16.3.1 + drizzle-orm: + specifier: 0.33.0 + version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) glob: specifier: ^10.3.10 version: 10.3.10 @@ -4549,6 +4543,7 @@ packages: eslint@8.56.0: resolution: {integrity: sha512-Go19xM6T9puCOWntie1/P997aXxFsOi37JIHRWI514Hc6ZnaHGKY9xFhrU65RT6CcBEzZoGG1e6Nq+DT04ZtZQ==} engines: {node: ^12.22.0 || ^14.17.0 || >=16.0.0} + deprecated: This version is no longer supported. Please see https://eslint.org/version-support for other options. hasBin: true esm@3.2.25: @@ -4803,8 +4798,8 @@ packages: forever-agent@0.6.1: resolution: {integrity: sha512-j0KLYPhm6zeac4lz3oJ3o65qvgQCcPubiyotZrXqEaG4hNagNYO8qdlUrX5vwqv9ohqeT/Z3j6+yW067yWWdUw==} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa: - resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/035de35f5e366c8d6ed142aec4ccb57fe2dd87d4: + resolution: {tarball: https://codeload.github.com/foundry-rs/forge-std/tar.gz/035de35f5e366c8d6ed142aec4ccb57fe2dd87d4} version: 1.9.3 form-data@2.3.3: @@ -9301,9 +9296,9 @@ snapshots: dependencies: '@changesets/types': 6.0.0 - '@changesets/changelog-github@0.4.8(encoding@0.1.13)': + '@changesets/changelog-github@0.4.8': dependencies: - '@changesets/get-github-info': 0.5.2(encoding@0.1.13) + '@changesets/get-github-info': 0.5.2 '@changesets/types': 5.2.1 dotenv: 8.6.0 transitivePeerDependencies: @@ -9366,10 +9361,10 @@ snapshots: fs-extra: 7.0.1 semver: 7.6.2 - '@changesets/get-github-info@0.5.2(encoding@0.1.13)': + '@changesets/get-github-info@0.5.2': dependencies: dataloader: 1.4.0 - node-fetch: 2.7.0(encoding@0.1.13) + node-fetch: 2.7.0 transitivePeerDependencies: - encoding @@ -9701,7 +9696,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 espree: 9.6.1 globals: 13.24.0 ignore: 5.3.0 @@ -9958,7 +9953,7 @@ snapshots: '@humanwhocodes/config-array@0.11.13': dependencies: '@humanwhocodes/object-schema': 2.0.1 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -10901,10 +10896,13 @@ snapshots: typescript: 5.3.3 zod: 3.23.8 - abitype@1.0.5(typescript@5.0.4)(zod@3.23.8): + abitype@1.0.5(typescript@5.0.4): optionalDependencies: typescript: 5.0.4 - zod: 3.23.8 + + abitype@1.0.5(typescript@5.3.3): + optionalDependencies: + typescript: 5.3.3 abitype@1.0.5(typescript@5.3.3)(zod@3.23.8): optionalDependencies: @@ -11971,6 +11969,10 @@ snapshots: dependencies: ms: 2.1.3 + debug@4.3.4: + dependencies: + ms: 2.1.2 + debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 @@ -12308,7 +12310,7 @@ snapshots: esbuild-register@3.6.0(esbuild@0.19.11): dependencies: - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 esbuild: 0.19.11 transitivePeerDependencies: - supports-color @@ -12544,7 +12546,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -12882,7 +12884,7 @@ snapshots: forever-agent@0.6.1: {} - forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/8f24d6b04c92975e0795b5868aa0d783251cdeaa: {} + forge-std@https://codeload.github.com/foundry-rs/forge-std/tar.gz/035de35f5e366c8d6ed142aec4ccb57fe2dd87d4: {} form-data@2.3.3: dependencies: @@ -13994,7 +13996,7 @@ snapshots: dependencies: chalk: 5.3.0 commander: 11.1.0 - debug: 4.3.4(supports-color@8.1.1) + debug: 4.3.4 execa: 8.0.1 lilconfig: 3.0.0 listr2: 8.0.0 @@ -15122,6 +15124,10 @@ snapshots: node-domexception@1.0.0: {} + node-fetch@2.7.0: + dependencies: + whatwg-url: 5.0.0 + node-fetch@2.7.0(encoding@0.1.13): dependencies: whatwg-url: 5.0.0 @@ -17096,14 +17102,14 @@ snapshots: - utf-8-validate - zod - viem@2.21.3(typescript@5.0.4)(zod@3.23.8): + viem@2.21.3(typescript@5.0.4): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.0.4)(zod@3.23.8) + abitype: 1.0.5(typescript@5.0.4) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 @@ -17114,6 +17120,24 @@ snapshots: - utf-8-validate - zod + viem@2.21.3(typescript@5.3.3): + dependencies: + '@adraffy/ens-normalize': 1.10.0 + '@noble/curves': 1.4.0 + '@noble/hashes': 1.4.0 + '@scure/bip32': 1.4.0 + '@scure/bip39': 1.4.0 + abitype: 1.0.5(typescript@5.3.3) + isows: 1.0.4(ws@8.17.1) + webauthn-p256: 0.0.5 + ws: 8.17.1 + optionalDependencies: + typescript: 5.3.3 + transitivePeerDependencies: + - bufferutil + - utf-8-validate + - zod + viem@2.21.3(typescript@5.3.3)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 From 82856474bf943320d5844a6f23d98207e9eeb5b4 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Tue, 8 Oct 2024 17:32:28 -0400 Subject: [PATCH 19/29] strictly typed composite primary key methods --- packages/core/src/drizzle/db.ts | 53 +++++++++++++++++++++++++----- packages/core/src/types/db.test.ts | 12 +++++-- packages/core/src/types/db.ts | 44 +++++++++++++++++-------- 3 files changed, 84 insertions(+), 25 deletions(-) diff --git a/packages/core/src/drizzle/db.ts b/packages/core/src/drizzle/db.ts index b9083e392..d020b4528 100644 --- a/packages/core/src/drizzle/db.ts +++ b/packages/core/src/drizzle/db.ts @@ -1,5 +1,7 @@ -import type { BuildColumns, BuildExtraConfigColumns } from "drizzle-orm"; +import type { BuildColumns, ColumnBuilderBase } from "drizzle-orm"; import { + type AnyPgColumn, + type ExtraConfigColumn, type PgColumnBuilderBase, type PgTable, type PgTableExtraConfig, @@ -80,7 +82,6 @@ export { varchar, index, uniqueIndex, - primaryKey, alias, foreignKey, union, @@ -91,7 +92,33 @@ export { exceptAll, } from "drizzle-orm/pg-core"; -export type OnchainTable = PgTable & { +import { + type PrimaryKeyBuilder as DrizzlePrimaryKeyBuilder, + primaryKey as drizzlePrimaryKey, +} from "drizzle-orm/pg-core"; + +export type PrimaryKeyBuilder = + DrizzlePrimaryKeyBuilder & { columnNames: columnNames }; + +export const primaryKey = < + tableName extends string, + column extends AnyPgColumn<{ tableName: tableName }> & { " name": string }, + columns extends (AnyPgColumn<{ tableName: tableName }> & { + " name": string; + })[], +>({ + name, + columns, +}: { name?: string; columns: [column, ...columns] }) => + drizzlePrimaryKey({ name, columns }) as PrimaryKeyBuilder< + column[" name"] | columns[number][" name"] + >; + +export type OnchainTable< + T extends TableConfig & { + extra: PgTableExtraConfig | undefined; + } = TableConfig & { extra: PgTableExtraConfig | undefined }, +> = PgTable & { [Key in keyof T["columns"]]: T["columns"][Key]; } & { [onchain]: true }; @@ -99,6 +126,14 @@ export type OffchainTable = PgTable & { [Key in keyof T["columns"]]: T["columns"][Key]; }; +type BuildExtraConfigColumns< + columns extends Record, +> = { + [key in keyof columns]: ExtraConfigColumn & { + " name": columns[key]["_"]["name"]; + }; +}; + /** * Create an onchain table * @@ -107,18 +142,19 @@ export type OffchainTable = PgTable & { export const onchainTable = < name extends string, columns extends Record, + extra extends PgTableExtraConfig | undefined = undefined, >( name: name, columns: columns, - extraConfig?: ( - self: BuildExtraConfigColumns, - ) => PgTableExtraConfig, + extraConfig?: (self: BuildExtraConfigColumns) => extra, ): OnchainTable<{ name: name; schema: undefined; columns: BuildColumns; + extra: extra; dialect: "pg"; }> => { + // @ts-ignore const table = pgTable(name, columns, extraConfig); /** @@ -147,12 +183,11 @@ export const offchainTable = < >( name: name, columns: columns, - extraConfig?: ( - self: BuildExtraConfigColumns, - ) => PgTableExtraConfig, + extraConfig?: (self: BuildExtraConfigColumns) => PgTableExtraConfig, ): OffchainTable<{ name: name; schema: undefined; columns: BuildColumns; dialect: "pg"; + // @ts-ignore }> => pgTable(name, columns, extraConfig); diff --git a/packages/core/src/types/db.test.ts b/packages/core/src/types/db.test.ts index 8d809060d..80f16f0bb 100644 --- a/packages/core/src/types/db.test.ts +++ b/packages/core/src/types/db.test.ts @@ -1,5 +1,12 @@ -import { offchainTable, onchainTable } from "@/drizzle/db.js"; -import { integer, primaryKey, serial, text } from "drizzle-orm/pg-core"; +import { + boolean, + integer, + offchainTable, + onchainTable, + primaryKey, + serial, + text, +} from "@/drizzle/db.js"; import { test } from "vitest"; import type { Delete, @@ -27,6 +34,7 @@ test("composite primary key", () => { { id: text("id").notNull(), other: integer("other").notNull(), + otherOther: boolean("other_other"), }, (table) => ({ pk: primaryKey({ columns: [table.id, table.other] }), diff --git a/packages/core/src/types/db.ts b/packages/core/src/types/db.ts index e22eeb84f..9bf188e36 100644 --- a/packages/core/src/types/db.ts +++ b/packages/core/src/types/db.ts @@ -1,3 +1,4 @@ +import type { OnchainTable, PrimaryKeyBuilder } from "@/drizzle/db.js"; import type { Drizzle, Schema, onchain } from "@/drizzle/index.js"; import type { Column, @@ -6,6 +7,7 @@ import type { InferSelectModel, Table, } from "drizzle-orm"; +import type { PgTableExtraConfig, TableConfig } from "drizzle-orm/pg-core"; import type { PonderTypeError, Prettify } from "./utils.js"; export type Db = { @@ -118,15 +120,29 @@ type InferPrimaryKey< export type Key< table extends Table, /// - primaryKey extends keyof table["_"]["columns"] = InferPrimaryKey
, - hasPrimaryKey = [primaryKey] extends [never] ? false : true, -> = hasPrimaryKey extends true - ? { - [columnName in primaryKey]: GetColumnData< - table["_"]["columns"][columnName] - >; - } - : Partial>; + compositePrimaryKey extends // @ts-ignore + keyof table["_"]["columns"] = InferCompositePrimaryKey
, + primaryKey extends keyof table["_"]["columns"] = [ + compositePrimaryKey, + ] extends [never] + ? InferPrimaryKey
+ : compositePrimaryKey, +> = { + [columnName in primaryKey]: GetColumnData; +}; + +export type InferCompositePrimaryKey< + table extends OnchainTable< + TableConfig & { extra: PgTableExtraConfig | undefined } + >, + /// + extra extends PgTableExtraConfig | undefined = table["_"]["config"]["extra"], + builders = extra[keyof extra], +> = builders extends builders + ? builders extends PrimaryKeyBuilder + ? builders["columnNames"] + : never + : never; export type IsSerialPrimaryKey< table extends Table, @@ -140,8 +156,8 @@ export type Find =
( table: table extends { [onchain]: true } ? table : PonderTypeError<`db.find() can only be used with onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, - key: Key
, -) => Promise | undefined>; + key: Key
, +) => Promise | undefined> & { b?: Key
}; export type Insert =
( table: table extends { [onchain]: true } @@ -157,7 +173,7 @@ export type Update =
( table: table extends { [onchain]: true } ? table : PonderTypeError<`Indexing functions can only write to onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, - key: Key
, + key: Key
, ) => { set: ( values: @@ -177,7 +193,7 @@ export type Upsert = < table: table extends { [onchain]: true } ? table : PonderTypeError<`Indexing functions can only write to onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, - key: Key
, + key: Key
, ) => { /** Insert a row */ insert: (values: insertValues) => { @@ -195,5 +211,5 @@ export type Delete =
( table: table extends { [onchain]: true } ? table : PonderTypeError<`Indexing functions can only write to onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, - key: Key
, + key: Key
, ) => Promise; From cee84b93b1a52fd5279ddac5acb98ae17ff3d87a Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Wed, 9 Oct 2024 14:12:19 -0400 Subject: [PATCH 20/29] migration guide --- docs/pages/docs/migration-guide.mdx | 301 ++++++++++++++++++++++++++++ 1 file changed, 301 insertions(+) diff --git a/docs/pages/docs/migration-guide.mdx b/docs/pages/docs/migration-guide.mdx index 4a3ca06eb..3b1d55111 100644 --- a/docs/pages/docs/migration-guide.mdx +++ b/docs/pages/docs/migration-guide.mdx @@ -8,6 +8,307 @@ import Architecture from "../../public/architecture.svg"; # Migration guide +## 0.7.0 + +This release introduces a new schema defintion and database API, and natively supports offchain data. + +### Drizzle schema definition + +1. Import `onchainTable` and database helper functions from `@ponder/core/db` +2. Declare tables with `onchainTable`, +3. Export tables from `ponder.schema.ts` +4. Specify primary key columns with `.primaryKey()` +5. Specify not null columns with `.notNull()` +```ts filename="ponder.schema.ts" +import { onchainTable, text, integer } from "@ponder/core/db"; + +export const author = onchainTable("author", { + name: text("name").primaryKey(), + age: integer("age").notNull(), +}); +``` +6. `evmHex` and `evmBigint` are special columns exported from `@ponder/core/db` +```ts filename="ponder.schema.ts" +import { onchainTable, evmHex, evmBigint } from "@ponder/core/db"; + +export const account = onchainTable("account", { + address: evmHex("address").primaryKey(), + balance: evmBigint("balance").notNull(), +}); +``` + +#### Example + +
+```ts filename="ponder.schema.ts" +import { createSchema } from "@ponder/core"; + +export default createSchema((p) => ({ + Account: p.createTable({ + id: p.hex(), + daiBalance: p.bigint(), + totalUsdValue: p.float(), + lastActiveAt: p.int(), + isAdmin: p.boolean(), + graffiti: p.string(), + extra: p.json(), + }), +})); +``` + +```ts filename="ponder.schema.ts" +import { + boolean, + evmBigint, + evmHex, + integer, + json, + onchainTable, + real, + string, +} from "@ponder/core/db"; + +export const account = onchainTable("account", { + address: evmHex("address"), + daiBalance: evmBigint("dai_balance"), + totalUsdValue: real("total_usd_value"), + lastActiveAt: integer("last_active_at"), + isAdmin: boolean("is_admin"), + graffiti: text("grafitti"), + extra: json("extra"), +}); +``` +
+ +### Updated database API + +In order to provide a unified developer experience, the database API (context.db) has been updated. + +1. Run `pnpm codegen` to update types +2. Import tables from `ponder.schema.ts` +```ts filename="src/index.ts" +import { account } from "../ponder.schema"; +``` +3. Replace `.findUnique()` with `.find()` +```diff filename="src/index.ts" +- await context.db.Account.findUnique({ id: event.args.from }); ++ await context.db.find(account, { address: event.args.from }); +``` +4. Replace `.create()` with `.insert()` +```diff filename="src/index.ts" +- await context.db.Account.create({ +- id: event.args.from, +- data: { balance: 0n }, +- }); ++ await context.db ++ .insert(account) ++ .values({ id: event.args.from, balance: 0n }); +``` + +5. Replace `.createMany()` with `.insert()` +```diff filename="src/index.ts" +- await context.db.Account.createMany({ +- data: [ +- { id : event.args.from, balance: 0n}, +- { id : event.args.to, balance: 0n}, +- ], +- }); ++ await context.db ++ .insert(account) ++ .values([ ++ { id : event.args.from, balance: 0n}, ++ { id : event.args.to, balance: 0n}, ++ ]); +``` + +6. Update `.update()` +```diff filename="src/index.ts" +- await context.db.Account.update({ +- id: event.args.from, +- data: ({current}) => ({ balance: current.balance + 100n }), +- }); ++ await context.db ++ .update(account, { address: event.args.from }) ++ .set((row) => ({ balance: row.balance + 100n })); +``` + +7. Update `.upsert()` +```diff filename="src/index.ts" +- await context.db.Account.upsert({ +- id: event.args.from, +- create: { balance: 0n }, +- update: ({current}) => ({ balance: current.balance + 100n }), +- }); ++ await context.db ++ .upsert(account, { address: event.args.from }) ++ .insert({ balance: 0n }) ++ .update((row) => ({ balance: row.balance + 100n })); +``` + +8. Update `.delete()` +```diff filename="src/index.ts" +- await context.db.Account.delete({ id: event.args.from }); ++ await context.db.delete(account, { address: event.args.from }); +``` + +9. Use low-level SQL client for advanced queries + +`context.db.sql` provides a drizzle interface which can be used to make arbitrary sql queries. +```ts filename="src/index.ts" +import { desc } from "@ponder/core/db"; +import { account } from "../ponder.schema"; + +ponder.on("...", ({ event, context }) => { + const result = await context.db.sql + .select() + .from(account) + .orderBy(desc(account.balance)) + .limit(1); +}); +``` + +#### Example + +
+```ts filename="src/index.ts" +import { ponder } from "@/generated"; + +ponder.on("ERC20:Transfer", async ({ event, context }) => { + const { Account, TransferEvent } = context.db; + + await Account.upsert({ + id: event.args.from, + create: { + balance: BigInt(0), + isOwner: false, + }, + update: ({ current }) => ({ + balance: current.balance - event.args.amount, + }), + }); +}); +``` + +```ts filename="src/index.ts" +import { ponder } from "@/generated"; +import { account } from "../ponder.schema"; + +ponder.on("ERC20:Transfer", async ({ event, context }) => { + await context.db + .upsert(account, { address: event.args.from }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance - event.args.amount, + })); +}); +``` +
+ +### Offchain Tables +- Offchain tables are different from onchain tables because they: + - are not automatically created or dropped + - are not affected by reorgs + +- Offchain tables can be written in api function, but can't be written in indexing functions + +| | onchain tables | offchain tables | +|--------------------|----------------|-----------------| +| indexing functions | read + write | read | +| api functions | read | read + write | + + + +1. Define offchain tables with `offchainTable()` in `ponder.schema.ts` +```ts filename="ponder.schema.ts" +import { offchainTable, text, integer } from "@ponder/core/db"; + +export const author = offchainTable("author", { + name: text("name").primaryKey(), + age: integer("age").notNull(), +}); +``` +2. Use `offchainSchema()` to create offchain tables in a specific schema +```ts filename="ponder.schema.ts" +import { offchainSchema, serial, evmHex } from "@ponder/core/db"; + +export const offchain = offchainSchema("offchain"); + +export const metadata = offchain.table("metadata", { + id: serial("id").primaryKey(), + authors: + account: evmHex("account").notNull(), +}); +``` +3. Add `drizzle-kit` as a dependency +4. Add migration generation script to `package.json` +```json filename="package.json" +{ + "scripts": { + "generate": "drizzle-kit generate --dialect postgresql --schema ./ponder.schema.ts --out migrations" + } +} +``` +5. Run `pnpm generate` to generate migrations for offchain tables +6. Run `pnpm dev` or `pnpm start` to automatically apply migrations + +#### Example + +
+```ts filename="ponder.schema.ts" +import { + boolean, + evmBigint, + evmHex, + offchainSchema, + onchainTable, + serial, +} from "@ponder/core/db"; + +export const account = onchainTable("account", { + address: evmHex("address").primaryKey(), + balance: evmBigint("balance").notNull(), + isOwner: boolean("is_owner").notNull(), +}); + +export const metadata = schema.table("metadata", { + id: serial("id").primaryKey(), + account: evmHex("account").notNull(), +}); +``` + +```ts filename="src/api/index.ts" +import { ponder } from "@/generated"; +import { replaceBigInts } from "@ponder/core"; +import { desc, eq } from "@ponder/core/db"; +import { getAddress } from "viem"; +import { account, metadata } from "../../ponder.schema"; + +ponder.get("/register/:address", async (c) => { + const account = c.req.param("address"); + await c.db.insert(metadata).values({ account }); + return c.text("Success", 200); +}); + +ponder.get("/user-balances", async (c) => { + const result = await c.db + .select({ + address: account.address, + balance: account.balance, + }) + .from(account) + .innerJoin( + metadata, + eq(account.address, metadata.account), + ) + .orderBy(desc(account.balance)) + .limit(10); + + return c.json(replaceBigInts(result, (b) => formatEther(b))); +}); +``` + +
+ ## 0.6.0 ### Updated `viem` to `>=2` From 6bfea6f1c3d5c9587f52033b8e8eb78ac99d12b8 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Wed, 9 Oct 2024 17:26:11 -0400 Subject: [PATCH 21/29] update drizzle-orm --- .../feature-api-functions/ponder.schema.ts | 61 +++---- .../feature-api-functions/src/api/index.ts | 45 ++--- examples/feature-api-functions/src/index.ts | 17 +- examples/feature-multichain/ponder.schema.ts | 10 +- examples/reference-erc20/ponder.schema.ts | 59 +++---- examples/reference-erc20/src/index.ts | 17 +- packages/core/package.json | 2 +- packages/core/src/drizzle/db.ts | 164 +++++++++++++++--- packages/core/src/index.ts | 2 + packages/core/src/indexing-store/index.ts | 25 +-- packages/core/src/types/db.test.ts | 78 ++++----- packages/core/src/types/db.ts | 2 +- pnpm-lock.yaml | 83 +++------ 13 files changed, 314 insertions(+), 251 deletions(-) diff --git a/examples/feature-api-functions/ponder.schema.ts b/examples/feature-api-functions/ponder.schema.ts index 7071f7297..d779855e0 100644 --- a/examples/feature-api-functions/ponder.schema.ts +++ b/examples/feature-api-functions/ponder.schema.ts @@ -1,28 +1,23 @@ import { - boolean, - evmBigint, - evmHex, index, - integer, offchainSchema, onchainTable, primaryKey, - serial, } from "@ponder/core/db"; -export const account = onchainTable("account", { - address: evmHex("address").primaryKey(), - balance: evmBigint("balance").notNull(), - isOwner: boolean("is_owner").notNull(), -}); +export const account = onchainTable("account", (t) => ({ + address: t.evmHex().primaryKey(), + balance: t.evmBigint().notNull(), + isOwner: t.boolean().notNull(), +})); export const allowance = onchainTable( "allowance", - { - owner: evmHex("owner"), - spender: evmHex("spender"), - amount: evmBigint("amount").notNull(), - }, + (t) => ({ + owner: t.evmHex(), + spender: t.evmHex(), + amount: t.evmBigint().notNull(), + }), (table) => ({ pk: primaryKey({ columns: [table.owner, table.spender] }), }), @@ -30,29 +25,29 @@ export const allowance = onchainTable( export const transferEvent = onchainTable( "transfer_event", - { - id: serial("id").primaryKey(), - amount: evmBigint("amount").$type(), - timestamp: integer("timestamp"), - from: evmHex("from"), - to: evmHex("to"), - }, + (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + from: t.evmHex().notNull(), + to: t.evmHex().notNull(), + }), (table) => ({ fromIdx: index("from_index").on(table.from), }), ); -export const approvalEvent = onchainTable("approval_event", { - id: serial("id").primaryKey(), - amount: evmBigint("amount"), - timestamp: integer("timestamp"), - owner: evmHex("from"), - spender: evmHex("to"), -}); +export const approvalEvent = onchainTable("approval_event", (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + owner: t.evmHex().notNull(), + spender: t.evmHex().notNull(), +})); export const schema = offchainSchema("offchain"); -export const metadata = schema.table("metadata", { - id: serial("id").primaryKey(), - account: evmHex("account").notNull(), -}); +export const metadata = schema.table("metadata", (t) => ({ + id: t.serial().primaryKey(), + account: t.evmHex().notNull(), +})); diff --git a/examples/feature-api-functions/src/api/index.ts b/examples/feature-api-functions/src/api/index.ts index d64e8bf7c..62cb8600b 100644 --- a/examples/feature-api-functions/src/api/index.ts +++ b/examples/feature-api-functions/src/api/index.ts @@ -2,14 +2,12 @@ import { ponder } from "@/generated"; import { replaceBigInts } from "@ponder/core"; import { count, desc, eq, or } from "@ponder/core/db"; import { formatEther, getAddress } from "viem"; -import * as schema from "../../ponder.schema"; +import { account, metadata, transferEvent } from "../../ponder.schema"; // ponder.use("/graphql", graphql()); ponder.get("/count", async (c) => { - const result = await c.db - .select({ count: count() }) - .from(schema.transferEvent); + const result = await c.db.select({ count: count() }).from(transferEvent); if (result.length === 0) return c.text("0"); return c.text(String(result[0]!.count)); @@ -20,13 +18,8 @@ ponder.get("/count/:address", async (c) => { const result = await c.db .select({ count: count() }) - .from(schema.transferEvent) - .where( - or( - eq(schema.transferEvent.from, account), - eq(schema.transferEvent.to, account), - ), - ); + .from(transferEvent) + .where(or(eq(transferEvent.from, account), eq(transferEvent.to, account))); if (result.length === 0) return c.text("0"); return c.text(String(result[0]!.count)); @@ -36,16 +29,13 @@ ponder.get("/whale-transfers", async (c) => { // Top 10 transfers from whale accounts const result = await c.db .select({ - sender: schema.account.address, - senderBalance: schema.account.balance, - amount: schema.transferEvent.amount, + sender: account.address, + senderBalance: account.balance, + amount: transferEvent.amount, }) - .from(schema.transferEvent) - .innerJoin( - schema.account, - eq(schema.transferEvent.from, schema.account.address), - ) - .orderBy(desc(schema.account.balance)) + .from(transferEvent) + .innerJoin(account, eq(transferEvent.from, account.address)) + .orderBy(desc(account.balance)) .limit(10); if (result.length === 0) return c.text("Not found", 500); @@ -54,7 +44,7 @@ ponder.get("/whale-transfers", async (c) => { ponder.get("/register/:address", async (c) => { const account = getAddress(c.req.param("address")); - await c.db.insert(schema.metadata).values({ account }); + await c.db.insert(metadata).values({ account }); return c.text("Success", 200); }); @@ -63,15 +53,12 @@ ponder.get("/user-transfers", async (c) => { // Top 20 largest transfers to registered users const result = await c.db .select({ - amount: schema.transferEvent.amount, - account: schema.metadata.account, + amount: transferEvent.amount, + account: metadata.account, }) - .from(schema.transferEvent) - .innerJoin( - schema.metadata, - eq(schema.transferEvent.to, schema.metadata.account), - ) - .orderBy(desc(schema.transferEvent.amount)) + .from(transferEvent) + .innerJoin(metadata, eq(transferEvent.to, metadata.account)) + .orderBy(desc(transferEvent.amount)) .limit(20); return c.json(replaceBigInts(result, (b) => formatEther(b))); diff --git a/examples/feature-api-functions/src/index.ts b/examples/feature-api-functions/src/index.ts index 2d2844ae4..552d35b68 100644 --- a/examples/feature-api-functions/src/index.ts +++ b/examples/feature-api-functions/src/index.ts @@ -1,23 +1,28 @@ import { ponder } from "@/generated"; -import * as schema from "../ponder.schema"; +import { + account, + allowance, + approvalEvent, + transferEvent, +} from "../ponder.schema"; ponder.on("ERC20:Transfer", async ({ event, context }) => { await context.db - .upsert(schema.account, { address: event.args.from }) + .upsert(account, { address: event.args.from }) .insert({ balance: 0n, isOwner: false }) .update((row) => ({ balance: row.balance - event.args.amount, })); await context.db - .upsert(schema.account, { address: event.args.to }) + .upsert(account, { address: event.args.to }) .insert({ balance: 0n, isOwner: false }) .update((row) => ({ balance: row.balance + event.args.amount, })); // add row to "transfer_event". - await context.db.insert(schema.transferEvent).values({ + await context.db.insert(transferEvent).values({ amount: event.args.amount, timestamp: Number(event.block.timestamp), from: event.args.from, @@ -28,7 +33,7 @@ ponder.on("ERC20:Transfer", async ({ event, context }) => { ponder.on("ERC20:Approval", async ({ event, context }) => { // upsert "allowance". await context.db - .upsert(schema.allowance, { + .upsert(allowance, { spender: event.args.spender, owner: event.args.owner, }) @@ -36,7 +41,7 @@ ponder.on("ERC20:Approval", async ({ event, context }) => { .update({ amount: event.args.amount }); // add row to "approval_event". - await context.db.insert(schema.approvalEvent).values({ + await context.db.insert(approvalEvent).values({ amount: event.args.amount, timestamp: Number(event.block.timestamp), owner: event.args.owner, diff --git a/examples/feature-multichain/ponder.schema.ts b/examples/feature-multichain/ponder.schema.ts index f8acab389..cb9645757 100644 --- a/examples/feature-multichain/ponder.schema.ts +++ b/examples/feature-multichain/ponder.schema.ts @@ -1,6 +1,6 @@ -import { evmBigint, evmHex, onchainTable } from "@ponder/core/db"; +import { onchainTable } from "@ponder/core"; -export const account = onchainTable("account", { - address: evmHex("address").primaryKey(), - balance: evmBigint("balance").notNull(), -}); +export const account = onchainTable("account", (t) => ({ + address: t.evmHex().primaryKey(), + balance: t.evmBigint().notNull(), +})); diff --git a/examples/reference-erc20/ponder.schema.ts b/examples/reference-erc20/ponder.schema.ts index 348ae3c76..64386b24d 100644 --- a/examples/reference-erc20/ponder.schema.ts +++ b/examples/reference-erc20/ponder.schema.ts @@ -1,27 +1,18 @@ -import { - boolean, - evmBigint, - evmHex, - index, - integer, - onchainTable, - primaryKey, - serial, -} from "@ponder/core/db"; +import { index, onchainTable, primaryKey } from "@ponder/core/db"; -export const account = onchainTable("account", { - address: evmHex("address").primaryKey(), - balance: evmBigint("balance").notNull(), - isOwner: boolean("is_owner").notNull(), -}); +export const account = onchainTable("account", (t) => ({ + address: t.evmHex().primaryKey(), + balance: t.evmBigint().notNull(), + isOwner: t.boolean().notNull(), +})); export const allowance = onchainTable( "allowance", - { - owner: evmHex("owner"), - spender: evmHex("spender"), - amount: evmBigint("amount").notNull(), - }, + (t) => ({ + owner: t.evmHex(), + spender: t.evmHex(), + amount: t.evmBigint().notNull(), + }), (table) => ({ pk: primaryKey({ columns: [table.owner, table.spender] }), }), @@ -29,22 +20,22 @@ export const allowance = onchainTable( export const transferEvent = onchainTable( "transfer_event", - { - id: serial("id").primaryKey(), - amount: evmBigint("amount").notNull(), - timestamp: integer("timestamp").notNull(), - from: evmHex("from").notNull(), - to: evmHex("to").notNull(), - }, + (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + from: t.evmHex().notNull(), + to: t.evmHex().notNull(), + }), (table) => ({ fromIdx: index("from_index").on(table.from), }), ); -export const approvalEvent = onchainTable("approval_event", { - id: serial("id").primaryKey(), - amount: evmBigint("amount").notNull(), - timestamp: integer("timestamp").notNull(), - owner: evmHex("from").notNull(), - spender: evmHex("to").notNull(), -}); +export const approvalEvent = onchainTable("approval_event", (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + owner: t.evmHex().notNull(), + spender: t.evmHex().notNull(), +})); diff --git a/examples/reference-erc20/src/index.ts b/examples/reference-erc20/src/index.ts index 2d2844ae4..552d35b68 100644 --- a/examples/reference-erc20/src/index.ts +++ b/examples/reference-erc20/src/index.ts @@ -1,23 +1,28 @@ import { ponder } from "@/generated"; -import * as schema from "../ponder.schema"; +import { + account, + allowance, + approvalEvent, + transferEvent, +} from "../ponder.schema"; ponder.on("ERC20:Transfer", async ({ event, context }) => { await context.db - .upsert(schema.account, { address: event.args.from }) + .upsert(account, { address: event.args.from }) .insert({ balance: 0n, isOwner: false }) .update((row) => ({ balance: row.balance - event.args.amount, })); await context.db - .upsert(schema.account, { address: event.args.to }) + .upsert(account, { address: event.args.to }) .insert({ balance: 0n, isOwner: false }) .update((row) => ({ balance: row.balance + event.args.amount, })); // add row to "transfer_event". - await context.db.insert(schema.transferEvent).values({ + await context.db.insert(transferEvent).values({ amount: event.args.amount, timestamp: Number(event.block.timestamp), from: event.args.from, @@ -28,7 +33,7 @@ ponder.on("ERC20:Transfer", async ({ event, context }) => { ponder.on("ERC20:Approval", async ({ event, context }) => { // upsert "allowance". await context.db - .upsert(schema.allowance, { + .upsert(allowance, { spender: event.args.spender, owner: event.args.owner, }) @@ -36,7 +41,7 @@ ponder.on("ERC20:Approval", async ({ event, context }) => { .update({ amount: event.args.amount }); // add row to "approval_event". - await context.db.insert(schema.approvalEvent).values({ + await context.db.insert(approvalEvent).values({ amount: event.args.amount, timestamp: Number(event.block.timestamp), owner: event.args.owner, diff --git a/packages/core/package.json b/packages/core/package.json index e163f773b..6d411b0b7 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -66,7 +66,7 @@ "dataloader": "^2.2.2", "detect-package-manager": "^3.0.2", "dotenv": "^16.3.1", - "drizzle-orm": "0.33.0", + "drizzle-orm": "0.34.1", "glob": "^10.3.10", "graphql": "^16.8.1", "graphql-yoga": "^5.3.0", diff --git a/packages/core/src/drizzle/db.ts b/packages/core/src/drizzle/db.ts index d020b4528..95f471e27 100644 --- a/packages/core/src/drizzle/db.ts +++ b/packages/core/src/drizzle/db.ts @@ -1,23 +1,49 @@ -import type { BuildColumns, ColumnBuilderBase } from "drizzle-orm"; +import { type BuildColumns, type ColumnBuilderBase, Table } from "drizzle-orm"; import { type AnyPgColumn, + type PrimaryKeyBuilder as DrizzlePrimaryKeyBuilder, type ExtraConfigColumn, + type PgColumnBuilder, type PgColumnBuilderBase, - type PgTable, + type PgNumericBuilderInitial, + PgSchema, + PgTable, type PgTableExtraConfig, + type PgTableWithColumns, type TableConfig, - pgSchema, - pgTable, + primaryKey as drizzlePrimaryKey, + numeric, } from "drizzle-orm/pg-core"; -import { numeric } from "drizzle-orm/pg-core"; +import { + type PgColumnsBuilders as _PgColumnsBuilders, + getPgColumnBuilders, +} from "drizzle-orm/pg-core/columns/all"; import { PgHexBuilder, type PgHexBuilderInitial } from "./hex.js"; import { onchain } from "./index.js"; -export const evmHex = ( +type $Type = T & { + _: { + $type: TType; + }; +}; + +// @ts-ignore +export function evmHex(): PgHexBuilderInitial<"">; +export function evmHex( columnName: name, -): PgHexBuilderInitial => new PgHexBuilder(columnName); -export const evmBigint = (columnName: name) => - numeric(columnName, { precision: 78 }).$type(); +): PgHexBuilderInitial; +export function evmHex(columnName?: string) { + return new PgHexBuilder(columnName ?? ""); +} + +// @ts-ignore +export function evmBigint(): $Type, bigint>; +export function evmBigint( + columnName: name, +): $Type, bigint>; +export function evmBigint(columnName?: string) { + return numeric(columnName ?? "", { precision: 78 }); +} export { sql, @@ -92,11 +118,6 @@ export { exceptAll, } from "drizzle-orm/pg-core"; -import { - type PrimaryKeyBuilder as DrizzlePrimaryKeyBuilder, - primaryKey as drizzlePrimaryKey, -} from "drizzle-orm/pg-core"; - export type PrimaryKeyBuilder = DrizzlePrimaryKeyBuilder & { columnNames: columnNames }; @@ -130,10 +151,17 @@ type BuildExtraConfigColumns< columns extends Record, > = { [key in keyof columns]: ExtraConfigColumn & { - " name": columns[key]["_"]["name"]; + " name": key; }; }; +type PgColumnsBuilders = _PgColumnsBuilders & { + evmHex: typeof evmHex; + evmBigint: typeof evmBigint; +}; + +// TODO(kyle) add objects at runtime + /** * Create an onchain table * @@ -145,7 +173,7 @@ export const onchainTable = < extra extends PgTableExtraConfig | undefined = undefined, >( name: name, - columns: columns, + columns: columns | ((columnTypes: PgColumnsBuilders) => columns), extraConfig?: (self: BuildExtraConfigColumns) => extra, ): OnchainTable<{ name: name; @@ -154,8 +182,7 @@ export const onchainTable = < extra: extra; dialect: "pg"; }> => { - // @ts-ignore - const table = pgTable(name, columns, extraConfig); + const table = pgTableWithSchema(name, columns, extraConfig as any, undefined); /** * This trick is used to make `table instanceof PgTable` evaluate to false. @@ -170,7 +197,26 @@ export const onchainTable = < return table; }; -export const offchainSchema = (name: T) => pgSchema(name); +export class OffchainSchema extends PgSchema { + override table = < + name extends string, + columns extends Record, + >( + name: name, + columns: columns | ((columnTypes: PgColumnsBuilders) => columns), + extraConfig?: ( + self: BuildExtraConfigColumns, + ) => PgTableExtraConfig, + ): OffchainTable<{ + name: name; + schema: schema; + columns: BuildColumns; + dialect: "pg"; + }> => pgTableWithSchema(name, columns, extraConfig, this.schemaName); +} + +export const offchainSchema = (name: T) => + new OffchainSchema(name); /** * Create an offchain table @@ -182,12 +228,86 @@ export const offchainTable = < columns extends Record, >( name: name, - columns: columns, + columns: columns | ((columnTypes: PgColumnsBuilders) => columns), extraConfig?: (self: BuildExtraConfigColumns) => PgTableExtraConfig, ): OffchainTable<{ name: name; schema: undefined; columns: BuildColumns; dialect: "pg"; - // @ts-ignore -}> => pgTable(name, columns, extraConfig); +}> => pgTableWithSchema(name, columns, extraConfig, undefined); + +const InlineForeignKeys = Symbol.for("drizzle:PgInlineForeignKeys"); + +/** @see https://github.com/drizzle-team/drizzle-orm/blob/main/drizzle-orm/src/pg-core/table.ts#L51 */ +function pgTableWithSchema< + name extends string, + schema extends string | undefined, + columns extends Record, +>( + name: name, + columns: columns | ((columnTypes: PgColumnsBuilders) => columns), + extraConfig: + | ((self: BuildExtraConfigColumns) => PgTableExtraConfig) + | undefined, + schema: schema, + baseName = name, +): PgTableWithColumns<{ + name: name; + schema: schema; + columns: BuildColumns; + dialect: "pg"; +}> { + const rawTable = new PgTable<{ + name: name; + schema: schema; + columns: BuildColumns; + dialect: "pg"; + }>(name, schema, baseName); + + const parsedColumns: columns = + typeof columns === "function" + ? columns({ ...getPgColumnBuilders(), evmHex, evmBigint }) + : columns; + + const builtColumns = Object.fromEntries( + Object.entries(parsedColumns).map(([name, colBuilderBase]) => { + const colBuilder = colBuilderBase; + //@ts-ignore + colBuilder.setName(name); + //@ts-ignore + const column = colBuilder.build(rawTable); + // @ts-ignore + rawTable[InlineForeignKeys].push( + //@ts-ignore + ...colBuilder.buildForeignKeys(column, rawTable), + ); + return [name, column]; + }), + ) as unknown as BuildColumns; + + const builtColumnsForExtraConfig = Object.fromEntries( + Object.entries(parsedColumns).map(([name, colBuilderBase]) => { + const colBuilder = colBuilderBase as PgColumnBuilder; + //@ts-ignore + colBuilder.setName(name); + //@ts-ignore + const column = colBuilder.buildExtraConfigColumn(rawTable); + return [name, column]; + }), + ) as unknown as BuildExtraConfigColumns; + + const table = Object.assign(rawTable, builtColumns); + + //@ts-ignore + table[Table.Symbol.Columns] = builtColumns; + //@ts-ignore + table[Table.Symbol.ExtraConfigColumns] = builtColumnsForExtraConfig; + + if (extraConfig) { + //@ts-ignore + table[PgTable.Symbol.ExtraConfigBuilder] = extraConfig as any; + } + + return table; +} diff --git a/packages/core/src/index.ts b/packages/core/src/index.ts index 1c406be36..47f31f682 100644 --- a/packages/core/src/index.ts +++ b/packages/core/src/index.ts @@ -23,4 +23,6 @@ export type NetworkConfig = Prettify; export type BlockConfig = Prettify; export type DatabaseConfig = Prettify; +export { onchainTable, offchainTable } from "@/drizzle/db.js"; + // export { graphql } from "@/graphql/index.js"; diff --git a/packages/core/src/indexing-store/index.ts b/packages/core/src/indexing-store/index.ts index 9705dc292..33224f37f 100644 --- a/packages/core/src/indexing-store/index.ts +++ b/packages/core/src/indexing-store/index.ts @@ -68,10 +68,8 @@ export const createIndexingStore = ({ async () => { checkOnchainTable(table as Table, "update"); if (typeof values === "function") { - const row = await indexingStore.find( - table as Table & { [onchain]: true }, - key, - ); + // @ts-ignore + const row = await indexingStore.find(table, key); if (row === undefined) { throw new RecordNotFoundError( @@ -100,10 +98,8 @@ export const createIndexingStore = ({ { method: `${getTableConfig(table as PgTable).name}.upsert()` }, async () => { checkOnchainTable(table as Table, "upsert"); - const row = await indexingStore.find( - table as Table & { [onchain]: true }, - key, - ); + // @ts-ignore + const row = await indexingStore.find(table, key); if (row === undefined) { await indexingStore @@ -125,10 +121,8 @@ export const createIndexingStore = ({ { method: `${getTableConfig(table as PgTable).name}.upsert()` }, async () => { checkOnchainTable(table as Table, "upsert"); - const row = await indexingStore.find( - table as Table & { [onchain]: true }, - key, - ); + // @ts-ignore + const row = await indexingStore.find(table, key); if (row === undefined) { await indexingStore .insert(table) @@ -145,10 +139,8 @@ export const createIndexingStore = ({ { method: `${getTableConfig(table as PgTable).name}.upsert()` }, async () => { checkOnchainTable(table as Table, "upsert"); - const row = await indexingStore.find( - table as Table & { [onchain]: true }, - key, - ); + // @ts-ignore + const row = await indexingStore.find(table, key); if (row === undefined) { await indexingStore @@ -171,6 +163,7 @@ export const createIndexingStore = ({ async () => { checkOnchainTable(table as Table, "upsert"); const row = await indexingStore.find( + // @ts-ignore table as Table & { [onchain]: true }, key, ); diff --git a/packages/core/src/types/db.test.ts b/packages/core/src/types/db.test.ts index 80f16f0bb..a1318046c 100644 --- a/packages/core/src/types/db.test.ts +++ b/packages/core/src/types/db.test.ts @@ -1,12 +1,4 @@ -import { - boolean, - integer, - offchainTable, - onchainTable, - primaryKey, - serial, - text, -} from "@/drizzle/db.js"; +import { offchainTable, onchainTable, primaryKey } from "@/drizzle/db.js"; import { test } from "vitest"; import type { Delete, @@ -19,10 +11,10 @@ import type { } from "./db.js"; test("offchain table", () => { - const table = offchainTable("table", { - id: text("id").primaryKey(), - other: integer("other"), - }); + const table = offchainTable("table", (t) => ({ + id: t.text().primaryKey(), + other: t.integer(), + })); const find: Find = () => {}; find(table, { id: "kevin" }); @@ -31,11 +23,11 @@ test("offchain table", () => { test("composite primary key", () => { const table = onchainTable( "table", - { - id: text("id").notNull(), - other: integer("other").notNull(), - otherOther: boolean("other_other"), - }, + (t) => ({ + id: t.text().notNull(), + other: t.integer().notNull(), + otherOther: t.boolean(), + }), (table) => ({ pk: primaryKey({ columns: [table.id, table.other] }), }), @@ -46,20 +38,20 @@ test("composite primary key", () => { }); test("serial primary key", () => { - const table = onchainTable("table", { - id: serial("id").primaryKey(), - other: integer("other"), - }); + const table = onchainTable("table", (t) => ({ + id: t.serial().primaryKey(), + other: t.integer(), + })); type t = IsSerialPrimaryKey; // ^? }); test("find", () => { - const table = onchainTable("table", { - id: text("id").primaryKey(), - other: integer("other"), - }); + const table = onchainTable("table", (t) => ({ + id: t.text().primaryKey(), + other: t.integer(), + })); const find: Find = () => {}; const t = find(table, { id: "kevin" }); @@ -67,10 +59,10 @@ test("find", () => { }); test("insert", () => { - const table = onchainTable("table", { - id: text("id").primaryKey(), - other: integer("other"), - }); + const table = onchainTable("table", (t) => ({ + id: t.text().primaryKey(), + other: t.integer(), + })); const insert: Insert = () => {}; const t = insert(table).values({ id: "kevin" }); @@ -78,10 +70,10 @@ test("insert", () => { }); test("update", () => { - const table = onchainTable("table", { - id: text("id").primaryKey(), - other: integer("other"), - }); + const table = onchainTable("table", (t) => ({ + id: t.text().primaryKey(), + other: t.integer(), + })); const update: Update = () => {}; const t = update(table, { id: "kevin" }).set({ other: 52 }); @@ -89,10 +81,10 @@ test("update", () => { }); test("upsert", async () => { - const table = onchainTable("table", { - id: text("id").primaryKey(), - other: integer("other"), - }); + const table = onchainTable("table", (t) => ({ + id: t.text().primaryKey(), + other: t.integer(), + })); const upsert: Upsert = () => {}; const t1 = await upsert(table, { id: "kevin" }).insert({ other: 52 }); @@ -115,13 +107,15 @@ test("upsert", async () => { // ^? .update((cur) => ({ other: cur.other ?? 99 })) .insert({ other: 52 }); + + const cuh = await upsert(table, { id: "kevin" }).b; }); test("delete", () => { - const table = onchainTable("table", { - id: text("id").primaryKey(), - other: integer("other"), - }); + const table = onchainTable("table", (t) => ({ + id: t.text().primaryKey(), + other: t.integer(), + })); const _delete: Delete = () => {}; const t = _delete(table, { id: "kevin" }); diff --git a/packages/core/src/types/db.ts b/packages/core/src/types/db.ts index 9bf188e36..a8451a135 100644 --- a/packages/core/src/types/db.ts +++ b/packages/core/src/types/db.ts @@ -157,7 +157,7 @@ export type Find =
( ? table : PonderTypeError<`db.find() can only be used with onchain tables, and '${table["_"]["name"]}' is an offchain table.`>, key: Key
, -) => Promise | undefined> & { b?: Key
}; +) => Promise | undefined>; export type Insert =
( table: table extends { [onchain]: true } diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 9c99f7fc5..657c2c4a8 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -13,7 +13,7 @@ importers: version: 1.8.1 '@changesets/changelog-github': specifier: ^0.4.8 - version: 0.4.8 + version: 0.4.8(encoding@0.1.13) '@changesets/cli': specifier: ^2.26.2 version: 2.27.1 @@ -31,7 +31,7 @@ importers: version: 5.0.4 viem: specifier: 2.21.3 - version: 2.21.3(typescript@5.0.4) + version: 2.21.3(typescript@5.0.4)(zod@3.23.8) benchmarks: devDependencies: @@ -149,7 +149,7 @@ importers: version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 @@ -430,7 +430,7 @@ importers: version: 4.5.0 viem: specifier: ^2.21.3 - version: 2.21.3(typescript@5.3.3) + version: 2.21.3(typescript@5.3.3)(zod@3.23.8) devDependencies: '@types/node': specifier: ^20.10.0 @@ -716,8 +716,8 @@ importers: specifier: ^16.3.1 version: 16.3.1 drizzle-orm: - specifier: 0.33.0 - version: 0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) + specifier: 0.34.1 + version: 0.34.1(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0) glob: specifier: ^10.3.10 version: 10.3.10 @@ -4237,13 +4237,13 @@ packages: resolution: {integrity: sha512-VjI4wsJjk3hSqHSa3TwBf+uvH6M6pRHyxyoVbt935GUzP9tUR/BRZ+MhEJNgryqbzN2Za1KP0eJMTgKEPsalYQ==} hasBin: true - drizzle-orm@0.33.0: - resolution: {integrity: sha512-SHy72R2Rdkz0LEq0PSG/IdvnT3nGiWuRk+2tXZQ90GVq/XQhpCzu/EFT3V2rox+w8MlkBQxifF8pCStNYnERfA==} + drizzle-orm@0.34.1: + resolution: {integrity: sha512-t+zCwyWWt8xTqtYV4doE/xYmT7hpv1L8pQ66zddEz+3VWyedBBtctjMAp22mAJPfyWurRQXUJ1nrTtqLq+DqNA==} peerDependencies: '@aws-sdk/client-rds-data': '>=3' '@cloudflare/workers-types': '>=3' '@electric-sql/pglite': '>=0.1.1' - '@libsql/client': '*' + '@libsql/client': '>=0.10.0' '@neondatabase/serverless': '>=0.1' '@op-engineering/op-sqlite': '>=2' '@opentelemetry/api': ^1.4.1 @@ -5114,8 +5114,8 @@ packages: hast-util-to-estree@3.1.0: resolution: {integrity: sha512-lfX5g6hqVh9kjS/B9E2gSkvHH4SZNiQFiqWS0x9fENzEl+8W12RqdRxX6d/Cwxi30tPQs3bIO+aolQJNp1bIyw==} - hast-util-to-html@9.0.2: - resolution: {integrity: sha512-RP5wNpj5nm1Z8cloDv4Sl4RS8jH5HYa0v93YB6Wb4poEzgMo/dAAL0KcT4974dCjcNG5pkLqTImeFHHCwwfY3g==} + hast-util-to-html@9.0.3: + resolution: {integrity: sha512-M17uBDzMJ9RPCqLMO92gNNUDuBSq10a25SDBI08iCCxmorf4Yy6sYHK57n9WAbRAAaU+DuR4W6GN9K4DFZesYg==} hast-util-to-parse5@8.0.0: resolution: {integrity: sha512-3KKrV5ZVI8if87DVSi1vDeByYrkGzg4mEfeu4alwgmmIeARiBLKCZS2uw5Gb6nU9x9Yufyj3iudm6i7nl52PFw==} @@ -9296,9 +9296,9 @@ snapshots: dependencies: '@changesets/types': 6.0.0 - '@changesets/changelog-github@0.4.8': + '@changesets/changelog-github@0.4.8(encoding@0.1.13)': dependencies: - '@changesets/get-github-info': 0.5.2 + '@changesets/get-github-info': 0.5.2(encoding@0.1.13) '@changesets/types': 5.2.1 dotenv: 8.6.0 transitivePeerDependencies: @@ -9361,10 +9361,10 @@ snapshots: fs-extra: 7.0.1 semver: 7.6.2 - '@changesets/get-github-info@0.5.2': + '@changesets/get-github-info@0.5.2(encoding@0.1.13)': dependencies: dataloader: 1.4.0 - node-fetch: 2.7.0 + node-fetch: 2.7.0(encoding@0.1.13) transitivePeerDependencies: - encoding @@ -9696,7 +9696,7 @@ snapshots: '@eslint/eslintrc@2.1.4': dependencies: ajv: 6.12.6 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) espree: 9.6.1 globals: 13.24.0 ignore: 5.3.0 @@ -9953,7 +9953,7 @@ snapshots: '@humanwhocodes/config-array@0.11.13': dependencies: '@humanwhocodes/object-schema': 2.0.1 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) minimatch: 3.1.2 transitivePeerDependencies: - supports-color @@ -10896,13 +10896,10 @@ snapshots: typescript: 5.3.3 zod: 3.23.8 - abitype@1.0.5(typescript@5.0.4): + abitype@1.0.5(typescript@5.0.4)(zod@3.23.8): optionalDependencies: typescript: 5.0.4 - - abitype@1.0.5(typescript@5.3.3): - optionalDependencies: - typescript: 5.3.3 + zod: 3.23.8 abitype@1.0.5(typescript@5.3.3)(zod@3.23.8): optionalDependencies: @@ -11969,10 +11966,6 @@ snapshots: dependencies: ms: 2.1.3 - debug@4.3.4: - dependencies: - ms: 2.1.2 - debug@4.3.4(supports-color@8.1.1): dependencies: ms: 2.1.2 @@ -12143,7 +12136,7 @@ snapshots: transitivePeerDependencies: - supports-color - drizzle-orm@0.33.0(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0): + drizzle-orm@0.34.1(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0): optionalDependencies: '@opentelemetry/api': 1.7.0 '@types/better-sqlite3': 7.6.10 @@ -12310,7 +12303,7 @@ snapshots: esbuild-register@3.6.0(esbuild@0.19.11): dependencies: - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) esbuild: 0.19.11 transitivePeerDependencies: - supports-color @@ -12546,7 +12539,7 @@ snapshots: ajv: 6.12.6 chalk: 4.1.2 cross-spawn: 7.0.3 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) doctrine: 3.0.0 escape-string-regexp: 4.0.0 eslint-scope: 7.2.2 @@ -13319,7 +13312,7 @@ snapshots: transitivePeerDependencies: - supports-color - hast-util-to-html@9.0.2: + hast-util-to-html@9.0.3: dependencies: '@types/hast': 3.0.4 '@types/unist': 3.0.3 @@ -13996,7 +13989,7 @@ snapshots: dependencies: chalk: 5.3.0 commander: 11.1.0 - debug: 4.3.4 + debug: 4.3.4(supports-color@8.1.1) execa: 8.0.1 lilconfig: 3.0.0 listr2: 8.0.0 @@ -15124,10 +15117,6 @@ snapshots: node-domexception@1.0.0: {} - node-fetch@2.7.0: - dependencies: - whatwg-url: 5.0.0 - node-fetch@2.7.0(encoding@0.1.13): dependencies: whatwg-url: 5.0.0 @@ -16208,7 +16197,7 @@ snapshots: shikiji@0.6.10: dependencies: - hast-util-to-html: 9.0.2 + hast-util-to-html: 9.0.3 side-channel@1.0.4: dependencies: @@ -17102,14 +17091,14 @@ snapshots: - utf-8-validate - zod - viem@2.21.3(typescript@5.0.4): + viem@2.21.3(typescript@5.0.4)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 '@noble/curves': 1.4.0 '@noble/hashes': 1.4.0 '@scure/bip32': 1.4.0 '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.0.4) + abitype: 1.0.5(typescript@5.0.4)(zod@3.23.8) isows: 1.0.4(ws@8.17.1) webauthn-p256: 0.0.5 ws: 8.17.1 @@ -17120,24 +17109,6 @@ snapshots: - utf-8-validate - zod - viem@2.21.3(typescript@5.3.3): - dependencies: - '@adraffy/ens-normalize': 1.10.0 - '@noble/curves': 1.4.0 - '@noble/hashes': 1.4.0 - '@scure/bip32': 1.4.0 - '@scure/bip39': 1.4.0 - abitype: 1.0.5(typescript@5.3.3) - isows: 1.0.4(ws@8.17.1) - webauthn-p256: 0.0.5 - ws: 8.17.1 - optionalDependencies: - typescript: 5.3.3 - transitivePeerDependencies: - - bufferutil - - utf-8-validate - - zod - viem@2.21.3(typescript@5.3.3)(zod@3.23.8): dependencies: '@adraffy/ens-normalize': 1.10.0 From af87c6826a4e986ce1e23d4770b0a9a003292975 Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Wed, 9 Oct 2024 17:29:03 -0400 Subject: [PATCH 22/29] update drizzle kit in example --- ...tula.sql => 0000_glamorous_fallen_one.sql} | 2 +- .../migrations/meta/0000_snapshot.json | 5 ++-- .../migrations/meta/_journal.json | 4 ++-- examples/feature-api-functions/package.json | 2 +- pnpm-lock.yaml | 24 +++++++++++++++++-- 5 files changed, 29 insertions(+), 8 deletions(-) rename examples/feature-api-functions/migrations/{0000_equal_tarantula.sql => 0000_glamorous_fallen_one.sql} (83%) diff --git a/examples/feature-api-functions/migrations/0000_equal_tarantula.sql b/examples/feature-api-functions/migrations/0000_glamorous_fallen_one.sql similarity index 83% rename from examples/feature-api-functions/migrations/0000_equal_tarantula.sql rename to examples/feature-api-functions/migrations/0000_glamorous_fallen_one.sql index 38cc0275c..27aad0c5f 100644 --- a/examples/feature-api-functions/migrations/0000_equal_tarantula.sql +++ b/examples/feature-api-functions/migrations/0000_glamorous_fallen_one.sql @@ -2,5 +2,5 @@ CREATE SCHEMA "offchain"; --> statement-breakpoint CREATE TABLE IF NOT EXISTS "offchain"."metadata" ( "id" serial PRIMARY KEY NOT NULL, - "account" "bytea" NOT NULL + "account" text NOT NULL ); diff --git a/examples/feature-api-functions/migrations/meta/0000_snapshot.json b/examples/feature-api-functions/migrations/meta/0000_snapshot.json index 59018c761..2f4cad901 100644 --- a/examples/feature-api-functions/migrations/meta/0000_snapshot.json +++ b/examples/feature-api-functions/migrations/meta/0000_snapshot.json @@ -1,5 +1,5 @@ { - "id": "a14201cb-be7c-4893-b690-69665c18479c", + "id": "6011cb22-cfd9-474d-a02b-ba6addfea155", "prevId": "00000000-0000-0000-0000-000000000000", "version": "7", "dialect": "postgresql", @@ -16,7 +16,7 @@ }, "account": { "name": "account", - "type": "bytea", + "type": "text", "primaryKey": false, "notNull": true } @@ -31,6 +31,7 @@ "schemas": { "offchain": "offchain" }, + "sequences": {}, "_meta": { "columns": {}, "schemas": {}, diff --git a/examples/feature-api-functions/migrations/meta/_journal.json b/examples/feature-api-functions/migrations/meta/_journal.json index 67056d876..c7751ec29 100644 --- a/examples/feature-api-functions/migrations/meta/_journal.json +++ b/examples/feature-api-functions/migrations/meta/_journal.json @@ -5,8 +5,8 @@ { "idx": 0, "version": "7", - "when": 1726868577670, - "tag": "0000_equal_tarantula", + "when": 1728509311024, + "tag": "0000_glamorous_fallen_one", "breakpoints": true } ] diff --git a/examples/feature-api-functions/package.json b/examples/feature-api-functions/package.json index d513d8a41..436f16671 100644 --- a/examples/feature-api-functions/package.json +++ b/examples/feature-api-functions/package.json @@ -13,7 +13,7 @@ }, "dependencies": { "@ponder/core": "workspace:*", - "drizzle-kit": "0.22.8", + "drizzle-kit": "0.25.0", "hono": "^4.5.0", "viem": "^2.21.3" }, diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 657c2c4a8..d4ab5bc73 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -142,8 +142,8 @@ importers: specifier: workspace:* version: link:../../packages/core drizzle-kit: - specifier: 0.22.8 - version: 0.22.8 + specifier: 0.25.0 + version: 0.25.0 hono: specifier: ^4.5.0 version: 4.5.0 @@ -1668,6 +1668,9 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@drizzle-team/brocli@0.10.1': + resolution: {integrity: sha512-AHy0vjc+n/4w/8Mif+w86qpppHuF3AyXbcWW+R/W7GNA3F5/p2nuhlkCJaTXSLZheB4l1rtHzOfr9A7NwoR/Zg==} + '@envelop/core@5.0.2': resolution: {integrity: sha512-tVL6OrMe6UjqLosiE+EH9uxh2TQC0469GwF4tE014ugRaDDKKVWwFwZe0TBMlcyHKh5MD4ZxktWo/1hqUxIuhw==} engines: {node: '>=18.0.0'} @@ -1678,9 +1681,11 @@ packages: '@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.11': resolution: {integrity: sha512-FnzU0LyE3ySQk7UntJO4+qIiQgI7KoODnZg5xzXIrFJlKd2P2gwHsHY4927xj9y5PJmJSzULiUCWmv7iWnNa7g==} @@ -4237,6 +4242,10 @@ packages: resolution: {integrity: sha512-VjI4wsJjk3hSqHSa3TwBf+uvH6M6pRHyxyoVbt935GUzP9tUR/BRZ+MhEJNgryqbzN2Za1KP0eJMTgKEPsalYQ==} hasBin: true + drizzle-kit@0.25.0: + resolution: {integrity: sha512-Rcf0nYCAKizwjWQCY+d3zytyuTbDb81NcaPor+8NebESlUz1+9W3uGl0+r9FhU4Qal5Zv9j/7neXCSCe7DHzjA==} + hasBin: true + drizzle-orm@0.34.1: resolution: {integrity: sha512-t+zCwyWWt8xTqtYV4doE/xYmT7hpv1L8pQ66zddEz+3VWyedBBtctjMAp22mAJPfyWurRQXUJ1nrTtqLq+DqNA==} peerDependencies: @@ -9440,6 +9449,8 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 + '@drizzle-team/brocli@0.10.1': {} + '@envelop/core@5.0.2': dependencies: '@envelop/types': 5.0.0 @@ -12136,6 +12147,15 @@ snapshots: transitivePeerDependencies: - supports-color + drizzle-kit@0.25.0: + dependencies: + '@drizzle-team/brocli': 0.10.1 + '@esbuild-kit/esm-loader': 2.6.5 + esbuild: 0.19.11 + esbuild-register: 3.6.0(esbuild@0.19.11) + transitivePeerDependencies: + - supports-color + drizzle-orm@0.34.1(@opentelemetry/api@1.7.0)(@types/better-sqlite3@7.6.10)(@types/pg@8.10.9)(@types/react@18.2.46)(better-sqlite3@11.1.2)(kysely@0.26.3)(pg@8.11.3)(react@18.2.0): optionalDependencies: '@opentelemetry/api': 1.7.0 From 52ba6c819ecb8e5fb0a6b57e7c4adb56c8f9c2f2 Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:38:14 -0400 Subject: [PATCH 23/29] prerelease --- .changeset/curvy-hats-rest.md | 5 +++++ .changeset/pre.json | 6 +++--- packages/core/package.json | 2 +- 3 files changed, 9 insertions(+), 4 deletions(-) create mode 100644 .changeset/curvy-hats-rest.md diff --git a/.changeset/curvy-hats-rest.md b/.changeset/curvy-hats-rest.md new file mode 100644 index 000000000..7a1ef63d4 --- /dev/null +++ b/.changeset/curvy-hats-rest.md @@ -0,0 +1,5 @@ +--- +"@ponder/core": minor +--- + +BREAKING: Migrated `ponder.schema.ts` to use Drizzle table definitions. Migrated indexing store API to be compatible with Drizzle table objects. Read the [migration guide](https://ponder-docs-git-kjs-offchain-ponder-sh.vercel.app) for more details. diff --git a/.changeset/pre.json b/.changeset/pre.json index bcccd2c0f..62454315d 100644 --- a/.changeset/pre.json +++ b/.changeset/pre.json @@ -3,9 +3,9 @@ "tag": "next", "initialVersions": { "@ponder/common": "0.0.0", - "@ponder/core": "0.6.2", - "create-ponder": "0.6.2", - "eslint-config-ponder": "0.6.2", + "@ponder/core": "0.6.7", + "create-ponder": "0.6.7", + "eslint-config-ponder": "0.6.7", "@ponder/utils": "0.2.1" }, "changesets": [] diff --git a/packages/core/package.json b/packages/core/package.json index 6d411b0b7..e9c53bb82 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@ponder/core", - "version": "0.6.3-next.2", + "version": "0.7.0-next.1", "description": "An open-source framework for crypto application backends", "license": "MIT", "type": "module", From 7c6c89f8845e6e035615dbb4ae9f8f16c5dc4d3d Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Wed, 9 Oct 2024 17:38:55 -0400 Subject: [PATCH 24/29] changeset --- .changeset/curvy-hats-rest.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.changeset/curvy-hats-rest.md b/.changeset/curvy-hats-rest.md index 7a1ef63d4..b009f610f 100644 --- a/.changeset/curvy-hats-rest.md +++ b/.changeset/curvy-hats-rest.md @@ -2,4 +2,4 @@ "@ponder/core": minor --- -BREAKING: Migrated `ponder.schema.ts` to use Drizzle table definitions. Migrated indexing store API to be compatible with Drizzle table objects. Read the [migration guide](https://ponder-docs-git-kjs-offchain-ponder-sh.vercel.app) for more details. +BREAKING: Migrated `ponder.schema.ts` to use Drizzle table definitions. Migrated indexing store API to be compatible with Drizzle table objects. Read the [migration guide](https://ponder-docs-git-kjs-offchain-ponder-sh.vercel.app/docs/migration-guide#070) for more details. From 255c72a5d574b5ac54b4da051c95f234a02d30df Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Wed, 9 Oct 2024 20:03:16 -0400 Subject: [PATCH 25/29] docs --- docs/pages/docs/migration-guide.mdx | 490 ++++++++++++++++++---------- docs/styles.css | 5 + 2 files changed, 331 insertions(+), 164 deletions(-) diff --git a/docs/pages/docs/migration-guide.mdx b/docs/pages/docs/migration-guide.mdx index 3b1d55111..207ea584b 100644 --- a/docs/pages/docs/migration-guide.mdx +++ b/docs/pages/docs/migration-guide.mdx @@ -8,168 +8,245 @@ import Architecture from "../../public/architecture.svg"; # Migration guide -## 0.7.0 +## 0.7.0-next.1 -This release introduces a new schema defintion and database API, and natively supports offchain data. +This release migrates to a new schema definition and database API. It also adds native support for offchain data. -### Drizzle schema definition +The `0.7.0` release contains several breaking changes. We recommend creating a new git branch for the migration. -1. Import `onchainTable` and database helper functions from `@ponder/core/db` -2. Declare tables with `onchainTable`, -3. Export tables from `ponder.schema.ts` -4. Specify primary key columns with `.primaryKey()` -5. Specify not null columns with `.notNull()` -```ts filename="ponder.schema.ts" -import { onchainTable, text, integer } from "@ponder/core/db"; +### Install & run codegen -export const author = onchainTable("author", { - name: text("name").primaryKey(), - age: integer("age").notNull(), -}); +{/* prettier-ignore */} + + +```bash filename="shell" +pnpm add @ponder/core@0.7.0-next.1 ``` -6. `evmHex` and `evmBigint` are special columns exported from `@ponder/core/db` -```ts filename="ponder.schema.ts" -import { onchainTable, evmHex, evmBigint } from "@ponder/core/db"; + + +```bash filename="shell" +yarn add @ponder/core@0.7.0-next.1 +``` + + +```bash filename="shell" +npm add @ponder/core@0.7.0-next.1 +``` + + -export const account = onchainTable("account", { - address: evmHex("address").primaryKey(), - balance: evmBigint("balance").notNull(), -}); +To ensure strong type safety during the migration, regenerate `ponder-env.d.ts`. + +{/* prettier-ignore */} + + +```bash filename="shell" +pnpm codegen +``` + + +```bash filename="shell" +yarn codegen +``` + + +```bash filename="shell" +npm run codegen ``` + + -#### Example +### Migrate `ponder.schema.ts` + +Here's a table defined with the new schema definition API, which uses [Drizzle](https://orm.drizzle.team/docs/overview) under the hood. + +```ts filename="ponder.schema.ts (after)" +import { onchainTable } from "@ponder/core/db"; + +export const accounts = onchainTable("account", (p) => ({ + address: p.evmHex().primaryKey(), + daiBalance: p.evmBigint().notNull(), + isAdmin: p.boolean().notNull(), + graffiti: p.string(), +})); +``` + +Key changes: + +1. Declare tables with the `onchainTable` function exported from `@ponder/core` +2. Prefer pluralized table names +3. Export all table objects from `ponder.schema.ts` +4. Use `.primaryKey()` to mark the primary key column +5. Columns are nullable by default, use `.notNull()` to add the constraint +6. `p.hex()` and `p.bigint()` renamed to `p.evmHex()` and `p.evmBigint()` + +The new `onchainTable` function adds support for several new capabilities. + +- Custom primary key column name (other than `id`) +- Composite primary keys +- Default column values +- Serial (autoincrementing) column types + +Here's a more advanced example with indexes, a serial column, and a composite primary key. -
```ts filename="ponder.schema.ts" -import { createSchema } from "@ponder/core"; - -export default createSchema((p) => ({ - Account: p.createTable({ - id: p.hex(), - daiBalance: p.bigint(), - totalUsdValue: p.float(), - lastActiveAt: p.int(), - isAdmin: p.boolean(), - graffiti: p.string(), - extra: p.json(), +import { onchainTable, index, primaryKey } from "@ponder/core/db"; + +export const transferEvents = onchainTable( + "transfer_event", + (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + from: t.evmHex().notNull(), + to: t.evmHex().notNull(), + }), + (table) => ({ + fromIdx: index().on(table.from), + }) +); + +export const allowance = onchainTable( + "allowance", + (t) => ({ + owner: t.evmHex(), + spender: t.evmHex(), + amount: t.evmBigint().notNull(), }), + (table) => ({ + pk: primaryKey({ columns: [table.owner, table.spender] }), + }) +); + +export const approvalEvent = onchainTable("approval_event", (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + owner: t.evmHex().notNull(), + spender: t.evmHex().notNull(), })); ``` -```ts filename="ponder.schema.ts" -import { - boolean, - evmBigint, - evmHex, - integer, - json, - onchainTable, - real, - string, -} from "@ponder/core/db"; +### Migrate indexing functions -export const account = onchainTable("account", { - address: evmHex("address"), - daiBalance: evmBigint("dai_balance"), - totalUsdValue: real("total_usd_value"), - lastActiveAt: integer("last_active_at"), - isAdmin: boolean("is_admin"), - graffiti: text("grafitti"), - extra: json("extra"), +This release updates the indexing function database API to offer a unified SQL experience based on Drizzle. + +Here's an indexing function defined with the new API, which uses the table objects exported from `ponder.schema.ts`. + +{/* prettier-ignore */} +```ts filename="src/index.ts" +import { ponder } from "@/generated"; +import { account } from "../ponder.schema"; + +ponder.on("ERC20:Transfer", async ({ event, context }) => { + await context.db + .upsert(account, { address: event.args.from }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance - event.args.amount, + })); }); ``` -
-### Updated database API +Key changes: -In order to provide a unified developer experience, the database API (context.db) has been updated. +1. Transition from ORM pattern `db.Account.create({ ... }){:ts}` to query builder pattern `db.insert(accounts, { ... }){:ts}` +2. Import table objects from `ponder.schema.ts` +3. Replace `findMany` with `db.sql.select(...)` or `db.sql.query(...)` -1. Run `pnpm codegen` to update types -2. Import tables from `ponder.schema.ts` -```ts filename="src/index.ts" -import { account } from "../ponder.schema"; +Here is a simple migration example to familiarize yourself with the API. + +
+ +```ts filename="src/index.ts (<=0.6)" +// Create a single allowance +await context.db.Allowance.create({ + id: event.log.id, + data: { + owner: event.args.owner, + spender: event.args.spender, + amount: event.args.amount, + }, +}); ``` -3. Replace `.findUnique()` with `.find()` -```diff filename="src/index.ts" -- await context.db.Account.findUnique({ id: event.args.from }); -+ await context.db.find(account, { address: event.args.from }); -``` -4. Replace `.create()` with `.insert()` -```diff filename="src/index.ts" -- await context.db.Account.create({ -- id: event.args.from, -- data: { balance: 0n }, -- }); -+ await context.db -+ .insert(account) -+ .values({ id: event.args.from, balance: 0n }); -``` - -5. Replace `.createMany()` with `.insert()` -```diff filename="src/index.ts" -- await context.db.Account.createMany({ -- data: [ -- { id : event.args.from, balance: 0n}, -- { id : event.args.to, balance: 0n}, -- ], -- }); -+ await context.db -+ .insert(account) -+ .values([ -+ { id : event.args.from, balance: 0n}, -+ { id : event.args.to, balance: 0n}, -+ ]); -``` - -6. Update `.update()` -```diff filename="src/index.ts" -- await context.db.Account.update({ -- id: event.args.from, -- data: ({current}) => ({ balance: current.balance + 100n }), -- }); -+ await context.db -+ .update(account, { address: event.args.from }) -+ .set((row) => ({ balance: row.balance + 100n })); -``` - -7. Update `.upsert()` -```diff filename="src/index.ts" -- await context.db.Account.upsert({ -- id: event.args.from, -- create: { balance: 0n }, -- update: ({current}) => ({ balance: current.balance + 100n }), -- }); -+ await context.db -+ .upsert(account, { address: event.args.from }) -+ .insert({ balance: 0n }) -+ .update((row) => ({ balance: row.balance + 100n })); -``` - -8. Update `.delete()` -```diff filename="src/index.ts" -- await context.db.Account.delete({ id: event.args.from }); -+ await context.db.delete(account, { address: event.args.from }); -``` - -9. Use low-level SQL client for advanced queries - -`context.db.sql` provides a drizzle interface which can be used to make arbitrary sql queries. -```ts filename="src/index.ts" -import { desc } from "@ponder/core/db"; -import { account } from "../ponder.schema"; -ponder.on("...", ({ event, context }) => { - const result = await context.db.sql - .select() - .from(account) - .orderBy(desc(account.balance)) - .limit(1); +{/* prettier-ignore */} +```ts filename="src/index.ts (0.7)" +import { allowance } from "../ponder.schema"; + +// Create a single allowance +await context.db + .insert(allowance) + .values({ + id: event.log.id, + owner: event.args.owner, + spender: event.args.spender, + amount: event.args.amount, + }); +``` + +
+ +Here is a reference for how to migrate each method. + +```ts filename="src/index.ts" +// create -> insert +await context.db.Account.create({ + id: event.args.from, + data: { balance: 0n }, +}); +await context.db.insert(account).values({ id: event.args.from, balance: 0n }); + +// createMany -> insert +await context.db.Account.createMany({ + data: [ + { id: event.args.from, balance: 0n }, + { id: event.args.to, balance: 0n }, + ], +}); +await context.db.insert(account).values([ + { id: event.args.from, balance: 0n }, + { id: event.args.to, balance: 0n }, +]); + +// findUnique -> find +await context.db.Account.findUnique({ id: event.args.from }); +await context.db.find(account, { address: event.args.from }); + +// update +await context.db.Account.update({ + id: event.args.from, + data: ({ current }) => ({ balance: current.balance + 100n }), }); +await context.db + .update(account, { address: event.args.from }) + .set((row) => ({ balance: row.balance + 100n })); + +// upsert +await context.db.Account.upsert({ + id: event.args.from, + create: { balance: 0n }, + update: ({ current }) => ({ balance: current.balance + 100n }), +}); +await context.db + .upsert(account, { address: event.args.from }) + .insert({ balance: 0n }) + .update((row) => ({ balance: row.balance + 100n })); + +// delete +await context.db.Account.delete({ id: event.args.from }); +await context.db.delete(account, { address: event.args.from }); + +// findMany -> select +await context.db.Account.findMany({ where: { balance: { gt: 100n } } }); +await context.db.sql.select().from(account).where(eq(account.balance, 100n)); ``` -#### Example +Finally, another migration example for an ERC20 Transfer indexing function using `upsert`.
+ +{/* prettier-ignore */} ```ts filename="src/index.ts" import { ponder } from "@/generated"; @@ -189,6 +266,7 @@ ponder.on("ERC20:Transfer", async ({ event, context }) => { }); ``` +{/* prettier-ignore */} ```ts filename="src/index.ts" import { ponder } from "@/generated"; import { account } from "../ponder.schema"; @@ -202,23 +280,43 @@ ponder.on("ERC20:Transfer", async ({ event, context }) => { })); }); ``` +
+**Direct SQL API** + +The `context.db.sql` interface replaces the rigid `findMany` method and supports any valid SQL `select` query. + +```ts filename="src/index.ts" +import { desc } from "@ponder/core/db"; +import { account } from "../ponder.schema"; + +ponder.on("...", ({ event, context }) => { + const result = await context.db.sql + .select() + .from(account) + .orderBy(desc(account.balance)) + .limit(1); +}); +``` + ### Offchain Tables -- Offchain tables are different from onchain tables because they: - - are not automatically created or dropped - - are not affected by reorgs -- Offchain tables can be written in api function, but can't be written in indexing functions +This release adds support for offchain tables. These are "normal" tables that persist across reloads and redeployments and have no special reorg handling properties. + +You can write to offchain tables in api functions and read from them in indexing functions. | | onchain tables | offchain tables | -|--------------------|----------------|-----------------| -| indexing functions | read + write | read | -| api functions | read | read + write | +| ------------------ | -------------- | --------------- | +| indexing functions | read + write | read | +| api functions | read | read + write | +Use the `offchainTable()` function to define offchain tables in `ponder.schema.ts`. + + +#### Add an offchain table -1. Define offchain tables with `offchainTable()` in `ponder.schema.ts` ```ts filename="ponder.schema.ts" import { offchainTable, text, integer } from "@ponder/core/db"; @@ -227,31 +325,97 @@ export const author = offchainTable("author", { age: integer("age").notNull(), }); ``` -2. Use `offchainSchema()` to create offchain tables in a specific schema -```ts filename="ponder.schema.ts" -import { offchainSchema, serial, evmHex } from "@ponder/core/db"; -export const offchain = offchainSchema("offchain"); +#### Install `drizzle-kit` -export const metadata = offchain.table("metadata", { - id: serial("id").primaryKey(), - authors: - account: evmHex("account").notNull(), -}); +Unlike onchain tables, offchain tables are not created automatically. To create them, install `drizzle-kit` run the migration generation script. + +{/* prettier-ignore */} + + +```bash filename="shell" +pnpm add drizzle-kit@latest +``` + + +```bash filename="shell" +yarn add drizzle-kit@latest +``` + + +```bash filename="shell" +npm add drizzle-kit@latest ``` -3. Add `drizzle-kit` as a dependency -4. Add migration generation script to `package.json` + + + ```json filename="package.json" -{ +{ "scripts": { "generate": "drizzle-kit generate --dialect postgresql --schema ./ponder.schema.ts --out migrations" } } ``` -5. Run `pnpm generate` to generate migrations for offchain tables -6. Run `pnpm dev` or `pnpm start` to automatically apply migrations -#### Example +{/* prettier-ignore */} + + +```bash filename="shell" +pnpm generate +``` + + +```bash filename="shell" +yarn generate +``` + + +```bash filename="shell" +npm run generate +``` + + + +#### Run migrations + +Start the dev server to apply any pending migrations found in the `migrations/` directory. + +{/* prettier-ignore */} + + +```bash filename="shell" +pnpm dev +``` + + +```bash filename="shell" +yarn dev +``` + + +```bash filename="shell" +npm run dev +``` + + + + + +By default, offchain tables are created in the `public` schema. You can specify a different schema using the `offchainSchema()` function. + +```ts filename="ponder.schema.ts" {3} +import { offchainSchema, serial, evmHex } from "@ponder/core/db"; + +export const offchain = offchainSchema("offchain"); + +export const metadata = offchain.table("metadata", { + id: serial("id").primaryKey(), + authors: + account: evmHex("account").notNull(), +}); +``` + +Here's a complete example that uses an offchain table to store user metadata.
```ts filename="ponder.schema.ts" @@ -259,7 +423,7 @@ import { boolean, evmBigint, evmHex, - offchainSchema, + offchainTable, onchainTable, serial, } from "@ponder/core/db"; @@ -270,7 +434,7 @@ export const account = onchainTable("account", { isOwner: boolean("is_owner").notNull(), }); -export const metadata = schema.table("metadata", { +export const metadata = offchainTable("metadata", { id: serial("id").primaryKey(), account: evmHex("account").notNull(), }); @@ -296,10 +460,7 @@ ponder.get("/user-balances", async (c) => { balance: account.balance, }) .from(account) - .innerJoin( - metadata, - eq(account.address, metadata.account), - ) + .innerJoin(metadata, eq(account.address, metadata.account)) .orderBy(desc(account.balance)) .limit(10); @@ -400,6 +561,7 @@ Ponder now creates a table in the `public` schema for each table in `ponder.sche Isolation while running multiple Ponder instances against the same database also works differently. Before, Ponder used a schema with a pseudorandom name if the desired schema was in use. Now, Ponder will fail on startup with an error if it cannot acquire a lock on the desired schema. This also changes the zero-downtime behavior on platforms like Railway. For more information on how this works in `0.4`, please reference: + - [Direct SQL](/docs/query/direct-sql) - [Zero-downtime deployments](/docs/production/zero-downtime) diff --git a/docs/styles.css b/docs/styles.css index 985a8ecc4..fb2999f7e 100644 --- a/docs/styles.css +++ b/docs/styles.css @@ -127,3 +127,8 @@ ), url("/hero.png") lightgray 50% / cover no-repeat; } + +/* MISC NEXTRA OVERRIDES */ +._list-decimal, ._list-disc { + margin-top: 12px; +} \ No newline at end of file From 1ad4e720ec3dccc6cf36d929cf29450c0b1de04c Mon Sep 17 00:00:00 2001 From: Kyle Scott Date: Thu, 17 Oct 2024 15:40:22 -0400 Subject: [PATCH 26/29] bug fixes --- examples/with-trpc/ponder/ponder-env.d.ts | 5 +- examples/with-trpc/ponder/ponder.schema.ts | 79 +++++++--------- examples/with-trpc/ponder/src/api/index.ts | 11 +-- examples/with-trpc/ponder/src/index.ts | 102 +++++++++------------ packages/core/src/common/codegen.ts | 1 + packages/core/src/database/index.ts | 10 +- packages/core/src/types/db.ts | 2 +- packages/core/src/types/virtual.ts | 6 +- 8 files changed, 97 insertions(+), 119 deletions(-) diff --git a/examples/with-trpc/ponder/ponder-env.d.ts b/examples/with-trpc/ponder/ponder-env.d.ts index 03126bf92..e7f300973 100644 --- a/examples/with-trpc/ponder/ponder-env.d.ts +++ b/examples/with-trpc/ponder/ponder-env.d.ts @@ -7,7 +7,7 @@ declare module "@/generated" { import type { Virtual } from "@ponder/core"; type config = typeof import("./ponder.config.ts").default; - type schema = typeof import("./ponder.schema.ts").default; + type schema = typeof import("./ponder.schema.ts"); export const ponder: Virtual.Registry; @@ -21,8 +21,7 @@ declare module "@/generated" { schema, name >; - export type ApiContext = Virtual.Drizzle; + export type ApiContext = Virtual.ApiContext; export type IndexingFunctionArgs = Virtual.IndexingFunctionArgs; - export type Schema = Virtual.Schema; } diff --git a/examples/with-trpc/ponder/ponder.schema.ts b/examples/with-trpc/ponder/ponder.schema.ts index a722500c6..64386b24d 100644 --- a/examples/with-trpc/ponder/ponder.schema.ts +++ b/examples/with-trpc/ponder/ponder.schema.ts @@ -1,50 +1,41 @@ -import { createSchema } from "@ponder/core"; +import { index, onchainTable, primaryKey } from "@ponder/core/db"; -export default createSchema((p) => ({ - Account: p.createTable({ - id: p.hex(), - balance: p.bigint(), - isOwner: p.boolean(), +export const account = onchainTable("account", (t) => ({ + address: t.evmHex().primaryKey(), + balance: t.evmBigint().notNull(), + isOwner: t.boolean().notNull(), +})); - allowances: p.many("Allowance.ownerId"), - approvalOwnerEvents: p.many("ApprovalEvent.ownerId"), - approvalSpenderEvents: p.many("ApprovalEvent.spenderId"), - transferFromEvents: p.many("TransferEvent.fromId"), - transferToEvents: p.many("TransferEvent.toId"), +export const allowance = onchainTable( + "allowance", + (t) => ({ + owner: t.evmHex(), + spender: t.evmHex(), + amount: t.evmBigint().notNull(), }), - Allowance: p.createTable({ - id: p.string(), - amount: p.bigint(), - - ownerId: p.hex().references("Account.id"), - spenderId: p.hex().references("Account.id"), - - owner: p.one("ownerId"), - spender: p.one("spenderId"), + (table) => ({ + pk: primaryKey({ columns: [table.owner, table.spender] }), }), - TransferEvent: p.createTable( - { - id: p.string(), - amount: p.bigint(), - timestamp: p.int(), - - fromId: p.hex().references("Account.id"), - toId: p.hex().references("Account.id"), - - from: p.one("fromId"), - to: p.one("toId"), - }, - { fromIdIndex: p.index("fromId") }, - ), - ApprovalEvent: p.createTable({ - id: p.string(), - amount: p.bigint(), - timestamp: p.int(), - - ownerId: p.hex().references("Account.id"), - spenderId: p.hex().references("Account.id"), - - owner: p.one("ownerId"), - spender: p.one("spenderId"), +); + +export const transferEvent = onchainTable( + "transfer_event", + (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + from: t.evmHex().notNull(), + to: t.evmHex().notNull(), + }), + (table) => ({ + fromIdx: index("from_index").on(table.from), }), +); + +export const approvalEvent = onchainTable("approval_event", (t) => ({ + id: t.serial().primaryKey(), + amount: t.evmBigint().notNull(), + timestamp: t.integer().notNull(), + owner: t.evmHex().notNull(), + spender: t.evmHex().notNull(), })); diff --git a/examples/with-trpc/ponder/src/api/index.ts b/examples/with-trpc/ponder/src/api/index.ts index 709808d87..4da13b854 100644 --- a/examples/with-trpc/ponder/src/api/index.ts +++ b/examples/with-trpc/ponder/src/api/index.ts @@ -1,20 +1,19 @@ import { type ApiContext, ponder } from "@/generated"; import { trpcServer } from "@hono/trpc-server"; -import { eq } from "@ponder/core"; +import { eq } from "@ponder/core/db"; import { initTRPC } from "@trpc/server"; import type { Address } from "viem"; import { z } from "zod"; +import * as schema from "../../ponder.schema"; const t = initTRPC.context().create(); const appRouter = t.router({ hello: t.procedure.input(z.string()).query(async ({ input, ctx }) => { - const { Account } = ctx.tables; - const account = await ctx.db - .select({ balance: Account.balance }) - .from(Account) - .where(eq(Account.id, input as Address)) + .select({ balance: schema.account.balance }) + .from(schema.account) + .where(eq(schema.account.address, input as Address)) .limit(1); if (account.length === 0) return null; diff --git a/examples/with-trpc/ponder/src/index.ts b/examples/with-trpc/ponder/src/index.ts index 16bf33aa7..552d35b68 100644 --- a/examples/with-trpc/ponder/src/index.ts +++ b/examples/with-trpc/ponder/src/index.ts @@ -1,70 +1,50 @@ import { ponder } from "@/generated"; +import { + account, + allowance, + approvalEvent, + transferEvent, +} from "../ponder.schema"; ponder.on("ERC20:Transfer", async ({ event, context }) => { - const { Account, TransferEvent } = context.db; - - // Create an Account for the sender, or update the balance if it already exists. - await Account.upsert({ - id: event.args.from, - create: { - balance: BigInt(0), - isOwner: false, - }, - update: ({ current }) => ({ - balance: current.balance - event.args.amount, - }), - }); - - // Create an Account for the recipient, or update the balance if it already exists. - await Account.upsert({ - id: event.args.to, - create: { - balance: event.args.amount, - isOwner: false, - }, - update: ({ current }) => ({ - balance: current.balance + event.args.amount, - }), - }); - - // Create a TransferEvent. - await TransferEvent.create({ - id: event.log.id, - data: { - fromId: event.args.from, - toId: event.args.to, - amount: event.args.amount, - timestamp: Number(event.block.timestamp), - }, + await context.db + .upsert(account, { address: event.args.from }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance - event.args.amount, + })); + + await context.db + .upsert(account, { address: event.args.to }) + .insert({ balance: 0n, isOwner: false }) + .update((row) => ({ + balance: row.balance + event.args.amount, + })); + + // add row to "transfer_event". + await context.db.insert(transferEvent).values({ + amount: event.args.amount, + timestamp: Number(event.block.timestamp), + from: event.args.from, + to: event.args.to, }); }); ponder.on("ERC20:Approval", async ({ event, context }) => { - const { Allowance, ApprovalEvent } = context.db; - - const allowanceId = `${event.args.owner}-${event.args.spender}`; - - // Create or update the Allowance. - await Allowance.upsert({ - id: allowanceId, - create: { - ownerId: event.args.owner, - spenderId: event.args.spender, - amount: event.args.amount, - }, - update: { - amount: event.args.amount, - }, - }); - - // Create an ApprovalEvent. - await ApprovalEvent.create({ - id: event.log.id, - data: { - ownerId: event.args.owner, - spenderId: event.args.spender, - amount: event.args.amount, - timestamp: Number(event.block.timestamp), - }, + // upsert "allowance". + await context.db + .upsert(allowance, { + spender: event.args.spender, + owner: event.args.owner, + }) + .insert({ amount: event.args.amount }) + .update({ amount: event.args.amount }); + + // add row to "approval_event". + await context.db.insert(approvalEvent).values({ + amount: event.args.amount, + timestamp: Number(event.block.timestamp), + owner: event.args.owner, + spender: event.args.spender, }); }); diff --git a/packages/core/src/common/codegen.ts b/packages/core/src/common/codegen.ts index 1332ae41a..f5ed59d34 100644 --- a/packages/core/src/common/codegen.ts +++ b/packages/core/src/common/codegen.ts @@ -25,6 +25,7 @@ declare module "@/generated" { schema, name >; + export type ApiContext = Virtual.ApiContext; export type IndexingFunctionArgs = Virtual.IndexingFunctionArgs; } diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index c7f4160d3..e3d301e48 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -911,7 +911,7 @@ export const createDatabase = async (args: { for (const tableName of sqlTableNames) { await sql .ref( - `DROP TRIGGER IF EXISTS ${tableName}_reorg ON "${namespace}"."${tableName}"`, + `DROP TRIGGER IF EXISTS "${tableName}_reorg" ON "${namespace}"."${tableName}"`, ) .execute(tx); } @@ -966,7 +966,11 @@ export const createDatabase = async (args: { .ifExists() .execute(); - await tx.schema.dropTable(tableName).ifExists().execute(); + await tx.schema + .dropTable(tableName) + .ifExists() + .cascade() + .execute(); args.common.logger.debug({ service: "database", @@ -1107,7 +1111,7 @@ export const createDatabase = async (args: { const columns = getTableColumns(args.schema[jsTableName]! as PgTable); const columnNames = Object.values(columns).map( - (column) => column.name, + (column) => `"${column.name}"`, ); await sql diff --git a/packages/core/src/types/db.ts b/packages/core/src/types/db.ts index a8451a135..566a50262 100644 --- a/packages/core/src/types/db.ts +++ b/packages/core/src/types/db.ts @@ -103,7 +103,7 @@ export type Db = { /** * Access the raw drizzle object */ - sql: Pick, "select" | "query">; + sql: Drizzle; }; type InferPrimaryKey< diff --git a/packages/core/src/types/virtual.ts b/packages/core/src/types/virtual.ts index 7d442546f..8dfc0194e 100644 --- a/packages/core/src/types/virtual.ts +++ b/packages/core/src/types/virtual.ts @@ -6,7 +6,7 @@ import type { SafeEventNames, SafeFunctionNames, } from "@/config/utilityTypes.js"; -import type { Schema } from "@/drizzle/index.js"; +import type { Drizzle, Schema } from "@/drizzle/index.js"; import type { ReadOnlyClient } from "@/indexing/ponderActions.js"; import type { Block, @@ -241,4 +241,8 @@ export namespace Virtual { ) => Promise | void, ) => void; } & ApiRegistry; + + export type ApiContext = { + db: Drizzle; + }; } From 308f9abd5f74ee6d375326e62cbef5fb3e70c547 Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Thu, 17 Oct 2024 17:07:51 -0400 Subject: [PATCH 27/29] prerelease --- packages/core/package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/packages/core/package.json b/packages/core/package.json index e9c53bb82..57ecc46e4 100644 --- a/packages/core/package.json +++ b/packages/core/package.json @@ -1,6 +1,6 @@ { "name": "@ponder/core", - "version": "0.7.0-next.1", + "version": "0.7.0-next.2", "description": "An open-source framework for crypto application backends", "license": "MIT", "type": "module", From a598f915a05fd9e2e5c835374a04724067f12b5e Mon Sep 17 00:00:00 2001 From: 3commascapital <90629478+3commascapital@users.noreply.github.com> Date: Fri, 18 Oct 2024 14:36:14 -0500 Subject: [PATCH 28/29] Fixup types and metrics (#1144) * Fixup types and metrics * Uses kysely pglite as dialect provider * Convert sqlite to pglite * tweaks * most tests working * type fixes --------- Co-authored-by: typedarray <90073088+0xOlias@users.noreply.github.com> --- .github/CONTRIBUTING.md | 2 +- .github/workflows/main.yml | 4 +- .github/workflows/windows.yml | 4 +- .../core/src/_test/e2e/erc20/ponder.config.ts | 2 +- .../src/_test/e2e/factory/ponder.config.ts | 2 +- packages/core/src/_test/setup.ts | 74 +++--- packages/core/src/bin/commands/serve.ts | 2 +- packages/core/src/bin/utils/run.ts | 2 +- packages/core/src/bin/utils/runServer.ts | 2 +- .../build/configAndIndexingFunctions.test.ts | 16 +- .../src/build/configAndIndexingFunctions.ts | 4 +- packages/core/src/common/metrics.ts | 30 ++- packages/core/src/common/options.ts | 2 +- packages/core/src/config/database.ts | 9 +- packages/core/src/database/index.test.ts | 102 ++------ packages/core/src/database/index.ts | 233 ++++++++---------- packages/core/src/drizzle/runtime.ts | 8 +- .../core/src/indexing-store/store.bench.ts | 3 +- .../src/indexing-store/utils/filter.test.ts | 8 +- packages/core/src/utils/pg.ts | 6 - packages/core/src/utils/pglite.ts | 18 ++ 21 files changed, 246 insertions(+), 287 deletions(-) create mode 100644 packages/core/src/utils/pglite.ts diff --git a/.github/CONTRIBUTING.md b/.github/CONTRIBUTING.md index 17a4d6f10..26769b79d 100644 --- a/.github/CONTRIBUTING.md +++ b/.github/CONTRIBUTING.md @@ -119,7 +119,7 @@ When adding new features or fixing bugs, it's important to add test cases to cov ### Run tests against Postgres -By default, the test suite runs against in-memory SQLite databases which mimic Ponder development environments. Unless you are specifically testing Postgres behavior, you don't need to run tests against Postgres locally and can instead rely on CI to catch any regressions. +By default, the test suite runs against in-memory PGlite databases which mimic Ponder development environments. Unless you are specifically testing Postgres behavior, you don't need to run tests against Postgres locally and can instead rely on CI to catch any regressions. To run the test suite against Postgres, set the `DATABASE_URL` env var in `packages/core/.env.local`. diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index d8bf7cdea..405dea166 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -53,7 +53,7 @@ jobs: strategy: fail-fast: false matrix: - database: [Postgres, SQLite] + database: [Postgres, PGlite] steps: - name: Clone repository uses: actions/checkout@v4 @@ -112,7 +112,7 @@ jobs: with: cache: pnpm node-version: 20 - + - name: Install Bun if: ${{ matrix.runtime-version == 'Bun' }} uses: oven-sh/setup-bun@v1 diff --git a/.github/workflows/windows.yml b/.github/workflows/windows.yml index 4e70bfb1e..d2e69d275 100644 --- a/.github/workflows/windows.yml +++ b/.github/workflows/windows.yml @@ -13,7 +13,7 @@ jobs: strategy: fail-fast: false matrix: - database: [Postgres, SQLite] + database: [Postgres, PGLite] steps: - name: Clone repository uses: actions/checkout@v4 @@ -48,4 +48,4 @@ jobs: - name: Test run: pnpm --filter create-ponder test env: - ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} \ No newline at end of file + ETHERSCAN_API_KEY: ${{ secrets.ETHERSCAN_API_KEY }} diff --git a/packages/core/src/_test/e2e/erc20/ponder.config.ts b/packages/core/src/_test/e2e/erc20/ponder.config.ts index d641e01b3..ce217d77e 100644 --- a/packages/core/src/_test/e2e/erc20/ponder.config.ts +++ b/packages/core/src/_test/e2e/erc20/ponder.config.ts @@ -13,7 +13,7 @@ function getDatabase() { const connectionString = databaseUrl.toString(); return { kind: "postgres", connectionString } as const; } else { - return { kind: "sqlite" } as const; + return { kind: "pglite" } as const; } } diff --git a/packages/core/src/_test/e2e/factory/ponder.config.ts b/packages/core/src/_test/e2e/factory/ponder.config.ts index 6438a8608..875fc0392 100644 --- a/packages/core/src/_test/e2e/factory/ponder.config.ts +++ b/packages/core/src/_test/e2e/factory/ponder.config.ts @@ -13,7 +13,7 @@ function getDatabase() { const connectionString = databaseUrl.toString(); return { kind: "postgres", connectionString } as const; } else { - return { kind: "sqlite" } as const; + return { kind: "pglite" } as const; } } diff --git a/packages/core/src/_test/setup.ts b/packages/core/src/_test/setup.ts index 7db7aa8ac..820d50e11 100644 --- a/packages/core/src/_test/setup.ts +++ b/packages/core/src/_test/setup.ts @@ -19,13 +19,19 @@ import type { IndexingStore, ReadonlyStore } from "@/indexing-store/store.js"; import type { Schema } from "@/schema/common.js"; import { type SyncStore, createSyncStore } from "@/sync-store/index.js"; import type { BlockSource, ContractSource, LogFactory } from "@/sync/source.js"; +import { createPglite } from "@/utils/pglite.js"; import type { RequestQueue } from "@/utils/requestQueue.js"; import pg from "pg"; import { rimrafSync } from "rimraf"; import type { Address } from "viem"; -import type { TestContext } from "vitest"; +import { type TestContext, afterAll } from "vitest"; import { deploy, simulate } from "./simulate.js"; -import { getConfig, getNetworkAndSources, testClient } from "./utils.js"; +import { + getConfig, + getNetworkAndSources, + poolId, + testClient, +} from "./utils.js"; declare module "vitest" { export interface TestContext { @@ -66,50 +72,51 @@ export function setupCommon(context: TestContext) { }; } +const pgliteDataDirs = new Map(); +afterAll(() => pgliteDataDirs.forEach((dataDir) => rimrafSync(dataDir))); + /** * Sets up an isolated database on the test context. * - * If `process.env.DATABASE_URL` is set, creates a new database and drops - * it in the cleanup function. If it's not set, creates a temporary directory - * for SQLite and removes it in the cleanup function. - * * ```ts * // Add this to any test suite that uses the database. - * beforeEach((context) => setupIsolatedDatabase(context)) + * beforeEach(setupIsolatedDatabase) * ``` */ export async function setupIsolatedDatabase(context: TestContext) { - if (process.env.DATABASE_URL) { - const databaseName = `vitest_${process.env.VITEST_POOL_ID ?? 1}`; - const databaseUrl = new URL(process.env.DATABASE_URL); - databaseUrl.pathname = `/${databaseName}`; - - const poolConfig = { max: 30, connectionString: databaseUrl.toString() }; + const connectionString = process.env.DATABASE_URL; + if (connectionString !== undefined) { + const databaseName = `vitest_${poolId}`; - const client = new pg.Client({ - connectionString: process.env.DATABASE_URL, - }); + const client = new pg.Client({ connectionString }); await client.connect(); await client.query(`DROP DATABASE IF EXISTS "${databaseName}"`); await client.query(`CREATE DATABASE "${databaseName}"`); await client.end(); - context.databaseConfig = { - kind: "postgres", - poolConfig, - schema: "public", - }; + const databaseUrl = new URL(connectionString); + databaseUrl.pathname = `/${databaseName}`; + const poolConfig = { max: 30, connectionString: databaseUrl.toString() }; - return () => {}; + context.databaseConfig = { kind: "postgres", poolConfig, schema: "public" }; } else { - const tempDir = path.join(os.tmpdir(), randomUUID()); - mkdirSync(tempDir, { recursive: true }); + let dataDir = pgliteDataDirs.get(poolId); + if (dataDir === undefined) { + dataDir = path.join(os.tmpdir(), randomUUID()); + mkdirSync(dataDir, { recursive: true }); + pgliteDataDirs.set(poolId, dataDir); + } + + const databaseName = `vitest_${poolId}`; - context.databaseConfig = { kind: "sqlite", directory: tempDir }; + const parent = createPglite({ dataDir }); + await parent.exec(`DROP DATABASE IF EXISTS "${databaseName}"`); + await parent.exec(`CREATE DATABASE "${databaseName}"`); + await parent.close(); - return () => { - rimrafSync(tempDir); - }; + const options = { dataDir, database: databaseName }; + + context.databaseConfig = { kind: "pglite", options }; } } @@ -135,7 +142,7 @@ export async function setupDatabaseServices( cleanup: () => Promise; }> { const config = { ...defaultDatabaseServiceSetup, ...overrides }; - const database = createDatabase({ + const database = await createDatabase({ common: context.common, databaseConfig: context.databaseConfig, schema: config.schema, @@ -143,16 +150,17 @@ export async function setupDatabaseServices( await database.setup(config); - await database.migrateSync(); + await database.migrateSync().catch((err) => { + console.log(err); + throw err; + }); const syncStore = createSyncStore({ common: context.common, - dialect: database.dialect, db: database.qb.sync, }); const readonlyStore = getReadonlyStore({ - dialect: database.dialect, schema: config.schema, db: database.qb.user, common: context.common, @@ -161,7 +169,6 @@ export async function setupDatabaseServices( const indexingStore = config.indexing === "historical" ? getHistoricalStore({ - dialect: database.dialect, schema: config.schema, readonlyStore, db: database.qb.user, @@ -171,7 +178,6 @@ export async function setupDatabaseServices( : { ...readonlyStore, ...getRealtimeStore({ - dialect: database.dialect, schema: config.schema, db: database.qb.user, common: context.common, diff --git a/packages/core/src/bin/commands/serve.ts b/packages/core/src/bin/commands/serve.ts index 45887b067..6d8a626fe 100644 --- a/packages/core/src/bin/commands/serve.ts +++ b/packages/core/src/bin/commands/serve.ts @@ -77,7 +77,7 @@ export async function serve({ cliOptions }: { cliOptions: CliOptions }) { return cleanup; } - const database = createDatabase({ + const database = await createDatabase({ common, schema, databaseConfig, diff --git a/packages/core/src/bin/utils/run.ts b/packages/core/src/bin/utils/run.ts index 30ccf7619..6850d4cd3 100644 --- a/packages/core/src/bin/utils/run.ts +++ b/packages/core/src/bin/utils/run.ts @@ -46,7 +46,7 @@ export async function run({ let isKilled = false; - const database = createDatabase({ + const database = await createDatabase({ common, schema, databaseConfig, diff --git a/packages/core/src/bin/utils/runServer.ts b/packages/core/src/bin/utils/runServer.ts index f6a35c417..291df0821 100644 --- a/packages/core/src/bin/utils/runServer.ts +++ b/packages/core/src/bin/utils/runServer.ts @@ -15,7 +15,7 @@ export async function runServer({ }) { const { databaseConfig, schema } = build; - const database = createDatabase({ + const database = await createDatabase({ common, schema, databaseConfig, diff --git a/packages/core/src/build/configAndIndexingFunctions.test.ts b/packages/core/src/build/configAndIndexingFunctions.test.ts index ef85556d2..28839be9d 100644 --- a/packages/core/src/build/configAndIndexingFunctions.test.ts +++ b/packages/core/src/build/configAndIndexingFunctions.test.ts @@ -403,10 +403,10 @@ test("buildConfigAndIndexingFunctions() validates address empty string", async ( address: "", }, }, - }) as Config; + }); const result = await safeBuildConfigAndIndexingFunctions({ - config, + config: config as unknown as Config, rawIndexingFunctions: [{ name: "a:Event0", fn: () => {} }], options, }); @@ -430,10 +430,10 @@ test("buildConfigAndIndexingFunctions() validates address prefix", async () => { address: "0b0000000000000000000000000000000000000001", }, }, - }) as Config; + }); const result = await safeBuildConfigAndIndexingFunctions({ - config, + config: config as unknown as Config, rawIndexingFunctions: [{ name: "a:Event0", fn: () => {} }], options, }); @@ -647,7 +647,9 @@ test("buildConfigAndIndexingFunctions() database uses pglite by default", async }); expect(databaseConfig).toMatchObject({ kind: "pglite", - directory: expect.stringContaining(path.join(".ponder", "pglite")), + options: { + dataDir: expect.stringContaining(path.join(".ponder", "pglite")), + }, }); process.env.DATABASE_URL = prev; @@ -668,7 +670,9 @@ test("buildConfigAndIndexingFunctions() database respects custom pglite path", a expect(databaseConfig).toMatchObject({ kind: "pglite", - directory: expect.stringContaining(path.join("custom-pglite", "directory")), + options: { + dataDir: expect.stringContaining(path.join("custom-pglite", "directory")), + }, }); }); diff --git a/packages/core/src/build/configAndIndexingFunctions.ts b/packages/core/src/build/configAndIndexingFunctions.ts index 26ececdce..26cb9a180 100644 --- a/packages/core/src/build/configAndIndexingFunctions.ts +++ b/packages/core/src/build/configAndIndexingFunctions.ts @@ -114,7 +114,7 @@ export async function buildConfigAndIndexingFunctions({ msg: `Using PGlite database in '${pglitePrintPath}' (from ponder.config.ts)`, }); - databaseConfig = { kind: "pglite", directory: pgliteDir }; + databaseConfig = { kind: "pglite", options: { dataDir: pgliteDir } }; } } else { let connectionString: string | undefined = undefined; @@ -170,7 +170,7 @@ export async function buildConfigAndIndexingFunctions({ msg: `Using PGlite database at ${pglitePrintPath} (default)`, }); - databaseConfig = { kind: "pglite", directory: pgliteDir }; + databaseConfig = { kind: "pglite", options: { dataDir: pgliteDir } }; } } diff --git a/packages/core/src/common/metrics.ts b/packages/core/src/common/metrics.ts index 9c949a2cc..c08d7de2b 100644 --- a/packages/core/src/common/metrics.ts +++ b/packages/core/src/common/metrics.ts @@ -57,9 +57,9 @@ export class MetricsService { ponder_rpc_request_duration: prometheus.Histogram<"network" | "method">; ponder_rpc_request_lag: prometheus.Histogram<"network" | "method">; - ponder_postgres_pool_connections: prometheus.Gauge<"pool" | "kind"> = null!; + ponder_postgres_query_total: prometheus.Counter<"pool">; ponder_postgres_query_queue_size: prometheus.Gauge<"pool"> = null!; - ponder_postgres_query_total: prometheus.Counter<"pool"> = null!; + ponder_postgres_pool_connections: prometheus.Gauge<"pool" | "kind"> = null!; constructor() { this.registry = new prometheus.Registry(); @@ -218,6 +218,25 @@ export class MetricsService { registers: [this.registry], }); + this.ponder_postgres_query_total = new prometheus.Counter({ + name: "ponder_postgres_query_total", + help: "Total number of queries submitted to the database", + labelNames: ["pool"] as const, + registers: [this.registry], + }); + this.ponder_postgres_pool_connections = new prometheus.Gauge({ + name: "ponder_postgres_pool_connections", + help: "Number of postgres database connections", + labelNames: ["pool", "kind"] as const, + registers: [this.registry], + }); + this.ponder_postgres_query_queue_size = new prometheus.Gauge({ + name: "ponder_postgres_query_queue_size", + help: "Size of postgres queries", + labelNames: ["pool"] as const, + registers: [this.registry], + }); + prometheus.collectDefaultMetrics({ register: this.registry }); } @@ -278,11 +297,12 @@ export async function getSyncProgress(metrics: MetricsService): Promise< const requestCount: { [network: string]: number } = {}; const rpcRequestMetrics = await metrics.ponder_rpc_request_duration.get(); for (const m of rpcRequestMetrics.values) { + const network = m.labels.network!; if (m.metricName === "ponder_rpc_request_duration_count") { - if (requestCount[m.labels.network!] === undefined) { - requestCount[m.labels.network!] = 0; + if (requestCount[network] === undefined) { + requestCount[network] = 0; } - requestCount[m.labels.network!] += m.value; + requestCount[network] += m.value; } } diff --git a/packages/core/src/common/options.ts b/packages/core/src/common/options.ts index fd9322d84..5dc3c5e5d 100644 --- a/packages/core/src/common/options.ts +++ b/packages/core/src/common/options.ts @@ -99,7 +99,7 @@ export const buildOptions = ({ cliOptions }: { cliOptions: CliOptions }) => { databaseHeartbeatInterval: 10 * 1000, databaseHeartbeatTimeout: 25 * 1000, - // Half of the max query parameters for SQLite + // Half of the max query parameters for PGlite databaseMaxQueryParameters: 16_000, databaseMaxRowLimit: 1_000, diff --git a/packages/core/src/config/database.ts b/packages/core/src/config/database.ts index d87816bf7..18514a275 100644 --- a/packages/core/src/config/database.ts +++ b/packages/core/src/config/database.ts @@ -1,12 +1,9 @@ import type { Prettify } from "@/types/utils.js"; +import type { PGliteOptions } from "@/utils/pglite.js"; import type { PoolConfig as RawPoolConfig } from "pg"; export type PoolConfig = Prettify; export type DatabaseConfig = - | { kind: "pglite"; directory: string } - | { - kind: "postgres"; - poolConfig: PoolConfig; - schema: string; - }; + | { kind: "pglite"; options: PGliteOptions } + | { kind: "postgres"; poolConfig: PoolConfig; schema: string }; diff --git a/packages/core/src/database/index.test.ts b/packages/core/src/database/index.test.ts index 8d5e3576b..642d4f6f4 100644 --- a/packages/core/src/database/index.test.ts +++ b/packages/core/src/database/index.test.ts @@ -174,7 +174,6 @@ test("setup with the same build ID and namespace reverts to and returns the fina await database.setup({ buildId: "abc" }); const realtimeIndexingStore = getRealtimeStore({ - dialect: context.databaseConfig.kind, schema, db: database.qb.user, common: context.common, @@ -231,7 +230,6 @@ test("setup with the same build ID and namespace reverts to and returns the fina }); const readonlyIndexingStore = getReadonlyStore({ - dialect: context.databaseConfig.kind, schema, db: databaseTwo.qb.user, common: context.common, @@ -278,17 +276,11 @@ test("setup succeeds if the lock expires after waiting to expire", async (contex .updateTable("_ponder_meta") .where("key", "=", "app") .set({ - value: - database.dialect === "sqlite" - ? JSON.stringify({ - ...JSON.parse(row!.value!), - is_locked: true, - }) - : { - // @ts-ignore - ...row!.value!, - is_locked: true, - }, + value: { + // @ts-ignore + ...row!.value!, + // is_locked: true, + }, }) .execute(); @@ -339,7 +331,7 @@ test("setup throws if there is a table name collision", async (context) => { }); await database.qb.internal.executeQuery( - sql`CREATE TABLE "Pet" (id TEXT)`.compile(database.qb.internal), + sql`CREATE TABLE "public"."Pet" (id TEXT)`.compile(database.qb.internal), ); expect(await getUserTableNames(database)).toStrictEqual(["Pet"]); @@ -377,18 +369,8 @@ test("heartbeat updates the heartbeat_at value", async (context) => { .executeTakeFirst(); expect( - BigInt( - database.dialect === "sqlite" - ? JSON.parse(rowAfterHeartbeat!.value!).heartbeat_at - : // @ts-ignore - rowAfterHeartbeat!.value!.heartbeat_at, - ), - ).toBeGreaterThan( - database.dialect === "sqlite" - ? JSON.parse(row!.value!).heartbeat_at - : // @ts-ignore - row!.value!.heartbeat_at, - ); + BigInt(rowAfterHeartbeat!.value!.heartbeat_at as number), + ).toBeGreaterThan(row!.value!.heartbeat_at as number); await database.kill(); }); @@ -414,12 +396,7 @@ test("finalize updates lock table", async (context) => { .select("value") .executeTakeFirst(); - expect( - database.dialect === "sqlite" - ? JSON.parse(row!.value!).checkpoint - : // @ts-ignore - row!.value!.checkpoint, - ).toStrictEqual(encodeCheckpoint(maxCheckpoint)); + expect(row!.value!.checkpoint).toStrictEqual(encodeCheckpoint(maxCheckpoint)); await database.kill(); }); @@ -434,7 +411,6 @@ test("finalize delete reorg table rows", async (context) => { await database.setup({ buildId: "abc" }); const realtimeIndexingStore = getRealtimeStore({ - dialect: context.databaseConfig.kind, schema, db: database.qb.user, common: context.common, @@ -522,18 +498,8 @@ test("kill releases the namespace lock", async (context) => { .select("value") .executeTakeFirst(); - expect( - database.dialect === "sqlite" - ? JSON.parse(row!.value!).is_locked - : // @ts-ignore - row!.value!.is_locked, - ).toBe(1); - expect( - database.dialect === "sqlite" - ? JSON.parse(rowAfterKill!.value!).is_locked - : // @ts-ignore - rowAfterKill!.value!.is_locked, - ).toBe(0); + expect(row!.value!.is_locked).toBe(1); + expect(rowAfterKill!.value!.is_locked).toBe(0); await databaseTwo.kill(); }); @@ -633,9 +599,7 @@ test("setup with the same build ID drops indexes", async (context) => { const indexes = await getUserIndexNames(databaseTwo, "Person"); - expect(indexes).toStrictEqual([ - database.dialect === "sqlite" ? "sqlite_autoindex_Person_1" : "Person_pkey", - ]); + expect(indexes).toStrictEqual(["Person_pkey"]); await databaseTwo.kill(); }); @@ -643,10 +607,7 @@ test("setup with the same build ID drops indexes", async (context) => { test("revert() deletes versions newer than the safe timestamp", async (context) => { const { indexingStore, database, cleanup } = await setupDatabaseServices( context, - { - schema, - indexing: "realtime", - }, + { schema, indexing: "realtime" }, ); await indexingStore.create({ @@ -722,10 +683,7 @@ test("revert() deletes versions newer than the safe timestamp", async (context) test("revert() updates versions with intermediate logs", async (context) => { const { indexingStore, database, cleanup } = await setupDatabaseServices( context, - { - schema, - indexing: "realtime", - }, + { schema, indexing: "realtime" }, ); await indexingStore.create({ @@ -761,16 +719,12 @@ test("revert() updates versions with intermediate logs", async (context) => { async function getUserTableNames(database: Database) { const { rows } = await database.qb.internal.executeQuery<{ name: string }>( - database.dialect === "sqlite" - ? sql`SELECT name FROM sqlite_master WHERE type='table'`.compile( - database.qb.internal, - ) - : sql` - SELECT table_name as name - FROM information_schema.tables - WHERE table_schema = '${sql.raw(database.namespace)}' - AND table_type = 'BASE TABLE' - `.compile(database.qb.internal), + sql` + SELECT table_name as name + FROM information_schema.tables + WHERE table_schema = '${sql.raw(database.namespace)}' + AND table_type = 'BASE TABLE' + `.compile(database.qb.internal), ); return rows.map(({ name }) => name); } @@ -780,16 +734,12 @@ async function getUserIndexNames(database: Database, tableName: string) { name: string; tbl_name: string; }>( - database.dialect === "sqlite" - ? sql`SELECT name FROM sqlite_master WHERE type='index' AND tbl_name='${sql.raw(tableName)}'`.compile( - database.qb.internal, - ) - : sql` - SELECT indexname as name - FROM pg_indexes - WHERE schemaname = '${sql.raw(database.namespace)}' - AND tablename = '${sql.raw(tableName)}' - `.compile(database.qb.internal), + sql` + SELECT indexname as name + FROM pg_indexes + WHERE schemaname = '${sql.raw(database.namespace)}' + AND tablename = '${sql.raw(tableName)}' + `.compile(database.qb.internal), ); return rows.map((r) => r.name); } diff --git a/packages/core/src/database/index.ts b/packages/core/src/database/index.ts index 484ac1cbe..3ab4b169e 100644 --- a/packages/core/src/database/index.ts +++ b/packages/core/src/database/index.ts @@ -1,4 +1,3 @@ -import path from "node:path"; import type { Common } from "@/common/common.js"; import { NonRetryableError } from "@/common/errors.js"; import type { DatabaseConfig } from "@/config/database.js"; @@ -27,6 +26,7 @@ import { } from "@/utils/checkpoint.js"; import { formatEta } from "@/utils/format.js"; import { createPool, createReadonlyPool } from "@/utils/pg.js"; +import { createPglite } from "@/utils/pglite.js"; import { wait } from "@/utils/wait.js"; import type { PGlite } from "@electric-sql/pglite"; import { @@ -36,6 +36,7 @@ import { WithSchemaPlugin, sql, } from "kysely"; +import { KyselyPGlite } from "kysely-pglite"; import type { Pool } from "pg"; import prometheus from "prom-client"; import { HeadlessKysely } from "./kysely.js"; @@ -95,18 +96,20 @@ type PonderInternalSchema = { [tableName: string]: UserTable; }; +type PGliteDriver = { + instance: PGlite; +}; + +type PostgresDriver = { + internal: Pool; + user: Pool; + readonly: Pool; + sync: Pool; +}; + type Driver = dialect extends "pglite" - ? { - user: PGlite; - readonly: PGlite; - sync: PGlite; - } - : { - internal: Pool; - user: Pool; - readonly: Pool; - sync: Pool; - }; + ? PGliteDriver + : PostgresDriver; type QueryBuilder = { /** For updating metadata and handling reorgs */ @@ -139,76 +142,75 @@ export const createDatabase = (args: { //////// // Create drivers and orms //////// - - let dialect: Database["dialect"]; let driver: Database["driver"]; let qb: Database["qb"]; + const dialect = args.databaseConfig.kind; + if (args.databaseConfig.kind === "pglite") { - dialect = "pglite"; namespace = "public"; - const userFile = path.join(args.databaseConfig.directory, "public.db"); - const syncFile = path.join(args.databaseConfig.directory, "ponder_sync.db"); + const instance = createPglite(args.databaseConfig.options); - // driver = { - // user: createSqliteDatabase(userFile), - // readonly: createReadonlySqliteDatabase(userFile), - // sync: createSqliteDatabase(syncFile), - // }; + const kyselyDialect = new KyselyPGlite(instance).dialect; + + driver = { instance }; qb = { internal: new HeadlessKysely({ name: "internal", common: args.common, - dialect: new SqliteDialect({ database: driver.user }), + dialect: kyselyDialect, log(event) { if (event.level === "query") { - args.common.metrics.ponder_sqlite_query_total.inc({ - database: "internal", + args.common.metrics.ponder_postgres_query_total.inc({ + pool: "internal", }); } }, + plugins: [new WithSchemaPlugin(namespace)], }), user: new HeadlessKysely({ name: "user", common: args.common, - dialect: new SqliteDialect({ database: driver.user }), + dialect: kyselyDialect, log(event) { if (event.level === "query") { - args.common.metrics.ponder_sqlite_query_total.inc({ - database: "user", + args.common.metrics.ponder_postgres_query_total.inc({ + pool: "user", }); } }, + plugins: [new WithSchemaPlugin(namespace)], }), readonly: new HeadlessKysely({ name: "readonly", common: args.common, - dialect: new SqliteDialect({ database: driver.readonly }), + dialect: kyselyDialect, log(event) { if (event.level === "query") { - args.common.metrics.ponder_sqlite_query_total.inc({ - database: "readonly", + args.common.metrics.ponder_postgres_query_total.inc({ + pool: "readonly", }); } }, + plugins: [new WithSchemaPlugin(namespace)], }), sync: new HeadlessKysely({ name: "sync", common: args.common, - dialect: new SqliteDialect({ database: driver.sync }), + dialect: kyselyDialect, log(event) { if (event.level === "query") { - args.common.metrics.ponder_sqlite_query_total.inc({ - database: "sync", + args.common.metrics.ponder_postgres_query_total.inc({ + pool: "sync", }); } }, + plugins: [new WithSchemaPlugin("ponder_sync")], }), }; } else { - dialect = "postgres"; namespace = args.databaseConfig.schema; const internalMax = 2; @@ -298,79 +300,49 @@ export const createDatabase = (args: { plugins: [new WithSchemaPlugin("ponder_sync")], }), }; - } - // Register metrics - - args.common.metrics.registry.removeSingleMetric( - "ponder_postgres_query_total", - ); - args.common.metrics.ponder_postgres_query_total = new prometheus.Counter({ - name: "ponder_postgres_query_total", - help: "Total number of queries submitted to the database", - labelNames: ["pool"] as const, - registers: [args.common.metrics.registry], - }); - - args.common.metrics.registry.removeSingleMetric( - "ponder_postgres_pool_connections", - ); - args.common.metrics.ponder_postgres_pool_connections = new prometheus.Gauge({ - name: "ponder_postgres_pool_connections", - help: "Number of connections in the pool", - labelNames: ["pool", "kind"] as const, - registers: [args.common.metrics.registry], - collect() { - this.set( - { pool: "internal", kind: "idle" }, - // @ts-ignore - driver.internal.idleCount, - ); - this.set( - { pool: "internal", kind: "total" }, - // @ts-ignore - driver.internal.totalCount, - ); - - this.set({ pool: "sync", kind: "idle" }, (driver.sync as Pool).idleCount); - this.set( - { pool: "sync", kind: "total" }, - (driver.sync as Pool).totalCount, - ); - - this.set({ pool: "user", kind: "idle" }, (driver.user as Pool).idleCount); - this.set( - { pool: "user", kind: "total" }, - (driver.user as Pool).totalCount, - ); + // Register pool metrics + const d = driver as PostgresDriver; + args.common.metrics.registry.removeSingleMetric( + "ponder_postgres_pool_connections", + ); + args.common.metrics.ponder_postgres_pool_connections = new prometheus.Gauge( + { + name: "ponder_postgres_pool_connections", + help: "Number of connections in the pool", + labelNames: ["pool", "kind"] as const, + registers: [args.common.metrics.registry], + collect() { + this.set({ pool: "internal", kind: "idle" }, d.internal.idleCount); + this.set({ pool: "internal", kind: "total" }, d.internal.totalCount); + this.set({ pool: "sync", kind: "idle" }, d.sync.idleCount); + this.set({ pool: "sync", kind: "total" }, d.sync.totalCount); + this.set({ pool: "user", kind: "idle" }, d.user.idleCount); + this.set({ pool: "user", kind: "total" }, d.user.totalCount); + this.set({ pool: "readonly", kind: "idle" }, d.readonly.idleCount); + this.set({ pool: "readonly", kind: "total" }, d.readonly.totalCount); + }, + }, + ); - this.set( - { pool: "readonly", kind: "idle" }, - (driver.readonly as Pool).idleCount, - ); - this.set( - { pool: "readonly", kind: "total" }, - (driver.readonly as Pool).totalCount, - ); - }, - }); - - args.common.metrics.registry.removeSingleMetric( - "ponder_postgres_query_queue_size", - ); - args.common.metrics.ponder_postgres_query_queue_size = new prometheus.Gauge({ - name: "ponder_postgres_query_queue_size", - help: "Number of query requests waiting for an available connection", - labelNames: ["pool"] as const, - registers: [args.common.metrics.registry], - collect() { - // @ts-ignore - this.set({ pool: "internal" }, driver.internal.waitingCount); - this.set({ pool: "sync" }, (driver.sync as Pool).waitingCount); - this.set({ pool: "user" }, (driver.user as Pool).waitingCount); - this.set({ pool: "readonly" }, (driver.readonly as Pool).waitingCount); - }, - }); + args.common.metrics.registry.removeSingleMetric( + "ponder_postgres_query_queue_size", + ); + args.common.metrics.ponder_postgres_query_queue_size = new prometheus.Gauge( + { + name: "ponder_postgres_query_queue_size", + help: "Number of query requests waiting for an available connection", + labelNames: ["pool"] as const, + registers: [args.common.metrics.registry], + collect() { + this.set({ pool: "internal" }, d.internal.waitingCount); + this.set({ pool: "sync" }, d.sync.waitingCount); + this.set({ pool: "user" }, d.user.waitingCount); + this.set({ pool: "readonly" }, d.readonly.waitingCount); + }, + }, + ); + } //////// // Helpers @@ -446,13 +418,11 @@ export const createDatabase = (args: { await qb.sync.wrap({ method: "migrateSyncStore" }, async () => { // TODO: Probably remove this at 1.0 to speed up startup time. // TODO(kevin) is the `WithSchemaPlugin` going to break this? - if (dialect === "postgres") { - await moveLegacyTables({ - common: args.common, - db: qb.internal, - newSchemaName: "ponder_sync", - }); - } + await moveLegacyTables({ + common: args.common, + db: qb.internal, + newSchemaName: "ponder_sync", + }); const migrator = new Migrator({ db: qb.sync as any, @@ -527,12 +497,10 @@ export const createDatabase = (args: { } await qb.internal.wrap({ method: "setup" }, async () => { - if (dialect === "postgres") { - await qb.internal.schema - .createSchema(namespace) - .ifNotExists() - .execute(); - } + await qb.internal.schema + .createSchema(namespace) + .ifNotExists() + .execute(); // Create "_ponder_meta" table if it doesn't exist await qb.internal.schema @@ -710,7 +678,7 @@ export const createDatabase = (args: { /** * If schema is empty, start */ - if (previousApp === undefined) { + if (!previousApp) { await tx .insertInto("_ponder_meta") .values({ key: "status", value: null }) @@ -1030,21 +998,16 @@ export const createDatabase = (args: { await qb.sync.destroy(); if (dialect === "pglite") { - // @ts-ignore - driver.user.close(); - // @ts-ignore - driver.readonly.close(); - // @ts-ignore - driver.sync.close(); - } else { - // @ts-ignore - await driver.internal.end(); - // @ts-ignore - await driver.user.end(); - // @ts-ignore - await driver.readonly.end(); - // @ts-ignore - await driver.sync.end(); + const d = driver as PGliteDriver; + await d.instance.close(); + } + + if (dialect === "postgres") { + const d = driver as PostgresDriver; + await d.internal.end(); + await d.user.end(); + await d.readonly.end(); + await d.sync.end(); } args.common.logger.debug({ diff --git a/packages/core/src/drizzle/runtime.ts b/packages/core/src/drizzle/runtime.ts index 2d3457016..6f8b20b47 100644 --- a/packages/core/src/drizzle/runtime.ts +++ b/packages/core/src/drizzle/runtime.ts @@ -19,12 +19,16 @@ import { numeric as PgNumeric, text as PgText, } from "drizzle-orm/pg-core"; -import type { Pool } from "pg"; +import { drizzle as drizzlePglite } from "drizzle-orm/pglite"; import { PgHexBuilder } from "./hex.js"; import { PgListBuilder } from "./list.js"; export const createDrizzleDb = (database: Database) => { - const drizzle = drizzlePg(database.driver.readonly as Pool); + const drizzle = + "instance" in database.driver + ? drizzlePglite(database.driver.instance) + : drizzlePg(database.driver.readonly); + return { // @ts-ignore select: (...args: any[]) => drizzle.select(...args), diff --git a/packages/core/src/indexing-store/store.bench.ts b/packages/core/src/indexing-store/store.bench.ts index 9c839df89..83af530ca 100644 --- a/packages/core/src/indexing-store/store.bench.ts +++ b/packages/core/src/indexing-store/store.bench.ts @@ -27,7 +27,7 @@ const setup = async () => { context = {} as TestContext; setupCommon(context); - const cleanupDatabase = await setupIsolatedDatabase(context); + await setupIsolatedDatabase(context); const { indexingStore: indexingStore_, cleanup: cleanupIndexingStore } = await setupDatabaseServices(context, { schema, @@ -36,7 +36,6 @@ const setup = async () => { indexingStore = indexingStore_; cleanup = async () => { await cleanupIndexingStore(); - await cleanupDatabase(); }; await indexingStore.createMany({ diff --git a/packages/core/src/indexing-store/utils/filter.test.ts b/packages/core/src/indexing-store/utils/filter.test.ts index 0007cef69..8a8159ab7 100644 --- a/packages/core/src/indexing-store/utils/filter.test.ts +++ b/packages/core/src/indexing-store/utils/filter.test.ts @@ -79,8 +79,12 @@ test("buildWhereConditions handles list filters with encoding", () => { "bigAge", "in", [ - "0000000000000000000000000000000000000000000000000000000000000000000000000000012", - "0000000000000000000000000000000000000000000000000000000000000000000000000000015", + BigInt( + "0000000000000000000000000000000000000000000000000000000000000000000000000000012", + ), + BigInt( + "0000000000000000000000000000000000000000000000000000000000000000000000000000015", + ), ], ], ], diff --git a/packages/core/src/utils/pg.ts b/packages/core/src/utils/pg.ts index 228d8729a..2d8664d7b 100644 --- a/packages/core/src/utils/pg.ts +++ b/packages/core/src/utils/pg.ts @@ -1,12 +1,6 @@ -import { types } from "@electric-sql/pglite"; import pg, { type PoolConfig } from "pg"; import { prettyPrint } from "./print.js"; -const parse = { - [types.NUMERIC]: (x: string | null) => (x === null ? null : BigInt(x)), - [types.INT8]: (x: string | null) => (x === null ? null : Number(x)), -}; - // See https://github.com/brianc/node-pg-types for details. // Use BigInt for `numeric` types. pg.types.setTypeParser(pg.types.builtins.NUMERIC, BigInt); diff --git a/packages/core/src/utils/pglite.ts b/packages/core/src/utils/pglite.ts new file mode 100644 index 000000000..e09462afa --- /dev/null +++ b/packages/core/src/utils/pglite.ts @@ -0,0 +1,18 @@ +import type { Prettify } from "@/types/utils.js"; +import { + type PGliteOptions as Options, + PGlite, + types, +} from "@electric-sql/pglite"; + +export type PGliteOptions = Prettify; + +export function createPglite(options: PGliteOptions) { + return new PGlite({ + serializers: { + [types.NUMERIC]: (x: string | number | bigint) => x.toString(), + }, + parsers: { [types.NUMERIC]: (x: string) => BigInt(x) }, + ...options, + }); +} From 981d310eab44c8585aee530487cb32c385866a34 Mon Sep 17 00:00:00 2001 From: typedarray <90073088+0xOlias@users.noreply.github.com> Date: Fri, 18 Oct 2024 16:23:40 -0400 Subject: [PATCH 29/29] tweaks --- packages/core/src/build/configAndIndexingFunctions.ts | 7 +++++-- packages/core/src/utils/exists.ts | 10 ---------- 2 files changed, 5 insertions(+), 12 deletions(-) delete mode 100644 packages/core/src/utils/exists.ts diff --git a/packages/core/src/build/configAndIndexingFunctions.ts b/packages/core/src/build/configAndIndexingFunctions.ts index 26cb9a180..061f8d269 100644 --- a/packages/core/src/build/configAndIndexingFunctions.ts +++ b/packages/core/src/build/configAndIndexingFunctions.ts @@ -44,10 +44,13 @@ export async function buildConfigAndIndexingFunctions({ // Determine PGlite directory, preferring config.database.directory if available const pgliteDir = config.database?.kind === "pglite" && config.database.directory - ? path.resolve(config.database.directory) + ? config.database.directory === "memory://" + ? "memory://" + : path.resolve(config.database.directory) : path.join(ponderDir, "pglite"); - const pglitePrintPath = path.relative(rootDir, pgliteDir); + const pglitePrintPath = + pgliteDir === "memory://" ? "memory://" : path.relative(rootDir, pgliteDir); if (config.database?.kind) { if (config.database.kind === "postgres") { diff --git a/packages/core/src/utils/exists.ts b/packages/core/src/utils/exists.ts deleted file mode 100644 index 508f4f4a7..000000000 --- a/packages/core/src/utils/exists.ts +++ /dev/null @@ -1,10 +0,0 @@ -import { existsSync, mkdirSync } from "node:fs"; -import path from "node:path"; - -export const ensureDirExists = (filePath: string) => { - const dirname = path.dirname(filePath); - if (existsSync(dirname)) { - return; - } - mkdirSync(dirname, { recursive: true }); -};