From ac54af5610e3fcda0f30324979062bdea30a6cbb Mon Sep 17 00:00:00 2001 From: Omer Sabic Date: Wed, 29 May 2024 21:35:18 +0200 Subject: [PATCH] lotsa shit --- .env.example | 5 +- drizzle.config.js | 6 +- package-lock.json | 1212 ++++++++++++++--- package.json | 7 +- src/db/index.js | 3 +- src/db/migrations/0000_huge_ares.sql | 43 - .../0000_rapid_moira_mactaggert.sql | 81 ++ ..._tomorrow_man.sql => 0001_dizzy_preak.sql} | 4 +- src/db/migrations/0001_slim_xavin.sql | 6 - src/db/migrations/0002_bent_warpath.sql | 1 + src/db/migrations/0002_small_forge.sql | 1 - src/db/migrations/0003_elite_falcon.sql | 1 - .../migrations/0003_past_mikhail_rasputin.sql | 2 + src/db/migrations/0004_daffy_ironclad.sql | 1 - src/db/migrations/0004_worthless_meltdown.sql | 4 + src/db/migrations/0005_purple_firebird.sql | 1 + .../0005_tricky_sheva_callister.sql | 1 - src/db/migrations/0006_same_bulldozer.sql | 2 + src/db/migrations/0006_wide_the_hunter.sql | 1 - src/db/migrations/0007_familiar_thor_girl.sql | 2 - src/db/migrations/0007_shiny_colossus.sql | 1 + src/db/migrations/0008_jittery_piledriver.sql | 1 - src/db/migrations/0008_long_chameleon.sql | 1 + .../migrations/0009_aromatic_rachel_grey.sql | 1 + src/db/migrations/0009_opposite_slayback.sql | 1 - src/db/migrations/0010_same_famine.sql | 11 - src/db/migrations/0011_serious_tenebrous.sql | 1 - src/db/migrations/0012_nervous_penance.sql | 1 - .../migrations/0017_goofy_lethal_legion.sql | 8 - .../migrations/0018_light_victor_mancha.sql | 3 - src/db/migrations/0022_tidy_proemial_gods.sql | 4 - src/db/migrations/meta/0000_snapshot.json | 261 +++- src/db/migrations/meta/0001_snapshot.json | 184 ++- src/db/migrations/meta/0002_snapshot.json | 167 ++- src/db/migrations/meta/0003_snapshot.json | 185 ++- src/db/migrations/meta/0004_snapshot.json | 203 ++- src/db/migrations/meta/0005_snapshot.json | 203 ++- src/db/migrations/meta/0006_snapshot.json | 213 ++- src/db/migrations/meta/0007_snapshot.json | 207 ++- src/db/migrations/meta/0008_snapshot.json | 203 ++- src/db/migrations/meta/0009_snapshot.json | 206 ++- src/db/migrations/meta/0010_snapshot.json | 271 ---- src/db/migrations/meta/0011_snapshot.json | 277 ---- src/db/migrations/meta/0012_snapshot.json | 278 ---- src/db/migrations/meta/0017_snapshot.json | 302 ---- src/db/migrations/meta/0018_snapshot.json | 320 ----- src/db/migrations/meta/0019_snapshot.json | 323 ----- src/db/migrations/meta/0022_snapshot.json | 345 ----- src/db/migrations/meta/_journal.json | 131 +- src/db/schemas.js | 34 +- src/index.js | 3 +- src/routes/auth.js | 48 +- src/routes/blog.js | 36 +- src/routes/dashboard.js | 68 +- src/routes/index.js | 8 +- src/routes/me.js | 19 + src/routes/videos.js | 40 +- src/routes/webhook.js | 29 + src/utils/ai.js | 40 +- src/utils/email.js | 37 + src/utils/env.js | 3 +- src/utils/stripe.js | 32 + src/utils/youtube.js | 10 + test.js | 60 - yarn.lock | 1034 ++++++++------ 65 files changed, 3989 insertions(+), 3208 deletions(-) delete mode 100644 src/db/migrations/0000_huge_ares.sql create mode 100644 src/db/migrations/0000_rapid_moira_mactaggert.sql rename src/db/migrations/{0019_lying_tomorrow_man.sql => 0001_dizzy_preak.sql} (54%) delete mode 100644 src/db/migrations/0001_slim_xavin.sql create mode 100644 src/db/migrations/0002_bent_warpath.sql delete mode 100644 src/db/migrations/0002_small_forge.sql delete mode 100644 src/db/migrations/0003_elite_falcon.sql create mode 100644 src/db/migrations/0003_past_mikhail_rasputin.sql delete mode 100644 src/db/migrations/0004_daffy_ironclad.sql create mode 100644 src/db/migrations/0004_worthless_meltdown.sql create mode 100644 src/db/migrations/0005_purple_firebird.sql delete mode 100644 src/db/migrations/0005_tricky_sheva_callister.sql create mode 100644 src/db/migrations/0006_same_bulldozer.sql delete mode 100644 src/db/migrations/0006_wide_the_hunter.sql delete mode 100644 src/db/migrations/0007_familiar_thor_girl.sql create mode 100644 src/db/migrations/0007_shiny_colossus.sql delete mode 100644 src/db/migrations/0008_jittery_piledriver.sql create mode 100644 src/db/migrations/0008_long_chameleon.sql create mode 100644 src/db/migrations/0009_aromatic_rachel_grey.sql delete mode 100644 src/db/migrations/0009_opposite_slayback.sql delete mode 100644 src/db/migrations/0010_same_famine.sql delete mode 100644 src/db/migrations/0011_serious_tenebrous.sql delete mode 100644 src/db/migrations/0012_nervous_penance.sql delete mode 100644 src/db/migrations/0017_goofy_lethal_legion.sql delete mode 100644 src/db/migrations/0018_light_victor_mancha.sql delete mode 100644 src/db/migrations/0022_tidy_proemial_gods.sql delete mode 100644 src/db/migrations/meta/0010_snapshot.json delete mode 100644 src/db/migrations/meta/0011_snapshot.json delete mode 100644 src/db/migrations/meta/0012_snapshot.json delete mode 100644 src/db/migrations/meta/0017_snapshot.json delete mode 100644 src/db/migrations/meta/0018_snapshot.json delete mode 100644 src/db/migrations/meta/0019_snapshot.json delete mode 100644 src/db/migrations/meta/0022_snapshot.json create mode 100644 src/routes/webhook.js create mode 100644 src/utils/email.js create mode 100644 src/utils/stripe.js delete mode 100644 test.js diff --git a/.env.example b/.env.example index c34d384..06bc66f 100644 --- a/.env.example +++ b/.env.example @@ -1,4 +1,7 @@ DATABASE_URL=postgres://user:password@127.0.0.1:5432/postgres REDIS_URL=redis://127.0.0.1:6379/ PORT=8080 -HOST=127.0.0.1 \ No newline at end of file +HOST=127.0.0.1 +PUBLIC_API_URL=http://localhost:3000 +FRONTEND_URL=http://localhost:3002 +SITES_HOST=http://localhost:3001 \ No newline at end of file diff --git a/drizzle.config.js b/drizzle.config.js index 7dafe4b..873bcfc 100644 --- a/drizzle.config.js +++ b/drizzle.config.js @@ -5,8 +5,10 @@ dotenv.config() export default { "out": "./src/db/migrations", "schema": "./src/db/schemas.js", - "driver": "pg", + "url": process.env.DATABASE_URL, "dbCredentials": { "connectionString": process.env.DATABASE_URL - } + }, + "dialect": "postgresql", + "driver": "pg" } diff --git a/package-lock.json b/package-lock.json index e36b27c..2d10998 100644 --- a/package-lock.json +++ b/package-lock.json @@ -9,16 +9,20 @@ "version": "1.0.0", "license": "none", "dependencies": { + "@fastify/cookie": "^9.3.1", "@fastify/cors": "^8.4.2", + "@fastify/multipart": "^8.2.0", "@fastify/oauth2": "^7.8.0", - "drizzle-orm": "^0.29.1", + "drizzle-orm": "^0.29.5", "fastify": "^4.25.0", "fastify-plugin": "^4.5.1", "googleapis": "^134.0.0", - "openai": "^4.38.2", + "mailtrap": "^3.3.0", + "openai": "^4.38.5", "pg": "^8.11.3", "redis": "^4.6.11", "simple-get": "^4.0.1", + "stripe": "^15.7.0", "tsc": "^2.0.4", "zod": "^3.22.4" }, @@ -26,9 +30,10 @@ "@types/cli-color": "^2.0.6", "@types/node": "^20.10.4", "@types/pg": "^8.10.9", + "@types/stripe-v3": "^3.1.33", "cli-color": "^2.0.3", "dotenv": "^16.3.1", - "drizzle-kit": "^0.20.6", + "drizzle-kit": "^0.20.0", "prettier": "^3.1.1", "tsc-alias": "^1.8.8", "tsx": "^3.12.7", @@ -222,24 +227,57 @@ } }, "node_modules/@cloudflare/kv-asset-handler": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.2.0.tgz", - "integrity": "sha512-MVbXLbTcAotOPUj0pAMhVtJ+3/kFkwJqc5qNOleOZTv6QkZZABDMS21dSrSlVswEHwrpWC03e4fWytjqKvuE2A==", + "version": "0.3.2", + "resolved": "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.2.tgz", + "integrity": "sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA==", "dev": true, - "license": "MIT OR Apache-2.0", "dependencies": { "mime": "^3.0.0" + }, + "engines": { + "node": ">=16.13" } }, - "node_modules/@cloudflare/workerd-linux-arm64": { - "version": "1.20231030.0", - "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20231030.0.tgz", - "integrity": "sha512-4/GK5zHh+9JbUI6Z5xTCM0ZmpKKHk7vu9thmHjUxtz+o8Ne9DoD7DlDvXQWgMF6XGaTubDWyp3ttn+Qv8jDFuQ==", + "node_modules/@cloudflare/workerd-darwin-64": { + "version": "1.20240512.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20240512.0.tgz", + "integrity": "sha512-VMp+CsSHFALQiBzPdQ5dDI4T1qwLu0mQ0aeKVNDosXjueN0f3zj/lf+mFil5/9jBbG3t4mG0y+6MMnalP9Lobw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-darwin-arm64": { + "version": "1.20240512.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20240512.0.tgz", + "integrity": "sha512-lZktXGmzMrB5rJqY9+PmnNfv1HKlj/YLZwMjPfF0WVKHUFdvQbAHsi7NlKv6mW9uIvlZnS+K4sIkWc0MDXcRnA==", "cpu": [ "arm64" ], "dev": true, - "license": "Apache-2.0", + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cloudflare/workerd-linux-64": { + "version": "1.20240512.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20240512.0.tgz", + "integrity": "sha512-wrHvqCZZqXz6Y3MUTn/9pQNsvaoNjbJpuA6vcXsXu8iCzJi911iVW2WUEBX+MpUWD+mBIP0oXni5tTlhkokOPw==", + "cpu": [ + "x64" + ], + "dev": true, "optional": true, "os": [ "linux" @@ -248,16 +286,66 @@ "node": ">=16" } }, - "node_modules/@drizzle-team/studio": { - "version": "0.0.35", - "resolved": "https://registry.npmjs.org/@drizzle-team/studio/-/studio-0.0.35.tgz", - "integrity": "sha512-t5LTNOVf+L7Bb/wdssOIPx0ueNvhyaIXdrvKgoHR4wK0GD7SRmILcCTzn6N6Ltr1VnFzQZG/bzn6HMagn17Jtw==", + "node_modules/@cloudflare/workerd-linux-arm64": { + "version": "1.20240512.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20240512.0.tgz", + "integrity": "sha512-YPezHMySL9J9tFdzxz390eBswQ//QJNYcZolz9Dgvb3FEfdpK345cE/bsWbMOqw5ws2f82l388epoenghtYvAg==", + "cpu": [ + "arm64" + ], "dev": true, - "license": "UNLICENSED", - "dependencies": { - "superjson": "^2.2.1" + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=16" } }, + "node_modules/@cloudflare/workerd-windows-64": { + "version": "1.20240512.0", + "resolved": "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240512.0.tgz", + "integrity": "sha512-SxKapDrIYSscMR7lGIp/av0l6vokjH4xQ9ACxHgXh+OdOus9azppSmjaPyw4/ePvg7yqpkaNjf9o258IxWtvKQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=16" + } + }, + "node_modules/@cspotcode/source-map-support": { + "version": "0.8.1", + "resolved": "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz", + "integrity": "sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw==", + "dev": true, + "dependencies": { + "@jridgewell/trace-mapping": "0.3.9" + }, + "engines": { + "node": ">=12" + } + }, + "node_modules/@cspotcode/source-map-support/node_modules/@jridgewell/trace-mapping": { + "version": "0.3.9", + "resolved": "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz", + "integrity": "sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ==", + "dev": true, + "dependencies": { + "@jridgewell/resolve-uri": "^3.0.3", + "@jridgewell/sourcemap-codec": "^1.4.10" + } + }, + "node_modules/@drizzle-team/studio": { + "version": "0.0.27", + "resolved": "https://registry.npmjs.org/@drizzle-team/studio/-/studio-0.0.27.tgz", + "integrity": "sha512-vkgflb8g/7WCdVCuxWE6tCzjZB0q4lLIK6mwH1aleNRqIGOhEWq/E2I8HmKquz1v0GRDHLFd19ZzrVSITt2Uqg==", + "dev": true + }, "node_modules/@esbuild-kit/cjs-loader": { "version": "2.4.2", "resolved": "https://registry.npmjs.org/@esbuild-kit/cjs-loader/-/cjs-loader-2.4.2.tgz", @@ -296,7 +384,6 @@ "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-globals-polyfill/-/node-globals-polyfill-0.2.3.tgz", "integrity": "sha512-r3MIryXDeXDOZh7ih1l/yE9ZLORCd5e8vWg02azWRGj5SPTuoh69A2AIyn0Z31V/kHBfZ4HgWJ+OK3GTTwLmnw==", "dev": true, - "license": "ISC", "peerDependencies": { "esbuild": "*" } @@ -306,7 +393,6 @@ "resolved": "https://registry.npmjs.org/@esbuild-plugins/node-modules-polyfill/-/node-modules-polyfill-0.2.2.tgz", "integrity": "sha512-LXV7QsWJxRuMYvKbiznh+U1ilIop3g2TeKRzUxOG5X3YITc8JyyTa90BmLwqqv0YnX4v32CSlG+vsziZp9dMvA==", "dev": true, - "license": "ISC", "dependencies": { "escape-string-regexp": "^4.0.0", "rollup-plugin-node-polyfills": "^0.2.1" @@ -320,7 +406,6 @@ "resolved": "https://registry.npmjs.org/escape-string-regexp/-/escape-string-regexp-4.0.0.tgz", "integrity": "sha512-TtpcNJ3XAzx3Gq8sWRzJaVajRs0uVxA2YAkdb1jm2YkPz4G6egUFAyA3n5vtEIZefPk5Wa4UXbKuS5fKkJWdgA==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" }, @@ -328,6 +413,134 @@ "url": "https://github.com/sponsors/sindresorhus" } }, + "node_modules/@esbuild/android-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.18.20.tgz", + "integrity": "sha512-fyi7TDI/ijKKNZTUJAQqiG5T7YjJXgnzkURqmGj13C6dCqckZBLdl4h7bkhHt/t0WP+zO9/zwroDvANaOqO5Sw==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.18.20.tgz", + "integrity": "sha512-Nz4rJcchGDtENV0eMKUNa6L12zz2zBDXuhj/Vjh18zGqB44Bi7MBMSXjgunJgjRhCmKOjnPuZp4Mb6OKqtMHLQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/android-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.18.20.tgz", + "integrity": "sha512-8GDdlePJA8D6zlZYJV/jnrRAi6rOiNaCC/JclcXpB+KIuvfBN4owLtgzY2bsxnx666XjJx2kDPUmnTtR8qKQUg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.18.20.tgz", + "integrity": "sha512-bxRHW5kHU38zS2lPTPOyuyTm+S+eobPUnTNkdJEfAddYgEcll4xkT8DB9d2008DtTbl7uJag2HuE5NZAZgnNEA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/darwin-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.18.20.tgz", + "integrity": "sha512-pc5gxlMDxzm513qPGbCbDukOdsGtKhfxD1zJKXjCCcU7ju50O7MeAZ8c4krSJcOIJGFR+qx21yMMVYwiQvyTyQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.18.20.tgz", + "integrity": "sha512-yqDQHy4QHevpMAaxhhIwYPMv1NECwOvIpGCZkECn8w2WFHXjEwrBn3CeNIYsibZ/iZEUemj++M26W3cNR5h+Tw==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/freebsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.18.20.tgz", + "integrity": "sha512-tgWRPPuQsd3RmBZwarGVHZQvtzfEBOreNuxEMKFcd5DaDn2PbBxfwLcj4+aenoh7ctXcbXmOQIn8HI6mCSw5MQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-arm": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.18.20.tgz", + "integrity": "sha512-/5bHkMWnq1EgKr1V+Ybz3s1hWXok7mDFUMQ4cG10AfW3wL02PSZi5kFpYKrptDsgb2WAJIvRcDm+qIvXf/apvg==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@esbuild/linux-arm64": { "version": "0.17.19", "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz", @@ -345,6 +558,214 @@ "node": ">=12" } }, + "node_modules/@esbuild/linux-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.18.20.tgz", + "integrity": "sha512-P4etWwq6IsReT0E1KHU40bOnzMHoH73aXp96Fs8TIT6z9Hu8G6+0SHSw9i2isWrD2nbx2qo5yUqACgdfVGx7TA==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-loong64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.18.20.tgz", + "integrity": "sha512-nXW8nqBTrOpDLPgPY9uV+/1DjxoQ7DoB2N8eocyq8I9XuqJ7BiAMDMf9n1xZM9TgW0J8zrquIb/A7s3BJv7rjg==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-mips64el": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.18.20.tgz", + "integrity": "sha512-d5NeaXZcHp8PzYy5VnXV3VSd2D328Zb+9dEq5HE6bw6+N86JVPExrA6O68OPwobntbNJ0pzCpUFZTo3w0GyetQ==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-ppc64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.18.20.tgz", + "integrity": "sha512-WHPyeScRNcmANnLQkq6AfyXRFr5D6N2sKgkFo2FqguP44Nw2eyDlbTdZwd9GYk98DZG9QItIiTlFLHJHjxP3FA==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-riscv64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.18.20.tgz", + "integrity": "sha512-WSxo6h5ecI5XH34KC7w5veNnKkju3zBRLEQNY7mv5mtBmrP/MjNBCAlsM2u5hDBlS3NGcTQpoBvRzqBcRtpq1A==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-s390x": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.18.20.tgz", + "integrity": "sha512-+8231GMs3mAEth6Ja1iK0a1sQ3ohfcpzpRLH8uuc5/KVDFneH6jtAJLFGafpzpMRO6DzJ6AvXKze9LfFMrIHVQ==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/linux-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.18.20.tgz", + "integrity": "sha512-UYqiqemphJcNsFEskc73jQ7B9jgwjWrSayxawS6UVFZGWrAAtkzjxSqnoclCXxWtfwLdzU+vTpcNYhpn43uP1w==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/netbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.18.20.tgz", + "integrity": "sha512-iO1c++VP6xUBUmltHZoMtCUdPlnPGdBom6IrO4gyKPFFVBKioIImVooR5I83nTew5UOYrk3gIJhbZh8X44y06A==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/openbsd-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.18.20.tgz", + "integrity": "sha512-e5e4YSsuQfX4cxcygw/UCPIEP6wbIL+se3sxPdCiMbFLBWu0eiZOJ7WoD+ptCLrmjZBK1Wk7I6D/I3NglUGOxg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/sunos-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.18.20.tgz", + "integrity": "sha512-kDbFRFp0YpTQVVrqUd5FTYmWo45zGaXe0X8E1G/LKFC0v8x0vWrhOWSLITcCn63lmZIxfOMXtCfti/RxN/0wnQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-arm64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.18.20.tgz", + "integrity": "sha512-ddYFR6ItYgoaq4v4JmQQaAI5s7npztfV4Ag6NrhiaW0RrnOXqBkgwZLofVTlq1daVTQNhtI5oieTvkRPfZrePg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-ia32": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.18.20.tgz", + "integrity": "sha512-Wv7QBi3ID/rROT08SABTS7eV4hX26sVduqDOTe1MvGMjNd3EjOz4b7zeexIR62GTIEKrfJXKL9LFxTYgkyeu7g==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/@esbuild/win32-x64": { + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz", + "integrity": "sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/@eslint-community/eslint-utils": { "version": "4.4.0", "resolved": "https://registry.npmjs.org/@eslint-community/eslint-utils/-/eslint-utils-4.4.0.tgz", @@ -454,7 +875,6 @@ "version": "2.1.0", "resolved": "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz", "integrity": "sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA==", - "dev": true, "license": "MIT", "engines": { "node": ">=14" @@ -527,6 +947,19 @@ "rfdc": "^1.2.0" } }, + "node_modules/@fastify/multipart": { + "version": "8.2.0", + "resolved": "https://registry.npmjs.org/@fastify/multipart/-/multipart-8.2.0.tgz", + "integrity": "sha512-OZ8nsyyoS2TV7Yeu3ZdrdDGsKUTAbfjrKC9jSxGgT2qdgek+BxpWX31ZubTrWMNZyU5xwk4ox6AvTjAbYWjrWg==", + "dependencies": { + "@fastify/busboy": "^2.1.0", + "@fastify/deepmerge": "^1.0.0", + "@fastify/error": "^3.0.0", + "fastify-plugin": "^4.0.0", + "secure-json-parse": "^2.4.0", + "stream-wormhole": "^1.1.0" + } + }, "node_modules/@fastify/oauth2": { "version": "7.8.0", "resolved": "https://registry.npmjs.org/@fastify/oauth2/-/oauth2-7.8.0.tgz", @@ -647,7 +1080,6 @@ "resolved": "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz", "integrity": "sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw==", "dev": true, - "peer": true, "engines": { "node": ">=6.0.0" } @@ -677,8 +1109,7 @@ "version": "1.4.15", "resolved": "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz", "integrity": "sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg==", - "dev": true, - "peer": true + "dev": true }, "node_modules/@jridgewell/trace-mapping": { "version": "0.3.25", @@ -918,22 +1349,14 @@ } }, "node_modules/@types/node-forge": { - "version": "1.3.10", - "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.10.tgz", - "integrity": "sha512-y6PJDYN4xYBxwd22l+OVH35N+1fCYWiuC3aiP2SlXVE6Lo7SS+rSx9r89hLxrP4pn6n1lBGhHJ12pj3F3Mpttw==", + "version": "1.3.11", + "resolved": "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz", + "integrity": "sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ==", "dev": true, - "license": "MIT", "dependencies": { "@types/node": "*" } }, - "node_modules/@types/node-forge/node_modules/@types/node": { - "version": "20.2.5", - "resolved": "https://registry.npmjs.org/@types/node/-/node-20.2.5.tgz", - "integrity": "sha512-JJulVEQXmiY9Px5axXHeYGLSjhkZEnD+MDPDGbCbIAbMslkKwmygtZFy1X6s/075Yo94sf8GuSlFfPzysQrWZQ==", - "dev": true, - "license": "MIT" - }, "node_modules/@types/normalize-package-data": { "version": "2.4.4", "resolved": "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz", @@ -1029,6 +1452,12 @@ "dev": true, "license": "MIT" }, + "node_modules/@types/stripe-v3": { + "version": "3.1.33", + "resolved": "https://registry.npmjs.org/@types/stripe-v3/-/stripe-v3-3.1.33.tgz", + "integrity": "sha512-fIE7F7alypCrnIMsk4naprHf8kXEvPM2Q9FGdL/3TDeGM0xlHohdVWkwuaEZ2tKzXB9QQKoS8k+ocLkPjZajwQ==", + "dev": true + }, "node_modules/@typescript-eslint/eslint-plugin": { "version": "6.14.0", "resolved": "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz", @@ -1460,11 +1889,10 @@ } }, "node_modules/acorn-walk": { - "version": "8.3.1", - "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz", - "integrity": "sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw==", + "version": "8.3.2", + "resolved": "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz", + "integrity": "sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A==", "dev": true, - "license": "MIT", "engines": { "node": ">=0.4.0" } @@ -1745,7 +2173,6 @@ "resolved": "https://registry.npmjs.org/as-table/-/as-table-1.0.55.tgz", "integrity": "sha512-xvsWESUJn0JN421Xb9MQw6AsMHRCUknCe0Wjlxvjud80mU4E6hQf1A6NzQKcYNmYw62MfzEtXc+badstZP3JpQ==", "dev": true, - "license": "MIT", "dependencies": { "printable-characters": "^1.0.42" } @@ -1788,6 +2215,16 @@ "fastq": "^1.6.1" } }, + "node_modules/axios": { + "version": "1.7.2", + "resolved": "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz", + "integrity": "sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw==", + "dependencies": { + "follow-redirects": "^1.15.6", + "form-data": "^4.0.0", + "proxy-from-env": "^1.1.0" + } + }, "node_modules/balanced-match": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz", @@ -1848,8 +2285,7 @@ "version": "2.1.5", "resolved": "https://registry.npmjs.org/blake3-wasm/-/blake3-wasm-2.1.5.tgz", "integrity": "sha512-F1+K8EbfOZE49dtoPtmxUQrpXaBIl3ICvasLh+nJta0xkz+9kF/7uet9fLnwKqhDrmj6g+6K3Tw9yQPUg2ka5g==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/bplist-parser": { "version": "0.2.0", @@ -2035,7 +2471,6 @@ "resolved": "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz", "integrity": "sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw==", "dev": true, - "license": "MIT", "engines": { "node": ">=14.16" }, @@ -2069,7 +2504,6 @@ "resolved": "https://registry.npmjs.org/capnp-ts/-/capnp-ts-0.7.0.tgz", "integrity": "sha512-XKxXAC3HVPv7r674zP0VC3RTXz+/JKhfyw94ljvF80yynK6VkTnqE3jMuN8b3dUVmmc43TjyxjW4KTsmB3c86g==", "dev": true, - "license": "MIT", "dependencies": { "debug": "^4.3.1", "tslib": "^2.2.0" @@ -2265,22 +2699,6 @@ "node": ">=6.6.0" } }, - "node_modules/copy-anything": { - "version": "3.0.5", - "resolved": "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz", - "integrity": "sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w==", - "dev": true, - "license": "MIT", - "dependencies": { - "is-what": "^4.1.8" - }, - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, "node_modules/cosmiconfig": { "version": "8.3.6", "resolved": "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz", @@ -2338,8 +2756,7 @@ "version": "2.0.2", "resolved": "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz", "integrity": "sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/debug": { "version": "4.3.4", @@ -2649,40 +3066,37 @@ } }, "node_modules/drizzle-kit": { - "version": "0.20.6", - "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.20.6.tgz", - "integrity": "sha512-+AYQY+tJUnfMJYIeh6aEjI21mpMCekqz0LEu2QdFdc/3zSmjyfEhH5dkXlRFME8v1rtisiHfp7bP+gVVKDPiUg==", + "version": "0.20.0", + "resolved": "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.20.0.tgz", + "integrity": "sha512-5z9wDIPMHXICe44JnM3OcGVjftu2k676IWYkvplJ4AOKhye4Hkf+uM73Dj+NWqmBtqbZ3A34Qt2QvhrLXvWMLw==", "dev": true, - "license": "MIT", "dependencies": { - "@drizzle-team/studio": "^0.0.35", + "@drizzle-team/studio": "^0.0.27", "@esbuild-kit/esm-loader": "^2.5.5", "camelcase": "^7.0.1", "chalk": "^5.2.0", "commander": "^9.4.1", - "esbuild": "^0.19.7", - "esbuild-register": "^3.5.0", + "esbuild": "^0.18.6", + "esbuild-register": "^3.4.2", "glob": "^8.1.0", "hanji": "^0.0.5", "json-diff": "0.9.0", "minimatch": "^7.4.3", - "semver": "^7.5.4", "wrangler": "^3.7.0", "zod": "^3.20.2" }, "bin": { - "drizzle-kit": "bin.cjs" + "drizzle-kit": "index.cjs" } }, "node_modules/drizzle-kit/node_modules/@esbuild/linux-arm64": { - "version": "0.19.9", - "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.9.tgz", - "integrity": "sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.18.20.tgz", + "integrity": "sha512-2YbscF+UL7SQAVIpnWvYwM+3LskyDmPhe31pE7/aoTMFKKzIc9lLbyGUpmmb8a8AixOL61sQ/mFh3jEjHYFvdA==", "cpu": [ "arm64" ], "dev": true, - "license": "MIT", "optional": true, "os": [ "linux" @@ -2692,11 +3106,10 @@ } }, "node_modules/drizzle-kit/node_modules/chalk": { - "version": "5.2.0", - "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz", - "integrity": "sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA==", + "version": "5.3.0", + "resolved": "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz", + "integrity": "sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w==", "dev": true, - "license": "MIT", "engines": { "node": "^12.17.0 || ^14.13 || >=16.0.0" }, @@ -2705,12 +3118,11 @@ } }, "node_modules/drizzle-kit/node_modules/esbuild": { - "version": "0.19.9", - "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.19.9.tgz", - "integrity": "sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg==", + "version": "0.18.20", + "resolved": "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz", + "integrity": "sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA==", "dev": true, "hasInstallScript": true, - "license": "MIT", "bin": { "esbuild": "bin/esbuild" }, @@ -2718,28 +3130,28 @@ "node": ">=12" }, "optionalDependencies": { - "@esbuild/android-arm": "0.19.9", - "@esbuild/android-arm64": "0.19.9", - "@esbuild/android-x64": "0.19.9", - "@esbuild/darwin-arm64": "0.19.9", - "@esbuild/darwin-x64": "0.19.9", - "@esbuild/freebsd-arm64": "0.19.9", - "@esbuild/freebsd-x64": "0.19.9", - "@esbuild/linux-arm": "0.19.9", - "@esbuild/linux-arm64": "0.19.9", - "@esbuild/linux-ia32": "0.19.9", - "@esbuild/linux-loong64": "0.19.9", - "@esbuild/linux-mips64el": "0.19.9", - "@esbuild/linux-ppc64": "0.19.9", - "@esbuild/linux-riscv64": "0.19.9", - "@esbuild/linux-s390x": "0.19.9", - "@esbuild/linux-x64": "0.19.9", - "@esbuild/netbsd-x64": "0.19.9", - "@esbuild/openbsd-x64": "0.19.9", - "@esbuild/sunos-x64": "0.19.9", - "@esbuild/win32-arm64": "0.19.9", - "@esbuild/win32-ia32": "0.19.9", - "@esbuild/win32-x64": "0.19.9" + "@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" } }, "node_modules/drizzle-kit/node_modules/esbuild-register": { @@ -2760,7 +3172,6 @@ "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-7.4.6.tgz", "integrity": "sha512-sBz8G/YjVniEz6lKPNpKxXwazJe4c19fEfV2GDMX6AjFz+MX9uDWIZW8XreVhkFW3fkIdTv/gxWr/Kks5FFAVw==", "dev": true, - "license": "ISC", "dependencies": { "brace-expansion": "^2.0.1" }, @@ -2771,21 +3182,10 @@ "url": "https://github.com/sponsors/isaacs" } }, - "node_modules/drizzle-kit/node_modules/zod": { - "version": "3.21.4", - "resolved": "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz", - "integrity": "sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw==", - "dev": true, - "license": "MIT", - "funding": { - "url": "https://github.com/sponsors/colinhacks" - } - }, "node_modules/drizzle-orm": { - "version": "0.29.1", - "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.29.1.tgz", - "integrity": "sha512-yItc4unfHnk8XkDD3/bdC63vdboTY7e7I03lCF1OJYABXSIfQYU9BFTQJXMMovVeb3T1/OJWwfW/70T1XPnuUA==", - "license": "Apache-2.0", + "version": "0.29.5", + "resolved": "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.29.5.tgz", + "integrity": "sha512-jS3+uyzTz4P0Y2CICx8FmRQ1eplURPaIMWDn/yq6k4ShRFj9V7vlJk67lSf2kyYPzQ60GkkNGXcJcwrxZ6QCRw==", "peerDependencies": { "@aws-sdk/client-rds-data": ">=3", "@cloudflare/workers-types": ">=3", @@ -2795,15 +3195,18 @@ "@planetscale/database": ">=1", "@types/better-sqlite3": "*", "@types/pg": "*", + "@types/react": ">=18", "@types/sql.js": "*", "@vercel/postgres": "*", "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" }, @@ -2832,6 +3235,9 @@ "@types/pg": { "optional": true }, + "@types/react": { + "optional": true + }, "@types/sql.js": { "optional": true }, @@ -2844,6 +3250,9 @@ "bun-types": { "optional": true }, + "expo-sqlite": { + "optional": true + }, "knex": { "optional": true }, @@ -2859,6 +3268,9 @@ "postgres": { "optional": true }, + "react": { + "optional": true + }, "sql.js": { "optional": true }, @@ -3174,6 +3586,342 @@ "@esbuild/win32-x64": "0.17.19" } }, + "node_modules/esbuild/node_modules/@esbuild/android-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm/-/android-arm-0.17.19.tgz", + "integrity": "sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/android-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz", + "integrity": "sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/android-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/android-x64/-/android-x64-0.17.19.tgz", + "integrity": "sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "android" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/darwin-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz", + "integrity": "sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/darwin-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz", + "integrity": "sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/freebsd-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz", + "integrity": "sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/freebsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz", + "integrity": "sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "freebsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-arm": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz", + "integrity": "sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA==", + "cpu": [ + "arm" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz", + "integrity": "sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-loong64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz", + "integrity": "sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ==", + "cpu": [ + "loong64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-mips64el": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz", + "integrity": "sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A==", + "cpu": [ + "mips64el" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-ppc64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz", + "integrity": "sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg==", + "cpu": [ + "ppc64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-riscv64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz", + "integrity": "sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA==", + "cpu": [ + "riscv64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-s390x": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz", + "integrity": "sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q==", + "cpu": [ + "s390x" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/linux-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz", + "integrity": "sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "linux" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/netbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz", + "integrity": "sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "netbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/openbsd-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz", + "integrity": "sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "openbsd" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/sunos-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz", + "integrity": "sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "sunos" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/win32-arm64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz", + "integrity": "sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag==", + "cpu": [ + "arm64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/win32-ia32": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz", + "integrity": "sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw==", + "cpu": [ + "ia32" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, + "node_modules/esbuild/node_modules/@esbuild/win32-x64": { + "version": "0.17.19", + "resolved": "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz", + "integrity": "sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA==", + "cpu": [ + "x64" + ], + "dev": true, + "optional": true, + "os": [ + "win32" + ], + "engines": { + "node": ">=12" + } + }, "node_modules/escalade": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz", @@ -3932,8 +4680,7 @@ "version": "0.6.1", "resolved": "https://registry.npmjs.org/estree-walker/-/estree-walker-0.6.1.tgz", "integrity": "sha512-SqmZANLWS0mnatqbSfRP5g8OXZC12Fgg1IwNtLsyHDzJizORW4khDfjPqJZsemPWBB2uqykUah5YpQ6epsqC/w==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/esutils": { "version": "2.0.3", @@ -4003,7 +4750,6 @@ "resolved": "https://registry.npmjs.org/exit-hook/-/exit-hook-2.2.1.tgz", "integrity": "sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==", "dev": true, - "license": "MIT", "engines": { "node": ">=6" }, @@ -4381,6 +5127,25 @@ "dev": true, "license": "ISC" }, + "node_modules/follow-redirects": { + "version": "1.15.6", + "resolved": "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz", + "integrity": "sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/RubenVerborgh" + } + ], + "engines": { + "node": ">=4.0" + }, + "peerDependenciesMeta": { + "debug": { + "optional": true + } + } + }, "node_modules/for-each": { "version": "0.3.3", "resolved": "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz", @@ -4445,6 +5210,20 @@ "dev": true, "license": "ISC" }, + "node_modules/fsevents": { + "version": "2.3.3", + "resolved": "https://registry.npmjs.org/fsevents/-/fsevents-2.3.3.tgz", + "integrity": "sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw==", + "dev": true, + "hasInstallScript": true, + "optional": true, + "os": [ + "darwin" + ], + "engines": { + "node": "^8.16.0 || ^10.6.0 || >=11.0.0" + } + }, "node_modules/function-bind": { "version": "1.1.2", "resolved": "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz", @@ -4551,7 +5330,6 @@ "resolved": "https://registry.npmjs.org/get-source/-/get-source-2.0.12.tgz", "integrity": "sha512-X5+4+iD+HoSeEED+uwrQ07BOQr0kEDFMVqqpBuI+RaZBpBpHCuXxo70bjar6f0b0u/DQJsJ7ssurpP0V60Az+w==", "dev": true, - "license": "Unlicense", "dependencies": { "data-uri-to-buffer": "^2.0.0", "source-map": "^0.6.1" @@ -5633,19 +6411,6 @@ "url": "https://github.com/sponsors/ljharb" } }, - "node_modules/is-what": { - "version": "4.1.16", - "resolved": "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz", - "integrity": "sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A==", - "dev": true, - "license": "MIT", - "engines": { - "node": ">=12.13" - }, - "funding": { - "url": "https://github.com/sponsors/mesqueeb" - } - }, "node_modules/is-windows": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz", @@ -6046,11 +6811,34 @@ "resolved": "https://registry.npmjs.org/magic-string/-/magic-string-0.25.9.tgz", "integrity": "sha512-RmF0AsMzgt25qzqqLc1+MbHmhdx0ojF2Fvs4XnOqz2ZOBXzzkEwc/dJQZCYHAn7v1jbVOjAZfK8msRn4BxO4VQ==", "dev": true, - "license": "MIT", "dependencies": { "sourcemap-codec": "^1.4.8" } }, + "node_modules/mailtrap": { + "version": "3.3.0", + "resolved": "https://registry.npmjs.org/mailtrap/-/mailtrap-3.3.0.tgz", + "integrity": "sha512-lFk7Cuv+qccAGMc9EMPwQiHp2+zG5wPorWdDn29NiLCA0YwYLEtPAKz/EvkLue3kcRA2KukgLOSwEbzL/Fj7Xw==", + "dependencies": { + "axios": ">=0.27" + }, + "engines": { + "node": ">=16.20.1", + "yarn": ">=1.22.17" + }, + "peerDependencies": { + "@types/nodemailer": "^6.4.9", + "nodemailer": "^6.9.4" + }, + "peerDependenciesMeta": { + "@types/nodemailer": { + "optional": true + }, + "nodemailer": { + "optional": true + } + } + }, "node_modules/memoizee": { "version": "0.4.15", "resolved": "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz", @@ -6131,7 +6919,6 @@ "resolved": "https://registry.npmjs.org/mime/-/mime-3.0.0.tgz", "integrity": "sha512-jSCU7/VB1loIWBZe14aEYHU/+1UMEHoaO7qxCOVJOw9GgH72VAWppxNcjU+x9a2k3GSIBXNKxXQFqRvvZ7vr3A==", "dev": true, - "license": "MIT", "bin": { "mime": "cli.js" }, @@ -6191,21 +6978,20 @@ } }, "node_modules/miniflare": { - "version": "3.20231030.4", - "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20231030.4.tgz", - "integrity": "sha512-7MBz0ArLuDop1WJGZC6tFgN6c5MRyDOIlxbm3yp0TRBpvDS/KsTuWCQcCjsxN4QQ5zvL3JTkuIZbQzRRw/j6ow==", + "version": "3.20240512.0", + "resolved": "https://registry.npmjs.org/miniflare/-/miniflare-3.20240512.0.tgz", + "integrity": "sha512-X0PlKR0AROKpxFoJNmRtCMIuJxj+ngEcyTOlEokj2rAQ0TBwUhB4/1uiPvdI6ofW5NugPOD1uomAv+gLjwsLDQ==", "dev": true, - "license": "MIT", "dependencies": { + "@cspotcode/source-map-support": "0.8.1", "acorn": "^8.8.0", "acorn-walk": "^8.2.0", "capnp-ts": "^0.7.0", "exit-hook": "^2.2.1", "glob-to-regexp": "^0.4.1", - "source-map-support": "0.5.21", "stoppable": "^1.1.0", - "undici": "^5.22.1", - "workerd": "1.20231030.0", + "undici": "^5.28.2", + "workerd": "1.20240512.0", "ws": "^8.11.0", "youch": "^3.2.2", "zod": "^3.20.6" @@ -6217,19 +7003,6 @@ "node": ">=16.13" } }, - "node_modules/miniflare/node_modules/acorn": { - "version": "8.8.2", - "resolved": "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz", - "integrity": "sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw==", - "dev": true, - "license": "MIT", - "bin": { - "acorn": "bin/acorn" - }, - "engines": { - "node": ">=0.4.0" - } - }, "node_modules/minimatch": { "version": "3.1.2", "resolved": "https://registry.npmjs.org/minimatch/-/minimatch-3.1.2.tgz", @@ -6284,7 +7057,6 @@ "resolved": "https://registry.npmjs.org/mustache/-/mustache-4.2.0.tgz", "integrity": "sha512-71ippSywq5Yb7/tVYyGbkBggbU8H3u5Rz56fH60jGFgr8uHwxs+aSKeqmluIVzM0m0kB7xQjKS6qPfd0b2ZoqQ==", "dev": true, - "license": "MIT", "bin": { "mustache": "bin/mustache" } @@ -6314,7 +7086,6 @@ "url": "https://github.com/sponsors/ai" } ], - "license": "MIT", "bin": { "nanoid": "bin/nanoid.cjs" }, @@ -6386,7 +7157,6 @@ "resolved": "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz", "integrity": "sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA==", "dev": true, - "license": "(BSD-3-Clause OR GPL-2.0)", "engines": { "node": ">= 6.13.0" } @@ -6602,9 +7372,9 @@ } }, "node_modules/openai": { - "version": "4.38.2", - "resolved": "https://registry.npmjs.org/openai/-/openai-4.38.2.tgz", - "integrity": "sha512-M16ehj0D84Gjq5cjvBzXRb5X+UvtWlxPDRAWAWMC0EN+6nHqnULIn5fWWeiexDPup25FeSZYv/ldp8KefcZVJQ==", + "version": "4.47.1", + "resolved": "https://registry.npmjs.org/openai/-/openai-4.47.1.tgz", + "integrity": "sha512-WWSxhC/69ZhYWxH/OBsLEirIjUcfpQ5+ihkXKp06hmeYXgBBIUCa9IptMzYx6NdkiOCsSGYCnTIsxaic3AjRCQ==", "dependencies": { "@types/node": "^18.11.18", "@types/node-fetch": "^2.6.4", @@ -6763,11 +7533,10 @@ "license": "MIT" }, "node_modules/path-to-regexp": { - "version": "6.2.1", - "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz", - "integrity": "sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw==", - "dev": true, - "license": "MIT" + "version": "6.2.2", + "resolved": "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz", + "integrity": "sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw==", + "dev": true }, "node_modules/path-type": { "version": "4.0.0", @@ -7076,8 +7845,7 @@ "version": "1.0.42", "resolved": "https://registry.npmjs.org/printable-characters/-/printable-characters-1.0.42.tgz", "integrity": "sha512-dKp+C4iXWK4vVYZmYSd0KBH5F/h1HoZRsbJ82AVKRO3PEo8L4lBS/vLwhVtpwwuYcoIsVY+1JYKR268yn480uQ==", - "dev": true, - "license": "Unlicense" + "dev": true }, "node_modules/process": { "version": "0.11.10", @@ -7117,6 +7885,11 @@ "node": ">= 0.10" } }, + "node_modules/proxy-from-env": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz", + "integrity": "sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg==" + }, "node_modules/punycode": { "version": "2.3.0", "resolved": "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz", @@ -7451,7 +8224,6 @@ "resolved": "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz", "integrity": "sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg==", "dev": true, - "license": "MIT", "engines": { "node": ">=10" } @@ -7522,8 +8294,8 @@ "version": "3.0.2", "resolved": "https://registry.npmjs.org/rollup-plugin-inject/-/rollup-plugin-inject-3.0.2.tgz", "integrity": "sha512-ptg9PQwzs3orn4jkgXJ74bfs5vYz1NCZlSQMBUA0wKcGp5i5pA1AO3fOUEte8enhGUC+iapTCzEWw2jEFFUO/w==", + "deprecated": "This package has been deprecated and is no longer maintained. Please use @rollup/plugin-inject.", "dev": true, - "license": "MIT", "dependencies": { "estree-walker": "^0.6.1", "magic-string": "^0.25.3", @@ -7535,7 +8307,6 @@ "resolved": "https://registry.npmjs.org/rollup-plugin-node-polyfills/-/rollup-plugin-node-polyfills-0.2.1.tgz", "integrity": "sha512-4kCrKPTJ6sK4/gLL/U5QzVT8cxJcofO0OU74tnB19F40cmuAKSzH5/siithxlofFEjwvw1YAhPmbvGNA6jEroA==", "dev": true, - "license": "MIT", "dependencies": { "rollup-plugin-inject": "^3.0.0" } @@ -7545,7 +8316,6 @@ "resolved": "https://registry.npmjs.org/rollup-pluginutils/-/rollup-pluginutils-2.8.2.tgz", "integrity": "sha512-EEp9NhnUkwY8aif6bxgovPHMoMoNr2FulJziTndpt5H9RdwC47GSGuII9XxpSdzVGM0GWrNPHV6ie1LTNJPaLQ==", "dev": true, - "license": "MIT", "dependencies": { "estree-walker": "^0.6.1" } @@ -7726,7 +8496,6 @@ "resolved": "https://registry.npmjs.org/selfsigned/-/selfsigned-2.4.1.tgz", "integrity": "sha512-th5B4L2U+eGLq1TVh7zNRGBapioSORUeymIydxgFpwww9d2qyKvtuPU2jJuHvYAwwqi2Y596QBL3eEqcPEYL8Q==", "dev": true, - "license": "MIT", "dependencies": { "@types/node-forge": "^1.3.0", "node-forge": "^1" @@ -8043,8 +8812,8 @@ "version": "1.4.8", "resolved": "https://registry.npmjs.org/sourcemap-codec/-/sourcemap-codec-1.4.8.tgz", "integrity": "sha512-9NykojV5Uih4lgo5So5dtw+f0JgJX30KCNI8gwhz2J9A15wD0Ml6tjHKwf6fTSa6fAdVBdZeNOs9eJ71qCk8vA==", - "dev": true, - "license": "MIT" + "deprecated": "Please use @jridgewell/sourcemap-codec instead", + "dev": true }, "node_modules/spdx-correct": { "version": "3.2.0", @@ -8096,7 +8865,6 @@ "resolved": "https://registry.npmjs.org/stacktracey/-/stacktracey-2.1.8.tgz", "integrity": "sha512-Kpij9riA+UNg7TnphqjH7/CzctQ/owJGNbFkfEeve4Z4uxT5+JapVLFXcsurIfN34gnTWZNJ/f7NMG0E8JDzTw==", "dev": true, - "license": "Unlicense", "dependencies": { "as-table": "^1.0.36", "get-source": "^2.0.12" @@ -8107,12 +8875,19 @@ "resolved": "https://registry.npmjs.org/stoppable/-/stoppable-1.1.0.tgz", "integrity": "sha512-KXDYZ9dszj6bzvnEMRYvxgeTHU74QBFL54XKtP3nyMuJ81CFYtABZ3bAzL2EdFUaEwJOBOgENyFj3R7oTzDyyw==", "dev": true, - "license": "MIT", "engines": { "node": ">=4", "npm": ">=6" } }, + "node_modules/stream-wormhole": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/stream-wormhole/-/stream-wormhole-1.1.0.tgz", + "integrity": "sha512-gHFfL3px0Kctd6Po0M8TzEvt3De/xu6cnRrjlfYNhwbhLPLwigI2t1nc6jrzNuaYg5C4YF78PPFuQPzRiqn9ew==", + "engines": { + "node": ">=4.0.0" + } + }, "node_modules/string-width": { "version": "4.2.3", "resolved": "https://registry.npmjs.org/string-width/-/string-width-4.2.3.tgz", @@ -8235,17 +9010,16 @@ "url": "https://github.com/sponsors/sindresorhus" } }, - "node_modules/superjson": { - "version": "2.2.1", - "resolved": "https://registry.npmjs.org/superjson/-/superjson-2.2.1.tgz", - "integrity": "sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA==", - "dev": true, - "license": "MIT", + "node_modules/stripe": { + "version": "15.7.0", + "resolved": "https://registry.npmjs.org/stripe/-/stripe-15.7.0.tgz", + "integrity": "sha512-hTJhh0Gc+l+hj2vuzaFCh0T46l7793W3wg4J9Oyy3Wu+Ofswd0OgTS4XNt7G9XHJAyHpTmNRNbWgGwn73P4j7g==", "dependencies": { - "copy-anything": "^3.0.2" + "@types/node": ">=8.1.0", + "qs": "^6.11.0" }, "engines": { - "node": ">=16" + "node": ">=12.*" } }, "node_modules/supports-color": { @@ -8679,11 +9453,10 @@ } }, "node_modules/undici": { - "version": "5.28.2", - "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz", - "integrity": "sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w==", + "version": "5.28.4", + "resolved": "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz", + "integrity": "sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g==", "dev": true, - "license": "MIT", "dependencies": { "@fastify/busboy": "^2.0.0" }, @@ -8992,12 +9765,11 @@ "license": "MIT" }, "node_modules/workerd": { - "version": "1.20231030.0", - "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20231030.0.tgz", - "integrity": "sha512-+FSW+d31f8RrjHanFf/R9A+Z0csf3OtsvzdPmAKuwuZm/5HrBv83cvG9fFeTxl7/nI6irUUXIRF9xcj/NomQzQ==", + "version": "1.20240512.0", + "resolved": "https://registry.npmjs.org/workerd/-/workerd-1.20240512.0.tgz", + "integrity": "sha512-VUBmR1PscAPHEE0OF/G2K7/H1gnr9aDWWZzdkIgWfNKkv8dKFCT75H+GJtUHjfwqz3rYCzaNZmatSXOpLGpF8A==", "dev": true, "hasInstallScript": true, - "license": "Apache-2.0", "bin": { "workerd": "bin/workerd" }, @@ -9005,33 +9777,32 @@ "node": ">=16" }, "optionalDependencies": { - "@cloudflare/workerd-darwin-64": "1.20231030.0", - "@cloudflare/workerd-darwin-arm64": "1.20231030.0", - "@cloudflare/workerd-linux-64": "1.20231030.0", - "@cloudflare/workerd-linux-arm64": "1.20231030.0", - "@cloudflare/workerd-windows-64": "1.20231030.0" + "@cloudflare/workerd-darwin-64": "1.20240512.0", + "@cloudflare/workerd-darwin-arm64": "1.20240512.0", + "@cloudflare/workerd-linux-64": "1.20240512.0", + "@cloudflare/workerd-linux-arm64": "1.20240512.0", + "@cloudflare/workerd-windows-64": "1.20240512.0" } }, "node_modules/wrangler": { - "version": "3.20.0", - "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.20.0.tgz", - "integrity": "sha512-7mg25zJByhBmrfG+CbImSid7JNd5lxGovLA167ndtE8Yrqd3TUukrGWL8o0RCQIm0FUcgl2nCzWArJDShlZVKA==", + "version": "3.57.1", + "resolved": "https://registry.npmjs.org/wrangler/-/wrangler-3.57.1.tgz", + "integrity": "sha512-M8YnWUwdrb8AFiRePtVnzlDn02OX4osWvdl8oVh6eyZqqkqXYg7lwlYBr14Qj92pMN4JvMBmDZoukkYHvwpJRg==", "dev": true, - "license": "MIT OR Apache-2.0", "dependencies": { - "@cloudflare/kv-asset-handler": "^0.2.0", + "@cloudflare/kv-asset-handler": "0.3.2", "@esbuild-plugins/node-globals-polyfill": "^0.2.3", "@esbuild-plugins/node-modules-polyfill": "^0.2.2", "blake3-wasm": "^2.1.5", "chokidar": "^3.5.3", "esbuild": "0.17.19", - "miniflare": "3.20231030.4", + "miniflare": "3.20240512.0", "nanoid": "^3.3.3", "path-to-regexp": "^6.2.0", + "resolve": "^1.22.8", "resolve.exports": "^2.0.2", "selfsigned": "^2.0.1", "source-map": "0.6.1", - "source-map-support": "0.5.21", "xxhash-wasm": "^1.0.1" }, "bin": { @@ -9043,6 +9814,14 @@ }, "optionalDependencies": { "fsevents": "~2.3.2" + }, + "peerDependencies": { + "@cloudflare/workers-types": "^4.20240512.0" + }, + "peerDependenciesMeta": { + "@cloudflare/workers-types": { + "optional": true + } } }, "node_modules/wrappy": { @@ -9052,11 +9831,10 @@ "license": "ISC" }, "node_modules/ws": { - "version": "8.15.1", - "resolved": "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz", - "integrity": "sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ==", + "version": "8.17.0", + "resolved": "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz", + "integrity": "sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow==", "dev": true, - "license": "MIT", "engines": { "node": ">=10.0.0" }, @@ -9287,8 +10065,7 @@ "version": "1.0.2", "resolved": "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz", "integrity": "sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A==", - "dev": true, - "license": "MIT" + "dev": true }, "node_modules/yallist": { "version": "4.0.0", @@ -9314,7 +10091,6 @@ "resolved": "https://registry.npmjs.org/youch/-/youch-3.3.3.tgz", "integrity": "sha512-qSFXUk3UZBLfggAW3dJKg0BMblG5biqSF8M34E06o5CSsZtH92u9Hqmj2RzGiHDi64fhe83+4tENFP2DB6t6ZA==", "dev": true, - "license": "MIT", "dependencies": { "cookie": "^0.5.0", "mustache": "^4.2.0", diff --git a/package.json b/package.json index 3e246e8..f63f8b6 100644 --- a/package.json +++ b/package.json @@ -18,9 +18,10 @@ "@types/cli-color": "^2.0.6", "@types/node": "^20.10.4", "@types/pg": "^8.10.9", + "@types/stripe-v3": "^3.1.33", "cli-color": "^2.0.3", "dotenv": "^16.3.1", - "drizzle-kit": "^0.20.6", + "drizzle-kit": "^0.20.0", "prettier": "^3.1.1", "tsc-alias": "^1.8.8", "tsx": "^3.12.7", @@ -32,14 +33,16 @@ "@fastify/cors": "^8.4.2", "@fastify/multipart": "^8.2.0", "@fastify/oauth2": "^7.8.0", - "drizzle-orm": "^0.29.1", + "drizzle-orm": "^0.29.5", "fastify": "^4.25.0", "fastify-plugin": "^4.5.1", "googleapis": "^134.0.0", + "mailtrap": "^3.3.0", "openai": "^4.38.5", "pg": "^8.11.3", "redis": "^4.6.11", "simple-get": "^4.0.1", + "stripe": "^15.7.0", "tsc": "^2.0.4", "zod": "^3.22.4" }, diff --git a/src/db/index.js b/src/db/index.js index 5384ab3..17d3b39 100644 --- a/src/db/index.js +++ b/src/db/index.js @@ -11,7 +11,8 @@ export let db; export const initDb = async () => { const client = new Client({ connectionString: env.DATABASE_URL, - idleTimeoutMillis: 20000 + idleTimeoutMillis: 10000, + ssl: false, }); await client.connect(); diff --git a/src/db/migrations/0000_huge_ares.sql b/src/db/migrations/0000_huge_ares.sql deleted file mode 100644 index 370a6ac..0000000 --- a/src/db/migrations/0000_huge_ares.sql +++ /dev/null @@ -1,43 +0,0 @@ -CREATE TABLE IF NOT EXISTS "articles" ( - "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, - "site_id" uuid, - "content" text, - "source_video_id" text -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "sessions" ( - "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, - "user_id" uuid, - "google_code" text -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "sites" ( - "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, - "user_id" uuid, - "name" text -); ---> statement-breakpoint -CREATE TABLE IF NOT EXISTS "users" ( - "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, - "google_id" text, - "name" text, - "email" text -); ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "articles" ADD CONSTRAINT "articles_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "sites"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "sites" ADD CONSTRAINT "sites_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/src/db/migrations/0000_rapid_moira_mactaggert.sql b/src/db/migrations/0000_rapid_moira_mactaggert.sql new file mode 100644 index 0000000..483e5d3 --- /dev/null +++ b/src/db/migrations/0000_rapid_moira_mactaggert.sql @@ -0,0 +1,81 @@ +DO $$ BEGIN + CREATE TYPE "subscription_tier" AS ENUM('enterprise', 'pro', 'basic', 'free'); +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "sites" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" uuid, + "name" text, + "primary_color_hex" varchar(6) DEFAULT 'c4ced4'::character varying NOT NULL, + "secondary_color_hex" varchar(6) DEFAULT '27251f'::character varying NOT NULL, + "text_color_hex" varchar(6) DEFAULT 'ffffff'::character varying NOT NULL +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "users" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "name" text, + "email" text, + "channel_id" text, + "google_id" text, + "uploads_playlist_id" text, + "subscription_tier" "subscription_tier" DEFAULT 'free' NOT NULL, + "tokens" integer DEFAULT 0 NOT NULL, + "stripe_id" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "articles" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "site_id" uuid, + "content" text, + "source_video_id" text, + "title" text, + "seo_slug" text, + "created_at" timestamp DEFAULT now(), + "is_public" boolean DEFAULT true, + "views" integer DEFAULT 0 +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "sessions" ( + "id" uuid PRIMARY KEY DEFAULT gen_random_uuid() NOT NULL, + "user_id" uuid, + "google_access_token" text, + "google_refresh_token" text, + "expires_at" timestamp +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "signups" ( + "email" text NOT NULL, + "site_id" uuid NOT NULL, + "created_at" timestamp DEFAULT now() NOT NULL, + "source" text +); +--> statement-breakpoint +CREATE TABLE IF NOT EXISTS "waitlist" ( + "email" text +); +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "sites" ADD CONSTRAINT "sites_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "articles" ADD CONSTRAINT "articles_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "sites"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "sessions" ADD CONSTRAINT "sessions_user_id_users_id_fk" FOREIGN KEY ("user_id") REFERENCES "users"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; +--> statement-breakpoint +DO $$ BEGIN + ALTER TABLE "signups" ADD CONSTRAINT "signups_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "sites"("id") ON DELETE no action ON UPDATE no action; +EXCEPTION + WHEN duplicate_object THEN null; +END $$; \ No newline at end of file diff --git a/src/db/migrations/0019_lying_tomorrow_man.sql b/src/db/migrations/0001_dizzy_preak.sql similarity index 54% rename from src/db/migrations/0019_lying_tomorrow_man.sql rename to src/db/migrations/0001_dizzy_preak.sql index b3abb1b..75a0838 100644 --- a/src/db/migrations/0019_lying_tomorrow_man.sql +++ b/src/db/migrations/0001_dizzy_preak.sql @@ -1,6 +1,4 @@ ALTER TABLE "sites" ALTER COLUMN "primary_color_hex" SET DEFAULT 'c4ced4';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "primary_color_hex" SET NOT NULL;--> statement-breakpoint ALTER TABLE "sites" ALTER COLUMN "secondary_color_hex" SET DEFAULT '27251f';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "secondary_color_hex" SET NOT NULL;--> statement-breakpoint ALTER TABLE "sites" ALTER COLUMN "text_color_hex" SET DEFAULT 'ffffff';--> statement-breakpoint -ALTER TABLE "sites" ALTER COLUMN "text_color_hex" SET NOT NULL; \ No newline at end of file +ALTER TABLE "articles" ADD CONSTRAINT "articles_site_id_seo_slug_unique" UNIQUE NULLS NOT DISTINCT("site_id","seo_slug"); \ No newline at end of file diff --git a/src/db/migrations/0001_slim_xavin.sql b/src/db/migrations/0001_slim_xavin.sql deleted file mode 100644 index 9a59c34..0000000 --- a/src/db/migrations/0001_slim_xavin.sql +++ /dev/null @@ -1,6 +0,0 @@ -ALTER TABLE "sessions" ADD COLUMN "google_access_token" text;--> statement-breakpoint -ALTER TABLE "sessions" ADD COLUMN "google_refresh_token" text;--> statement-breakpoint -ALTER TABLE "sessions" ADD COLUMN "expires_at" date;--> statement-breakpoint -ALTER TABLE "users" ADD COLUMN "google_refresh_token" text;--> statement-breakpoint -ALTER TABLE "sessions" DROP COLUMN IF EXISTS "google_code";--> statement-breakpoint -ALTER TABLE "users" DROP COLUMN IF EXISTS "google_id"; \ No newline at end of file diff --git a/src/db/migrations/0002_bent_warpath.sql b/src/db/migrations/0002_bent_warpath.sql new file mode 100644 index 0000000..44b7ae0 --- /dev/null +++ b/src/db/migrations/0002_bent_warpath.sql @@ -0,0 +1 @@ +ALTER TABLE "articles" DROP CONSTRAINT "articles_site_id_seo_slug_unique"; \ No newline at end of file diff --git a/src/db/migrations/0002_small_forge.sql b/src/db/migrations/0002_small_forge.sql deleted file mode 100644 index bae96de..0000000 --- a/src/db/migrations/0002_small_forge.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "channel_id" text; \ No newline at end of file diff --git a/src/db/migrations/0003_elite_falcon.sql b/src/db/migrations/0003_elite_falcon.sql deleted file mode 100644 index 0a7abc4..0000000 --- a/src/db/migrations/0003_elite_falcon.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "users" DROP COLUMN IF EXISTS "google_refresh_token"; \ No newline at end of file diff --git a/src/db/migrations/0003_past_mikhail_rasputin.sql b/src/db/migrations/0003_past_mikhail_rasputin.sql new file mode 100644 index 0000000..c86c9b2 --- /dev/null +++ b/src/db/migrations/0003_past_mikhail_rasputin.sql @@ -0,0 +1,2 @@ +ALTER TABLE "sites" ADD COLUMN "domain" text;--> statement-breakpoint +ALTER TABLE "sites" ADD CONSTRAINT "sites_domain_unique" UNIQUE("domain"); \ No newline at end of file diff --git a/src/db/migrations/0004_daffy_ironclad.sql b/src/db/migrations/0004_daffy_ironclad.sql deleted file mode 100644 index b005c4d..0000000 --- a/src/db/migrations/0004_daffy_ironclad.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "google_id" text; \ No newline at end of file diff --git a/src/db/migrations/0004_worthless_meltdown.sql b/src/db/migrations/0004_worthless_meltdown.sql new file mode 100644 index 0000000..1068950 --- /dev/null +++ b/src/db/migrations/0004_worthless_meltdown.sql @@ -0,0 +1,4 @@ +ALTER TABLE "sites" ADD COLUMN "send_freebie" boolean;--> statement-breakpoint +ALTER TABLE "sites" ADD COLUMN "freebie_url" text;--> statement-breakpoint +ALTER TABLE "sites" ADD COLUMN "freebie_text" text;--> statement-breakpoint +ALTER TABLE "sites" ADD COLUMN "freebie_image_url" text; \ No newline at end of file diff --git a/src/db/migrations/0005_purple_firebird.sql b/src/db/migrations/0005_purple_firebird.sql new file mode 100644 index 0000000..870fb1d --- /dev/null +++ b/src/db/migrations/0005_purple_firebird.sql @@ -0,0 +1 @@ +ALTER TABLE "sites" ADD COLUMN "freebie_name" text; \ No newline at end of file diff --git a/src/db/migrations/0005_tricky_sheva_callister.sql b/src/db/migrations/0005_tricky_sheva_callister.sql deleted file mode 100644 index d8fe0ac..0000000 --- a/src/db/migrations/0005_tricky_sheva_callister.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "users" ADD COLUMN "uploads_playlist_id" text; \ No newline at end of file diff --git a/src/db/migrations/0006_same_bulldozer.sql b/src/db/migrations/0006_same_bulldozer.sql new file mode 100644 index 0000000..450a154 --- /dev/null +++ b/src/db/migrations/0006_same_bulldozer.sql @@ -0,0 +1,2 @@ +ALTER TABLE "sites" ADD COLUMN "title" text;--> statement-breakpoint +ALTER TABLE "sites" ADD COLUMN "subtitle" text; \ No newline at end of file diff --git a/src/db/migrations/0006_wide_the_hunter.sql b/src/db/migrations/0006_wide_the_hunter.sql deleted file mode 100644 index c880d56..0000000 --- a/src/db/migrations/0006_wide_the_hunter.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "sessions" ALTER COLUMN "expires_at" SET DATA TYPE timestamp; \ No newline at end of file diff --git a/src/db/migrations/0007_familiar_thor_girl.sql b/src/db/migrations/0007_familiar_thor_girl.sql deleted file mode 100644 index 6d85771..0000000 --- a/src/db/migrations/0007_familiar_thor_girl.sql +++ /dev/null @@ -1,2 +0,0 @@ -ALTER TABLE "articles" ADD COLUMN "title" text;--> statement-breakpoint -ALTER TABLE "articles" ADD COLUMN "seo_slug" text; \ No newline at end of file diff --git a/src/db/migrations/0007_shiny_colossus.sql b/src/db/migrations/0007_shiny_colossus.sql new file mode 100644 index 0000000..1a4ef59 --- /dev/null +++ b/src/db/migrations/0007_shiny_colossus.sql @@ -0,0 +1 @@ +ALTER TABLE "sites" ADD COLUMN "subdomain_slug" text NOT NULL; \ No newline at end of file diff --git a/src/db/migrations/0008_jittery_piledriver.sql b/src/db/migrations/0008_jittery_piledriver.sql deleted file mode 100644 index a33f905..0000000 --- a/src/db/migrations/0008_jittery_piledriver.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "articles" ADD COLUMN "created_at" timestamp; \ No newline at end of file diff --git a/src/db/migrations/0008_long_chameleon.sql b/src/db/migrations/0008_long_chameleon.sql new file mode 100644 index 0000000..5b9dcec --- /dev/null +++ b/src/db/migrations/0008_long_chameleon.sql @@ -0,0 +1 @@ +ALTER TABLE "sites" ALTER COLUMN "subdomain_slug" DROP NOT NULL; \ No newline at end of file diff --git a/src/db/migrations/0009_aromatic_rachel_grey.sql b/src/db/migrations/0009_aromatic_rachel_grey.sql new file mode 100644 index 0000000..41c958f --- /dev/null +++ b/src/db/migrations/0009_aromatic_rachel_grey.sql @@ -0,0 +1 @@ +ALTER TABLE "sites" ADD COLUMN "social_medias" jsonb; \ No newline at end of file diff --git a/src/db/migrations/0009_opposite_slayback.sql b/src/db/migrations/0009_opposite_slayback.sql deleted file mode 100644 index e2e1cb3..0000000 --- a/src/db/migrations/0009_opposite_slayback.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "articles" ALTER COLUMN "created_at" SET DEFAULT now(); \ No newline at end of file diff --git a/src/db/migrations/0010_same_famine.sql b/src/db/migrations/0010_same_famine.sql deleted file mode 100644 index 1d36722..0000000 --- a/src/db/migrations/0010_same_famine.sql +++ /dev/null @@ -1,11 +0,0 @@ -CREATE TABLE IF NOT EXISTS "signups" ( - "email" text NOT NULL, - "site_id" uuid NOT NULL, - "created_at" timestamp DEFAULT now() -); ---> statement-breakpoint -DO $$ BEGIN - ALTER TABLE "signups" ADD CONSTRAINT "signups_site_id_sites_id_fk" FOREIGN KEY ("site_id") REFERENCES "sites"("id") ON DELETE no action ON UPDATE no action; -EXCEPTION - WHEN duplicate_object THEN null; -END $$; diff --git a/src/db/migrations/0011_serious_tenebrous.sql b/src/db/migrations/0011_serious_tenebrous.sql deleted file mode 100644 index ec054dd..0000000 --- a/src/db/migrations/0011_serious_tenebrous.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "articles" ADD COLUMN "is_public" boolean; \ No newline at end of file diff --git a/src/db/migrations/0012_nervous_penance.sql b/src/db/migrations/0012_nervous_penance.sql deleted file mode 100644 index 714431b..0000000 --- a/src/db/migrations/0012_nervous_penance.sql +++ /dev/null @@ -1 +0,0 @@ -ALTER TABLE "articles" ALTER COLUMN "is_public" SET DEFAULT true; \ No newline at end of file diff --git a/src/db/migrations/0017_goofy_lethal_legion.sql b/src/db/migrations/0017_goofy_lethal_legion.sql deleted file mode 100644 index 61ccd7e..0000000 --- a/src/db/migrations/0017_goofy_lethal_legion.sql +++ /dev/null @@ -1,8 +0,0 @@ -DO $$ BEGIN - CREATE TYPE "subscription_tier" AS ENUM('free', 'basic', 'pro', 'enterprise'); -EXCEPTION - WHEN duplicate_object THEN null; -END $$; ---> statement-breakpoint -ALTER TABLE "users" ADD COLUMN "subscription_tier" "subscriptiontier" DEFAULT 'free' NOT NULL;--> statement-breakpoint -ALTER TABLE "users" ADD COLUMN "tokens" integer DEFAULT 0 NOT NULL; \ No newline at end of file diff --git a/src/db/migrations/0018_light_victor_mancha.sql b/src/db/migrations/0018_light_victor_mancha.sql deleted file mode 100644 index e5b51a4..0000000 --- a/src/db/migrations/0018_light_victor_mancha.sql +++ /dev/null @@ -1,3 +0,0 @@ -ALTER TABLE "sites" ADD COLUMN "primary_color_hex" varchar(6);--> statement-breakpoint -ALTER TABLE "sites" ADD COLUMN "secondary_color_hex" varchar(6);--> statement-breakpoint -ALTER TABLE "sites" ADD COLUMN "text_color_hex" varchar(6); \ No newline at end of file diff --git a/src/db/migrations/0022_tidy_proemial_gods.sql b/src/db/migrations/0022_tidy_proemial_gods.sql deleted file mode 100644 index 9c5a85e..0000000 --- a/src/db/migrations/0022_tidy_proemial_gods.sql +++ /dev/null @@ -1,4 +0,0 @@ -ALTER TABLE "signups" ALTER COLUMN "created_at" SET NOT NULL;--> statement-breakpoint -ALTER TABLE "articles" ADD COLUMN "views" integer DEFAULT 0;--> statement-breakpoint -ALTER TABLE "signups" ADD COLUMN "source" text;--> statement-breakpoint -ALTER TABLE "articles" ADD CONSTRAINT "articles_site_id_seo_slug_unique" UNIQUE NULLS NOT DISTINCT("site_id","seo_slug"); \ No newline at end of file diff --git a/src/db/migrations/meta/0000_snapshot.json b/src/db/migrations/meta/0000_snapshot.json index 9e806b8..b63d533 100644 --- a/src/db/migrations/meta/0000_snapshot.json +++ b/src/db/migrations/meta/0000_snapshot.json @@ -1,9 +1,140 @@ { - "id": "b6cb5336-be20-4e96-861f-fff166b013c7", - "prevId": "00000000-0000-0000-0000-000000000000", + "id": "00000000-0000-0000-0000-000000000000", + "prevId": "", "version": "5", "dialect": "pg", "tables": { + "sites": { + "name": "sites", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "user_id": { + "name": "user_id", + "type": "uuid", + "primaryKey": false, + "notNull": false + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'::character varying" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'::character varying" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'::character varying" + } + }, + "indexes": {}, + "foreignKeys": { + "sites_user_id_users_id_fk": { + "name": "sites_user_id_users_id_fk", + "tableFrom": "sites", + "tableTo": "users", + "columnsFrom": [ + "user_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "users": { + "name": "users", + "schema": "", + "columns": { + "id": { + "name": "id", + "type": "uuid", + "primaryKey": true, + "notNull": true, + "default": "gen_random_uuid()" + }, + "name": { + "name": "name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "channel_id": { + "name": "channel_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "google_id": { + "name": "google_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "uploads_playlist_id": { + "name": "uploads_playlist_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "articles": { "name": "articles", "schema": "", @@ -32,6 +163,39 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_slug": { + "name": "seo_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 } }, "indexes": {}, @@ -70,11 +234,23 @@ "primaryKey": false, "notNull": false }, - "google_code": { - "name": "google_code", + "google_access_token": { + "name": "google_access_token", "type": "text", "primaryKey": false, "notNull": false + }, + "google_refresh_token": { + "name": "google_refresh_token", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "expires_at": { + "name": "expires_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -96,25 +272,31 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "sites": { - "name": "sites", + "signups": { + "name": "signups", "schema": "", "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true }, - "user_id": { - "name": "user_id", + "site_id": { + "name": "site_id", "type": "uuid", "primaryKey": false, - "notNull": false + "notNull": true }, - "name": { - "name": "name", + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + }, + "source": { + "name": "source", "type": "text", "primaryKey": false, "notNull": false @@ -122,12 +304,12 @@ }, "indexes": {}, "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", "columnsFrom": [ - "user_id" + "site_id" ], "columnsTo": [ "id" @@ -139,29 +321,10 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, - "users": { - "name": "users", + "waitlist": { + "name": "waitlist", "schema": "", "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, "email": { "name": "email", "type": "text", @@ -175,7 +338,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "enterprise": "enterprise", + "pro": "pro", + "basic": "basic", + "free": "free" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0001_snapshot.json b/src/db/migrations/meta/0001_snapshot.json index fc081b4..1dc22ae 100644 --- a/src/db/migrations/meta/0001_snapshot.json +++ b/src/db/migrations/meta/0001_snapshot.json @@ -1,6 +1,6 @@ { - "id": "de9d771e-4272-49d2-bcc7-6eb5291bcd51", - "prevId": "b6cb5336-be20-4e96-861f-fff166b013c7", + "id": "c1509dda-926d-4cd4-b876-3ec5dfca0729", + "prevId": "00000000-0000-0000-0000-000000000000", "version": "5", "dialect": "pg", "tables": { @@ -32,6 +32,39 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_slug": { + "name": "seo_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -51,7 +84,16 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "articles_site_id_seo_slug_unique": { + "name": "articles_site_id_seo_slug_unique", + "nullsNotDistinct": true, + "columns": [ + "site_id", + "seo_slug" + ] + } + } }, "sessions": { "name": "sessions", @@ -84,7 +126,7 @@ }, "expires_at": { "name": "expires_at", - "type": "date", + "type": "timestamp", "primaryKey": false, "notNull": false } @@ -108,6 +150,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -130,6 +221,27 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" } }, "indexes": {}, @@ -162,8 +274,14 @@ "notNull": true, "default": "gen_random_uuid()" }, - "google_refresh_token": { - "name": "google_refresh_token", + "google_id": { + "name": "google_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_id": { + "name": "stripe_id", "type": "text", "primaryKey": false, "notNull": false @@ -174,6 +292,48 @@ "primaryKey": false, "notNull": false }, + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "channel_id": { + "name": "channel_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "uploads_playlist_id": { + "name": "uploads_playlist_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { "email": { "name": "email", "type": "text", @@ -187,7 +347,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0002_snapshot.json b/src/db/migrations/meta/0002_snapshot.json index 7e8c9eb..15addb2 100644 --- a/src/db/migrations/meta/0002_snapshot.json +++ b/src/db/migrations/meta/0002_snapshot.json @@ -1,6 +1,6 @@ { - "id": "ef238b19-05f5-4be9-90f8-56f4a08bb576", - "prevId": "de9d771e-4272-49d2-bcc7-6eb5291bcd51", + "id": "7cdb7236-fe99-4924-b4c3-420b248d403f", + "prevId": "c1509dda-926d-4cd4-b876-3ec5dfca0729", "version": "5", "dialect": "pg", "tables": { @@ -32,6 +32,39 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_slug": { + "name": "seo_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -84,7 +117,7 @@ }, "expires_at": { "name": "expires_at", - "type": "date", + "type": "timestamp", "primaryKey": false, "notNull": false } @@ -108,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -130,6 +212,27 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" } }, "indexes": {}, @@ -162,8 +265,14 @@ "notNull": true, "default": "gen_random_uuid()" }, - "google_refresh_token": { - "name": "google_refresh_token", + "google_id": { + "name": "google_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_id": { + "name": "stripe_id", "type": "text", "primaryKey": false, "notNull": false @@ -185,6 +294,42 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "uploads_playlist_id": { + "name": "uploads_playlist_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -193,7 +338,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0003_snapshot.json b/src/db/migrations/meta/0003_snapshot.json index fb3f4da..91e420f 100644 --- a/src/db/migrations/meta/0003_snapshot.json +++ b/src/db/migrations/meta/0003_snapshot.json @@ -1,6 +1,6 @@ { - "id": "d7ae7ea1-7218-4141-a9a9-35395e42e9bd", - "prevId": "ef238b19-05f5-4be9-90f8-56f4a08bb576", + "id": "15eee88d-0bb0-4571-861d-dab8851effac", + "prevId": "7cdb7236-fe99-4924-b4c3-420b248d403f", "version": "5", "dialect": "pg", "tables": { @@ -32,6 +32,39 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_slug": { + "name": "seo_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -84,7 +117,7 @@ }, "expires_at": { "name": "expires_at", - "type": "date", + "type": "timestamp", "primaryKey": false, "notNull": false } @@ -108,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -130,6 +212,33 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -149,7 +258,15 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "sites_domain_unique": { + "name": "sites_domain_unique", + "nullsNotDistinct": false, + "columns": [ + "domain" + ] + } + } }, "users": { "name": "users", @@ -162,6 +279,18 @@ "notNull": true, "default": "gen_random_uuid()" }, + "google_id": { + "name": "google_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "name": { "name": "name", "type": "text", @@ -179,6 +308,42 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "uploads_playlist_id": { + "name": "uploads_playlist_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -187,7 +352,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0004_snapshot.json b/src/db/migrations/meta/0004_snapshot.json index 40662b0..13d49df 100644 --- a/src/db/migrations/meta/0004_snapshot.json +++ b/src/db/migrations/meta/0004_snapshot.json @@ -1,6 +1,6 @@ { - "id": "130129fa-d718-4be8-8ffe-f285dce85195", - "prevId": "d7ae7ea1-7218-4141-a9a9-35395e42e9bd", + "id": "0a279256-aa6d-4915-ac29-67b4a99c6a93", + "prevId": "15eee88d-0bb0-4571-861d-dab8851effac", "version": "5", "dialect": "pg", "tables": { @@ -32,6 +32,39 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_slug": { + "name": "seo_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -84,7 +117,7 @@ }, "expires_at": { "name": "expires_at", - "type": "date", + "type": "timestamp", "primaryKey": false, "notNull": false } @@ -108,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -130,6 +212,57 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -149,7 +282,15 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "sites_domain_unique": { + "name": "sites_domain_unique", + "nullsNotDistinct": false, + "columns": [ + "domain" + ] + } + } }, "users": { "name": "users", @@ -168,6 +309,12 @@ "primaryKey": false, "notNull": false }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "name": { "name": "name", "type": "text", @@ -185,6 +332,42 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "uploads_playlist_id": { + "name": "uploads_playlist_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -193,7 +376,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0005_snapshot.json b/src/db/migrations/meta/0005_snapshot.json index fa591a1..3f0f19f 100644 --- a/src/db/migrations/meta/0005_snapshot.json +++ b/src/db/migrations/meta/0005_snapshot.json @@ -1,6 +1,6 @@ { - "id": "4c4cea1e-1ffe-4736-b045-7dadd7e22244", - "prevId": "130129fa-d718-4be8-8ffe-f285dce85195", + "id": "61fc5b8c-872d-4cb8-8d43-4f4fdbaeac3c", + "prevId": "0a279256-aa6d-4915-ac29-67b4a99c6a93", "version": "5", "dialect": "pg", "tables": { @@ -32,6 +32,39 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_slug": { + "name": "seo_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -84,7 +117,7 @@ }, "expires_at": { "name": "expires_at", - "type": "date", + "type": "timestamp", "primaryKey": false, "notNull": false } @@ -108,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -130,6 +212,63 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "freebie_name": { + "name": "freebie_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -149,7 +288,15 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "sites_domain_unique": { + "name": "sites_domain_unique", + "nullsNotDistinct": false, + "columns": [ + "domain" + ] + } + } }, "users": { "name": "users", @@ -168,6 +315,12 @@ "primaryKey": false, "notNull": false }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "name": { "name": "name", "type": "text", @@ -191,6 +344,36 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -199,7 +382,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0006_snapshot.json b/src/db/migrations/meta/0006_snapshot.json index b090d42..6e75983 100644 --- a/src/db/migrations/meta/0006_snapshot.json +++ b/src/db/migrations/meta/0006_snapshot.json @@ -1,6 +1,6 @@ { - "id": "3ec0762e-c27b-4b7f-b4a6-4db07400a5ae", - "prevId": "4c4cea1e-1ffe-4736-b045-7dadd7e22244", + "id": "3a12cc10-eb29-4469-9b41-3a834ca77f35", + "prevId": "61fc5b8c-872d-4cb8-8d43-4f4fdbaeac3c", "version": "5", "dialect": "pg", "tables": { @@ -32,6 +32,39 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "seo_slug": { + "name": "seo_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -108,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -130,6 +212,75 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "freebie_name": { + "name": "freebie_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -149,7 +300,15 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "sites_domain_unique": { + "name": "sites_domain_unique", + "nullsNotDistinct": false, + "columns": [ + "domain" + ] + } + } }, "users": { "name": "users", @@ -168,6 +327,12 @@ "primaryKey": false, "notNull": false }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "name": { "name": "name", "type": "text", @@ -191,6 +356,36 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -199,7 +394,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0007_snapshot.json b/src/db/migrations/meta/0007_snapshot.json index 0f4967c..a5cbe77 100644 --- a/src/db/migrations/meta/0007_snapshot.json +++ b/src/db/migrations/meta/0007_snapshot.json @@ -1,6 +1,6 @@ { - "id": "10737e50-695f-41a3-94b4-e34439850a06", - "prevId": "3ec0762e-c27b-4b7f-b4a6-4db07400a5ae", + "id": "5dcf0ad1-cb9d-4c85-ad08-bee043c64e97", + "prevId": "3a12cc10-eb29-4469-9b41-3a834ca77f35", "version": "5", "dialect": "pg", "tables": { @@ -44,6 +44,27 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -120,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -142,6 +212,81 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "freebie_name": { + "name": "freebie_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subdomain_slug": { + "name": "subdomain_slug", + "type": "text", + "primaryKey": false, + "notNull": true } }, "indexes": {}, @@ -161,7 +306,15 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "sites_domain_unique": { + "name": "sites_domain_unique", + "nullsNotDistinct": false, + "columns": [ + "domain" + ] + } + } }, "users": { "name": "users", @@ -180,6 +333,12 @@ "primaryKey": false, "notNull": false }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "name": { "name": "name", "type": "text", @@ -203,6 +362,36 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -211,7 +400,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0008_snapshot.json b/src/db/migrations/meta/0008_snapshot.json index 1bde36b..d0995f7 100644 --- a/src/db/migrations/meta/0008_snapshot.json +++ b/src/db/migrations/meta/0008_snapshot.json @@ -1,6 +1,6 @@ { - "id": "8177d5c3-dd38-41fc-83ae-a544aa8dc9a4", - "prevId": "10737e50-695f-41a3-94b4-e34439850a06", + "id": "3eac9b0e-ebf2-40df-953a-b80af0377fc4", + "prevId": "5dcf0ad1-cb9d-4c85-ad08-bee043c64e97", "version": "5", "dialect": "pg", "tables": { @@ -45,11 +45,26 @@ "primaryKey": false, "notNull": false }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, "created_at": { "name": "created_at", "type": "timestamp", "primaryKey": false, - "notNull": false + "notNull": false, + "default": "now()" } }, "indexes": {}, @@ -126,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -148,6 +212,81 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "freebie_name": { + "name": "freebie_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subdomain_slug": { + "name": "subdomain_slug", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -167,7 +306,15 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "sites_domain_unique": { + "name": "sites_domain_unique", + "nullsNotDistinct": false, + "columns": [ + "domain" + ] + } + } }, "users": { "name": "users", @@ -186,6 +333,12 @@ "primaryKey": false, "notNull": false }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "name": { "name": "name", "type": "text", @@ -209,6 +362,36 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -217,7 +400,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0009_snapshot.json b/src/db/migrations/meta/0009_snapshot.json index 0e72f4e..9420139 100644 --- a/src/db/migrations/meta/0009_snapshot.json +++ b/src/db/migrations/meta/0009_snapshot.json @@ -1,6 +1,6 @@ { - "id": "35af811f-9d91-4524-b269-c7e3f8eb0ce8", - "prevId": "8177d5c3-dd38-41fc-83ae-a544aa8dc9a4", + "id": "ccdf67ee-d01b-4505-90d0-e53063d080ad", + "prevId": "3eac9b0e-ebf2-40df-953a-b80af0377fc4", "version": "5", "dialect": "pg", "tables": { @@ -45,6 +45,20 @@ "primaryKey": false, "notNull": false }, + "is_public": { + "name": "is_public", + "type": "boolean", + "primaryKey": false, + "notNull": false, + "default": true + }, + "views": { + "name": "views", + "type": "integer", + "primaryKey": false, + "notNull": false, + "default": 0 + }, "created_at": { "name": "created_at", "type": "timestamp", @@ -127,6 +141,55 @@ "compositePrimaryKeys": {}, "uniqueConstraints": {} }, + "signups": { + "name": "signups", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": true + }, + "site_id": { + "name": "site_id", + "type": "uuid", + "primaryKey": false, + "notNull": true + }, + "source": { + "name": "source", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "created_at": { + "name": "created_at", + "type": "timestamp", + "primaryKey": false, + "notNull": true, + "default": "now()" + } + }, + "indexes": {}, + "foreignKeys": { + "signups_site_id_sites_id_fk": { + "name": "signups_site_id_sites_id_fk", + "tableFrom": "signups", + "tableTo": "sites", + "columnsFrom": [ + "site_id" + ], + "columnsTo": [ + "id" + ], + "onDelete": "no action", + "onUpdate": "no action" + } + }, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, "sites": { "name": "sites", "schema": "", @@ -149,6 +212,87 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "primary_color_hex": { + "name": "primary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'c4ced4'" + }, + "secondary_color_hex": { + "name": "secondary_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'27251f'" + }, + "text_color_hex": { + "name": "text_color_hex", + "type": "varchar(6)", + "primaryKey": false, + "notNull": true, + "default": "'ffffff'" + }, + "title": { + "name": "title", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subtitle": { + "name": "subtitle", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "domain": { + "name": "domain", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "send_freebie": { + "name": "send_freebie", + "type": "boolean", + "primaryKey": false, + "notNull": false + }, + "freebie_name": { + "name": "freebie_name", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_url": { + "name": "freebie_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_text": { + "name": "freebie_text", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "freebie_image_url": { + "name": "freebie_image_url", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "subdomain_slug": { + "name": "subdomain_slug", + "type": "text", + "primaryKey": false, + "notNull": false + }, + "social_medias": { + "name": "social_medias", + "type": "jsonb", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -168,7 +312,15 @@ } }, "compositePrimaryKeys": {}, - "uniqueConstraints": {} + "uniqueConstraints": { + "sites_domain_unique": { + "name": "sites_domain_unique", + "nullsNotDistinct": false, + "columns": [ + "domain" + ] + } + } }, "users": { "name": "users", @@ -187,6 +339,12 @@ "primaryKey": false, "notNull": false }, + "stripe_id": { + "name": "stripe_id", + "type": "text", + "primaryKey": false, + "notNull": false + }, "name": { "name": "name", "type": "text", @@ -210,6 +368,36 @@ "type": "text", "primaryKey": false, "notNull": false + }, + "subscription_tier": { + "name": "subscription_tier", + "type": "subscription_tier", + "primaryKey": false, + "notNull": true, + "default": "'free'" + }, + "tokens": { + "name": "tokens", + "type": "integer", + "primaryKey": false, + "notNull": true, + "default": 0 + } + }, + "indexes": {}, + "foreignKeys": {}, + "compositePrimaryKeys": {}, + "uniqueConstraints": {} + }, + "waitlist": { + "name": "waitlist", + "schema": "", + "columns": { + "email": { + "name": "email", + "type": "text", + "primaryKey": false, + "notNull": false } }, "indexes": {}, @@ -218,7 +406,17 @@ "uniqueConstraints": {} } }, - "enums": {}, + "enums": { + "subscription_tier": { + "name": "subscription_tier", + "values": { + "free": "free", + "basic": "basic", + "pro": "pro", + "enterprise": "enterprise" + } + } + }, "schemas": {}, "_meta": { "schemas": {}, diff --git a/src/db/migrations/meta/0010_snapshot.json b/src/db/migrations/meta/0010_snapshot.json deleted file mode 100644 index 29bc35b..0000000 --- a/src/db/migrations/meta/0010_snapshot.json +++ /dev/null @@ -1,271 +0,0 @@ -{ - "id": "55d4edf3-4ec8-4c89-ae81-2c9199efea11", - "prevId": "35af811f-9d91-4524-b269-c7e3f8eb0ce8", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0011_snapshot.json b/src/db/migrations/meta/0011_snapshot.json deleted file mode 100644 index 202cbae..0000000 --- a/src/db/migrations/meta/0011_snapshot.json +++ /dev/null @@ -1,277 +0,0 @@ -{ - "id": "bd993656-45ee-4b6d-9875-e47a5674f46e", - "prevId": "55d4edf3-4ec8-4c89-ae81-2c9199efea11", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0012_snapshot.json b/src/db/migrations/meta/0012_snapshot.json deleted file mode 100644 index e5f933a..0000000 --- a/src/db/migrations/meta/0012_snapshot.json +++ /dev/null @@ -1,278 +0,0 @@ -{ - "id": "06039986-7308-452a-9a12-12c317b3f75b", - "prevId": "bd993656-45ee-4b6d-9875-e47a5674f46e", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": {}, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0017_snapshot.json b/src/db/migrations/meta/0017_snapshot.json deleted file mode 100644 index df8cde1..0000000 --- a/src/db/migrations/meta/0017_snapshot.json +++ /dev/null @@ -1,302 +0,0 @@ -{ - "id": "e60bff42-5767-4455-9a0d-3f9812ef99fe", - "prevId": "06039986-7308-452a-9a12-12c317b3f75b", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0018_snapshot.json b/src/db/migrations/meta/0018_snapshot.json deleted file mode 100644 index 3b79c50..0000000 --- a/src/db/migrations/meta/0018_snapshot.json +++ /dev/null @@ -1,320 +0,0 @@ -{ - "id": "81f29339-a37a-4371-ba92-08d75cf75378", - "prevId": "e60bff42-5767-4455-9a0d-3f9812ef99fe", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": false - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": false - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0019_snapshot.json b/src/db/migrations/meta/0019_snapshot.json deleted file mode 100644 index 664f789..0000000 --- a/src/db/migrations/meta/0019_snapshot.json +++ /dev/null @@ -1,323 +0,0 @@ -{ - "id": "015070b2-ab36-4bf6-a009-f7bb126c4aab", - "prevId": "81f29339-a37a-4371-ba92-08d75cf75378", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/0022_snapshot.json b/src/db/migrations/meta/0022_snapshot.json deleted file mode 100644 index e88771d..0000000 --- a/src/db/migrations/meta/0022_snapshot.json +++ /dev/null @@ -1,345 +0,0 @@ -{ - "id": "c86e21cd-144e-4c9a-abf6-b14b38774154", - "prevId": "015070b2-ab36-4bf6-a009-f7bb126c4aab", - "version": "5", - "dialect": "pg", - "tables": { - "articles": { - "name": "articles", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "content": { - "name": "content", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "source_video_id": { - "name": "source_video_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "title": { - "name": "title", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "seo_slug": { - "name": "seo_slug", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "is_public": { - "name": "is_public", - "type": "boolean", - "primaryKey": false, - "notNull": false, - "default": true - }, - "views": { - "name": "views", - "type": "integer", - "primaryKey": false, - "notNull": false, - "default": 0 - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "articles_site_id_sites_id_fk": { - "name": "articles_site_id_sites_id_fk", - "tableFrom": "articles", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": { - "articles_site_id_seo_slug_unique": { - "name": "articles_site_id_seo_slug_unique", - "nullsNotDistinct": true, - "columns": [ - "site_id", - "seo_slug" - ] - } - } - }, - "sessions": { - "name": "sessions", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "google_access_token": { - "name": "google_access_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "google_refresh_token": { - "name": "google_refresh_token", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "expires_at": { - "name": "expires_at", - "type": "timestamp", - "primaryKey": false, - "notNull": false - } - }, - "indexes": {}, - "foreignKeys": { - "sessions_user_id_users_id_fk": { - "name": "sessions_user_id_users_id_fk", - "tableFrom": "sessions", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "signups": { - "name": "signups", - "schema": "", - "columns": { - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": true - }, - "site_id": { - "name": "site_id", - "type": "uuid", - "primaryKey": false, - "notNull": true - }, - "source": { - "name": "source", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "created_at": { - "name": "created_at", - "type": "timestamp", - "primaryKey": false, - "notNull": true, - "default": "now()" - } - }, - "indexes": {}, - "foreignKeys": { - "signups_site_id_sites_id_fk": { - "name": "signups_site_id_sites_id_fk", - "tableFrom": "signups", - "tableTo": "sites", - "columnsFrom": [ - "site_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "sites": { - "name": "sites", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "user_id": { - "name": "user_id", - "type": "uuid", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "primary_color_hex": { - "name": "primary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'c4ced4'" - }, - "secondary_color_hex": { - "name": "secondary_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'27251f'" - }, - "text_color_hex": { - "name": "text_color_hex", - "type": "varchar(6)", - "primaryKey": false, - "notNull": true, - "default": "'ffffff'" - } - }, - "indexes": {}, - "foreignKeys": { - "sites_user_id_users_id_fk": { - "name": "sites_user_id_users_id_fk", - "tableFrom": "sites", - "tableTo": "users", - "columnsFrom": [ - "user_id" - ], - "columnsTo": [ - "id" - ], - "onDelete": "no action", - "onUpdate": "no action" - } - }, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - }, - "users": { - "name": "users", - "schema": "", - "columns": { - "id": { - "name": "id", - "type": "uuid", - "primaryKey": true, - "notNull": true, - "default": "gen_random_uuid()" - }, - "google_id": { - "name": "google_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "name": { - "name": "name", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "email": { - "name": "email", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "channel_id": { - "name": "channel_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "uploads_playlist_id": { - "name": "uploads_playlist_id", - "type": "text", - "primaryKey": false, - "notNull": false - }, - "subscription_tier": { - "name": "subscription_tier", - "type": "subscription_tier", - "primaryKey": false, - "notNull": true, - "default": "'free'" - }, - "tokens": { - "name": "tokens", - "type": "integer", - "primaryKey": false, - "notNull": true, - "default": 0 - } - }, - "indexes": {}, - "foreignKeys": {}, - "compositePrimaryKeys": {}, - "uniqueConstraints": {} - } - }, - "enums": { - "subscription_tier": { - "name": "subscription_tier", - "values": { - "free": "free", - "basic": "basic", - "pro": "pro", - "enterprise": "enterprise" - } - } - }, - "schemas": {}, - "_meta": { - "schemas": {}, - "tables": {}, - "columns": {} - } -} \ No newline at end of file diff --git a/src/db/migrations/meta/_journal.json b/src/db/migrations/meta/_journal.json index e29e80b..5fde1f8 100644 --- a/src/db/migrations/meta/_journal.json +++ b/src/db/migrations/meta/_journal.json @@ -5,162 +5,71 @@ { "idx": 0, "version": "5", - "when": 1713532681066, - "tag": "0000_huge_ares", + "when": 1716305931541, + "tag": "0000_rapid_moira_mactaggert", "breakpoints": true }, { "idx": 1, "version": "5", - "when": 1713547912112, - "tag": "0001_slim_xavin", + "when": 1716305965347, + "tag": "0001_dizzy_preak", "breakpoints": true }, { "idx": 2, "version": "5", - "when": 1713549800799, - "tag": "0002_small_forge", + "when": 1716306011573, + "tag": "0002_bent_warpath", "breakpoints": true }, { "idx": 3, "version": "5", - "when": 1713550262815, - "tag": "0003_elite_falcon", + "when": 1716401149580, + "tag": "0003_past_mikhail_rasputin", "breakpoints": true }, { "idx": 4, "version": "5", - "when": 1713550343102, - "tag": "0004_daffy_ironclad", + "when": 1716562329579, + "tag": "0004_worthless_meltdown", "breakpoints": true }, { "idx": 5, "version": "5", - "when": 1713551541682, - "tag": "0005_tricky_sheva_callister", + "when": 1716627095303, + "tag": "0005_purple_firebird", "breakpoints": true }, { "idx": 6, "version": "5", - "when": 1713614011867, - "tag": "0006_wide_the_hunter", + "when": 1716668597716, + "tag": "0006_same_bulldozer", "breakpoints": true }, { "idx": 7, "version": "5", - "when": 1714378789934, - "tag": "0007_familiar_thor_girl", + "when": 1716723156673, + "tag": "0007_shiny_colossus", "breakpoints": true }, { "idx": 8, "version": "5", - "when": 1714739422527, - "tag": "0008_jittery_piledriver", + "when": 1716723180254, + "tag": "0008_long_chameleon", "breakpoints": true }, { "idx": 9, "version": "5", - "when": 1714739443139, - "tag": "0009_opposite_slayback", - "breakpoints": true - }, - { - "idx": 10, - "version": "5", - "when": 1714739875253, - "tag": "0010_same_famine", - "breakpoints": true - }, - { - "idx": 11, - "version": "5", - "when": 1714856795946, - "tag": "0011_serious_tenebrous", - "breakpoints": true - }, - { - "idx": 12, - "version": "5", - "when": 1714859887333, - "tag": "0012_nervous_penance", - "breakpoints": true - }, - { - "idx": 13, - "version": "5", - "when": 1715191000039, - "tag": "0013_windy_marvel_zombies", - "breakpoints": true - }, - { - "idx": 14, - "version": "5", - "when": 1715191022918, - "tag": "0014_brown_leo", - "breakpoints": true - }, - { - "idx": 15, - "version": "5", - "when": 1715191126676, - "tag": "0015_sparkling_drax", - "breakpoints": true - }, - { - "idx": 16, - "version": "5", - "when": 1715191283764, - "tag": "0016_kind_riptide", - "breakpoints": true - }, - { - "idx": 17, - "version": "5", - "when": 1715191316156, - "tag": "0017_goofy_lethal_legion", - "breakpoints": true - }, - { - "idx": 18, - "version": "5", - "when": 1715197442428, - "tag": "0018_light_victor_mancha", - "breakpoints": true - }, - { - "idx": 19, - "version": "5", - "when": 1715199975839, - "tag": "0019_lying_tomorrow_man", - "breakpoints": true - }, - { - "idx": 20, - "version": "5", - "when": 1715247605191, - "tag": "0020_nifty_frog_thor", - "breakpoints": true - }, - { - "idx": 21, - "version": "5", - "when": 1715288497718, - "tag": "0021_perfect_leopardon", - "breakpoints": true - }, - { - "idx": 22, - "version": "5", - "when": 1715289112690, - "tag": "0022_tidy_proemial_gods", + "when": 1716744598232, + "tag": "0009_aromatic_rachel_grey", "breakpoints": true } ] diff --git a/src/db/schemas.js b/src/db/schemas.js index db08b1d..e21d6eb 100644 --- a/src/db/schemas.js +++ b/src/db/schemas.js @@ -1,10 +1,11 @@ -import { boolean, integer, pgEnum, pgTable, text, timestamp, unique, uuid, varchar } from "drizzle-orm/pg-core"; +import { boolean, integer, jsonb, pgEnum, pgTable, text, timestamp, unique, uuid, varchar } from "drizzle-orm/pg-core"; export const subscription_enum = pgEnum("subscription_tier", ["free", "basic", "pro", "enterprise"]) export const users = pgTable("users", { id: uuid("id").defaultRandom().primaryKey(), google_id: text("google_id"), + stripe_id: text("stripe_id"), name: text("name"), email: text("email"), channel_id: text("channel_id"), @@ -21,6 +22,18 @@ export const sessions = pgTable("sessions", { expires_at: timestamp("expires_at") }); +function makeid(length) { + let result = ''; + const characters = 'ABCDEFGHIJKLMNOPQRSTUVWXYZabcdefghijklmnopqrstuvwxyz0123456789'; + const charactersLength = characters.length; + let counter = 0; + while (counter < length) { + result += characters.charAt(Math.floor(Math.random() * charactersLength)); + counter += 1; + } + return result; +} + export const sites = pgTable("sites", { id: uuid("id").defaultRandom().primaryKey(), user_id: uuid("user_id").references(() => users.id), @@ -28,6 +41,18 @@ export const sites = pgTable("sites", { primary_color_hex: varchar("primary_color_hex", { length: 6 }).default("c4ced4").notNull(), secondary_color_hex: varchar("secondary_color_hex", { length: 6 }).default('27251f').notNull(), text_color_hex: varchar("text_color_hex", { length: 6 }).default('ffffff').notNull(), + title: text("title"), + subtitle: text("subtitle"), + domain: text("domain").unique(), + use_freebie: boolean("send_freebie"), + freebie_name: text("freebie_name"), + freebie_url: text("freebie_url"), + freebie_text: text("freebie_text"), + freebie_image_url: text("freebie_image_url"), + subdomain_slug: text("subdomain_slug").$defaultFn(() => { + return makeid(7); + }), + social_medias: jsonb("social_medias") }); export const articles = pgTable("articles", { @@ -40,9 +65,10 @@ export const articles = pgTable("articles", { is_public: boolean("is_public").default(true), views: integer("views").default(0), created_at: timestamp("created_at").defaultNow() -}, (t) => ({ - unq: unique().on(t.site_id, t.seo_slug).nullsNotDistinct() -})); + // }, (t) => ({ + // unq: unique().on(t.site_id, t.seo_slug).nullsNotDistinct() +}) +// ); export const signups = pgTable("signups", { email: text("email").notNull(), diff --git a/src/index.js b/src/index.js index 8da1840..fd9b73d 100644 --- a/src/index.js +++ b/src/index.js @@ -1,11 +1,10 @@ import { initDb } from "./db/index.js"; -import { channelRoutes, authRoutes, videoRoutes, meRoutes, blogRoutes } from "./routes/index.js"; +import { channelRoutes, authRoutes, videoRoutes, meRoutes, blogRoutes, dashboardRoutes } from "./routes/index.js"; import { env, Logger, Redis } from "./utils/index.js"; import fastify from "fastify"; import { middleware } from "./modules/middleware.js"; import oauth from '@fastify/oauth2'; import fastifyCookie from "@fastify/cookie"; -import { dashboardRoutes } from "./routes/dashboard.js"; // import fastifyMultipart from "@fastify/multipart"; const API_VERSION = "v1"; diff --git a/src/routes/auth.js b/src/routes/auth.js index 430840b..c4f56b5 100644 --- a/src/routes/auth.js +++ b/src/routes/auth.js @@ -1,10 +1,11 @@ import { createSession as createSession } from '../utils/token.js'; import { getChannelInfo, getUserInfo } from '../utils/youtube.js'; import { db } from '../db/index.js'; -import { sessions, users, users as usersTable } from '../db/schemas.js'; +import { sessions, sites, users, users as usersTable } from '../db/schemas.js'; import { eq } from 'drizzle-orm'; import { env } from '../utils/env.js'; import { authMiddleware, authMiddlewareFn } from '../modules/middleware.js'; +import { createCustomer } from '../utils/stripe.js'; /** @typedef {import("fastify").FastifyInstance} FastifyInstance */ /** @@ -32,28 +33,35 @@ export const authRoutes = (fastify, _, done) => { if (existing_user) { user = existing_user; - if(token.refresh_token) { + if (token.refresh_token) { await db.update(sessions).set({ refresh_token: token.refresh_token }).where(eq(sessions.user_id, user.id)); } } else { + const customer = await createCustomer(user_info.email, user_info.name); [user] = await db.insert(usersTable).values({ name: user_info.name, google_id: user_info.id, email: user_info.email, channel_id: channel_info.id, - uploads_playlist_id: channel_info.contentDetails.relatedPlaylists.uploads + uploads_playlist_id: channel_info.contentDetails.relatedPlaylists.uploads, + stripe_id: customer.id }).returning({ id: usersTable.id }); + await db.insert(sites).values({ + name: `${user_info.name}'s Website`, + user_id: user.id + }); + if (user.length == 0) { response.status(400).send({ success: false, message: "Problem when creating user account" }); return; } } let session_id; - if(token.refresh_token) { + if (token.refresh_token) { let session_info = await createSession(user.id, { access_token: token.access_token, refresh_token: token.refresh_token, @@ -64,13 +72,13 @@ export const authRoutes = (fastify, _, done) => { } else { let session_info = await db.select().from(users).leftJoin(sessions, eq(sessions.user_id, users.id)).where(eq(users.google_id, user_info.id)); - if(session_info.length == 0) { + if (session_info.length == 0) { response.status(400).send({ success: false, message: "Problem when creating user account" }); return; } session_id = session_info[0].sessions.id } - + // response.setCookie("token", session_id, { // httpOnly: false, // path: "/", @@ -78,9 +86,9 @@ export const authRoutes = (fastify, _, done) => { // maxAge: 1000 * 60 * 60 * 24 * 7, // domain: ".omersabic.com" // }).redirect(env.FRONTEND_URL); - - response.redirect(env.FRONTEND_URL+"/auth?token="+session_id); - + + response.redirect(env.FRONTEND_URL + "/app/auth?token=" + session_id); + // response.send({ // token: session_id // }); @@ -96,18 +104,18 @@ export const authRoutes = (fastify, _, done) => { preValidation: authMiddlewareFn }, async (req, reply) => { try { - await fastify.googleOAuth2.revokeToken(req.session, "refresh_token", { - "content-type": "application/json" - }); - console.log("revoked") - // console.log(await res.json()); + await fastify.googleOAuth2.revokeToken(req.session, "refresh_token", { + "content-type": "application/json" + }); + console.log("revoked") + // console.log(await res.json()); - reply.send({ - success: true - }); - } catch (e) { - console.log(e); - } + reply.send({ + success: true + }); + } catch (e) { + console.log(e); + } }) done(); diff --git a/src/routes/blog.js b/src/routes/blog.js index d2afb9e..f29d6e3 100644 --- a/src/routes/blog.js +++ b/src/routes/blog.js @@ -5,6 +5,7 @@ import { getAccessToken, getCaptionText, getChannelInfo, getVideoCaptions, parse import { articles, articles as articlesTable, signups as signupsTable, sites, users } from "../db/schemas.js"; import { createBlogFromCaptions } from "../utils/ai.js"; import { createArticleSlug } from "../utils/index.js"; +import { sendFreebie } from "../utils/email.js"; /** * @@ -30,13 +31,14 @@ export const blogRoutes = (fastify, _, done) => { } }, async (request, response) => { try { - const mine = request.query.mine != 'false' ?? true; + const mine = request.query.mine ? request.query.mine : false; const blog_id = request.query.blog_id; - if (!mine && !blog_id) { - response.send({ + if (!mine && blog_id === "") { + response.status(400).send({ success: false, message: "Request can either have \"mine\" set to true or provide a blog_id" - }) + }); + return; } let clause; let site; @@ -45,13 +47,21 @@ export const blogRoutes = (fastify, _, done) => { [site] = await db.select().from(sites).where(and(eq(sites.user_id, request.session.user_id))); } else { - [site] = await db.select().from(sites).where(eq(sites.id, request.query.blog_id)); + let referer = new URL(request.headers.origin).host; + console.log(referer) + [site] = await db.select().from(sites).where(eq(sites.domain, referer)).limit(1); + } + if (!site) { + response.status(400).send({ + success: false, + message: "Site not found" + }); + return; } - clause = eq(articlesTable.site_id, site.id); if (mine == false) { - clause = and(eq(articlesTable.site_id, request.query.blog_id), eq(articlesTable.is_public, true)); + clause = and(eq(articlesTable.site_id, site.id), eq(articlesTable.is_public, true)); } // const access_token = await getAccessToken(fastify, request); @@ -62,7 +72,7 @@ export const blogRoutes = (fastify, _, done) => { seo_slug: articlesTable.seo_slug, views: articlesTable.views, is_public: articlesTable.is_public, - created_at: articlesTable.created_at + created_at: articlesTable.created_at, }).from(articlesTable).where(clause).limit(10).offset(request.query.offset || 0).orderBy(desc(articlesTable.created_at)); const [{ total }] = await db.select({ @@ -77,6 +87,11 @@ export const blogRoutes = (fastify, _, done) => { }); } catch (e) { console.log(e); + + response.status(500).send({ + success: false, + message: "Unexpected error" + }); } }); @@ -133,7 +148,7 @@ export const blogRoutes = (fastify, _, done) => { email: req.body.email, site_id: req.body.site_id, source: req.body.source - }); + }).returning(); if (inserted.rowCount != 1) { reply.status(400).send({ @@ -143,6 +158,9 @@ export const blogRoutes = (fastify, _, done) => { return; } + + await sendFreebie(req.body.email, req.body.site_id) + reply.send({ success: true }); diff --git a/src/routes/dashboard.js b/src/routes/dashboard.js index bde3ec9..dc36e83 100644 --- a/src/routes/dashboard.js +++ b/src/routes/dashboard.js @@ -4,7 +4,7 @@ import { desc, eq, getTableColumns, sql } from "drizzle-orm"; import { db } from "../db/index.js"; import { articles, articles as articlesTable, signups as signupsTable, sites, users } from "../db/schemas.js"; import { authMiddleware, authMiddlewareFn } from "../modules/middleware.js"; -import { jsonToCsv } from "../utils/index.js"; +import { jsonToCsv, getAccessToken, getVideoCaptions, getCaptionText, parseTextFromCaptions, createBlogFromCaptions, createArticleSlug, getVideoById } from "../utils/index.js"; /** * @@ -37,12 +37,17 @@ export const dashboardRoutes = (fastify, _, done) => { .where(eq(signupsTable.site_id, site_id)) .orderBy(desc(signupsTable.created_at)).limit(8); - + const [{ totalArticles }] = await db.select({ totalArticles: sql`count(*)` }).from(articlesTable).where(eq(articlesTable.site_id, site_id)); + const [{ totalViews }] = await db.select({ totalViews: sql`sum(${articlesTable.views})` }).from(articlesTable).where(eq(articlesTable.site_id, site_id)); + const [{ totalEmails }] = await db.select({ totalEmails: sql`count(*)` }).from(signupsTable).where(eq(signupsTable.site_id, site_id)); response.send({ success: true, recentArticles, - recentSignups + recentSignups, + totalArticles, + totalEmails, + totalViews }); return; } catch (e) { @@ -157,6 +162,9 @@ export const dashboardRoutes = (fastify, _, done) => { format: { type: "string" }, + faq: { + type: "boolean" + }, } }, } @@ -186,7 +194,9 @@ export const dashboardRoutes = (fastify, _, done) => { const caption_body = await getCaptionText(access_token, preferred_caption_id); const caption_text = parseTextFromCaptions(caption_body).substring(28); - const blog_content = await createBlogFromCaptions(caption_text, req.body); + const video_data = await getVideoById(access_token, req.body.video_id); + + const blog_content = await createBlogFromCaptions(caption_text, { title: video_data.title, description: video_data.description }, req.body); const blog_content_json = JSON.parse(blog_content); // TODO: once I add multiple sites per user, this should come from the client const site = await db.select().from(sites).where(eq(sites.user_id, req.session.user_id)); @@ -202,7 +212,8 @@ export const dashboardRoutes = (fastify, _, done) => { await db.update(users).set({ tokens: tokens - 1 - }).where(eq(users.user_id, req.session.user_id)); + }).where(eq(users.id, req.session.user_id)); + } catch (e) { console.log(e); } @@ -233,6 +244,29 @@ export const dashboardRoutes = (fastify, _, done) => { type: "string", maxLength: 6, minLength: 6 + }, + use_freebie: { + type: "boolean" + }, + freebie_name: { + type: "string" + }, + freebie_url: { + type: "string", + format: "uri" + }, + freebie_image_url: { + type: "string", + format: "uri" + }, + freebie_text: { + type: "string", + }, + title: { + type: "string", + }, + subtitle: { + type: "string", } }, required: ["id"] @@ -240,19 +274,23 @@ export const dashboardRoutes = (fastify, _, done) => { }, preValidation: authMiddlewareFn }, async (req, reply) => { - const [site] = await db.select().from(sites).where(eq(sites.id, req.body.id)); + try { + const [site] = await db.select().from(sites).where(eq(sites.id, req.body.id)); - if (site.user_id !== req.session.user_id) { - reply.status(403).send({ - success: false - }); - return; - } + if (site.user_id !== req.session.user_id) { + reply.status(403).send({ + success: false + }); + return; + } - await db.update(sites).set(req.body); + await db.update(sites).set(req.body); - return { - success: true + return { + success: true + } + } catch (e) { + console.log(e); } }); diff --git a/src/routes/index.js b/src/routes/index.js index 8d4bea0..d926afa 100644 --- a/src/routes/index.js +++ b/src/routes/index.js @@ -1,5 +1,7 @@ -export * from "./channels.js"; export * from "./auth.js"; -export * from "./videos.js"; +export * from "./blog.js" +export * from "./channels.js"; +export * from "./dashboard.js" export * from "./me.js"; -export * from "./blog.js" \ No newline at end of file +export * from "./videos.js"; +export * from "./webhook.js"; \ No newline at end of file diff --git a/src/routes/me.js b/src/routes/me.js index d16702c..9556b4d 100644 --- a/src/routes/me.js +++ b/src/routes/me.js @@ -4,6 +4,8 @@ import { eq } from "drizzle-orm"; import { db } from "../db/index.js"; import { users } from "../db/schemas.js"; import { authMiddleware } from "../modules/middleware.js"; +import { getBillingDashboard } from "../utils/stripe.js"; +import { env } from "../utils/env.js"; /** * @@ -40,5 +42,22 @@ export const meRoutes = (fastify, _, done) => { } }); + fastify.get("/billing", async (request, response) => { + try { + const [user] = await db.select().from(users).where(eq(users.id, request.session.user_id)); + const billing_session_url = await getBillingDashboard(user.stripe_id, env.FRONTEND_URL+"/app"); + + response.redirect(billing_session_url); + return; + } catch (e) { + response.status(400).send({ + success: false, + message: "User not found", + log: e.message + }); + return; + } + }); + done(); }; diff --git a/src/routes/videos.js b/src/routes/videos.js index 3d2d45d..f44c34b 100644 --- a/src/routes/videos.js +++ b/src/routes/videos.js @@ -5,8 +5,6 @@ import { db } from "../db/index.js"; import { users } from "../db/schemas.js"; import { authMiddleware } from "../modules/middleware.js"; import { getAccessToken, getCaptionText, getVideoCaptions, getVideosFromPlaylist } from "../utils/youtube.js"; -import { createBlogFromCaptions } from "../utils/ai.js"; - /** * * @param {FastifyInstance} fastify @@ -58,28 +56,28 @@ export const videoRoutes = (fastify, _, done) => { } }) - fastify.get("/blogify/:video_id", async (request, response) => { - try { - const token = await getAccessToken(fastify, request); - const captions_list = await getVideoCaptions(token.access_token, request.params.video_id); + // fastify.get("/blogify/:video_id", async (request, response) => { + // try { + // const token = await getAccessToken(fastify, request); + // const captions_list = await getVideoCaptions(token.access_token, request.params.video_id); - const caption = captions_list.filter(x => x.snippet.language === "en"); - if (caption.length === 0) { - response.send({ - success: false, - message: "Couldn't find caption" - }); - return; - } - const caption_text = await getCaptionText(token.access_token, caption[0].id); + // const caption = captions_list.filter(x => x.snippet.language === "en"); + // if (caption.length === 0) { + // response.send({ + // success: false, + // message: "Couldn't find caption" + // }); + // return; + // } + // const caption_text = await getCaptionText(token.access_token, caption[0].id); - const ai_response = await createBlogFromCaptions(caption_text); + // const ai_response = await createBlogFromCaptions(caption_text); - response.send(ai_response); - } catch (e) { - console.log(e); - } - }); + // response.send(ai_response); + // } catch (e) { + // console.log(e); + // } + // }); done(); }; diff --git a/src/routes/webhook.js b/src/routes/webhook.js new file mode 100644 index 0000000..059b35d --- /dev/null +++ b/src/routes/webhook.js @@ -0,0 +1,29 @@ +/** @typedef {import("fastify").FastifyInstance} FastifyInstance */ + +import { eq } from "drizzle-orm"; +import { db } from "../db/index.js"; +import { users } from "../db/schemas.js"; +import { authMiddleware } from "../modules/middleware.js"; + +/** + * + * @param {FastifyInstance} fastify + * @param {unknown} _ + * @param {() => void} done + */ +export const webhookRoutes = (fastify, _, done) => { + fastify.get("/", async (request, response) => { + try { + + } catch (e) { + response.status(400).send({ + success: false, + message: "User not found", + log: e.message + }); + return; + } + }); + + done(); +}; diff --git a/src/utils/ai.js b/src/utils/ai.js index 445428d..118a637 100644 --- a/src/utils/ai.js +++ b/src/utils/ai.js @@ -23,20 +23,17 @@ async function cf_prompt(prompt, model = defaultModel) { return res; } -async function promptGPT(prompt, {model = "gpt-3.5-turbo", max_tokens = 1024}) { +async function promptGPT(prompt, { model, is_json } = {model: "gpt-3.5-turbo", is_json: true}) { + // return JSON.stringify({ "title": "Tech News Update: TikTok Ban, Snapdragon X Series CPUs, Tesla Troubles, and More", "body": "I was thinking about starting this video by singing the song Tik Tok by Kesha but I don't think anyone waking up in the morning feeling like P Diddy is a good vibe right now. The United States has officially passed a law banning TikTok next year if certain conditions aren't met. This ban is part of a larger foreign aid package in support of Ukraine and Israel. TikTok has vowed to fight the law in court, calling it an unconstitutional suppression of its American users' freedom of speech. In other tech news, Qualcomm has unveiled its upcoming lineup of Snapdragon X Series CPUs, including some confusing names. Tesla is facing troubles with its Cybertruck not being waterproof. And Google has delayed its plan to phase out third-party tracking cookies yet again. Stay tuned for more tech updates on TechLink!" }); + const options = { method: 'POST', headers: { Authorization: 'Bearer sk-proj-kngnyz8wyoxx4Sw4X4OHT3BlbkFJJBmYAE9odHtYPu1OBEG7', "Content-Type": "application/json" }, body: JSON.stringify({ "model": "gpt-3.5-turbo", - "max_tokens": max_tokens, - "response_format": { "type": "json_object" }, - "messages": [ - { - "role": "user", - "content": prompt - } - ] + // "max_tokens": max_tokens, + ...(is_json ? {"response_format": { "type": "json_object" }} : {}), + "messages": prompt }) }; @@ -46,7 +43,7 @@ async function promptGPT(prompt, {model = "gpt-3.5-turbo", max_tokens = 1024}) { return response.json(); }) .catch(err => console.log(err)); - + console.log(res); return res.choices[0].message.content; @@ -60,21 +57,30 @@ async function promptGPT(prompt, {model = "gpt-3.5-turbo", max_tokens = 1024}) { * @returns {Promise<{title: string, body: string, seo_friendly_slug: string}>} */ export async function createBlogFromCaptions(captions, { + title, + description +}, { length, language, format, - tone -} = {length: 500, language: "English", format: "summary", tone: "informal"}) { + tone, + faq +} = { length: 700, language: "English", format: "summary", tone: "informal", faq: false }) { // const prompt = `Convert the following video transcript into a blog post. The approximate length should be around ${length || 500} characters, written in ${language || "English"}. The desired format of the blog post is a ${format || "summary"}. Please ensure the blog post has a ${tone || "informal"} tone throughout. Use markdown to format the article. You must always respond in the following json fromat: {"title": string, "content": string, "seo_friendly_slug": string}. \nHere is the transcript: ` - const prompt = `Convert the following video transcript into an engaging blog post. You must always respond in the following json fromat: {"title": string, "body": string, "seo_friendly_slug": string}. Do not, under any circumstance, include the title inside the body, it should only be reserved for the body of the article. Use markdown to format the article. \nHere is the transcript: `; + // const prompt = `Convert the following video transcript into an engaging blog post. You must always respond in the following json fromat: {"title": string, "body": string, "seo_friendly_slug": string}. Do not, under any circumstance, include the title inside the body, it should only be reserved for the body of the article. Use markdown to format the article. Use "\\n" to add line-breaks. \nHere is the transcript: `; - const result = await promptGPT(prompt + captions, { - length: wordsToTokens(length) - }); + const prompt = [{ + "role": "user", + "content": `CONSTRAINT: Very important. Write AT THE VERY LEAST ${length+100} words. + Using the following video transcript, create a blog based on the information in the video transcript. You must always respond in the following json fromat: {"title": string, "body": string, "seo_friendly_slug": string}. Do not, under any circumstance, include the title inside the body, it should only be reserved for the body of the article. Use markdown to format the article. Use "\\n" to add line-breaks. \nHere is the transcript: + + ${captions}` + }]; + const result = await promptGPT(prompt); console.log(result); return result; } function wordsToTokens(n) { - return Math.ceil(n/0.75); + return Math.ceil(n / 0.75); } \ No newline at end of file diff --git a/src/utils/email.js b/src/utils/email.js new file mode 100644 index 0000000..0c34d50 --- /dev/null +++ b/src/utils/email.js @@ -0,0 +1,37 @@ +import { eq } from "drizzle-orm"; +import { db } from "../db"; +import { sites } from "../db/schemas"; + +import { MailtrapClient } from "mailtrap"; + +const TOKEN = "a0cc97f4f856d6c16d70bb5984e32cef"; +const ENDPOINT = "https://send.api.mailtrap.io/"; + +const client = new MailtrapClient({ endpoint: ENDPOINT, token: TOKEN }); + +export async function sendFreebie(recipient, blog_id) { + const [blog] = await db.select().from(sites).where(eq(sites.id, blog_id)); + if (!blog) throw new Error("Invalid site"); + + if (!blog.use_freebie) return; + + const sender = { + email: "mailtrap@demomailtrap.com", + name: "Mailtrap Test", + }; + + const recipients = [ + { + email: recipient, + } + ]; + + client + .send({ + from: sender, + to: recipients, + subject: `Your freebie from ${blog.name}`, + text: `Thank you for subscribing to ${blog.name}! Your freebie is linked below.\n ${blog.freebie_url}`, + }) + .then(console.log, console.error); +} diff --git a/src/utils/env.js b/src/utils/env.js index e4899bb..d292f86 100644 --- a/src/utils/env.js +++ b/src/utils/env.js @@ -7,7 +7,8 @@ const envSchema = z.object({ PORT: z.coerce.number().default(8080), HOST: z.string().default("127.0.0.1"), PUBLIC_API_URL: z.string(), - FRONTEND_URL: z.string() + FRONTEND_URL: z.string(), + SITES_HOST: z.string(), }); export const env = envSchema.parse(process.env); diff --git a/src/utils/stripe.js b/src/utils/stripe.js new file mode 100644 index 0000000..3aa043d --- /dev/null +++ b/src/utils/stripe.js @@ -0,0 +1,32 @@ +import loadStripe from 'stripe'; + +const stripe = await loadStripe('sk_test_51MRcs0FrdGTeTMwdCgd6Z3I1913esqFD2W171b1W4PnRsdxfOCDrwtawiKFgS7R2ZDkWTSqfxp5Gl1GTd8aospWv00vFXvO6iC'); + +/** + * + * @param {string} email + * @param {string} name + * @returns {import('stripe-v3').customer.create} + */ +export async function createCustomer(email, name) { + return (await stripe.customers.create({ + email: email, + name: name, + })); +} + +/** + * + * @param {string} stripe_id + */ +export async function getBillingDashboard(stripe_id, return_url) { + const session = await stripe.billingPortal.sessions.create({ + customer: stripe_id, + return_url, + flow_data: { + type: 'payment_method_update', + }, + }); + + return session.url; +} \ No newline at end of file diff --git a/src/utils/youtube.js b/src/utils/youtube.js index b146e0c..97f3e7c 100644 --- a/src/utils/youtube.js +++ b/src/utils/youtube.js @@ -5,6 +5,16 @@ import { google } from 'googleapis'; const service = google.youtube("v3"); +export async function getVideoById(access_token, video_id) { + const video = await service.videos.list({ + access_token, + id: video_id, + part: "snippet" + }).then(x=>x.data.items[0].snippet); + + return video; +} + /** * * @param {string} access_token diff --git a/test.js b/test.js deleted file mode 100644 index 26101be..0000000 --- a/test.js +++ /dev/null @@ -1,60 +0,0 @@ -const paths = [ - 'M-380 -189C-380 -189 -312 216 152 343C616 470 684 875 684 875', - 'M-373 -197C-373 -197 -305 208 159 335C623 462 691 867 691 867', - 'M-366 -205C-366 -205 -298 200 166 327C630 454 698 859 698 859', - 'M-359 -213C-359 -213 -291 192 173 319C637 446 705 851 705 851', - 'M-352 -221C-352 -221 -284 184 180 311C644 438 712 843 712 843', - 'M-345 -229C-345 -229 -277 176 187 303C651 430 719 835 719 835', - 'M-338 -237C-338 -237 -270 168 194 295C658 422 726 827 726 827', - 'M-331 -245C-331 -245 -263 160 201 287C665 414 733 819 733 819', - 'M-324 -253C-324 -253 -256 152 208 279C672 406 740 811 740 811', - 'M-317 -261C-317 -261 -249 144 215 271C679 398 747 803 747 803', - 'M-310 -269C-310 -269 -242 136 222 263C686 390 754 795 754 795', - 'M-303 -277C-303 -277 -235 128 229 255C693 382 761 787 761 787', - 'M-296 -285C-296 -285 -228 120 236 247C700 374 768 779 768 779', - 'M-289 -293C-289 -293 -221 112 243 239C707 366 775 771 775 771', - 'M-282 -301C-282 -301 -214 104 250 231C714 358 782 763 782 763', - 'M-275 -309C-275 -309 -207 96 257 223C721 350 789 755 789 755', - 'M-268 -317C-268 -317 -200 88 264 215C728 342 796 747 796 747', - 'M-261 -325C-261 -325 -193 80 271 207C735 334 803 739 803 739', - 'M-254 -333C-254 -333 -186 72 278 199C742 326 810 731 810 731', - 'M-247 -341C-247 -341 -179 64 285 191C749 318 817 723 817 723', - 'M-240 -349C-240 -349 -172 56 292 183C756 310 824 715 824 715', - 'M-233 -357C-233 -357 -165 48 299 175C763 302 831 707 831 707', - 'M-226 -365C-226 -365 -158 40 306 167C770 294 838 699 838 699', - 'M-219 -373C-219 -373 -151 32 313 159C777 286 845 691 845 691', - 'M-212 -381C-212 -381 -144 24 320 151C784 278 852 683 852 683', - 'M-205 -389C-205 -389 -137 16 327 143C791 270 859 675 859 675', - 'M-198 -397C-198 -397 -130 8 334 135C798 262 866 667 866 667', - 'M-191 -405C-191 -405 -123 0 341 127C805 254 873 659 873 659', - 'M-184 -413C-184 -413 -116 -8 348 119C812 246 880 651 880 651', - 'M-177 -421C-177 -421 -109 -16 355 111C819 238 887 643 887 643', - 'M-170 -429C-170 -429 -102 -24 362 103C826 230 894 635 894 635', - 'M-163 -437C-163 -437 -95 -32 369 95C833 222 901 627 901 627', - 'M-156 -445C-156 -445 -88 -40 376 87C840 214 908 619 908 619', - 'M-149 -453C-149 -453 -81 -48 383 79C847 206 915 611 915 611', - 'M-142 -461C-142 -461 -74 -56 390 71C854 198 922 603 922 603', - 'M-135 -469C-135 -469 -67 -64 397 63C861 190 929 595 929 595', - 'M-128 -477C-128 -477 -60 -72 404 55C868 182 936 587 936 587', - 'M-121 -485C-121 -485 -53 -80 411 47C875 174 943 579 943 579', - 'M-114 -493C-114 -493 -46 -88 418 39C882 166 950 571 950 571', - 'M-107 -501C-107 -501 -39 -96 425 31C889 158 957 563 957 563', - 'M-100 -509C-100 -509 -32 -104 432 23C896 150 964 555 964 555', - 'M-93 -517C-93 -517 -25 -112 439 15C903 142 971 547 971 547', - 'M-86 -525C-86 -525 -18 -120 446 7C910 134 978 539 978 539', - 'M-79 -533C-79 -533 -11 -128 453 -1C917 126 985 531 985 531', - 'M-72 -541C-72 -541 -4 -136 460 -9C924 118 992 523 992 523', - 'M-65 -549C-65 -549 3 -144 467 -17C931 110 999 515 999 515', - 'M-58 -557C-58 -557 10 -152 474 -25C938 102 1006 507 1006 507', - 'M-51 -565C-51 -565 17 -160 481 -33C945 94 1013 499 1013 499', - 'M-44 -573C-44 -573 24 -168 488 -41C952 86 1020 491 1020 491', - 'M-37 -581C-37 -581 31 -176 495 -49C959 78 1027 483 1027 483' -]; - -let r = []; - -for(let i = 0; i < paths.length; i+=2) { - r.push(paths[i]) -} - -console.log(r); \ No newline at end of file diff --git a/yarn.lock b/yarn.lock index 9fc58f4..fae8989 100644 --- a/yarn.lock +++ b/yarn.lock @@ -29,44 +29,29 @@ chalk "^2.4.2" js-tokens "^4.0.0" -"@cloudflare/kv-asset-handler@^0.2.0": - version "0.2.0" - resolved "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.2.0.tgz" - integrity sha512-MVbXLbTcAotOPUj0pAMhVtJ+3/kFkwJqc5qNOleOZTv6QkZZABDMS21dSrSlVswEHwrpWC03e4fWytjqKvuE2A== +"@cloudflare/kv-asset-handler@0.3.2": + version "0.3.2" + resolved "https://registry.npmjs.org/@cloudflare/kv-asset-handler/-/kv-asset-handler-0.3.2.tgz" + integrity sha512-EeEjMobfuJrwoctj7FA1y1KEbM0+Q1xSjobIEyie9k4haVEBB7vkDvsasw1pM3rO39mL2akxIAzLMUAtrMHZhA== dependencies: mime "^3.0.0" -"@cloudflare/workerd-darwin-64@1.20231030.0": - version "1.20231030.0" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-64/-/workerd-darwin-64-1.20231030.0.tgz#a5376fb484ca80c2a35d5efd1a5e9de0f4ae2a92" - integrity sha512-J4PQ9utPxLya9yHdMMx3AZeC5M/6FxcoYw6jo9jbDDFTy+a4Gslqf4Im9We3aeOEdPXa3tgQHVQOSelJSZLhIw== +"@cloudflare/workerd-windows-64@1.20240512.0": + version "1.20240512.0" + resolved "https://registry.npmjs.org/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20240512.0.tgz" + integrity sha512-SxKapDrIYSscMR7lGIp/av0l6vokjH4xQ9ACxHgXh+OdOus9azppSmjaPyw4/ePvg7yqpkaNjf9o258IxWtvKQ== -"@cloudflare/workerd-darwin-arm64@1.20231030.0": - version "1.20231030.0" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-darwin-arm64/-/workerd-darwin-arm64-1.20231030.0.tgz#a25da268440c927d9aeeb81c0c2027a04990262f" - integrity sha512-WSJJjm11Del4hSneiNB7wTXGtBXI4QMCH9l5qf4iT5PAW8cESGcCmdHtWDWDtGAAGcvmLT04KNvmum92vRKKQQ== - -"@cloudflare/workerd-linux-64@1.20231030.0": - version "1.20231030.0" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-linux-64/-/workerd-linux-64-1.20231030.0.tgz#b7fea4011db8926ca0fddfe5f3b28263594fb777" - integrity sha512-2HUeRTvoCC17fxE0qdBeR7J9dO8j4A8ZbdcvY8pZxdk+zERU6+N03RTbk/dQMU488PwiDvcC3zZqS4gwLfVT8g== - -"@cloudflare/workerd-linux-arm64@1.20231030.0": - version "1.20231030.0" - resolved "https://registry.npmjs.org/@cloudflare/workerd-linux-arm64/-/workerd-linux-arm64-1.20231030.0.tgz" - integrity sha512-4/GK5zHh+9JbUI6Z5xTCM0ZmpKKHk7vu9thmHjUxtz+o8Ne9DoD7DlDvXQWgMF6XGaTubDWyp3ttn+Qv8jDFuQ== - -"@cloudflare/workerd-windows-64@1.20231030.0": - version "1.20231030.0" - resolved "https://registry.yarnpkg.com/@cloudflare/workerd-windows-64/-/workerd-windows-64-1.20231030.0.tgz#d1aba21f13ec65f00d1009e0686a1a8ec6c1f8dd" - integrity sha512-fb/Jgj8Yqy3PO1jLhk7mTrHMkR8jklpbQFud6rL/aMAn5d6MQbaSrYOCjzkKGp0Zng8D2LIzSl+Fc0C9Sggxjg== - -"@drizzle-team/studio@^0.0.35": - version "0.0.35" - resolved "https://registry.npmjs.org/@drizzle-team/studio/-/studio-0.0.35.tgz" - integrity sha512-t5LTNOVf+L7Bb/wdssOIPx0ueNvhyaIXdrvKgoHR4wK0GD7SRmILcCTzn6N6Ltr1VnFzQZG/bzn6HMagn17Jtw== +"@cspotcode/source-map-support@0.8.1": + version "0.8.1" + resolved "https://registry.npmjs.org/@cspotcode/source-map-support/-/source-map-support-0.8.1.tgz" + integrity sha512-IchNf6dN4tHoMFIn/7OE8LWZ19Y6q/67Bmf6vnGREv8RSbBVb9LPJxEcnwrcwX6ixSvaiGoomAUvu4YSxXrVgw== dependencies: - superjson "^2.2.1" + "@jridgewell/trace-mapping" "0.3.9" + +"@drizzle-team/studio@^0.0.27": + version "0.0.27" + resolved "https://registry.npmjs.org/@drizzle-team/studio/-/studio-0.0.27.tgz" + integrity sha512-vkgflb8g/7WCdVCuxWE6tCzjZB0q4lLIK6mwH1aleNRqIGOhEWq/E2I8HmKquz1v0GRDHLFd19ZzrVSITt2Uqg== "@esbuild-kit/cjs-loader@^2.4.2": version "2.4.2" @@ -105,225 +90,15 @@ escape-string-regexp "^4.0.0" rollup-plugin-node-polyfills "^0.2.1" -"@esbuild/android-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.17.19.tgz#bafb75234a5d3d1b690e7c2956a599345e84a2fd" - integrity sha512-KBMWvEZooR7+kzY0BtbTQn0OAYY7CsiydT63pVEaPtVYF0hXbUaOyZog37DKxK7NF3XacBJOpYT4adIJh+avxA== - -"@esbuild/android-arm64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm64/-/android-arm64-0.19.9.tgz#683794bdc3d27222d3eced7b74cad15979548031" - integrity sha512-q4cR+6ZD0938R19MyEW3jEsMzbb/1rulLXiNAJQADD/XYp7pT+rOS5JGxvpRW8dFDEfjW4wLgC/3FXIw4zYglQ== - -"@esbuild/android-arm@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.17.19.tgz#5898f7832c2298bc7d0ab53701c57beb74d78b4d" - integrity sha512-rIKddzqhmav7MSmoFCmDIb6e2W57geRsM94gV2l38fzhXMwq7hZoClug9USI2pFRGL06f4IOPHHpFNOkWieR8A== - -"@esbuild/android-arm@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-arm/-/android-arm-0.19.9.tgz#21a4de41f07b2af47401c601d64dfdefd056c595" - integrity sha512-jkYjjq7SdsWuNI6b5quymW0oC83NN5FdRPuCbs9HZ02mfVdAP8B8eeqLSYU3gb6OJEaY5CQabtTFbqBf26H3GA== - -"@esbuild/android-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.17.19.tgz#658368ef92067866d95fb268719f98f363d13ae1" - integrity sha512-uUTTc4xGNDT7YSArp/zbtmbhO0uEEK9/ETW29Wk1thYUJBz3IVnvgEiEwEa9IeLyvnpKrWK64Utw2bgUmDveww== - -"@esbuild/android-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/android-x64/-/android-x64-0.19.9.tgz#e2d7674bc025ddc8699f0cc76cb97823bb63c252" - integrity sha512-KOqoPntWAH6ZxDwx1D6mRntIgZh9KodzgNOy5Ebt9ghzffOk9X2c1sPwtM9P+0eXbefnDhqYfkh5PLP5ULtWFA== - -"@esbuild/darwin-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.17.19.tgz#584c34c5991b95d4d48d333300b1a4e2ff7be276" - integrity sha512-80wEoCfF/hFKM6WE1FyBHc9SfUblloAWx6FJkFWTWiCoht9Mc0ARGEM47e67W9rI09YoUxJL68WHfDRYEAvOhg== - -"@esbuild/darwin-arm64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-arm64/-/darwin-arm64-0.19.9.tgz#ae7a582289cc5c0bac15d4b9020a90cb7288f1e9" - integrity sha512-KBJ9S0AFyLVx2E5D8W0vExqRW01WqRtczUZ8NRu+Pi+87opZn5tL4Y0xT0mA4FtHctd0ZgwNoN639fUUGlNIWw== - -"@esbuild/darwin-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.17.19.tgz#7751d236dfe6ce136cce343dce69f52d76b7f6cb" - integrity sha512-IJM4JJsLhRYr9xdtLytPLSH9k/oxR3boaUIYiHkAawtwNOXKE8KoU8tMvryogdcT8AU+Bflmh81Xn6Q0vTZbQw== - -"@esbuild/darwin-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/darwin-x64/-/darwin-x64-0.19.9.tgz#8a216c66dcf51addeeb843d8cfaeff712821d12b" - integrity sha512-vE0VotmNTQaTdX0Q9dOHmMTao6ObjyPm58CHZr1UK7qpNleQyxlFlNCaHsHx6Uqv86VgPmR4o2wdNq3dP1qyDQ== - -"@esbuild/freebsd-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.17.19.tgz#cacd171665dd1d500f45c167d50c6b7e539d5fd2" - integrity sha512-pBwbc7DufluUeGdjSU5Si+P3SoMF5DQ/F/UmTSb8HXO80ZEAJmrykPyzo1IfNbAoaqw48YRpv8shwd1NoI0jcQ== - -"@esbuild/freebsd-arm64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-arm64/-/freebsd-arm64-0.19.9.tgz#63d4f603e421252c3cd836b18d01545be7c6c440" - integrity sha512-uFQyd/o1IjiEk3rUHSwUKkqZwqdvuD8GevWF065eqgYfexcVkxh+IJgwTaGZVu59XczZGcN/YMh9uF1fWD8j1g== - -"@esbuild/freebsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.17.19.tgz#0769456eee2a08b8d925d7c00b79e861cb3162e4" - integrity sha512-4lu+n8Wk0XlajEhbEffdy2xy53dpR06SlzvhGByyg36qJw6Kpfk7cp45DR/62aPH9mtJRmIyrXAS5UWBrJT6TQ== - -"@esbuild/freebsd-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/freebsd-x64/-/freebsd-x64-0.19.9.tgz#a3db52595be65360eae4de1d1fa3c1afd942e1e4" - integrity sha512-WMLgWAtkdTbTu1AWacY7uoj/YtHthgqrqhf1OaEWnZb7PQgpt8eaA/F3LkV0E6K/Lc0cUr/uaVP/49iE4M4asA== - -"@esbuild/linux-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.17.19.tgz" - integrity sha512-ct1Tg3WGwd3P+oZYqic+YZF4snNl2bsnMKRkb3ozHmnM0dGWuxcPTTntAF6bOP0Sp4x0PjSF+4uHQ1xvxfRKqg== - -"@esbuild/linux-arm64@0.19.9": - version "0.19.9" - resolved "https://registry.npmjs.org/@esbuild/linux-arm64/-/linux-arm64-0.19.9.tgz" - integrity sha512-PiPblfe1BjK7WDAKR1Cr9O7VVPqVNpwFcPWgfn4xu0eMemzRp442hXyzF/fSwgrufI66FpHOEJk0yYdPInsmyQ== - -"@esbuild/linux-arm@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.17.19.tgz#1a2cd399c50040184a805174a6d89097d9d1559a" - integrity sha512-cdmT3KxjlOQ/gZ2cjfrQOtmhG4HJs6hhvm3mWSRDPtZ/lP5oe8FWceS10JaSJC13GBd4eH/haHnqf7hhGNLerA== - -"@esbuild/linux-arm@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-arm/-/linux-arm-0.19.9.tgz#9807e92cfd335f46326394805ad488e646e506f2" - integrity sha512-C/ChPohUYoyUaqn1h17m/6yt6OB14hbXvT8EgM1ZWaiiTYz7nWZR0SYmMnB5BzQA4GXl3BgBO1l8MYqL/He3qw== - -"@esbuild/linux-ia32@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.17.19.tgz#e28c25266b036ce1cabca3c30155222841dc035a" - integrity sha512-w4IRhSy1VbsNxHRQpeGCHEmibqdTUx61Vc38APcsRbuVgK0OPEnQ0YD39Brymn96mOx48Y2laBQGqgZ0j9w6SQ== - -"@esbuild/linux-ia32@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ia32/-/linux-ia32-0.19.9.tgz#18892c10f3106652b16f9da88a0362dc95ed46c7" - integrity sha512-f37i/0zE0MjDxijkPSQw1CO/7C27Eojqb+r3BbHVxMLkj8GCa78TrBZzvPyA/FNLUMzP3eyHCVkAopkKVja+6Q== - -"@esbuild/linux-loong64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.17.19.tgz#0f887b8bb3f90658d1a0117283e55dbd4c9dcf72" - integrity sha512-2iAngUbBPMq439a+z//gE+9WBldoMp1s5GWsUSgqHLzLJ9WoZLZhpwWuym0u0u/4XmZ3gpHmzV84PonE+9IIdQ== - -"@esbuild/linux-loong64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-loong64/-/linux-loong64-0.19.9.tgz#dc2ebf9a125db0a1bba18c2bbfd4fbdcbcaf61c2" - integrity sha512-t6mN147pUIf3t6wUt3FeumoOTPfmv9Cc6DQlsVBpB7eCpLOqQDyWBP1ymXn1lDw4fNUSb/gBcKAmvTP49oIkaA== - -"@esbuild/linux-mips64el@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.17.19.tgz#f5d2a0b8047ea9a5d9f592a178ea054053a70289" - integrity sha512-LKJltc4LVdMKHsrFe4MGNPp0hqDFA1Wpt3jE1gEyM3nKUvOiO//9PheZZHfYRfYl6AwdTH4aTcXSqBerX0ml4A== - -"@esbuild/linux-mips64el@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-mips64el/-/linux-mips64el-0.19.9.tgz#4c2f7c5d901015e3faf1563c4a89a50776cb07fd" - integrity sha512-jg9fujJTNTQBuDXdmAg1eeJUL4Jds7BklOTkkH80ZgQIoCTdQrDaHYgbFZyeTq8zbY+axgptncko3v9p5hLZtw== - -"@esbuild/linux-ppc64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.17.19.tgz#876590e3acbd9fa7f57a2c7d86f83717dbbac8c7" - integrity sha512-/c/DGybs95WXNS8y3Ti/ytqETiW7EU44MEKuCAcpPto3YjQbyK3IQVKfF6nbghD7EcLUGl0NbiL5Rt5DMhn5tg== - -"@esbuild/linux-ppc64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-ppc64/-/linux-ppc64-0.19.9.tgz#8385332713b4e7812869622163784a5633f76fc4" - integrity sha512-tkV0xUX0pUUgY4ha7z5BbDS85uI7ABw3V1d0RNTii7E9lbmV8Z37Pup2tsLV46SQWzjOeyDi1Q7Wx2+QM8WaCQ== - -"@esbuild/linux-riscv64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.17.19.tgz#7f49373df463cd9f41dc34f9b2262d771688bf09" - integrity sha512-FC3nUAWhvFoutlhAkgHf8f5HwFWUL6bYdvLc/TTuxKlvLi3+pPzdZiFKSWz/PF30TB1K19SuCxDTI5KcqASJqA== - -"@esbuild/linux-riscv64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-riscv64/-/linux-riscv64-0.19.9.tgz#23f1db24fa761be311874f32036c06249aa20cba" - integrity sha512-DfLp8dj91cufgPZDXr9p3FoR++m3ZJ6uIXsXrIvJdOjXVREtXuQCjfMfvmc3LScAVmLjcfloyVtpn43D56JFHg== - -"@esbuild/linux-s390x@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.17.19.tgz#e2afd1afcaf63afe2c7d9ceacd28ec57c77f8829" - integrity sha512-IbFsFbxMWLuKEbH+7sTkKzL6NJmG2vRyy6K7JJo55w+8xDk7RElYn6xvXtDW8HCfoKBFK69f3pgBJSUSQPr+4Q== - -"@esbuild/linux-s390x@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-s390x/-/linux-s390x-0.19.9.tgz#2dffe497726b897c9f0109e774006e25b33b4fd0" - integrity sha512-zHbglfEdC88KMgCWpOl/zc6dDYJvWGLiUtmPRsr1OgCViu3z5GncvNVdf+6/56O2Ca8jUU+t1BW261V6kp8qdw== - -"@esbuild/linux-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.17.19.tgz#8a0e9738b1635f0c53389e515ae83826dec22aa4" - integrity sha512-68ngA9lg2H6zkZcyp22tsVt38mlhWde8l3eJLWkyLrp4HwMUr3c1s/M2t7+kHIhvMjglIBrFpncX1SzMckomGw== - -"@esbuild/linux-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/linux-x64/-/linux-x64-0.19.9.tgz#ceb1d62cd830724ff5b218e5d3172a8bad59420e" - integrity sha512-JUjpystGFFmNrEHQnIVG8hKwvA2DN5o7RqiO1CVX8EN/F/gkCjkUMgVn6hzScpwnJtl2mPR6I9XV1oW8k9O+0A== - -"@esbuild/netbsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.17.19.tgz#c29fb2453c6b7ddef9a35e2c18b37bda1ae5c462" - integrity sha512-CwFq42rXCR8TYIjIfpXCbRX0rp1jo6cPIUPSaWwzbVI4aOfX96OXY8M6KNmtPcg7QjYeDmN+DD0Wp3LaBOLf4Q== - -"@esbuild/netbsd-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/netbsd-x64/-/netbsd-x64-0.19.9.tgz#0cbca65e9ef4d3fc41502d3e055e6f49479a8f18" - integrity sha512-GThgZPAwOBOsheA2RUlW5UeroRfESwMq/guy8uEe3wJlAOjpOXuSevLRd70NZ37ZrpO6RHGHgEHvPg1h3S1Jug== - -"@esbuild/openbsd-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.17.19.tgz#95e75a391403cb10297280d524d66ce04c920691" - integrity sha512-cnq5brJYrSZ2CF6c35eCmviIN3k3RczmHz8eYaVlNasVqsNY+JKohZU5MKmaOI+KkllCdzOKKdPs762VCPC20g== - -"@esbuild/openbsd-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/openbsd-x64/-/openbsd-x64-0.19.9.tgz#1f57adfbee09c743292c6758a3642e875bcad1cf" - integrity sha512-Ki6PlzppaFVbLnD8PtlVQfsYw4S9n3eQl87cqgeIw+O3sRr9IghpfSKY62mggdt1yCSZ8QWvTZ9jo9fjDSg9uw== - -"@esbuild/sunos-x64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.17.19.tgz#722eaf057b83c2575937d3ffe5aeb16540da7273" - integrity sha512-vCRT7yP3zX+bKWFeP/zdS6SqdWB8OIpaRq/mbXQxTGHnIxspRtigpkUcDMlSCOejlHowLqII7K2JKevwyRP2rg== - -"@esbuild/sunos-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/sunos-x64/-/sunos-x64-0.19.9.tgz#116be6adbd2c7479edeeb5f6ea0441002ab4cb9c" - integrity sha512-MLHj7k9hWh4y1ddkBpvRj2b9NCBhfgBt3VpWbHQnXRedVun/hC7sIyTGDGTfsGuXo4ebik2+3ShjcPbhtFwWDw== - -"@esbuild/win32-arm64@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.17.19.tgz#9aa9dc074399288bdcdd283443e9aeb6b9552b6f" - integrity sha512-yYx+8jwowUstVdorcMdNlzklLYhPxjniHWFKgRqH7IFlUEa0Umu3KuYplf1HUZZ422e3NU9F4LGb+4O0Kdcaag== - -"@esbuild/win32-arm64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-arm64/-/win32-arm64-0.19.9.tgz#2be22131ab18af4693fd737b161d1ef34de8ca9d" - integrity sha512-GQoa6OrQ8G08guMFgeXPH7yE/8Dt0IfOGWJSfSH4uafwdC7rWwrfE6P9N8AtPGIjUzdo2+7bN8Xo3qC578olhg== - -"@esbuild/win32-ia32@0.17.19": - version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.17.19.tgz#95ad43c62ad62485e210f6299c7b2571e48d2b03" - integrity sha512-eggDKanJszUtCdlVs0RB+h35wNlb5v4TWEkq4vZcmVt5u/HiDZrTXe2bWFQUez3RgNHwx/x4sk5++4NSSicKkw== - -"@esbuild/win32-ia32@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-ia32/-/win32-ia32-0.19.9.tgz#e10ead5a55789b167b4225d2469324538768af7c" - integrity sha512-UOozV7Ntykvr5tSOlGCrqU3NBr3d8JqPes0QWN2WOXfvkWVGRajC+Ym0/Wj88fUgecUCLDdJPDF0Nna2UK3Qtg== - "@esbuild/win32-x64@0.17.19": version "0.17.19" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz#8cfaf2ff603e9aabb910e9c0558c26cf32744061" + resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.17.19.tgz" integrity sha512-lAhycmKnVOuRYNtRtatQR1LPQf2oYCkRGkSFnseDAKPl8lu5SOsK/e1sXe5a0Pc5kHIHe6P2I/ilntNv2xf3cA== -"@esbuild/win32-x64@0.19.9": - version "0.19.9" - resolved "https://registry.yarnpkg.com/@esbuild/win32-x64/-/win32-x64-0.19.9.tgz#b2da6219b603e3fa371a78f53f5361260d0c5585" - integrity sha512-oxoQgglOP7RH6iasDrhY+R/3cHrfwIDvRlT4CGChflq6twk8iENeVvMJjmvBb94Ik1Z+93iGO27err7w6l54GQ== +"@esbuild/win32-x64@0.18.20": + version "0.18.20" + resolved "https://registry.npmjs.org/@esbuild/win32-x64/-/win32-x64-0.18.20.tgz" + integrity sha512-kTdfRcSiDfQca/y9QIkng02avJ+NCaQvrMejlsB3RRv5sE9rRoeBPISaZpKxHELzRxZyLvNts1P27W3wV+8geQ== "@eslint-community/eslint-utils@^4.1.2", "@eslint-community/eslint-utils@^4.2.0", "@eslint-community/eslint-utils@^4.4.0": version "4.4.0" @@ -366,19 +141,14 @@ ajv-formats "^2.1.1" fast-uri "^2.0.0" -"@fastify/busboy@^2.0.0": +"@fastify/busboy@^2.0.0", "@fastify/busboy@^2.1.0": version "2.1.0" resolved "https://registry.npmjs.org/@fastify/busboy/-/busboy-2.1.0.tgz" integrity sha512-+KpH+QxZU7O4675t3mnkQKcZZg56u+K/Ct2K+N2AZYNVK8kyeo/bI18tI8aPm3tvNNRyTWfj6s5tnGNlcbQRsA== -"@fastify/busboy@^2.1.0": - version "2.1.1" - resolved "https://registry.yarnpkg.com/@fastify/busboy/-/busboy-2.1.1.tgz#b9da6a878a371829a0502c9b6c1c143ef6663f4d" - integrity sha512-vBZP4NlzfOlerQTnba4aqZoMhE/a9HY7HRqoOPaETQcSQuWEIyZMHGfVu6w9wGtGK5fED5qRs2DteVCjOH60sA== - "@fastify/cookie@^9.0.4", "@fastify/cookie@^9.3.1": version "9.3.1" - resolved "https://registry.yarnpkg.com/@fastify/cookie/-/cookie-9.3.1.tgz#48b89a356a23860c666e2fe522a084cc5c943d33" + resolved "https://registry.npmjs.org/@fastify/cookie/-/cookie-9.3.1.tgz" integrity sha512-h1NAEhB266+ZbZ0e9qUE6NnNR07i7DnNXWG9VbbZ8uC6O/hxHpl+Zoe5sw1yfdZ2U6XhToUGDnzQtWJdCaPwfg== dependencies: cookie-signature "^1.1.0" @@ -411,7 +181,7 @@ "@fastify/multipart@^8.2.0": version "8.2.0" - resolved "https://registry.yarnpkg.com/@fastify/multipart/-/multipart-8.2.0.tgz#90359b78eccd0f944cf145a2e907d167a3a6c731" + resolved "https://registry.npmjs.org/@fastify/multipart/-/multipart-8.2.0.tgz" integrity sha512-OZ8nsyyoS2TV7Yeu3ZdrdDGsKUTAbfjrKC9jSxGgT2qdgek+BxpWX31ZubTrWMNZyU5xwk4ox6AvTjAbYWjrWg== dependencies: "@fastify/busboy" "^2.1.0" @@ -492,6 +262,54 @@ resolved "https://registry.npmjs.org/@humanwhocodes/object-schema/-/object-schema-2.0.1.tgz" integrity sha512-dvuCeX5fC9dXgJn9t+X5atfmgQAzUOWqS1254Gh0m6i8wKd10ebXkfNKiRK+1GWi/yTvvLDHpoxLr0xxxeslWw== +"@jridgewell/gen-mapping@^0.3.5": + version "0.3.5" + resolved "https://registry.npmjs.org/@jridgewell/gen-mapping/-/gen-mapping-0.3.5.tgz" + integrity sha512-IzL8ZoEDIBRWEzlCcRhOaCupYyN5gdIK+Q6fbFdPDg6HqX6jpkItn7DFIpW9LQzXG6Df9sA7+OKnq0qlz/GaQg== + dependencies: + "@jridgewell/set-array" "^1.2.1" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@jridgewell/trace-mapping" "^0.3.24" + +"@jridgewell/resolve-uri@^3.0.3", "@jridgewell/resolve-uri@^3.1.0": + version "3.1.2" + resolved "https://registry.npmjs.org/@jridgewell/resolve-uri/-/resolve-uri-3.1.2.tgz" + integrity sha512-bRISgCIjP20/tbWSPWMEi54QVPRZExkuD9lJL+UIxUKtwVJA8wW1Trb1jMs1RFXo1CBTNZ/5hpC9QvmKWdopKw== + +"@jridgewell/set-array@^1.2.1": + version "1.2.1" + resolved "https://registry.npmjs.org/@jridgewell/set-array/-/set-array-1.2.1.tgz" + integrity sha512-R8gLRTZeyp03ymzP/6Lil/28tGeGEzhx1q2k703KGWRAI1VdvPIXdG70VJc2pAMw3NA6JKL5hhFu1sJX0Mnn/A== + +"@jridgewell/source-map@^0.3.3": + version "0.3.6" + resolved "https://registry.npmjs.org/@jridgewell/source-map/-/source-map-0.3.6.tgz" + integrity sha512-1ZJTZebgqllO79ue2bm3rIGud/bOe0pP5BjSRCRxxYkEZS8STV7zN84UBbiYu7jy+eCKSnVIUgoWWE/tt+shMQ== + dependencies: + "@jridgewell/gen-mapping" "^0.3.5" + "@jridgewell/trace-mapping" "^0.3.25" + +"@jridgewell/sourcemap-codec@^1.4.10", "@jridgewell/sourcemap-codec@^1.4.14": + version "1.4.15" + resolved "https://registry.npmjs.org/@jridgewell/sourcemap-codec/-/sourcemap-codec-1.4.15.tgz" + integrity sha512-eF2rxCRulEKXHTRiDrDy6erMYWqNw4LPdQ8UQA4huuxaQsVeRPFl2oM8oDGxMFhJUWZf9McpLtJasDDZb/Bpeg== + +"@jridgewell/trace-mapping@^0.3.20", "@jridgewell/trace-mapping@^0.3.24", "@jridgewell/trace-mapping@^0.3.25": + version "0.3.25" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.25.tgz" + integrity sha512-vNk6aEwybGtawWmy/PzwnGDOjCkLWSD2wqvjGGAgOAwCGWySYXfYoxt00IJkTF+8Lb57DwOb3Aa0o9CApepiYQ== + dependencies: + "@jridgewell/resolve-uri" "^3.1.0" + "@jridgewell/sourcemap-codec" "^1.4.14" + +"@jridgewell/trace-mapping@0.3.9": + version "0.3.9" + resolved "https://registry.npmjs.org/@jridgewell/trace-mapping/-/trace-mapping-0.3.9.tgz" + integrity sha512-3Belt6tdc8bPgAtbcmdtNJlirVoTmEb5e2gC94PnkwEW9jI6CAHUeoG85tjWP5WquqfavoMtMwiG4P926ZKKuQ== + dependencies: + "@jridgewell/resolve-uri" "^3.0.3" + "@jridgewell/sourcemap-codec" "^1.4.10" + "@nodelib/fs.scandir@2.1.5": version "2.1.5" resolved "https://registry.npmjs.org/@nodelib/fs.scandir/-/fs.scandir-2.1.5.tgz" @@ -500,7 +318,7 @@ "@nodelib/fs.stat" "2.0.5" run-parallel "^1.1.9" -"@nodelib/fs.stat@2.0.5", "@nodelib/fs.stat@^2.0.2": +"@nodelib/fs.stat@^2.0.2", "@nodelib/fs.stat@2.0.5": version "2.0.5" resolved "https://registry.npmjs.org/@nodelib/fs.stat/-/fs.stat-2.0.5.tgz" integrity sha512-RkhPPp2zrqDAQA/2jNhnztcPAlv64XdhIp7a7454A5ovI7Bukxgt7MX7udwAu3zg1DcpPU0rz3VV1SeaqvY4+A== @@ -530,7 +348,7 @@ resolved "https://registry.npmjs.org/@redis/bloom/-/bloom-1.2.0.tgz" integrity sha512-HG2DFjYKbpNmVXsa0keLHp/3leGJz1mjh09f2RLGGLQZzSHpkmZWuwJbAvo3QcRY8p80m5+ZdXZdYOSBLlp7Cg== -"@redis/client@1.5.12": +"@redis/client@^1.0.0", "@redis/client@1.5.12": version "1.5.12" resolved "https://registry.npmjs.org/@redis/client/-/client-1.5.12.tgz" integrity sha512-/ZjE18HRzMd80eXIIUIPcH81UoZpwulbo8FmbElrjPqH0QC0SeIKu1BOU49bO5trM5g895kAjhvalt5h77q+4A== @@ -581,7 +399,15 @@ resolved "https://registry.npmjs.org/@types/cli-color/-/cli-color-2.0.6.tgz" integrity sha512-uLK0/0dOYdkX8hNsezpYh1gc8eerbhf9bOKZ3e24sP67703mw9S14/yW6mSTatiaKO9v+mU/a1EVy4rOXXeZTA== -"@types/eslint@^8.0.0": +"@types/eslint-scope@^3.7.3": + version "3.7.7" + resolved "https://registry.npmjs.org/@types/eslint-scope/-/eslint-scope-3.7.7.tgz" + integrity sha512-MzMFlSLBqNF2gcHWO0G1vP/YQyfvrxZ0bF+u7mzUdZ1/xK4A4sru+nraZz5i3iEIk1l1uyicaDVTB4QbbEkAYg== + dependencies: + "@types/eslint" "*" + "@types/estree" "*" + +"@types/eslint@*", "@types/eslint@^8.0.0", "@types/eslint@>=8.0.0": version "8.44.9" resolved "https://registry.npmjs.org/@types/eslint/-/eslint-8.44.9.tgz" integrity sha512-6yBxcvwnnYoYT1Uk2d+jvIfsuP4mb2EdIxFnrPABj5a/838qe5bGkNLFOiipX4ULQ7XVQvTxOh7jO+BTAiqsEw== @@ -589,12 +415,12 @@ "@types/estree" "*" "@types/json-schema" "*" -"@types/estree@*": +"@types/estree@*", "@types/estree@^1.0.5": version "1.0.5" resolved "https://registry.npmjs.org/@types/estree/-/estree-1.0.5.tgz" integrity sha512-/kYRxGDLWzHOB7q+wtSUQlFrtcdUccpfy+X+9iMBpHK8QLLhx2wIPYuS5DYtR9Wa/YlZAbIovy7qVdB1Aq6Lyw== -"@types/json-schema@*", "@types/json-schema@^7.0.12": +"@types/json-schema@*", "@types/json-schema@^7.0.12", "@types/json-schema@^7.0.8": version "7.0.15" resolved "https://registry.npmjs.org/@types/json-schema/-/json-schema-7.0.15.tgz" integrity sha512-5+fP8P8MFNC+AyZCDxrB2pkZFPGzqQWUzpSeuuVLvm8VMcorNYavBqoFcxK8bQz4Qsbn4oUEEem4wDLfcysGHA== @@ -613,13 +439,13 @@ form-data "^4.0.0" "@types/node-forge@^1.3.0": - version "1.3.10" - resolved "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.10.tgz" - integrity sha512-y6PJDYN4xYBxwd22l+OVH35N+1fCYWiuC3aiP2SlXVE6Lo7SS+rSx9r89hLxrP4pn6n1lBGhHJ12pj3F3Mpttw== + version "1.3.11" + resolved "https://registry.npmjs.org/@types/node-forge/-/node-forge-1.3.11.tgz" + integrity sha512-FQx220y22OKNTqaByeBGqHWYz4cl94tpcxeFdvBo3wjG6XPBuZ0BNgNZRV5J5TFmmcsJ4IzsLkmGRiQbnYsBEQ== dependencies: "@types/node" "*" -"@types/node@*", "@types/node@^20.10.4": +"@types/node@*", "@types/node@^20.10.4", "@types/node@>=8.1.0": version "20.10.4" resolved "https://registry.npmjs.org/@types/node/-/node-20.10.4.tgz" integrity sha512-D08YG6rr8X90YB56tSIuBaddy/UXAA9RKJoFvrsnogAum/0pmjkgi4+2nx96A330FmioegBWmEYQ+syqCFaveg== @@ -638,7 +464,7 @@ resolved "https://registry.npmjs.org/@types/normalize-package-data/-/normalize-package-data-2.4.4.tgz" integrity sha512-37i+OaWTh9qeK4LSHPsyRC7NahnGotNuZvjLSgcPzblpHB3rrCJxAOgI5gCdKm7coonsaX1Of0ILiTcnZjbfxA== -"@types/pg@^8.10.9": +"@types/pg@*", "@types/pg@^8.10.9": version "8.10.9" resolved "https://registry.npmjs.org/@types/pg/-/pg-8.10.9.tgz" integrity sha512-UksbANNE/f8w0wOMxVKKIrLCbEMV+oM1uKejmwXr39olg4xqcfBDbXxObJAt6XxHbDa4XTKOlUEcEltXDX+XLQ== @@ -652,7 +478,12 @@ resolved "https://registry.npmjs.org/@types/semver/-/semver-7.5.6.tgz" integrity sha512-dn1l8LaMea/IjDoHNd9J52uBbInB796CDffS6VdIxvqYCPSG0V0DzHp76GpaWnlhg88uYyPbXCDIowa86ybd5A== -"@typescript-eslint/eslint-plugin@^6.0.0": +"@types/stripe-v3@^3.1.33": + version "3.1.33" + resolved "https://registry.npmjs.org/@types/stripe-v3/-/stripe-v3-3.1.33.tgz" + integrity sha512-fIE7F7alypCrnIMsk4naprHf8kXEvPM2Q9FGdL/3TDeGM0xlHohdVWkwuaEZ2tKzXB9QQKoS8k+ocLkPjZajwQ== + +"@typescript-eslint/eslint-plugin@^6.0.0", "@typescript-eslint/eslint-plugin@>=6.0.0": version "6.14.0" resolved "https://registry.npmjs.org/@typescript-eslint/eslint-plugin/-/eslint-plugin-6.14.0.tgz" integrity sha512-1ZJBykBCXaSHG94vMMKmiHoL0MhNHKSVlcHVYZNw+BKxufhqQVTOawNpwwI1P5nIFZ/4jLVop0mcY6mJJDFNaw== @@ -669,7 +500,7 @@ semver "^7.5.4" ts-api-utils "^1.0.1" -"@typescript-eslint/parser@^6.0.0": +"@typescript-eslint/parser@^6.0.0", "@typescript-eslint/parser@^6.0.0 || ^6.0.0-alpha", "@typescript-eslint/parser@>=6.0.0": version "6.14.0" resolved "https://registry.npmjs.org/@typescript-eslint/parser/-/parser-6.14.0.tgz" integrity sha512-QjToC14CKacd4Pa7JK4GeB/vHmWFJckec49FR4hmIRf97+KXole0T97xxu9IFiPxVQ1DBWrQ5wreLwAGwWAVQA== @@ -742,6 +573,137 @@ resolved "https://registry.npmjs.org/@ungap/structured-clone/-/structured-clone-1.2.0.tgz" integrity sha512-zuVdFrMJiuCDQUMCzQaD6KL28MjnqqN8XnAqiEq9PNm/hCPTSGfrXCOfwj1ow4LFb/tNymJPwsNbVePc1xFqrQ== +"@webassemblyjs/ast@^1.12.1", "@webassemblyjs/ast@1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/ast/-/ast-1.12.1.tgz" + integrity sha512-EKfMUOPRRUTy5UII4qJDGPpqfwjOmZ5jeGFwid9mnoqIFK+e0vqoi1qH56JpmZSzEL53jKnNzScdmftJyG5xWg== + dependencies: + "@webassemblyjs/helper-numbers" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + +"@webassemblyjs/floating-point-hex-parser@1.11.6": + version "1.11.6" + resolved "https://registry.npmjs.org/@webassemblyjs/floating-point-hex-parser/-/floating-point-hex-parser-1.11.6.tgz" + integrity sha512-ejAj9hfRJ2XMsNHk/v6Fu2dGS+i4UaXBXGemOfQ/JfQ6mdQg/WXtwleQRLLS4OvfDhv8rYnVwH27YJLMyYsxhw== + +"@webassemblyjs/helper-api-error@1.11.6": + version "1.11.6" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-api-error/-/helper-api-error-1.11.6.tgz" + integrity sha512-o0YkoP4pVu4rN8aTJgAyj9hC2Sv5UlkzCHhxqWj8butaLvnpdc2jOwh4ewE6CX0txSfLn/UYaV/pheS2Txg//Q== + +"@webassemblyjs/helper-buffer@1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-buffer/-/helper-buffer-1.12.1.tgz" + integrity sha512-nzJwQw99DNDKr9BVCOZcLuJJUlqkJh+kVzVl6Fmq/tI5ZtEyWT1KZMyOXltXLZJmDtvLCDgwsyrkohEtopTXCw== + +"@webassemblyjs/helper-numbers@1.11.6": + version "1.11.6" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-numbers/-/helper-numbers-1.11.6.tgz" + integrity sha512-vUIhZ8LZoIWHBohiEObxVm6hwP034jwmc9kuq5GdHZH0wiLVLIPcMCdpJzG4C11cHoQ25TFIQj9kaVADVX7N3g== + dependencies: + "@webassemblyjs/floating-point-hex-parser" "1.11.6" + "@webassemblyjs/helper-api-error" "1.11.6" + "@xtuc/long" "4.2.2" + +"@webassemblyjs/helper-wasm-bytecode@1.11.6": + version "1.11.6" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-bytecode/-/helper-wasm-bytecode-1.11.6.tgz" + integrity sha512-sFFHKwcmBprO9e7Icf0+gddyWYDViL8bpPjJJl0WHxCdETktXdmtWLGVzoHbqUcY4Be1LkNfwTmXOJUFZYSJdA== + +"@webassemblyjs/helper-wasm-section@1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/helper-wasm-section/-/helper-wasm-section-1.12.1.tgz" + integrity sha512-Jif4vfB6FJlUlSbgEMHUyk1j234GTNG9dBJ4XJdOySoj518Xj0oGsNi59cUQF4RRMS9ouBUxDDdyBVfPTypa5g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/wasm-gen" "1.12.1" + +"@webassemblyjs/ieee754@1.11.6": + version "1.11.6" + resolved "https://registry.npmjs.org/@webassemblyjs/ieee754/-/ieee754-1.11.6.tgz" + integrity sha512-LM4p2csPNvbij6U1f19v6WR56QZ8JcHg3QIJTlSwzFcmx6WSORicYj6I63f9yU1kEUtrpG+kjkiIAkevHpDXrg== + dependencies: + "@xtuc/ieee754" "^1.2.0" + +"@webassemblyjs/leb128@1.11.6": + version "1.11.6" + resolved "https://registry.npmjs.org/@webassemblyjs/leb128/-/leb128-1.11.6.tgz" + integrity sha512-m7a0FhE67DQXgouf1tbN5XQcdWoNgaAuoULHIfGFIEVKA6tu/edls6XnIlkmS6FrXAquJRPni3ZZKjw6FSPjPQ== + dependencies: + "@xtuc/long" "4.2.2" + +"@webassemblyjs/utf8@1.11.6": + version "1.11.6" + resolved "https://registry.npmjs.org/@webassemblyjs/utf8/-/utf8-1.11.6.tgz" + integrity sha512-vtXf2wTQ3+up9Zsg8sa2yWiQpzSsMyXj0qViVP6xKGCUT8p8YJ6HqI7l5eCnWx1T/FYdsv07HQs2wTFbbof/RA== + +"@webassemblyjs/wasm-edit@^1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-edit/-/wasm-edit-1.12.1.tgz" + integrity sha512-1DuwbVvADvS5mGnXbE+c9NfA8QRcZ6iKquqjjmR10k6o+zzsRVesil54DKexiowcFCPdr/Q0qaMgB01+SQ1u6g== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/helper-wasm-section" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-opt" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + "@webassemblyjs/wast-printer" "1.12.1" + +"@webassemblyjs/wasm-gen@1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-gen/-/wasm-gen-1.12.1.tgz" + integrity sha512-TDq4Ojh9fcohAw6OIMXqiIcTq5KUXTGRkVxbSo1hQnSy6lAM5GSdfwWeSxpAo0YzgsgF182E/U0mDNhuA0tW7w== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wasm-opt@1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-opt/-/wasm-opt-1.12.1.tgz" + integrity sha512-Jg99j/2gG2iaz3hijw857AVYekZe2SAskcqlWIZXjji5WStnOpVoat3gQfT/Q5tb2djnCjBtMocY/Su1GfxPBg== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-buffer" "1.12.1" + "@webassemblyjs/wasm-gen" "1.12.1" + "@webassemblyjs/wasm-parser" "1.12.1" + +"@webassemblyjs/wasm-parser@^1.12.1", "@webassemblyjs/wasm-parser@1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/wasm-parser/-/wasm-parser-1.12.1.tgz" + integrity sha512-xikIi7c2FHXysxXe3COrVUPSheuBtpcfhbpFj4gmu7KRLYOzANztwUU0IbsqvMqzuNK2+glRGWCEqZo1WCLyAQ== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@webassemblyjs/helper-api-error" "1.11.6" + "@webassemblyjs/helper-wasm-bytecode" "1.11.6" + "@webassemblyjs/ieee754" "1.11.6" + "@webassemblyjs/leb128" "1.11.6" + "@webassemblyjs/utf8" "1.11.6" + +"@webassemblyjs/wast-printer@1.12.1": + version "1.12.1" + resolved "https://registry.npmjs.org/@webassemblyjs/wast-printer/-/wast-printer-1.12.1.tgz" + integrity sha512-+X4WAlOisVWQMikjbcvY2e0rwPsKQ9F688lksZhBcPycBBuii3O7m8FACbDMWDojpAqvjIncrG8J0XHKyQfVeA== + dependencies: + "@webassemblyjs/ast" "1.12.1" + "@xtuc/long" "4.2.2" + +"@xtuc/ieee754@^1.2.0": + version "1.2.0" + resolved "https://registry.npmjs.org/@xtuc/ieee754/-/ieee754-1.2.0.tgz" + integrity sha512-DX8nKgqcGwsc0eJSqYt5lwP4DH5FlHnmuWWBRy7X0NcaGR0ZtuyeESgMwTYVEtxmsNGY+qit4QYT/MIYTOTPeA== + +"@xtuc/long@4.2.2": + version "4.2.2" + resolved "https://registry.npmjs.org/@xtuc/long/-/long-4.2.2.tgz" + integrity sha512-NuHqBY1PB/D8xU6s/thBgOAiAP7HOYDQ32+BFZILJ8ivkUkAHQnWfn6WhL79Owj1qmUnoN/YPhktdIoucipkAQ== + abort-controller@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/abort-controller/-/abort-controller-3.0.0.tgz" @@ -754,22 +716,22 @@ abstract-logging@^2.0.1: resolved "https://registry.npmjs.org/abstract-logging/-/abstract-logging-2.0.1.tgz" integrity sha512-2BjRTZxTPvheOvGbBslFSYOUkr+SjPtOnrLP33f+VIWLzezQpZcqVg7ja3L4dBXmzzgwT+a029jRx5PCi3JuiA== +acorn-import-assertions@^1.9.0: + version "1.9.0" + resolved "https://registry.npmjs.org/acorn-import-assertions/-/acorn-import-assertions-1.9.0.tgz" + integrity sha512-cmMwop9x+8KFhxvKrKfPYmN6/pKTYYHBqLa0DfvVZcKMJWNyWLnaqND7dx/qn66R7ewM1UX5XMaDVP5wlVTaVA== + acorn-jsx@^5.3.2: version "5.3.2" resolved "https://registry.npmjs.org/acorn-jsx/-/acorn-jsx-5.3.2.tgz" integrity sha512-rq9s+JNhf0IChjtDXxllJ7g41oZk5SlXtp0LHwyA5cejwn7vKmKp4pPri6YEePv2PU65sAsegbXtIinmDFDXgQ== acorn-walk@^8.2.0: - version "8.3.1" - resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.1.tgz" - integrity sha512-TgUZgYvqZprrl7YldZNoa9OciCAyZR+Ejm9eXzKCmjsF5IKp/wgQ7Z/ZpjpGTIUPwrHQIcYeI8qDh4PsEwxMbw== + version "8.3.2" + resolved "https://registry.npmjs.org/acorn-walk/-/acorn-walk-8.3.2.tgz" + integrity sha512-cjkyv4OtNCIeqhHrfS81QWXoCBPExR/J62oyEqepVw8WaQeSqpW2uhuLPh1m9eWhDuOo/jUXVTlifvesOWp/4A== -acorn@^8.8.0: - version "8.8.2" - resolved "https://registry.npmjs.org/acorn/-/acorn-8.8.2.tgz" - integrity sha512-xjIYgE8HBrkpd/sJqOGNspf8uHG+NOHGOw6a/Urj8taM2EXfdNAH2oFcPeIFfsv3+kz/mJrS5VuMqbNLjCa2vw== - -acorn@^8.9.0: +"acorn@^6.0.0 || ^7.0.0 || ^8.0.0", acorn@^8, acorn@^8.7.1, acorn@^8.8.0, acorn@^8.8.2, acorn@^8.9.0: version "8.11.2" resolved "https://registry.npmjs.org/acorn/-/acorn-8.11.2.tgz" integrity sha512-nc0Axzp/0FILLEVsm4fNwLCwMttvhEI263QtVPQcbpfZZ3ts0hLsZGOpE6czNlid7CJ9MlyH8reXkpsf3YUY4w== @@ -795,6 +757,11 @@ ajv-formats@^2.1.1: dependencies: ajv "^8.0.0" +ajv-keywords@^3.5.2: + version "3.5.2" + resolved "https://registry.npmjs.org/ajv-keywords/-/ajv-keywords-3.5.2.tgz" + integrity sha512-5p6WTN0DdTGVQk6VjcEju19IgaHudalcfabD7yhDGeA6bcQnmL+CpveLJq/3hvfwd1aof6L386Ougkx6RfyMIQ== + ajv@^6.12.4: version "6.12.6" resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" @@ -805,6 +772,16 @@ ajv@^6.12.4: json-schema-traverse "^0.4.1" uri-js "^4.2.2" +ajv@^6.12.5, ajv@^6.9.1: + version "6.12.6" + resolved "https://registry.npmjs.org/ajv/-/ajv-6.12.6.tgz" + integrity sha512-j3fVLgvTo527anyYyJOGTYJbG+vnnQYvE0m5mmkc1TK+nxAppkCLMIL0aZ4dblVCNoGShhm+kzE4ZUykBoMg4g== + dependencies: + fast-deep-equal "^3.1.1" + fast-json-stable-stringify "^2.0.0" + json-schema-traverse "^0.4.1" + uri-js "^4.2.2" + ajv@^8.0.0, ajv@^8.10.0, ajv@^8.11.0: version "8.12.0" resolved "https://registry.npmjs.org/ajv/-/ajv-8.12.0.tgz" @@ -962,6 +939,15 @@ avvio@^8.2.1: debug "^4.0.0" fastq "^1.6.1" +axios@>=0.27: + version "1.7.2" + resolved "https://registry.npmjs.org/axios/-/axios-1.7.2.tgz" + integrity sha512-2A8QhOMrbomlDuiLeK9XibIBzuHeRcqqNOHp0Cyp5EoJ1IFDh+XZH3A6BkXtv0K4gFGCI0Y4BM7B1wOEi0Rmgw== + dependencies: + follow-redirects "^1.15.6" + form-data "^4.0.0" + proxy-from-env "^1.1.0" + balanced-match@^1.0.0: version "1.0.2" resolved "https://registry.npmjs.org/balanced-match/-/balanced-match-1.0.2.tgz" @@ -1021,6 +1007,16 @@ braces@^3.0.2, braces@~3.0.2: dependencies: fill-range "^7.0.1" +browserslist@^4.21.10, "browserslist@>= 4.21.0": + version "4.23.0" + resolved "https://registry.npmjs.org/browserslist/-/browserslist-4.23.0.tgz" + integrity sha512-QW8HiM1shhT2GuzkvklfjcKDiWFXHOeFCIA/huJPwHsslwcydgk7X+z2zXpEijP98UCY7HbubZt5J2Zgvf0CaQ== + dependencies: + caniuse-lite "^1.0.30001587" + electron-to-chromium "^1.4.668" + node-releases "^2.0.14" + update-browserslist-db "^1.0.13" + buffer-equal-constant-time@1.0.1: version "1.0.1" resolved "https://registry.npmjs.org/buffer-equal-constant-time/-/buffer-equal-constant-time-1.0.1.tgz" @@ -1093,6 +1089,11 @@ camelcase@^7.0.1: resolved "https://registry.npmjs.org/camelcase/-/camelcase-7.0.1.tgz" integrity sha512-xlx1yCK2Oc1APsPXDL2LdlNP6+uu8OCDdhOBSVT279M/S+y75O30C2VuD8T2ogdePBBl7PfPF4504tnLgX3zfw== +caniuse-lite@^1.0.30001587: + version "1.0.30001612" + resolved "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001612.tgz" + integrity sha512-lFgnZ07UhaCcsSZgWW0K5j4e69dK1u/ltrL9lTUiFOwNHs12S3UMIEYgBV0Z6C6hRDev7iRnMzzYmKabYdXF9g== + capnp-ts@^0.7.0: version "0.7.0" resolved "https://registry.npmjs.org/capnp-ts/-/capnp-ts-0.7.0.tgz" @@ -1119,9 +1120,9 @@ chalk@^4.0.0, chalk@^4.1.0: supports-color "^7.1.0" chalk@^5.2.0: - version "5.2.0" - resolved "https://registry.npmjs.org/chalk/-/chalk-5.2.0.tgz" - integrity sha512-ree3Gqw/nazQAPuJJEy+avdl7QfZMcUvmHIKgEZkGL+xOBzRvup5Hxo6LHuMceSxOabuJLJm5Yp/92R9eMmMvA== + version "5.3.0" + resolved "https://registry.npmjs.org/chalk/-/chalk-5.3.0.tgz" + integrity sha512-dLitG79d+GV1Nb/VYcCDFivJeK1hiukt9QjRNVOsUtTy1rR1YJsmpGGTZ3qJos+uw7WmWF4wUwBd9jxjocFC2w== chokidar@^3.5.3: version "3.5.3" @@ -1138,6 +1139,11 @@ chokidar@^3.5.3: optionalDependencies: fsevents "~2.3.2" +chrome-trace-event@^1.0.2: + version "1.0.3" + resolved "https://registry.npmjs.org/chrome-trace-event/-/chrome-trace-event-1.0.3.tgz" + integrity sha512-p3KULyQg4S7NIHixdwbGX+nFHkoBiA4YQmyWtjb8XngSKV124nJmRysgAeujbUVb15vh+RvFUfCPqU7rXk+hZg== + ci-info@^3.8.0: version "3.9.0" resolved "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz" @@ -1180,16 +1186,16 @@ color-convert@^2.0.1: dependencies: color-name "~1.1.4" -color-name@1.1.3: - version "1.1.3" - resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" - integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== - color-name@~1.1.4: version "1.1.4" resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.4.tgz" integrity sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA== +color-name@1.1.3: + version "1.1.3" + resolved "https://registry.npmjs.org/color-name/-/color-name-1.1.3.tgz" + integrity sha512-72fSenhMw2HZMTVHeCA9KCmpEIbzWiQsjN+BHcBbS9vr1mtt+vJjPdksIBNUmKAW8TFUDPJK5SUU3QhE9NEXDw== + combined-stream@^1.0.8: version "1.0.8" resolved "https://registry.npmjs.org/combined-stream/-/combined-stream-1.0.8.tgz" @@ -1197,6 +1203,11 @@ combined-stream@^1.0.8: dependencies: delayed-stream "~1.0.0" +commander@^2.20.0: + version "2.20.3" + resolved "https://registry.npmjs.org/commander/-/commander-2.20.3.tgz" + integrity sha512-GpVkmM8vF2vQUkj2LvZmD35JxeJOLCwJ9cUkugyk2nuhbv3+mJvpLYYt+0+USMxE+oj+ey/lJEnhZw75x/OMcQ== + commander@^9.0.0, commander@^9.4.1: version "9.5.0" resolved "https://registry.npmjs.org/commander/-/commander-9.5.0.tgz" @@ -1227,13 +1238,6 @@ cookie@^0.5.0: resolved "https://registry.npmjs.org/cookie/-/cookie-0.5.0.tgz" integrity sha512-YZ3GUyn/o8gfKJlnlX7g7xq4gyO6OSuhGPKaaGssGB2qgDUS0gPgtTvoyZLTt9Ab6dC4hfc9dV5arkvc/OCmrw== -copy-anything@^3.0.2: - version "3.0.5" - resolved "https://registry.npmjs.org/copy-anything/-/copy-anything-3.0.5.tgz" - integrity sha512-yCEafptTtb4bk7GLEQoM8KVJpxAfdBJYaXyzQEgQQQgYrZiDp8SJmGKlYza6CYjEDNstAdNdKA3UuoULlEbS6w== - dependencies: - is-what "^4.1.8" - cosmiconfig@^8.2.0: version "8.3.6" resolved "https://registry.npmjs.org/cosmiconfig/-/cosmiconfig-8.3.6.tgz" @@ -1253,7 +1257,7 @@ cross-spawn@^7.0.2, cross-spawn@^7.0.3: shebang-command "^2.0.0" which "^2.0.1" -d@1, d@^1.0.1: +d@^1.0.1, d@1: version "1.0.1" resolved "https://registry.npmjs.org/d/-/d-1.0.1.tgz" integrity sha512-m62ShEObQ39CfralilEQRjH6oAMtNCV1xJyEx5LpRYUVN+EviphDgUc/F3hnYbADmkiNs67Y+3ylmlG7Lnu+FA== @@ -1266,13 +1270,6 @@ data-uri-to-buffer@^2.0.0: resolved "https://registry.npmjs.org/data-uri-to-buffer/-/data-uri-to-buffer-2.0.2.tgz" integrity sha512-ND9qDTLc6diwj+Xe5cdAgVTbLVdXbtxTJRXRhli8Mowuaan+0EJOtdqJ0QCHNSSPyoXGx9HX2/VMnKeC34AChA== -debug@4, debug@^4.0.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4: - version "4.3.4" - resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" - integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== - dependencies: - ms "2.1.2" - debug@^3.2.7: version "3.2.7" resolved "https://registry.npmjs.org/debug/-/debug-3.2.7.tgz" @@ -1280,6 +1277,13 @@ debug@^3.2.7: dependencies: ms "^2.1.1" +debug@^4.0.0, debug@^4.1.1, debug@^4.3.1, debug@^4.3.2, debug@^4.3.4, debug@4: + version "4.3.4" + resolved "https://registry.npmjs.org/debug/-/debug-4.3.4.tgz" + integrity sha512-PRWFHuSU3eDtQJPvnNY7Jcket1j0t5OuOsFzPPzsekD52Zl8qUfFIPEiswXqIvHWGVHOgX+7G/vCNNhehwxfkQ== + dependencies: + ms "2.1.2" + decompress-response@^6.0.0: version "6.0.0" resolved "https://registry.npmjs.org/decompress-response/-/decompress-response-6.0.0.tgz" @@ -1392,38 +1396,42 @@ dreamopt@~0.8.0: dependencies: wordwrap ">=0.0.2" -drizzle-kit@^0.20.6: - version "0.20.6" - resolved "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.20.6.tgz" - integrity sha512-+AYQY+tJUnfMJYIeh6aEjI21mpMCekqz0LEu2QdFdc/3zSmjyfEhH5dkXlRFME8v1rtisiHfp7bP+gVVKDPiUg== +drizzle-kit@^0.20.0: + version "0.20.0" + resolved "https://registry.npmjs.org/drizzle-kit/-/drizzle-kit-0.20.0.tgz" + integrity sha512-5z9wDIPMHXICe44JnM3OcGVjftu2k676IWYkvplJ4AOKhye4Hkf+uM73Dj+NWqmBtqbZ3A34Qt2QvhrLXvWMLw== dependencies: - "@drizzle-team/studio" "^0.0.35" + "@drizzle-team/studio" "^0.0.27" "@esbuild-kit/esm-loader" "^2.5.5" camelcase "^7.0.1" chalk "^5.2.0" commander "^9.4.1" - esbuild "^0.19.7" - esbuild-register "^3.5.0" + esbuild "^0.18.6" + esbuild-register "^3.4.2" glob "^8.1.0" hanji "^0.0.5" json-diff "0.9.0" minimatch "^7.4.3" - semver "^7.5.4" wrangler "^3.7.0" zod "^3.20.2" -drizzle-orm@^0.29.1: - version "0.29.1" - resolved "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.29.1.tgz" - integrity sha512-yItc4unfHnk8XkDD3/bdC63vdboTY7e7I03lCF1OJYABXSIfQYU9BFTQJXMMovVeb3T1/OJWwfW/70T1XPnuUA== +drizzle-orm@^0.29.5: + version "0.29.5" + resolved "https://registry.npmjs.org/drizzle-orm/-/drizzle-orm-0.29.5.tgz" + integrity sha512-jS3+uyzTz4P0Y2CICx8FmRQ1eplURPaIMWDn/yq6k4ShRFj9V7vlJk67lSf2kyYPzQ60GkkNGXcJcwrxZ6QCRw== -ecdsa-sig-formatter@1.0.11, ecdsa-sig-formatter@^1.0.11: +ecdsa-sig-formatter@^1.0.11, ecdsa-sig-formatter@1.0.11: version "1.0.11" resolved "https://registry.npmjs.org/ecdsa-sig-formatter/-/ecdsa-sig-formatter-1.0.11.tgz" integrity sha512-nagl3RYrbNv6kQkeJIpt6NJZy8twLB/2vtz6yN9Z4vRKHN4/QZJIEbqohALSgwKdnksuY3k5Addp5lg8sVoVcQ== dependencies: safe-buffer "^5.0.1" +electron-to-chromium@^1.4.668: + version "1.4.745" + resolved "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.4.745.tgz" + integrity sha512-tRbzkaRI5gbUn5DEvF0dV4TQbMZ5CLkWeTAXmpC9IrYT+GE+x76i9p+o3RJ5l9XmdQlI1pPhVtE9uNcJJ0G0EA== + emoji-regex@^8.0.0: version "8.0.0" resolved "https://registry.npmjs.org/emoji-regex/-/emoji-regex-8.0.0.tgz" @@ -1445,6 +1453,14 @@ enhanced-resolve@^0.9.1: memory-fs "^0.2.0" tapable "^0.1.8" +enhanced-resolve@^5.16.0: + version "5.16.0" + resolved "https://registry.npmjs.org/enhanced-resolve/-/enhanced-resolve-5.16.0.tgz" + integrity sha512-O+QWCviPNSSLAD9Ucn8Awv+poAkqn3T1XY5/N7kR7rQO9yfSGWkYZDwpJ+iKF7B8rxaQKWngSqACpgzeapSyoA== + dependencies: + graceful-fs "^4.2.4" + tapable "^2.2.0" + env-editor@^1.1.0: version "1.1.0" resolved "https://registry.npmjs.org/env-editor/-/env-editor-1.1.0.tgz" @@ -1514,6 +1530,11 @@ es-errors@^1.3.0: resolved "https://registry.npmjs.org/es-errors/-/es-errors-1.3.0.tgz" integrity sha512-Zf5H2Kxt2xjTvbJvP2ZWLEICxA6j+hAmMzIlypy4xcBg1vKVnx89Wy0GbS+kf5cwCVFFzdCFh2XSCFNULS6csw== +es-module-lexer@^1.2.1: + version "1.5.0" + resolved "https://registry.npmjs.org/es-module-lexer/-/es-module-lexer-1.5.0.tgz" + integrity sha512-pqrTKmwEIgafsYZAGw9kszYzmagcE/n4dbgwGWLEXg7J4QFJVQRBld8j3Q3GNez79jzxZshq0bcT962QHOghjw== + es-set-tostringtag@^2.0.1: version "2.0.2" resolved "https://registry.npmjs.org/es-set-tostringtag/-/es-set-tostringtag-2.0.2.tgz" @@ -1575,14 +1596,14 @@ es6-weak-map@^2.0.3: es6-iterator "^2.0.3" es6-symbol "^3.1.1" -esbuild-register@^3.5.0: +esbuild-register@^3.4.2: version "3.5.0" resolved "https://registry.npmjs.org/esbuild-register/-/esbuild-register-3.5.0.tgz" integrity sha512-+4G/XmakeBAsvJuDugJvtyF1x+XJT4FMocynNpxrvEBViirpfUn2PgNpCHedfWhF4WokNsO/OvMKrmJOIJsI5A== dependencies: debug "^4.3.4" -esbuild@0.17.19, esbuild@~0.17.6: +esbuild@*, esbuild@~0.17.6, esbuild@0.17.19: version "0.17.19" resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.17.19.tgz" integrity sha512-XQ0jAPFkK/u3LcVRcvVHQcTIqD6E2H1fvZMA5dQPSOWb3suUbWbfbRf94pjc0bNzRYLfIrDRQXr7X+LHIm5oHw== @@ -1610,33 +1631,38 @@ esbuild@0.17.19, esbuild@~0.17.6: "@esbuild/win32-ia32" "0.17.19" "@esbuild/win32-x64" "0.17.19" -esbuild@^0.19.7: - version "0.19.9" - resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.19.9.tgz" - integrity sha512-U9CHtKSy+EpPsEBa+/A2gMs/h3ylBC0H0KSqIg7tpztHerLi6nrrcoUJAkNCEPumx8yJ+Byic4BVwHgRbN0TBg== +esbuild@^0.18.6, "esbuild@>=0.12 <1": + version "0.18.20" + resolved "https://registry.npmjs.org/esbuild/-/esbuild-0.18.20.tgz" + integrity sha512-ceqxoedUrcayh7Y7ZX6NdbbDzGROiyVBgC4PriJThBKSVPWnnFHZAkfI1lJT8QFkOwH4qOS2SJkS4wvpGl8BpA== optionalDependencies: - "@esbuild/android-arm" "0.19.9" - "@esbuild/android-arm64" "0.19.9" - "@esbuild/android-x64" "0.19.9" - "@esbuild/darwin-arm64" "0.19.9" - "@esbuild/darwin-x64" "0.19.9" - "@esbuild/freebsd-arm64" "0.19.9" - "@esbuild/freebsd-x64" "0.19.9" - "@esbuild/linux-arm" "0.19.9" - "@esbuild/linux-arm64" "0.19.9" - "@esbuild/linux-ia32" "0.19.9" - "@esbuild/linux-loong64" "0.19.9" - "@esbuild/linux-mips64el" "0.19.9" - "@esbuild/linux-ppc64" "0.19.9" - "@esbuild/linux-riscv64" "0.19.9" - "@esbuild/linux-s390x" "0.19.9" - "@esbuild/linux-x64" "0.19.9" - "@esbuild/netbsd-x64" "0.19.9" - "@esbuild/openbsd-x64" "0.19.9" - "@esbuild/sunos-x64" "0.19.9" - "@esbuild/win32-arm64" "0.19.9" - "@esbuild/win32-ia32" "0.19.9" - "@esbuild/win32-x64" "0.19.9" + "@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" + +escalade@^3.1.1: + version "3.1.2" + resolved "https://registry.npmjs.org/escalade/-/escalade-3.1.2.tgz" + integrity sha512-ErCHMCae19vR8vQGe50xIsVomy19rg6gFu3+r3jkEO46suLMWBksvVyoGgQV+jOfl84ZSOSlmv6Gxa89PmTGmA== escape-string-regexp@^1.0.5: version "1.0.5" @@ -1748,7 +1774,7 @@ eslint-plugin-eslint-comments@^3.2.0: escape-string-regexp "^1.0.5" ignore "^5.0.5" -eslint-plugin-import@~2.27.5: +eslint-plugin-import@>=1.4.0, eslint-plugin-import@~2.27.5: version "2.27.5" resolved "https://registry.npmjs.org/eslint-plugin-import/-/eslint-plugin-import-2.27.5.tgz" integrity sha512-LmEt3GVofgiGuiE+ORpnvP+kAm3h6MLZJ4Q5HCyHADofsb4VzXFsRiWj3c0OFiV+3DWFh0qg3v9gcPlfc3zRow== @@ -1837,6 +1863,14 @@ eslint-scope@^7.2.2: esrecurse "^4.3.0" estraverse "^5.2.0" +eslint-scope@5.1.1: + version "5.1.1" + resolved "https://registry.npmjs.org/eslint-scope/-/eslint-scope-5.1.1.tgz" + integrity sha512-2NxwbF/hZ0KpepYN0cNbo+FN6XoK7GaHlQhgx/hIZl6Va0bF45RQOOwhLIy8lQDbuCiadSLCBnH2CFYquit5bw== + dependencies: + esrecurse "^4.3.0" + estraverse "^4.1.1" + eslint-utils@^3.0.0: version "3.0.0" resolved "https://registry.npmjs.org/eslint-utils/-/eslint-utils-3.0.0.tgz" @@ -1854,7 +1888,7 @@ eslint-visitor-keys@^3.3.0, eslint-visitor-keys@^3.4.1, eslint-visitor-keys@^3.4 resolved "https://registry.npmjs.org/eslint-visitor-keys/-/eslint-visitor-keys-3.4.3.tgz" integrity sha512-wpc+LXeiyiisxPlEkUzU6svyS1frIO3Mgxj1fdy7Pm8Ygzguax2N3Fa/D/ag1WqbOprdI+uY6wMUl8/a2G+iag== -eslint@^8.45.0: +"eslint@^2 || ^3 || ^4 || ^5 || ^6 || ^7.2.0 || ^8", "eslint@^6.0.0 || ^7.0.0 || >=8.0.0", "eslint@^7.0.0 || ^8.0.0", eslint@^8.45.0, eslint@>=4.19.1, eslint@>=5, eslint@>=6.0.0, eslint@>=7.0.0, eslint@>=8, eslint@>=8.0.0, eslint@>=8.26.0, eslint@>=8.27.0, eslint@>=8.44.0: version "8.55.0" resolved "https://registry.npmjs.org/eslint/-/eslint-8.55.0.tgz" integrity sha512-iyUUAM0PCKj5QpwGfmCAG9XXbZCWsqP/eWAWrG/W0umvjuLRBECwSFdt+rCntju0xEH7teIABPwXpahftIaTdA== @@ -1934,6 +1968,11 @@ esrecurse@^4.3.0: dependencies: estraverse "^5.2.0" +estraverse@^4.1.1: + version "4.3.0" + resolved "https://registry.npmjs.org/estraverse/-/estraverse-4.3.0.tgz" + integrity sha512-39nnKffWz8xN1BU/2c79n9nB9HDzo0niYUqx6xyqUnyoAnQyyWpOTdZEeiCch8BBu515t4wp9ZmgVfVhn9EBpw== + estraverse@^5.1.0, estraverse@^5.2.0: version "5.3.0" resolved "https://registry.npmjs.org/estraverse/-/estraverse-5.3.0.tgz" @@ -1962,7 +2001,7 @@ event-target-shim@^5.0.0: resolved "https://registry.npmjs.org/event-target-shim/-/event-target-shim-5.0.1.tgz" integrity sha512-i/2XbnSz/uxRCU6+NdVJgKWDTM427+MqYbkQzD321DuCQJUqOuJKIA0IM2+W2xtYHdKOmZ4dR6fExsd4SXL+WQ== -events@^3.3.0: +events@^3.2.0, events@^3.3.0: version "3.3.0" resolved "https://registry.npmjs.org/events/-/events-3.3.0.tgz" integrity sha512-mQw+2fkQbALzQ7V0MY0IqdnXNOeTtP4r0lN9z7AAawCXgqea7bDii20AYrIBrFd/Hx0M2Ocz6S111CaFkUcb0Q== @@ -2108,12 +2147,7 @@ fast-uri@^2.0.0, fast-uri@^2.1.0: resolved "https://registry.npmjs.org/fast-uri/-/fast-uri-2.2.0.tgz" integrity sha512-cIusKBIt/R/oI6z/1nyfe2FvGKVTohVRfvkOhvx0nCEW+xf5NoCXjAHcWp93uOUBchzYcsvPlrapAdX1uW+YGg== -fastify-plugin@^4.0.0: - version "4.5.0" - resolved "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-4.5.0.tgz" - integrity sha512-79ak0JxddO0utAXAQ5ccKhvs6vX2MGyHHMMsmZkBANrq3hXc1CHzvNPHOcvTsVMEPl5I+NT+RO4YKMGehOfSIg== - -fastify-plugin@^4.5.1: +fastify-plugin@^4.0.0, fastify-plugin@^4.5.1: version "4.5.1" resolved "https://registry.npmjs.org/fastify-plugin/-/fastify-plugin-4.5.1.tgz" integrity sha512-stRHYGeuqpEZTL1Ef0Ovr2ltazUT9g844X5z/zEBFLG8RYlpDiOCIG+ATvYEp+/zmc7sN29mcIMp8gvYplYPIQ== @@ -2221,6 +2255,11 @@ flatted@^3.2.9: resolved "https://registry.npmjs.org/flatted/-/flatted-3.2.9.tgz" integrity sha512-36yxDn5H7OFZQla0/jFJmbIKTdZAQHngCedGxiMmpNfEZM0sdEeT+WczLQrjK6D7o2aiyLYDnkw0R3JK0Qv1RQ== +follow-redirects@^1.15.6: + version "1.15.6" + resolved "https://registry.npmjs.org/follow-redirects/-/follow-redirects-1.15.6.tgz" + integrity sha512-wWN62YITEaOpSK584EZXJafH1AGpO8RVgElfkuXbTOrPX4fIfOyEpW/CsiNd8JdYrAoOvafRTOEnvsO++qCqFA== + for-each@^0.3.3: version "0.3.3" resolved "https://registry.npmjs.org/for-each/-/for-each-0.3.3.tgz" @@ -2260,11 +2299,6 @@ fs.realpath@^1.0.0: resolved "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz" integrity sha512-OO0pH2lK6a0hZnAdau5ItzHPI6pUlvI7jMVnxUQRtw4owF2wk8lOSabtGDCTP4Ggrg2MbGnWO9X8K1t4+fGMDw== -fsevents@~2.3.2: - version "2.3.3" - resolved "https://registry.yarnpkg.com/fsevents/-/fsevents-2.3.3.tgz#cac6407785d03675a2a5e1a5305c697b347d90d6" - integrity sha512-5xoDfX+fL7faATnagmWPpbFtwh/R77WmMMqqHGS65C3vvB0YHrgF+B1YmZ3441tMj5n63k0212XNoJwzlhffQw== - function-bind@^1.1.2: version "1.1.2" resolved "https://registry.npmjs.org/function-bind/-/function-bind-1.1.2.tgz" @@ -2368,7 +2402,14 @@ get-tsconfig@^4.4.0: dependencies: resolve-pkg-maps "^1.0.0" -get-tsconfig@^4.6.2, get-tsconfig@^4.7.0: +get-tsconfig@^4.6.2: + version "4.7.2" + resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz" + integrity sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A== + dependencies: + resolve-pkg-maps "^1.0.0" + +get-tsconfig@^4.7.0: version "4.7.2" resolved "https://registry.npmjs.org/get-tsconfig/-/get-tsconfig-4.7.2.tgz" integrity sha512-wuMsz4leaj5hbGgg4IvDU0bqJagpftG5l5cXIAvo8uZrqn0NJqwtfupTN00VnkQJPcIRrxYrm1Ue24btpCha2A== @@ -2493,7 +2534,7 @@ gopd@^1.0.1: dependencies: get-intrinsic "^1.1.3" -graceful-fs@^4.1.2: +graceful-fs@^4.1.2, graceful-fs@^4.2.11, graceful-fs@^4.2.4: version "4.2.11" resolved "https://registry.npmjs.org/graceful-fs/-/graceful-fs-4.2.11.tgz" integrity sha512-RbJ5/jmFcNNCcDV5o9eTnBLJ/HszWV0P73bc+Ff4nS/rJj+YaS6IGyiOL0VoBYX+l1Wrl3k63h/KrH+nhJ0XvQ== @@ -2931,11 +2972,6 @@ is-weakref@^1.0.2: dependencies: call-bind "^1.0.2" -is-what@^4.1.8: - version "4.1.16" - resolved "https://registry.npmjs.org/is-what/-/is-what-4.1.16.tgz" - integrity sha512-ZhMwEosbFJkA0YhFnNDgTM4ZxDRsS6HqTo7qsZM08fehyRYIYa0yHu5R6mgo1n/8MgaPBXiPimPD77baVFYg+A== - is-windows@^1.0.1: version "1.0.2" resolved "https://registry.npmjs.org/is-windows/-/is-windows-1.0.2.tgz" @@ -2958,6 +2994,15 @@ isexe@^2.0.0: resolved "https://registry.npmjs.org/isexe/-/isexe-2.0.0.tgz" integrity sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw== +jest-worker@^27.4.5: + version "27.5.1" + resolved "https://registry.npmjs.org/jest-worker/-/jest-worker-27.5.1.tgz" + integrity sha512-7vuh85V5cdDofPyxn58nrPjBktZo0u9x1g8WtjQol+jZDaE+fhN+cIvTj11GndBnMnyfrUOG1sZQxCdjKh+DKg== + dependencies: + "@types/node" "*" + merge-stream "^2.0.0" + supports-color "^8.0.0" + joi@^17.6.4: version "17.12.3" resolved "https://registry.npmjs.org/joi/-/joi-17.12.3.tgz" @@ -3017,7 +3062,7 @@ json-diff@0.9.0: difflib "~0.2.1" dreamopt "~0.8.0" -json-parse-even-better-errors@^2.3.0: +json-parse-even-better-errors@^2.3.0, json-parse-even-better-errors@^2.3.1: version "2.3.1" resolved "https://registry.npmjs.org/json-parse-even-better-errors/-/json-parse-even-better-errors-2.3.1.tgz" integrity sha512-xyFwyhro/JEof6Ghe2iz2NcXoj2sloNsWr/XsERDK/oiPCfaNhl5ONfp+jQdAZRQQ0IJWNzH9zIZF7li91kh2w== @@ -3104,6 +3149,11 @@ lines-and-columns@^1.1.6: resolved "https://registry.npmjs.org/lines-and-columns/-/lines-and-columns-1.2.4.tgz" integrity sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg== +loader-runner@^4.2.0: + version "4.3.0" + resolved "https://registry.npmjs.org/loader-runner/-/loader-runner-4.3.0.tgz" + integrity sha512-3R/1M+yS3j5ou80Me59j7F9IMs4PXs3VqRrm0TU3AbKPxlmpoY1TNscJV/oGJXo8qCatFGTfDbY6W6ipGOYXfg== + locate-path@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/locate-path/-/locate-path-5.0.0.tgz" @@ -3179,6 +3229,13 @@ magic-string@^0.25.3: dependencies: sourcemap-codec "^1.4.8" +mailtrap@^3.3.0: + version "3.3.0" + resolved "https://registry.npmjs.org/mailtrap/-/mailtrap-3.3.0.tgz" + integrity sha512-lFk7Cuv+qccAGMc9EMPwQiHp2+zG5wPorWdDn29NiLCA0YwYLEtPAKz/EvkLue3kcRA2KukgLOSwEbzL/Fj7Xw== + dependencies: + axios ">=0.27" + memoizee@^0.4.15: version "0.4.15" resolved "https://registry.npmjs.org/memoizee/-/memoizee-0.4.15.tgz" @@ -3231,7 +3288,7 @@ mime-db@1.52.0: resolved "https://registry.npmjs.org/mime-db/-/mime-db-1.52.0.tgz" integrity sha512-sPU4uV7dYlvtWJxwwxHD0PuihVNiE7TyAbQ5SWxDCB9mUYvOgroQOwYQQOKPJ8CIbE+1ETVlOoK1UC2nU3gYvg== -mime-types@^2.1.12: +mime-types@^2.1.12, mime-types@^2.1.27: version "2.1.35" resolved "https://registry.npmjs.org/mime-types/-/mime-types-2.1.35.tgz" integrity sha512-ZDY+bPm5zTTF+YpCrAU9nK0UgICYPT0QtT1NZWFv4s++TNkcgVaT0g6+4R2uI4MjQjzysHB1zxuWL50hzaeXiw== @@ -3263,20 +3320,20 @@ min-indent@^1.0.0: resolved "https://registry.npmjs.org/min-indent/-/min-indent-1.0.1.tgz" integrity sha512-I9jwMn07Sy/IwOj3zVkVik2JTvgpaykDZEigL6Rx6N9LbMywwUSMtxET+7lVoDLLd3O3IXwJwvuuns8UB/HeAg== -miniflare@3.20231030.4: - version "3.20231030.4" - resolved "https://registry.npmjs.org/miniflare/-/miniflare-3.20231030.4.tgz" - integrity sha512-7MBz0ArLuDop1WJGZC6tFgN6c5MRyDOIlxbm3yp0TRBpvDS/KsTuWCQcCjsxN4QQ5zvL3JTkuIZbQzRRw/j6ow== +miniflare@3.20240512.0: + version "3.20240512.0" + resolved "https://registry.npmjs.org/miniflare/-/miniflare-3.20240512.0.tgz" + integrity sha512-X0PlKR0AROKpxFoJNmRtCMIuJxj+ngEcyTOlEokj2rAQ0TBwUhB4/1uiPvdI6ofW5NugPOD1uomAv+gLjwsLDQ== dependencies: + "@cspotcode/source-map-support" "0.8.1" acorn "^8.8.0" acorn-walk "^8.2.0" capnp-ts "^0.7.0" exit-hook "^2.2.1" glob-to-regexp "^0.4.1" - source-map-support "0.5.21" stoppable "^1.1.0" - undici "^5.22.1" - workerd "1.20231030.0" + undici "^5.28.2" + workerd "1.20240512.0" ws "^8.11.0" youch "^3.2.2" zod "^3.20.6" @@ -3314,7 +3371,7 @@ mnemonist@0.39.5: dependencies: obliterator "^2.0.1" -ms@2.1.2, ms@^2.0.0: +ms@^2.0.0, ms@2.1.2: version "2.1.2" resolved "https://registry.npmjs.org/ms/-/ms-2.1.2.tgz" integrity sha512-sGkPx+VjMtmA6MX27oA4FBFELFCZZ4S4XqeGOXCv68tT+jb3vk/RyaKWP0PTKyWtmLSM0b+adUTEvbs1PEaH2w== @@ -3344,7 +3401,12 @@ natural-compare@^1.4.0: resolved "https://registry.npmjs.org/natural-compare/-/natural-compare-1.4.0.tgz" integrity sha512-OWND8ei3VtNC9h7V60qff3SVobHr996CTwgxubgyQYEpg290h9J0buyECNNJexkFm5sOajh5G116RYA1c8ZMSw== -next-tick@1, next-tick@^1.1.0: +neo-async@^2.6.2: + version "2.6.2" + resolved "https://registry.npmjs.org/neo-async/-/neo-async-2.6.2.tgz" + integrity sha512-Yd3UES5mWCSqR+qNT93S3UoYUkqAZ9lLg8a7g9rimsWmYGK8cVToA4/sF3RrshdyV3sAGMXVUmpMYOw+dLpOuw== + +next-tick@^1.1.0, next-tick@1: version "1.1.0" resolved "https://registry.npmjs.org/next-tick/-/next-tick-1.1.0.tgz" integrity sha512-CXdUiJembsNjuToQvxayPZF9Vqht7hewsvy2sOWafLvi2awflj9mOC6bHIg50orX8IJvWKY9wYQ/zB2kogPslQ== @@ -3366,6 +3428,11 @@ node-forge@^1: resolved "https://registry.npmjs.org/node-forge/-/node-forge-1.3.1.tgz" integrity sha512-dPEtOeMvF9VMcYV/1Wb8CPoVAXtp6MKMlcbAt4ddqmGqUJ6fQZFXkNZNkNlfevtNkGtaSoXf/vNNNSvgrdXwtA== +node-releases@^2.0.14: + version "2.0.14" + resolved "https://registry.npmjs.org/node-releases/-/node-releases-2.0.14.tgz" + integrity sha512-y10wOWt8yZpqXmOgRo77WaHEmhYQYGNA6y421PKsKYWEK8aW+cqAphborZDhqfyKrbZEN92CN1X2KbafY2s7Yw== + normalize-package-data@^2.5.0: version "2.5.0" resolved "https://registry.npmjs.org/normalize-package-data/-/normalize-package-data-2.5.0.tgz" @@ -3495,9 +3562,9 @@ open@^9.1.0: is-wsl "^2.2.0" openai@^4.38.5: - version "4.38.5" - resolved "https://registry.yarnpkg.com/openai/-/openai-4.38.5.tgz#87de78eed9f7e63331fb6b1307d8c9dd986b39d0" - integrity sha512-Ym5GJL98ZhLJJ7enBx53jjG3vwN/fsB+Ozh46nnRZZS9W1NiYqbwkJ+sXd3dkCIiWIgcyyOPL2Zr8SQAzbpj3g== + version "4.47.1" + resolved "https://registry.npmjs.org/openai/-/openai-4.47.1.tgz" + integrity sha512-WWSxhC/69ZhYWxH/OBsLEirIjUcfpQ5+ihkXKp06hmeYXgBBIUCa9IptMzYx6NdkiOCsSGYCnTIsxaic3AjRCQ== dependencies: "@types/node" "^18.11.18" "@types/node-fetch" "^2.6.4" @@ -3620,9 +3687,9 @@ path-parse@^1.0.7: integrity sha512-LDJzPVEEEPR+y48z93A0Ed0yXb8pAByGWo/k5YYdYgpY2/2EsOsksJrq7lOHxryrVOn1ejG6oAp8ahvOIQD8sw== path-to-regexp@^6.2.0: - version "6.2.1" - resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.1.tgz" - integrity sha512-JLyh7xT1kizaEvcaXOQwOc2/Yhw6KZOvPf1S8401UyLk86CU79LN3vl7ztXGm/pZ+YjoyAJ4rxmHwbkBXJX+yw== + version "6.2.2" + resolved "https://registry.npmjs.org/path-to-regexp/-/path-to-regexp-6.2.2.tgz" + integrity sha512-GQX3SSMokngb36+whdpRXE+3f9V8UzyAorlYvOGx87ufGHehNTn5lCxrKtLyZ4Yl/wEKnNnr98ZzOwwDZV5ogw== path-type@^4.0.0: version "4.0.0" @@ -3683,7 +3750,7 @@ pg-types@^4.0.1: postgres-interval "^3.0.0" postgres-range "^1.1.1" -pg@^8.11.3: +pg@^8.11.3, pg@>=8, pg@>=8.0: version "8.11.3" resolved "https://registry.npmjs.org/pg/-/pg-8.11.3.tgz" integrity sha512-+9iuvG8QfaaUrrph+kpF24cXkH1YOOUeArRNYIxq1viYHZagBxrTno7cecY1Fa44tJeZvaoG+Djpkc3JwehN5g== @@ -3839,7 +3906,7 @@ prettier-linter-helpers@^1.0.0: dependencies: fast-diff "^1.1.2" -prettier@^3.0.0, prettier@^3.1.1: +prettier@^3.0.0, prettier@^3.1.1, prettier@>=3.0.0: version "3.1.1" resolved "https://registry.npmjs.org/prettier/-/prettier-3.1.1.tgz" integrity sha512-22UbSzg8luF4UuZtzgiUOfcGM8s4tjBv6dJRT7j275NXsy2jb4aJa4NNveul5x4eqlF1wuhuR2RElK71RvmVaw== @@ -3877,12 +3944,17 @@ proxy-addr@^2.0.7: forwarded "0.2.0" ipaddr.js "1.9.1" +proxy-from-env@^1.1.0: + version "1.1.0" + resolved "https://registry.npmjs.org/proxy-from-env/-/proxy-from-env-1.1.0.tgz" + integrity sha512-D+zkORCbA9f1tdWRK0RaCR3GPv50cMxcrz4X8k5LTSUD1Dkw47mKJEZQNunItRTkWwgtaUSo1RVFRIG9ZXiFYg== + punycode@^2.1.0: version "2.3.0" resolved "https://registry.npmjs.org/punycode/-/punycode-2.3.0.tgz" integrity sha512-rRV+zQD8tVFys26lAGR9WUuS4iUAngJScM+ZRSKtvl5tKeZ2t5bvdNFdNHBW9FWR4guGHlgmsZ1G7BSm2wTbuA== -qs@^6.7.0: +qs@^6.11.0, qs@^6.7.0: version "6.12.1" resolved "https://registry.npmjs.org/qs/-/qs-6.12.1.tgz" integrity sha512-zWmv4RSuB9r2mYQw3zxQuHWeU+42aKi1wWig/j4ele4ygELZ7PEO6MM7rim9oAQH2A5MWfsAVf/jPvTPgCbvUQ== @@ -3904,6 +3976,13 @@ quick-format-unescaped@^4.0.3: resolved "https://registry.npmjs.org/quick-format-unescaped/-/quick-format-unescaped-4.0.4.tgz" integrity sha512-tYC1Q1hgyRuHgloV/YXs2w15unPVh8qfu/qCTfhTYamaw7fyhumKa2yGpdSo87vY32rIclj+4fWYQXUMs9EHvg== +randombytes@^2.1.0: + version "2.1.0" + resolved "https://registry.npmjs.org/randombytes/-/randombytes-2.1.0.tgz" + integrity sha512-vYl3iOX+4CKUWuxGi9Ukhie6fsqXqS9FE2Zaic4tNFD2N2QQaXOMFbuKK4QmDHC0JO6B1Zp41J0LpT0oR68amQ== + dependencies: + safe-buffer "^5.1.0" + read-pkg-up@^7.0.1: version "7.0.1" resolved "https://registry.npmjs.org/read-pkg-up/-/read-pkg-up-7.0.1.tgz" @@ -4003,7 +4082,7 @@ resolve.exports@^2.0.2: resolved "https://registry.npmjs.org/resolve.exports/-/resolve.exports-2.0.2.tgz" integrity sha512-X2UW6Nw3n/aMgDVy+0rSqgHlv39WZAlZrXCdnbyEiKm17DSqHX4MmQMaST3FbeWR5FTuRcUwYAziZajji0Y7mg== -resolve@^1.10.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4: +resolve@^1.10.0, resolve@^1.22.1, resolve@^1.22.2, resolve@^1.22.4, resolve@^1.22.8: version "1.22.8" resolved "https://registry.npmjs.org/resolve/-/resolve-1.22.8.tgz" integrity sha512-oKWePCxqpd6FlLvGV1VU0x7bkPmmCNolxzjMf4NczoDnQcIWrAF+cPtZn5i6n+RfD2d9i0tzpKnG6Yk168yIyw== @@ -4090,7 +4169,7 @@ safe-array-concat@^1.0.1: has-symbols "^1.0.3" isarray "^2.0.5" -safe-buffer@^5.0.1: +safe-buffer@^5.0.1, safe-buffer@^5.1.0: version "5.2.1" resolved "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz" integrity sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ== @@ -4116,6 +4195,15 @@ safe-stable-stringify@^2.3.1: resolved "https://registry.npmjs.org/safe-stable-stringify/-/safe-stable-stringify-2.4.3.tgz" integrity sha512-e2bDA2WJT0wxseVd4lsDP4+3ONX6HpMXQa1ZhFQ7SU+GjvORCmShbCMltrtIDfkYhVHrOcPtj+KhmDBdPdZD1g== +schema-utils@^3.1.1, schema-utils@^3.2.0: + version "3.3.0" + resolved "https://registry.npmjs.org/schema-utils/-/schema-utils-3.3.0.tgz" + integrity sha512-pN/yOAvcC+5rQ5nERGuwrjLlYvLTbCibnZ1I7B1LaiAz9BRBlE9GMgE/eqV30P7aJQUf7Ddimy/RsbYO/GrVGg== + dependencies: + "@types/json-schema" "^7.0.8" + ajv "^6.12.5" + ajv-keywords "^3.5.2" + secure-json-parse@^2.4.0, secure-json-parse@^2.7.0: version "2.7.0" resolved "https://registry.npmjs.org/secure-json-parse/-/secure-json-parse-2.7.0.tgz" @@ -4129,7 +4217,7 @@ selfsigned@^2.0.1: "@types/node-forge" "^1.3.0" node-forge "^1" -"semver@2 || 3 || 4 || 5", semver@^5.7.2: +semver@^5.7.2: version "5.7.2" resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== @@ -4146,6 +4234,18 @@ semver@^7.0.0, semver@^7.5.3, semver@^7.5.4: dependencies: lru-cache "^6.0.0" +"semver@2 || 3 || 4 || 5": + version "5.7.2" + resolved "https://registry.npmjs.org/semver/-/semver-5.7.2.tgz" + integrity sha512-cBznnQ9KjJqU67B52RMC65CMarK2600WFnbkcaiwWq3xy/5haFJlshgnpjovMVJ+Hff49d8GEn0b87C5pDQ10g== + +serialize-javascript@^6.0.1: + version "6.0.2" + resolved "https://registry.npmjs.org/serialize-javascript/-/serialize-javascript-6.0.2.tgz" + integrity sha512-Saa1xPByTTq2gdeFZYLLo+RFE35NHZkAbqZeWNd3BpzppeVisAqpDjcp8dyf6uIvEqJRd46jemmyA4iFIeVk8g== + dependencies: + randombytes "^2.1.0" + set-cookie-parser@^2.4.1: version "2.6.0" resolved "https://registry.npmjs.org/set-cookie-parser/-/set-cookie-parser-2.6.0.tgz" @@ -4269,7 +4369,7 @@ sonic-boom@^3.7.0: dependencies: atomic-sleep "^1.0.0" -source-map-support@0.5.21, source-map-support@^0.5.21: +source-map-support@^0.5.21, source-map-support@~0.5.20: version "0.5.21" resolved "https://registry.npmjs.org/source-map-support/-/source-map-support-0.5.21.tgz" integrity sha512-uBHU3L3czsIyYXKX88fdrGovxdSCoTGDRZ6SYXtSRxLZUzHg5P/66Ht6uoUlHu9EZod+inXhKo3qQgwXUT/y1w== @@ -4277,7 +4377,7 @@ source-map-support@0.5.21, source-map-support@^0.5.21: buffer-from "^1.0.0" source-map "^0.6.0" -source-map@0.6.1, source-map@^0.6.0, source-map@^0.6.1: +source-map@^0.6.0, source-map@^0.6.1, source-map@0.6.1: version "0.6.1" resolved "https://registry.npmjs.org/source-map/-/source-map-0.6.1.tgz" integrity sha512-UjgapumWlbMhkBgzT7Ykc5YXUT46F0iKu8SGXq0bcwP5dz/h0Plj6enJqjz1Zbq2l5WaqYnrVbwWOWMyF3F47g== @@ -4333,7 +4433,7 @@ stoppable@^1.1.0: stream-wormhole@^1.1.0: version "1.1.0" - resolved "https://registry.yarnpkg.com/stream-wormhole/-/stream-wormhole-1.1.0.tgz#300aff46ced553cfec642a05251885417693c33d" + resolved "https://registry.npmjs.org/stream-wormhole/-/stream-wormhole-1.1.0.tgz" integrity sha512-gHFfL3px0Kctd6Po0M8TzEvt3De/xu6cnRrjlfYNhwbhLPLwigI2t1nc6jrzNuaYg5C4YF78PPFuQPzRiqn9ew== string-width@^4.2.0: @@ -4406,12 +4506,13 @@ strip-json-comments@^3.1.1: resolved "https://registry.npmjs.org/strip-json-comments/-/strip-json-comments-3.1.1.tgz" integrity sha512-6fPc+R4ihwqP6N/aIv2f1gMH8lOVtWQHoqC4yK6oSDVVocumAsfCqjkXnqiYMhmMwS/mEHLp7Vehlt3ql6lEig== -superjson@^2.2.1: - version "2.2.1" - resolved "https://registry.npmjs.org/superjson/-/superjson-2.2.1.tgz" - integrity sha512-8iGv75BYOa0xRJHK5vRLEjE2H/i4lulTjzpUXic3Eg8akftYjkmQDa8JARQ42rlczXyFR3IeRoeFCc7RxHsYZA== +stripe@^15.7.0: + version "15.7.0" + resolved "https://registry.npmjs.org/stripe/-/stripe-15.7.0.tgz" + integrity sha512-hTJhh0Gc+l+hj2vuzaFCh0T46l7793W3wg4J9Oyy3Wu+Ofswd0OgTS4XNt7G9XHJAyHpTmNRNbWgGwn73P4j7g== dependencies: - copy-anything "^3.0.2" + "@types/node" ">=8.1.0" + qs "^6.11.0" supports-color@^5.3.0: version "5.5.0" @@ -4427,6 +4528,13 @@ supports-color@^7.0.0, supports-color@^7.1.0: dependencies: has-flag "^4.0.0" +supports-color@^8.0.0: + version "8.1.1" + resolved "https://registry.npmjs.org/supports-color/-/supports-color-8.1.1.tgz" + integrity sha512-MpUEN2OodtUzxvKQl72cUF7RQ5EiHsGvSsVG0ia9c5RbWGL2CI4C7EpPS8UTBIplnlzZiNuV56w+FuNxy3ty2Q== + dependencies: + has-flag "^4.0.0" + supports-hyperlinks@^2.0.0: version "2.3.0" resolved "https://registry.npmjs.org/supports-hyperlinks/-/supports-hyperlinks-2.3.0.tgz" @@ -4453,6 +4561,32 @@ tapable@^0.1.8: resolved "https://registry.npmjs.org/tapable/-/tapable-0.1.10.tgz" integrity sha512-jX8Et4hHg57mug1/079yitEKWGB3LCwoxByLsNim89LABq8NqgiX+6iYVOsq0vX8uJHkU+DZ5fnq95f800bEsQ== +tapable@^2.1.1, tapable@^2.2.0: + version "2.2.1" + resolved "https://registry.npmjs.org/tapable/-/tapable-2.2.1.tgz" + integrity sha512-GNzQvQTOIP6RyTfE2Qxb8ZVlNmw0n88vp1szwWRimP02mnTsx3Wtn5qRdqY9w2XduFNUgvOwhNnQsjwCp+kqaQ== + +terser-webpack-plugin@^5.3.10: + version "5.3.10" + resolved "https://registry.npmjs.org/terser-webpack-plugin/-/terser-webpack-plugin-5.3.10.tgz" + integrity sha512-BKFPWlPDndPs+NGGCr1U59t0XScL5317Y0UReNrHaw9/FwhPENlq6bfgs+4yPfyP51vqC1bQ4rp1EfXW5ZSH9w== + dependencies: + "@jridgewell/trace-mapping" "^0.3.20" + jest-worker "^27.4.5" + schema-utils "^3.1.1" + serialize-javascript "^6.0.1" + terser "^5.26.0" + +terser@^5.26.0: + version "5.30.4" + resolved "https://registry.npmjs.org/terser/-/terser-5.30.4.tgz" + integrity sha512-xRdd0v64a8mFK9bnsKVdoNP9GQIKUAaJPTaqEQDL4w/J8WaW4sWXXoMZ+6SimPkfT5bElreXf8m9HnmPc3E1BQ== + dependencies: + "@jridgewell/source-map" "^0.3.3" + acorn "^8.8.2" + commander "^2.20.0" + source-map-support "~0.5.20" + text-table@^0.2.0: version "0.2.0" resolved "https://registry.npmjs.org/text-table/-/text-table-0.2.0.tgz" @@ -4632,7 +4766,7 @@ typed-array-length@^1.0.4: for-each "^0.3.3" is-typed-array "^1.1.9" -typescript@^5.1.6, typescript@^5.3.3: +typescript@^5.1.6, typescript@^5.3.3, typescript@>=4.2.0, typescript@>=4.7, typescript@>=4.9.5: version "5.3.3" resolved "https://registry.npmjs.org/typescript/-/typescript-5.3.3.tgz" integrity sha512-pXWcraxM0uxAS+tN0AG/BF2TyqmHO014Z070UsJ+pFvYuRSq8KH8DmWpnbXe0pEPDHXZV3FcAbJkijJ5oNEnWw== @@ -4657,10 +4791,10 @@ undici-types@~5.26.4: resolved "https://registry.npmjs.org/undici-types/-/undici-types-5.26.5.tgz" integrity sha512-JlCMO+ehdEIKqlFxk6IfVoAUVmgz7cU7zD/h9XZ0qzeosSHmUJVOzSQvvYSYWXkFXC+IfLKSIffhv0sVZup6pA== -undici@^5.22.1: - version "5.28.2" - resolved "https://registry.npmjs.org/undici/-/undici-5.28.2.tgz" - integrity sha512-wh1pHJHnUeQV5Xa8/kyQhO7WFa8M34l026L5P/+2TYiakvGy5Rdc8jWZVyG7ieht/0WgJLEd3kcU5gKx+6GC8w== +undici@^5.28.2: + version "5.28.4" + resolved "https://registry.npmjs.org/undici/-/undici-5.28.4.tgz" + integrity sha512-72RFADWFqKmUb2hmmvNODKL3p9hcB6Gt2DOQMis1SEBaV6a4MH8soBvzg+95CYhCKPFedut2JY9bMfrDl9D23g== dependencies: "@fastify/busboy" "^2.0.0" @@ -4669,6 +4803,14 @@ untildify@^4.0.0: resolved "https://registry.npmjs.org/untildify/-/untildify-4.0.0.tgz" integrity sha512-KK8xQ1mkzZeg9inewmFVDNkg3l5LUhoq9kN6iWYB/CC9YMG8HA+c1Q8HwDe6dEX7kErrEVNVBO3fWsVq5iDgtw== +update-browserslist-db@^1.0.13: + version "1.0.13" + resolved "https://registry.npmjs.org/update-browserslist-db/-/update-browserslist-db-1.0.13.tgz" + integrity sha512-xebP81SNcPuNpPP3uzeW1NYXxI3rxyJzF3pD6sH4jE7o/IX+WtSpwnVU+qIsDPyk0d3hmFQ7mjqc6AtV604hbg== + dependencies: + escalade "^3.1.1" + picocolors "^1.0.0" + uri-js@^4.2.2: version "4.4.1" resolved "https://registry.npmjs.org/uri-js/-/uri-js-4.4.1.tgz" @@ -4699,21 +4841,64 @@ validate-npm-package-license@^3.0.1: spdx-correct "^3.0.0" spdx-expression-parse "^3.0.0" -web-streams-polyfill@4.0.0-beta.3: - version "4.0.0-beta.3" - resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz" - integrity sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug== +watchpack@^2.4.1: + version "2.4.1" + resolved "https://registry.npmjs.org/watchpack/-/watchpack-2.4.1.tgz" + integrity sha512-8wrBCMtVhqcXP2Sup1ctSkga6uc2Bx0IIvKyT7yTFier5AXHooSI+QyQQAtTb7+E0IUCCKyTFmXqdqgum2XWGg== + dependencies: + glob-to-regexp "^0.4.1" + graceful-fs "^4.1.2" web-streams-polyfill@^3.2.1: version "3.3.3" resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-3.3.3.tgz" integrity sha512-d2JWLCivmZYTSIoge9MsgFCZrt571BikcWGYkjC1khllbTeDlGqZ2D8vD8E/lJa8WGWbb7Plm8/XJYV7IJHZZw== +web-streams-polyfill@4.0.0-beta.3: + version "4.0.0-beta.3" + resolved "https://registry.npmjs.org/web-streams-polyfill/-/web-streams-polyfill-4.0.0-beta.3.tgz" + integrity sha512-QW95TCTaHmsYfHDybGMwO5IJIM93I/6vTRk+daHTWFPhwh+C8Cg7j7XyKrwrj8Ib6vYXe0ocYNrmzY4xAAN6ug== + webidl-conversions@^3.0.0: version "3.0.1" resolved "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz" integrity sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ== +webpack-sources@^3.2.3: + version "3.2.3" + resolved "https://registry.npmjs.org/webpack-sources/-/webpack-sources-3.2.3.tgz" + integrity sha512-/DyMEOrDgLKKIG0fmvtz+4dUX/3Ghozwgm6iPp8KRhvn+eQf9+Q7GWxVNMk3+uCPWfdXYC4ExGBckIXdFEfH1w== + +webpack@^5.1.0, webpack@>=1.11.0: + version "5.91.0" + resolved "https://registry.npmjs.org/webpack/-/webpack-5.91.0.tgz" + integrity sha512-rzVwlLeBWHJbmgTC/8TvAcu5vpJNII+MelQpylD4jNERPwpBJOE2lEcko1zJX3QJeLjTTAnQxn/OJ8bjDzVQaw== + dependencies: + "@types/eslint-scope" "^3.7.3" + "@types/estree" "^1.0.5" + "@webassemblyjs/ast" "^1.12.1" + "@webassemblyjs/wasm-edit" "^1.12.1" + "@webassemblyjs/wasm-parser" "^1.12.1" + acorn "^8.7.1" + acorn-import-assertions "^1.9.0" + browserslist "^4.21.10" + chrome-trace-event "^1.0.2" + enhanced-resolve "^5.16.0" + es-module-lexer "^1.2.1" + eslint-scope "5.1.1" + events "^3.2.0" + glob-to-regexp "^0.4.1" + graceful-fs "^4.2.11" + json-parse-even-better-errors "^2.3.1" + loader-runner "^4.2.0" + mime-types "^2.1.27" + neo-async "^2.6.2" + schema-utils "^3.2.0" + tapable "^2.1.1" + terser-webpack-plugin "^5.3.10" + watchpack "^2.4.1" + webpack-sources "^3.2.3" + whatwg-url@^5.0.0: version "5.0.0" resolved "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz" @@ -4756,35 +4941,35 @@ wordwrap@>=0.0.2: resolved "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz" integrity sha512-gvVzJFlPycKc5dZN4yPkP8w7Dc37BtP1yczEneOb4uq34pXZcvrtRTmWV8W+Ume+XCxKgbjM+nevkyFPMybd4Q== -workerd@1.20231030.0: - version "1.20231030.0" - resolved "https://registry.npmjs.org/workerd/-/workerd-1.20231030.0.tgz" - integrity sha512-+FSW+d31f8RrjHanFf/R9A+Z0csf3OtsvzdPmAKuwuZm/5HrBv83cvG9fFeTxl7/nI6irUUXIRF9xcj/NomQzQ== +workerd@1.20240512.0: + version "1.20240512.0" + resolved "https://registry.npmjs.org/workerd/-/workerd-1.20240512.0.tgz" + integrity sha512-VUBmR1PscAPHEE0OF/G2K7/H1gnr9aDWWZzdkIgWfNKkv8dKFCT75H+GJtUHjfwqz3rYCzaNZmatSXOpLGpF8A== optionalDependencies: - "@cloudflare/workerd-darwin-64" "1.20231030.0" - "@cloudflare/workerd-darwin-arm64" "1.20231030.0" - "@cloudflare/workerd-linux-64" "1.20231030.0" - "@cloudflare/workerd-linux-arm64" "1.20231030.0" - "@cloudflare/workerd-windows-64" "1.20231030.0" + "@cloudflare/workerd-darwin-64" "1.20240512.0" + "@cloudflare/workerd-darwin-arm64" "1.20240512.0" + "@cloudflare/workerd-linux-64" "1.20240512.0" + "@cloudflare/workerd-linux-arm64" "1.20240512.0" + "@cloudflare/workerd-windows-64" "1.20240512.0" wrangler@^3.7.0: - version "3.20.0" - resolved "https://registry.npmjs.org/wrangler/-/wrangler-3.20.0.tgz" - integrity sha512-7mg25zJByhBmrfG+CbImSid7JNd5lxGovLA167ndtE8Yrqd3TUukrGWL8o0RCQIm0FUcgl2nCzWArJDShlZVKA== + version "3.57.1" + resolved "https://registry.npmjs.org/wrangler/-/wrangler-3.57.1.tgz" + integrity sha512-M8YnWUwdrb8AFiRePtVnzlDn02OX4osWvdl8oVh6eyZqqkqXYg7lwlYBr14Qj92pMN4JvMBmDZoukkYHvwpJRg== dependencies: - "@cloudflare/kv-asset-handler" "^0.2.0" + "@cloudflare/kv-asset-handler" "0.3.2" "@esbuild-plugins/node-globals-polyfill" "^0.2.3" "@esbuild-plugins/node-modules-polyfill" "^0.2.2" blake3-wasm "^2.1.5" chokidar "^3.5.3" esbuild "0.17.19" - miniflare "3.20231030.4" + miniflare "3.20240512.0" nanoid "^3.3.3" path-to-regexp "^6.2.0" + resolve "^1.22.8" resolve.exports "^2.0.2" selfsigned "^2.0.1" source-map "0.6.1" - source-map-support "0.5.21" xxhash-wasm "^1.0.1" optionalDependencies: fsevents "~2.3.2" @@ -4795,9 +4980,9 @@ wrappy@1: integrity sha512-l4Sp/DRseor9wL6EvV2+TuQn63dMkPjZ/sp9XkghTEbV9KlPS1xUsZ3u7/IQO4wxtcFB4bgpQPRcR3QCvezPcQ== ws@^8.11.0: - version "8.15.1" - resolved "https://registry.npmjs.org/ws/-/ws-8.15.1.tgz" - integrity sha512-W5OZiCjXEmk0yZ66ZN82beM5Sz7l7coYxpRkzS+p9PP+ToQry8szKh+61eNktr7EA9DOwvFGhfC605jDHbP6QQ== + version "8.17.0" + resolved "https://registry.npmjs.org/ws/-/ws-8.17.0.tgz" + integrity sha512-uJq6108EgZMAl20KagGkzCKfMEjxmKvZHG7Tlq0Z6nOky7YF7aq4mOx6xK8TJ/i1LeK4Qus7INktacctDgY8Ow== xo@^0.56.0: version "0.56.0" @@ -4851,7 +5036,7 @@ xxhash-wasm@^1.0.1: resolved "https://registry.npmjs.org/xxhash-wasm/-/xxhash-wasm-1.0.2.tgz" integrity sha512-ibF0Or+FivM9lNrg+HGJfVX8WJqgo+kCLDc4vx6xMeTce7Aj+DLttKbxxRR/gNLSAelRc1omAPlJ77N/Jem07A== -yallist@4.0.0, yallist@^4.0.0: +yallist@^4.0.0, yallist@4.0.0: version "4.0.0" resolved "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz" integrity sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A== @@ -4875,12 +5060,7 @@ youch@^3.2.2: mustache "^4.2.0" stacktracey "^2.1.8" -zod@^3.20.2: - version "3.21.4" - resolved "https://registry.npmjs.org/zod/-/zod-3.21.4.tgz" - integrity sha512-m46AKbrzKVzOzs/DZgVnG5H55N1sv1M8qZU3A8RIKbs3mrACDNeIOeilDymVb2HdmP8uwshOCF4uJ8uM9rCqJw== - -zod@^3.20.6, zod@^3.22.4: +zod@^3.20.2, zod@^3.20.6, zod@^3.22.4: version "3.22.4" resolved "https://registry.npmjs.org/zod/-/zod-3.22.4.tgz" integrity sha512-iC+8Io04lddc+mVqQ9AZ7OQ2MrUKGN+oIQyq1vemgt46jwCwLfhq7/pwnBnNXXXZb8VTVLKwp9EDkx+ryxIWmg==