@coro-ai/runner 0.1.34 → 0.1.36
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dashboard-dist/assets/{index-C7l2FOsX.js → index-DVdRvXW2.js} +1 -1
- package/dashboard-dist/index.html +1 -1
- package/dist/src/clients/github.d.ts +21 -10
- package/dist/src/clients/github.js +48 -40
- package/dist/src/clients/github.js.map +1 -1
- package/dist/src/cloud/db/postgres-backend.js +21 -13
- package/dist/src/cloud/db/postgres-backend.js.map +1 -1
- package/dist/src/cloud/db/schema.d.ts +1 -1
- package/dist/src/intake/system-prompt.js +3 -0
- package/dist/src/intake/system-prompt.js.map +1 -1
- package/dist/src/jobs/phase-assignment.d.ts +42 -0
- package/dist/src/jobs/phase-assignment.js +46 -43
- package/dist/src/jobs/phase-assignment.js.map +1 -1
- package/dist/src/jobs/runner.js +63 -34
- package/dist/src/jobs/runner.js.map +1 -1
- package/dist/src/plugins/refs.d.ts +50 -1
- package/dist/src/plugins/refs.js +97 -1
- package/dist/src/plugins/refs.js.map +1 -1
- package/dist/src/plugins/registry.d.ts +6 -0
- package/dist/src/plugins/registry.js +11 -2
- package/dist/src/plugins/registry.js.map +1 -1
- package/dist/src/plugins/types.d.ts +1 -1
- package/dist/src/prompt/builder.d.ts +2 -1
- package/dist/src/prompt/builder.js +42 -1
- package/dist/src/prompt/builder.js.map +1 -1
- package/dist/src/runner/build-settings.js +16 -4
- package/dist/src/runner/build-settings.js.map +1 -1
- package/dist/src/state/polling-transport.d.ts +41 -12
- package/dist/src/state/polling-transport.js +95 -56
- package/dist/src/state/polling-transport.js.map +1 -1
- package/dist/src/state/sqlite-backend.js +19 -13
- package/dist/src/state/sqlite-backend.js.map +1 -1
- package/dist/src/tools/run-subagent.js +10 -5
- package/dist/src/tools/run-subagent.js.map +1 -1
- package/node_modules/@coro-ai/cloud-protocol/package.json +1 -1
- package/node_modules/@coro-ai/intelligence-base/layer/agents/coder.md +1 -1
- package/node_modules/@coro-ai/intelligence-base/layer/agents/planner.md +1 -1
- package/node_modules/@coro-ai/intelligence-base/package.json +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.d.ts +58 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.d.ts.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.js +278 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/credential-store.js.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts +12 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.js +67 -44
- package/node_modules/@coro-ai/llm-anthropic/dist/executor.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.js +4 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/http-routes.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/index.d.ts +2 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/index.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/index.js +6 -2
- package/node_modules/@coro-ai/llm-anthropic/dist/index.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.d.ts +11 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.d.ts.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.js +112 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/sandbox-probe.js.map +1 -0
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.d.ts +0 -26
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.js +40 -106
- package/node_modules/@coro-ai/llm-anthropic/dist/test-connection.js.map +1 -1
- package/node_modules/@coro-ai/llm-anthropic/package.json +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/executor.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/executor.js +13 -10
- package/node_modules/@coro-ai/llm-openai/dist/executor.js.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/models.d.ts.map +1 -1
- package/node_modules/@coro-ai/llm-openai/dist/models.js +3 -0
- package/node_modules/@coro-ai/llm-openai/dist/models.js.map +1 -1
- package/node_modules/@coro-ai/llm-openai/package.json +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.d.ts +10 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.d.ts.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.js +16 -2
- package/node_modules/@coro-ai/plugin-sdk/dist/chat-mcp.js.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.d.ts +27 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.d.ts.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.js +47 -0
- package/node_modules/@coro-ai/plugin-sdk/dist/helpers.js.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/dist/types.d.ts +65 -4
- package/node_modules/@coro-ai/plugin-sdk/dist/types.d.ts.map +1 -1
- package/node_modules/@coro-ai/plugin-sdk/package.json +1 -1
- package/node_modules/@hono/node-server/README.md +104 -25
- package/node_modules/@hono/node-server/dist/conninfo.cjs +22 -0
- package/node_modules/@hono/node-server/dist/{conninfo.d.ts → conninfo.d.cts} +4 -3
- package/node_modules/@hono/node-server/dist/conninfo.d.mts +4 -3
- package/node_modules/@hono/node-server/dist/conninfo.mjs +19 -16
- package/node_modules/@hono/node-server/dist/constants-BLSFu_RU.mjs +5 -0
- package/node_modules/@hono/node-server/dist/constants-BXAKTxRC.cjs +11 -0
- package/node_modules/@hono/node-server/dist/early-hints.cjs +35 -0
- package/node_modules/@hono/node-server/dist/early-hints.d.cts +16 -0
- package/node_modules/@hono/node-server/dist/early-hints.d.mts +16 -0
- package/node_modules/@hono/node-server/dist/early-hints.mjs +33 -0
- package/node_modules/@hono/node-server/dist/index.cjs +1176 -0
- package/node_modules/@hono/node-server/dist/index.d.cts +101 -0
- package/node_modules/@hono/node-server/dist/index.d.mts +101 -8
- package/node_modules/@hono/node-server/dist/index.mjs +1146 -637
- package/node_modules/@hono/node-server/dist/serve-static.cjs +151 -0
- package/node_modules/@hono/node-server/dist/serve-static.d.cts +18 -0
- package/node_modules/@hono/node-server/dist/serve-static.d.mts +14 -13
- package/node_modules/@hono/node-server/dist/serve-static.mjs +143 -145
- package/node_modules/@hono/node-server/dist/utils/response.cjs +8 -0
- package/node_modules/@hono/node-server/dist/utils/response.d.cts +4 -0
- package/node_modules/@hono/node-server/dist/utils/response.d.mts +3 -2
- package/node_modules/@hono/node-server/dist/utils/response.mjs +6 -9
- package/node_modules/@hono/node-server/dist/utils/stream.cjs +65 -0
- package/node_modules/@hono/node-server/dist/utils/stream.d.cts +6 -0
- package/node_modules/@hono/node-server/dist/utils/stream.d.mts +6 -0
- package/node_modules/@hono/node-server/dist/utils/stream.mjs +64 -0
- package/node_modules/@hono/node-server/package.json +78 -54
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js +1 -12
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts +7 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js +9 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js +5 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/client/streamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.js +1 -12
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.js +17 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/sseKeepAlive.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js +10 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts +21 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js +239 -41
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/webStandardStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.js +25 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/server/zod-compat.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.d.ts +32 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.js +64 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/mediaType.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.js +10 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/cjs/shared/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js +2 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.d.ts +7 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js +9 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js +5 -3
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/client/streamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js +2 -13
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/index.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js +13 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/sseKeepAlive.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts +9 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js +10 -4
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts +21 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js +239 -41
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/webStandardStreamableHttp.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js +25 -6
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/server/zod-compat.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.d.ts +32 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.d.ts.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js +57 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/mediaType.js.map +1 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.d.ts +5 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.d.ts.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js +9 -0
- package/node_modules/@modelcontextprotocol/sdk/dist/esm/shared/stdio.js.map +1 -1
- package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/README.md +15 -14
- package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/index.js +0 -8
- package/node_modules/@modelcontextprotocol/sdk/node_modules/media-typer/package.json +16 -12
- package/node_modules/@modelcontextprotocol/sdk/package.json +4 -3
- package/node_modules/express-rate-limit/dist/index.cjs +6 -1
- package/node_modules/express-rate-limit/dist/index.d.cts +10 -12
- package/node_modules/express-rate-limit/dist/index.d.mts +10 -12
- package/node_modules/express-rate-limit/dist/index.d.ts +10 -12
- package/node_modules/express-rate-limit/dist/index.mjs +6 -1
- package/node_modules/express-rate-limit/package.json +8 -8
- package/node_modules/express-rate-limit/readme.md +2 -2
- package/node_modules/fast-uri/index.js +54 -1
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/security.test.js +198 -0
- package/node_modules/hono/dist/cjs/context.js +28 -13
- package/node_modules/hono/dist/cjs/helper/proxy/index.js +4 -0
- package/node_modules/hono/dist/cjs/helper/streaming/sse.js +5 -4
- package/node_modules/hono/dist/cjs/hono-base.js +3 -2
- package/node_modules/hono/dist/cjs/jsx/base.js +27 -23
- package/node_modules/hono/dist/cjs/jsx/hooks/index.js +16 -13
- package/node_modules/hono/dist/cjs/middleware/cache/index.js +103 -8
- package/node_modules/hono/dist/cjs/middleware/compress/index.js +5 -0
- package/node_modules/hono/dist/cjs/middleware/cors/index.js +2 -2
- package/node_modules/hono/dist/cjs/middleware/etag/index.js +4 -1
- package/node_modules/hono/dist/cjs/middleware/jwk/jwk.js +9 -4
- package/node_modules/hono/dist/cjs/middleware/jwt/jwt.js +9 -4
- package/node_modules/hono/dist/cjs/middleware/language/language.js +10 -6
- package/node_modules/hono/dist/cjs/middleware/method-not-allowed/index.js +90 -0
- package/node_modules/hono/dist/cjs/middleware/secure-headers/secure-headers.js +10 -4
- package/node_modules/hono/dist/cjs/request.js +14 -11
- package/node_modules/hono/dist/cjs/router/reg-exp-router/node.js +55 -56
- package/node_modules/hono/dist/cjs/router/reg-exp-router/router.js +64 -85
- package/node_modules/hono/dist/cjs/router/reg-exp-router/trie.js +13 -5
- package/node_modules/hono/dist/cjs/router/trie-router/node.js +1 -1
- package/node_modules/hono/dist/cjs/router.js +1 -1
- package/node_modules/hono/dist/cjs/utils/accept.js +1 -1
- package/node_modules/hono/dist/cjs/utils/body.js +6 -0
- package/node_modules/hono/dist/cjs/utils/cookie.js +3 -2
- package/node_modules/hono/dist/cjs/utils/stream.js +5 -2
- package/node_modules/hono/dist/cjs/utils/url.js +8 -8
- package/node_modules/hono/dist/context.js +28 -13
- package/node_modules/hono/dist/helper/proxy/index.js +4 -0
- package/node_modules/hono/dist/helper/streaming/sse.js +5 -4
- package/node_modules/hono/dist/hono-base.js +3 -2
- package/node_modules/hono/dist/jsx/base.js +27 -23
- package/node_modules/hono/dist/jsx/hooks/index.js +16 -13
- package/node_modules/hono/dist/middleware/cache/index.js +103 -8
- package/node_modules/hono/dist/middleware/compress/index.js +5 -0
- package/node_modules/hono/dist/middleware/cors/index.js +2 -2
- package/node_modules/hono/dist/middleware/etag/index.js +4 -1
- package/node_modules/hono/dist/middleware/jwk/jwk.js +9 -4
- package/node_modules/hono/dist/middleware/jwt/jwt.js +9 -4
- package/node_modules/hono/dist/middleware/language/language.js +10 -6
- package/node_modules/hono/dist/middleware/method-not-allowed/index.js +68 -0
- package/node_modules/hono/dist/middleware/secure-headers/secure-headers.js +10 -4
- package/node_modules/hono/dist/request.js +15 -12
- package/node_modules/hono/dist/router/reg-exp-router/node.js +55 -56
- package/node_modules/hono/dist/router/reg-exp-router/router.js +64 -85
- package/node_modules/hono/dist/router/reg-exp-router/trie.js +13 -5
- package/node_modules/hono/dist/router/trie-router/node.js +1 -1
- package/node_modules/hono/dist/router.js +1 -1
- package/node_modules/hono/dist/types/adapter/aws-lambda/types.d.ts +9 -0
- package/node_modules/hono/dist/types/client/types.d.ts +1 -1
- package/node_modules/hono/dist/types/hono-base.d.ts +4 -3
- package/node_modules/hono/dist/types/jsx/base.d.ts +4 -2
- package/node_modules/hono/dist/types/jsx/dom/index.d.ts +5 -5
- package/node_modules/hono/dist/types/jsx/dom/intrinsic-element/components.d.ts +2 -2
- package/node_modules/hono/dist/types/jsx/dom/server.d.ts +5 -5
- package/node_modules/hono/dist/types/jsx/hooks/index.d.ts +8 -6
- package/node_modules/hono/dist/types/jsx/index.d.ts +5 -5
- package/node_modules/hono/dist/types/middleware/cache/index.d.ts +6 -4
- package/node_modules/hono/dist/types/middleware/combine/index.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/cors/index.d.ts +1 -1
- package/node_modules/hono/dist/types/middleware/jsx-renderer/index.d.ts +2 -2
- package/node_modules/hono/dist/types/middleware/jwk/jwk.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/jwt/jwt.d.ts +2 -0
- package/node_modules/hono/dist/types/middleware/method-not-allowed/index.d.ts +49 -0
- package/node_modules/hono/dist/types/router/reg-exp-router/node.d.ts +1 -1
- package/node_modules/hono/dist/types/router/reg-exp-router/trie.d.ts +2 -1
- package/node_modules/hono/dist/types/router.d.ts +1 -1
- package/node_modules/hono/dist/types/utils/headers.d.ts +2 -2
- package/node_modules/hono/dist/types/utils/url.d.ts +1 -0
- package/node_modules/hono/dist/utils/accept.js +1 -1
- package/node_modules/hono/dist/utils/body.js +6 -0
- package/node_modules/hono/dist/utils/cookie.js +4 -3
- package/node_modules/hono/dist/utils/stream.js +5 -2
- package/node_modules/hono/dist/utils/url.js +6 -7
- package/node_modules/hono/package.json +10 -3
- package/node_modules/ip-address/README.md +146 -126
- package/node_modules/ip-address/dist/common.d.ts +29 -0
- package/node_modules/ip-address/dist/common.js +44 -5
- package/node_modules/ip-address/dist/common.js.map +1 -1
- package/node_modules/ip-address/dist/ipv4.d.ts +8 -1
- package/node_modules/ip-address/dist/ipv4.js +24 -20
- package/node_modules/ip-address/dist/ipv4.js.map +1 -1
- package/node_modules/ip-address/dist/ipv6.d.ts +68 -3
- package/node_modules/ip-address/dist/ipv6.js +180 -53
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v4/constants.js +5 -1
- package/node_modules/ip-address/dist/v4/constants.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.js +3 -2
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +6 -4
- package/node_modules/jose/README.md +13 -16
- package/node_modules/jose/dist/types/index.d.ts +6 -5
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +7 -19
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +18 -13
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +20 -21
- package/node_modules/jose/dist/types/jwk/embedded.d.ts +8 -12
- package/node_modules/jose/dist/types/jwk/thumbprint.d.ts +0 -15
- package/node_modules/jose/dist/types/jwks/local.d.ts +12 -21
- package/node_modules/jose/dist/types/jwks/remote.d.ts +34 -165
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +17 -13
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +16 -17
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +18 -15
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +17 -11
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +10 -34
- package/node_modules/jose/dist/types/jwt/sign.d.ts +2 -13
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +4 -13
- package/node_modules/jose/dist/types/jwt/verify.d.ts +14 -13
- package/node_modules/jose/dist/types/key/export.d.ts +0 -14
- package/node_modules/jose/dist/types/key/generate_key_pair.d.ts +7 -14
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +16 -14
- package/node_modules/jose/dist/types/key/import.d.ts +18 -28
- package/node_modules/jose/dist/types/types.d.ts +239 -222
- package/node_modules/jose/dist/types/util/base64url.d.ts +11 -4
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +1 -9
- package/node_modules/jose/dist/types/util/decode_protected_header.d.ts +0 -8
- package/node_modules/jose/dist/types/util/errors.d.ts +128 -121
- package/node_modules/jose/dist/webapi/jwe/compact/decrypt.js +4 -22
- package/node_modules/jose/dist/webapi/jwe/flattened/decrypt.js +5 -153
- package/node_modules/jose/dist/webapi/jwe/flattened/encrypt.js +16 -111
- package/node_modules/jose/dist/webapi/jwe/general/decrypt.js +23 -3
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +66 -82
- package/node_modules/jose/dist/webapi/jwk/embedded.js +5 -3
- package/node_modules/jose/dist/webapi/jwks/local.js +32 -73
- package/node_modules/jose/dist/webapi/jwks/remote.js +19 -28
- package/node_modules/jose/dist/webapi/jws/compact/sign.js +5 -2
- package/node_modules/jose/dist/webapi/jws/compact/verify.js +4 -16
- package/node_modules/jose/dist/webapi/jws/flattened/sign.js +7 -65
- package/node_modules/jose/dist/webapi/jws/flattened/verify.js +3 -89
- package/node_modules/jose/dist/webapi/jws/general/sign.js +19 -15
- package/node_modules/jose/dist/webapi/jws/general/verify.js +29 -9
- package/node_modules/jose/dist/webapi/jwt/decrypt.js +5 -5
- package/node_modules/jose/dist/webapi/jwt/sign.js +2 -3
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +4 -3
- package/node_modules/jose/dist/webapi/jwt/verify.js +6 -6
- package/node_modules/jose/dist/webapi/key/export.js +37 -4
- package/node_modules/jose/dist/webapi/key/generate_key_pair.js +33 -82
- package/node_modules/jose/dist/webapi/key/generate_secret.js +2 -2
- package/node_modules/jose/dist/webapi/key/import.js +8 -8
- package/node_modules/jose/dist/webapi/lib/asn1.js +53 -122
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +1 -0
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +34 -109
- package/node_modules/jose/dist/webapi/lib/crypto_key.js +18 -126
- package/node_modules/jose/dist/webapi/lib/helpers.js +23 -0
- package/node_modules/jose/dist/webapi/lib/invalid_key_input.js +0 -1
- package/node_modules/jose/dist/webapi/lib/jwe_algorithms.js +107 -0
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +186 -0
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +110 -0
- package/node_modules/jose/dist/webapi/lib/jwk_to_key.js +8 -98
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +73 -0
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +74 -0
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +107 -0
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +68 -109
- package/node_modules/jose/dist/webapi/lib/key.js +132 -0
- package/node_modules/jose/dist/webapi/lib/key_algorithm.js +10 -0
- package/node_modules/jose/dist/webapi/lib/key_descriptor.js +7 -0
- package/node_modules/jose/dist/webapi/lib/key_management.js +162 -92
- package/node_modules/jose/dist/webapi/lib/options.js +48 -0
- package/node_modules/jose/dist/webapi/lib/signing.js +14 -56
- package/node_modules/jose/dist/webapi/lib/type_checks.js +13 -18
- package/node_modules/jose/dist/webapi/util/base64url.js +13 -4
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +2 -2
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -15
- package/node_modules/jose/dist/webapi/util/errors.js +1 -1
- package/node_modules/jose/package.json +2 -4
- package/node_modules/js-yaml/dist/js-yaml.js +5 -2
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +3 -3
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/lib/type/omap.js +3 -3
- package/node_modules/js-yaml/package.json +1 -1
- package/node_modules/openai/CHANGELOG.md +32 -0
- package/node_modules/openai/azure.d.mts.map +1 -1
- package/node_modules/openai/azure.d.ts.map +1 -1
- package/node_modules/openai/azure.js +5 -1
- package/node_modules/openai/azure.js.map +1 -1
- package/node_modules/openai/azure.mjs +5 -1
- package/node_modules/openai/azure.mjs.map +1 -1
- package/node_modules/openai/helpers/standard-schema.d.mts +104 -0
- package/node_modules/openai/helpers/standard-schema.d.mts.map +1 -0
- package/node_modules/openai/helpers/standard-schema.d.ts +104 -0
- package/node_modules/openai/helpers/standard-schema.d.ts.map +1 -0
- package/node_modules/openai/helpers/standard-schema.js +320 -0
- package/node_modules/openai/helpers/standard-schema.js.map +1 -0
- package/node_modules/openai/helpers/standard-schema.mjs +314 -0
- package/node_modules/openai/helpers/standard-schema.mjs.map +1 -0
- package/node_modules/openai/helpers/zod.d.mts +26 -3
- package/node_modules/openai/helpers/zod.d.mts.map +1 -1
- package/node_modules/openai/helpers/zod.d.ts +26 -3
- package/node_modules/openai/helpers/zod.d.ts.map +1 -1
- package/node_modules/openai/helpers/zod.js +97 -7
- package/node_modules/openai/helpers/zod.js.map +1 -1
- package/node_modules/openai/helpers/zod.mjs +96 -7
- package/node_modules/openai/helpers/zod.mjs.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.mts.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.d.ts.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js +43 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.js.map +1 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs +43 -1
- package/node_modules/openai/lib/AbstractChatCompletionRunner.mjs.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.mts +2 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.mts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.ts +2 -1
- package/node_modules/openai/lib/ChatCompletionStream.d.ts.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.js +53 -14
- package/node_modules/openai/lib/ChatCompletionStream.js.map +1 -1
- package/node_modules/openai/lib/ChatCompletionStream.mjs +53 -14
- package/node_modules/openai/lib/ChatCompletionStream.mjs.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.d.mts.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.d.ts.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.js +3 -5
- package/node_modules/openai/lib/ResponsesParser.js.map +1 -1
- package/node_modules/openai/lib/ResponsesParser.mjs +3 -5
- package/node_modules/openai/lib/ResponsesParser.mjs.map +1 -1
- package/node_modules/openai/lib/jsonschema.d.mts +3 -0
- package/node_modules/openai/lib/jsonschema.d.mts.map +1 -1
- package/node_modules/openai/lib/jsonschema.d.ts +3 -0
- package/node_modules/openai/lib/jsonschema.d.ts.map +1 -1
- package/node_modules/openai/lib/transform.d.mts +25 -1
- package/node_modules/openai/lib/transform.d.mts.map +1 -1
- package/node_modules/openai/lib/transform.d.ts +25 -1
- package/node_modules/openai/lib/transform.d.ts.map +1 -1
- package/node_modules/openai/lib/transform.js +1521 -82
- package/node_modules/openai/lib/transform.js.map +1 -1
- package/node_modules/openai/lib/transform.mjs +1515 -82
- package/node_modules/openai/lib/transform.mjs.map +1 -1
- package/node_modules/openai/package.json +1 -1
- package/node_modules/openai/resources/admin/organization/index.d.mts +1 -0
- package/node_modules/openai/resources/admin/organization/index.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/index.d.ts +1 -0
- package/node_modules/openai/resources/admin/organization/index.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/index.js +3 -1
- package/node_modules/openai/resources/admin/organization/index.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/index.mjs +1 -0
- package/node_modules/openai/resources/admin/organization/index.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.d.mts +4 -0
- package/node_modules/openai/resources/admin/organization/organization.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.d.ts +4 -0
- package/node_modules/openai/resources/admin/organization/organization.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.js +4 -0
- package/node_modules/openai/resources/admin/organization/organization.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/organization.mjs +4 -0
- package/node_modules/openai/resources/admin/organization/organization.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.mts +1 -0
- package/node_modules/openai/resources/admin/organization/projects/index.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.d.ts +1 -0
- package/node_modules/openai/resources/admin/organization/projects/index.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.js +3 -1
- package/node_modules/openai/resources/admin/organization/projects/index.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/index.mjs +1 -0
- package/node_modules/openai/resources/admin/organization/projects/index.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.d.mts +4 -0
- package/node_modules/openai/resources/admin/organization/projects/projects.d.mts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.d.ts +4 -0
- package/node_modules/openai/resources/admin/organization/projects/projects.d.ts.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.js +4 -0
- package/node_modules/openai/resources/admin/organization/projects/projects.js.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/projects.mjs +4 -0
- package/node_modules/openai/resources/admin/organization/projects/projects.mjs.map +1 -1
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.mts +115 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.mts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.ts +115 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.d.ts.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.js +67 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.js.map +1 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs +63 -0
- package/node_modules/openai/resources/admin/organization/projects/spend-limit.mjs.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.mts +108 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.mts.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.ts +108 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.d.ts.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.js +59 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.js.map +1 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.mjs +55 -0
- package/node_modules/openai/resources/admin/organization/spend-limit.mjs.map +1 -0
- package/node_modules/openai/resources/beta/responses/input-tokens.d.mts +6 -2
- package/node_modules/openai/resources/beta/responses/input-tokens.d.mts.map +1 -1
- package/node_modules/openai/resources/beta/responses/input-tokens.d.ts +6 -2
- package/node_modules/openai/resources/beta/responses/input-tokens.d.ts.map +1 -1
- package/node_modules/openai/resources/beta/responses/responses.d.mts +21 -11
- package/node_modules/openai/resources/beta/responses/responses.d.mts.map +1 -1
- package/node_modules/openai/resources/beta/responses/responses.d.ts +21 -11
- package/node_modules/openai/resources/beta/responses/responses.d.ts.map +1 -1
- package/node_modules/openai/resources/beta/responses/responses.js.map +1 -1
- package/node_modules/openai/resources/beta/responses/responses.mjs.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.d.mts +4 -3
- package/node_modules/openai/resources/chat/completions/completions.d.mts.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.d.ts +4 -3
- package/node_modules/openai/resources/chat/completions/completions.d.ts.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.js.map +1 -1
- package/node_modules/openai/resources/chat/completions/completions.mjs.map +1 -1
- package/node_modules/openai/resources/responses/input-tokens.d.mts +2 -1
- package/node_modules/openai/resources/responses/input-tokens.d.mts.map +1 -1
- package/node_modules/openai/resources/responses/input-tokens.d.ts +2 -1
- package/node_modules/openai/resources/responses/input-tokens.d.ts.map +1 -1
- package/node_modules/openai/resources/responses/responses.d.mts +9 -8
- package/node_modules/openai/resources/responses/responses.d.mts.map +1 -1
- package/node_modules/openai/resources/responses/responses.d.ts +9 -8
- package/node_modules/openai/resources/responses/responses.d.ts.map +1 -1
- package/node_modules/openai/resources/responses/responses.js.map +1 -1
- package/node_modules/openai/resources/responses/responses.mjs.map +1 -1
- package/node_modules/openai/resources/shared.d.mts +4 -1
- package/node_modules/openai/resources/shared.d.mts.map +1 -1
- package/node_modules/openai/resources/shared.d.ts +4 -1
- package/node_modules/openai/resources/shared.d.ts.map +1 -1
- package/node_modules/openai/src/azure.ts +5 -1
- package/node_modules/openai/src/helpers/standard-schema.ts +570 -0
- package/node_modules/openai/src/helpers/zod.ts +158 -29
- package/node_modules/openai/src/lib/AbstractChatCompletionRunner.ts +43 -1
- package/node_modules/openai/src/lib/ChatCompletionStream.ts +56 -8
- package/node_modules/openai/src/lib/ResponsesParser.ts +7 -5
- package/node_modules/openai/src/lib/jsonschema.ts +3 -0
- package/node_modules/openai/src/lib/transform.ts +1930 -103
- package/node_modules/openai/src/resources/admin/organization/index.ts +6 -0
- package/node_modules/openai/src/resources/admin/organization/organization.ts +16 -0
- package/node_modules/openai/src/resources/admin/organization/projects/index.ts +6 -0
- package/node_modules/openai/src/resources/admin/organization/projects/projects.ts +16 -0
- package/node_modules/openai/src/resources/admin/organization/projects/spend-limit.ts +156 -0
- package/node_modules/openai/src/resources/admin/organization/spend-limit.ts +144 -0
- package/node_modules/openai/src/resources/beta/responses/input-tokens.ts +6 -2
- package/node_modules/openai/src/resources/beta/responses/responses.ts +21 -10
- package/node_modules/openai/src/resources/chat/completions/completions.ts +4 -3
- package/node_modules/openai/src/resources/responses/input-tokens.ts +2 -1
- package/node_modules/openai/src/resources/responses/responses.ts +9 -7
- package/node_modules/openai/src/resources/shared.ts +4 -1
- package/node_modules/openai/src/version.ts +1 -1
- package/node_modules/openai/version.d.mts +1 -1
- package/node_modules/openai/version.d.ts +1 -1
- package/node_modules/openai/version.js +1 -1
- package/node_modules/openai/version.mjs +1 -1
- package/node_modules/process-warning/LICENSE +1 -1
- package/node_modules/process-warning/README.md +41 -2
- package/node_modules/process-warning/index.js +85 -17
- package/node_modules/process-warning/package.json +6 -7
- package/node_modules/process-warning/test/emit-once-only.test.js +3 -3
- package/node_modules/process-warning/test/emit-reset.test.js +4 -4
- package/node_modules/process-warning/test/emit-unlimited.test.js +2 -2
- package/node_modules/process-warning/test/spy-warning.test.js +143 -0
- package/node_modules/process-warning/types/index.d.ts +15 -1
- package/node_modules/process-warning/types/index.tst.ts +48 -0
- package/node_modules/ws/package.json +1 -1
- package/package.json +6 -6
- package/node_modules/@hono/node-server/dist/conninfo.js +0 -42
- package/node_modules/@hono/node-server/dist/globals.d.mts +0 -2
- package/node_modules/@hono/node-server/dist/globals.d.ts +0 -2
- package/node_modules/@hono/node-server/dist/globals.js +0 -29
- package/node_modules/@hono/node-server/dist/globals.mjs +0 -5
- package/node_modules/@hono/node-server/dist/index.d.ts +0 -8
- package/node_modules/@hono/node-server/dist/index.js +0 -702
- package/node_modules/@hono/node-server/dist/listener.d.mts +0 -13
- package/node_modules/@hono/node-server/dist/listener.d.ts +0 -13
- package/node_modules/@hono/node-server/dist/listener.js +0 -670
- package/node_modules/@hono/node-server/dist/listener.mjs +0 -635
- package/node_modules/@hono/node-server/dist/request.d.mts +0 -25
- package/node_modules/@hono/node-server/dist/request.d.ts +0 -25
- package/node_modules/@hono/node-server/dist/request.js +0 -238
- package/node_modules/@hono/node-server/dist/request.mjs +0 -206
- package/node_modules/@hono/node-server/dist/response.d.mts +0 -26
- package/node_modules/@hono/node-server/dist/response.d.ts +0 -26
- package/node_modules/@hono/node-server/dist/response.js +0 -112
- package/node_modules/@hono/node-server/dist/response.mjs +0 -85
- package/node_modules/@hono/node-server/dist/serve-static.d.ts +0 -17
- package/node_modules/@hono/node-server/dist/serve-static.js +0 -177
- package/node_modules/@hono/node-server/dist/server.d.mts +0 -10
- package/node_modules/@hono/node-server/dist/server.d.ts +0 -10
- package/node_modules/@hono/node-server/dist/server.js +0 -696
- package/node_modules/@hono/node-server/dist/server.mjs +0 -660
- package/node_modules/@hono/node-server/dist/types.d.mts +0 -44
- package/node_modules/@hono/node-server/dist/types.d.ts +0 -44
- package/node_modules/@hono/node-server/dist/types.js +0 -18
- package/node_modules/@hono/node-server/dist/types.mjs +0 -0
- package/node_modules/@hono/node-server/dist/utils/response/constants.d.mts +0 -3
- package/node_modules/@hono/node-server/dist/utils/response/constants.d.ts +0 -3
- package/node_modules/@hono/node-server/dist/utils/response/constants.js +0 -30
- package/node_modules/@hono/node-server/dist/utils/response/constants.mjs +0 -5
- package/node_modules/@hono/node-server/dist/utils/response.d.ts +0 -3
- package/node_modules/@hono/node-server/dist/utils/response.js +0 -37
- package/node_modules/@hono/node-server/dist/utils.d.mts +0 -9
- package/node_modules/@hono/node-server/dist/utils.d.ts +0 -9
- package/node_modules/@hono/node-server/dist/utils.js +0 -99
- package/node_modules/@hono/node-server/dist/utils.mjs +0 -71
- package/node_modules/@hono/node-server/dist/vercel.d.mts +0 -7
- package/node_modules/@hono/node-server/dist/vercel.d.ts +0 -7
- package/node_modules/@hono/node-server/dist/vercel.js +0 -677
- package/node_modules/@hono/node-server/dist/vercel.mjs +0 -640
- package/node_modules/jose/dist/webapi/lib/aesgcmkw.js +0 -15
- package/node_modules/jose/dist/webapi/lib/aeskw.js +0 -25
- package/node_modules/jose/dist/webapi/lib/check_key_type.js +0 -122
- package/node_modules/jose/dist/webapi/lib/ecdhes.js +0 -52
- package/node_modules/jose/dist/webapi/lib/key_to_jwk.js +0 -31
- package/node_modules/jose/dist/webapi/lib/normalize_key.js +0 -166
- package/node_modules/jose/dist/webapi/lib/pbes2kw.js +0 -42
- package/node_modules/jose/dist/webapi/lib/rsaes.js +0 -24
- package/node_modules/jose/dist/webapi/lib/validate_algorithms.js +0 -10
- package/node_modules/jose/dist/webapi/lib/validate_crit.js +0 -33
- package/node_modules/process-warning/types/index.test-d.ts +0 -36
|
@@ -1,238 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/request.ts
|
|
21
|
-
var request_exports = {};
|
|
22
|
-
__export(request_exports, {
|
|
23
|
-
GlobalRequest: () => GlobalRequest,
|
|
24
|
-
Request: () => Request,
|
|
25
|
-
RequestError: () => RequestError,
|
|
26
|
-
abortControllerKey: () => abortControllerKey,
|
|
27
|
-
getAbortController: () => getAbortController,
|
|
28
|
-
newRequest: () => newRequest,
|
|
29
|
-
toRequestError: () => toRequestError,
|
|
30
|
-
wrapBodyStream: () => wrapBodyStream
|
|
31
|
-
});
|
|
32
|
-
module.exports = __toCommonJS(request_exports);
|
|
33
|
-
var import_node_http2 = require("http2");
|
|
34
|
-
var import_node_stream = require("stream");
|
|
35
|
-
var RequestError = class extends Error {
|
|
36
|
-
constructor(message, options) {
|
|
37
|
-
super(message, options);
|
|
38
|
-
this.name = "RequestError";
|
|
39
|
-
}
|
|
40
|
-
};
|
|
41
|
-
var toRequestError = (e) => {
|
|
42
|
-
if (e instanceof RequestError) {
|
|
43
|
-
return e;
|
|
44
|
-
}
|
|
45
|
-
return new RequestError(e.message, { cause: e });
|
|
46
|
-
};
|
|
47
|
-
var GlobalRequest = global.Request;
|
|
48
|
-
var Request = class extends GlobalRequest {
|
|
49
|
-
constructor(input, options) {
|
|
50
|
-
if (typeof input === "object" && getRequestCache in input) {
|
|
51
|
-
input = input[getRequestCache]();
|
|
52
|
-
}
|
|
53
|
-
if (typeof options?.body?.getReader !== "undefined") {
|
|
54
|
-
;
|
|
55
|
-
options.duplex ??= "half";
|
|
56
|
-
}
|
|
57
|
-
super(input, options);
|
|
58
|
-
}
|
|
59
|
-
};
|
|
60
|
-
var newHeadersFromIncoming = (incoming) => {
|
|
61
|
-
const headerRecord = [];
|
|
62
|
-
const rawHeaders = incoming.rawHeaders;
|
|
63
|
-
for (let i = 0; i < rawHeaders.length; i += 2) {
|
|
64
|
-
const { [i]: key, [i + 1]: value } = rawHeaders;
|
|
65
|
-
if (key.charCodeAt(0) !== /*:*/
|
|
66
|
-
58) {
|
|
67
|
-
headerRecord.push([key, value]);
|
|
68
|
-
}
|
|
69
|
-
}
|
|
70
|
-
return new Headers(headerRecord);
|
|
71
|
-
};
|
|
72
|
-
var wrapBodyStream = Symbol("wrapBodyStream");
|
|
73
|
-
var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
|
|
74
|
-
const init = {
|
|
75
|
-
method,
|
|
76
|
-
headers,
|
|
77
|
-
signal: abortController.signal
|
|
78
|
-
};
|
|
79
|
-
if (method === "TRACE") {
|
|
80
|
-
init.method = "GET";
|
|
81
|
-
const req = new Request(url, init);
|
|
82
|
-
Object.defineProperty(req, "method", {
|
|
83
|
-
get() {
|
|
84
|
-
return "TRACE";
|
|
85
|
-
}
|
|
86
|
-
});
|
|
87
|
-
return req;
|
|
88
|
-
}
|
|
89
|
-
if (!(method === "GET" || method === "HEAD")) {
|
|
90
|
-
if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
|
|
91
|
-
init.body = new ReadableStream({
|
|
92
|
-
start(controller) {
|
|
93
|
-
controller.enqueue(incoming.rawBody);
|
|
94
|
-
controller.close();
|
|
95
|
-
}
|
|
96
|
-
});
|
|
97
|
-
} else if (incoming[wrapBodyStream]) {
|
|
98
|
-
let reader;
|
|
99
|
-
init.body = new ReadableStream({
|
|
100
|
-
async pull(controller) {
|
|
101
|
-
try {
|
|
102
|
-
reader ||= import_node_stream.Readable.toWeb(incoming).getReader();
|
|
103
|
-
const { done, value } = await reader.read();
|
|
104
|
-
if (done) {
|
|
105
|
-
controller.close();
|
|
106
|
-
} else {
|
|
107
|
-
controller.enqueue(value);
|
|
108
|
-
}
|
|
109
|
-
} catch (error) {
|
|
110
|
-
controller.error(error);
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
});
|
|
114
|
-
} else {
|
|
115
|
-
init.body = import_node_stream.Readable.toWeb(incoming);
|
|
116
|
-
}
|
|
117
|
-
}
|
|
118
|
-
return new Request(url, init);
|
|
119
|
-
};
|
|
120
|
-
var getRequestCache = Symbol("getRequestCache");
|
|
121
|
-
var requestCache = Symbol("requestCache");
|
|
122
|
-
var incomingKey = Symbol("incomingKey");
|
|
123
|
-
var urlKey = Symbol("urlKey");
|
|
124
|
-
var headersKey = Symbol("headersKey");
|
|
125
|
-
var abortControllerKey = Symbol("abortControllerKey");
|
|
126
|
-
var getAbortController = Symbol("getAbortController");
|
|
127
|
-
var requestPrototype = {
|
|
128
|
-
get method() {
|
|
129
|
-
return this[incomingKey].method || "GET";
|
|
130
|
-
},
|
|
131
|
-
get url() {
|
|
132
|
-
return this[urlKey];
|
|
133
|
-
},
|
|
134
|
-
get headers() {
|
|
135
|
-
return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
|
|
136
|
-
},
|
|
137
|
-
[getAbortController]() {
|
|
138
|
-
this[getRequestCache]();
|
|
139
|
-
return this[abortControllerKey];
|
|
140
|
-
},
|
|
141
|
-
[getRequestCache]() {
|
|
142
|
-
this[abortControllerKey] ||= new AbortController();
|
|
143
|
-
return this[requestCache] ||= newRequestFromIncoming(
|
|
144
|
-
this.method,
|
|
145
|
-
this[urlKey],
|
|
146
|
-
this.headers,
|
|
147
|
-
this[incomingKey],
|
|
148
|
-
this[abortControllerKey]
|
|
149
|
-
);
|
|
150
|
-
}
|
|
151
|
-
};
|
|
152
|
-
[
|
|
153
|
-
"body",
|
|
154
|
-
"bodyUsed",
|
|
155
|
-
"cache",
|
|
156
|
-
"credentials",
|
|
157
|
-
"destination",
|
|
158
|
-
"integrity",
|
|
159
|
-
"mode",
|
|
160
|
-
"redirect",
|
|
161
|
-
"referrer",
|
|
162
|
-
"referrerPolicy",
|
|
163
|
-
"signal",
|
|
164
|
-
"keepalive"
|
|
165
|
-
].forEach((k) => {
|
|
166
|
-
Object.defineProperty(requestPrototype, k, {
|
|
167
|
-
get() {
|
|
168
|
-
return this[getRequestCache]()[k];
|
|
169
|
-
}
|
|
170
|
-
});
|
|
171
|
-
});
|
|
172
|
-
["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
|
|
173
|
-
Object.defineProperty(requestPrototype, k, {
|
|
174
|
-
value: function() {
|
|
175
|
-
return this[getRequestCache]()[k]();
|
|
176
|
-
}
|
|
177
|
-
});
|
|
178
|
-
});
|
|
179
|
-
Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
180
|
-
value: function(depth, options, inspectFn) {
|
|
181
|
-
const props = {
|
|
182
|
-
method: this.method,
|
|
183
|
-
url: this.url,
|
|
184
|
-
headers: this.headers,
|
|
185
|
-
nativeRequest: this[requestCache]
|
|
186
|
-
};
|
|
187
|
-
return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
188
|
-
}
|
|
189
|
-
});
|
|
190
|
-
Object.setPrototypeOf(requestPrototype, Request.prototype);
|
|
191
|
-
var newRequest = (incoming, defaultHostname) => {
|
|
192
|
-
const req = Object.create(requestPrototype);
|
|
193
|
-
req[incomingKey] = incoming;
|
|
194
|
-
const incomingUrl = incoming.url || "";
|
|
195
|
-
if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
|
|
196
|
-
(incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
|
|
197
|
-
if (incoming instanceof import_node_http2.Http2ServerRequest) {
|
|
198
|
-
throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
|
|
199
|
-
}
|
|
200
|
-
try {
|
|
201
|
-
const url2 = new URL(incomingUrl);
|
|
202
|
-
req[urlKey] = url2.href;
|
|
203
|
-
} catch (e) {
|
|
204
|
-
throw new RequestError("Invalid absolute URL", { cause: e });
|
|
205
|
-
}
|
|
206
|
-
return req;
|
|
207
|
-
}
|
|
208
|
-
const host = (incoming instanceof import_node_http2.Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
|
|
209
|
-
if (!host) {
|
|
210
|
-
throw new RequestError("Missing host header");
|
|
211
|
-
}
|
|
212
|
-
let scheme;
|
|
213
|
-
if (incoming instanceof import_node_http2.Http2ServerRequest) {
|
|
214
|
-
scheme = incoming.scheme;
|
|
215
|
-
if (!(scheme === "http" || scheme === "https")) {
|
|
216
|
-
throw new RequestError("Unsupported scheme");
|
|
217
|
-
}
|
|
218
|
-
} else {
|
|
219
|
-
scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
|
|
220
|
-
}
|
|
221
|
-
const url = new URL(`${scheme}://${host}${incomingUrl}`);
|
|
222
|
-
if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
|
|
223
|
-
throw new RequestError("Invalid host header");
|
|
224
|
-
}
|
|
225
|
-
req[urlKey] = url.href;
|
|
226
|
-
return req;
|
|
227
|
-
};
|
|
228
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
229
|
-
0 && (module.exports = {
|
|
230
|
-
GlobalRequest,
|
|
231
|
-
Request,
|
|
232
|
-
RequestError,
|
|
233
|
-
abortControllerKey,
|
|
234
|
-
getAbortController,
|
|
235
|
-
newRequest,
|
|
236
|
-
toRequestError,
|
|
237
|
-
wrapBodyStream
|
|
238
|
-
});
|
|
@@ -1,206 +0,0 @@
|
|
|
1
|
-
// src/request.ts
|
|
2
|
-
import { Http2ServerRequest } from "http2";
|
|
3
|
-
import { Readable } from "stream";
|
|
4
|
-
var RequestError = class extends Error {
|
|
5
|
-
constructor(message, options) {
|
|
6
|
-
super(message, options);
|
|
7
|
-
this.name = "RequestError";
|
|
8
|
-
}
|
|
9
|
-
};
|
|
10
|
-
var toRequestError = (e) => {
|
|
11
|
-
if (e instanceof RequestError) {
|
|
12
|
-
return e;
|
|
13
|
-
}
|
|
14
|
-
return new RequestError(e.message, { cause: e });
|
|
15
|
-
};
|
|
16
|
-
var GlobalRequest = global.Request;
|
|
17
|
-
var Request = class extends GlobalRequest {
|
|
18
|
-
constructor(input, options) {
|
|
19
|
-
if (typeof input === "object" && getRequestCache in input) {
|
|
20
|
-
input = input[getRequestCache]();
|
|
21
|
-
}
|
|
22
|
-
if (typeof options?.body?.getReader !== "undefined") {
|
|
23
|
-
;
|
|
24
|
-
options.duplex ??= "half";
|
|
25
|
-
}
|
|
26
|
-
super(input, options);
|
|
27
|
-
}
|
|
28
|
-
};
|
|
29
|
-
var newHeadersFromIncoming = (incoming) => {
|
|
30
|
-
const headerRecord = [];
|
|
31
|
-
const rawHeaders = incoming.rawHeaders;
|
|
32
|
-
for (let i = 0; i < rawHeaders.length; i += 2) {
|
|
33
|
-
const { [i]: key, [i + 1]: value } = rawHeaders;
|
|
34
|
-
if (key.charCodeAt(0) !== /*:*/
|
|
35
|
-
58) {
|
|
36
|
-
headerRecord.push([key, value]);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
return new Headers(headerRecord);
|
|
40
|
-
};
|
|
41
|
-
var wrapBodyStream = Symbol("wrapBodyStream");
|
|
42
|
-
var newRequestFromIncoming = (method, url, headers, incoming, abortController) => {
|
|
43
|
-
const init = {
|
|
44
|
-
method,
|
|
45
|
-
headers,
|
|
46
|
-
signal: abortController.signal
|
|
47
|
-
};
|
|
48
|
-
if (method === "TRACE") {
|
|
49
|
-
init.method = "GET";
|
|
50
|
-
const req = new Request(url, init);
|
|
51
|
-
Object.defineProperty(req, "method", {
|
|
52
|
-
get() {
|
|
53
|
-
return "TRACE";
|
|
54
|
-
}
|
|
55
|
-
});
|
|
56
|
-
return req;
|
|
57
|
-
}
|
|
58
|
-
if (!(method === "GET" || method === "HEAD")) {
|
|
59
|
-
if ("rawBody" in incoming && incoming.rawBody instanceof Buffer) {
|
|
60
|
-
init.body = new ReadableStream({
|
|
61
|
-
start(controller) {
|
|
62
|
-
controller.enqueue(incoming.rawBody);
|
|
63
|
-
controller.close();
|
|
64
|
-
}
|
|
65
|
-
});
|
|
66
|
-
} else if (incoming[wrapBodyStream]) {
|
|
67
|
-
let reader;
|
|
68
|
-
init.body = new ReadableStream({
|
|
69
|
-
async pull(controller) {
|
|
70
|
-
try {
|
|
71
|
-
reader ||= Readable.toWeb(incoming).getReader();
|
|
72
|
-
const { done, value } = await reader.read();
|
|
73
|
-
if (done) {
|
|
74
|
-
controller.close();
|
|
75
|
-
} else {
|
|
76
|
-
controller.enqueue(value);
|
|
77
|
-
}
|
|
78
|
-
} catch (error) {
|
|
79
|
-
controller.error(error);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
});
|
|
83
|
-
} else {
|
|
84
|
-
init.body = Readable.toWeb(incoming);
|
|
85
|
-
}
|
|
86
|
-
}
|
|
87
|
-
return new Request(url, init);
|
|
88
|
-
};
|
|
89
|
-
var getRequestCache = Symbol("getRequestCache");
|
|
90
|
-
var requestCache = Symbol("requestCache");
|
|
91
|
-
var incomingKey = Symbol("incomingKey");
|
|
92
|
-
var urlKey = Symbol("urlKey");
|
|
93
|
-
var headersKey = Symbol("headersKey");
|
|
94
|
-
var abortControllerKey = Symbol("abortControllerKey");
|
|
95
|
-
var getAbortController = Symbol("getAbortController");
|
|
96
|
-
var requestPrototype = {
|
|
97
|
-
get method() {
|
|
98
|
-
return this[incomingKey].method || "GET";
|
|
99
|
-
},
|
|
100
|
-
get url() {
|
|
101
|
-
return this[urlKey];
|
|
102
|
-
},
|
|
103
|
-
get headers() {
|
|
104
|
-
return this[headersKey] ||= newHeadersFromIncoming(this[incomingKey]);
|
|
105
|
-
},
|
|
106
|
-
[getAbortController]() {
|
|
107
|
-
this[getRequestCache]();
|
|
108
|
-
return this[abortControllerKey];
|
|
109
|
-
},
|
|
110
|
-
[getRequestCache]() {
|
|
111
|
-
this[abortControllerKey] ||= new AbortController();
|
|
112
|
-
return this[requestCache] ||= newRequestFromIncoming(
|
|
113
|
-
this.method,
|
|
114
|
-
this[urlKey],
|
|
115
|
-
this.headers,
|
|
116
|
-
this[incomingKey],
|
|
117
|
-
this[abortControllerKey]
|
|
118
|
-
);
|
|
119
|
-
}
|
|
120
|
-
};
|
|
121
|
-
[
|
|
122
|
-
"body",
|
|
123
|
-
"bodyUsed",
|
|
124
|
-
"cache",
|
|
125
|
-
"credentials",
|
|
126
|
-
"destination",
|
|
127
|
-
"integrity",
|
|
128
|
-
"mode",
|
|
129
|
-
"redirect",
|
|
130
|
-
"referrer",
|
|
131
|
-
"referrerPolicy",
|
|
132
|
-
"signal",
|
|
133
|
-
"keepalive"
|
|
134
|
-
].forEach((k) => {
|
|
135
|
-
Object.defineProperty(requestPrototype, k, {
|
|
136
|
-
get() {
|
|
137
|
-
return this[getRequestCache]()[k];
|
|
138
|
-
}
|
|
139
|
-
});
|
|
140
|
-
});
|
|
141
|
-
["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
|
|
142
|
-
Object.defineProperty(requestPrototype, k, {
|
|
143
|
-
value: function() {
|
|
144
|
-
return this[getRequestCache]()[k]();
|
|
145
|
-
}
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
Object.defineProperty(requestPrototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
149
|
-
value: function(depth, options, inspectFn) {
|
|
150
|
-
const props = {
|
|
151
|
-
method: this.method,
|
|
152
|
-
url: this.url,
|
|
153
|
-
headers: this.headers,
|
|
154
|
-
nativeRequest: this[requestCache]
|
|
155
|
-
};
|
|
156
|
-
return `Request (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
157
|
-
}
|
|
158
|
-
});
|
|
159
|
-
Object.setPrototypeOf(requestPrototype, Request.prototype);
|
|
160
|
-
var newRequest = (incoming, defaultHostname) => {
|
|
161
|
-
const req = Object.create(requestPrototype);
|
|
162
|
-
req[incomingKey] = incoming;
|
|
163
|
-
const incomingUrl = incoming.url || "";
|
|
164
|
-
if (incomingUrl[0] !== "/" && // short-circuit for performance. most requests are relative URL.
|
|
165
|
-
(incomingUrl.startsWith("http://") || incomingUrl.startsWith("https://"))) {
|
|
166
|
-
if (incoming instanceof Http2ServerRequest) {
|
|
167
|
-
throw new RequestError("Absolute URL for :path is not allowed in HTTP/2");
|
|
168
|
-
}
|
|
169
|
-
try {
|
|
170
|
-
const url2 = new URL(incomingUrl);
|
|
171
|
-
req[urlKey] = url2.href;
|
|
172
|
-
} catch (e) {
|
|
173
|
-
throw new RequestError("Invalid absolute URL", { cause: e });
|
|
174
|
-
}
|
|
175
|
-
return req;
|
|
176
|
-
}
|
|
177
|
-
const host = (incoming instanceof Http2ServerRequest ? incoming.authority : incoming.headers.host) || defaultHostname;
|
|
178
|
-
if (!host) {
|
|
179
|
-
throw new RequestError("Missing host header");
|
|
180
|
-
}
|
|
181
|
-
let scheme;
|
|
182
|
-
if (incoming instanceof Http2ServerRequest) {
|
|
183
|
-
scheme = incoming.scheme;
|
|
184
|
-
if (!(scheme === "http" || scheme === "https")) {
|
|
185
|
-
throw new RequestError("Unsupported scheme");
|
|
186
|
-
}
|
|
187
|
-
} else {
|
|
188
|
-
scheme = incoming.socket && incoming.socket.encrypted ? "https" : "http";
|
|
189
|
-
}
|
|
190
|
-
const url = new URL(`${scheme}://${host}${incomingUrl}`);
|
|
191
|
-
if (url.hostname.length !== host.length && url.hostname !== host.replace(/:\d+$/, "")) {
|
|
192
|
-
throw new RequestError("Invalid host header");
|
|
193
|
-
}
|
|
194
|
-
req[urlKey] = url.href;
|
|
195
|
-
return req;
|
|
196
|
-
};
|
|
197
|
-
export {
|
|
198
|
-
GlobalRequest,
|
|
199
|
-
Request,
|
|
200
|
-
RequestError,
|
|
201
|
-
abortControllerKey,
|
|
202
|
-
getAbortController,
|
|
203
|
-
newRequest,
|
|
204
|
-
toRequestError,
|
|
205
|
-
wrapBodyStream
|
|
206
|
-
};
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { OutgoingHttpHeaders } from 'node:http';
|
|
2
|
-
|
|
3
|
-
declare const getResponseCache: unique symbol;
|
|
4
|
-
declare const cacheKey: unique symbol;
|
|
5
|
-
type InternalCache = [
|
|
6
|
-
number,
|
|
7
|
-
string | ReadableStream,
|
|
8
|
-
Record<string, string> | [string, string][] | Headers | OutgoingHttpHeaders | undefined
|
|
9
|
-
];
|
|
10
|
-
declare const GlobalResponse: {
|
|
11
|
-
new (body?: BodyInit | null, init?: ResponseInit): globalThis.Response;
|
|
12
|
-
prototype: globalThis.Response;
|
|
13
|
-
error(): globalThis.Response;
|
|
14
|
-
json(data: any, init?: ResponseInit): globalThis.Response;
|
|
15
|
-
redirect(url: string | URL, status?: number): globalThis.Response;
|
|
16
|
-
};
|
|
17
|
-
declare class Response {
|
|
18
|
-
#private;
|
|
19
|
-
[getResponseCache](): globalThis.Response;
|
|
20
|
-
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
21
|
-
get headers(): Headers;
|
|
22
|
-
get status(): number;
|
|
23
|
-
get ok(): boolean;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { GlobalResponse, type InternalCache, Response, cacheKey };
|
|
@@ -1,26 +0,0 @@
|
|
|
1
|
-
import { OutgoingHttpHeaders } from 'node:http';
|
|
2
|
-
|
|
3
|
-
declare const getResponseCache: unique symbol;
|
|
4
|
-
declare const cacheKey: unique symbol;
|
|
5
|
-
type InternalCache = [
|
|
6
|
-
number,
|
|
7
|
-
string | ReadableStream,
|
|
8
|
-
Record<string, string> | [string, string][] | Headers | OutgoingHttpHeaders | undefined
|
|
9
|
-
];
|
|
10
|
-
declare const GlobalResponse: {
|
|
11
|
-
new (body?: BodyInit | null, init?: ResponseInit): globalThis.Response;
|
|
12
|
-
prototype: globalThis.Response;
|
|
13
|
-
error(): globalThis.Response;
|
|
14
|
-
json(data: any, init?: ResponseInit): globalThis.Response;
|
|
15
|
-
redirect(url: string | URL, status?: number): globalThis.Response;
|
|
16
|
-
};
|
|
17
|
-
declare class Response {
|
|
18
|
-
#private;
|
|
19
|
-
[getResponseCache](): globalThis.Response;
|
|
20
|
-
constructor(body?: BodyInit | null, init?: ResponseInit);
|
|
21
|
-
get headers(): Headers;
|
|
22
|
-
get status(): number;
|
|
23
|
-
get ok(): boolean;
|
|
24
|
-
}
|
|
25
|
-
|
|
26
|
-
export { GlobalResponse, type InternalCache, Response, cacheKey };
|
|
@@ -1,112 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __defProp = Object.defineProperty;
|
|
3
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
4
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
5
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
6
|
-
var __export = (target, all) => {
|
|
7
|
-
for (var name in all)
|
|
8
|
-
__defProp(target, name, { get: all[name], enumerable: true });
|
|
9
|
-
};
|
|
10
|
-
var __copyProps = (to, from, except, desc) => {
|
|
11
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12
|
-
for (let key of __getOwnPropNames(from))
|
|
13
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
14
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
15
|
-
}
|
|
16
|
-
return to;
|
|
17
|
-
};
|
|
18
|
-
var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod);
|
|
19
|
-
|
|
20
|
-
// src/response.ts
|
|
21
|
-
var response_exports = {};
|
|
22
|
-
__export(response_exports, {
|
|
23
|
-
GlobalResponse: () => GlobalResponse,
|
|
24
|
-
Response: () => Response,
|
|
25
|
-
cacheKey: () => cacheKey
|
|
26
|
-
});
|
|
27
|
-
module.exports = __toCommonJS(response_exports);
|
|
28
|
-
var responseCache = Symbol("responseCache");
|
|
29
|
-
var getResponseCache = Symbol("getResponseCache");
|
|
30
|
-
var cacheKey = Symbol("cache");
|
|
31
|
-
var GlobalResponse = global.Response;
|
|
32
|
-
var Response = class _Response {
|
|
33
|
-
#body;
|
|
34
|
-
#init;
|
|
35
|
-
[getResponseCache]() {
|
|
36
|
-
delete this[cacheKey];
|
|
37
|
-
return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
|
|
38
|
-
}
|
|
39
|
-
constructor(body, init) {
|
|
40
|
-
let headers;
|
|
41
|
-
this.#body = body;
|
|
42
|
-
if (init instanceof _Response) {
|
|
43
|
-
const cachedGlobalResponse = init[responseCache];
|
|
44
|
-
if (cachedGlobalResponse) {
|
|
45
|
-
this.#init = cachedGlobalResponse;
|
|
46
|
-
this[getResponseCache]();
|
|
47
|
-
return;
|
|
48
|
-
} else {
|
|
49
|
-
this.#init = init.#init;
|
|
50
|
-
headers = new Headers(init.#init.headers);
|
|
51
|
-
}
|
|
52
|
-
} else {
|
|
53
|
-
this.#init = init;
|
|
54
|
-
}
|
|
55
|
-
if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
|
|
56
|
-
;
|
|
57
|
-
this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
get headers() {
|
|
61
|
-
const cache = this[cacheKey];
|
|
62
|
-
if (cache) {
|
|
63
|
-
if (!(cache[2] instanceof Headers)) {
|
|
64
|
-
cache[2] = new Headers(
|
|
65
|
-
cache[2] || { "content-type": "text/plain; charset=UTF-8" }
|
|
66
|
-
);
|
|
67
|
-
}
|
|
68
|
-
return cache[2];
|
|
69
|
-
}
|
|
70
|
-
return this[getResponseCache]().headers;
|
|
71
|
-
}
|
|
72
|
-
get status() {
|
|
73
|
-
return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
|
|
74
|
-
}
|
|
75
|
-
get ok() {
|
|
76
|
-
const status = this.status;
|
|
77
|
-
return status >= 200 && status < 300;
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
|
|
81
|
-
Object.defineProperty(Response.prototype, k, {
|
|
82
|
-
get() {
|
|
83
|
-
return this[getResponseCache]()[k];
|
|
84
|
-
}
|
|
85
|
-
});
|
|
86
|
-
});
|
|
87
|
-
["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
|
|
88
|
-
Object.defineProperty(Response.prototype, k, {
|
|
89
|
-
value: function() {
|
|
90
|
-
return this[getResponseCache]()[k]();
|
|
91
|
-
}
|
|
92
|
-
});
|
|
93
|
-
});
|
|
94
|
-
Object.defineProperty(Response.prototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
95
|
-
value: function(depth, options, inspectFn) {
|
|
96
|
-
const props = {
|
|
97
|
-
status: this.status,
|
|
98
|
-
headers: this.headers,
|
|
99
|
-
ok: this.ok,
|
|
100
|
-
nativeResponse: this[responseCache]
|
|
101
|
-
};
|
|
102
|
-
return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
103
|
-
}
|
|
104
|
-
});
|
|
105
|
-
Object.setPrototypeOf(Response, GlobalResponse);
|
|
106
|
-
Object.setPrototypeOf(Response.prototype, GlobalResponse.prototype);
|
|
107
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
108
|
-
0 && (module.exports = {
|
|
109
|
-
GlobalResponse,
|
|
110
|
-
Response,
|
|
111
|
-
cacheKey
|
|
112
|
-
});
|
|
@@ -1,85 +0,0 @@
|
|
|
1
|
-
// src/response.ts
|
|
2
|
-
var responseCache = Symbol("responseCache");
|
|
3
|
-
var getResponseCache = Symbol("getResponseCache");
|
|
4
|
-
var cacheKey = Symbol("cache");
|
|
5
|
-
var GlobalResponse = global.Response;
|
|
6
|
-
var Response = class _Response {
|
|
7
|
-
#body;
|
|
8
|
-
#init;
|
|
9
|
-
[getResponseCache]() {
|
|
10
|
-
delete this[cacheKey];
|
|
11
|
-
return this[responseCache] ||= new GlobalResponse(this.#body, this.#init);
|
|
12
|
-
}
|
|
13
|
-
constructor(body, init) {
|
|
14
|
-
let headers;
|
|
15
|
-
this.#body = body;
|
|
16
|
-
if (init instanceof _Response) {
|
|
17
|
-
const cachedGlobalResponse = init[responseCache];
|
|
18
|
-
if (cachedGlobalResponse) {
|
|
19
|
-
this.#init = cachedGlobalResponse;
|
|
20
|
-
this[getResponseCache]();
|
|
21
|
-
return;
|
|
22
|
-
} else {
|
|
23
|
-
this.#init = init.#init;
|
|
24
|
-
headers = new Headers(init.#init.headers);
|
|
25
|
-
}
|
|
26
|
-
} else {
|
|
27
|
-
this.#init = init;
|
|
28
|
-
}
|
|
29
|
-
if (typeof body === "string" || typeof body?.getReader !== "undefined" || body instanceof Blob || body instanceof Uint8Array) {
|
|
30
|
-
;
|
|
31
|
-
this[cacheKey] = [init?.status || 200, body, headers || init?.headers];
|
|
32
|
-
}
|
|
33
|
-
}
|
|
34
|
-
get headers() {
|
|
35
|
-
const cache = this[cacheKey];
|
|
36
|
-
if (cache) {
|
|
37
|
-
if (!(cache[2] instanceof Headers)) {
|
|
38
|
-
cache[2] = new Headers(
|
|
39
|
-
cache[2] || { "content-type": "text/plain; charset=UTF-8" }
|
|
40
|
-
);
|
|
41
|
-
}
|
|
42
|
-
return cache[2];
|
|
43
|
-
}
|
|
44
|
-
return this[getResponseCache]().headers;
|
|
45
|
-
}
|
|
46
|
-
get status() {
|
|
47
|
-
return this[cacheKey]?.[0] ?? this[getResponseCache]().status;
|
|
48
|
-
}
|
|
49
|
-
get ok() {
|
|
50
|
-
const status = this.status;
|
|
51
|
-
return status >= 200 && status < 300;
|
|
52
|
-
}
|
|
53
|
-
};
|
|
54
|
-
["body", "bodyUsed", "redirected", "statusText", "trailers", "type", "url"].forEach((k) => {
|
|
55
|
-
Object.defineProperty(Response.prototype, k, {
|
|
56
|
-
get() {
|
|
57
|
-
return this[getResponseCache]()[k];
|
|
58
|
-
}
|
|
59
|
-
});
|
|
60
|
-
});
|
|
61
|
-
["arrayBuffer", "blob", "clone", "formData", "json", "text"].forEach((k) => {
|
|
62
|
-
Object.defineProperty(Response.prototype, k, {
|
|
63
|
-
value: function() {
|
|
64
|
-
return this[getResponseCache]()[k]();
|
|
65
|
-
}
|
|
66
|
-
});
|
|
67
|
-
});
|
|
68
|
-
Object.defineProperty(Response.prototype, Symbol.for("nodejs.util.inspect.custom"), {
|
|
69
|
-
value: function(depth, options, inspectFn) {
|
|
70
|
-
const props = {
|
|
71
|
-
status: this.status,
|
|
72
|
-
headers: this.headers,
|
|
73
|
-
ok: this.ok,
|
|
74
|
-
nativeResponse: this[responseCache]
|
|
75
|
-
};
|
|
76
|
-
return `Response (lightweight) ${inspectFn(props, { ...options, depth: depth == null ? null : depth - 1 })}`;
|
|
77
|
-
}
|
|
78
|
-
});
|
|
79
|
-
Object.setPrototypeOf(Response, GlobalResponse);
|
|
80
|
-
Object.setPrototypeOf(Response.prototype, GlobalResponse.prototype);
|
|
81
|
-
export {
|
|
82
|
-
GlobalResponse,
|
|
83
|
-
Response,
|
|
84
|
-
cacheKey
|
|
85
|
-
};
|