From 280b8387152719c9dc2a073fe14f1a3217990bdf Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Sat, 12 Jul 2025 19:05:06 -0400 Subject: [PATCH 1/4] error handling with effect --- package-lock.json | 57 ++++++++++++++++++++++++++++- package.json | 7 ++-- src/client/db.ts | 37 +++++++++++++++++++ src/pages/api/albums.ts | 22 +++++------ src/pages/api/artists.ts | 20 +++++----- src/pages/api/events.ts | 2 +- src/pages/api/posts.ts | 22 +++++------ src/pages/api/webhook-contentful.ts | 2 +- tsconfig.json | 3 +- 9 files changed, 133 insertions(+), 39 deletions(-) create mode 100644 src/client/db.ts diff --git a/package-lock.json b/package-lock.json index b6d641e..33e4cdd 100644 --- a/package-lock.json +++ b/package-lock.json @@ -13,7 +13,8 @@ "@contentful/rich-text-html-renderer": "^17.0.0", "@libsql/client": "^0.14.0", "@prisma/client": "^6.8.2", - "contentful": "^11.3.0" + "contentful": "^11.3.0", + "effect": "^3.16.12" }, "devDependencies": { "@architect/architect": "^11.1.0", @@ -3218,6 +3219,12 @@ "node": ">=18.0.0" } }, + "node_modules/@standard-schema/spec": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", + "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "license": "MIT" + }, "node_modules/@types/accepts": { "version": "1.3.7", "resolved": "https://registry.npmjs.org/@types/accepts/-/accepts-1.3.7.tgz", @@ -4640,6 +4647,16 @@ "integrity": "sha512-WMwm9LhRUo+WUaRN+vRuETqG89IgZphVSNkdFgeb6sS/E4OrDIN7t48CAewSHXc6C8lefD8KKfr5vY61brQlow==", "dev": true }, + "node_modules/effect": { + "version": "3.16.12", + "resolved": "https://registry.npmjs.org/effect/-/effect-3.16.12.tgz", + "integrity": "sha512-N39iBk0K71F9nb442TLbTkjl24FLUzuvx2i1I2RsEAQsdAdUTuUoW0vlfUXgkMTUOnYqKnWcFfqw4hK4Pw27hg==", + "license": "MIT", + "dependencies": { + "@standard-schema/spec": "^1.0.0", + "fast-check": "^3.23.1" + } + }, "node_modules/emoji-regex": { "version": "9.2.2", "resolved": "https://registry.npmjs.org/emoji-regex/-/emoji-regex-9.2.2.tgz", @@ -4971,6 +4988,28 @@ "dev": true, "license": "MIT" }, + "node_modules/fast-check": { + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", + "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT", + "dependencies": { + "pure-rand": "^6.1.0" + }, + "engines": { + "node": ">=8.0.0" + } + }, "node_modules/fast-copy": { "version": "2.1.7", "resolved": "https://registry.npmjs.org/fast-copy/-/fast-copy-2.1.7.tgz", @@ -7186,6 +7225,22 @@ "node": ">=8" } }, + "node_modules/pure-rand": { + "version": "6.1.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", + "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "funding": [ + { + "type": "individual", + "url": "https://github.com/sponsors/dubzzz" + }, + { + "type": "opencollective", + "url": "https://opencollective.com/fast-check" + } + ], + "license": "MIT" + }, "node_modules/qs": { "version": "6.13.1", "resolved": "https://registry.npmjs.org/qs/-/qs-6.13.1.tgz", diff --git a/package.json b/package.json index 8db9ea5..877a86e 100644 --- a/package.json +++ b/package.json @@ -13,8 +13,8 @@ "prisma": "prisma", "lint": "eslint && tsc", "dev": "node --env-file=.env ./node_modules/@greenwood/cli/src/bin.js develop", - "build": "greenwood build", - "serve": "npm run build && node --env-file=.env ./node_modules/@greenwood/cli/src/bin.js serve", + "build": "node --env-file=.env ./node_modules/@greenwood/cli/src/bin.js build", + "serve": "node --env-file=.env ./node_modules/@greenwood/cli/src/bin.js serve", "deploy:sandbox": "npm run build && arc sandbox", "deploy:staging": "npm run arc deploy -- --staging", "deploy:prod": "npm run arc deploy -- --production", @@ -25,7 +25,8 @@ "@contentful/rich-text-html-renderer": "^17.0.0", "@libsql/client": "^0.14.0", "@prisma/client": "^6.8.2", - "contentful": "^11.3.0" + "contentful": "^11.3.0", + "effect": "^3.16.12" }, "devDependencies": { "@architect/architect": "^11.1.0", diff --git a/src/client/db.ts b/src/client/db.ts new file mode 100644 index 0000000..5cd6930 --- /dev/null +++ b/src/client/db.ts @@ -0,0 +1,37 @@ +import { createClient } from '@libsql/client/web'; +import type { ResultSet } from '@libsql/client/web'; +import { Effect } from 'effect'; + +type Result = ResultSet | Error; + +const client = createClient({ + url: process.env.DATABASE_URL ?? '', + authToken: process.env.DATABASE_TOKEN +}); + +const db = { + async query(sql: string, args: string[] | []): Promise { + + return Effect.runPromise(Effect.tryPromise({ + try: () => { return client.execute({ sql, args }) }, + catch: (e: unknown) => { + console.error({ e }); + return new Error('DB Error'); + } + })); + } +} + +function unwrapResultAsResponse(result: Result): Response { + const isError = result instanceof Error; + const body = isError + ? result.message + : JSON.stringify(result.rows); + const status = isError ? 500 : 200; + + return new Response(body, { + status, + }) +} + +export { db, unwrapResultAsResponse } \ No newline at end of file diff --git a/src/pages/api/albums.ts b/src/pages/api/albums.ts index 39740cb..f0ce47e 100644 --- a/src/pages/api/albums.ts +++ b/src/pages/api/albums.ts @@ -1,20 +1,20 @@ -import { createClient } from '@libsql/client/web'; +import { db, unwrapResultAsResponse } from '../../client/db.ts'; -export async function handler (request: Request) { +export async function handler (request: Request): Promise { const params = new URLSearchParams(request.url.slice(request.url.indexOf('?'))); const id = params.has('id') ? params.get('id') : null; const artistId = params.has('artistId') ? params.get('artistId') : null; - const client = createClient({ - url: process.env.DATABASE_URL ?? '', - authToken: process.env.DATABASE_TOKEN - }); - const { rows } = id - ? await client.execute({ sql: 'SELECT * FROM albums WHERE id = ?', args: [id] }) + const { query, args } = id + ? { query: 'SELECT * FROM albums WHERE id = ?', args: [id] } : artistId - ? await client.execute({ sql: 'SELECT * FROM albums WHERE artistId = ?', args: [artistId] }) - : await client.execute('SELECT * FROM albums'); + ? { query: 'SELECT * FROM albums WHERE artistId = ?', args: [artistId] } + : { query: 'SELECT * FROM albums', args: [] } + const result = await db.query(query, args); + const response = unwrapResultAsResponse(result); + const { body, status } = response; - return new Response(JSON.stringify(rows), { + return new Response(body, { + status, headers: new Headers({ 'Cache-Control': 'max-age=604800', 'Content-Type': 'application/json', diff --git a/src/pages/api/artists.ts b/src/pages/api/artists.ts index 4bd2dbe..1dd89d6 100644 --- a/src/pages/api/artists.ts +++ b/src/pages/api/artists.ts @@ -1,17 +1,17 @@ -import { createClient } from '@libsql/client/web'; +import { db, unwrapResultAsResponse } from '../../client/db.ts'; -export async function handler (request: Request) { +export async function handler (request: Request): Promise { const params = new URLSearchParams(request.url.slice(request.url.indexOf('?'))); const id = params.has('id') ? params.get('id') : null; - const client = createClient({ - url: process.env.DATABASE_URL ?? '', - authToken: process.env.DATABASE_TOKEN - }); - const { rows } = id - ? await client.execute({ sql: 'SELECT * FROM artists WHERE id = ?', args: [id] }) - : await client.execute('SELECT * FROM artists'); + const { query, args } = id + ? { query: 'SELECT * FROM artists WHERE id = ?', args: [id] } + : { query: 'SELECT * FROM artists', args: [] } + const result = await db.query(query, args); + const response = unwrapResultAsResponse(result); + const { body, status } = response; - return new Response(JSON.stringify(rows), { + return new Response(body, { + status, headers: new Headers({ 'Cache-Control': 'max-age=604800', 'Content-Type': 'application/json', diff --git a/src/pages/api/events.ts b/src/pages/api/events.ts index 9302b29..bb742ed 100644 --- a/src/pages/api/events.ts +++ b/src/pages/api/events.ts @@ -36,7 +36,7 @@ type EventEntrySkeleton = { fields: EventEntry } -export async function handler (request: Request) { +export async function handler (request: Request): Promise { const client = contentful.createClient({ space: CONTENTFUL_SPACE ?? '', accessToken: CONTENTFUL_ACCESS_TOKEN ?? '' diff --git a/src/pages/api/posts.ts b/src/pages/api/posts.ts index 6def988..af1f24f 100644 --- a/src/pages/api/posts.ts +++ b/src/pages/api/posts.ts @@ -1,17 +1,17 @@ -import { createClient } from '@libsql/client/web'; +import { db, unwrapResultAsResponse } from '../../client/db.ts'; -export async function handler (request: Request) { +export async function handler (request: Request): Promise { const params = new URLSearchParams(request.url.slice(request.url.indexOf('?'))); - const id = params.has('id') ?? null; - const client = createClient({ - url: process.env.DATABASE_URL ?? '', - authToken: process.env.DATABASE_TOKEN - }); - const { rows } = id - ? await client.execute({ sql: 'SELECT * FROM posts WHERE id = ?', args: [id] }) - : await client.execute('SELECT * FROM posts'); + const id = params.has('id') ? params.get('id') : null; + const { query, args } = id + ? { query: 'SELECT * FROM posts WHERE id = ?', args: [id] } + : { query: 'SELECT * FROM posts', args: [] } + const result = await db.query(query, args); + const response = unwrapResultAsResponse(result); + const { body, status } = response; - return new Response(JSON.stringify(rows), { + return new Response(body, { + status, headers: new Headers({ 'Cache-Control': 'max-age=604800', 'Content-Type': 'application/json', diff --git a/src/pages/api/webhook-contentful.ts b/src/pages/api/webhook-contentful.ts index a2cf44a..e045a4f 100644 --- a/src/pages/api/webhook-contentful.ts +++ b/src/pages/api/webhook-contentful.ts @@ -18,7 +18,7 @@ const CONFIG = { distributionId: process.env.AWS_CLOUDFRONT_ID }; -export async function handler (request: Request) { +export async function handler (request: Request): Promise { const cfClient = new AWS.CloudFront(CONFIG); const body = await request.json(); const headers = request.headers; diff --git a/tsconfig.json b/tsconfig.json index c28ba8e..f9d4a01 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -7,7 +7,8 @@ "erasableSyntaxOnly": true, "verbatimModuleSyntax": true, "noImplicitAny": true, - "noEmit": true + "noEmit": true, + "strict": true }, "include": [ "./src/**/*.ts" From a6957c79be3025b2b59f1d33b875531bd63811f6 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Tue, 7 Apr 2026 21:03:57 -0400 Subject: [PATCH 2/4] feat: tweak typescript settings --- tsconfig.json | 3 --- 1 file changed, 3 deletions(-) diff --git a/tsconfig.json b/tsconfig.json index f9d4a01..04e1090 100644 --- a/tsconfig.json +++ b/tsconfig.json @@ -10,9 +10,6 @@ "noEmit": true, "strict": true }, - "include": [ - "./src/**/*.ts" - ], "exclude": [ "./public/", "./greenwood/" From 246d6b5b9fd61fa34f5e97892b98de0c558f8db2 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 8 Apr 2026 22:20:01 -0400 Subject: [PATCH 3/4] feat: make DB not side-effectful during builds --- package.json | 2 +- src/client/db.ts | 16 ++++++++++++---- 2 files changed, 13 insertions(+), 5 deletions(-) diff --git a/package.json b/package.json index 877a86e..7a51dce 100644 --- a/package.json +++ b/package.json @@ -13,7 +13,7 @@ "prisma": "prisma", "lint": "eslint && tsc", "dev": "node --env-file=.env ./node_modules/@greenwood/cli/src/bin.js develop", - "build": "node --env-file=.env ./node_modules/@greenwood/cli/src/bin.js build", + "build": "greenwood build", "serve": "node --env-file=.env ./node_modules/@greenwood/cli/src/bin.js serve", "deploy:sandbox": "npm run build && arc sandbox", "deploy:staging": "npm run arc deploy -- --staging", diff --git a/src/client/db.ts b/src/client/db.ts index 5cd6930..7d42cc0 100644 --- a/src/client/db.ts +++ b/src/client/db.ts @@ -4,10 +4,18 @@ import { Effect } from 'effect'; type Result = ResultSet | Error; -const client = createClient({ - url: process.env.DATABASE_URL ?? '', - authToken: process.env.DATABASE_TOKEN -}); +let client: ReturnType; + +// TODO: fix this upstream in Greenwood +// https://github.com/AnalogStudiosRI/api/issues/64 +if(process.env.DATABASE_URL === undefined || process.env.DATABASE_TOKEN === undefined) { + console.warn('*** DATABASE_URL and DATABASE_TOKEN must both be defined ***'); +} else { + client = createClient({ + url: process.env.DATABASE_URL, + authToken: process.env.DATABASE_TOKEN + }); +} const db = { async query(sql: string, args: string[] | []): Promise { From 227bb5acf352a579969bea2dfc208d7493ae0c95 Mon Sep 17 00:00:00 2001 From: Owen Buckley Date: Wed, 8 Apr 2026 22:25:01 -0400 Subject: [PATCH 4/4] feat: effect v4 beta --- package-lock.json | 227 ++++++++++++++++++++++++++++++++++++++++++---- package.json | 2 +- 2 files changed, 211 insertions(+), 18 deletions(-) diff --git a/package-lock.json b/package-lock.json index 33e4cdd..a0a5690 100644 --- a/package-lock.json +++ b/package-lock.json @@ -14,7 +14,7 @@ "@libsql/client": "^0.14.0", "@prisma/client": "^6.8.2", "contentful": "^11.3.0", - "effect": "^3.16.12" + "effect": "^4.0.0-beta.43" }, "devDependencies": { "@architect/architect": "^11.1.0", @@ -2147,6 +2147,84 @@ "win32" ] }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-arm64/-/msgpackr-extract-darwin-arm64-3.0.3.tgz", + "integrity": "sha512-QZHtlVgbAdy2zAqNA9Gu1UpIuI8Xvsd1v8ic6B2pZmeFnFcMWiPLfWXh7TVw4eGEZ/C9TH281KwhVoeQUKbyjw==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-darwin-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-darwin-x64/-/msgpackr-extract-darwin-x64-3.0.3.tgz", + "integrity": "sha512-mdzd3AVzYKuUmiWOQ8GNhl64/IoFGol569zNRdkLReh6LRLHOXxU4U8eq0JwaD8iFHdVGqSy4IjFL4reoWCDFw==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm/-/msgpackr-extract-linux-arm-3.0.3.tgz", + "integrity": "sha512-fg0uy/dG/nZEXfYilKoRe7yALaNmHoYeIoJuJ7KJ+YyU2bvY8vPv27f7UKhGRpY6euFYqEVhxCFZgAUNQBM3nw==", + "cpu": [ + "arm" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-arm64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-arm64/-/msgpackr-extract-linux-arm64-3.0.3.tgz", + "integrity": "sha512-YxQL+ax0XqBJDZiKimS2XQaf+2wDGVa1enVRGzEvLLVFeqa5kx2bWbtcSXgsxjQB7nRqqIGFIcLteF/sHeVtQg==", + "cpu": [ + "arm64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-linux-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-linux-x64/-/msgpackr-extract-linux-x64-3.0.3.tgz", + "integrity": "sha512-cvwNfbP07pKUfq1uH+S6KJ7dT9K8WOE4ZiAcsrSes+UY55E/0jLYc+vq+DO7jlmqRb5zAggExKm0H7O/CBaesg==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "linux" + ] + }, + "node_modules/@msgpackr-extract/msgpackr-extract-win32-x64": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@msgpackr-extract/msgpackr-extract-win32-x64/-/msgpackr-extract-win32-x64-3.0.3.tgz", + "integrity": "sha512-x0fWaQtYp4E6sktbsdAqnehxDgEc/VwM7uLsRCYWaiGu0ykYdZPiS8zCWdnjHwyiumousxfBm4SO31eXqwEZhQ==", + "cpu": [ + "x64" + ], + "license": "MIT", + "optional": true, + "os": [ + "win32" + ] + }, "node_modules/@neon-rs/load": { "version": "0.0.4", "resolved": "https://registry.npmjs.org/@neon-rs/load/-/load-0.0.4.tgz", @@ -3220,9 +3298,9 @@ } }, "node_modules/@standard-schema/spec": { - "version": "1.0.0", - "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.0.0.tgz", - "integrity": "sha512-m2bOd0f2RT9k8QJx1JN85cZYyH1RqFBdlwtkSlf4tBDYLCiiZnv1fIIwacK6cqwXavOydf0NPToMQgpKq+dVlA==", + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/@standard-schema/spec/-/spec-1.1.0.tgz", + "integrity": "sha512-l2aFy5jALhniG5HgqrD6jXLi/rUWrKvqN/qJx6yoJsgKhblVd+iqqU4RCXavm/jPityDo5TCvKMnpjKnOriy0w==", "license": "MIT" }, "node_modules/@types/accepts": { @@ -4648,13 +4726,43 @@ "dev": true }, "node_modules/effect": { - "version": "3.16.12", - "resolved": "https://registry.npmjs.org/effect/-/effect-3.16.12.tgz", - "integrity": "sha512-N39iBk0K71F9nb442TLbTkjl24FLUzuvx2i1I2RsEAQsdAdUTuUoW0vlfUXgkMTUOnYqKnWcFfqw4hK4Pw27hg==", + "version": "4.0.0-beta.43", + "resolved": "https://registry.npmjs.org/effect/-/effect-4.0.0-beta.43.tgz", + "integrity": "sha512-AJYyDimIwJOn87uUz/JzmgDc5GfjxJbXvEbTvNzMa+M3Uer344bLo/O5mMRkqc1vBleA+Ygs4+dbE3QsqOkKTQ==", "license": "MIT", "dependencies": { - "@standard-schema/spec": "^1.0.0", - "fast-check": "^3.23.1" + "@standard-schema/spec": "^1.1.0", + "fast-check": "^4.5.3", + "find-my-way-ts": "^0.1.6", + "ini": "^6.0.0", + "kubernetes-types": "^1.30.0", + "msgpackr": "^1.11.8", + "multipasta": "^0.2.7", + "toml": "^3.0.0", + "uuid": "^13.0.0", + "yaml": "^2.8.2" + } + }, + "node_modules/effect/node_modules/ini": { + "version": "6.0.0", + "resolved": "https://registry.npmjs.org/ini/-/ini-6.0.0.tgz", + "integrity": "sha512-IBTdIkzZNOpqm7q3dRqJvMaldXjDHWkEDfrwGEQTs5eaQMWV+djAhR+wahyNNMAa+qpbDUhBMVt4ZKNwpPm7xQ==", + "license": "ISC", + "engines": { + "node": "^20.17.0 || >=22.9.0" + } + }, + "node_modules/effect/node_modules/uuid": { + "version": "13.0.0", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-13.0.0.tgz", + "integrity": "sha512-XQegIaBTVUjSHliKqcnFqYypAd4S+WCYt5NIeRs6w/UAry7z8Y9j5ZwRRL4kzq9U3sD6v+85er9FvkEaBpji2w==", + "funding": [ + "https://github.com/sponsors/broofa", + "https://github.com/sponsors/ctavan" + ], + "license": "MIT", + "bin": { + "uuid": "dist-node/bin/uuid" } }, "node_modules/emoji-regex": { @@ -4989,9 +5097,9 @@ "license": "MIT" }, "node_modules/fast-check": { - "version": "3.23.2", - "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-3.23.2.tgz", - "integrity": "sha512-h5+1OzzfCC3Ef7VbtKdcv7zsstUQwUDlYpUTvjeUsJAssPgLn7QzbboPtL5ro04Mq0rPOsMzl7q5hIbRs2wD1A==", + "version": "4.6.0", + "resolved": "https://registry.npmjs.org/fast-check/-/fast-check-4.6.0.tgz", + "integrity": "sha512-h7H6Dm0Fy+H4ciQYFxFjXnXkzR2kr9Fb22c0UBpHnm59K2zpr2t13aPTHlltFiNT6zuxp6HMPAVVvgur4BLdpA==", "funding": [ { "type": "individual", @@ -5004,10 +5112,10 @@ ], "license": "MIT", "dependencies": { - "pure-rand": "^6.1.0" + "pure-rand": "^8.0.0" }, "engines": { - "node": ">=8.0.0" + "node": ">=12.17.0" } }, "node_modules/fast-copy": { @@ -5165,6 +5273,12 @@ "node": ">= 0.8" } }, + "node_modules/find-my-way-ts": { + "version": "0.1.6", + "resolved": "https://registry.npmjs.org/find-my-way-ts/-/find-my-way-ts-0.1.6.tgz", + "integrity": "sha512-a85L9ZoXtNAey3Y6Z+eBWW658kO/MwR7zIafkIUPUMf3isZG0NCs2pjW2wtjxAKuJPxMAsHUIP4ZPGv0o5gyTA==", + "license": "MIT" + }, "node_modules/find-up": { "version": "5.0.0", "resolved": "https://registry.npmjs.org/find-up/-/find-up-5.0.0.tgz", @@ -6259,6 +6373,12 @@ "node": ">= 0.6" } }, + "node_modules/kubernetes-types": { + "version": "1.30.0", + "resolved": "https://registry.npmjs.org/kubernetes-types/-/kubernetes-types-1.30.0.tgz", + "integrity": "sha512-Dew1okvhM/SQcIa2rcgujNndZwU8VnSapDgdxlYoB84ZlpAD43U6KLAFqYo17ykSFGHNPrg0qry0bP+GJd9v7Q==", + "license": "Apache-2.0" + }, "node_modules/lambda-runtimes": { "version": "2.0.5", "resolved": "https://registry.npmjs.org/lambda-runtimes/-/lambda-runtimes-2.0.5.tgz", @@ -6751,6 +6871,43 @@ "integrity": "sha512-6FlzubTLZG3J2a/NVCAleEhjzq5oxgHyaCU9yYXvcLsvoVaHJq/s5xXI6/XXP6tz7R9xAOtHnSO/tXtF3WRTlA==", "dev": true }, + "node_modules/msgpackr": { + "version": "1.11.9", + "resolved": "https://registry.npmjs.org/msgpackr/-/msgpackr-1.11.9.tgz", + "integrity": "sha512-FkoAAyyA6HM8wL882EcEyFZ9s7hVADSwG9xrVx3dxxNQAtgADTrJoEWivID82Iv1zWDsv/OtbrrcZAzGzOMdNw==", + "license": "MIT", + "optionalDependencies": { + "msgpackr-extract": "^3.0.2" + } + }, + "node_modules/msgpackr-extract": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/msgpackr-extract/-/msgpackr-extract-3.0.3.tgz", + "integrity": "sha512-P0efT1C9jIdVRefqjzOQ9Xml57zpOXnIuS+csaB4MdZbTdmGDLo8XhzBG1N7aO11gKDDkJvBLULeFTo46wwreA==", + "hasInstallScript": true, + "license": "MIT", + "optional": true, + "dependencies": { + "node-gyp-build-optional-packages": "5.2.2" + }, + "bin": { + "download-msgpackr-prebuilds": "bin/download-prebuilds.js" + }, + "optionalDependencies": { + "@msgpackr-extract/msgpackr-extract-darwin-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-darwin-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-arm64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-linux-x64": "3.0.3", + "@msgpackr-extract/msgpackr-extract-win32-x64": "3.0.3" + } + }, + "node_modules/multipasta": { + "version": "0.2.7", + "resolved": "https://registry.npmjs.org/multipasta/-/multipasta-0.2.7.tgz", + "integrity": "sha512-KPA58d68KgGil15oDqXjkUBEBYc00XvbPj5/X+dyzeo/lWm9Nc25pQRlf1D+gv4OpK7NM0J1odrbu9JNNGvynA==", + "license": "MIT" + }, "node_modules/mz": { "version": "2.7.0", "resolved": "https://registry.npmjs.org/mz/-/mz-2.7.0.tgz", @@ -6837,6 +6994,21 @@ "node-gyp-build-test": "build-test.js" } }, + "node_modules/node-gyp-build-optional-packages": { + "version": "5.2.2", + "resolved": "https://registry.npmjs.org/node-gyp-build-optional-packages/-/node-gyp-build-optional-packages-5.2.2.tgz", + "integrity": "sha512-s+w+rBWnpTMwSFbaE0UXsRlg7hU4FjekKU4eyAih5T8nJuNZT1nNsskXpxmeqSK9UzkBl6UgRlnKc8hz8IEqOw==", + "license": "MIT", + "optional": true, + "dependencies": { + "detect-libc": "^2.0.1" + }, + "bin": { + "node-gyp-build-optional-packages": "bin.js", + "node-gyp-build-optional-packages-optional": "optional.js", + "node-gyp-build-optional-packages-test": "build-test.js" + } + }, "node_modules/node-html-parser": { "version": "7.0.1", "resolved": "https://registry.npmjs.org/node-html-parser/-/node-html-parser-7.0.1.tgz", @@ -7226,9 +7398,9 @@ } }, "node_modules/pure-rand": { - "version": "6.1.0", - "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-6.1.0.tgz", - "integrity": "sha512-bVWawvoZoBYpp6yIoQtQXHZjmz35RSVHnUOTefl8Vcjr8snTPY1wnpSPMWekcFwbxI6gtmT7rSYPFvz71ldiOA==", + "version": "8.4.0", + "resolved": "https://registry.npmjs.org/pure-rand/-/pure-rand-8.4.0.tgz", + "integrity": "sha512-IoM8YF/jY0hiugFo/wOWqfmarlE6J0wc6fDK1PhftMk7MGhVZl88sZimmqBBFomLOCSmcCCpsfj7wXASCpvK9A==", "funding": [ { "type": "individual", @@ -8211,6 +8383,12 @@ "node": ">=0.6" } }, + "node_modules/toml": { + "version": "3.0.0", + "resolved": "https://registry.npmjs.org/toml/-/toml-3.0.0.tgz", + "integrity": "sha512-y/mWCZinnvxjTKYhJ+pYxwD0mRLVvOtdS2Awbgxln6iEnt4rk0yBxeSBHkGJcPucRiG0e55mwWp+g/05rsrd6w==", + "license": "MIT" + }, "node_modules/tr46": { "version": "0.0.3", "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", @@ -8698,6 +8876,21 @@ "node": ">=0.4" } }, + "node_modules/yaml": { + "version": "2.8.3", + "resolved": "https://registry.npmjs.org/yaml/-/yaml-2.8.3.tgz", + "integrity": "sha512-AvbaCLOO2Otw/lW5bmh9d/WEdcDFdQp2Z2ZUH3pX9U2ihyUY0nvLv7J6TrWowklRGPYbB/IuIMfYgxaCPg5Bpg==", + "license": "ISC", + "bin": { + "yaml": "bin.mjs" + }, + "engines": { + "node": ">= 14.6" + }, + "funding": { + "url": "https://github.com/sponsors/eemeli" + } + }, "node_modules/yazl": { "version": "2.5.1", "resolved": "https://registry.npmjs.org/yazl/-/yazl-2.5.1.tgz", diff --git a/package.json b/package.json index 7a51dce..37dc66b 100644 --- a/package.json +++ b/package.json @@ -26,7 +26,7 @@ "@libsql/client": "^0.14.0", "@prisma/client": "^6.8.2", "contentful": "^11.3.0", - "effect": "^3.16.12" + "effect": "^4.0.0-beta.43" }, "devDependencies": { "@architect/architect": "^11.1.0",