@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
|
@@ -15,15 +15,16 @@ import type { StatusCode } from '../../utils/http-status';
|
|
|
15
15
|
* @param {boolean} [options.wait=false] - A boolean indicating if Hono should wait for the Promise of the `cache.put` function to resolve before continuing with the request. Required to be true for the Deno environment.
|
|
16
16
|
* @param {string} [options.cacheControl] - A string of directives for the `Cache-Control` header.
|
|
17
17
|
* @param {string | string[]} [options.vary] - Adds the configured request headers to the cache key variants and sets the `Vary` header in the response. If the original response header already contains a `Vary` header, the values are merged, removing any duplicates.
|
|
18
|
-
* @param {Function} [options.keyGenerator] - Generates keys for every request in the `cacheName` store. This can be used to cache data based on request parameters or context parameters.
|
|
18
|
+
* @param {Function} [options.keyGenerator] - Generates keys for every request in the `cacheName` store. This can be used to cache data based on request parameters or context parameters. QUERY keys additionally include a digest of the request content and its representation metadata.
|
|
19
|
+
* @param {number} [options.maxQueryBodySize=65536] - The maximum QUERY request body size in bytes that can be cached. Larger QUERY requests bypass the cache.
|
|
19
20
|
* @param {number[]} [options.cacheableStatusCodes=[200]] - An array of status codes that can be cached.
|
|
20
|
-
* @param {Function | false} [options.onCacheNotAvailable] - A callback invoked when `globalThis.caches` is not available. By default,
|
|
21
|
+
* @param {Function | false} [options.onCacheNotAvailable] - A callback invoked with the reason when `globalThis.caches` is not available or QUERY caching cannot use Web Crypto. By default, the reason is logged to the console. Set to `false` to suppress the log, or provide a custom function.
|
|
21
22
|
* @returns {MiddlewareHandler} The middleware handler function.
|
|
22
23
|
* @throws {Error} If the `vary` option includes "*".
|
|
23
24
|
*
|
|
24
25
|
* @example
|
|
25
26
|
* ```ts
|
|
26
|
-
* app.
|
|
27
|
+
* app.use(
|
|
27
28
|
* '*',
|
|
28
29
|
* cache({
|
|
29
30
|
* cacheName: 'my-app',
|
|
@@ -38,6 +39,7 @@ export declare const cache: (options: {
|
|
|
38
39
|
cacheControl?: string;
|
|
39
40
|
vary?: string | string[];
|
|
40
41
|
keyGenerator?: (c: Context) => Promise<string> | string;
|
|
42
|
+
maxQueryBodySize?: number;
|
|
41
43
|
cacheableStatusCodes?: StatusCode[];
|
|
42
|
-
onCacheNotAvailable?: (() => void) | false;
|
|
44
|
+
onCacheNotAvailable?: ((reason: string) => void) | false;
|
|
43
45
|
}) => MiddlewareHandler;
|
|
@@ -71,7 +71,7 @@ export declare const every: (...middleware: (MiddlewareHandler | Condition)[]) =
|
|
|
71
71
|
* @example
|
|
72
72
|
* ```ts
|
|
73
73
|
* import { except } from 'hono/combine'
|
|
74
|
-
* import { bearerAuth } from 'hono/bearer-auth
|
|
74
|
+
* import { bearerAuth } from 'hono/bearer-auth'
|
|
75
75
|
*
|
|
76
76
|
* // If client is accessing public API, then skip authentication.
|
|
77
77
|
* // Otherwise, require a valid token.
|
|
@@ -19,7 +19,7 @@ type CORSOptions = {
|
|
|
19
19
|
*
|
|
20
20
|
* @param {CORSOptions} [options] - The options for the CORS middleware.
|
|
21
21
|
* @param {string | string[] | ((origin: string, c: Context) => Promise<string | undefined | null> | string | undefined | null)} [options.origin='*'] - The value of "Access-Control-Allow-Origin" CORS header.
|
|
22
|
-
* @param {string[] | ((origin: string, c: Context) => Promise<string[]> | string[])} [options.allowMethods=['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH']] - The value of "Access-Control-Allow-Methods" CORS header.
|
|
22
|
+
* @param {string[] | ((origin: string, c: Context) => Promise<string[]> | string[])} [options.allowMethods=['GET', 'HEAD', 'PUT', 'POST', 'DELETE', 'PATCH', 'QUERY']] - The value of "Access-Control-Allow-Methods" CORS header.
|
|
23
23
|
* @param {string[]} [options.allowHeaders=[]] - The value of "Access-Control-Allow-Headers" CORS header.
|
|
24
24
|
* @param {number} [options.maxAge] - The value of "Access-Control-Max-Age" CORS header.
|
|
25
25
|
* @param {boolean} [options.credentials] - The value of "Access-Control-Allow-Credentials" CORS header.
|
|
@@ -5,15 +5,15 @@
|
|
|
5
5
|
import type { Context, PropsForRenderer } from '../../context';
|
|
6
6
|
import type { FC, Context as JSXContext, PropsWithChildren } from '../../jsx';
|
|
7
7
|
import type { Env, Input, MiddlewareHandler } from '../../types';
|
|
8
|
-
import type { HtmlEscapedString } from '../../utils/html';
|
|
9
8
|
export declare const RequestContext: JSXContext<Context<any, any, {}> | null>;
|
|
10
9
|
type RendererOptions = {
|
|
11
10
|
docType?: boolean | string;
|
|
12
11
|
stream?: boolean | Record<string, string>;
|
|
13
12
|
};
|
|
13
|
+
type ComponentResult = Exclude<ReturnType<FC>, null>;
|
|
14
14
|
type ComponentWithChildren = (props: PropsWithChildren<PropsForRenderer & {
|
|
15
15
|
Layout: FC;
|
|
16
|
-
}>, c: Context) =>
|
|
16
|
+
}>, c: Context) => ComponentResult;
|
|
17
17
|
/**
|
|
18
18
|
* JSX Renderer Middleware for hono.
|
|
19
19
|
*
|
|
@@ -20,6 +20,7 @@ import type { VerifyOptions } from '../../utils/jwt/jwt';
|
|
|
20
20
|
* @param {boolean} [options.allow_anon] - If set to `true`, the middleware allows requests without a token to proceed without authentication.
|
|
21
21
|
* @param {string} [options.cookie] - If set, the middleware attempts to retrieve the token from a cookie with these options (optionally signed) only if no token is found in the header.
|
|
22
22
|
* @param {string} [options.headerName='Authorization'] - The name of the header to look for the JWT token. Default is 'Authorization'.
|
|
23
|
+
* @param {string} [options.realm] - The protection space described by the `realm` parameter of the returned `WWW-Authenticate` challenge header. Defaults to the request URL.
|
|
23
24
|
* @param {AsymmetricAlgorithm[]} options.alg - An array of allowed asymmetric algorithms for JWT verification. Only tokens signed with these algorithms will be accepted.
|
|
24
25
|
* @param {RequestInit} [init] - Optional init options for the `fetch` request when retrieving JWKS from a URI.
|
|
25
26
|
* @param {VerifyOptions} [options.verification] - Additional options for JWK payload verification.
|
|
@@ -50,5 +51,6 @@ export declare const jwk: (options: {
|
|
|
50
51
|
};
|
|
51
52
|
headerName?: string;
|
|
52
53
|
alg: AsymmetricAlgorithm[];
|
|
54
|
+
realm?: string;
|
|
53
55
|
verification?: VerifyOptions;
|
|
54
56
|
}, init?: RequestInit) => MiddlewareHandler;
|
|
@@ -21,6 +21,7 @@ export type JwtVariables<T = any> = {
|
|
|
21
21
|
* @param {string} [options.cookie] - If this value is set, then the value is retrieved from the cookie header using that value as a key, which is then validated as a token.
|
|
22
22
|
* @param {SignatureAlgorithm} options.alg - An algorithm type that is used for verifying (required). Available types are `HS256` | `HS384` | `HS512` | `RS256` | `RS384` | `RS512` | `PS256` | `PS384` | `PS512` | `ES256` | `ES384` | `ES512` | `EdDSA`.
|
|
23
23
|
* @param {string} [options.headerName='Authorization'] - The name of the header to look for the JWT token. Default is 'Authorization'.
|
|
24
|
+
* @param {string} [options.realm] - The protection space described by the `realm` parameter of the returned `WWW-Authenticate` challenge header. Defaults to the request URL.
|
|
24
25
|
* @param {VerifyOptions} [options.verification] - Additional options for JWT payload verification.
|
|
25
26
|
* @returns {MiddlewareHandler} The middleware handler function.
|
|
26
27
|
*
|
|
@@ -51,6 +52,7 @@ export declare const jwt: (options: {
|
|
|
51
52
|
};
|
|
52
53
|
alg: SignatureAlgorithm;
|
|
53
54
|
headerName?: string;
|
|
55
|
+
realm?: string;
|
|
54
56
|
verification?: VerifyOptions;
|
|
55
57
|
}) => MiddlewareHandler;
|
|
56
58
|
export declare const verifyWithJwks: (token: string, options: {
|
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @module
|
|
3
|
+
* Method Not Allowed Middleware for Hono.
|
|
4
|
+
*/
|
|
5
|
+
import type { Context } from '../../context';
|
|
6
|
+
import type { Hono } from '../../hono';
|
|
7
|
+
import type { Env, MiddlewareHandler } from '../../types';
|
|
8
|
+
type MethodNotAllowedHandler<E extends Env> = (c: Context<E>, allowedMethods: string[]) => Response | Promise<Response>;
|
|
9
|
+
type MethodNotAllowedOptions<E extends Env> = {
|
|
10
|
+
app: Hono<E, any, any>;
|
|
11
|
+
onMethodNotAllowed?: MethodNotAllowedHandler<E>;
|
|
12
|
+
};
|
|
13
|
+
/**
|
|
14
|
+
* Method Not Allowed Middleware for Hono.
|
|
15
|
+
*
|
|
16
|
+
* Returns a `405 Method Not Allowed` response with an `Allow` header when the request path
|
|
17
|
+
* matches a registered route but the request method is not supported.
|
|
18
|
+
*
|
|
19
|
+
* @param {MethodNotAllowedOptions} options - The options for the middleware.
|
|
20
|
+
* @param {Hono} options.app - The Hono instance used by the application.
|
|
21
|
+
* @param {MethodNotAllowedHandler} [options.onMethodNotAllowed] - Generates the response, including its `Allow` header.
|
|
22
|
+
* @returns {MiddlewareHandler} The middleware handler function.
|
|
23
|
+
*
|
|
24
|
+
* @example
|
|
25
|
+
* ```ts
|
|
26
|
+
* const app = new Hono()
|
|
27
|
+
*
|
|
28
|
+
* app.use(methodNotAllowed({ app }))
|
|
29
|
+
*
|
|
30
|
+
* app.get('/hello', (c) => c.text('Hello!'))
|
|
31
|
+
* app.post('/hello', (c) => c.text('Posted!'))
|
|
32
|
+
*
|
|
33
|
+
* // PUT /hello -> 405 Method Not Allowed
|
|
34
|
+
* // Allow: GET, HEAD, POST
|
|
35
|
+
* ```
|
|
36
|
+
*
|
|
37
|
+
* @example
|
|
38
|
+
* ```ts
|
|
39
|
+
* app.use(
|
|
40
|
+
* methodNotAllowed({
|
|
41
|
+
* app,
|
|
42
|
+
* onMethodNotAllowed: (c, methods) =>
|
|
43
|
+
* c.json({ error: 'Method Not Allowed' }, 405, { Allow: methods.join(', ') }),
|
|
44
|
+
* })
|
|
45
|
+
* )
|
|
46
|
+
* ```
|
|
47
|
+
*/
|
|
48
|
+
export declare const methodNotAllowed: <E extends Env = Env>(options: MethodNotAllowedOptions<E>) => MiddlewareHandler<E>;
|
|
49
|
+
export {};
|
|
@@ -5,6 +5,6 @@ export interface Context {
|
|
|
5
5
|
}
|
|
6
6
|
export declare class Node {
|
|
7
7
|
|
|
8
|
-
insert(tokens: readonly string[], index: number, paramMap: ParamAssocArray, context: Context,
|
|
8
|
+
insert(tokens: readonly string[], index: number, paramMap: ParamAssocArray, context: Context, isStatic: boolean): void;
|
|
9
9
|
buildRegExpStr(): string;
|
|
10
10
|
}
|
|
@@ -2,6 +2,7 @@ import type { ParamAssocArray } from './node';
|
|
|
2
2
|
export type ReplacementMap = number[];
|
|
3
3
|
export declare class Trie {
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
paths: Record<string, [number, ParamAssocArray]>;
|
|
6
|
+
insert(path: string, isStatic: boolean): void;
|
|
6
7
|
buildRegExp(): [RegExp, ReplacementMap, ReplacementMap];
|
|
7
8
|
}
|
|
@@ -13,7 +13,7 @@ export declare const METHOD_NAME_ALL_LOWERCASE: "all";
|
|
|
13
13
|
/**
|
|
14
14
|
* Array of supported HTTP methods.
|
|
15
15
|
*/
|
|
16
|
-
export declare const METHODS: readonly ["get", "post", "put", "delete", "options", "patch"];
|
|
16
|
+
export declare const METHODS: readonly ["get", "post", "put", "delete", "options", "patch", "query"];
|
|
17
17
|
/**
|
|
18
18
|
* Error message indicating that a route cannot be added because the matcher is already built.
|
|
19
19
|
*/
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
* @module
|
|
3
3
|
* HTTP Headers utility.
|
|
4
4
|
*/
|
|
5
|
-
export type RequestHeader = 'A-IM' | 'Accept' | 'Accept-Additions' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Datetime' | 'Accept-Encoding' | 'Accept-Features' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges' | 'Accept-Signature' | 'Access-Control' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Age' | 'Allow' | 'ALPN' | 'Alt-Svc' | 'Alt-Used' | 'Alternates' | 'AMP-Cache-Transform' | 'Apply-To-Redirect-Ref' | 'Authentication-Control' | 'Authentication-Info' | 'Authorization' | 'Available-Dictionary' | 'C-Ext' | 'C-Man' | 'C-Opt' | 'C-PEP' | 'C-PEP-Info' | 'Cache-Control' | 'Cache-Status' | 'Cal-Managed-ID' | 'CalDAV-Timezones' | 'Capsule-Protocol' | 'CDN-Cache-Control' | 'CDN-Loop' | 'Cert-Not-After' | 'Cert-Not-Before' | 'Clear-Site-Data' | 'Client-Cert' | 'Client-Cert-Chain' | 'Close' | 'CMCD-Object' | 'CMCD-Request' | 'CMCD-Session' | 'CMCD-Status' | 'CMSD-Dynamic' | 'CMSD-Static' | 'Concealed-Auth-Export' | 'Configuration-Context' | 'Connection' | 'Content-Base' | 'Content-Digest' | 'Content-Disposition' | 'Content-Encoding' | 'Content-ID' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-MD5' | 'Content-Range' | 'Content-Script-Type' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Style-Type' | 'Content-Type' | 'Content-Version' | 'Cookie' | 'Cookie2' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Embedder-Policy-Report-Only' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Opener-Policy-Report-Only' | 'Cross-Origin-Resource-Policy' | 'CTA-Common-Access-Token' | 'DASL' | 'Date' | 'DAV' | 'Default-Style' | 'Delta-Base' | 'Deprecation' | 'Depth' | 'Derived-From' | 'Destination' | 'Differential-ID' | 'Dictionary-ID' | 'Digest' | 'DPoP' | 'DPoP-Nonce' | 'Early-Data' | 'EDIINT-Features' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Ext' | 'Forwarded' | 'From' | 'GetProfile' | 'Hobareg' | 'Host' | 'HTTP2-Settings' | 'If' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Schedule-Tag-Match' | 'If-Unmodified-Since' | 'IM' | 'Include-Referred-Token-Binding-ID' | 'Isolation' | 'Keep-Alive' | 'Label' | 'Last-Event-ID' | 'Last-Modified' | 'Link' | 'Link-Template' | 'Location' | 'Lock-Token' | 'Man' | 'Max-Forwards' | 'Memento-Datetime' | 'Meter' | 'Method-Check' | 'Method-Check-Expires' | 'MIME-Version' | 'Negotiate' | 'NEL' | 'OData-EntityId' | 'OData-Isolation' | 'OData-MaxVersion' | 'OData-Version' | 'Opt' | 'Optional-WWW-Authenticate' | 'Ordering-Type' | 'Origin' | 'Origin-Agent-Cluster' | 'OSCORE' | 'OSLC-Core-Version' | 'Overwrite' | 'P3P' | 'PEP' | 'PEP-Info' | 'Permissions-Policy' | 'PICS-Label' | 'Ping-From' | 'Ping-To' | 'Position' | 'Pragma' | 'Prefer' | 'Preference-Applied' | 'Priority' | 'ProfileObject' | 'Protocol' | 'Protocol-Info' | 'Protocol-Query' | 'Protocol-Request' | 'Proxy-Authenticate' | 'Proxy-Authentication-Info' | 'Proxy-Authorization' | 'Proxy-Features' | 'Proxy-Instruction' | 'Proxy-Status' | 'Public' | 'Public-Key-Pins' | 'Public-Key-Pins-Report-Only' | 'Range' | 'Redirect-Ref' | 'Referer' | 'Referer-Root' | 'Referrer-Policy' | 'Refresh' | 'Repeatability-Client-ID' | 'Repeatability-First-Sent' | 'Repeatability-Request-ID' | 'Repeatability-Result' | 'Replay-Nonce' | 'Reporting-Endpoints' | 'Repr-Digest' | 'Retry-After' | 'Safe' | 'Schedule-Reply' | 'Schedule-Tag' | 'Sec-GPC' | 'Sec-Purpose' | 'Sec-Token-Binding' | 'Sec-WebSocket-Accept' | 'Sec-WebSocket-Extensions' | 'Sec-WebSocket-Key' | 'Sec-WebSocket-Protocol' | 'Sec-WebSocket-Version' | 'Security-Scheme' | 'Server' | 'Server-Timing' | 'Set-Cookie' | 'Set-Cookie2' | 'SetProfile' | 'Signature' | 'Signature-Input' | 'SLUG' | 'SoapAction' | 'Status-URI' | 'Strict-Transport-Security' | 'Sunset' | 'Surrogate-Capability' | 'Surrogate-Control' | 'TCN' | 'TE' | 'Timeout' | 'Timing-Allow-Origin' | 'Topic' | 'Traceparent' | 'Tracestate' | 'Trailer' | 'Transfer-Encoding' | 'TTL' | 'Upgrade' | 'Urgency' | 'URI' | 'Use-As-Dictionary' | 'User-Agent' | 'Variant-Vary' | 'Vary' | 'Via' | 'Want-Content-Digest' | 'Want-Digest' | 'Want-Repr-Digest' | 'Warning' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options';
|
|
6
|
-
export type ResponseHeader = 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Age' | 'Allow' | 'Cache-Control' | 'Clear-Site-Data' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'ETag' | 'Expires' | 'Last-Modified' | 'Location' | 'Permissions-Policy' | 'Pragma' | 'Retry-After' | 'Save-Data' | 'Sec-CH-Prefers-Color-Scheme' | 'Sec-CH-Prefers-Reduced-Motion' | 'Sec-CH-UA' | 'Sec-CH-UA-Arch' | 'Sec-CH-UA-Bitness' | 'Sec-CH-UA-Form-Factor' | 'Sec-CH-UA-Full-Version' | 'Sec-CH-UA-Full-Version-List' | 'Sec-CH-UA-Mobile' | 'Sec-CH-UA-Model' | 'Sec-CH-UA-Platform' | 'Sec-CH-UA-Platform-Version' | 'Sec-CH-UA-WoW64' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-GPC' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'Strict-Transport-Security' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Upgrade' | 'Vary' | '
|
|
5
|
+
export type RequestHeader = 'A-IM' | 'Accept' | 'Accept-Additions' | 'Accept-CH' | 'Accept-Charset' | 'Accept-Datetime' | 'Accept-Encoding' | 'Accept-Features' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Query' | 'Accept-Ranges' | 'Accept-Signature' | 'Access-Control' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Access-Control-Request-Headers' | 'Access-Control-Request-Method' | 'Activate-Storage-Access' | 'Age' | 'Allow' | 'ALPN' | 'Alt-Svc' | 'Alt-Used' | 'Alternates' | 'AMP-Cache-Transform' | 'Apply-To-Redirect-Ref' | 'Authentication-Control' | 'Authentication-Info' | 'Authorization' | 'Available-Dictionary' | 'C-Ext' | 'C-Man' | 'C-Opt' | 'C-PEP' | 'C-PEP-Info' | 'Cache-Control' | 'Cache-Group-Invalidation' | 'Cache-Groups' | 'Cache-Status' | 'Cal-Managed-ID' | 'CalDAV-Timezones' | 'Capsule-Protocol' | 'CDN-Cache-Control' | 'CDN-Loop' | 'Cert-Not-After' | 'Cert-Not-Before' | 'Clear-Site-Data' | 'Client-Cert' | 'Client-Cert-Chain' | 'Close' | 'CMCD-Object' | 'CMCD-Request' | 'CMCD-Session' | 'CMCD-Status' | 'CMSD-Dynamic' | 'CMSD-Static' | 'Concealed-Auth-Export' | 'Configuration-Context' | 'Connection' | 'Content-Base' | 'Content-Digest' | 'Content-Disposition' | 'Content-Encoding' | 'Content-ID' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-MD5' | 'Content-Range' | 'Content-Script-Type' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Style-Type' | 'Content-Type' | 'Content-Version' | 'Cookie' | 'Cookie2' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Embedder-Policy-Report-Only' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Opener-Policy-Report-Only' | 'Cross-Origin-Resource-Policy' | 'CTA-Common-Access-Token' | 'DASL' | 'Date' | 'DAV' | 'Default-Style' | 'Delta-Base' | 'Deprecation' | 'Depth' | 'Derived-From' | 'Destination' | 'Detached-JWS' | 'Differential-ID' | 'Dictionary-ID' | 'Digest' | 'DPoP' | 'DPoP-Nonce' | 'Early-Data' | 'EDIINT-Features' | 'ETag' | 'Expect' | 'Expect-CT' | 'Expires' | 'Ext' | 'Forwarded' | 'From' | 'GetProfile' | 'Hobareg' | 'Host' | 'HTTP2-Settings' | 'If' | 'If-Match' | 'If-Modified-Since' | 'If-None-Match' | 'If-Range' | 'If-Schedule-Tag-Match' | 'If-Unmodified-Since' | 'IM' | 'Include-Referred-Token-Binding-ID' | 'Incremental' | 'Isolation' | 'Keep-Alive' | 'Label' | 'Last-Event-ID' | 'Last-Modified' | 'Link' | 'Link-Template' | 'Location' | 'Lock-Token' | 'Man' | 'Max-Forwards' | 'Memento-Datetime' | 'Meter' | 'Method-Check' | 'Method-Check-Expires' | 'MIME-Version' | 'Negotiate' | 'NEL' | 'OData-EntityId' | 'OData-Isolation' | 'OData-MaxVersion' | 'OData-Version' | 'Opt' | 'Optional-WWW-Authenticate' | 'Ordering-Type' | 'Origin' | 'Origin-Agent-Cluster' | 'OSCORE' | 'OSLC-Core-Version' | 'Overwrite' | 'P3P' | 'PEP' | 'PEP-Info' | 'Permissions-Policy' | 'PICS-Label' | 'Ping-From' | 'Ping-To' | 'Position' | 'Pragma' | 'Prefer' | 'Preference-Applied' | 'Priority' | 'ProfileObject' | 'Protocol' | 'Protocol-Info' | 'Protocol-Query' | 'Protocol-Request' | 'Proxy-Authenticate' | 'Proxy-Authentication-Info' | 'Proxy-Authorization' | 'Proxy-Features' | 'Proxy-Instruction' | 'Proxy-Status' | 'Public' | 'Public-Key-Pins' | 'Public-Key-Pins-Report-Only' | 'Range' | 'Redirect-Ref' | 'Referer' | 'Referer-Root' | 'Referrer-Policy' | 'Refresh' | 'Repeatability-Client-ID' | 'Repeatability-First-Sent' | 'Repeatability-Request-ID' | 'Repeatability-Result' | 'Replay-Nonce' | 'Reporting-Endpoints' | 'Repr-Digest' | 'Retry-After' | 'Safe' | 'Schedule-Reply' | 'Schedule-Tag' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-Storage-Access' | 'Sec-Fetch-User' | 'Sec-GPC' | 'Sec-Purpose' | 'Sec-Token-Binding' | 'Sec-WebSocket-Accept' | 'Sec-WebSocket-Extensions' | 'Sec-WebSocket-Key' | 'Sec-WebSocket-Protocol' | 'Sec-WebSocket-Version' | 'Security-Scheme' | 'Server' | 'Server-Timing' | 'Set-Cookie' | 'Set-Cookie2' | 'Set-Txn' | 'SetProfile' | 'Signature' | 'Signature-Input' | 'SLUG' | 'SoapAction' | 'Status-URI' | 'Strict-Transport-Security' | 'Sunset' | 'Surrogate-Capability' | 'Surrogate-Control' | 'TCN' | 'TE' | 'Timeout' | 'Timing-Allow-Origin' | 'Topic' | 'Traceparent' | 'Tracestate' | 'Trailer' | 'Transfer-Encoding' | 'TTL' | 'Unencoded-Digest' | 'Upgrade' | 'Urgency' | 'URI' | 'Use-As-Dictionary' | 'User-Agent' | 'Variant-Vary' | 'Vary' | 'Via' | 'Want-Content-Digest' | 'Want-Digest' | 'Want-Repr-Digest' | 'Want-Unencoded-Digest' | 'Warning' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-Frame-Options';
|
|
6
|
+
export type ResponseHeader = 'Accept-Query' | 'Access-Control-Allow-Credentials' | 'Access-Control-Allow-Headers' | 'Access-Control-Allow-Methods' | 'Access-Control-Allow-Origin' | 'Access-Control-Expose-Headers' | 'Access-Control-Max-Age' | 'Activate-Storage-Access' | 'Age' | 'Allow' | 'Cache-Control' | 'Cache-Group-Invalidation' | 'Cache-Groups' | 'Clear-Site-Data' | 'Content-Disposition' | 'Content-Encoding' | 'Content-Language' | 'Content-Length' | 'Content-Location' | 'Content-Range' | 'Content-Security-Policy' | 'Content-Security-Policy-Report-Only' | 'Content-Type' | 'Cookie' | 'Cross-Origin-Embedder-Policy' | 'Cross-Origin-Opener-Policy' | 'Cross-Origin-Resource-Policy' | 'Date' | 'ETag' | 'Expires' | 'Incremental' | 'Last-Modified' | 'Location' | 'Permissions-Policy' | 'Pragma' | 'Retry-After' | 'Save-Data' | 'Sec-CH-Prefers-Color-Scheme' | 'Sec-CH-Prefers-Reduced-Motion' | 'Sec-CH-UA' | 'Sec-CH-UA-Arch' | 'Sec-CH-UA-Bitness' | 'Sec-CH-UA-Form-Factor' | 'Sec-CH-UA-Full-Version' | 'Sec-CH-UA-Full-Version-List' | 'Sec-CH-UA-Mobile' | 'Sec-CH-UA-Model' | 'Sec-CH-UA-Platform' | 'Sec-CH-UA-Platform-Version' | 'Sec-CH-UA-WoW64' | 'Sec-Fetch-Dest' | 'Sec-Fetch-Mode' | 'Sec-Fetch-Site' | 'Sec-Fetch-User' | 'Sec-GPC' | 'Server' | 'Server-Timing' | 'Service-Worker-Navigation-Preload' | 'Set-Cookie' | 'Set-Txn' | 'Strict-Transport-Security' | 'Timing-Allow-Origin' | 'Trailer' | 'Transfer-Encoding' | 'Unencoded-Digest' | 'Upgrade' | 'Vary' | 'Want-Unencoded-Digest' | 'Warning' | 'WWW-Authenticate' | 'X-Content-Type-Options' | 'X-DNS-Prefetch-Control' | 'X-Frame-Options' | 'X-Permitted-Cross-Domain-Policies' | 'X-Powered-By' | 'X-Robots-Tag' | 'X-XSS-Protection';
|
|
7
7
|
export type AcceptHeader = 'Accept' | 'Accept-Charset' | 'Accept-Encoding' | 'Accept-Language' | 'Accept-Patch' | 'Accept-Post' | 'Accept-Ranges';
|
|
8
8
|
export type CustomHeader = string & {};
|
|
@@ -33,6 +33,7 @@ export declare const getPathNoStrict: (request: Request) => string;
|
|
|
33
33
|
*/
|
|
34
34
|
export declare const mergePath: (...paths: string[]) => string;
|
|
35
35
|
export declare const checkOptionalParameter: (path: string) => string[] | null;
|
|
36
|
+
export declare const tryDecodeURIComponent: (str: string) => string;
|
|
36
37
|
export declare const getQueryParam: (url: string, key?: string) => string | undefined | Record<string, string>;
|
|
37
38
|
export declare const getQueryParams: (url: string, key?: string) => string[] | undefined | Record<string, string[]>;
|
|
38
39
|
export declare const decodeURIComponent_: typeof decodeURIComponent;
|
|
@@ -125,7 +125,7 @@ var getNextParam = (acceptHeader, startIndex) => {
|
|
|
125
125
|
var getNextAcceptValue = (acceptHeader, startIndex) => {
|
|
126
126
|
const accept = {
|
|
127
127
|
type: "",
|
|
128
|
-
params:
|
|
128
|
+
params: /* @__PURE__ */ Object.create(null),
|
|
129
129
|
q: 1
|
|
130
130
|
};
|
|
131
131
|
startIndex = consumeWhitespace(acceptHeader, startIndex);
|
|
@@ -12,6 +12,12 @@ var parseBody = async (request, options = /* @__PURE__ */ Object.create(null)) =
|
|
|
12
12
|
return {};
|
|
13
13
|
};
|
|
14
14
|
async function parseFormData(request, options) {
|
|
15
|
+
if (!isRawRequest(request) && request.bodyCache.formData) {
|
|
16
|
+
return convertFormDataToBodyData(
|
|
17
|
+
await request.bodyCache.formData,
|
|
18
|
+
options
|
|
19
|
+
);
|
|
20
|
+
}
|
|
15
21
|
const headers = isRawRequest(request) ? request.headers : request.raw.headers;
|
|
16
22
|
const arrayBuffer = await request.arrayBuffer();
|
|
17
23
|
const formDataPromise = bufferToFormData(arrayBuffer, headers.get("Content-Type") || "");
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
// src/utils/cookie.ts
|
|
2
|
-
import {
|
|
2
|
+
import { tryDecodeURIComponent } from "./url.js";
|
|
3
3
|
var algorithm = { name: "HMAC", hash: "SHA-256" };
|
|
4
4
|
var getCryptoKey = async (secret) => {
|
|
5
5
|
const secretBuf = typeof secret === "string" ? new TextEncoder().encode(secret) : secret;
|
|
@@ -23,6 +23,7 @@ var verifySignature = async (base64Signature, value, secret) => {
|
|
|
23
23
|
}
|
|
24
24
|
};
|
|
25
25
|
var validCookieNameRegEx = /^[\w!#$%&'*.^`|~+-]+$/;
|
|
26
|
+
var relaxedCookieNameRegEx = /^[!#-:<>-[\]-~]+$/;
|
|
26
27
|
var validCookieValueRegEx = /^[ !#-:<-[\]-~]*$/;
|
|
27
28
|
var trimCookieWhitespace = (value) => {
|
|
28
29
|
let start = 0;
|
|
@@ -55,7 +56,7 @@ var parse = (cookie, name) => {
|
|
|
55
56
|
continue;
|
|
56
57
|
}
|
|
57
58
|
const cookieName = trimCookieWhitespace(pairStr.substring(0, valueStartPos));
|
|
58
|
-
if (name && name !== cookieName || !
|
|
59
|
+
if (name && name !== cookieName || !relaxedCookieNameRegEx.test(cookieName) || cookieName in parsedCookie) {
|
|
59
60
|
continue;
|
|
60
61
|
}
|
|
61
62
|
let cookieValue = trimCookieWhitespace(pairStr.substring(valueStartPos + 1));
|
|
@@ -63,7 +64,7 @@ var parse = (cookie, name) => {
|
|
|
63
64
|
cookieValue = cookieValue.slice(1, -1);
|
|
64
65
|
}
|
|
65
66
|
if (validCookieValueRegEx.test(cookieValue)) {
|
|
66
|
-
parsedCookie[cookieName] =
|
|
67
|
+
parsedCookie[cookieName] = tryDecodeURIComponent(cookieValue);
|
|
67
68
|
if (name) {
|
|
68
69
|
break;
|
|
69
70
|
}
|
|
@@ -59,8 +59,11 @@ var StreamingApi = class {
|
|
|
59
59
|
}
|
|
60
60
|
async pipe(body) {
|
|
61
61
|
this.writer.releaseLock();
|
|
62
|
-
|
|
63
|
-
|
|
62
|
+
try {
|
|
63
|
+
await body.pipeTo(this.writable, { preventClose: true, preventAbort: true });
|
|
64
|
+
} finally {
|
|
65
|
+
this.writer = this.writable.getWriter();
|
|
66
|
+
}
|
|
64
67
|
}
|
|
65
68
|
onAbort(listener) {
|
|
66
69
|
this.abortSubscribers.push(listener);
|
|
@@ -124,18 +124,16 @@ var checkOptionalParameter = (path) => {
|
|
|
124
124
|
});
|
|
125
125
|
return results.filter((v, i, a) => a.indexOf(v) === i);
|
|
126
126
|
};
|
|
127
|
+
var tryDecodeURIComponent = (str) => str.indexOf("%") !== -1 ? tryDecode(str, decodeURIComponent_) : str;
|
|
127
128
|
var _decodeURI = (value) => {
|
|
128
|
-
if (!/[%+]/.test(value)) {
|
|
129
|
-
return value;
|
|
130
|
-
}
|
|
131
129
|
if (value.indexOf("+") !== -1) {
|
|
132
130
|
value = value.replace(/\+/g, " ");
|
|
133
131
|
}
|
|
134
|
-
return
|
|
132
|
+
return tryDecodeURIComponent(value);
|
|
135
133
|
};
|
|
136
134
|
var _getQueryParam = (url, key, multiple) => {
|
|
137
135
|
let encoded;
|
|
138
|
-
if (!multiple && key &&
|
|
136
|
+
if (!multiple && key && key.indexOf("%") === -1 && key.indexOf("+") === -1) {
|
|
139
137
|
let keyIndex2 = url.indexOf("?", 8);
|
|
140
138
|
if (keyIndex2 === -1) {
|
|
141
139
|
return void 0;
|
|
@@ -159,7 +157,7 @@ var _getQueryParam = (url, key, multiple) => {
|
|
|
159
157
|
return void 0;
|
|
160
158
|
}
|
|
161
159
|
}
|
|
162
|
-
const results =
|
|
160
|
+
const results = /* @__PURE__ */ Object.create(null);
|
|
163
161
|
encoded ??= /[%+]/.test(url);
|
|
164
162
|
let keyIndex = url.indexOf("?", 8);
|
|
165
163
|
while (keyIndex !== -1) {
|
|
@@ -218,5 +216,6 @@ export {
|
|
|
218
216
|
splitPath,
|
|
219
217
|
splitRoutingPath,
|
|
220
218
|
tryDecode,
|
|
221
|
-
tryDecodeURI
|
|
219
|
+
tryDecodeURI,
|
|
220
|
+
tryDecodeURIComponent
|
|
222
221
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "hono",
|
|
3
|
-
"version": "4.
|
|
3
|
+
"version": "4.13.1",
|
|
4
4
|
"description": "Web framework built on Web Standards",
|
|
5
5
|
"main": "dist/cjs/index.js",
|
|
6
6
|
"type": "module",
|
|
@@ -231,6 +231,11 @@
|
|
|
231
231
|
"import": "./dist/middleware/logger/index.js",
|
|
232
232
|
"require": "./dist/cjs/middleware/logger/index.js"
|
|
233
233
|
},
|
|
234
|
+
"./method-not-allowed": {
|
|
235
|
+
"types": "./dist/types/middleware/method-not-allowed/index.d.ts",
|
|
236
|
+
"import": "./dist/middleware/method-not-allowed/index.js",
|
|
237
|
+
"require": "./dist/cjs/middleware/method-not-allowed/index.js"
|
|
238
|
+
},
|
|
234
239
|
"./method-override": {
|
|
235
240
|
"types": "./dist/types/middleware/method-override/index.d.ts",
|
|
236
241
|
"import": "./dist/middleware/method-override/index.js",
|
|
@@ -528,6 +533,9 @@
|
|
|
528
533
|
"logger": [
|
|
529
534
|
"./dist/types/middleware/logger"
|
|
530
535
|
],
|
|
536
|
+
"method-not-allowed": [
|
|
537
|
+
"./dist/types/middleware/method-not-allowed"
|
|
538
|
+
],
|
|
531
539
|
"method-override": [
|
|
532
540
|
"./dist/types/middleware/method-override"
|
|
533
541
|
],
|
|
@@ -667,7 +675,7 @@
|
|
|
667
675
|
],
|
|
668
676
|
"devDependencies": {
|
|
669
677
|
"@hono/eslint-config": "^2.1.1",
|
|
670
|
-
"@hono/node-server": "^2.0.
|
|
678
|
+
"@hono/node-server": "^2.0.12",
|
|
671
679
|
"@types/jsdom": "^21.1.7",
|
|
672
680
|
"@types/node": "^24.3.0",
|
|
673
681
|
"@types/ws": "^8.18.1",
|
|
@@ -685,7 +693,6 @@
|
|
|
685
693
|
"prettier": "3.7.4",
|
|
686
694
|
"publint": "0.3.15",
|
|
687
695
|
"typescript": "^6.0.3",
|
|
688
|
-
"undici": "^6.27.0",
|
|
689
696
|
"vite-plugin-fastly-js-compute": "^0.4.2",
|
|
690
697
|
"vitest": "^4.1.9",
|
|
691
698
|
"wrangler": "4.107.0",
|