diff --git a/package.json b/package.json index 5d3c1af2681..6e8eecc1d95 100644 --- a/package.json +++ b/package.json @@ -40,7 +40,6 @@ "@changesets/cli": "^2.29.4", "@edge-runtime/vm": "^5.0.0", "@effect/build-utils": "^0.8.3", - "@effect/docgen": "https://pkg.pr.new/Effect-TS/docgen/@effect/docgen@fd06738", "@effect/eslint-plugin": "^0.3.2", "@effect/language-service": "^0.23.3", "@effect/vitest": "workspace:^", diff --git a/packages/platform/src/HttpServerRequest.ts b/packages/platform/src/HttpServerRequest.ts index e1baa19ba12..e87cf964672 100644 --- a/packages/platform/src/HttpServerRequest.ts +++ b/packages/platform/src/HttpServerRequest.ts @@ -236,3 +236,9 @@ export const fromWeb: (request: Request) => HttpServerRequest = internal.fromWeb * @category conversions */ export const toURL: (self: HttpServerRequest) => Option = internal.toURL + +/** + * @since 1.0.0 + * @category conversions + */ +export const toWeb: (self: HttpServerRequest) => Request = internal.toWeb diff --git a/packages/platform/src/internal/httpServerRequest.ts b/packages/platform/src/internal/httpServerRequest.ts index f87a54f703d..774405fdabc 100644 --- a/packages/platform/src/internal/httpServerRequest.ts +++ b/packages/platform/src/internal/httpServerRequest.ts @@ -370,3 +370,38 @@ export const toURL = (self: ServerRequest.HttpServerRequest): Option.Option return Option.none() } } + +/** @internal */ +export const toWeb = (self: ServerRequest.HttpServerRequest): globalThis.Request => { + // Check if the request is a ServerRequestImpl wrapping a global Request + if ( + typeof globalThis.Request !== "undefined" && + self.source != null && + self.source instanceof globalThis.Request + ) { + return self.source + } + + // Reconstruct a new Request for non-wrapping implementations + // Determine the URL to use + let url: string + const urlOption = toURL(self) + if (Option.isSome(urlOption)) { + url = urlOption.value.href + } else { + url = self.originalUrl || self.url || "/" + } + + // Prepare RequestInit options + const init: RequestInit = { + method: self.method, + // Headers type in platform is ReadonlyRecord + // which is compatible with HeadersInit + headers: self.headers as HeadersInit + // Body is intentionally omitted for non-wrapping implementations + // to keep this synchronous and simple + } + + // Create and return the Request + return new globalThis.Request(url, init) +} diff --git a/packages/platform/test/HttpServerRequest.toWeb.test.ts b/packages/platform/test/HttpServerRequest.toWeb.test.ts new file mode 100644 index 00000000000..70805eab4ba --- /dev/null +++ b/packages/platform/test/HttpServerRequest.toWeb.test.ts @@ -0,0 +1,145 @@ +import * as Headers from "@effect/platform/Headers" +import * as IncomingMessage from "@effect/platform/HttpIncomingMessage" +import * as HttpServerRequest from "@effect/platform/HttpServerRequest" +import { describe, it } from "@effect/vitest" +import { strictEqual } from "@effect/vitest/utils" + +describe("HttpServerRequest.toWeb", () => { + it("round-trip identity for wrapped requests", () => { + // Create a global Request with url/method/body/headers + const originalRequest = new Request("https://example.com/api/users", { + method: "POST", + headers: { + "Content-Type": "application/json", + "Authorization": "Bearer token123" + }, + body: JSON.stringify({ name: "test" }) + }) + + // Call fromWeb to obtain HttpServerRequest + const httpRequest = HttpServerRequest.fromWeb(originalRequest) + + // Call toWeb and assert the returned object is strictly equal to the original Request + const resultRequest = HttpServerRequest.toWeb(httpRequest) + + strictEqual(resultRequest, originalRequest, "toWeb should return the exact same Request object") + }) + + it("reconstructs URL/method/headers for non-wrapped implementation", () => { + // Create a minimal stub object implementing HttpServerRequest + // that does not wrap a source Request + const stubRequest = { + [HttpServerRequest.TypeId]: HttpServerRequest.TypeId, + [IncomingMessage.TypeId]: IncomingMessage.TypeId, + source: { custom: "source" }, // Not a Request instance + url: "/api/users", + originalUrl: "/api/users", + method: "GET", + headers: Headers.fromInput({ + "host": "example.com", + "content-type": "application/json", + "x-custom-header": "custom-value" + }), + cookies: {}, + remoteAddress: undefined as any, + multipart: undefined as any, + multipartStream: undefined as any, + upgrade: undefined as any, + modify: undefined as any, + stream: undefined as any, + text: undefined as any, + json: undefined as any, + urlParamsBody: undefined as any, + arrayBuffer: undefined as any + } as HttpServerRequest.HttpServerRequest + + // Call toWeb(stub) and assert the returned Request has expected properties + const resultRequest = HttpServerRequest.toWeb(stubRequest) + + // Check that we got a Request object + strictEqual(resultRequest instanceof Request, true, "toWeb should return a Request instance") + + // Check method + strictEqual(resultRequest.method, "GET", "Request method should match") + + // Check URL - should be reconstructed from stub data + const resultUrl = new URL(resultRequest.url) + strictEqual(resultUrl.protocol, "http:", "Should default to http protocol") + strictEqual(resultUrl.hostname, "example.com", "Should use host from headers") + strictEqual(resultUrl.pathname, "/api/users", "Should use pathname from stub.url") + + // Check headers + strictEqual( + resultRequest.headers.get("content-type"), + "application/json", + "Should preserve content-type header" + ) + strictEqual( + resultRequest.headers.get("x-custom-header"), + "custom-value", + "Should preserve custom headers" + ) + }) + + it("reconstructs with https protocol when x-forwarded-proto header is present", () => { + const stubRequest = { + [HttpServerRequest.TypeId]: HttpServerRequest.TypeId, + [IncomingMessage.TypeId]: IncomingMessage.TypeId, + source: { custom: "source" }, + url: "/secure/path", + originalUrl: "/secure/path", + method: "POST", + headers: Headers.fromInput({ + "host": "secure.example.com", + "x-forwarded-proto": "https", + "content-type": "text/plain" + }), + cookies: {}, + remoteAddress: undefined as any, + multipart: undefined as any, + multipartStream: undefined as any, + upgrade: undefined as any, + modify: undefined as any, + stream: undefined as any, + text: undefined as any, + json: undefined as any, + urlParamsBody: undefined as any, + arrayBuffer: undefined as any + } as HttpServerRequest.HttpServerRequest + + const resultRequest = HttpServerRequest.toWeb(stubRequest) + const resultUrl = new URL(resultRequest.url) + + strictEqual(resultUrl.protocol, "https:", "Should use https when x-forwarded-proto is https") + strictEqual(resultUrl.hostname, "secure.example.com", "Should use host from headers") + strictEqual(resultUrl.pathname, "/secure/path", "Should preserve the path") + }) + + it("handles missing host header gracefully", () => { + const stubRequest = { + [HttpServerRequest.TypeId]: HttpServerRequest.TypeId, + [IncomingMessage.TypeId]: IncomingMessage.TypeId, + source: {}, + url: "/path", + originalUrl: "/path", + method: "GET", + headers: Headers.empty, + cookies: {}, + remoteAddress: undefined as any, + multipart: undefined as any, + multipartStream: undefined as any, + upgrade: undefined as any, + modify: undefined as any, + stream: undefined as any, + text: undefined as any, + json: undefined as any, + urlParamsBody: undefined as any, + arrayBuffer: undefined as any + } as HttpServerRequest.HttpServerRequest + + const resultRequest = HttpServerRequest.toWeb(stubRequest) + const resultUrl = new URL(resultRequest.url) + + strictEqual(resultUrl.hostname, "localhost", "Should default to localhost when host is missing") + }) +}) diff --git a/pnpm-lock.yaml b/pnpm-lock.yaml index 4ac65f6fd4d..2b643d86f3f 100644 --- a/pnpm-lock.yaml +++ b/pnpm-lock.yaml @@ -52,9 +52,6 @@ importers: '@effect/build-utils': specifier: ^0.8.3 version: 0.8.8 - '@effect/docgen': - specifier: https://pkg.pr.new/Effect-TS/docgen/@effect/docgen@fd06738 - version: https://pkg.pr.new/Effect-TS/docgen/@effect/docgen@fd06738(tsx@4.20.3)(typescript@5.8.3) '@effect/eslint-plugin': specifier: ^0.3.2 version: 0.3.2 @@ -1646,26 +1643,12 @@ packages: engines: {node: '>=16.17.1'} hasBin: true - '@effect/docgen@https://pkg.pr.new/Effect-TS/docgen/@effect/docgen@fd06738': - resolution: {tarball: https://pkg.pr.new/Effect-TS/docgen/@effect/docgen@fd06738} - version: 0.5.2 - engines: {node: '>=18.0.0'} - hasBin: true - peerDependencies: - tsx: ^4.19.3 - typescript: ^5.8.2 - '@effect/eslint-plugin@0.3.2': resolution: {integrity: sha512-c4Vs9t3r54A4Zpl+wo8+PGzZz3JWYsip41H+UrebRLjQ2Hk/ap63IeCgN/HWcYtxtyhRopjp7gW9nOQ2Snbl+g==} '@effect/language-service@0.23.5': resolution: {integrity: sha512-aQN24eziWuqK/EdFhhZ2Jr/CZgYxNfsP9r7DT7jCYgJWhZ8HPO39hyHcij14cMv41ZM8j0p8lmBnHYZwYN1Wyg==} - '@effect/markdown-toc@0.1.0': - resolution: {integrity: sha512-IRfvvwqQLabVTIw9hhIj4scOGIYPfa13QuEFv+dBWE6p47R+RR0J8jQvfDINFf0Vn80XXVjNRtZxkZpkKXLx2A==} - engines: {node: '>=0.10.0'} - hasBin: true - '@effect/wa-sqlite@0.1.2': resolution: {integrity: sha512-2JvJ9BDkBOwfeY/gXsC0XwEKC0AwisP2W5ABJ6mx14QyXTK12MGDIybDlHieuZt1TEFSMiKfpg7yyqyRWRooJQ==} @@ -3255,9 +3238,6 @@ packages: async@3.2.6: resolution: {integrity: sha512-htCUDlxyyCLMgaM3xXg0C0LW2xqfuQ6p05pCEIsXuyQ+a1koYKTuBMzRNwmybfLgvJDMd0r1LTn4+E0Ti6C2AA==} - autolinker@0.28.1: - resolution: {integrity: sha512-zQAFO1Dlsn69eXaO6+7YZc+v84aquQKbwpzCE3L0stj56ERn9hutFxPopViLjo9G+rWwjozRhgS5KJ25Xy19cQ==} - available-typed-arrays@1.0.7: resolution: {integrity: sha512-wvUjBtSGN7+7SjNpq/9M2Tg350UZD3q62IFZLbRAR1bSMlCo1ZaeW+BJ+D090e4hIIZLBcTDWe4Mh4jvUDajzQ==} engines: {node: '>= 0.4'} @@ -3586,13 +3566,6 @@ packages: concat-map@0.0.1: resolution: {integrity: sha512-/Srv4dswyQNBfohGpz9o6Yb3Gz3SrUDqBH5rTuhGR7ahtlbYKnVxw2bCFMRljaA7EXHaXZ8wsHdodFvbkhKmqg==} - concat-stream@1.6.2: - resolution: {integrity: sha512-27HBghJxjiZtIk3Ycvn/4kbJk/1uZuJFfuPEns6LaEvpvG1f0hTea8lilrouyo9mVc2GWdcEZ8OLoGmSADlrCw==} - engines: {'0': node >= 0.8} - - concat-with-sourcemaps@1.1.0: - resolution: {integrity: sha512-4gEjHJFT9e+2W/77h/DS5SGUgwDaOwprX8L/gl5+3ixnzkVJJsZWDSelmN3Oilw3LNDZjZV0yqH1hLG3k6nghg==} - connect@3.7.0: resolution: {integrity: sha512-ZqRXc+tZukToSNmh5C2iWMSoV3X1YUcPbqEM4DkEG5tNQXrQUZCNVGGv3IuicnkMtPfGf3Xtp8WCXs295iQ1pQ==} engines: {node: '>= 0.10.0'} @@ -3799,10 +3772,6 @@ packages: resolution: {integrity: sha512-ARFxjzizOhPqs1fYC/2NMC3N4jrQ6HvVflnXBTRqNEqJuXwyKLRr9CrJwkRcV/SnZt1sNXgsF6FPm0x57Tq0rw==} engines: {node: ^14.14.0 || >=16.0.0} - diacritics-map@0.1.0: - resolution: {integrity: sha512-3omnDTYrGigU0i4cJjvaKwD52B8aoqyX/NEIkukFFkogBemsIbhSa1O414fpTp5nuszJG6lvQ5vBvDVNCbSsaQ==} - engines: {node: '>=0.8.0'} - diff-sequences@29.6.3: resolution: {integrity: sha512-EjePK1srD3P08o2j4f0ExnylqRs5B9tJjcp9t1krH2qRi8CCdsYfwe9JgSLurFBWwq4uOlipzfk5fHNvwFKr8Q==} engines: {node: ^14.15.0 || ^16.10.0 || >=18.0.0} @@ -3827,10 +3796,6 @@ packages: resolution: {integrity: sha512-35mSku4ZXK0vfCuHEDAwt55dg2jNajHZ1odvF+8SSr82EsZY4QmXfuWso8oEd8zRhVObSN18aM0CjSdoBX7zIw==} engines: {node: '>=0.10.0'} - doctrine@3.0.0: - resolution: {integrity: sha512-yS+Q5i3hBf7GBkd4KG8a7eBNNWNGLTaEwwYWUijIYM7zrlYDM0BFXHjjPWlWZ1Rg7UaddZeIDmi9jF3HmqiQ2w==} - engines: {node: '>=6.0.0'} - dom-accessibility-api@0.5.16: resolution: {integrity: sha512-X7BJ2yElsnOJ30pZF4uIIDfBEVgF4XEBxL9Bxhy6dnrm5hkzqmsWHGTiHqRiITNhMyFLyAiWndIJP7Z1NTteDg==} @@ -4201,10 +4166,6 @@ packages: resolution: {integrity: sha512-eNTPlAD67BmP31LDINZ3U7HSF8l57TxOY2PmBJ1shpCvpnxBF93mWCE8YHBnXs8qiUZJc9WDcWIeC3a2HIAMfw==} engines: {node: '>=6'} - expand-range@1.8.2: - resolution: {integrity: sha512-AFASGfIlnIbkKPQwX1yHaDjFvh/1gyKJODme52V6IORh69uEYgZp0o9C+qsIGNVEiuuhQU0CSSl++Rlegg1qvA==} - engines: {node: '>=0.10.0'} - expand-template@2.0.3: resolution: {integrity: sha512-XYfuKMvj4O35f/pOXLObndIRvyQ+/+6AhODh+OKWj9S9498pHHn/IMszH+gt0fBCRWMNfk1ZSp5x3AifmnI2vg==} engines: {node: '>=6'} @@ -4220,10 +4181,6 @@ packages: exponential-backoff@3.1.2: resolution: {integrity: sha512-8QxYTVXUkuy7fIIoitQkPwGonB8F3Zj8eEO8Sqg9Zv/bkI7RJAzowee4gr81Hak/dUTpA2Z7VfQgoijjPNlUZA==} - extend-shallow@2.0.1: - resolution: {integrity: sha512-zCnTtlxNoAiDc3gqY2aYAWFx7XWWiasuF2K8Me5WbN8otHKTUKBwjPtNpRs/rbUZm7KxWAaNj7P1a/p52GbVug==} - engines: {node: '>=0.10.0'} - extendable-error@0.1.7: resolution: {integrity: sha512-UOiS2in6/Q0FK0R0q6UY9vYpQ21mr/Qn1KOnte7vsACuNJf514WvCCUHSRCPcgjPT2bAhNIJdlE6bVap1GKmeg==} @@ -4287,10 +4244,6 @@ packages: engines: {node: '>=14'} hasBin: true - fill-range@2.2.4: - resolution: {integrity: sha512-cnrcCbj01+j2gTG921VZPnHbjmdAf8oQV/iGeV2kZxGSyfYjjTyY79ErsK1WJWMpw6DaApEX72binqJE+/d+5Q==} - engines: {node: '>=0.10.0'} - fill-range@7.1.1: resolution: {integrity: sha512-YsGpe3WHLK8ZYi4tWDg2Jy3ebRz2rXowDxnld4bkQB00cc/1Zw9AWnC0i9ztDJitivtQvaI9KaLyKrc+hBW0yg==} engines: {node: '>=8'} @@ -4336,10 +4289,6 @@ packages: resolution: {integrity: sha512-dKx12eRCVIzqCxFGplyFKJMPvLEWgmNtUrpTiJIR5u97zEhRG8ySrtboPHZXx7daLxQVrl643cTzbab2tkQjxg==} engines: {node: '>= 0.4'} - for-in@1.0.2: - resolution: {integrity: sha512-7EwmXrOjyL+ChxMhmG5lnW9MPt1aIeZEwKhQzoBUdTV0N3zuwWDZYVJatDvZ2OyzPUvdIAZDsCetk3coyMfcnQ==} - engines: {node: '>=0.10.0'} - foreground-child@3.3.1: resolution: {integrity: sha512-gIXjKqtFuWEgzFRJA9WCQeSJLZDjgJUOMCMzxtvFq/37KojM1BFGufqsCy0r4qSQmYLsZYMeyRqzIWOMup03sw==} engines: {node: '>=14'} @@ -4494,14 +4443,6 @@ packages: graphemer@1.4.0: resolution: {integrity: sha512-EtKwoO6kxCL9WO5xipiHTZlSzBm7WLT627TqC/uVRd0HKmq8NXyebnNYxDoBi7wt8eTWrUrKXCOVaFq9x1kgag==} - gray-matter@3.1.1: - resolution: {integrity: sha512-nZ1qjLmayEv0/wt3sHig7I0s3/sJO0dkAaKYQ5YAOApUtYEOonXSFdWvL1khvnZMTvov4UufkqlFsilPnejEXA==} - engines: {node: '>=0.10.0'} - - gulp-header@1.8.12: - resolution: {integrity: sha512-lh9HLdb53sC7XIZOYzTXM4lFuXElv3EVkSDhsd7DoJBj7hm+Ni7D3qYbb+Rr8DuM8nRanBvkVO9d7askreXGnQ==} - deprecated: Removed event-stream from gulp-header - happy-dom@17.6.3: resolution: {integrity: sha512-UVIHeVhxmxedbWPCfgS55Jg2rDfwf2BCKeylcPSqazLz5w3Kri7Q4xdBJubsr/+VUzFLh0VjIvh13RaDA2/Xug==} engines: {node: '>=20.0.0'} @@ -4671,9 +4612,6 @@ packages: resolution: {integrity: sha512-wa56o2/ElJMYqjCjGkXri7it5FbebW5usLw/nPmCMs5DeZ7eziSYZhSmPRn0txqeW4LnAmQQU7FgqLpsEFKM4A==} engines: {node: '>= 0.4'} - is-buffer@1.1.6: - resolution: {integrity: sha512-NcdALwpXkTm5Zvvbk7owOUSvVvBKDgKP5/ewfXEznmQFfs4ZRmanOeKBTjRVjka3QFoN6XJ+9F3USqfHqTaU5w==} - is-bun-module@2.0.0: resolution: {integrity: sha512-gNCGbnnnnFAUGKeZ9PdbyeGYJqewpmc2aKHUEMO5nQPWU9lOmv7jcmQIv+qHD8fXW6W7qfuCwX4rY9LNRjXrkQ==} @@ -4710,14 +4648,6 @@ packages: engines: {node: ^12.20.0 || ^14.13.1 || >=16.0.0} hasBin: true - is-extendable@0.1.1: - resolution: {integrity: sha512-5BMULNob1vgFX6EjQw5izWDxrecWK9AM72rugNr0TFldMOi0fj6Jk+zeKIt0xGj4cEfQIJth4w3OKWOJ4f+AFw==} - engines: {node: '>=0.10.0'} - - is-extendable@1.0.1: - resolution: {integrity: sha512-arnXMxT1hhoKo9k1LZdmlNyJdDDfy2v0fXjFlmok4+i8ul/6WlbVge9bhM74OpNPQPMGUToDtz+KXa1PneJxOA==} - engines: {node: '>=0.10.0'} - is-extglob@2.1.1: resolution: {integrity: sha512-SbKbANkN603Vi4jEZv49LeVJMn4yGwsbzZworEoyEiutsN3nJYdbO36zfhGJ6QEDpOZIFkDtnq5JRxmvl3jsoQ==} engines: {node: '>=0.10.0'} @@ -4762,14 +4692,6 @@ packages: resolution: {integrity: sha512-lZhclumE1G6VYD8VHe35wFaIif+CTy5SJIi5+3y4psDgWu4wPDoBhF8NxUOinEc7pHgiTsT6MaBb92rKhhD+Xw==} engines: {node: '>= 0.4'} - is-number@2.1.0: - resolution: {integrity: sha512-QUzH43Gfb9+5yckcrSA0VBDwEtDUchrk4F6tfJZQuNzDJbEDB9cZNzSfXGQ1jqmdDY/kl41lUOWM9syA8z8jlg==} - engines: {node: '>=0.10.0'} - - is-number@4.0.0: - resolution: {integrity: sha512-rSklcAIlf1OmFdyAqbnWTLVelsQ58uvZ66S/ZyawjWqIviTWCjg2PzVGw8WUA+nNuPTqb4wgA+NszrJ+08LlgQ==} - engines: {node: '>=0.10.0'} - is-number@7.0.0: resolution: {integrity: sha512-41Cifkg6e8TylSpdtTpeLVMqvSBEVzTttHvERD741+pnZ8ANv0004MRL43QKPDlK9cGvNp6NZWZUBlbGXYxxng==} engines: {node: '>=0.12.0'} @@ -4868,10 +4790,6 @@ packages: isexe@2.0.0: resolution: {integrity: sha512-RHxMLp9lnKHGHRng9QFhRCMbYAcVpn69smSGcq3f36xjgVVWThj4qqLbTLlq7Ssj8B+fIQ1EuCEGI2lKsyQeIw==} - isobject@2.1.0: - resolution: {integrity: sha512-+OUdGJlgjOBZDfxnDjYYG6zp487z0JGNQq3cYQYg5f5hKR+syHMsaztzGeml/4kGG55CSpKSpWTY+jYGgsHLgA==} - engines: {node: '>=0.10.0'} - isobject@3.0.1: resolution: {integrity: sha512-WhB9zCku7EGTj/HQQRz5aUQEUeoQZH2bWcltRErOpymJ4boYE6wL9Tbr23krRPSZ+C5zqNSrSw+Cc7sZZ4b7vg==} engines: {node: '>=0.10.0'} @@ -5033,14 +4951,6 @@ packages: keyv@4.5.4: resolution: {integrity: sha512-oxVHkHR/EJf2CNXnWxRLW6mg7JyCCUcG0DtEGmL2ctUo1PNTin1PUil+r/+4r5MpVgC/fn1kjsx7mjSujKqIpw==} - kind-of@3.2.2: - resolution: {integrity: sha512-NOW9QQXMoZGg/oqnVNoNTTIFEIid1627WCffUBJEdMxYApq7mNE7CpzucIPc+ZQg25Phej7IJSmX3hO+oblOtQ==} - engines: {node: '>=0.10.0'} - - kind-of@5.1.0: - resolution: {integrity: sha512-NGEErnH6F2vUuXDh+OlbcKW7/wOcfdRHaZ7VWtqCztfHri/++YKmP51OdWeGPuqCOba6kk2OTe5d02VmTB80Pw==} - engines: {node: '>=0.10.0'} - kind-of@6.0.3: resolution: {integrity: sha512-dcS1ul+9tmeD95T+x28/ehLgd9mENa3LsvDTtzm3vyBEO7RPptvAD+t44WVXaUjTBRcrpFeFlC8WCruUR456hw==} engines: {node: '>=0.10.0'} @@ -5053,10 +4963,6 @@ packages: resolution: {integrity: sha512-4YAVLoF0Sf0UTqlhgQMFU9iQECdah7n+13ANkiuVfRvlK+uI0Etbgd7bVP36dKlG+NXWbhGua8vnGt+sdhvT7A==} engines: {node: '>=18.0.0'} - lazy-cache@2.0.2: - resolution: {integrity: sha512-7vp2Acd2+Kz4XkzxGxaB1FWOi8KjWIWsgdfD5MCb86DWvlLqhRPM+d6Pro3iNEL5VT9mstz5hKAlcd+QR6H3aA==} - engines: {node: '>=0.10.0'} - lazystream@1.0.1: resolution: {integrity: sha512-b94GiNHQNy6JNTrt5w6zNyffMrNkXZb3KTkCZJb2V1xaEGCk093vkZ2jk3tpaeP33/OiXC+WvK9AxUebnf5nbw==} engines: {node: '>= 0.6.3'} @@ -5080,10 +4986,6 @@ packages: lines-and-columns@1.2.4: resolution: {integrity: sha512-7ylylesZQ/PV29jhEDl3Ufjo6ZX7gCqJr5F7PKrqc93v7fzSymt1BpwEU8nAUXs8qzzvqhbjhK5QZg6Mt/HkBg==} - list-item@1.1.1: - resolution: {integrity: sha512-S3D0WZ4J6hyM8o5SNKWaMYB1ALSacPZ2nHGEuCjmHZ+dc03gFeNZoNDcqfcnO4vDhTZmNrqrpYZCdXsRh22bzw==} - engines: {node: '>=0.10.0'} - lmdb@3.4.1: resolution: {integrity: sha512-hoG9RIv42kdGJiieyElgWcKCTaw5S6Jqwyd1gLSVdsJ3+8MVm8e4yLronThiRJI9DazFAAs9xfB9nWeMQ2DWKA==} hasBin: true @@ -5100,9 +5002,6 @@ packages: resolution: {integrity: sha512-iPZK6eYjbxRu3uB4/WZ3EsEIMJFMqAoopl3R+zuq0UjcAm/MO6KCweDgPfP3elTztoKP3KtnVHxTn2NHBSDVUw==} engines: {node: '>=10'} - lodash._reinterpolate@3.0.0: - resolution: {integrity: sha512-xYHt68QRoYGjeeM/XOE1uJtvXQAgvszfBhjV4yvsQH0u2i9I6cI6c6/eG4Hh3UAOVn0y/xAXwmTzEay49Q//HA==} - lodash.camelcase@4.3.0: resolution: {integrity: sha512-TwuEnCnxbc3rAvhf/LbG7tJUDzhqXyFnv3dtzLOPgCG/hODL7WFnsbwktkD7yUV0RrreP/l1PALq/YSg6VvjlA==} @@ -5139,13 +5038,6 @@ packages: lodash.startcase@4.4.0: resolution: {integrity: sha512-+WKqsK294HMSc2jEbNgpHpd0JfIBhp7rEV4aqXWqFr6AlXov+SlcgB1Fv01y2kGe3Gc8nMW7VA0SrGuSkRfIEg==} - lodash.template@4.5.0: - resolution: {integrity: sha512-84vYFxIkmidUiFxidA/KjjH9pAycqW+h980j7Fuz5qxRtO9pgB7MDFTdys1N7A5mcucRiDyEq4fusljItR1T/A==} - deprecated: This package is deprecated. Use https://socket.dev/npm/package/eta instead. - - lodash.templatesettings@4.2.0: - resolution: {integrity: sha512-stgLz+i3Aa9mZgnjr/O+v9ruKZsPsndy7qPZOchbqk2cnTU1ZaldKK+v7m54WoKIyxiuMZTKT2H81F8BeAc3ZQ==} - lodash.throttle@4.1.1: resolution: {integrity: sha512-wIkUCfVKpVsWo3JSZlc+8MB5it+2AN5W8J7YVMST30UrvcQNZ1Okbj+rbVniijTWE6FGYy4XJq/rHkas8qJMLQ==} @@ -5215,10 +5107,6 @@ packages: makeerror@1.0.12: resolution: {integrity: sha512-JmqCvUhmt43madlpFzG4BQzG2Z3m6tvQDNKdClZnO3VbIudJYmxsT0FNJMeiB2+JTSlTQTSbU8QdesVmwJcmLg==} - markdown-link@0.1.1: - resolution: {integrity: sha512-TurLymbyLyo+kAUUAV9ggR9EPcDjP/ctlv9QAFiqUH7c+t6FlsbivPo9OKTU8xdOx9oNd2drW/Fi5RRElQbUqA==} - engines: {node: '>=0.10.0'} - marky@1.3.0: resolution: {integrity: sha512-ocnPZQLNpvbedwTy9kNrQEsknEfgvcLMvOtz3sFeWApDq1MXH1TqkCIx58xlpESsfwQOnuBO9beyQuNGzVvuhQ==} @@ -5226,9 +5114,6 @@ packages: resolution: {integrity: sha512-/IXtbwEk5HTPyEwyKX6hGkYXxM9nbj64B+ilVJnC/R6B0pH5G4V3b0pVbL7DBj4tkhBAppbQUlf6F6Xl9LHu1g==} engines: {node: '>= 0.4'} - math-random@1.0.4: - resolution: {integrity: sha512-rUxjysqif/BZQH2yhd5Aaq7vXMSx9NdEsQcyA07uEzIvxgI7zIr33gGsh+RU0/XjmQpCW7RsVof1vlkvQVCK5A==} - mdast-util-from-markdown@0.8.5: resolution: {integrity: sha512-2hkTXtYYnr+NubD/g6KGBS/0mFmBcifAsI0yIWRiRo0PjVs6SSOSOdtzbp6kSGnShDN6G5aWZpKQ2lWRy27mWQ==} @@ -5379,10 +5264,6 @@ packages: resolution: {integrity: sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==} engines: {node: '>= 8'} - mixin-deep@1.3.2: - resolution: {integrity: sha512-WRoDn//mXBiJ1H40rqa3vH0toePwSsGb45iInWlTySa+Uu4k3tYUSxa2v1KqAiLtvlrSzaExqS1gtk96A9zvEA==} - engines: {node: '>=0.10.0'} - mkdirp-classic@0.5.3: resolution: {integrity: sha512-gKLcREMhtuZRwRAfqP3RFW+TK4JqApVBtOIftVgjuABpAtpxhPGaDcfvbhNvD0B8iD1oUr/txX35NjcaY6Ns/A==} @@ -5552,10 +5433,6 @@ packages: resolution: {integrity: sha512-+Lhy3TQTuzXI5hevh8sBGqbmurHbbIjAi0Z4S63nthVLmLxfbj4T54a4CfZrXIrt9iP4mVAPYMo/v99taj3wjQ==} engines: {node: '>= 0.4'} - object.pick@1.3.0: - resolution: {integrity: sha512-tqa/UMy/CCoYmj+H5qc07qvSL9dqcs/WZENZ1JbtWBlATP+iVOe778gE6MSijnyCnORzDuX6hU+LA4SZ09YjFQ==} - engines: {node: '>=0.10.0'} - object.values@1.2.1: resolution: {integrity: sha512-gXah6aZrcUxjWg2zR2MwouP2eHlCBzdV4pygudehaKXSGW4v2AsRQUK+lwwXhii6KFZcunEnmSUoYp5CXibxtA==} engines: {node: '>= 0.4'} @@ -5912,10 +5789,6 @@ packages: quote-unquote@1.0.0: resolution: {integrity: sha512-twwRO/ilhlG/FIgYeKGFqyHhoEhqgnKVkcmqMKi2r524gz3ZbDTcyFt38E9xjJI2vT+KbRNHVbnJ/e0I25Azwg==} - randomatic@3.1.1: - resolution: {integrity: sha512-TuDE5KxZ0J461RVjrJZCJc+J+zCkTb1MbH9AQUq68sMhOMcy9jLcb3BrZKgp9q9Ncltdg4QVqWrH02W2EFFVYw==} - engines: {node: '>= 0.10.0'} - range-parser@1.2.1: resolution: {integrity: sha512-Hrgsx+orqoygnmhFbKaHE6c296J+HTAQXoxEF6gNupROmmGJRoyzfG3ccAveqCBrwr/2yxQ5BVd/GTl5agOwSg==} engines: {node: '>= 0.6'} @@ -6005,19 +5878,6 @@ packages: resolution: {integrity: sha512-dYqgNSZbDwkaJ2ceRd9ojCGjBq+mOm9LmtXnAnEGyHhN/5R7iDW2TRw3h+o/jCFxus3P2LfWIIiwowAjANm7IA==} engines: {node: '>= 0.4'} - remarkable@1.7.4: - resolution: {integrity: sha512-e6NKUXgX95whv7IgddywbeN/ItCkWbISmc2DiqHJb0wTrqZIexqdco5b8Z3XZoo/48IdNVKM9ZCvTPJ4F5uvhg==} - engines: {node: '>= 0.10.0'} - hasBin: true - - repeat-element@1.1.4: - resolution: {integrity: sha512-LFiNfRcSu7KK3evMyYOuCzv3L10TW7yC1G2/+StMjK8Y6Vqd2MG7r/Qjw4ghtuCOjFvlnms/iMmLqpvW/ES/WQ==} - engines: {node: '>=0.10.0'} - - repeat-string@1.6.1: - resolution: {integrity: sha512-PV0dzCYDNfRi1jCDbJzpW7jNNDRuCOG/jI5ctQcGKt/clZD+YcPS3yIlWuTJMmESC8aevCFmWJy5wjAFgNqN6w==} - engines: {node: '>=0.10'} - require-directory@2.1.1: resolution: {integrity: sha512-fGxEI7+wsG9xrvdjsrlmL22OMTTiHRwAMroiEeMgq8gzoLC/PQr7RsRDSTLUg/bZAZtF+TVIkHc6/4RIKrui+Q==} engines: {node: '>=0.10.0'} @@ -6162,10 +6022,6 @@ packages: resolution: {integrity: sha512-7PGFlmtwsEADb0WYyvCMa1t+yke6daIG4Wirafur5kcf+MhUnPms1UeR0CKQdTZD81yESwMHbtn+TR+dMviakQ==} engines: {node: '>= 0.4'} - set-getter@0.1.1: - resolution: {integrity: sha512-9sVWOy+gthr+0G9DzqqLaYNA7+5OKkSmcqjL9cBpDEaZrr3ShQlyX2cZ/O/ozE41oxn/Tt0LGEM/w4Rub3A3gw==} - engines: {node: '>=0.10.0'} - set-proto@1.0.0: resolution: {integrity: sha512-RJRdvCo6IAnPdsvP/7m6bsQqNnn1FCBX5ZNtFL98MmFF/4xAIJTIg1YbHW5DC2W5SKZanrC6i4HsJqlajw/dZw==} engines: {node: '>= 0.4'} @@ -6378,18 +6234,10 @@ packages: resolution: {integrity: sha512-iq6eVVI64nQQTRYq2KtEg2d2uU7LElhTJwsH4YzIHZshxlgZms/wIc4VoDQTlG/IvVIrBKG06CrZnp0qv7hkcQ==} engines: {node: '>=12'} - strip-bom-string@1.0.0: - resolution: {integrity: sha512-uCC2VHvQRYu+lMh4My/sFNmF2klFymLX1wHJeXnbEJERpV/ZsVuonzerjfrGpIGF7LBVa1O7i9kjiWvJiFck8g==} - engines: {node: '>=0.10.0'} - strip-bom@3.0.0: resolution: {integrity: sha512-vavAMRXOgBVNF6nyEEmL3DBK19iRpDcoIwW+swQ+CbGiu7lju6t+JklA1MHweoWtadgt4ISVUsXLyDq34ddcwA==} engines: {node: '>=4'} - strip-color@0.1.0: - resolution: {integrity: sha512-p9LsUieSjWNNAxVCXLeilaDlmuUOrDS5/dF9znM1nZc7EGX5+zEFC0bEevsNIaldjlks+2jns5Siz6F9iK6jwA==} - engines: {node: '>=0.10.0'} - strip-json-comments@2.0.1: resolution: {integrity: sha512-4gB8na07fecVVkOI6Rs4e7T6NOTki5EmL7TUduTs6bu3EdnSycntVJ4re8kgZA+wx9IueI2Y11bfbgwtzuE0KQ==} engines: {node: '>=0.10.0'} @@ -6473,9 +6321,6 @@ packages: throat@5.0.0: resolution: {integrity: sha512-fcwX4mndzpLQKBS1DVYhGAcYaYt7vsHNIvQV+WXMvnow5cgjPphq5CaayLaGsjRdSCKZFNGt7/GYAuXaNOiYCA==} - through2@2.0.5: - resolution: {integrity: sha512-/mrRod8xqpA+IHSLyGCQ2s8SPHiCDEeQJSep1jqLYeEUClOFG2Qsh+4FU6G9VeqpZnGW/Su8LQGc4YKni5rYSQ==} - tiktoken@1.0.21: resolution: {integrity: sha512-/kqtlepLMptX0OgbYD9aMYbM7EFrMZCL7EoHM8Psmg2FuhXoo/bH64KqOiZGGwa6oS9TPdSEDKBnV2LuB8+5vQ==} @@ -6519,10 +6364,6 @@ packages: tmpl@1.0.5: resolution: {integrity: sha512-3f0uOEAQwIqGuWW2MVzYg8fV/QNnc/IpuJNG837rLuczAaLVHslWHZQj4IGiEl5Hs3kkbhwL9Ab7Hrsmuj+Smw==} - to-object-path@0.3.0: - resolution: {integrity: sha512-9mWHdnGRuh3onocaHzukyvCZhzvr6tiflAy/JRFXcJX0TjgfWA9pk9t8CMbzmBE4Jfw58pXbkngtBtqYxzNEyg==} - engines: {node: '>=0.10.0'} - to-regex-range@5.0.1: resolution: {integrity: sha512-65P7iz6X5yEr1cwcgvQxbbIw7Uk3gOy5dIdtZ4rDveLqhrdJP+Li/Hx6tyK0NEb+2GCyneCMJiGqrADCSNk8sQ==} engines: {node: '>=8.0'} @@ -6627,9 +6468,6 @@ packages: resolution: {integrity: sha512-3KS2b+kL7fsuk/eJZ7EQdnEmQoaho/r6KUef7hxvltNA5DR8NAUM+8wJMbJyZ4G9/7i3v5zPBIMN5aybAh2/Jg==} engines: {node: '>= 0.4'} - typedarray@0.0.6: - resolution: {integrity: sha512-/aCDEGatGvZ2BIk+HmLf4ifCJFwvKFNb9/JeZPMulfgFracn9QFcAf5GO8B/mweUjSoblS5In0cWhqpfs/5PQA==} - typescript@5.8.3: resolution: {integrity: sha512-p1diW6TqL9L07nNxvRMM7hMMw4c5XOo/1ibL4aAIGmSAt9slTE1Xgw5KWuof2uTOvCg9BY7ZRi+GaF+7sfgPeQ==} engines: {node: '>=14.17'} @@ -7702,16 +7540,6 @@ snapshots: micromatch: 4.0.8 pkg-entry-points: 1.1.1 - '@effect/docgen@https://pkg.pr.new/Effect-TS/docgen/@effect/docgen@fd06738(tsx@4.20.3)(typescript@5.8.3)': - dependencies: - '@babel/code-frame': 7.27.1 - '@effect/markdown-toc': 0.1.0 - doctrine: 3.0.0 - glob: 11.0.3 - prettier: 3.6.2 - tsx: 4.20.3 - typescript: 5.8.3 - '@effect/eslint-plugin@0.3.2': dependencies: '@dprint/formatter': 0.4.1 @@ -7720,21 +7548,6 @@ snapshots: '@effect/language-service@0.23.5': {} - '@effect/markdown-toc@0.1.0': - dependencies: - concat-stream: 1.6.2 - diacritics-map: 0.1.0 - gray-matter: 3.1.1 - lazy-cache: 2.0.2 - list-item: 1.1.1 - markdown-link: 0.1.1 - minimist: 1.2.8 - mixin-deep: 1.3.2 - object.pick: 1.3.0 - remarkable: 1.7.4 - repeat-string: 1.6.1 - strip-color: 0.1.0 - '@effect/wa-sqlite@0.1.2': {} '@emnapi/core@1.4.4': @@ -9328,10 +9141,6 @@ snapshots: async@3.2.6: {} - autolinker@0.28.1: - dependencies: - gulp-header: 1.8.12 - available-typed-arrays@1.0.7: dependencies: possible-typed-array-names: 1.1.0 @@ -9707,17 +9516,6 @@ snapshots: concat-map@0.0.1: {} - concat-stream@1.6.2: - dependencies: - buffer-from: 1.1.2 - inherits: 2.0.4 - readable-stream: 2.3.8 - typedarray: 0.0.6 - - concat-with-sourcemaps@1.1.0: - dependencies: - source-map: 0.6.1 - connect@3.7.0: dependencies: debug: 2.6.9 @@ -9910,8 +9708,6 @@ snapshots: transitivePeerDependencies: - supports-color - diacritics-map@0.1.0: {} - diff-sequences@29.6.3: {} dir-glob@3.0.1: @@ -9947,10 +9743,6 @@ snapshots: dependencies: esutils: 2.0.3 - doctrine@3.0.0: - dependencies: - esutils: 2.0.3 - dom-accessibility-api@0.5.16: {} dom-serializer@2.0.0: @@ -10373,10 +10165,6 @@ snapshots: exit-hook@2.2.1: {} - expand-range@1.8.2: - dependencies: - fill-range: 2.2.4 - expand-template@2.0.3: {} expect-type@1.2.2: {} @@ -10391,10 +10179,6 @@ snapshots: exponential-backoff@3.1.2: {} - extend-shallow@2.0.1: - dependencies: - is-extendable: 0.1.1 - extendable-error@0.1.7: {} external-editor@3.1.0: @@ -10465,14 +10249,6 @@ snapshots: tsconfig-paths: 4.2.0 typescript: 5.8.3 - fill-range@2.2.4: - dependencies: - is-number: 2.1.0 - isobject: 2.1.0 - randomatic: 3.1.1 - repeat-element: 1.1.4 - repeat-string: 1.6.1 - fill-range@7.1.1: dependencies: to-regex-range: 5.0.1 @@ -10526,8 +10302,6 @@ snapshots: dependencies: is-callable: 1.2.7 - for-in@1.0.2: {} - foreground-child@3.3.1: dependencies: cross-spawn: 7.0.6 @@ -10696,19 +10470,6 @@ snapshots: graphemer@1.4.0: {} - gray-matter@3.1.1: - dependencies: - extend-shallow: 2.0.1 - js-yaml: 3.14.1 - kind-of: 5.1.0 - strip-bom-string: 1.0.0 - - gulp-header@1.8.12: - dependencies: - concat-with-sourcemaps: 1.1.0 - lodash.template: 4.5.0 - through2: 2.0.5 - happy-dom@17.6.3: dependencies: webidl-conversions: 7.0.0 @@ -10896,8 +10657,6 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 - is-buffer@1.1.6: {} - is-bun-module@2.0.0: dependencies: semver: 7.7.2 @@ -10927,12 +10686,6 @@ snapshots: is-docker@3.0.0: {} - is-extendable@0.1.1: {} - - is-extendable@1.0.1: - dependencies: - is-plain-object: 2.0.4 - is-extglob@2.1.1: {} is-finalizationregistry@1.1.1: @@ -10969,12 +10722,6 @@ snapshots: call-bound: 1.0.4 has-tostringtag: 1.0.2 - is-number@2.1.0: - dependencies: - kind-of: 3.2.2 - - is-number@4.0.0: {} - is-number@7.0.0: {} is-obj@1.0.1: {} @@ -11056,10 +10803,6 @@ snapshots: isexe@2.0.0: {} - isobject@2.1.0: - dependencies: - isarray: 1.0.0 - isobject@3.0.1: {} istanbul-lib-coverage@3.2.2: {} @@ -11285,22 +11028,12 @@ snapshots: dependencies: json-buffer: 3.0.1 - kind-of@3.2.2: - dependencies: - is-buffer: 1.1.6 - - kind-of@5.1.0: {} - kind-of@6.0.3: {} kleur@4.1.5: {} kysely@0.28.2: {} - lazy-cache@2.0.2: - dependencies: - set-getter: 0.1.1 - lazystream@1.0.1: dependencies: readable-stream: 2.3.8 @@ -11334,13 +11067,6 @@ snapshots: lines-and-columns@1.2.4: {} - list-item@1.1.1: - dependencies: - expand-range: 1.8.2 - extend-shallow: 2.0.1 - is-number: 2.1.0 - repeat-string: 1.6.1 - lmdb@3.4.1: dependencies: msgpackr: 1.11.4 @@ -11370,8 +11096,6 @@ snapshots: dependencies: p-locate: 5.0.0 - lodash._reinterpolate@3.0.0: {} - lodash.camelcase@4.3.0: {} lodash.defaults@4.2.0: {} @@ -11396,15 +11120,6 @@ snapshots: lodash.startcase@4.4.0: {} - lodash.template@4.5.0: - dependencies: - lodash._reinterpolate: 3.0.0 - lodash.templatesettings: 4.2.0 - - lodash.templatesettings@4.2.0: - dependencies: - lodash._reinterpolate: 3.0.0 - lodash.throttle@4.1.1: {} lodash@4.17.21: {} @@ -11478,14 +11193,10 @@ snapshots: dependencies: tmpl: 1.0.5 - markdown-link@0.1.1: {} - marky@1.3.0: {} math-intrinsics@1.1.0: {} - math-random@1.0.4: {} - mdast-util-from-markdown@0.8.5: dependencies: '@types/mdast': 3.0.15 @@ -11756,11 +11467,6 @@ snapshots: minipass: 3.3.6 yallist: 4.0.0 - mixin-deep@1.3.2: - dependencies: - for-in: 1.0.2 - is-extendable: 1.0.1 - mkdirp-classic@0.5.3: {} mkdirp@1.0.4: {} @@ -11919,10 +11625,6 @@ snapshots: define-properties: 1.2.1 es-abstract: 1.24.0 - object.pick@1.3.0: - dependencies: - isobject: 3.0.1 - object.values@1.2.1: dependencies: call-bind: 1.0.8 @@ -12298,12 +12000,6 @@ snapshots: quote-unquote@1.0.0: {} - randomatic@3.1.1: - dependencies: - is-number: 4.0.0 - kind-of: 6.0.3 - math-random: 1.0.4 - range-parser@1.2.1: {} rc@1.2.8: @@ -12465,15 +12161,6 @@ snapshots: gopd: 1.2.0 set-function-name: 2.0.2 - remarkable@1.7.4: - dependencies: - argparse: 1.0.10 - autolinker: 0.28.1 - - repeat-element@1.1.4: {} - - repeat-string@1.6.1: {} - require-directory@2.1.1: {} require-from-string@2.0.2: {} @@ -12637,10 +12324,6 @@ snapshots: functions-have-names: 1.2.3 has-property-descriptors: 1.0.2 - set-getter@0.1.1: - dependencies: - to-object-path: 0.3.0 - set-proto@1.0.0: dependencies: dunder-proto: 1.0.1 @@ -12893,12 +12576,8 @@ snapshots: dependencies: ansi-regex: 6.1.0 - strip-bom-string@1.0.0: {} - strip-bom@3.0.0: {} - strip-color@0.1.0: {} - strip-json-comments@2.0.1: {} strip-json-comments@3.1.1: {} @@ -13028,11 +12707,6 @@ snapshots: throat@5.0.0: {} - through2@2.0.5: - dependencies: - readable-stream: 2.3.8 - xtend: 4.0.2 - tiktoken@1.0.21: {} tiny-invariant@1.3.3: {} @@ -13062,10 +12736,6 @@ snapshots: tmpl@1.0.5: {} - to-object-path@0.3.0: - dependencies: - kind-of: 3.2.2 - to-regex-range@5.0.1: dependencies: is-number: 7.0.0 @@ -13173,8 +12843,6 @@ snapshots: possible-typed-array-names: 1.1.0 reflect.getprototypeof: 1.0.10 - typedarray@0.0.6: {} - typescript@5.8.3: {} unbox-primitive@1.1.0: