@psnext/slingcli 3.5.20261007-2 → 3.5.20261019-1
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/bin/sling-startup-output.js +47 -0
- package/bin/sling.js +29 -2
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +12 -3
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +94 -1589
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +12 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +1 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +2 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +10 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +10 -10
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +8 -8
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +2 -2
- package/node_modules/@aws-sdk/middleware-websocket/package.json +4 -4
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +11 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +6 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +6 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +13 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +9 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/CognitoIdentityServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/models/errors.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/SigninServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/errors.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/SSOServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/models/errors.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/SSOOIDCServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/models/errors.js +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/models/errors.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/SigninServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/SSOServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/models/errors.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/STSServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/models/errors.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/CognitoIdentityServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/models/errors.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/SigninServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/SSOServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/models/errors.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/SSOOIDCServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/models/errors.d.ts +11 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/STSServiceException.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/models/errors.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +4 -4
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.js +2 -0
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/host.js +21 -86
- package/node_modules/@earendil-works/pi-codemode/dist/runtime/prelude-source.js +3 -103
- package/node_modules/@earendil-works/pi-codemode/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-JPNA2XH6.js → chunk-23QDZLZG.js} +22 -16
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{chunk-4RGLMKVY.js → chunk-QPFSTNX5.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/chunks/{virtual-modules-SXTR3NIO.js → virtual-modules-GRXGP6ZA.js} +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/cli-runtime.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/index.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/bundle/rpc-entry.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/pi-logo.js +8 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +6 -3
- package/node_modules/@earendil-works/pi-coding-agent/docs/mcp.md +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Agent.md +8 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/CacheStore.md +24 -9
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Client.md +11 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/DiagnosticsChannel.md +9 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Dispatcher.md +12 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Errors.md +101 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Fetch.md +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/H2CClient.md +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Interceptors.md +17 -9
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/Pool.md +5 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/api/RedirectHandler.md +13 -10
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/index.md +22 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/docs/docs/type-map.json +66 -66
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/api/readable.js +1 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/memory-cache-store.js +48 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/cache/sqlite-cache-store.js +83 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/constants.js +12 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/errors.js +38 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/request.js +39 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/symbols.js +2 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/core/util.js +26 -40
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h1.js +127 -84
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client-h2.js +97 -21
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/client.js +10 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher-base.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/dispatcher1-wrapper.js +20 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/env-http-proxy-agent.js +21 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/parser-h1.js +1064 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool-base.js +117 -19
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/pool.js +99 -13
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/proxy-agent.js +34 -11
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/retry-agent.js +10 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/dispatcher/round-robin-pool.js +15 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/cache-handler.js +153 -15
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/deduplication-handler.js +126 -52
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/redirect-handler.js +31 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/handler/retry-handler.js +116 -24
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/cache.js +15 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/decompress.js +253 -73
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/dns.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/interceptor/response-error.js +72 -28
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/LICENSE.md +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/no-simd.js +1002 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/milo/simd.js +1002 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js +11 -0
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-recorder.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-utils.js +3 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/util/cache.js +11 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cache.js +17 -8
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cachestorage.js +11 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/index.js +19 -7
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource-stream.js +69 -15
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/eventsource/eventsource.js +50 -3
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/body.js +69 -53
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/data-url.js +6 -6
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata-parser.js +12 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/formdata.js +30 -36
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/headers.js +36 -33
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/index.js +54 -29
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/request.js +74 -79
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/response.js +43 -44
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/fetch/util.js +7 -7
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/infra/index.js +16 -1
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/webidl/index.js +2 -14
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/connection.js +33 -12
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/events.js +43 -26
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/receiver.js +27 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketerror.js +13 -10
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/stream/websocketstream.js +19 -4
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/websocket/websocket.js +44 -41
- package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/package.json +7 -5
- package/node_modules/@earendil-works/pi-coding-agent/package.json +2 -2
- package/node_modules/@hono/node-server/README.md +2 -0
- package/node_modules/@hono/node-server/dist/index.cjs +1 -1
- package/node_modules/@hono/node-server/dist/index.mjs +1 -1
- package/node_modules/@hono/node-server/dist/serve-static.cjs +2 -1
- package/node_modules/@hono/node-server/dist/serve-static.mjs +2 -1
- package/node_modules/@hono/node-server/package.json +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +1695 -3
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/cache/EndpointCache.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js +6 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/UnionSerde.js +26 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/common.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +8 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +102 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +8 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +13 -2
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -1
- package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/parseJsonBody.js +16 -1
- package/node_modules/@smithy/core/dist-es/submodules/protocols/writeKey.js +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +16 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +9 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +28 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +15 -11
- package/node_modules/{@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json → @smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +7 -4
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +14 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +29 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -9
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +30 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +60 -0
- package/node_modules/{@aws-sdk → @smithy}/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +38 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@smithy/core/package.json +2 -1
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/util.d.ts +6 -3
- package/node_modules/content-disposition/README.md +105 -35
- package/node_modules/content-disposition/dist/index.d.ts +72 -0
- package/node_modules/content-disposition/dist/index.js +388 -0
- package/node_modules/content-disposition/dist/index.js.map +1 -0
- package/node_modules/content-disposition/package.json +31 -19
- package/node_modules/express/Readme.md +15 -9
- package/node_modules/express/lib/application.js +2 -2
- package/node_modules/express/lib/request.js +32 -19
- package/node_modules/express/lib/response.js +27 -30
- package/node_modules/express/node_modules/content-type/LICENSE +22 -0
- package/node_modules/express/node_modules/content-type/README.md +71 -0
- package/node_modules/express/node_modules/content-type/dist/index.d.ts +46 -0
- package/node_modules/express/node_modules/content-type/dist/index.js +176 -0
- package/node_modules/express/node_modules/content-type/dist/index.js.map +1 -0
- package/node_modules/express/node_modules/content-type/package.json +52 -0
- package/node_modules/express/package.json +10 -10
- package/node_modules/fast-uri/.github/workflows/release.yml +35 -0
- package/node_modules/fast-uri/README.md +8 -0
- package/node_modules/fast-uri/index.js +98 -18
- package/node_modules/fast-uri/lib/utils.js +52 -0
- package/node_modules/fast-uri/package.json +1 -1
- package/node_modules/fast-uri/test/host-delimiter-security.test.js +94 -0
- package/node_modules/fast-uri/test/relative-normalization-security.test.js +156 -0
- package/node_modules/fast-uri/test/reserved-path-normalization.test.js +32 -4
- package/node_modules/fast-uri/test/scheme-validation.test.js +53 -14
- package/node_modules/ip-address/README.md +70 -70
- package/node_modules/ip-address/dist/ipv6.js +7 -4
- package/node_modules/ip-address/dist/ipv6.js.map +1 -1
- package/node_modules/ip-address/dist/v6/constants.d.ts +3 -0
- package/node_modules/ip-address/dist/v6/constants.js +3 -0
- package/node_modules/ip-address/dist/v6/constants.js.map +1 -1
- package/node_modules/ip-address/package.json +2 -1
- package/node_modules/jose/README.md +2 -2
- package/node_modules/jose/dist/types/jwe/compact/decrypt.d.ts +5 -4
- package/node_modules/jose/dist/types/jwe/compact/encrypt.d.ts +4 -4
- package/node_modules/jose/dist/types/jwe/flattened/decrypt.d.ts +5 -4
- package/node_modules/jose/dist/types/jwe/flattened/encrypt.d.ts +5 -5
- package/node_modules/jose/dist/types/jwe/general/decrypt.d.ts +5 -4
- package/node_modules/jose/dist/types/jwe/general/encrypt.d.ts +5 -5
- package/node_modules/jose/dist/types/jws/compact/sign.d.ts +5 -4
- package/node_modules/jose/dist/types/jws/compact/verify.d.ts +5 -5
- package/node_modules/jose/dist/types/jws/flattened/sign.d.ts +5 -4
- package/node_modules/jose/dist/types/jws/flattened/verify.d.ts +6 -5
- package/node_modules/jose/dist/types/jws/general/sign.d.ts +9 -6
- package/node_modules/jose/dist/types/jws/general/verify.d.ts +7 -5
- package/node_modules/jose/dist/types/jwt/decrypt.d.ts +7 -6
- package/node_modules/jose/dist/types/jwt/encrypt.d.ts +1 -1
- package/node_modules/jose/dist/types/jwt/sign.d.ts +1 -1
- package/node_modules/jose/dist/types/jwt/unsecured.d.ts +1 -1
- package/node_modules/jose/dist/types/jwt/verify.d.ts +3 -5
- package/node_modules/jose/dist/types/key/export.d.ts +1 -1
- package/node_modules/jose/dist/types/key/generate_secret.d.ts +1 -1
- package/node_modules/jose/dist/types/key/import.d.ts +2 -2
- package/node_modules/jose/dist/types/types.d.ts +165 -107
- package/node_modules/jose/dist/types/util/decode_jwt.d.ts +2 -2
- package/node_modules/jose/dist/types/util/errors.d.ts +1 -1
- package/node_modules/jose/dist/webapi/jwe/general/encrypt.js +3 -3
- package/node_modules/jose/dist/webapi/jwk/thumbprint.js +8 -8
- package/node_modules/jose/dist/webapi/jwks/local.js +2 -1
- package/node_modules/jose/dist/webapi/jwks/remote.js +4 -4
- package/node_modules/jose/dist/webapi/jws/general/sign.js +3 -3
- package/node_modules/jose/dist/webapi/jws/general/verify.js +3 -3
- package/node_modules/jose/dist/webapi/jwt/encrypt.js +2 -2
- package/node_modules/jose/dist/webapi/jwt/sign.js +2 -2
- package/node_modules/jose/dist/webapi/jwt/unsecured.js +3 -3
- package/node_modules/jose/dist/webapi/key/generate_secret.js +4 -4
- package/node_modules/jose/dist/webapi/lib/asn1.js +2 -2
- package/node_modules/jose/dist/webapi/lib/buffer_utils.js +4 -4
- package/node_modules/jose/dist/webapi/lib/content_encryption.js +8 -8
- package/node_modules/jose/dist/webapi/lib/jwe_decrypt.js +14 -14
- package/node_modules/jose/dist/webapi/lib/jwe_encrypt.js +3 -3
- package/node_modules/jose/dist/webapi/lib/jws_algorithms.js +2 -2
- package/node_modules/jose/dist/webapi/lib/jws_sign.js +11 -11
- package/node_modules/jose/dist/webapi/lib/jws_verify.js +19 -16
- package/node_modules/jose/dist/webapi/lib/jwt_claims_set.js +44 -43
- package/node_modules/jose/dist/webapi/lib/key.js +4 -4
- package/node_modules/jose/dist/webapi/lib/key_management.js +17 -17
- package/node_modules/jose/dist/webapi/lib/validate.js +10 -10
- package/node_modules/jose/dist/webapi/util/decode_jwt.js +12 -12
- package/node_modules/jose/dist/webapi/util/decode_protected_header.js +5 -5
- package/node_modules/jose/package.json +1 -1
- package/node_modules/qs/.github/THREAT_MODEL.md +4 -2
- package/node_modules/qs/CHANGELOG.md +38 -14
- package/node_modules/qs/README.md +31 -3
- package/node_modules/qs/dist/qs.js +20 -20
- package/node_modules/qs/lib/parse.js +94 -4
- package/node_modules/qs/lib/stringify.js +4 -4
- package/node_modules/qs/lib/utils.js +130 -6
- package/node_modules/qs/package.json +4 -4
- package/node_modules/qs/test/parse.js +174 -0
- package/node_modules/qs/test/stringify.js +263 -33
- package/node_modules/qs/test/utils.js +184 -0
- package/node_modules/undici/docs/docs/api/Client.md +2 -0
- package/node_modules/undici/lib/core/connect.js +10 -4
- package/node_modules/undici/lib/core/symbols.js +1 -0
- package/node_modules/undici/lib/dispatcher/agent.js +6 -2
- package/node_modules/undici/lib/dispatcher/client-h1.js +0 -2
- package/node_modules/undici/lib/dispatcher/client-h2.js +0 -4
- package/node_modules/undici/lib/dispatcher/client.js +3 -2
- package/node_modules/undici/lib/dispatcher/dispatcher-base.js +12 -0
- package/node_modules/undici/lib/handler/cache-handler.js +48 -0
- package/node_modules/undici/lib/handler/deduplication-handler.js +57 -13
- package/node_modules/undici/lib/handler/redirect-handler.js +8 -1
- package/node_modules/undici/lib/interceptor/decompress.js +15 -5
- package/node_modules/undici/lib/web/cookies/index.js +3 -1
- package/node_modules/undici/lib/web/cookies/parse.js +138 -137
- package/node_modules/undici/lib/web/cookies/util.js +21 -2
- package/node_modules/undici/lib/web/eventsource/eventsource-stream.js +90 -9
- package/node_modules/undici/lib/web/eventsource/eventsource.js +4 -1
- package/node_modules/undici/lib/web/fetch/index.js +3 -3
- package/node_modules/undici/lib/web/infra/index.js +14 -0
- package/node_modules/undici/lib/web/subresource-integrity/subresource-integrity.js +5 -5
- package/node_modules/undici/lib/web/websocket/receiver.js +13 -0
- package/node_modules/undici/package.json +1 -1
- package/node_modules/undici/types/client.d.ts +14 -0
- package/node_modules/zod/package.json +1 -1
- package/node_modules/zod/src/v4/classic/tests/array.test.ts +27 -0
- package/node_modules/zod/src/v4/classic/tests/map.test.ts +7 -0
- package/node_modules/zod/src/v4/classic/tests/set.test.ts +6 -0
- package/node_modules/zod/src/v4/core/compile.ts +9 -0
- package/node_modules/zod/src/v4/core/schemas.ts +35 -1
- package/node_modules/zod/src/v4/core/util.ts +13 -0
- package/node_modules/zod/src/v4/core/versions.ts +1 -1
- package/node_modules/zod/v4/core/compile.cjs +8 -0
- package/node_modules/zod/v4/core/compile.js +8 -0
- package/node_modules/zod/v4/core/schemas.cjs +30 -0
- package/node_modules/zod/v4/core/schemas.d.cts +3 -1
- package/node_modules/zod/v4/core/schemas.d.ts +3 -1
- package/node_modules/zod/v4/core/schemas.js +30 -0
- package/node_modules/zod/v4/core/util.cjs +15 -0
- package/node_modules/zod/v4/core/util.d.cts +2 -0
- package/node_modules/zod/v4/core/util.d.ts +2 -0
- package/node_modules/zod/v4/core/util.js +14 -0
- package/node_modules/zod/v4/core/versions.cjs +1 -1
- package/node_modules/zod/v4/core/versions.js +1 -1
- package/package.json +5 -4
- package/slingshot/index.js +214 -214
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
- package/node_modules/@esbuild/linux-x64/README.md +0 -3
- package/node_modules/@esbuild/linux-x64/bin/esbuild +0 -0
- package/node_modules/@esbuild/linux-x64/package.json +0 -20
- package/node_modules/content-disposition/index.js +0 -536
- package/node_modules/esbuild/LICENSE.md +0 -21
- package/node_modules/esbuild/README.md +0 -3
- package/node_modules/esbuild/bin/esbuild +0 -0
- package/node_modules/esbuild/install.js +0 -300
- package/node_modules/esbuild/lib/main.d.ts +0 -720
- package/node_modules/esbuild/lib/main.js +0 -2536
- package/node_modules/esbuild/package.json +0 -74
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-es/submodules/protocols/json/needsReviver.js +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -0
- /package/node_modules/{@aws-sdk/core/dist-types/submodules/protocols/json → @smithy/core/dist-types/submodules/protocols/json/codec-v1}/JsonSettings.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -0
- /package/node_modules/{@aws-sdk → @smithy}/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -0
package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/mock-agent.js
CHANGED
|
@@ -55,6 +55,17 @@ class MockAgent extends Dispatcher {
|
|
|
55
55
|
}
|
|
56
56
|
}
|
|
57
57
|
|
|
58
|
+
// WebSocket and EventSource read their receive limits from the dispatcher
|
|
59
|
+
// they are given, so report the settings of the agent that makes real
|
|
60
|
+
// connections.
|
|
61
|
+
get webSocketOptions () {
|
|
62
|
+
return this[kAgent].webSocketOptions
|
|
63
|
+
}
|
|
64
|
+
|
|
65
|
+
get eventSourceOptions () {
|
|
66
|
+
return this[kAgent].eventSourceOptions
|
|
67
|
+
}
|
|
68
|
+
|
|
58
69
|
get (origin) {
|
|
59
70
|
// Normalize origin to handle URL objects and case-insensitive hostnames
|
|
60
71
|
const normalizedOrigin = normalizeOrigin(origin)
|
|
@@ -4,6 +4,7 @@ const { writeFile, readFile, mkdir } = require('node:fs/promises')
|
|
|
4
4
|
const { dirname, resolve } = require('node:path')
|
|
5
5
|
const { setTimeout, clearTimeout } = require('node:timers')
|
|
6
6
|
const { InvalidArgumentError, UndiciError } = require('../core/errors')
|
|
7
|
+
const { setHeader } = require('../core/util')
|
|
7
8
|
const { hashId, isUrlExcludedFactory, normalizeHeaders, createHeaderFilters } = require('./snapshot-utils')
|
|
8
9
|
|
|
9
10
|
/**
|
|
@@ -169,7 +170,7 @@ function filterHeadersForMatching (headers, headerFilters, matchOptions = {}) {
|
|
|
169
170
|
if (!match.has(headerKey)) continue
|
|
170
171
|
}
|
|
171
172
|
|
|
172
|
-
filtered
|
|
173
|
+
setHeader(filtered, headerKey, value)
|
|
173
174
|
}
|
|
174
175
|
|
|
175
176
|
return filtered
|
|
@@ -198,7 +199,7 @@ function filterHeadersForStorage (headers, headerFilters, matchOptions = {}) {
|
|
|
198
199
|
// Skip if in exclude list (for security)
|
|
199
200
|
if (excludeSet.has(headerKey)) continue
|
|
200
201
|
|
|
201
|
-
filtered
|
|
202
|
+
setHeader(filtered, headerKey, value)
|
|
202
203
|
}
|
|
203
204
|
|
|
204
205
|
return filtered
|
package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/mock/snapshot-utils.js
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
'use strict'
|
|
2
2
|
|
|
3
3
|
const { InvalidArgumentError } = require('../core/errors')
|
|
4
|
+
const { setHeader } = require('../core/util')
|
|
4
5
|
const { runtimeFeatures } = require('../util/runtime-features.js')
|
|
5
6
|
|
|
6
7
|
/**
|
|
@@ -116,7 +117,7 @@ function normalizeHeaders (headers) {
|
|
|
116
117
|
// Convert Buffers to strings if needed
|
|
117
118
|
const keyStr = Buffer.isBuffer(key) ? key.toString() : key
|
|
118
119
|
const valueStr = Buffer.isBuffer(value) ? value.toString() : value
|
|
119
|
-
normalizedHeaders
|
|
120
|
+
setHeader(normalizedHeaders, keyStr.toLowerCase(), valueStr)
|
|
120
121
|
}
|
|
121
122
|
}
|
|
122
123
|
return normalizedHeaders
|
|
@@ -126,7 +127,7 @@ function normalizeHeaders (headers) {
|
|
|
126
127
|
if (headers && typeof headers === 'object') {
|
|
127
128
|
for (const [key, value] of Object.entries(headers)) {
|
|
128
129
|
if (key && typeof key === 'string') {
|
|
129
|
-
normalizedHeaders
|
|
130
|
+
setHeader(normalizedHeaders, key.toLowerCase(), Array.isArray(value) ? value.join(', ') : String(value))
|
|
130
131
|
}
|
|
131
132
|
}
|
|
132
133
|
}
|
|
@@ -4,7 +4,8 @@ const {
|
|
|
4
4
|
safeHTTPMethods,
|
|
5
5
|
pathHasQueryOrFragment,
|
|
6
6
|
hasSafeIterator,
|
|
7
|
-
isValidHTTPToken
|
|
7
|
+
isValidHTTPToken,
|
|
8
|
+
setHeader
|
|
8
9
|
} = require('../core/util')
|
|
9
10
|
|
|
10
11
|
const { serializePathWithQuery } = require('../core/util')
|
|
@@ -206,15 +207,20 @@ function makeCacheKey (opts, origin = getRequestOrigin(opts)) {
|
|
|
206
207
|
|
|
207
208
|
function appendHeader (headers, key, val) {
|
|
208
209
|
const headerName = key.toLowerCase()
|
|
209
|
-
|
|
210
|
+
// Reading `headers[headerName]` directly would resolve `__proto__` (and any
|
|
211
|
+
// other inherited name) through the prototype chain rather than report the
|
|
212
|
+
// header as absent.
|
|
213
|
+
const current = Object.hasOwn(headers, headerName)
|
|
214
|
+
? headers[headerName]
|
|
215
|
+
: undefined
|
|
210
216
|
const values = Array.isArray(val) ? val : [val]
|
|
211
217
|
|
|
212
218
|
if (current === undefined) {
|
|
213
|
-
headers
|
|
219
|
+
setHeader(headers, headerName, Array.isArray(val) ? val.slice() : val)
|
|
214
220
|
} else if (Array.isArray(current)) {
|
|
215
221
|
current.push(...values)
|
|
216
222
|
} else {
|
|
217
|
-
headers
|
|
223
|
+
setHeader(headers, headerName, [current, ...values])
|
|
218
224
|
}
|
|
219
225
|
}
|
|
220
226
|
|
|
@@ -732,7 +738,7 @@ function makeDeduplicationKey (cacheKey, excludeHeaders) {
|
|
|
732
738
|
if (excludeHeaders?.has(header.toLowerCase())) {
|
|
733
739
|
continue
|
|
734
740
|
}
|
|
735
|
-
headers
|
|
741
|
+
setHeader(headers, header, cacheKey.headers[header])
|
|
736
742
|
}
|
|
737
743
|
}
|
|
738
744
|
|
package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cache/cache.js
CHANGED
|
@@ -41,7 +41,7 @@ class Cache {
|
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
async match (request, options = {}) {
|
|
44
|
-
webidl.brandCheck(this, Cache)
|
|
44
|
+
webidl.brandCheck(this, webidl.is.Cache)
|
|
45
45
|
|
|
46
46
|
const prefix = 'Cache.match'
|
|
47
47
|
webidl.argumentLengthCheck(arguments, 1, prefix)
|
|
@@ -59,7 +59,7 @@ class Cache {
|
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
async matchAll (request = undefined, options = {}) {
|
|
62
|
-
webidl.brandCheck(this, Cache)
|
|
62
|
+
webidl.brandCheck(this, webidl.is.Cache)
|
|
63
63
|
|
|
64
64
|
const prefix = 'Cache.matchAll'
|
|
65
65
|
if (request !== undefined) request = webidl.converters.RequestInfo(request)
|
|
@@ -69,7 +69,7 @@ class Cache {
|
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
async add (request) {
|
|
72
|
-
webidl.brandCheck(this, Cache)
|
|
72
|
+
webidl.brandCheck(this, webidl.is.Cache)
|
|
73
73
|
|
|
74
74
|
const prefix = 'Cache.add'
|
|
75
75
|
webidl.argumentLengthCheck(arguments, 1, prefix)
|
|
@@ -87,7 +87,7 @@ class Cache {
|
|
|
87
87
|
}
|
|
88
88
|
|
|
89
89
|
async addAll (requests) {
|
|
90
|
-
webidl.brandCheck(this, Cache)
|
|
90
|
+
webidl.brandCheck(this, webidl.is.Cache)
|
|
91
91
|
|
|
92
92
|
const prefix = 'Cache.addAll'
|
|
93
93
|
webidl.argumentLengthCheck(arguments, 1, prefix)
|
|
@@ -185,7 +185,10 @@ class Cache {
|
|
|
185
185
|
}
|
|
186
186
|
}
|
|
187
187
|
},
|
|
188
|
-
processResponseEndOfBody (
|
|
188
|
+
// Possible spec bug. If the body is never read, `processResponseEndOfBody` (which is attached to a TransformStream's flush hook)
|
|
189
|
+
// never runs, so this would hang. This hook, on the other hand, always reads the body.
|
|
190
|
+
// https://github.com/nodejs/undici/issues/5615
|
|
191
|
+
processResponseConsumeBody (response) {
|
|
189
192
|
// 1.
|
|
190
193
|
if (response.aborted) {
|
|
191
194
|
responsePromise.reject(new DOMException('aborted', 'AbortError'))
|
|
@@ -257,7 +260,7 @@ class Cache {
|
|
|
257
260
|
}
|
|
258
261
|
|
|
259
262
|
async put (request, response) {
|
|
260
|
-
webidl.brandCheck(this, Cache)
|
|
263
|
+
webidl.brandCheck(this, webidl.is.Cache)
|
|
261
264
|
|
|
262
265
|
const prefix = 'Cache.put'
|
|
263
266
|
webidl.argumentLengthCheck(arguments, 2, prefix)
|
|
@@ -388,7 +391,7 @@ class Cache {
|
|
|
388
391
|
}
|
|
389
392
|
|
|
390
393
|
async delete (request, options = {}) {
|
|
391
|
-
webidl.brandCheck(this, Cache)
|
|
394
|
+
webidl.brandCheck(this, webidl.is.Cache)
|
|
392
395
|
|
|
393
396
|
const prefix = 'Cache.delete'
|
|
394
397
|
webidl.argumentLengthCheck(arguments, 1, prefix)
|
|
@@ -454,7 +457,7 @@ class Cache {
|
|
|
454
457
|
* @returns {Promise<readonly Request[]>}
|
|
455
458
|
*/
|
|
456
459
|
async keys (request = undefined, options = {}) {
|
|
457
|
-
webidl.brandCheck(this, Cache)
|
|
460
|
+
webidl.brandCheck(this, webidl.is.Cache)
|
|
458
461
|
|
|
459
462
|
const prefix = 'Cache.keys'
|
|
460
463
|
|
|
@@ -804,6 +807,12 @@ class Cache {
|
|
|
804
807
|
// 6.
|
|
805
808
|
return Object.freeze(responseList)
|
|
806
809
|
}
|
|
810
|
+
|
|
811
|
+
static {
|
|
812
|
+
webidl.is.Cache = (arg) => {
|
|
813
|
+
return arg != null && typeof arg === 'object' && #relevantRequestResponseList in arg
|
|
814
|
+
}
|
|
815
|
+
}
|
|
807
816
|
}
|
|
808
817
|
|
|
809
818
|
Object.defineProperties(Cache.prototype, {
|
|
@@ -21,7 +21,7 @@ class CacheStorage {
|
|
|
21
21
|
}
|
|
22
22
|
|
|
23
23
|
async match (request, options = {}) {
|
|
24
|
-
webidl.brandCheck(this, CacheStorage)
|
|
24
|
+
webidl.brandCheck(this, webidl.is.CacheStorage)
|
|
25
25
|
webidl.argumentLengthCheck(arguments, 1, 'CacheStorage.match')
|
|
26
26
|
|
|
27
27
|
request = webidl.converters.RequestInfo(request)
|
|
@@ -58,7 +58,7 @@ class CacheStorage {
|
|
|
58
58
|
* @returns {Promise<boolean>}
|
|
59
59
|
*/
|
|
60
60
|
async has (cacheName) {
|
|
61
|
-
webidl.brandCheck(this, CacheStorage)
|
|
61
|
+
webidl.brandCheck(this, webidl.is.CacheStorage)
|
|
62
62
|
|
|
63
63
|
const prefix = 'CacheStorage.has'
|
|
64
64
|
webidl.argumentLengthCheck(arguments, 1, prefix)
|
|
@@ -76,7 +76,7 @@ class CacheStorage {
|
|
|
76
76
|
* @returns {Promise<Cache>}
|
|
77
77
|
*/
|
|
78
78
|
async open (cacheName) {
|
|
79
|
-
webidl.brandCheck(this, CacheStorage)
|
|
79
|
+
webidl.brandCheck(this, webidl.is.CacheStorage)
|
|
80
80
|
|
|
81
81
|
const prefix = 'CacheStorage.open'
|
|
82
82
|
webidl.argumentLengthCheck(arguments, 1, prefix)
|
|
@@ -110,7 +110,7 @@ class CacheStorage {
|
|
|
110
110
|
* @returns {Promise<boolean>}
|
|
111
111
|
*/
|
|
112
112
|
async delete (cacheName) {
|
|
113
|
-
webidl.brandCheck(this, CacheStorage)
|
|
113
|
+
webidl.brandCheck(this, webidl.is.CacheStorage)
|
|
114
114
|
|
|
115
115
|
const prefix = 'CacheStorage.delete'
|
|
116
116
|
webidl.argumentLengthCheck(arguments, 1, prefix)
|
|
@@ -125,7 +125,7 @@ class CacheStorage {
|
|
|
125
125
|
* @returns {Promise<string[]>}
|
|
126
126
|
*/
|
|
127
127
|
async keys () {
|
|
128
|
-
webidl.brandCheck(this, CacheStorage)
|
|
128
|
+
webidl.brandCheck(this, webidl.is.CacheStorage)
|
|
129
129
|
|
|
130
130
|
// 2.1
|
|
131
131
|
const keys = this.#caches.keys()
|
|
@@ -133,6 +133,12 @@ class CacheStorage {
|
|
|
133
133
|
// 2.2
|
|
134
134
|
return [...keys]
|
|
135
135
|
}
|
|
136
|
+
|
|
137
|
+
static {
|
|
138
|
+
webidl.is.CacheStorage = (arg) => {
|
|
139
|
+
return arg != null && typeof arg === 'object' && #caches in arg
|
|
140
|
+
}
|
|
141
|
+
}
|
|
136
142
|
}
|
|
137
143
|
|
|
138
144
|
Object.defineProperties(CacheStorage.prototype, {
|
package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/index.js
CHANGED
|
@@ -3,9 +3,19 @@
|
|
|
3
3
|
const { parseSetCookie } = require('./parse')
|
|
4
4
|
const { stringify } = require('./util')
|
|
5
5
|
const { webidl } = require('../webidl')
|
|
6
|
-
const { Headers } = require('../fetch/headers')
|
|
7
6
|
|
|
8
|
-
const
|
|
7
|
+
const globalHeadersBrandCheck = (arg) => webidl.brandCheck(arg, webidl.util.MakeTypeAssertion(globalThis.Headers))
|
|
8
|
+
const undiciHeadersBrandCheck = (arg) => webidl.brandCheck(arg, webidl.is.Headers)
|
|
9
|
+
|
|
10
|
+
function brandCheckHeaders (arg) {
|
|
11
|
+
try {
|
|
12
|
+
undiciHeadersBrandCheck(arg)
|
|
13
|
+
return
|
|
14
|
+
} catch {
|
|
15
|
+
}
|
|
16
|
+
|
|
17
|
+
globalHeadersBrandCheck(arg)
|
|
18
|
+
}
|
|
9
19
|
|
|
10
20
|
/**
|
|
11
21
|
* @typedef {Object} Cookie
|
|
@@ -28,12 +38,14 @@ const brandChecks = webidl.brandCheckMultiple([Headers, globalThis.Headers].filt
|
|
|
28
38
|
function getCookies (headers) {
|
|
29
39
|
webidl.argumentLengthCheck(arguments, 1, 'getCookies')
|
|
30
40
|
|
|
31
|
-
|
|
41
|
+
brandCheckHeaders(headers)
|
|
32
42
|
|
|
33
43
|
const cookie = headers.get('cookie')
|
|
34
44
|
|
|
45
|
+
// A null prototype keeps a cookie named `__proto__` from hitting the
|
|
46
|
+
// Object.prototype setter, which would silently drop it.
|
|
35
47
|
/** @type {Record<string, string>} */
|
|
36
|
-
const out = {}
|
|
48
|
+
const out = { __proto__: null }
|
|
37
49
|
|
|
38
50
|
if (!cookie) {
|
|
39
51
|
return out
|
|
@@ -55,7 +67,7 @@ function getCookies (headers) {
|
|
|
55
67
|
* @returns {void}
|
|
56
68
|
*/
|
|
57
69
|
function deleteCookie (headers, name, attributes) {
|
|
58
|
-
|
|
70
|
+
brandCheckHeaders(headers)
|
|
59
71
|
|
|
60
72
|
const prefix = 'deleteCookie'
|
|
61
73
|
webidl.argumentLengthCheck(arguments, 2, prefix)
|
|
@@ -80,7 +92,7 @@ function deleteCookie (headers, name, attributes) {
|
|
|
80
92
|
function getSetCookies (headers) {
|
|
81
93
|
webidl.argumentLengthCheck(arguments, 1, 'getSetCookies')
|
|
82
94
|
|
|
83
|
-
|
|
95
|
+
brandCheckHeaders(headers)
|
|
84
96
|
|
|
85
97
|
const cookies = headers.getSetCookie()
|
|
86
98
|
|
|
@@ -109,7 +121,7 @@ function parseCookie (cookie) {
|
|
|
109
121
|
function setCookie (headers, cookie) {
|
|
110
122
|
webidl.argumentLengthCheck(arguments, 2, 'setCookie')
|
|
111
123
|
|
|
112
|
-
|
|
124
|
+
brandCheckHeaders(headers)
|
|
113
125
|
|
|
114
126
|
cookie = webidl.converters.Cookie(cookie)
|
|
115
127
|
|
package/node_modules/@earendil-works/pi-coding-agent/node_modules/undici/lib/web/cookies/util.js
CHANGED
|
@@ -315,8 +315,27 @@ function stringify (cookie) {
|
|
|
315
315
|
out.push(`Path=${cookie.path}`)
|
|
316
316
|
}
|
|
317
317
|
|
|
318
|
-
|
|
319
|
-
|
|
318
|
+
// A numeric 0 is the Unix epoch, not an absent value -- the same reason the
|
|
319
|
+
// Max-Age check above tests the type rather than truthiness.
|
|
320
|
+
//
|
|
321
|
+
// expires is Date | number, so the "Invalid Date" check only guards the Date
|
|
322
|
+
// form. A number that is not a valid time value (NaN, +/-Infinity, or outside
|
|
323
|
+
// the Date range) would otherwise reach toIMFDate, which splices undefined and
|
|
324
|
+
// NaN into the header value instead of failing.
|
|
325
|
+
if (cookie.expires != null) {
|
|
326
|
+
const expiresMs = cookie.expires instanceof Date
|
|
327
|
+
? cookie.expires.getTime()
|
|
328
|
+
: cookie.expires
|
|
329
|
+
|
|
330
|
+
// The largest time value a Date can represent, in milliseconds, i.e.
|
|
331
|
+
// 100,000,000 days either side of the epoch (ECMA-262 Date Time Values).
|
|
332
|
+
// Anything within it is safe for toIMFDate to format; anything beyond it
|
|
333
|
+
// produces an invalid Date and must be ignored instead.
|
|
334
|
+
const maxTimeValue = 8640000000000000
|
|
335
|
+
|
|
336
|
+
if (typeof expiresMs === 'number' && Number.isFinite(expiresMs) && Math.abs(expiresMs) <= maxTimeValue) {
|
|
337
|
+
out.push(`Expires=${toIMFDate(cookie.expires)}`)
|
|
338
|
+
}
|
|
320
339
|
}
|
|
321
340
|
|
|
322
341
|
if (cookie.sameSite) {
|
|
@@ -31,6 +31,12 @@ const EVENT = Buffer.from('event')
|
|
|
31
31
|
const ID = Buffer.from('id')
|
|
32
32
|
const RETRY = Buffer.from('retry')
|
|
33
33
|
|
|
34
|
+
// Each data field creates a string node, and each unconsumed input chunk keeps
|
|
35
|
+
// a Buffer wrapper. The absolute ceiling protects the large default byte limit.
|
|
36
|
+
const minParserItems = 1024
|
|
37
|
+
const maxParserItems = 131072
|
|
38
|
+
const bytesPerParserItem = 128
|
|
39
|
+
|
|
34
40
|
function isASCIINumberBytes (buffer, start) {
|
|
35
41
|
if (start >= buffer.length) {
|
|
36
42
|
return false
|
|
@@ -123,8 +129,13 @@ class EventSourceStream extends Transform {
|
|
|
123
129
|
pos = 0
|
|
124
130
|
lineChunkIndex = 0
|
|
125
131
|
linePos = 0
|
|
126
|
-
|
|
132
|
+
lineLength = 0
|
|
133
|
+
eventSize = 0
|
|
134
|
+
eventFieldSizes = { data: 0, event: 0, id: 0, retry: 0 }
|
|
135
|
+
dataLineCount = 0
|
|
127
136
|
maxEventSize
|
|
137
|
+
maxDataLines
|
|
138
|
+
maxBufferedChunks
|
|
128
139
|
|
|
129
140
|
event = {
|
|
130
141
|
data: undefined,
|
|
@@ -149,6 +160,11 @@ class EventSourceStream extends Transform {
|
|
|
149
160
|
|
|
150
161
|
this.state = options.eventSourceSettings || {}
|
|
151
162
|
this.maxEventSize = options.maxEventSize ?? defaultMaxEventSize
|
|
163
|
+
const parserItemLimit = this.maxEventSize > 0
|
|
164
|
+
? Math.min(maxParserItems, Math.max(minParserItems, Math.floor(this.maxEventSize / bytesPerParserItem)))
|
|
165
|
+
: 0
|
|
166
|
+
this.maxDataLines = parserItemLimit
|
|
167
|
+
this.maxBufferedChunks = parserItemLimit
|
|
152
168
|
if (options.push) {
|
|
153
169
|
this.push = options.push
|
|
154
170
|
}
|
|
@@ -166,6 +182,14 @@ class EventSourceStream extends Transform {
|
|
|
166
182
|
return
|
|
167
183
|
}
|
|
168
184
|
|
|
185
|
+
// A leading line ending can immediately release the currently buffered
|
|
186
|
+
// line, even when it uses the final allowed chunk slot.
|
|
187
|
+
if (this.maxEventSize > 0 &&
|
|
188
|
+
this.chunks.length >= this.maxBufferedChunks &&
|
|
189
|
+
chunk[0] !== LF && chunk[0] !== CR) {
|
|
190
|
+
callback(createMaxEventSizeExceededError())
|
|
191
|
+
return
|
|
192
|
+
}
|
|
169
193
|
this.chunks.push(chunk)
|
|
170
194
|
|
|
171
195
|
// Strip leading byte-order-mark if we opened the stream and started
|
|
@@ -258,12 +282,25 @@ class EventSourceStream extends Transform {
|
|
|
258
282
|
continue
|
|
259
283
|
}
|
|
260
284
|
|
|
285
|
+
// readLine() is only called after CR or LF. Reject an unfinished line
|
|
286
|
+
// before it can retain an unbounded number of decoded chunks. The seven
|
|
287
|
+
// extra bytes allow the longest field prefix ("event: " or "retry: ").
|
|
288
|
+
if (this.maxEventSize > 0 && ++this.lineLength > this.maxEventSize + 7) {
|
|
289
|
+
callback(createMaxEventSizeExceededError())
|
|
290
|
+
return
|
|
291
|
+
}
|
|
261
292
|
this.advanceCursor()
|
|
262
293
|
}
|
|
263
294
|
|
|
264
295
|
callback()
|
|
265
296
|
}
|
|
266
297
|
|
|
298
|
+
_destroy (error, callback) {
|
|
299
|
+
this.chunks.length = 0
|
|
300
|
+
this.clearEvent()
|
|
301
|
+
super._destroy(error, callback)
|
|
302
|
+
}
|
|
303
|
+
|
|
267
304
|
/**
|
|
268
305
|
* @param {Buffer} line
|
|
269
306
|
* @param {EventSourceStreamEvent} event
|
|
@@ -300,12 +337,12 @@ class EventSourceStream extends Transform {
|
|
|
300
337
|
}
|
|
301
338
|
|
|
302
339
|
if (isFieldName(line, fieldLength, DATA)) {
|
|
303
|
-
|
|
304
|
-
const eventDataSize = this.eventDataSize + (event.data === undefined ? 0 : 1) + valueBytes
|
|
305
|
-
|
|
306
|
-
if (this.maxEventSize > 0 && eventDataSize > this.maxEventSize) {
|
|
340
|
+
if (this.maxEventSize > 0 && this.dataLineCount >= this.maxDataLines) {
|
|
307
341
|
throw createMaxEventSizeExceededError()
|
|
308
342
|
}
|
|
343
|
+
const valueBytes = line.length - valueStart
|
|
344
|
+
const dataSize = this.eventFieldSizes.data + (event.data === undefined ? 0 : 1) + valueBytes
|
|
345
|
+
this.setEventFieldSize('data', dataSize)
|
|
309
346
|
|
|
310
347
|
const value = line.toString('utf8', valueStart)
|
|
311
348
|
|
|
@@ -314,12 +351,13 @@ class EventSourceStream extends Transform {
|
|
|
314
351
|
} else {
|
|
315
352
|
event.data += `\n${value}`
|
|
316
353
|
}
|
|
317
|
-
this.
|
|
354
|
+
this.dataLineCount++
|
|
318
355
|
return
|
|
319
356
|
}
|
|
320
357
|
|
|
321
358
|
if (isFieldName(line, fieldLength, RETRY)) {
|
|
322
359
|
if (isASCIINumberBytes(line, valueStart)) {
|
|
360
|
+
this.setEventFieldSize('retry', line.length - valueStart)
|
|
323
361
|
event.retry = line.toString('utf8', valueStart)
|
|
324
362
|
}
|
|
325
363
|
return
|
|
@@ -327,20 +365,29 @@ class EventSourceStream extends Transform {
|
|
|
327
365
|
|
|
328
366
|
if (isFieldName(line, fieldLength, ID)) {
|
|
329
367
|
if (isValidLastEventIdBytes(line, valueStart)) {
|
|
368
|
+
this.setEventFieldSize('id', line.length - valueStart)
|
|
330
369
|
event.id = line.toString('utf8', valueStart)
|
|
331
370
|
}
|
|
332
371
|
return
|
|
333
372
|
}
|
|
334
373
|
|
|
335
374
|
if (isFieldName(line, fieldLength, EVENT)) {
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
event.event = value
|
|
375
|
+
if (valueStart < line.length) {
|
|
376
|
+
this.setEventFieldSize('event', line.length - valueStart)
|
|
377
|
+
event.event = line.toString('utf8', valueStart)
|
|
340
378
|
}
|
|
341
379
|
}
|
|
342
380
|
}
|
|
343
381
|
|
|
382
|
+
setEventFieldSize (field, size) {
|
|
383
|
+
const eventSize = this.eventSize - this.eventFieldSizes[field] + size
|
|
384
|
+
if (this.maxEventSize > 0 && eventSize > this.maxEventSize) {
|
|
385
|
+
throw createMaxEventSizeExceededError()
|
|
386
|
+
}
|
|
387
|
+
this.eventSize = eventSize
|
|
388
|
+
this.eventFieldSizes[field] = size
|
|
389
|
+
}
|
|
390
|
+
|
|
344
391
|
/**
|
|
345
392
|
* @param {EventSourceStreamEvent} event
|
|
346
393
|
*/
|
|
@@ -371,7 +418,12 @@ class EventSourceStream extends Transform {
|
|
|
371
418
|
this.event.event = undefined
|
|
372
419
|
this.event.id = undefined
|
|
373
420
|
this.event.retry = undefined
|
|
374
|
-
this.
|
|
421
|
+
this.eventSize = 0
|
|
422
|
+
this.dataLineCount = 0
|
|
423
|
+
this.eventFieldSizes.data = 0
|
|
424
|
+
this.eventFieldSizes.event = 0
|
|
425
|
+
this.eventFieldSizes.id = 0
|
|
426
|
+
this.eventFieldSizes.retry = 0
|
|
375
427
|
}
|
|
376
428
|
|
|
377
429
|
hasPendingEvent () {
|
|
@@ -407,14 +459,16 @@ class EventSourceStream extends Transform {
|
|
|
407
459
|
syncLineStartToCursor () {
|
|
408
460
|
this.lineChunkIndex = this.chunkIndex
|
|
409
461
|
this.linePos = this.pos
|
|
462
|
+
this.lineLength = 0
|
|
410
463
|
this.dropConsumedChunks()
|
|
411
464
|
}
|
|
412
465
|
|
|
413
466
|
dropConsumedChunks () {
|
|
414
|
-
|
|
415
|
-
this.
|
|
416
|
-
this.
|
|
417
|
-
this.
|
|
467
|
+
if (this.lineChunkIndex > 0) {
|
|
468
|
+
const consumed = this.lineChunkIndex
|
|
469
|
+
this.chunks.splice(0, consumed)
|
|
470
|
+
this.lineChunkIndex = 0
|
|
471
|
+
this.chunkIndex -= consumed
|
|
418
472
|
}
|
|
419
473
|
|
|
420
474
|
if (this.chunkIndex === this.chunks.length) {
|
|
@@ -7,6 +7,7 @@ const { EventSourceStream } = require('./eventsource-stream')
|
|
|
7
7
|
const { parseMIMEType } = require('../fetch/data-url')
|
|
8
8
|
const { createFastMessageEvent } = require('../websocket/events')
|
|
9
9
|
const { isNetworkError } = require('../fetch/response')
|
|
10
|
+
const { cloneRequest } = require('../fetch/request')
|
|
10
11
|
const { isValidHeaderValue, kEnumerableProperty } = require('../../core/util')
|
|
11
12
|
const { environmentSettingsObject } = require('../fetch/util')
|
|
12
13
|
const { createPotentialCORSRequest } = require('./util')
|
|
@@ -29,6 +30,14 @@ let experimentalWarned = false
|
|
|
29
30
|
*/
|
|
30
31
|
const defaultReconnectionTime = 3000
|
|
31
32
|
|
|
33
|
+
/**
|
|
34
|
+
* The largest delay setTimeout supports. Larger values (including Infinity)
|
|
35
|
+
* make Node.js fire the timer after 1 ms instead, which would turn a large
|
|
36
|
+
* reconnection time into a reconnect storm.
|
|
37
|
+
* @type {number}
|
|
38
|
+
*/
|
|
39
|
+
const maxReconnectionTime = 2 ** 31 - 1
|
|
40
|
+
|
|
32
41
|
/**
|
|
33
42
|
* The readyState attribute represents the state of the connection.
|
|
34
43
|
* @typedef ReadyState
|
|
@@ -191,6 +200,8 @@ class EventSource extends EventTarget {
|
|
|
191
200
|
* @readonly
|
|
192
201
|
*/
|
|
193
202
|
get readyState () {
|
|
203
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
204
|
+
|
|
194
205
|
return this.#readyState
|
|
195
206
|
}
|
|
196
207
|
|
|
@@ -200,6 +211,8 @@ class EventSource extends EventTarget {
|
|
|
200
211
|
* @returns {string}
|
|
201
212
|
*/
|
|
202
213
|
get url () {
|
|
214
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
215
|
+
|
|
203
216
|
return this.#url
|
|
204
217
|
}
|
|
205
218
|
|
|
@@ -208,6 +221,8 @@ class EventSource extends EventTarget {
|
|
|
208
221
|
* instantiated with CORS credentials set (true), or not (false, the default).
|
|
209
222
|
*/
|
|
210
223
|
get withCredentials () {
|
|
224
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
225
|
+
|
|
211
226
|
return this.#withCredentials
|
|
212
227
|
}
|
|
213
228
|
|
|
@@ -216,8 +231,22 @@ class EventSource extends EventTarget {
|
|
|
216
231
|
|
|
217
232
|
this.#readyState = CONNECTING
|
|
218
233
|
|
|
234
|
+
// Fetch a copy of the request so that every connection starts from the
|
|
235
|
+
// original request. Fetch mutates the request it is given (URL list,
|
|
236
|
+
// redirect count, response tainting and, on cross-origin redirects,
|
|
237
|
+
// headers), so reusing it makes reconnects go to the last redirect
|
|
238
|
+
// target and, after 20 redirects in total, fail forever.
|
|
239
|
+
// cloneRequest() shares the URL list, so copy it as well.
|
|
240
|
+
// 301/308 permanent redirects are handled the same as 302/307 temporary
|
|
241
|
+
// redirects. While the original EventSource spec required that permanent
|
|
242
|
+
// redirects be handled, WHATWG removed that requirement and has not
|
|
243
|
+
// yet opted to restore it... therefore all redirects gets handled the
|
|
244
|
+
// same.
|
|
245
|
+
const request = cloneRequest(this.#request)
|
|
246
|
+
request.urlList = [...this.#request.urlList]
|
|
247
|
+
|
|
219
248
|
const fetchParams = {
|
|
220
|
-
request
|
|
249
|
+
request,
|
|
221
250
|
dispatcher: this.#dispatcher
|
|
222
251
|
}
|
|
223
252
|
|
|
@@ -355,7 +384,7 @@ class EventSource extends EventTarget {
|
|
|
355
384
|
|
|
356
385
|
// 4. Fetch request and process the response obtained in this fashion, if any, as described earlier in this section.
|
|
357
386
|
this.#connect()
|
|
358
|
-
}, this.#state.reconnectionTime)?.unref()
|
|
387
|
+
}, Math.min(this.#state.reconnectionTime, maxReconnectionTime))?.unref()
|
|
359
388
|
}
|
|
360
389
|
|
|
361
390
|
/**
|
|
@@ -363,7 +392,7 @@ class EventSource extends EventTarget {
|
|
|
363
392
|
* CLOSED.
|
|
364
393
|
*/
|
|
365
394
|
close () {
|
|
366
|
-
webidl.brandCheck(this, EventSource)
|
|
395
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
367
396
|
|
|
368
397
|
if (this.#readyState === CLOSED) return
|
|
369
398
|
this.#readyState = CLOSED
|
|
@@ -372,10 +401,14 @@ class EventSource extends EventTarget {
|
|
|
372
401
|
}
|
|
373
402
|
|
|
374
403
|
get onopen () {
|
|
404
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
405
|
+
|
|
375
406
|
return this.#events.open
|
|
376
407
|
}
|
|
377
408
|
|
|
378
409
|
set onopen (fn) {
|
|
410
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
411
|
+
|
|
379
412
|
if (this.#events.open) {
|
|
380
413
|
this.removeEventListener('open', this.#events.open)
|
|
381
414
|
}
|
|
@@ -391,10 +424,14 @@ class EventSource extends EventTarget {
|
|
|
391
424
|
}
|
|
392
425
|
|
|
393
426
|
get onmessage () {
|
|
427
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
428
|
+
|
|
394
429
|
return this.#events.message
|
|
395
430
|
}
|
|
396
431
|
|
|
397
432
|
set onmessage (fn) {
|
|
433
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
434
|
+
|
|
398
435
|
if (this.#events.message) {
|
|
399
436
|
this.removeEventListener('message', this.#events.message)
|
|
400
437
|
}
|
|
@@ -410,10 +447,14 @@ class EventSource extends EventTarget {
|
|
|
410
447
|
}
|
|
411
448
|
|
|
412
449
|
get onerror () {
|
|
450
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
451
|
+
|
|
413
452
|
return this.#events.error
|
|
414
453
|
}
|
|
415
454
|
|
|
416
455
|
set onerror (fn) {
|
|
456
|
+
webidl.brandCheck(this, webidl.is.EventSource)
|
|
457
|
+
|
|
417
458
|
if (this.#events.error) {
|
|
418
459
|
this.removeEventListener('error', this.#events.error)
|
|
419
460
|
}
|
|
@@ -427,6 +468,12 @@ class EventSource extends EventTarget {
|
|
|
427
468
|
this.#events.error = null
|
|
428
469
|
}
|
|
429
470
|
}
|
|
471
|
+
|
|
472
|
+
static {
|
|
473
|
+
webidl.is.EventSource = (arg) => {
|
|
474
|
+
return arg != null && typeof arg === 'object' && #events in arg
|
|
475
|
+
}
|
|
476
|
+
}
|
|
430
477
|
}
|
|
431
478
|
|
|
432
479
|
const constantsPropertyDescriptors = {
|