From fb3c6913a719e483b1fba949d7a87277ec3ca3d5 Mon Sep 17 00:00:00 2001 From: rvcas Date: Fri, 5 Jul 2024 21:54:26 -0400 Subject: [PATCH] feat: switch explorer to d1 --- .env.example | 5 +- Cargo.lock | 264 ---------- Cargo.toml | 19 - build.rs | 5 - drizzle.config.ts | 13 + migrations/0000_mushy_red_ghost.sql | 11 + migrations/meta/0000_snapshot.json | 83 +++ migrations/meta/_journal.json | 13 + miner/lib.rs | 6 - miner/sha-gpu/package.json | 3 - package.json | 10 +- pnpm-lock.yaml | 531 ++++++++++++++++++-- prisma/schema.prisma | 749 ---------------------------- src/app.d.ts | 6 +- src/lib/server/drizzle.ts | 7 + src/lib/server/schema.sql.ts | 12 + src/routes/explorer/+page.server.ts | 146 +----- src/routes/explorer/+page.svelte | 11 +- svelte.config.js | 7 +- wrangler.toml | 14 + 20 files changed, 678 insertions(+), 1237 deletions(-) delete mode 100644 Cargo.lock delete mode 100644 Cargo.toml delete mode 100644 build.rs create mode 100644 drizzle.config.ts create mode 100644 migrations/0000_mushy_red_ghost.sql create mode 100644 migrations/meta/0000_snapshot.json create mode 100644 migrations/meta/_journal.json delete mode 100644 miner/lib.rs delete mode 100644 miner/sha-gpu/package.json delete mode 100644 prisma/schema.prisma create mode 100644 src/lib/server/drizzle.ts create mode 100644 src/lib/server/schema.sql.ts create mode 100644 wrangler.toml diff --git a/.env.example b/.env.example index aae2874..31f7e79 100644 --- a/.env.example +++ b/.env.example @@ -1,2 +1,5 @@ KUPO_URL="" -OGMIOS_URL="" \ No newline at end of file +OGMIOS_URL="" +CLOUDFLARE_ACCOUNT_ID= +CLOUDFLARE_DATABASE_ID= +CLOUDFLARE_D1_TOKEN= diff --git a/Cargo.lock b/Cargo.lock deleted file mode 100644 index 4c853ad..0000000 --- a/Cargo.lock +++ /dev/null @@ -1,264 +0,0 @@ -# This file is automatically @generated by Cargo. -# It is not intended for manual editing. -version = 3 - -[[package]] -name = "aho-corasick" -version = "1.1.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" -dependencies = [ - "memchr", -] - -[[package]] -name = "bitflags" -version = "2.5.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" - -[[package]] -name = "cfg-if" -version = "1.0.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" - -[[package]] -name = "convert_case" -version = "0.6.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ec182b0ca2f35d8fc196cf3404988fd8b8c739a4d270ff118a398feb0cbec1ca" -dependencies = [ - "unicode-segmentation", -] - -[[package]] -name = "ctor" -version = "0.2.7" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ad291aa74992b9b7a7e88c38acbbf6ad7e107f1d90ee8775b7bc1fc3394f485c" -dependencies = [ - "quote", - "syn", -] - -[[package]] -name = "libloading" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0c2a198fb6b0eada2a8df47933734e6d35d350665a33a3593d7164fa52c75c19" -dependencies = [ - "cfg-if", - "windows-targets", -] - -[[package]] -name = "memchr" -version = "2.7.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" - -[[package]] -name = "napi" -version = "2.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c4ca998356d8ff9fba7a070dae4508a2298439c98c9f3bc9c07669538b999e8f" -dependencies = [ - "bitflags", - "ctor", - "napi-derive", - "napi-sys", - "once_cell", -] - -[[package]] -name = "napi-build" -version = "2.1.2" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2f9130fccc5f763cf2069b34a089a18f0d0883c66aceb81f2fad541a3d823c43" - -[[package]] -name = "napi-derive" -version = "2.16.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b138cecf1141ae0ff5d62f4aa0e2f269aec339f66070f346ba6fb4279f1fc178" -dependencies = [ - "cfg-if", - "convert_case", - "napi-derive-backend", - "proc-macro2", - "quote", - "syn", -] - -[[package]] -name = "napi-derive-backend" -version = "1.0.63" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ce5126b64f6ad9e28e30e6d15213dd378626b38f556454afebc42f7f02a90902" -dependencies = [ - "convert_case", - "once_cell", - "proc-macro2", - "quote", - "regex", - "semver", - "syn", -] - -[[package]] -name = "napi-sys" -version = "2.3.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "2503fa6af34dc83fb74888df8b22afe933b58d37daf7d80424b1c60c68196b8b" -dependencies = [ - "libloading", -] - -[[package]] -name = "once_cell" -version = "1.19.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" - -[[package]] -name = "proc-macro2" -version = "1.0.79" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e835ff2298f5721608eb1a980ecaee1aef2c132bf95ecc026a11b7bf3c01c02e" -dependencies = [ - "unicode-ident", -] - -[[package]] -name = "quote" -version = "1.0.35" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "291ec9ab5efd934aaf503a6466c5d5251535d108ee747472c3977cc5acc868ef" -dependencies = [ - "proc-macro2", -] - -[[package]] -name = "regex" -version = "1.10.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" -dependencies = [ - "aho-corasick", - "memchr", - "regex-automata", - "regex-syntax", -] - -[[package]] -name = "regex-automata" -version = "0.4.6" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" -dependencies = [ - "aho-corasick", - "memchr", - "regex-syntax", -] - -[[package]] -name = "regex-syntax" -version = "0.8.3" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" - -[[package]] -name = "semver" -version = "1.0.22" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" - -[[package]] -name = "sha-gpu" -version = "0.1.0" -dependencies = [ - "napi", - "napi-build", - "napi-derive", -] - -[[package]] -name = "syn" -version = "2.0.57" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "11a6ae1e52eb25aab8f3fb9fca13be982a373b8f1157ca14b897a825ba4a2d35" -dependencies = [ - "proc-macro2", - "quote", - "unicode-ident", -] - -[[package]] -name = "unicode-ident" -version = "1.0.12" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" - -[[package]] -name = "unicode-segmentation" -version = "1.11.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" - -[[package]] -name = "windows-targets" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd37b7e5ab9018759f893a1952c9420d060016fc19a472b4bb20d1bdd694d1b" -dependencies = [ - "windows_aarch64_gnullvm", - "windows_aarch64_msvc", - "windows_i686_gnu", - "windows_i686_msvc", - "windows_x86_64_gnu", - "windows_x86_64_gnullvm", - "windows_x86_64_msvc", -] - -[[package]] -name = "windows_aarch64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "bcf46cf4c365c6f2d1cc93ce535f2c8b244591df96ceee75d8e83deb70a9cac9" - -[[package]] -name = "windows_aarch64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "da9f259dd3bcf6990b55bffd094c4f7235817ba4ceebde8e6d11cd0c5633b675" - -[[package]] -name = "windows_i686_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b474d8268f99e0995f25b9f095bc7434632601028cf86590aea5c8a5cb7801d3" - -[[package]] -name = "windows_i686_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "1515e9a29e5bed743cb4415a9ecf5dfca648ce85ee42e15873c3cd8610ff8e02" - -[[package]] -name = "windows_x86_64_gnu" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5eee091590e89cc02ad514ffe3ead9eb6b660aedca2183455434b93546371a03" - -[[package]] -name = "windows_x86_64_gnullvm" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "77ca79f2451b49fa9e2af39f0747fe999fcda4f5e241b2898624dca97a1f2177" - -[[package]] -name = "windows_x86_64_msvc" -version = "0.52.4" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32b752e52a2da0ddfbdbcc6fceadfeede4c939ed16d13e648833a61dfb611ed8" diff --git a/Cargo.toml b/Cargo.toml deleted file mode 100644 index 29e3756..0000000 --- a/Cargo.toml +++ /dev/null @@ -1,19 +0,0 @@ -[package] -authors = ["Lucas Rosa ", "Kasey White "] -edition = "2021" -name = "sha-gpu" -version = "0.1.0" - -[lib] -path = "miner/lib.rs" -crate-type = ["cdylib"] - -[profile.release] -lto = true - -[dependencies] -napi = "2.16.1" -napi-derive = "2.16.1" - -[build-dependencies] -napi-build = "2.1.2" diff --git a/build.rs b/build.rs deleted file mode 100644 index 9fc2367..0000000 --- a/build.rs +++ /dev/null @@ -1,5 +0,0 @@ -extern crate napi_build; - -fn main() { - napi_build::setup(); -} diff --git a/drizzle.config.ts b/drizzle.config.ts new file mode 100644 index 0000000..7d30915 --- /dev/null +++ b/drizzle.config.ts @@ -0,0 +1,13 @@ +import { defineConfig } from 'drizzle-kit'; + +export default defineConfig({ + schema: './src/lib/server/schema.sql.ts', + out: './migrations', + dialect: 'sqlite', + driver: 'd1-http', + dbCredentials: { + accountId: process.env.CLOUDFLARE_ACCOUNT_ID!, + databaseId: process.env.CLOUDFLARE_DATABASE_ID!, + token: process.env.CLOUDFLARE_D1_TOKEN!, + }, +}); diff --git a/migrations/0000_mushy_red_ghost.sql b/migrations/0000_mushy_red_ghost.sql new file mode 100644 index 0000000..6dcf67e --- /dev/null +++ b/migrations/0000_mushy_red_ghost.sql @@ -0,0 +1,11 @@ +CREATE TABLE `blocks` ( + `number` integer PRIMARY KEY NOT NULL, + `hash` text(64) NOT NULL, + `leading_zeros` integer NOT NULL, + `target_number` integer NOT NULL, + `epoch_time` integer NOT NULL, + `current_posix_time` integer NOT NULL, + `nonce` text(32) +); +--> statement-breakpoint +CREATE UNIQUE INDEX `blocks_hash_unique` ON `blocks` (`hash`); \ No newline at end of file diff --git a/migrations/meta/0000_snapshot.json b/migrations/meta/0000_snapshot.json new file mode 100644 index 0000000..1221309 --- /dev/null +++ b/migrations/meta/0000_snapshot.json @@ -0,0 +1,83 @@ +{ + "version": "6", + "dialect": "sqlite", + "id": "f446e901-326a-426f-ae87-24ec3db13633", + "prevId": "00000000-0000-0000-0000-000000000000", + "tables": { + "blocks": { + "name": "blocks", + "columns": { + "number": { + "name": "number", + "type": "integer", + "primaryKey": true, + "notNull": true, + "autoincrement": false + }, + "hash": { + "name": "hash", + "type": "text(64)", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "leading_zeros": { + "name": "leading_zeros", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "target_number": { + "name": "target_number", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "epoch_time": { + "name": "epoch_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "current_posix_time": { + "name": "current_posix_time", + "type": "integer", + "primaryKey": false, + "notNull": true, + "autoincrement": false + }, + "nonce": { + "name": "nonce", + "type": "text(32)", + "primaryKey": false, + "notNull": false, + "autoincrement": false + } + }, + "indexes": { + "blocks_hash_unique": { + "name": "blocks_hash_unique", + "columns": [ + "hash" + ], + "isUnique": true + } + }, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + } + }, + "enums": {}, + "_meta": { + "schemas": {}, + "tables": {}, + "columns": {} + }, + "internal": { + "indexes": {} + } +} \ No newline at end of file diff --git a/migrations/meta/_journal.json b/migrations/meta/_journal.json new file mode 100644 index 0000000..f4bf97e --- /dev/null +++ b/migrations/meta/_journal.json @@ -0,0 +1,13 @@ +{ + "version": "7", + "dialect": "sqlite", + "entries": [ + { + "idx": 0, + "version": "6", + "when": 1720228959695, + "tag": "0000_mushy_red_ghost", + "breakpoints": true + } + ] +} \ No newline at end of file diff --git a/miner/lib.rs b/miner/lib.rs deleted file mode 100644 index ee8aeba..0000000 --- a/miner/lib.rs +++ /dev/null @@ -1,6 +0,0 @@ -use napi_derive::napi; - -#[napi] -pub fn plus_100(input: u32) -> u32 { - input + 200 -} diff --git a/miner/sha-gpu/package.json b/miner/sha-gpu/package.json deleted file mode 100644 index 5bbefff..0000000 --- a/miner/sha-gpu/package.json +++ /dev/null @@ -1,3 +0,0 @@ -{ - "type": "commonjs" -} diff --git a/package.json b/package.json index bdea0b3..cce3c8a 100644 --- a/package.json +++ b/package.json @@ -4,16 +4,19 @@ "private": true, "scripts": { "build": "vite build", - "build:miner": "napi build --platform --release --pipe \"prettier -w\" miner/sha-gpu", "check": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json", "check:watch": "svelte-kit sync && svelte-check --tsconfig ./tsconfig.json --watch", "dev": "vite dev", "format": "prettier --write .", "lint": "prettier --check . && eslint .", "miner": "tsx miner/main.ts", + "schema": "drizzle-kit generate", + "migrate": "drizzle-kit migrate", + "studio": "drizzle-kit studio", "preview": "vite preview" }, "devDependencies": { + "@cloudflare/workers-types": "^4.20240620.0", "@commander-js/extra-typings": "^12.0.1", "@iconify/json": "^2.2.192", "@napi-rs/cli": "^2.18.0", @@ -35,6 +38,7 @@ "commander": "^12.0.0", "daisyui": "^4.7.2", "dotenv": "^16.4.5", + "drizzle-kit": "^0.22.8", "eslint": "^8.56.0", "eslint-config-prettier": "^9.1.0", "eslint-plugin-svelte": "^2.35.1", @@ -52,7 +56,8 @@ "vite-plugin-node-polyfills": "^0.21.0", "vite-plugin-top-level-await": "^1.4.1", "vite-plugin-wasm": "^3.3.0", - "vitest": "^1.4.0" + "vitest": "^1.4.0", + "wrangler": "^3.63.1" }, "type": "module", "dependencies": { @@ -64,6 +69,7 @@ "d3-scale": "^4.0.2", "d3-shape": "^3.2.0", "date-fns": "^3.6.0", + "drizzle-orm": "^0.31.2", "layerchart": "^0.34.0", "lucid-cardano": "^0.10.7", "postgres": "^3.4.4", diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 7cb82f4..8b6b481 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -32,6 +32,9 @@ importers: date-fns: specifier: ^3.6.0 version: 3.6.0 + drizzle-orm: + specifier: ^0.31.2 + version: 0.31.2(@cloudflare/workers-types@4.20240620.0)(postgres@3.4.4) layerchart: specifier: ^0.34.0 version: 0.34.0(postcss-load-config@4.0.2(postcss@8.4.35))(postcss@8.4.35)(svelte@4.2.12)(typescript@5.3.3)(vite@5.2.8(@types/node@20.11.24)) @@ -45,6 +48,9 @@ importers: specifier: ^8.16.0 version: 8.16.0 devDependencies: + '@cloudflare/workers-types': + specifier: ^4.20240620.0 + version: 4.20240620.0 '@commander-js/extra-typings': specifier: ^12.0.1 version: 12.0.1(commander@12.0.0) @@ -59,7 +65,7 @@ importers: version: 3.1.1(@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24))) '@sveltejs/adapter-cloudflare': specifier: ^4.2.0 - version: 4.2.0(@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(wrangler@3.42.0(@cloudflare/workers-types@4.20240329.0)) + version: 4.2.0(@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(wrangler@3.63.1(@cloudflare/workers-types@4.20240620.0)) '@sveltejs/kit': specifier: ^2.5.5 version: 2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)) @@ -108,6 +114,9 @@ importers: dotenv: specifier: ^16.4.5 version: 16.4.5 + drizzle-kit: + specifier: ^0.22.8 + version: 0.22.8 eslint: specifier: ^8.56.0 version: 8.57.0 @@ -162,6 +171,9 @@ importers: vitest: specifier: ^1.4.0 version: 1.4.0(@types/node@20.11.24) + wrangler: + specifier: ^3.63.1 + version: 3.63.1(@cloudflare/workers-types@4.20240620.0) packages: @@ -196,41 +208,42 @@ packages: '@bufbuild/protobuf@1.10.0': resolution: {integrity: sha512-QDdVFLoN93Zjg36NoQPZfsVH9tZew7wKDKyV5qRdj8ntT4wQCOradQjRaTdwMhWUYsgKsvCINKKm87FdEk96Ag==} - '@cloudflare/kv-asset-handler@0.3.1': - resolution: {integrity: sha512-lKN2XCfKCmpKb86a1tl4GIwsJYDy9TGuwjhDELLmpKygQhw8X2xR4dusgpC5Tg7q1pB96Eb0rBo81kxSILQMwA==} + '@cloudflare/kv-asset-handler@0.3.4': + resolution: {integrity: sha512-YLPHc8yASwjNkmcDMQMY35yiWjoKAKnhUbPRszBRS0YgH+IXtsMp61j+yTcnCE3oO2DgP0U3iejLC8FTtKDC8Q==} + engines: {node: '>=16.13'} - '@cloudflare/workerd-darwin-64@1.20240329.0': - resolution: {integrity: sha512-/raHmsHrYjoC5am84wqyiZIDCRrrYN6YDFb4zchwWQzJ0ZHleUeY6IzNdjujrS/gYey/+Db9oyl2PD1xAZt4gA==} + '@cloudflare/workerd-darwin-64@1.20240701.0': + resolution: {integrity: sha512-XAZa4ZP+qyTn6JQQACCPH09hGZXP2lTnWKkmg5mPwT8EyRzCKLkczAf98vPP5bq7JZD/zORdFWRY0dOTap8zTQ==} engines: {node: '>=16'} cpu: [x64] os: [darwin] - '@cloudflare/workerd-darwin-arm64@1.20240329.0': - resolution: {integrity: sha512-3wnwVdfFDt+JUhlA6NWW+093ryGNF0HMuBmkOh0PG6j4GMRH8Y+EDsqzqrzT3ZoGGXbI9x1H7k15VKb3LAN/KA==} + '@cloudflare/workerd-darwin-arm64@1.20240701.0': + resolution: {integrity: sha512-w80ZVAgfH4UwTz7fXZtk7KmS2FzlXniuQm4ku4+cIgRTilBAuKqjpOjwUCbx5g13Gqcm9NuiHce+IDGtobRTIQ==} engines: {node: '>=16'} cpu: [arm64] os: [darwin] - '@cloudflare/workerd-linux-64@1.20240329.0': - resolution: {integrity: sha512-E909ZIXgjdr2iuq5bF/vq02elizDlPQoYRiKojdvODC7w8rbnpwnuptajS4xK5kmKh4XBiU2o9NDhut/W1kfyw==} + '@cloudflare/workerd-linux-64@1.20240701.0': + resolution: {integrity: sha512-UWLr/Anxwwe/25nGv451MNd2jhREmPt/ws17DJJqTLAx6JxwGWA15MeitAIzl0dbxRFAJa+0+R8ag2WR3F/D6g==} engines: {node: '>=16'} cpu: [x64] os: [linux] - '@cloudflare/workerd-linux-arm64@1.20240329.0': - resolution: {integrity: sha512-PELA3FVW75pKchsSI5o40oiClFY2Uiq+KUx/f/srwz2pIJoM5YWLmFrv+s8feKoEwuabxIGSzHxy7QA++HyprQ==} + '@cloudflare/workerd-linux-arm64@1.20240701.0': + resolution: {integrity: sha512-3kCnF9kYgov1ggpuWbgpXt4stPOIYtVmPCa7MO2xhhA0TWP6JDUHRUOsnmIgKrvDjXuXqlK16cdg3v+EWsaPJg==} engines: {node: '>=16'} cpu: [arm64] os: [linux] - '@cloudflare/workerd-windows-64@1.20240329.0': - resolution: {integrity: sha512-/T+AcjVqTuqAeGBQmjAF4TOTm8sv3BSO/NtUPa1ghCvsp1sb03L6/c3wFc9ZonSdRYeBb0XDX7PnenGCvjr/Tw==} + '@cloudflare/workerd-windows-64@1.20240701.0': + resolution: {integrity: sha512-6IPGITRAeS67j3BH1rN4iwYWDt47SqJG7KlZJ5bB4UaNAia4mvMBSy/p2p4vA89bbXoDRjMtEvRu7Robu6O7hQ==} engines: {node: '>=16'} cpu: [x64] os: [win32] - '@cloudflare/workers-types@4.20240329.0': - resolution: {integrity: sha512-AbzgvSQjG8Nci4xxQEcjTTVjiWXgOQnFIbIHtEZXteHiMGDXMWGegjWBo5JHGsZCq+U5V/SD5EnlypQnUQEoig==} + '@cloudflare/workers-types@4.20240620.0': + resolution: {integrity: sha512-CQD8YS6evRob7LChvIX3gE3zYo0KVgaLDOu1SwNP1BVIS2Sa0b+FC8S1e1hhrNN8/E4chYlVN+FDAgA4KRDUEQ==} '@commander-js/extra-typings@12.0.1': resolution: {integrity: sha512-OvkMobb1eMqOCuJdbuSin/KJkkZr7n24/UNV+Lcz/0Dhepf3r2p9PaGwpRpAWej7A+gQnny4h8mGhpFl4giKkg==} @@ -253,6 +266,12 @@ packages: resolution: {integrity: sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==} engines: {node: '>=12'} + '@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-plugins/node-globals-polyfill@0.2.3': resolution: {integrity: sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==} peerDependencies: @@ -281,6 +300,12 @@ packages: cpu: [arm64] os: [android] + '@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'} @@ -299,6 +324,12 @@ packages: cpu: [arm] os: [android] + '@esbuild/android-arm@0.18.20': + resolution: {integrity: sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==} + engines: {node: '>=12'} + cpu: [arm] + os: [android] + '@esbuild/android-arm@0.19.12': resolution: {integrity: sha512-qg/Lj1mu3CdQlDEEiWrlC4eaPZ1KztwGJ9B6J+/6G+/4ewxJg7gqj8eVYWvao1bXrqGiW2rsBZFSX3q2lcW05w==} engines: {node: '>=12'} @@ -317,6 +348,12 @@ packages: cpu: [x64] os: [android] + '@esbuild/android-x64@0.18.20': + resolution: {integrity: sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==} + engines: {node: '>=12'} + cpu: [x64] + os: [android] + '@esbuild/android-x64@0.19.12': resolution: {integrity: sha512-3k7ZoUW6Q6YqhdhIaq/WZ7HwBpnFBlW905Fa4s4qWJyiNOgT1dOqDiVAQFwBH7gBRZr17gLrlFCRzF6jFh7Kew==} engines: {node: '>=12'} @@ -335,6 +372,12 @@ packages: cpu: [arm64] os: [darwin] + '@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'} @@ -353,6 +396,12 @@ packages: cpu: [x64] os: [darwin] + '@esbuild/darwin-x64@0.18.20': + resolution: {integrity: sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [darwin] + '@esbuild/darwin-x64@0.19.12': resolution: {integrity: sha512-hKoVkKzFiToTgn+41qGhsUJXFlIjxI/jSYeZf3ugemDYZldIXIxhvwN6erJGlX4t5h417iFuheZ7l+YVn05N3A==} engines: {node: '>=12'} @@ -371,6 +420,12 @@ packages: cpu: [arm64] os: [freebsd] + '@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'} @@ -389,6 +444,12 @@ packages: cpu: [x64] os: [freebsd] + '@esbuild/freebsd-x64@0.18.20': + resolution: {integrity: sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [freebsd] + '@esbuild/freebsd-x64@0.19.12': resolution: {integrity: sha512-EYoXZ4d8xtBoVN7CEwWY2IN4ho76xjYXqSXMNccFSx2lgqOG/1TBPW0yPx1bJZk94qu3tX0fycJeeQsKovA8gg==} engines: {node: '>=12'} @@ -407,6 +468,12 @@ packages: cpu: [arm64] os: [linux] + '@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'} @@ -425,6 +492,12 @@ packages: cpu: [arm] os: [linux] + '@esbuild/linux-arm@0.18.20': + resolution: {integrity: sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==} + engines: {node: '>=12'} + cpu: [arm] + os: [linux] + '@esbuild/linux-arm@0.19.12': resolution: {integrity: sha512-J5jPms//KhSNv+LO1S1TX1UWp1ucM6N6XuL6ITdKWElCu8wXP72l9MM0zDTzzeikVyqFE6U8YAV9/tFyj0ti+w==} engines: {node: '>=12'} @@ -443,6 +516,12 @@ packages: cpu: [ia32] os: [linux] + '@esbuild/linux-ia32@0.18.20': + resolution: {integrity: sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==} + engines: {node: '>=12'} + cpu: [ia32] + os: [linux] + '@esbuild/linux-ia32@0.19.12': resolution: {integrity: sha512-Thsa42rrP1+UIGaWz47uydHSBOgTUnwBwNq59khgIwktK6x60Hivfbux9iNR0eHCHzOLjLMLfUMLCypBkZXMHA==} engines: {node: '>=12'} @@ -461,6 +540,12 @@ packages: cpu: [loong64] os: [linux] + '@esbuild/linux-loong64@0.18.20': + resolution: {integrity: sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==} + engines: {node: '>=12'} + cpu: [loong64] + os: [linux] + '@esbuild/linux-loong64@0.19.12': resolution: {integrity: sha512-LiXdXA0s3IqRRjm6rV6XaWATScKAXjI4R4LoDlvO7+yQqFdlr1Bax62sRwkVvRIrwXxvtYEHHI4dm50jAXkuAA==} engines: {node: '>=12'} @@ -479,6 +564,12 @@ packages: cpu: [mips64el] os: [linux] + '@esbuild/linux-mips64el@0.18.20': + resolution: {integrity: sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==} + engines: {node: '>=12'} + cpu: [mips64el] + os: [linux] + '@esbuild/linux-mips64el@0.19.12': resolution: {integrity: sha512-fEnAuj5VGTanfJ07ff0gOA6IPsvrVHLVb6Lyd1g2/ed67oU1eFzL0r9WL7ZzscD+/N6i3dWumGE1Un4f7Amf+w==} engines: {node: '>=12'} @@ -497,6 +588,12 @@ packages: cpu: [ppc64] os: [linux] + '@esbuild/linux-ppc64@0.18.20': + resolution: {integrity: sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==} + engines: {node: '>=12'} + cpu: [ppc64] + os: [linux] + '@esbuild/linux-ppc64@0.19.12': resolution: {integrity: sha512-nYJA2/QPimDQOh1rKWedNOe3Gfc8PabU7HT3iXWtNUbRzXS9+vgB0Fjaqr//XNbd82mCxHzik2qotuI89cfixg==} engines: {node: '>=12'} @@ -515,6 +612,12 @@ packages: cpu: [riscv64] os: [linux] + '@esbuild/linux-riscv64@0.18.20': + resolution: {integrity: sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==} + engines: {node: '>=12'} + cpu: [riscv64] + os: [linux] + '@esbuild/linux-riscv64@0.19.12': resolution: {integrity: sha512-2MueBrlPQCw5dVJJpQdUYgeqIzDQgw3QtiAHUC4RBz9FXPrskyyU3VI1hw7C0BSKB9OduwSJ79FTCqtGMWqJHg==} engines: {node: '>=12'} @@ -533,6 +636,12 @@ packages: cpu: [s390x] os: [linux] + '@esbuild/linux-s390x@0.18.20': + resolution: {integrity: sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==} + engines: {node: '>=12'} + cpu: [s390x] + os: [linux] + '@esbuild/linux-s390x@0.19.12': resolution: {integrity: sha512-+Pil1Nv3Umes4m3AZKqA2anfhJiVmNCYkPchwFJNEJN5QxmTs1uzyy4TvmDrCRNT2ApwSari7ZIgrPeUx4UZDg==} engines: {node: '>=12'} @@ -551,6 +660,12 @@ packages: cpu: [x64] os: [linux] + '@esbuild/linux-x64@0.18.20': + resolution: {integrity: sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==} + engines: {node: '>=12'} + cpu: [x64] + os: [linux] + '@esbuild/linux-x64@0.19.12': resolution: {integrity: sha512-B71g1QpxfwBvNrfyJdVDexenDIt1CiDN1TIXLbhOw0KhJzE78KIFGX6OJ9MrtC0oOqMWf+0xop4qEU8JrJTwCg==} engines: {node: '>=12'} @@ -569,6 +684,12 @@ packages: cpu: [x64] os: [netbsd] + '@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'} @@ -587,6 +708,12 @@ packages: cpu: [x64] os: [openbsd] + '@esbuild/openbsd-x64@0.18.20': + resolution: {integrity: sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==} + engines: {node: '>=12'} + cpu: [x64] + os: [openbsd] + '@esbuild/openbsd-x64@0.19.12': resolution: {integrity: sha512-RbrfTB9SWsr0kWmb9srfF+L933uMDdu9BIzdA7os2t0TXhCRjrQyCeOt6wVxr79CKD4c+p+YhCj31HBkYcXebw==} engines: {node: '>=12'} @@ -605,6 +732,12 @@ packages: cpu: [x64] os: [sunos] + '@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'} @@ -623,6 +756,12 @@ packages: cpu: [arm64] os: [win32] + '@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'} @@ -641,6 +780,12 @@ packages: cpu: [ia32] os: [win32] + '@esbuild/win32-ia32@0.18.20': + resolution: {integrity: sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==} + engines: {node: '>=12'} + cpu: [ia32] + os: [win32] + '@esbuild/win32-ia32@0.19.12': resolution: {integrity: sha512-+ZOE6pUkMOJfmxmBZElNOx72NKpIa/HFOMGzu8fqzQJ5kgf6aTGrcJaFsNiVMH4JKpMipyK+7k0n2UXN7a8YKQ==} engines: {node: '>=12'} @@ -659,6 +804,12 @@ packages: cpu: [x64] os: [win32] + '@esbuild/win32-x64@0.18.20': + resolution: {integrity: sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==} + engines: {node: '>=12'} + cpu: [x64] + os: [win32] + '@esbuild/win32-x64@0.19.12': resolution: {integrity: sha512-T1QyPSDCyMXaO3pzBkF96E8xMkiRYbUEZADd29SyPGabqxMViNoii+NcK7eWJAEoU6RZyEm5lVSIjTmcdoB9HA==} engines: {node: '>=12'} @@ -1321,6 +1472,9 @@ packages: buffer-crc32@0.2.13: resolution: {integrity: sha512-VO9Ht/+p3SN7SKWqcrgEzjGbRSJYTx+Q1pTQC0wrWqHx0vpJraQ6GtHx8tvcg1rlK1byhU5gccxgOgj7B0TDkQ==} + buffer-from@1.1.2: + resolution: {integrity: sha512-E+XQCRwSbaaiChtv6k6Dwgc+bx+Bs6vuKJHHl5kox/BaKbhiXzqQOwK4cO22yElGp2OCmjwVhT3HmxgyPGnJfQ==} + buffer-xor@1.0.3: resolution: {integrity: sha512-571s0T7nZWK6vB67HI5dyUF7wXiNcfaPPPTl6zYCNApANjIvYJTg7hlud/+cJpdAhS7dVzqMLmfhfHR3rAcOjQ==} @@ -1433,6 +1587,10 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} + consola@3.2.3: + resolution: {integrity: sha512-I5qxpzLv+sJhTVEoLYNcTW+bThDCPsit0vLNKShZx6rLtpilNpmmeTPaeqJb9ZE9dV3DGaeby6Vuhrw38WjeyQ==} + engines: {node: ^14.18.0 || >=16.10.0} + console-browserify@1.2.0: resolution: {integrity: sha512-ZMkYO/LkF17QvCPqM0gxw8yUzigAOZOSWSHg91FH6orS7vcEj5dVZTidN2fQ14yBSdg97RqhSNwLUXInd52OTA==} @@ -1622,6 +1780,9 @@ packages: resolution: {integrity: sha512-8QmQKqEASLd5nx0U1B1okLElbUuuttJ/AnYmRXbbbGDWh6uS208EjD4Xqq/I9wK7u0v6O08XhTWnt5XtEbR6Dg==} engines: {node: '>= 0.4'} + defu@6.1.4: + resolution: {integrity: sha512-mEQCMmwJu317oSz8CwdIOdwf3xMif1ttiM8LTufzc3g6kR+9Pe236twL8j3IYT1F7GfRgGcW6MWxzZjLIkuHIg==} + delaunator@5.0.1: resolution: {integrity: sha512-8nvh+XBe96aCESrGOqMp/84b13H9cdKbG5P2ejQCh4d4sK9RL4371qou9drQjMhvnPmhWl5hnmqbEE0fXr9Xnw==} @@ -1668,6 +1829,93 @@ packages: resolution: {integrity: sha512-ZmdL2rui+eB2YwhsWzjInR8LldtZHGDoQ1ugH85ppHKwpUHL7j7rN0Ti9NCnGiQbhaZ11FpR+7ao1dNsmduNUg==} engines: {node: '>=12'} + drizzle-kit@0.22.8: + resolution: {integrity: sha512-VjI4wsJjk3hSqHSa3TwBf+uvH6M6pRHyxyoVbt935GUzP9tUR/BRZ+MhEJNgryqbzN2Za1KP0eJMTgKEPsalYQ==} + hasBin: true + + drizzle-orm@0.31.2: + resolution: {integrity: sha512-QnenevbnnAzmbNzQwbhklvIYrDE8YER8K7kSrAWQSV1YvFCdSQPzj+jzqRdTSsV2cDqSpQ0NXGyL1G9I43LDLg==} + peerDependencies: + '@aws-sdk/client-rds-data': '>=3' + '@cloudflare/workers-types': '>=3' + '@electric-sql/pglite': '>=0.1.1' + '@libsql/client': '*' + '@neondatabase/serverless': '>=0.1' + '@op-engineering/op-sqlite': '>=2' + '@opentelemetry/api': ^1.4.1 + '@planetscale/database': '>=1' + '@tidbcloud/serverless': '*' + '@types/better-sqlite3': '*' + '@types/pg': '*' + '@types/react': '>=18' + '@types/sql.js': '*' + '@vercel/postgres': '>=0.8.0' + '@xata.io/client': '*' + better-sqlite3: '>=7' + bun-types: '*' + expo-sqlite: '>=13.2.0' + knex: '*' + kysely: '*' + mysql2: '>=2' + pg: '>=8' + postgres: '>=3' + react: '>=18' + sql.js: '>=1' + sqlite3: '>=5' + peerDependenciesMeta: + '@aws-sdk/client-rds-data': + optional: true + '@cloudflare/workers-types': + optional: true + '@electric-sql/pglite': + optional: true + '@libsql/client': + optional: true + '@neondatabase/serverless': + optional: true + '@op-engineering/op-sqlite': + optional: true + '@opentelemetry/api': + optional: true + '@planetscale/database': + optional: true + '@tidbcloud/serverless': + optional: true + '@types/better-sqlite3': + optional: true + '@types/pg': + optional: true + '@types/react': + optional: true + '@types/sql.js': + optional: true + '@vercel/postgres': + optional: true + '@xata.io/client': + optional: true + better-sqlite3: + optional: true + bun-types: + optional: true + expo-sqlite: + optional: true + knex: + optional: true + kysely: + optional: true + mysql2: + optional: true + pg: + optional: true + postgres: + optional: true + react: + optional: true + sql.js: + optional: true + sqlite3: + optional: true + electron-to-chromium@1.4.682: resolution: {integrity: sha512-oCglfs8yYKs9RQjJFOHonSnhikPK3y+0SvSYc/YpYJV//6rqc0/hbwd0c7vgK4vrl6y2gJAwjkhkSGWK+z4KRA==} @@ -1685,11 +1933,21 @@ packages: es6-promise@3.3.1: resolution: {integrity: sha512-SOp9Phqvqn7jtEUxPWdWfWoLmyt2VaJ6MpvP9Comy1MceMXqE6bxvaTu4iaxpYYPzhny28Lc+M87/c2cPK6lDg==} + esbuild-register@3.5.0: + resolution: {integrity: sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A==} + peerDependencies: + esbuild: '>=0.12 <1' + esbuild@0.17.19: resolution: {integrity: sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw==} engines: {node: '>=12'} hasBin: true + 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'} @@ -2238,8 +2496,8 @@ packages: resolution: {integrity: sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg==} engines: {node: '>=4'} - miniflare@3.20240329.0: - resolution: {integrity: sha512-kdHlMwhV241kck5oh8uyKPIhCusP1BL4+iOSeJZgcJ46EATA6crWtYqlARNU9t/iYXhzKhXOlOPJjjlCJuOgTA==} + miniflare@3.20240701.0: + resolution: {integrity: sha512-m9+I+7JNyqDGftCMKp9cK9pCZkK72hAL2mM9IWwhct+ZmucLBA8Uu6+rHQqA5iod86cpwOkrB2PrPA3wx9YNgw==} engines: {node: '>=16.13'} hasBin: true @@ -2306,6 +2564,9 @@ packages: resolution: {integrity: sha512-/jKZoMpw0F8GRwl4/eLROPA3cfcXtLApP0QzLmUT/HuPCZWyB7IY9ZrMeKw2O/nFIqPQB3PVM9aYm0F312AXDQ==} engines: {node: '>=10.5.0'} + node-fetch-native@1.6.4: + resolution: {integrity: sha512-IhOigYzAKHd244OC0JIMIUrjzctirCmPkaIfhDeGcEETWof5zKYUW7e7MYvChGWh/4CJeXEgsRyGzuF334rOOQ==} + node-fetch@3.3.2: resolution: {integrity: sha512-dRB78srN/l6gqWulah9SrxeYnxeddIG30+GOqK/9OlLVyLg3HPnr6SqOWTWOXKRwC2eGYCkZ59NNuSgvSrpgOA==} engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} @@ -2822,6 +3083,9 @@ packages: resolution: {integrity: sha512-itJW8lvSA0TXEphiRoawsCksnlf8SyvmFzIhltqAHluXd88pkCd+cXJVHTDwdCr0IzwptSm035IHQktUu1QUMg==} engines: {node: '>=0.10.0'} + source-map-support@0.5.21: + resolution: {integrity: sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w==} + source-map@0.6.1: resolution: {integrity: sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g==} engines: {node: '>=0.10.0'} @@ -3057,6 +3321,9 @@ packages: ufo@1.4.0: resolution: {integrity: sha512-Hhy+BhRBleFjpJ2vchUNN40qgkh0366FWJGqVLYBHev0vpHTrXSA0ryT+74UiW6KWsldNurQMKGqCm1M2zBciQ==} + ufo@1.5.3: + resolution: {integrity: sha512-Y7HYmWaFwPUmkoQCUIAYpKqkOf+SbVj/2fJJZ4RJMCfZp0rTGwRbzQD+HghfnhKOjL9E01okqz+ncJskGYfBNw==} + undici-types@5.26.5: resolution: {integrity: sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA==} @@ -3064,6 +3331,13 @@ packages: resolution: {integrity: sha512-3ItfzbrhDlINjaP0duwnNsKpDQk3acHI3gVJ1z4fmwMK31k5G9OVIAMLSIaP6w4FaGkaAkN6zaQO9LUvZ1t7VA==} engines: {node: '>=14.0'} + undici@5.28.4: + resolution: {integrity: sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==} + engines: {node: '>=14.0'} + + unenv-nightly@1.10.0-1717606461.a117952: + resolution: {integrity: sha512-u3TfBX02WzbHTpaEfWEKwDijDSFAHcgXkayUZ+MVDrjhLFvgAJzFGTSTmwlEhwWi2exyRQey23ah9wELMM6etg==} + unplugin-icons@0.18.5: resolution: {integrity: sha512-KVNAohXbZ7tVcG1C3p6QaC7wU9Qrj7etv4XvsMMJAxr5LccQZ+Iuv5LOIv/7GtqXaGN1BuFCqRO1ErsHEgEXdQ==} peerDependencies: @@ -3222,8 +3496,8 @@ packages: engines: {node: '>=8'} hasBin: true - workerd@1.20240329.0: - resolution: {integrity: sha512-6wWuMOwWsp3K6447XsI/MZYFq0KlpV2zVbbNFEkv3N7UgJJKaHGwL/hilr6RlS4UFLU4co8nrF2lc5uR781HKg==} + workerd@1.20240701.0: + resolution: {integrity: sha512-qSgNVqauqzNCij9MaJLF2c2ko3AnFioVSIxMSryGbRK+LvtGr9BKBt6JOxCb24DoJASoJDx3pe3DJHBVydUiBg==} engines: {node: '>=16'} hasBin: true @@ -3231,12 +3505,12 @@ packages: resolution: {integrity: sha512-+TvsA6VAVoMC3XDKR5MoC/qlLqDixEfOBysDEKnPIPou/NvoPWCAuXHXMsswwlvmEuvX56lQjvELLyLuzTKvRw==} engines: {node: '>=12'} - wrangler@3.42.0: - resolution: {integrity: sha512-t/Fq80aG5RrCyN118aV9oG1Tt66QEatz0tarKzpy0cuUMUf3T3yJAuYb6kmYIy6+beQJNoGWSAjjhAQnOn2MCQ==} + wrangler@3.63.1: + resolution: {integrity: sha512-fxMPNEyDc9pZNtQOuYqRikzv6lL5eP4S1zv7L/kw24uu1cCEmJ39j8bfJGzrAEqKDNsiFXVjEka0RjlpgEVWPg==} engines: {node: '>=16.17.0'} hasBin: true peerDependencies: - '@cloudflare/workers-types': ^4.20240320.1 + '@cloudflare/workers-types': ^4.20240620.0 peerDependenciesMeta: '@cloudflare/workers-types': optional: true @@ -3256,6 +3530,18 @@ packages: utf-8-validate: optional: true + ws@8.18.0: + resolution: {integrity: sha512-8VbfWfHLbbwu3+N6OKsOMpBdT4kXPDDB9cJk2bJ6mh9ucxdlnNvH1e+roYkKmN9Nxw2yjz7VzeO9oOz2zJ04Pw==} + engines: {node: '>=10.0.0'} + peerDependencies: + bufferutil: ^4.0.1 + utf-8-validate: '>=5.0.2' + peerDependenciesMeta: + bufferutil: + optional: true + utf-8-validate: + optional: true + xtend@4.0.2: resolution: {integrity: sha512-LKYU1iAXJXUgAXn9URjiu+MWhyUXHsvfp7mcuYm9dSUKK0/CjtrUwFAxD82/mCWbtLsGjFIad0wIsod4zrTAEQ==} engines: {node: '>=0.4'} @@ -3321,26 +3607,26 @@ snapshots: '@bufbuild/protobuf@1.10.0': {} - '@cloudflare/kv-asset-handler@0.3.1': + '@cloudflare/kv-asset-handler@0.3.4': dependencies: mime: 3.0.0 - '@cloudflare/workerd-darwin-64@1.20240329.0': + '@cloudflare/workerd-darwin-64@1.20240701.0': optional: true - '@cloudflare/workerd-darwin-arm64@1.20240329.0': + '@cloudflare/workerd-darwin-arm64@1.20240701.0': optional: true - '@cloudflare/workerd-linux-64@1.20240329.0': + '@cloudflare/workerd-linux-64@1.20240701.0': optional: true - '@cloudflare/workerd-linux-arm64@1.20240329.0': + '@cloudflare/workerd-linux-arm64@1.20240701.0': optional: true - '@cloudflare/workerd-windows-64@1.20240329.0': + '@cloudflare/workerd-windows-64@1.20240701.0': optional: true - '@cloudflare/workers-types@4.20240329.0': {} + '@cloudflare/workers-types@4.20240620.0': {} '@commander-js/extra-typings@12.0.1(commander@12.0.0)': dependencies: @@ -3360,6 +3646,16 @@ snapshots: dependencies: '@jridgewell/trace-mapping': 0.3.9 + '@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.7.2 + '@esbuild-plugins/node-globals-polyfill@0.2.3(esbuild@0.17.19)': dependencies: esbuild: 0.17.19 @@ -3379,6 +3675,9 @@ snapshots: '@esbuild/android-arm64@0.17.19': optional: true + '@esbuild/android-arm64@0.18.20': + optional: true + '@esbuild/android-arm64@0.19.12': optional: true @@ -3388,6 +3687,9 @@ snapshots: '@esbuild/android-arm@0.17.19': optional: true + '@esbuild/android-arm@0.18.20': + optional: true + '@esbuild/android-arm@0.19.12': optional: true @@ -3397,6 +3699,9 @@ snapshots: '@esbuild/android-x64@0.17.19': optional: true + '@esbuild/android-x64@0.18.20': + optional: true + '@esbuild/android-x64@0.19.12': optional: true @@ -3406,6 +3711,9 @@ snapshots: '@esbuild/darwin-arm64@0.17.19': optional: true + '@esbuild/darwin-arm64@0.18.20': + optional: true + '@esbuild/darwin-arm64@0.19.12': optional: true @@ -3415,6 +3723,9 @@ snapshots: '@esbuild/darwin-x64@0.17.19': optional: true + '@esbuild/darwin-x64@0.18.20': + optional: true + '@esbuild/darwin-x64@0.19.12': optional: true @@ -3424,6 +3735,9 @@ snapshots: '@esbuild/freebsd-arm64@0.17.19': optional: true + '@esbuild/freebsd-arm64@0.18.20': + optional: true + '@esbuild/freebsd-arm64@0.19.12': optional: true @@ -3433,6 +3747,9 @@ snapshots: '@esbuild/freebsd-x64@0.17.19': optional: true + '@esbuild/freebsd-x64@0.18.20': + optional: true + '@esbuild/freebsd-x64@0.19.12': optional: true @@ -3442,6 +3759,9 @@ snapshots: '@esbuild/linux-arm64@0.17.19': optional: true + '@esbuild/linux-arm64@0.18.20': + optional: true + '@esbuild/linux-arm64@0.19.12': optional: true @@ -3451,6 +3771,9 @@ snapshots: '@esbuild/linux-arm@0.17.19': optional: true + '@esbuild/linux-arm@0.18.20': + optional: true + '@esbuild/linux-arm@0.19.12': optional: true @@ -3460,6 +3783,9 @@ snapshots: '@esbuild/linux-ia32@0.17.19': optional: true + '@esbuild/linux-ia32@0.18.20': + optional: true + '@esbuild/linux-ia32@0.19.12': optional: true @@ -3469,6 +3795,9 @@ snapshots: '@esbuild/linux-loong64@0.17.19': optional: true + '@esbuild/linux-loong64@0.18.20': + optional: true + '@esbuild/linux-loong64@0.19.12': optional: true @@ -3478,6 +3807,9 @@ snapshots: '@esbuild/linux-mips64el@0.17.19': optional: true + '@esbuild/linux-mips64el@0.18.20': + optional: true + '@esbuild/linux-mips64el@0.19.12': optional: true @@ -3487,6 +3819,9 @@ snapshots: '@esbuild/linux-ppc64@0.17.19': optional: true + '@esbuild/linux-ppc64@0.18.20': + optional: true + '@esbuild/linux-ppc64@0.19.12': optional: true @@ -3496,6 +3831,9 @@ snapshots: '@esbuild/linux-riscv64@0.17.19': optional: true + '@esbuild/linux-riscv64@0.18.20': + optional: true + '@esbuild/linux-riscv64@0.19.12': optional: true @@ -3505,6 +3843,9 @@ snapshots: '@esbuild/linux-s390x@0.17.19': optional: true + '@esbuild/linux-s390x@0.18.20': + optional: true + '@esbuild/linux-s390x@0.19.12': optional: true @@ -3514,6 +3855,9 @@ snapshots: '@esbuild/linux-x64@0.17.19': optional: true + '@esbuild/linux-x64@0.18.20': + optional: true + '@esbuild/linux-x64@0.19.12': optional: true @@ -3523,6 +3867,9 @@ snapshots: '@esbuild/netbsd-x64@0.17.19': optional: true + '@esbuild/netbsd-x64@0.18.20': + optional: true + '@esbuild/netbsd-x64@0.19.12': optional: true @@ -3532,6 +3879,9 @@ snapshots: '@esbuild/openbsd-x64@0.17.19': optional: true + '@esbuild/openbsd-x64@0.18.20': + optional: true + '@esbuild/openbsd-x64@0.19.12': optional: true @@ -3541,6 +3891,9 @@ snapshots: '@esbuild/sunos-x64@0.17.19': optional: true + '@esbuild/sunos-x64@0.18.20': + optional: true + '@esbuild/sunos-x64@0.19.12': optional: true @@ -3550,6 +3903,9 @@ snapshots: '@esbuild/win32-arm64@0.17.19': optional: true + '@esbuild/win32-arm64@0.18.20': + optional: true + '@esbuild/win32-arm64@0.19.12': optional: true @@ -3559,6 +3915,9 @@ snapshots: '@esbuild/win32-ia32@0.17.19': optional: true + '@esbuild/win32-ia32@0.18.20': + optional: true + '@esbuild/win32-ia32@0.19.12': optional: true @@ -3568,6 +3927,9 @@ snapshots: '@esbuild/win32-x64@0.17.19': optional: true + '@esbuild/win32-x64@0.18.20': + optional: true + '@esbuild/win32-x64@0.19.12': optional: true @@ -3799,13 +4161,13 @@ snapshots: '@sveltejs/kit': 2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)) import-meta-resolve: 4.0.0 - '@sveltejs/adapter-cloudflare@4.2.0(@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(wrangler@3.42.0(@cloudflare/workers-types@4.20240329.0))': + '@sveltejs/adapter-cloudflare@4.2.0(@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(wrangler@3.63.1(@cloudflare/workers-types@4.20240620.0))': dependencies: - '@cloudflare/workers-types': 4.20240329.0 + '@cloudflare/workers-types': 4.20240620.0 '@sveltejs/kit': 2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)) esbuild: 0.19.12 worktop: 0.8.0-next.18 - wrangler: 3.42.0(@cloudflare/workers-types@4.20240329.0) + wrangler: 3.63.1(@cloudflare/workers-types@4.20240620.0) '@sveltejs/kit@2.5.5(@sveltejs/vite-plugin-svelte@3.0.2(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24)))(svelte@4.2.12)(vite@5.2.8(@types/node@20.11.24))': dependencies: @@ -4290,6 +4652,8 @@ snapshots: buffer-crc32@0.2.13: {} + buffer-from@1.1.2: {} + buffer-xor@1.0.3: {} buffer@5.7.1: @@ -4421,6 +4785,8 @@ snapshots: concat-map@0.0.1: {} + consola@3.2.3: {} + console-browserify@1.2.0: {} constants-browserify@1.0.0: {} @@ -4620,6 +4986,8 @@ snapshots: has-property-descriptors: 1.0.2 object-keys: 1.1.1 + defu@6.1.4: {} + delaunator@5.0.1: dependencies: robust-predicates: 3.0.2 @@ -4659,6 +5027,19 @@ snapshots: dotenv@16.4.5: {} + drizzle-kit@0.22.8: + dependencies: + '@esbuild-kit/esm-loader': 2.6.5 + esbuild: 0.19.12 + esbuild-register: 3.5.0(esbuild@0.19.12) + transitivePeerDependencies: + - supports-color + + drizzle-orm@0.31.2(@cloudflare/workers-types@4.20240620.0)(postgres@3.4.4): + optionalDependencies: + '@cloudflare/workers-types': 4.20240620.0 + postgres: 3.4.4 + electron-to-chromium@1.4.682: {} elliptic@6.5.5: @@ -4679,6 +5060,13 @@ snapshots: es6-promise@3.3.1: {} + esbuild-register@3.5.0(esbuild@0.19.12): + dependencies: + debug: 4.3.4 + esbuild: 0.19.12 + transitivePeerDependencies: + - supports-color + esbuild@0.17.19: optionalDependencies: '@esbuild/android-arm': 0.17.19 @@ -4704,6 +5092,31 @@ snapshots: '@esbuild/win32-ia32': 0.17.19 '@esbuild/win32-x64': 0.17.19 + 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 @@ -5349,7 +5762,7 @@ snapshots: min-indent@1.0.1: {} - miniflare@3.20240329.0: + miniflare@3.20240701.0: dependencies: '@cspotcode/source-map-support': 0.8.1 acorn: 8.11.3 @@ -5358,9 +5771,9 @@ snapshots: exit-hook: 2.2.1 glob-to-regexp: 0.4.1 stoppable: 1.1.0 - undici: 5.28.3 - workerd: 1.20240329.0 - ws: 8.16.0 + undici: 5.28.4 + workerd: 1.20240701.0 + ws: 8.18.0 youch: 3.3.3 zod: 3.22.4 transitivePeerDependencies: @@ -5419,6 +5832,8 @@ snapshots: node-domexception@1.0.0: {} + node-fetch-native@1.6.4: {} + node-fetch@3.3.2: dependencies: data-uri-to-buffer: 4.0.1 @@ -5949,6 +6364,11 @@ snapshots: source-map-js@1.2.0: {} + source-map-support@0.5.21: + dependencies: + buffer-from: 1.1.2 + source-map: 0.6.1 + source-map@0.6.1: {} sourcemap-codec@1.4.8: {} @@ -6236,12 +6656,27 @@ snapshots: ufo@1.4.0: {} + ufo@1.5.3: {} + undici-types@5.26.5: {} undici@5.28.3: dependencies: '@fastify/busboy': 2.1.1 + undici@5.28.4: + dependencies: + '@fastify/busboy': 2.1.1 + + unenv-nightly@1.10.0-1717606461.a117952: + dependencies: + consola: 3.2.3 + defu: 6.1.4 + mime: 3.0.0 + node-fetch-native: 1.6.4 + pathe: 1.1.2 + ufo: 1.5.3 + unplugin-icons@0.18.5: dependencies: '@antfu/install-pkg': 0.3.1 @@ -6406,37 +6841,39 @@ snapshots: siginfo: 2.0.0 stackback: 0.0.2 - workerd@1.20240329.0: + workerd@1.20240701.0: optionalDependencies: - '@cloudflare/workerd-darwin-64': 1.20240329.0 - '@cloudflare/workerd-darwin-arm64': 1.20240329.0 - '@cloudflare/workerd-linux-64': 1.20240329.0 - '@cloudflare/workerd-linux-arm64': 1.20240329.0 - '@cloudflare/workerd-windows-64': 1.20240329.0 + '@cloudflare/workerd-darwin-64': 1.20240701.0 + '@cloudflare/workerd-darwin-arm64': 1.20240701.0 + '@cloudflare/workerd-linux-64': 1.20240701.0 + '@cloudflare/workerd-linux-arm64': 1.20240701.0 + '@cloudflare/workerd-windows-64': 1.20240701.0 worktop@0.8.0-next.18: dependencies: mrmime: 2.0.0 regexparam: 3.0.0 - wrangler@3.42.0(@cloudflare/workers-types@4.20240329.0): + wrangler@3.63.1(@cloudflare/workers-types@4.20240620.0): dependencies: - '@cloudflare/kv-asset-handler': 0.3.1 + '@cloudflare/kv-asset-handler': 0.3.4 '@esbuild-plugins/node-globals-polyfill': 0.2.3(esbuild@0.17.19) '@esbuild-plugins/node-modules-polyfill': 0.2.2(esbuild@0.17.19) blake3-wasm: 2.1.5 chokidar: 3.6.0 + date-fns: 3.6.0 esbuild: 0.17.19 - miniflare: 3.20240329.0 + miniflare: 3.20240701.0 nanoid: 3.3.7 path-to-regexp: 6.2.1 resolve: 1.22.8 resolve.exports: 2.0.2 selfsigned: 2.4.1 source-map: 0.6.1 + unenv: unenv-nightly@1.10.0-1717606461.a117952 xxhash-wasm: 1.0.2 optionalDependencies: - '@cloudflare/workers-types': 4.20240329.0 + '@cloudflare/workers-types': 4.20240620.0 fsevents: 2.3.3 transitivePeerDependencies: - bufferutil @@ -6447,6 +6884,8 @@ snapshots: ws@8.16.0: {} + ws@8.18.0: {} + xtend@4.0.2: {} xxhash-wasm@1.0.2: {} diff --git a/prisma/schema.prisma b/prisma/schema.prisma deleted file mode 100644 index 0cbf019..0000000 --- a/prisma/schema.prisma +++ /dev/null @@ -1,749 +0,0 @@ -generator client { - provider = "prisma-client-js" - previewFeatures = ["relationJoins", "driverAdapters"] -} - -datasource db { - provider = "postgresql" - url = env("DATABASE_URL") -} - -model ada_pots { - id BigInt @id @default(autoincrement()) - slot_no BigInt - epoch_no Int - treasury Decimal @db.Decimal(20, 0) - reserves Decimal @db.Decimal(20, 0) - rewards Decimal @db.Decimal(20, 0) - utxo Decimal @db.Decimal(20, 0) - deposits Decimal @db.Decimal(20, 0) - fees Decimal @db.Decimal(20, 0) - block_id BigInt @unique(map: "unique_ada_pots") -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model block { - id BigInt @id @default(autoincrement()) - hash Bytes @unique(map: "unique_block") - epoch_no Int? - slot_no BigInt? - epoch_slot_no Int? - block_no Int? - previous_id BigInt? - slot_leader_id BigInt - size Int - time DateTime @db.Timestamp(6) - tx_count BigInt - proto_major Int - proto_minor Int - vrf_key String? @db.VarChar - op_cert Bytes? - op_cert_counter BigInt? - - txs tx[] - - @@index([block_no], map: "idx_block_block_no") - @@index([epoch_no], map: "idx_block_epoch_no") - @@index([hash], map: "idx_block_hash") - @@index([previous_id], map: "idx_block_previous_id") - @@index([slot_leader_id], map: "idx_block_slot_leader_id") - @@index([slot_no], map: "idx_block_slot_no") - @@index([time], map: "idx_block_time") -} - -/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. -model blocks_in_interest { - id BigInt? - time DateTime? @db.Timestamp(6) - - @@index([id], map: "idx_blocks_in_interest_id") - @@ignore -} - -model collateral_tx_in { - id BigInt @id @default(autoincrement()) - tx_in_id BigInt - tx_out_id BigInt - tx_out_index Int @db.SmallInt - - @@unique([tx_in_id, tx_out_id, tx_out_index], map: "unique_col_txin") - @@index([tx_in_id], map: "bf_idx_collateral_tx_in_tx_in_id") - @@index([tx_out_id], map: "idx_collateral_tx_in_tx_out_id") -} - -model collateral_tx_out { - id BigInt @id @default(autoincrement()) - tx_id BigInt - index Int @db.SmallInt - address String @db.VarChar - address_raw Bytes - address_has_script Boolean - payment_cred Bytes? - stake_address_id BigInt? - value Decimal @db.Decimal(20, 0) - data_hash Bytes? - multi_assets_descr String @db.VarChar - inline_datum_id BigInt? - reference_script_id BigInt? - - @@unique([tx_id, index], map: "unique_col_txout") - @@index([tx_id], map: "bf_idx_col_tx_out") - @@index([inline_datum_id]) - @@index([reference_script_id]) - @@index([stake_address_id]) -} - -model cost_model { - id BigInt @id @default(autoincrement()) - costs Json - hash Bytes @unique(map: "unique_cost_model") -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model datum { - id BigInt @id @default(autoincrement()) - hash Bytes @unique(map: "unique_datum") - value Json? - bytes Bytes - - tx tx @relation(fields: [tx_id], references: [id]) - tx_id BigInt - - tx_out tx_out[] - - @@index([tx_id], map: "idx_datum_tx_id") -} - -model delegation { - id BigInt @id @default(autoincrement()) - addr_id BigInt - cert_index Int - pool_hash_id BigInt - active_epoch_no BigInt - tx_id BigInt - slot_no BigInt - - redeemer redeemer? @relation(fields: [redeemer_id], references: [id]) - redeemer_id BigInt? - - @@unique([tx_id, cert_index], map: "unique_delegation") - @@index([active_epoch_no], map: "idx_delegation_active_epoch_no") - @@index([addr_id], map: "idx_delegation_addr_id") - @@index([pool_hash_id], map: "idx_delegation_pool_hash_id") - @@index([redeemer_id], map: "idx_delegation_redeemer_id") - @@index([tx_id], map: "idx_delegation_tx_id") -} - -model delisted_pool { - id BigInt @id @default(autoincrement()) - hash_raw Bytes @unique(map: "unique_delisted_pool") -} - -model epoch { - id BigInt @id @default(autoincrement()) - out_sum Decimal @db.Decimal(39, 0) - fees Decimal @db.Decimal(20, 0) - tx_count Int - blk_count Int - no Int @unique(map: "unique_epoch") - start_time DateTime @db.Timestamp(6) - end_time DateTime @db.Timestamp(6) - - @@index([no], map: "idx_epoch_no") -} - -model epoch_param { - id BigInt @id @default(autoincrement()) - epoch_no Int - min_fee_a Int - min_fee_b Int - max_block_size Int - max_tx_size Int - max_bh_size Int - key_deposit Decimal @db.Decimal(20, 0) - pool_deposit Decimal @db.Decimal(20, 0) - max_epoch Int - optimal_pool_count Int - influence Float - monetary_expand_rate Float - treasury_growth_rate Float - decentralisation Float - protocol_major Int - protocol_minor Int - min_utxo_value Decimal @db.Decimal(20, 0) - min_pool_cost Decimal @db.Decimal(20, 0) - nonce Bytes? - cost_model_id BigInt? - price_mem Float? - price_step Float? - max_tx_ex_mem Decimal? @db.Decimal(20, 0) - max_tx_ex_steps Decimal? @db.Decimal(20, 0) - max_block_ex_mem Decimal? @db.Decimal(20, 0) - max_block_ex_steps Decimal? @db.Decimal(20, 0) - max_val_size Decimal? @db.Decimal(20, 0) - collateral_percent Int? - max_collateral_inputs Int? - block_id BigInt - extra_entropy Bytes? - coins_per_utxo_size Decimal? @db.Decimal(20, 0) - - @@unique([epoch_no, block_id], map: "unique_epoch_param") - @@index([block_id], map: "idx_epoch_param_block_id") - @@index([cost_model_id], map: "idx_epoch_param_cost_model_id") -} - -model epoch_stake { - id BigInt @id @default(autoincrement()) - addr_id BigInt - pool_id BigInt - amount Decimal @db.Decimal(20, 0) - epoch_no Int - - @@unique([epoch_no, id], map: "bf_u_idx_epoch_stake_epoch_and_id") - @@unique([epoch_no, addr_id, pool_id], map: "unique_stake") - @@index([addr_id], map: "idx_epoch_stake_addr_id") - @@index([epoch_no], map: "idx_epoch_stake_epoch_no") - @@index([pool_id], map: "idx_epoch_stake_pool_id") -} - -model epoch_sync_time { - id BigInt @id @default(autoincrement()) - no BigInt @unique(map: "unique_epoch_sync_time") - seconds BigInt - state syncstatetype -} - -model extra_key_witness { - id BigInt @id @default(autoincrement()) - hash Bytes - tx_id BigInt - - @@index([tx_id], map: "idx_extra_key_witness_tx_id") -} - -model ma_tx_mint { - id BigInt @id @default(autoincrement()) - quantity Decimal @db.Decimal(20, 0) - tx_id BigInt - ident BigInt - - @@unique([ident, tx_id], map: "unique_ma_tx_mint") - @@index([ident], map: "bf_idx_ma_tx_mint_ident") - @@index([tx_id], map: "idx_ma_tx_mint_tx_id") -} - -model ma_tx_out { - id BigInt @id @default(autoincrement()) - quantity Decimal @db.Decimal(20, 0) - - tx_out tx_out @relation(fields: [tx_out_id], references: [id]) - tx_out_id BigInt - - multi_asset multi_asset @relation(fields: [ident], references: [id]) - ident BigInt - - @@unique([ident, tx_out_id], map: "unique_ma_tx_out") - @@index([ident], map: "bf_idx_ma_tx_out_ident") - @@index([ident], map: "idx_ident") - @@index([tx_out_id], map: "idx_ma_tx_out_tx_out_id") - @@index([ident(sort: Desc)], map: "ma_tx_out_ident_index") -} - -model meta { - id BigInt @id @default(autoincrement()) - start_time DateTime @unique(map: "unique_meta") @db.Timestamp(6) - network_name String @db.VarChar - version String @db.VarChar -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model multi_asset { - id BigInt @id @default(autoincrement()) - policy Bytes - name Bytes - fingerprint String @db.VarChar - ma_tx_out ma_tx_out[] - - @@unique([policy, name], map: "unique_multi_asset") - @@index([name], map: "idx_multi_asset_name") - @@index([policy], map: "idx_multi_asset_policy") - @@index([fingerprint], map: "multi_asset_fingerprint") -} - -model param_proposal { - id BigInt @id @default(autoincrement()) - epoch_no Int - key Bytes - min_fee_a Decimal? @db.Decimal(20, 0) - min_fee_b Decimal? @db.Decimal(20, 0) - max_block_size Decimal? @db.Decimal(20, 0) - max_tx_size Decimal? @db.Decimal(20, 0) - max_bh_size Decimal? @db.Decimal(20, 0) - key_deposit Decimal? @db.Decimal(20, 0) - pool_deposit Decimal? @db.Decimal(20, 0) - max_epoch Decimal? @db.Decimal(20, 0) - optimal_pool_count Decimal? @db.Decimal(20, 0) - influence Float? - monetary_expand_rate Float? - treasury_growth_rate Float? - decentralisation Float? - entropy Bytes? - protocol_major Int? - protocol_minor Int? - min_utxo_value Decimal? @db.Decimal(20, 0) - min_pool_cost Decimal? @db.Decimal(20, 0) - cost_model_id BigInt? - price_mem Float? - price_step Float? - max_tx_ex_mem Decimal? @db.Decimal(20, 0) - max_tx_ex_steps Decimal? @db.Decimal(20, 0) - max_block_ex_mem Decimal? @db.Decimal(20, 0) - max_block_ex_steps Decimal? @db.Decimal(20, 0) - max_val_size Decimal? @db.Decimal(20, 0) - collateral_percent Int? - max_collateral_inputs Int? - registered_tx_id BigInt - coins_per_utxo_size Decimal? @db.Decimal(20, 0) - - @@unique([key, registered_tx_id], map: "unique_param_proposal") - @@index([cost_model_id], map: "idx_param_proposal_cost_model_id") - @@index([registered_tx_id], map: "idx_param_proposal_registered_tx_id") -} - -model pool_hash { - id BigInt @id @default(autoincrement()) - hash_raw Bytes @unique(map: "unique_pool_hash") - view String @db.VarChar - - @@index([view], map: "bf_idx_pool_hash_view", type: Hash) -} - -model pool_metadata_ref { - id BigInt @id @default(autoincrement()) - pool_id BigInt - url String @db.VarChar - hash Bytes - registered_tx_id BigInt - - @@unique([pool_id, url, hash], map: "unique_pool_metadata_ref") - @@index([pool_id], map: "idx_pool_metadata_ref_pool_id") - @@index([registered_tx_id], map: "idx_pool_metadata_ref_registered_tx_id") -} - -model pool_offline_data { - id BigInt @id @default(autoincrement()) - pool_id BigInt - ticker_name String @db.VarChar - hash Bytes - json Json - bytes Bytes - pmr_id BigInt - - @@unique([pool_id, hash], map: "unique_pool_offline_data") - @@index([pmr_id], map: "idx_pool_offline_data_pmr_id") -} - -model pool_offline_fetch_error { - id BigInt @id @default(autoincrement()) - pool_id BigInt - fetch_time DateTime @db.Timestamp(6) - pmr_id BigInt - fetch_error String @db.VarChar - retry_count Int - - @@unique([pool_id, fetch_time, retry_count], map: "unique_pool_offline_fetch_error") - @@index([pmr_id], map: "idx_pool_offline_fetch_error_pmr_id") -} - -model pool_owner { - id BigInt @id @default(autoincrement()) - addr_id BigInt - pool_update_id BigInt - - @@unique([addr_id, pool_update_id], map: "unique_pool_owner") - @@index([pool_update_id]) -} - -model pool_relay { - id BigInt @id @default(autoincrement()) - update_id BigInt - ipv4 String? @db.VarChar - ipv6 String? @db.VarChar - dns_name String? @db.VarChar - dns_srv_name String? @db.VarChar - port Int? - - @@unique([update_id, ipv4, ipv6, dns_name], map: "unique_pool_relay") - @@index([update_id], map: "idx_pool_relay_update_id") -} - -model pool_retire { - id BigInt @id @default(autoincrement()) - hash_id BigInt - cert_index Int - announced_tx_id BigInt - retiring_epoch Int - - @@unique([announced_tx_id, cert_index], map: "unique_pool_retiring") - @@index([announced_tx_id], map: "idx_pool_retire_announced_tx_id") - @@index([hash_id], map: "idx_pool_retire_hash_id") -} - -model pool_update { - id BigInt @id @default(autoincrement()) - hash_id BigInt - cert_index Int - vrf_key_hash Bytes - pledge Decimal @db.Decimal(20, 0) - active_epoch_no BigInt - meta_id BigInt? - margin Float - fixed_cost Decimal @db.Decimal(20, 0) - registered_tx_id BigInt - reward_addr_id BigInt - - @@unique([registered_tx_id, cert_index], map: "unique_pool_update") - @@index([active_epoch_no], map: "idx_pool_update_active_epoch_no") - @@index([hash_id], map: "idx_pool_update_hash_id") - @@index([meta_id], map: "idx_pool_update_meta_id") - @@index([registered_tx_id], map: "idx_pool_update_registered_tx_id") - @@index([reward_addr_id], map: "idx_pool_update_reward_addr") -} - -model pot_transfer { - id BigInt @id @default(autoincrement()) - cert_index Int - treasury Decimal @db.Decimal(20, 0) - reserves Decimal @db.Decimal(20, 0) - tx_id BigInt - - @@unique([tx_id, cert_index], map: "unique_pot_transfer") -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model redeemer { - id BigInt @id @default(autoincrement()) - - tx tx @relation(fields: [tx_id], references: [id]) - tx_id BigInt - - unit_mem BigInt - unit_steps BigInt - fee Decimal? @db.Decimal(20, 0) - purpose scriptpurposetype - index Int - script_hash Bytes? - - redeemer_data redeemer_data @relation(fields: [redeemer_data_id], references: [id]) - redeemer_data_id BigInt - - delegations delegation[] - tx_in tx_in[] - - @@unique([tx_id, purpose, index], map: "unique_redeemer") - @@index([tx_id], map: "bf_idx_redeemer_tx_id") - @@index([redeemer_data_id]) -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model redeemer_data { - id BigInt @id @default(autoincrement()) - hash Bytes @unique(map: "unique_redeemer_data") - tx_id BigInt - value Json? - bytes Bytes - - redeemers redeemer[] - - @@index([tx_id]) -} - -model reference_tx_in { - id BigInt @id @default(autoincrement()) - tx_in_id BigInt - tx_out_id BigInt - tx_out_index Int @db.SmallInt - - @@unique([tx_in_id, tx_out_id, tx_out_index], map: "unique_ref_txin") - @@index([tx_in_id], map: "bf_idx_reference_tx_in_tx_in_id") - @@index([tx_out_id]) -} - -model reserve { - id BigInt @id @default(autoincrement()) - addr_id BigInt - cert_index Int - amount Decimal @db.Decimal(20, 0) - tx_id BigInt - - @@unique([addr_id, tx_id, cert_index], map: "unique_reserves") - @@index([addr_id], map: "idx_reserve_addr_id") - @@index([tx_id], map: "idx_reserve_tx_id") -} - -model reserved_pool_ticker { - id BigInt @id @default(autoincrement()) - name String @unique(map: "unique_reserved_pool_ticker") @db.VarChar - pool_hash Bytes - - @@index([pool_hash], map: "idx_reserved_pool_ticker_pool_hash") -} - -model reverse_index { - id BigInt @id @default(autoincrement()) - block_id BigInt - min_ids String? @db.VarChar -} - -model reward { - id BigInt @id @default(autoincrement()) - addr_id BigInt - type rewardtype - amount Decimal @db.Decimal(20, 0) - earned_epoch BigInt - spendable_epoch BigInt - pool_id BigInt? - - @@unique([addr_id, type, earned_epoch, pool_id], map: "unique_reward") - @@index([addr_id], map: "idx_reward_addr_id") - @@index([earned_epoch], map: "idx_reward_earned_epoch") - @@index([pool_id], map: "idx_reward_pool_id") - @@index([spendable_epoch], map: "idx_reward_spendable_epoch") - @@index([type], map: "idx_reward_type") -} - -model schema_version { - id BigInt @id @default(autoincrement()) - stage_one BigInt - stage_two BigInt - stage_three BigInt -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model script { - id BigInt @id @default(autoincrement()) - tx_id BigInt - hash Bytes @unique(map: "unique_script") - type scripttype - json Json? - bytes Bytes? - serialised_size Int? - - @@index([tx_id], map: "idx_script_tx_id") -} - -model slot_leader { - id BigInt @id @default(autoincrement()) - hash Bytes @unique(map: "unique_slot_leader") - pool_hash_id BigInt? - description String @db.VarChar - - @@index([pool_hash_id], map: "idx_slot_leader_pool_hash_id") -} - -model stake_address { - id BigInt @id @default(autoincrement()) - hash_raw Bytes @unique(map: "unique_stake_address") - view String @db.VarChar - script_hash Bytes? - tx_out tx_out[] - - @@index([hash_raw], map: "idx_stake_address_hash_raw") - @@index([view], map: "idx_stake_address_view", type: Hash) - @@index([view], map: "stake_address_idx") -} - -model stake_deregistration { - id BigInt @id @default(autoincrement()) - addr_id BigInt - cert_index Int - epoch_no Int - tx_id BigInt - redeemer_id BigInt? - - @@unique([tx_id, cert_index], map: "unique_stake_deregistration") - @@index([addr_id], map: "idx_stake_deregistration_addr_id") - @@index([redeemer_id], map: "idx_stake_deregistration_redeemer_id") - @@index([tx_id], map: "idx_stake_deregistration_tx_id") -} - -model stake_registration { - id BigInt @id @default(autoincrement()) - addr_id BigInt - cert_index Int - epoch_no Int - tx_id BigInt - - @@unique([tx_id, cert_index], map: "unique_stake_registration") - @@index([addr_id], map: "idx_stake_registration_addr_id") - @@index([tx_id], map: "idx_stake_registration_tx_id") -} - -/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. -model tmp_stake_keys { - stake_key String? @db.Char(59) - - @@index([stake_key], map: "tmp_stake_key_idx") - @@ignore -} - -model treasury { - id BigInt @id @default(autoincrement()) - addr_id BigInt - cert_index Int - amount Decimal @db.Decimal(20, 0) - tx_id BigInt - - @@unique([addr_id, tx_id, cert_index], map: "unique_treasury") - @@index([addr_id], map: "idx_treasury_addr_id") - @@index([tx_id], map: "idx_treasury_tx_id") -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model tx { - id BigInt @id @default(autoincrement()) - hash Bytes @unique(map: "unique_tx") - block_index Int - out_sum Decimal @db.Decimal(20, 0) - fee Decimal @db.Decimal(20, 0) - deposit BigInt - size Int - invalid_before Decimal? @db.Decimal(20, 0) - invalid_hereafter Decimal? @db.Decimal(20, 0) - valid_contract Boolean - script_size Int - - block block @relation(fields: [block_id], references: [id]) - block_id BigInt - - tx_outs tx_out[] - - datums datum[] - - tx_ins tx_in[] - - redeemers redeemer[] - - @@index([block_id], map: "idx_tx_block_id") - @@index([hash], map: "idx_tx_hash") - @@index([valid_contract], map: "idx_tx_valid_contract") -} - -model tx_in { - id BigInt @id @default(autoincrement()) - - tx tx @relation(fields: [tx_in_id], references: [id]) - tx_in_id BigInt - - tx_out tx_out @relation(fields: [tx_out_id], references: [id]) - tx_out_id BigInt - tx_out_index Int @db.SmallInt - - redeemer redeemer? @relation(fields: [redeemer_id], references: [id]) - redeemer_id BigInt? - - @@unique([tx_out_id, tx_out_index], map: "unique_txin") - @@index([tx_out_id], map: "idx_tx_in_consuming_tx") - @@index([tx_out_id, tx_out_index], map: "idx_tx_in_on_tx_out_id_and_tx_out_index") - @@index([redeemer_id], map: "idx_tx_in_redeemer_id") - @@index([tx_in_id], map: "idx_tx_in_source_tx") - @@index([tx_in_id], map: "idx_tx_in_tx_in_id") - @@index([tx_out_id], map: "idx_tx_in_tx_out_id") -} - -/// This model contains an expression index which requires additional setup for migrations. Visit https://pris.ly/d/expression-indexes for more info. -model tx_metadata { - id BigInt @id @default(autoincrement()) - key Decimal @db.Decimal(20, 0) - json Json? - bytes Bytes - tx_id BigInt - - @@unique([key, tx_id], map: "unique_tx_metadata") - @@index([tx_id], map: "idx_tx_metadata_tx_id") -} - -model tx_out { - id BigInt @id @default(autoincrement()) - index Int @db.SmallInt - address String @db.VarChar - address_raw Bytes - address_has_script Boolean - payment_cred Bytes? - value Decimal @db.Decimal(20, 0) - data_hash Bytes? - reference_script_id BigInt? - - stake_address stake_address? @relation(fields: [stake_address_id], references: [id]) - stake_address_id BigInt? - - tx tx @relation(fields: [tx_id], references: [id]) - tx_id BigInt - - datum datum? @relation(fields: [inline_datum_id], references: [id]) - inline_datum_id BigInt? - - tx_in tx_in[] - ma_tx_out ma_tx_out[] - - @@unique([tx_id, index], map: "unique_txout") - @@index([address], map: "idx_tx_out_address", type: Hash) - @@index([payment_cred], map: "idx_tx_out_payment_cred") - @@index([stake_address_id], map: "idx_tx_out_stake_address_id") - @@index([tx_id], map: "idx_tx_out_tx_id") - @@index([inline_datum_id]) - @@index([reference_script_id]) -} - -/// The underlying table does not contain a valid unique identifier and can therefore currently not be handled by Prisma Client. -model txs_of_lenfi { - id BigInt? - quantity Decimal? @db.Decimal(20, 0) - tx_out_id BigInt? - ident BigInt? - tx_id BigInt? - stake_address_id BigInt? - stake_address String? @db.VarChar - - @@ignore -} - -model withdrawal { - id BigInt @id @default(autoincrement()) - addr_id BigInt - amount Decimal @db.Decimal(20, 0) - redeemer_id BigInt? - tx_id BigInt - - @@unique([addr_id, tx_id], map: "unique_withdrawal") - @@index([addr_id], map: "idx_withdrawal_addr_id") - @@index([redeemer_id], map: "idx_withdrawal_redeemer_id") - @@index([tx_id], map: "idx_withdrawal_tx_id") -} - -enum rewardtype { - leader - member - reserves - treasury - refund -} - -enum scriptpurposetype { - spend - mint - cert - reward -} - -enum scripttype { - multisig - timelock - plutusV1 - plutusV2 -} - -enum syncstatetype { - lagging - following -} diff --git a/src/app.d.ts b/src/app.d.ts index dd61e5e..512fe24 100644 --- a/src/app.d.ts +++ b/src/app.d.ts @@ -6,7 +6,11 @@ declare global { // interface Locals {} // interface PageData {} // interface PageState {} - // interface Platform {} + interface Platform { + env: { + DB: D1Database; + }; + } } } diff --git a/src/lib/server/drizzle.ts b/src/lib/server/drizzle.ts new file mode 100644 index 0000000..cf13686 --- /dev/null +++ b/src/lib/server/drizzle.ts @@ -0,0 +1,7 @@ +import { drizzle as wrapper } from 'drizzle-orm/d1'; + +import * as schema from './schema.sql'; + +export function drizzle(d1: D1Database) { + return wrapper(d1, { schema }); +} diff --git a/src/lib/server/schema.sql.ts b/src/lib/server/schema.sql.ts new file mode 100644 index 0000000..6c62bf2 --- /dev/null +++ b/src/lib/server/schema.sql.ts @@ -0,0 +1,12 @@ +import { integer, sqliteTable, text } from 'drizzle-orm/sqlite-core'; + +export const blocks = sqliteTable('blocks', { + number: integer('number').notNull().primaryKey(), + hash: text('hash', { length: 64 }).notNull().unique(), + leading_zeros: integer('leading_zeros').notNull(), + target_number: integer('target_number').notNull(), + epoch_time: integer('epoch_time').notNull(), + current_posix_time: integer('current_posix_time').notNull(), + // only the genesis block has an undefined nonce + nonce: text('nonce', { length: 32 }), +}); diff --git a/src/routes/explorer/+page.server.ts b/src/routes/explorer/+page.server.ts index 07e5205..af9221b 100644 --- a/src/routes/explorer/+page.server.ts +++ b/src/routes/explorer/+page.server.ts @@ -1,14 +1,12 @@ -import postgres from 'postgres'; - -import { DATABASE_URL } from '$env/static/private'; +import { count } from 'drizzle-orm'; import type { PageServerLoadEvent } from './$types'; -import type { BlockData } from '$lib/types'; -import { V1_TUNA_POLICY_ID } from '$lib/constants'; +import { drizzle } from '$lib/server/drizzle'; +import * as schema from '$lib/server/schema.sql'; -export async function load({ url }: PageServerLoadEvent) { - const dbsync = postgres(DATABASE_URL); +export async function load({ url, platform }: PageServerLoadEvent) { + const db = drizzle(platform!.env.DB); const pageNumber = url.searchParams.get('page') ?? '1'; @@ -19,140 +17,18 @@ export async function load({ url }: PageServerLoadEvent) { parsedPageNumber = 1; } - const data = await dbsync` - SELECT - "ma_tx_out_tx_out"."__data__" AS "tx_out" - FROM - "public"."ma_tx_out" AS "t1" - LEFT JOIN "public"."multi_asset" AS "j1" ON ("j1"."id") = ("t1"."ident") - LEFT JOIN LATERAL ( - SELECT - JSONB_BUILD_OBJECT( - 'datum', "tx_out_datum"."__data__", - 'tx', "tx_out_tx"."__data__" - ) AS "__data__" - FROM - "public"."tx_out" AS "t2" - LEFT JOIN LATERAL ( - SELECT - JSONB_BUILD_OBJECT( - 'value', "t3"."value" - ) AS "__data__" - FROM - "public"."datum" AS "t3" - WHERE - "t2"."inline_datum_id" = "t3"."id" - LIMIT - 1 - ) AS "tx_out_datum" ON true - LEFT JOIN LATERAL ( - SELECT - JSONB_BUILD_OBJECT( - 'redeemers', "tx_redeemers"."__data__" - ) AS "__data__" - FROM - "public"."tx" AS "t4" - LEFT JOIN LATERAL ( - SELECT - COALESCE( - JSONB_AGG("__data__"), - '[]' - ) AS "__data__" - FROM - ( - SELECT - "t7"."__data__" - FROM - ( - SELECT - JSONB_BUILD_OBJECT( - 'redeemer_data', "redeemer_redeemer_data"."__data__" - ) AS "__data__", - "t6"."purpose", - "t6"."script_hash", - "t6"."redeemer_data_id" - FROM - ( - SELECT - "t5".* - FROM - "public"."redeemer" AS "t5" - WHERE - "t4"."id" = "t5"."tx_id" - ) AS "t6" - LEFT JOIN LATERAL ( - SELECT - JSONB_BUILD_OBJECT( - 'value', "t9"."value" - ) AS "__data__" - FROM - "public"."redeemer_data" AS "t9" - WHERE - "t6"."redeemer_data_id" = "t9"."id" - LIMIT - 1 - ) AS "redeemer_redeemer_data" ON true - ) AS "t7" - WHERE - ( - "t7"."purpose" = CAST( - ${'spend'} :: text AS "public"."scriptpurposetype" - ) - AND "t7"."script_hash" = decode(${V1_TUNA_POLICY_ID}, 'hex') - ) - ) AS "t8" - ) AS "tx_redeemers" ON true - WHERE - "t2"."tx_id" = "t4"."id" - LIMIT - 1 - ) AS "tx_out_tx" ON true - WHERE - "t1"."tx_out_id" = "t2"."id" - LIMIT - 1 - ) AS "ma_tx_out_tx_out" ON true - WHERE - ( - "j1"."policy" = decode(${V1_TUNA_POLICY_ID}, 'hex') - AND "j1"."name" = ${Buffer.from('lord tuna').toString()} - AND ("j1"."id" IS NOT NULL) - ) - ORDER BY - "t1"."id" DESC - LIMIT - ${parsedPageLimit} OFFSET ${(parsedPageNumber - 1) * parsedPageLimit} - `; + const blocks = await db.query.blocks.findMany({ + limit: parsedPageLimit, + offset: (parsedPageNumber - 1) * parsedPageLimit, + }); - const count = await dbsync` - SELECT COUNT(*) - FROM "public"."ma_tx_out" AS "t1" - LEFT JOIN "public"."multi_asset" AS "j1" ON ("j1"."id") = ("t1"."ident") - WHERE - ( - "j1"."policy" = decode(${V1_TUNA_POLICY_ID}, 'hex') - AND "j1"."name" = ${Buffer.from('lord tuna').toString()} - AND ("j1"."id" IS NOT NULL) - ) - `; + const result = await db.select({ count: count() }).from(schema.blocks); - const totalCount = count[0].count; + const totalCount = result[0].count; const canNextPage = totalCount > parsedPageLimit * parsedPageNumber; const canPrevPage = parsedPageNumber > 1; const totalPages = Math.ceil(totalCount / parsedPageLimit); - const blocks: BlockData[] = data.map((maTxOut) => ({ - block_number: maTxOut.tx_out.datum!.value.fields[0].int as number, - current_hash: maTxOut.tx_out.datum!.value.fields[1].bytes as string, - leading_zeros: maTxOut.tx_out.datum!.value.fields[2].int as number, - target_number: maTxOut.tx_out.datum!.value.fields[3].int as number, - epoch_time: maTxOut.tx_out.datum!.value.fields[4].int as number, - current_posix_time: maTxOut.tx_out.datum!.value.fields[5].int as number, - nonce: maTxOut.tx_out.tx.redeemers[0]?.redeemer_data?.value?.fields[0].bytes as - | string - | undefined, - })); - return { blocks, canNextPage, canPrevPage, totalPages, totalCount }; } diff --git a/src/routes/explorer/+page.svelte b/src/routes/explorer/+page.svelte index 6a7f863..9042c9a 100644 --- a/src/routes/explorer/+page.svelte +++ b/src/routes/explorer/+page.svelte @@ -4,7 +4,6 @@ import type { PageData } from './$types'; import { intlFormat } from 'date-fns/intlFormat'; - import { formatDistance } from 'date-fns/formatDistance'; export let data: PageData; @@ -51,19 +50,21 @@
Time
- {#each data.blocks as block (block.block_number)} + {#each data.blocks as block (block.number)}
-
{block.block_number}
+
{block.number}
+ {@html formatHash(makeTarget(block.target_number, block.leading_zeros))}
- {@html formatHash(block.current_hash)} + + {@html formatHash(block.hash)}
-
{Math.floor(block.block_number / 2016 + 1)}
+
{Math.floor(block.number / 2016 + 1)}
{intlFormat(block.current_posix_time)} diff --git a/svelte.config.js b/svelte.config.js index 86f25ed..6024e02 100644 --- a/svelte.config.js +++ b/svelte.config.js @@ -11,7 +11,12 @@ const config = { // adapter-auto only supports some environments, see https://kit.svelte.dev/docs/adapter-auto for a list. // If your environment is not supported or you settled on a specific environment, switch out the adapter. // See https://kit.svelte.dev/docs/adapters for more information about adapters. - adapter: adapter(), + adapter: adapter({ + routes: { + include: ['/*'], + exclude: [''], + }, + }), }, }; diff --git a/wrangler.toml b/wrangler.toml new file mode 100644 index 0000000..c3fb32a --- /dev/null +++ b/wrangler.toml @@ -0,0 +1,14 @@ +# Generated by Wrangler on Fri Jul 05 2024 21:09:39 GMT-0400 (Eastern Daylight Time) +name = "fortuna" +pages_build_output_dir = ".svelte-kit/cloudflare" +compatibility_date = "2024-03-29" +compatibility_flags = ["nodejs_compat"] + +[env.production] +compatibility_date = "2024-04-03" +compatibility_flags = ["nodejs_compat"] + +[[env.production.d1_databases]] +database_id = "c2cad9e2-396b-48fa-9498-1361d2ae3e30" +binding = "DB" +database_name = "DB"