@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,2 +1,2 @@
|
|
|
1
|
-
export const VERSION = '6.
|
|
1
|
+
export const VERSION = '6.49.0'; // x-release-please-version
|
|
2
2
|
//# sourceMappingURL=version.mjs.map
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
MIT License
|
|
2
2
|
|
|
3
|
-
Copyright (c) Fastify
|
|
3
|
+
Copyright (c) 2020-present The Fastify team <https://github.com/fastify/fastify#team>
|
|
4
4
|
|
|
5
5
|
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
6
|
of this software and associated documentation files (the "Software"), to deal
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
[](https://www.npmjs.com/package/process-warning)
|
|
5
5
|
[](https://github.com/neostandard/neostandard)
|
|
6
6
|
|
|
7
|
-
A small utility for generating consistent warning objects across your codebase.
|
|
7
|
+
A small utility for generating consistent [warning objects](https://nodejs.org/api/process.html#event-warning) across your codebase.
|
|
8
8
|
It also exposes a utility for emitting those warnings, guaranteeing that they are issued only once (unless configured otherwise).
|
|
9
9
|
|
|
10
10
|
_This module is used by the [Fastify](https://fastify.dev) framework and it was called `fastify-warning` prior to version 1.0.0._
|
|
@@ -31,7 +31,7 @@ const warning = createWarning({
|
|
|
31
31
|
message: 'Hello %s',
|
|
32
32
|
unlimited: true
|
|
33
33
|
})
|
|
34
|
-
warning('world')
|
|
34
|
+
const emitted = warning('world')
|
|
35
35
|
```
|
|
36
36
|
|
|
37
37
|
#### Methods
|
|
@@ -101,6 +101,45 @@ FST_ERROR_CODE('world') // will be emitted
|
|
|
101
101
|
FST_ERROR_CODE('world') // will be emitted again
|
|
102
102
|
```
|
|
103
103
|
|
|
104
|
+
#### `spyWarning(warning)`
|
|
105
|
+
|
|
106
|
+
Spy the created warning function for testing purpose.
|
|
107
|
+
|
|
108
|
+
```js
|
|
109
|
+
const { test } = require('node:test')
|
|
110
|
+
const { createWarning, spyWarning } = require('process-warning')
|
|
111
|
+
const FST_ERROR_CODE = createWarning({ name: 'MyAppWarning', code: 'FST_ERROR_CODE', message: 'Hello %s' })
|
|
112
|
+
|
|
113
|
+
test('spy warning', t => {
|
|
114
|
+
const spyData = spyWarning(FST_ERROR_CODE)
|
|
115
|
+
|
|
116
|
+
// call after spy
|
|
117
|
+
const emitted = FST_ERROR_CODE('world')
|
|
118
|
+
t.assert.strictEqual(emitted, true)
|
|
119
|
+
|
|
120
|
+
// restore the warning function
|
|
121
|
+
// it must be called when you do not need to spy anymore
|
|
122
|
+
// otherwise, the calls data will accumulates.
|
|
123
|
+
t.after(() => spyData.restore())
|
|
124
|
+
|
|
125
|
+
t.assert.strictEqual(FST_ERROR_CODE.emitted, true)
|
|
126
|
+
// calls return the arguments and result.
|
|
127
|
+
// result indicate whether warning is emitted through process.emitWarning
|
|
128
|
+
console.log(spyData.calls) // [{ arguments: ['world'], result: true }]
|
|
129
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['world'])
|
|
130
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
131
|
+
// number of times called the function
|
|
132
|
+
console.log(spyData.callCount()) // 1
|
|
133
|
+
t.assert.strictEqual(spyData.callCount(), 1)
|
|
134
|
+
|
|
135
|
+
// reset the spy stat and warning state
|
|
136
|
+
spyData.reset()
|
|
137
|
+
t.assert.strictEqual(FST_ERROR_CODE.emitted, false)
|
|
138
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
139
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
140
|
+
})
|
|
141
|
+
```
|
|
142
|
+
|
|
104
143
|
#### Suppressing warnings
|
|
105
144
|
|
|
106
145
|
It is possible to suppress warnings by utilizing one of node's built-in warning suppression mechanisms.
|
|
@@ -17,6 +17,7 @@ const { format } = require('node:util')
|
|
|
17
17
|
* @property {string} message - The warning message.
|
|
18
18
|
* @property {boolean} emitted - Indicates if the warning has been emitted.
|
|
19
19
|
* @property {function} format - Formats the warning message.
|
|
20
|
+
* @returns {boolean} emit - Indicates if the warning has been emitted by this call.
|
|
20
21
|
*/
|
|
21
22
|
|
|
22
23
|
/**
|
|
@@ -33,8 +34,69 @@ const { format } = require('node:util')
|
|
|
33
34
|
* @typedef {Object} ProcessWarning
|
|
34
35
|
* @property {function} createWarning - Creates a warning item.
|
|
35
36
|
* @property {function} createDeprecation - Creates a deprecation warning item.
|
|
37
|
+
* @property {function} spyWarning - Spy a warning item.
|
|
36
38
|
*/
|
|
37
39
|
|
|
40
|
+
/**
|
|
41
|
+
* Represents the spy data.
|
|
42
|
+
* @typedef {Object} WarningSpyData
|
|
43
|
+
* @property {object} calls - Arguments of WarningItem calls with.
|
|
44
|
+
* @property {function} callCount - Number of counts called the WarningItem.
|
|
45
|
+
* @property {function} reset - Reset the calls data and state of WarningItem.
|
|
46
|
+
* @property {function} restore - Remove spy from WarningItem.
|
|
47
|
+
*/
|
|
48
|
+
|
|
49
|
+
const kWarningFn = Symbol('process-warning.fn')
|
|
50
|
+
const kWarningSpyData = Symbol('process-warning.spyData')
|
|
51
|
+
|
|
52
|
+
/**
|
|
53
|
+
* Spy a warning item.
|
|
54
|
+
* @function
|
|
55
|
+
* @memberof processWarning
|
|
56
|
+
* @param {WarningItem} warning - The warning item to spy.
|
|
57
|
+
* @returns {WarningSpyData} The created spy data.
|
|
58
|
+
*/
|
|
59
|
+
function spyWarning (warning) {
|
|
60
|
+
// Do not double spy the same warning
|
|
61
|
+
if (warning[kWarningSpyData] === null) {
|
|
62
|
+
const warningFn = warning[kWarningFn]
|
|
63
|
+
warning[kWarningFn] = function (a, b, c) {
|
|
64
|
+
const args = []
|
|
65
|
+
// since warning always call by fn(a, b, c)
|
|
66
|
+
// it need to remove the trailing undefined arguments
|
|
67
|
+
if (c) {
|
|
68
|
+
args.push(a, b, c)
|
|
69
|
+
} else if (b) {
|
|
70
|
+
args.push(a, b)
|
|
71
|
+
} else if (a) {
|
|
72
|
+
args.push(a)
|
|
73
|
+
}
|
|
74
|
+
warning[kWarningSpyData].calls.push({
|
|
75
|
+
arguments: args,
|
|
76
|
+
result: warningFn(a, b, c)
|
|
77
|
+
})
|
|
78
|
+
}
|
|
79
|
+
const spyData = {
|
|
80
|
+
calls: [],
|
|
81
|
+
callCount () {
|
|
82
|
+
return spyData.calls.length
|
|
83
|
+
},
|
|
84
|
+
reset () {
|
|
85
|
+
warning.emitted = false
|
|
86
|
+
spyData.calls.length = 0
|
|
87
|
+
},
|
|
88
|
+
restore () {
|
|
89
|
+
spyData.reset()
|
|
90
|
+
warning[kWarningFn] = warningFn
|
|
91
|
+
warning[kWarningSpyData] = null
|
|
92
|
+
}
|
|
93
|
+
}
|
|
94
|
+
warning[kWarningSpyData] = spyData
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
return warning[kWarningSpyData]
|
|
98
|
+
}
|
|
99
|
+
|
|
38
100
|
/**
|
|
39
101
|
* Creates a deprecation warning item.
|
|
40
102
|
* @function
|
|
@@ -62,21 +124,24 @@ function createWarning ({ name, code, message, unlimited = false } = {}) {
|
|
|
62
124
|
|
|
63
125
|
code = code.toUpperCase()
|
|
64
126
|
|
|
65
|
-
|
|
66
|
-
|
|
127
|
+
const warningFn = unlimited === true
|
|
128
|
+
? function (a, b, c) {
|
|
129
|
+
warning.emitted = true
|
|
130
|
+
process.emitWarning(warning.format(a, b, c), warning.name, warning.code)
|
|
131
|
+
return true
|
|
132
|
+
}
|
|
133
|
+
: function (a, b, c) {
|
|
67
134
|
if (warning.emitted === true && warning.unlimited !== true) {
|
|
68
|
-
return
|
|
135
|
+
return false
|
|
69
136
|
}
|
|
70
137
|
warning.emitted = true
|
|
71
138
|
process.emitWarning(warning.format(a, b, c), warning.name, warning.code)
|
|
139
|
+
return true
|
|
72
140
|
}
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
[
|
|
77
|
-
warning.emitted = true
|
|
78
|
-
process.emitWarning(warning.format(a, b, c), warning.name, warning.code)
|
|
79
|
-
}
|
|
141
|
+
|
|
142
|
+
const warningContainer = {
|
|
143
|
+
[name]: function (a, b, c) {
|
|
144
|
+
return warning[kWarningFn](a, b, c)
|
|
80
145
|
}
|
|
81
146
|
}
|
|
82
147
|
|
|
@@ -86,14 +151,16 @@ function createWarning ({ name, code, message, unlimited = false } = {}) {
|
|
|
86
151
|
warning.message = message
|
|
87
152
|
warning.unlimited = unlimited
|
|
88
153
|
warning.code = code
|
|
154
|
+
warning[kWarningFn] = warningFn
|
|
155
|
+
warning[kWarningSpyData] = null
|
|
89
156
|
|
|
90
157
|
/**
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
|
|
158
|
+
* Formats the warning message.
|
|
159
|
+
* @param {*} [a] Possible message interpolation value.
|
|
160
|
+
* @param {*} [b] Possible message interpolation value.
|
|
161
|
+
* @param {*} [c] Possible message interpolation value.
|
|
162
|
+
* @returns {string} The formatted warning message.
|
|
163
|
+
*/
|
|
97
164
|
warning.format = function (a, b, c) {
|
|
98
165
|
let formatted
|
|
99
166
|
if (a && b && c) {
|
|
@@ -116,9 +183,10 @@ function createWarning ({ name, code, message, unlimited = false } = {}) {
|
|
|
116
183
|
* @namespace
|
|
117
184
|
* @property {function} createWarning - Creates a warning item.
|
|
118
185
|
* @property {function} createDeprecation - Creates a deprecation warning item.
|
|
186
|
+
* @property {function} spyWarning - Spy a warning item.
|
|
119
187
|
* @property {ProcessWarning} processWarning - Represents the process warning functionality.
|
|
120
188
|
*/
|
|
121
|
-
const out = { createWarning, createDeprecation }
|
|
189
|
+
const out = { createWarning, createDeprecation, spyWarning }
|
|
122
190
|
module.exports = out
|
|
123
191
|
module.exports.default = out
|
|
124
192
|
module.exports.processWarning = out
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "process-warning",
|
|
3
|
-
"version": "5.
|
|
3
|
+
"version": "5.1.0",
|
|
4
4
|
"description": "A small utility for creating warnings and emitting them.",
|
|
5
5
|
"main": "index.js",
|
|
6
6
|
"type": "commonjs",
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
"test": "npm run test:unit && npm run test:jest && npm run test:typescript",
|
|
12
12
|
"test:jest": "jest jest.test.js",
|
|
13
13
|
"test:unit": "c8 --100 node --test",
|
|
14
|
-
"test:typescript": "
|
|
14
|
+
"test:typescript": "tstyche"
|
|
15
15
|
},
|
|
16
16
|
"repository": {
|
|
17
17
|
"type": "git",
|
|
@@ -62,12 +62,11 @@
|
|
|
62
62
|
}
|
|
63
63
|
],
|
|
64
64
|
"devDependencies": {
|
|
65
|
-
"@fastify/pre-commit": "^2.1.0",
|
|
66
65
|
"benchmark": "^2.1.4",
|
|
67
|
-
"c8": "^
|
|
66
|
+
"c8": "^12.0.0",
|
|
68
67
|
"eslint": "^9.17.0",
|
|
69
|
-
"jest": "^
|
|
70
|
-
"neostandard": "^0.
|
|
71
|
-
"
|
|
68
|
+
"jest": "^30.0.3",
|
|
69
|
+
"neostandard": "^0.13.0",
|
|
70
|
+
"tstyche": "^7.0.0"
|
|
72
71
|
}
|
|
73
72
|
}
|
|
@@ -5,7 +5,7 @@ const { createWarning } = require('..')
|
|
|
5
5
|
const { withResolvers } = require('./promise')
|
|
6
6
|
|
|
7
7
|
test('emit should emit a given code only once', t => {
|
|
8
|
-
t.plan(
|
|
8
|
+
t.plan(6)
|
|
9
9
|
|
|
10
10
|
const { promise, resolve } = withResolvers()
|
|
11
11
|
|
|
@@ -22,8 +22,8 @@ test('emit should emit a given code only once', t => {
|
|
|
22
22
|
code: 'CODE',
|
|
23
23
|
message: 'Hello world'
|
|
24
24
|
})
|
|
25
|
-
warn()
|
|
26
|
-
warn()
|
|
25
|
+
t.assert.strictEqual(warn(), true)
|
|
26
|
+
t.assert.strictEqual(warn(), false)
|
|
27
27
|
setImmediate(() => {
|
|
28
28
|
process.removeListener('warning', onWarning)
|
|
29
29
|
resolve()
|
|
@@ -5,7 +5,7 @@ const { createWarning } = require('../')
|
|
|
5
5
|
const { withResolvers } = require('./promise')
|
|
6
6
|
|
|
7
7
|
test('a limited warning can be re-set', t => {
|
|
8
|
-
t.plan(
|
|
8
|
+
t.plan(7)
|
|
9
9
|
|
|
10
10
|
const { promise, resolve } = withResolvers()
|
|
11
11
|
let count = 0
|
|
@@ -20,14 +20,14 @@ test('a limited warning can be re-set', t => {
|
|
|
20
20
|
message: 'Hello world'
|
|
21
21
|
})
|
|
22
22
|
|
|
23
|
-
warn()
|
|
23
|
+
t.assert.strictEqual(warn(), true)
|
|
24
24
|
t.assert.ok(warn.emitted)
|
|
25
25
|
|
|
26
|
-
warn()
|
|
26
|
+
t.assert.strictEqual(warn(), false)
|
|
27
27
|
t.assert.ok(warn.emitted)
|
|
28
28
|
|
|
29
29
|
warn.emitted = false
|
|
30
|
-
warn()
|
|
30
|
+
t.assert.strictEqual(warn(), true)
|
|
31
31
|
t.assert.ok(warn.emitted)
|
|
32
32
|
|
|
33
33
|
setImmediate(() => {
|
|
@@ -5,7 +5,7 @@ const { createWarning } = require('..')
|
|
|
5
5
|
const { withResolvers } = require('./promise')
|
|
6
6
|
|
|
7
7
|
test('emit should emit a given code unlimited times', t => {
|
|
8
|
-
t.plan(
|
|
8
|
+
t.plan(60)
|
|
9
9
|
|
|
10
10
|
let runs = 0
|
|
11
11
|
const expectedRun = []
|
|
@@ -31,7 +31,7 @@ test('emit should emit a given code unlimited times', t => {
|
|
|
31
31
|
|
|
32
32
|
for (let i = 0; i < times; i++) {
|
|
33
33
|
expectedRun.push(i)
|
|
34
|
-
warn()
|
|
34
|
+
t.assert.strictEqual(warn(), true)
|
|
35
35
|
}
|
|
36
36
|
setImmediate(() => {
|
|
37
37
|
process.removeListener('warning', onWarning)
|
|
@@ -0,0 +1,143 @@
|
|
|
1
|
+
'use strict'
|
|
2
|
+
|
|
3
|
+
const { test } = require('node:test')
|
|
4
|
+
const { createWarning } = require('..')
|
|
5
|
+
const { spyWarning } = require('..')
|
|
6
|
+
|
|
7
|
+
test('Spy ProcessWarning - unlimited: false', t => {
|
|
8
|
+
const warning = createWarning({
|
|
9
|
+
name: 'Warning',
|
|
10
|
+
code: 'WRN',
|
|
11
|
+
message: 'Hello %s'
|
|
12
|
+
})
|
|
13
|
+
const spyData = spyWarning(warning)
|
|
14
|
+
|
|
15
|
+
t.assert.strictEqual(warning.emitted, false)
|
|
16
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
17
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
18
|
+
|
|
19
|
+
warning('World')
|
|
20
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
21
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
|
|
22
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
23
|
+
t.assert.strictEqual(spyData.callCount(), 1)
|
|
24
|
+
|
|
25
|
+
warning('World')
|
|
26
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
27
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
|
|
28
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
29
|
+
t.assert.deepStrictEqual(spyData.calls[1].arguments, ['World'])
|
|
30
|
+
t.assert.strictEqual(spyData.calls[1].result, false)
|
|
31
|
+
t.assert.strictEqual(spyData.callCount(), 2)
|
|
32
|
+
|
|
33
|
+
spyData.reset()
|
|
34
|
+
t.assert.strictEqual(warning.emitted, false)
|
|
35
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
36
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
37
|
+
|
|
38
|
+
warning('World')
|
|
39
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
40
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
|
|
41
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
42
|
+
t.assert.strictEqual(spyData.callCount(), 1)
|
|
43
|
+
|
|
44
|
+
spyData.restore()
|
|
45
|
+
t.assert.strictEqual(warning.emitted, false)
|
|
46
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
47
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
48
|
+
|
|
49
|
+
warning('World')
|
|
50
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
51
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
52
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
53
|
+
})
|
|
54
|
+
|
|
55
|
+
test('Spy ProcessWarning - unlimited: true', t => {
|
|
56
|
+
const warning = createWarning({
|
|
57
|
+
name: 'Warning',
|
|
58
|
+
code: 'WRN',
|
|
59
|
+
message: 'Hello %s',
|
|
60
|
+
unlimited: true
|
|
61
|
+
})
|
|
62
|
+
const spyData = spyWarning(warning)
|
|
63
|
+
|
|
64
|
+
t.assert.strictEqual(warning.emitted, false)
|
|
65
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
66
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
67
|
+
|
|
68
|
+
warning('World')
|
|
69
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
70
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
|
|
71
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
72
|
+
t.assert.strictEqual(spyData.callCount(), 1)
|
|
73
|
+
|
|
74
|
+
warning('World')
|
|
75
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
76
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
|
|
77
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
78
|
+
t.assert.deepStrictEqual(spyData.calls[1].arguments, ['World'])
|
|
79
|
+
t.assert.strictEqual(spyData.calls[1].result, true)
|
|
80
|
+
t.assert.strictEqual(spyData.callCount(), 2)
|
|
81
|
+
|
|
82
|
+
spyData.reset()
|
|
83
|
+
t.assert.strictEqual(warning.emitted, false)
|
|
84
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
85
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
86
|
+
|
|
87
|
+
warning('World')
|
|
88
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
89
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
|
|
90
|
+
t.assert.strictEqual(spyData.calls[0].result, true)
|
|
91
|
+
t.assert.strictEqual(spyData.callCount(), 1)
|
|
92
|
+
|
|
93
|
+
spyData.restore()
|
|
94
|
+
t.assert.strictEqual(warning.emitted, false)
|
|
95
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
96
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
97
|
+
|
|
98
|
+
warning('World')
|
|
99
|
+
t.assert.strictEqual(warning.emitted, true)
|
|
100
|
+
t.assert.deepStrictEqual(spyData.calls, [])
|
|
101
|
+
t.assert.strictEqual(spyData.callCount(), 0)
|
|
102
|
+
})
|
|
103
|
+
|
|
104
|
+
test('Spy ProcessWarning - calls[].arguments', t => {
|
|
105
|
+
const warning = createWarning({
|
|
106
|
+
name: 'Warning',
|
|
107
|
+
code: 'WRN',
|
|
108
|
+
message: 'Hello %s'
|
|
109
|
+
})
|
|
110
|
+
const spyData = spyWarning(warning)
|
|
111
|
+
|
|
112
|
+
warning(undefined)
|
|
113
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, [])
|
|
114
|
+
spyData.reset()
|
|
115
|
+
|
|
116
|
+
warning()
|
|
117
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, [])
|
|
118
|
+
spyData.reset()
|
|
119
|
+
|
|
120
|
+
warning('World')
|
|
121
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World'])
|
|
122
|
+
spyData.reset()
|
|
123
|
+
|
|
124
|
+
warning('World', 'Hello')
|
|
125
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World', 'Hello'])
|
|
126
|
+
spyData.reset()
|
|
127
|
+
|
|
128
|
+
warning(undefined, 'Hello')
|
|
129
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, [undefined, 'Hello'])
|
|
130
|
+
spyData.reset()
|
|
131
|
+
|
|
132
|
+
warning('World', 'Hello', 'World')
|
|
133
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World', 'Hello', 'World'])
|
|
134
|
+
spyData.reset()
|
|
135
|
+
|
|
136
|
+
warning('World', undefined, 'World')
|
|
137
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, ['World', undefined, 'World'])
|
|
138
|
+
spyData.reset()
|
|
139
|
+
|
|
140
|
+
warning(undefined, 'Hello', 'World')
|
|
141
|
+
t.assert.deepStrictEqual(spyData.calls[0].arguments, [undefined, 'Hello', 'World'])
|
|
142
|
+
spyData.reset()
|
|
143
|
+
})
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
declare namespace processWarning {
|
|
2
2
|
export interface WarningItem {
|
|
3
|
-
(a?: any, b?: any, c?: any):
|
|
3
|
+
(a?: any, b?: any, c?: any): boolean;
|
|
4
4
|
name: string;
|
|
5
5
|
code: string;
|
|
6
6
|
message: string;
|
|
@@ -22,13 +22,27 @@ declare namespace processWarning {
|
|
|
22
22
|
unlimited?: boolean;
|
|
23
23
|
}
|
|
24
24
|
|
|
25
|
+
export type WarningSpyData = {
|
|
26
|
+
calls: WarningCallData[],
|
|
27
|
+
callCount(): number
|
|
28
|
+
reset(): void
|
|
29
|
+
restore(): void
|
|
30
|
+
}
|
|
31
|
+
|
|
32
|
+
export type WarningCallData = {
|
|
33
|
+
arguments: unknown[]
|
|
34
|
+
result: boolean
|
|
35
|
+
}
|
|
36
|
+
|
|
25
37
|
export type ProcessWarning = {
|
|
26
38
|
createWarning(params: WarningOptions): WarningItem;
|
|
27
39
|
createDeprecation(params: DeprecationOptions): WarningItem;
|
|
40
|
+
spyWarning(warning: WarningItem): WarningSpyData
|
|
28
41
|
}
|
|
29
42
|
|
|
30
43
|
export function createWarning (params: WarningOptions): WarningItem
|
|
31
44
|
export function createDeprecation (params: DeprecationOptions): WarningItem
|
|
45
|
+
export function spyWarning (warning: WarningItem): WarningSpyData
|
|
32
46
|
|
|
33
47
|
const processWarning: ProcessWarning
|
|
34
48
|
export { processWarning as default }
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
import { expect } from 'tstyche'
|
|
2
|
+
import { createDeprecation, createWarning, spyWarning, WarningCallData, WarningSpyData } from '..'
|
|
3
|
+
|
|
4
|
+
const WarnInstance = createWarning({
|
|
5
|
+
name: 'TypeScriptWarning',
|
|
6
|
+
code: 'CODE',
|
|
7
|
+
message: 'message'
|
|
8
|
+
})
|
|
9
|
+
|
|
10
|
+
expect(WarnInstance.code).type.toBe<string>()
|
|
11
|
+
expect(WarnInstance.message).type.toBe<string>()
|
|
12
|
+
expect(WarnInstance.name).type.toBe<string>()
|
|
13
|
+
expect(WarnInstance.emitted).type.toBe<boolean>()
|
|
14
|
+
expect(WarnInstance.unlimited).type.toBe<boolean>()
|
|
15
|
+
|
|
16
|
+
expect(WarnInstance()).type.toBe<boolean>()
|
|
17
|
+
expect(WarnInstance('foo')).type.toBe<boolean>()
|
|
18
|
+
expect(WarnInstance('foo', 'bar')).type.toBe<boolean>()
|
|
19
|
+
|
|
20
|
+
const buildWarnUnlimited = createWarning({
|
|
21
|
+
name: 'TypeScriptWarning',
|
|
22
|
+
code: 'CODE',
|
|
23
|
+
message: 'message',
|
|
24
|
+
unlimited: true
|
|
25
|
+
})
|
|
26
|
+
|
|
27
|
+
expect(buildWarnUnlimited.unlimited).type.toBe<boolean>()
|
|
28
|
+
|
|
29
|
+
const DeprecationInstance = createDeprecation({
|
|
30
|
+
code: 'CODE',
|
|
31
|
+
message: 'message'
|
|
32
|
+
})
|
|
33
|
+
|
|
34
|
+
expect(DeprecationInstance.code).type.toBe<string>()
|
|
35
|
+
|
|
36
|
+
expect(DeprecationInstance()).type.toBe<boolean>()
|
|
37
|
+
expect(DeprecationInstance('foo')).type.toBe<boolean>()
|
|
38
|
+
expect(DeprecationInstance('foo', 'bar')).type.toBe<boolean>()
|
|
39
|
+
|
|
40
|
+
const spyData = spyWarning(WarnInstance)
|
|
41
|
+
expect(spyData).type.toBe<WarningSpyData>()
|
|
42
|
+
expect(spyData.calls).type.toBe<WarningCallData[]>()
|
|
43
|
+
expect(spyData.callCount).type.toBe<(() => number)>()
|
|
44
|
+
expect(spyData.callCount()).type.toBe<number>()
|
|
45
|
+
expect(spyData.reset).type.toBe<(() => void)>()
|
|
46
|
+
expect(spyData.reset()).type.toBe<void>()
|
|
47
|
+
expect(spyData.restore).type.toBe<(() => void)>()
|
|
48
|
+
expect(spyData.restore()).type.toBe<void>()
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@coro-ai/runner",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.36",
|
|
4
4
|
"description": "Coro Runner — local agent runtime, cloud control plane, and CLI (`coro` command).",
|
|
5
5
|
"license": "BUSL-1.1",
|
|
6
6
|
"engines": {
|
|
@@ -35,11 +35,11 @@
|
|
|
35
35
|
"cli"
|
|
36
36
|
],
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@coro-ai/cloud-protocol": "0.1.
|
|
39
|
-
"@coro-ai/intelligence-base": "0.1.
|
|
40
|
-
"@coro-ai/llm-anthropic": "0.1.
|
|
41
|
-
"@coro-ai/llm-openai": "0.1.
|
|
42
|
-
"@coro-ai/plugin-sdk": "0.1.
|
|
38
|
+
"@coro-ai/cloud-protocol": "0.1.36",
|
|
39
|
+
"@coro-ai/intelligence-base": "0.1.36",
|
|
40
|
+
"@coro-ai/llm-anthropic": "0.1.36",
|
|
41
|
+
"@coro-ai/llm-openai": "0.1.36",
|
|
42
|
+
"@coro-ai/plugin-sdk": "0.1.36",
|
|
43
43
|
"bcryptjs": "^3.0.3",
|
|
44
44
|
"better-sqlite3": "^12.9.0",
|
|
45
45
|
"commander": "^13.1.0",
|
|
@@ -1,42 +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/conninfo.ts
|
|
21
|
-
var conninfo_exports = {};
|
|
22
|
-
__export(conninfo_exports, {
|
|
23
|
-
getConnInfo: () => getConnInfo
|
|
24
|
-
});
|
|
25
|
-
module.exports = __toCommonJS(conninfo_exports);
|
|
26
|
-
var getConnInfo = (c) => {
|
|
27
|
-
const bindings = c.env.server ? c.env.server : c.env;
|
|
28
|
-
const address = bindings.incoming.socket.remoteAddress;
|
|
29
|
-
const port = bindings.incoming.socket.remotePort;
|
|
30
|
-
const family = bindings.incoming.socket.remoteFamily;
|
|
31
|
-
return {
|
|
32
|
-
remote: {
|
|
33
|
-
address,
|
|
34
|
-
port,
|
|
35
|
-
addressType: family === "IPv4" ? "IPv4" : family === "IPv6" ? "IPv6" : void 0
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
};
|
|
39
|
-
// Annotate the CommonJS export names for ESM import in node:
|
|
40
|
-
0 && (module.exports = {
|
|
41
|
-
getConnInfo
|
|
42
|
-
});
|
|
@@ -1,29 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __create = Object.create;
|
|
3
|
-
var __defProp = Object.defineProperty;
|
|
4
|
-
var __getOwnPropDesc = Object.getOwnPropertyDescriptor;
|
|
5
|
-
var __getOwnPropNames = Object.getOwnPropertyNames;
|
|
6
|
-
var __getProtoOf = Object.getPrototypeOf;
|
|
7
|
-
var __hasOwnProp = Object.prototype.hasOwnProperty;
|
|
8
|
-
var __copyProps = (to, from, except, desc) => {
|
|
9
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
10
|
-
for (let key of __getOwnPropNames(from))
|
|
11
|
-
if (!__hasOwnProp.call(to, key) && key !== except)
|
|
12
|
-
__defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable });
|
|
13
|
-
}
|
|
14
|
-
return to;
|
|
15
|
-
};
|
|
16
|
-
var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps(
|
|
17
|
-
// If the importer is in node compatibility mode or this is not an ESM
|
|
18
|
-
// file that has been converted to a CommonJS file using a Babel-
|
|
19
|
-
// compatible transform (i.e. "__esModule" has not been set), then set
|
|
20
|
-
// "default" to the CommonJS "module.exports" for node compatibility.
|
|
21
|
-
isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target,
|
|
22
|
-
mod
|
|
23
|
-
));
|
|
24
|
-
|
|
25
|
-
// src/globals.ts
|
|
26
|
-
var import_node_crypto = __toESM(require("crypto"));
|
|
27
|
-
if (typeof global.crypto === "undefined") {
|
|
28
|
-
global.crypto = import_node_crypto.default;
|
|
29
|
-
}
|