@psnext/slingcli 2.5.20260724-1 → 2.5.20260725-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.js +1 -1
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +66 -28
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +133 -15
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.js +7 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js +28 -14
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.js +8 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/index.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.browser.js +9 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/index.js +5 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +12 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeDeserializer.js +10 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonShapeSerializer.js +10 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +18 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.js +13 -15
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/experimental/ByteJsonShapeSerializer.js +27 -17
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +22 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +41 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +33 -13
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/writeKey.js +3 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/XmlShapeDeserializer.js +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +6 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/index.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +22 -6
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/index.browser.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/index.d.ts +7 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +22 -6
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/index.d.ts +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +7 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/api-extractor-type-index.d.ts +7 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +21 -61
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +27 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +16 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +14 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +5 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/emitWarningIfUnsupportedVersion.d.ts +11 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +47 -107
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +39 -112
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +48 -107
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +14 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts +35 -25
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-logger/loggerMiddleware.d.ts +4 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/configuration.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.browser.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +10 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.native.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/check-features.d.ts +20 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/configurations.d.ts +44 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/constants.d.ts +7 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/encode-features.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/user-agent-middleware.d.ts +18 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/awsRegionConfig.d.ts +11 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/extensions.d.ts +16 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.browser.d.ts +4 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.d.ts +14 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.native.d.ts +4 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +7 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setFeature.d.ts +12 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +7 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/aws.d.ts +2 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/isVirtualHostableS3Bucket.d.ts +5 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/parseArn.d.ts +7 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partition.d.ts +38 -28
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +638 -647
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/isIpAddress.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveDefaultAwsRegionalEndpointsConfig.d.ts +56 -29
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/resolveEndpoint.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointError.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/EndpointRuleObject.d.ts +1 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/ErrorRuleObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/RuleSetObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/TreeRuleObject.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/types/shared.d.ts +1 -12
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/configurations.d.ts +7 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.d.ts +14 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +2 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +27 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +18 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/crt-availability.d.ts +8 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +28 -17
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.d.ts +6 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/is-crt-available.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.d.ts +13 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +10 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +44 -37
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +6 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +7 -23
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +38 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +133 -56
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.browser.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +9 -24
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +8 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.d.ts +6 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +8 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +8 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +26 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +4 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/isClockSkewed.d.ts +9 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +8 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +74 -40
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +24 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +25 -36
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/coercing-serializers.d.ts +18 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/common.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +22 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +22 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +22 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +29 -49
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +36 -49
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +19 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +28 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/awsExpectUnion.d.ts +7 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +29 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +57 -30
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +21 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +15 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +22 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +27 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +49 -57
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +13 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +16 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +31 -47
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +14 -17
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +20 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeSerializer.d.ts +21 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/parseXmlBody.d.ts +13 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +6 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/index.d.ts +3 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-arn-parser/arn.d.ts +32 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-format-url/format-url.d.ts +2 -4
- package/node_modules/@aws-sdk/core/package.json +10 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- 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/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 +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +1 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/dist-cjs/index.js +14 -4
- package/node_modules/@aws-sdk/xml-builder/dist-es/xml-parser.js +14 -4
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/agent-harness.js +17 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/compaction/compaction.js +8 -2
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/env/nodejs.js +118 -11
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/bash.js +132 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit-diff.js +386 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/edit.js +95 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/file-mutation-queue.js +46 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/image.js +106 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/index.js +5 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/path-utils.js +26 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/read.js +110 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/tool-context.js +2 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/tools/write.js +31 -0
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/shell-output.js +90 -35
- package/node_modules/@earendil-works/pi-agent-core/dist/harness/utils/truncate.js +10 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/index.js +1 -0
- package/node_modules/@earendil-works/pi-agent-core/package.json +3 -2
- package/node_modules/@earendil-works/pi-ai/dist/api/anthropic-messages.js +26 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/azure-openai-responses.js +21 -8
- package/node_modules/@earendil-works/pi-ai/dist/api/bedrock-converse-stream.js +17 -10
- package/node_modules/@earendil-works/pi-ai/dist/api/constrained-sampling.js +100 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/google-generative-ai.js +7 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/google-shared.js +17 -3
- package/node_modules/@earendil-works/pi-ai/dist/api/google-vertex.js +7 -11
- package/node_modules/@earendil-works/pi-ai/dist/api/mistral-conversations.js +13 -9
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-codex-responses.js +68 -27
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-completions.js +131 -34
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses-shared.js +173 -66
- package/node_modules/@earendil-works/pi-ai/dist/api/openai-responses.js +29 -7
- package/node_modules/@earendil-works/pi-ai/dist/api/openrouter-images.js +8 -3
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/load.js +5 -0
- package/node_modules/@earendil-works/pi-ai/dist/auth/oauth/openrouter.js +222 -0
- package/node_modules/@earendil-works/pi-ai/dist/bun-oauth.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/env-api-keys.js +9 -3
- package/node_modules/@earendil-works/pi-ai/dist/image-models.generated.js +15 -0
- package/node_modules/@earendil-works/pi-ai/dist/model-catalog.js +4 -0
- package/node_modules/@earendil-works/pi-ai/dist/providers/all.js +5 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/amazon-bedrock.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/ant-ling.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.js +30 -3
- package/node_modules/@earendil-works/pi-ai/dist/providers/anthropic.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/azure-openai-responses.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cerebras.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-ai-gateway.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/cloudflare-workers-ai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/ant-ling.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/anthropic.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/azure-openai-responses.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cerebras.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/cloudflare-workers-ai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/deepseek.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/fireworks.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/github-copilot.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google-vertex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/google.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/groq.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/kimi-coding.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/minimax.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/mistral.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/moonshotai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/nvidia.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai-codex.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/qwen-token-plan.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/together.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-ams.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi-token-plan-sgp.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/xiaomi.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai-coding-cn.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/zai.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/deepseek.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/fireworks.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/github-copilot.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google-vertex.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/google.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/groq.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/huggingface.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/kimi-coding.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/minimax.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/mistral.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/moonshotai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/nvidia.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai-codex.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode-go.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/opencode.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter-images.js +10 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.js +10 -2
- package/node_modules/@earendil-works/pi-ai/dist/providers/openrouter.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/qwen-token-plan.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/together.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/vercel-ai-gateway.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-ams.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi-token-plan-sgp.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/xiaomi.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai-coding-cn.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/zai.models.js +2 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/provider-retry.js +94 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/retry.js +3 -0
- package/node_modules/@earendil-works/pi-ai/package.json +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/args.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/config-selector.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/cli/startup-ui.js +1 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/agent-session.js +7 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/compaction/compaction.js +11 -3
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/extensions/runner.js +4 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-config.js +6 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-registry.js +2 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-resolver.js +7 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/model-runtime.js +3 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/remote-catalog-provider.js +5 -10
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/system-prompt.js +4 -4
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/bash.js +34 -5
- package/node_modules/@earendil-works/pi-coding-agent/dist/core/tools/tool-definition-wrapper.js +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/dist/extensions/llama/provider.js +1 -2
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/components/extension-editor.js +16 -46
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/external-editor.js +37 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/interactive/interactive-mode.js +29 -47
- package/node_modules/@earendil-works/pi-coding-agent/dist/modes/rpc/rpc-mode.js +1 -0
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/clipboard.js +19 -8
- package/node_modules/@earendil-works/pi-coding-agent/dist/utils/version-check.js +3 -1
- package/node_modules/@earendil-works/pi-coding-agent/npm-shrinkwrap.json +16 -15
- package/node_modules/@earendil-works/pi-coding-agent/package.json +6 -6
- package/node_modules/@earendil-works/pi-server/package.json +2 -2
- package/node_modules/@earendil-works/pi-tui/dist/components/editor.js +15 -12
- package/node_modules/@earendil-works/pi-tui/dist/tui.js +6 -3
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +1 -0
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +2 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +2 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/value/NumericValue.js +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/retry/service-error-classification/constants.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/service-error-classification/constants.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +1 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/gaxios/build/cjs/tsconfig.cjs.tsbuildinfo +1 -1
- package/node_modules/gaxios/build/esm/tsconfig.tsbuildinfo +1 -1
- package/node_modules/gaxios/package.json +1 -1
- package/node_modules/google-auth-library/build/src/auth/googleauth.js +24 -19
- package/node_modules/google-auth-library/package.json +1 -1
- package/node_modules/undici/lib/cache/memory-cache-store.js +54 -9
- package/node_modules/undici/lib/cache/sqlite-cache-store.js +7 -1
- package/node_modules/undici/lib/core/request.js +12 -1
- package/node_modules/undici/lib/dispatcher/client-h1.js +11 -2
- package/node_modules/undici/lib/handler/cache-handler.js +246 -64
- package/node_modules/undici/lib/handler/cache-revalidation-handler.js +3 -3
- package/node_modules/undici/lib/handler/retry-handler.js +24 -0
- package/node_modules/undici/lib/interceptor/cache.js +159 -52
- package/node_modules/undici/lib/util/cache.js +324 -62
- package/node_modules/undici/lib/util/date.js +23 -6
- package/node_modules/undici/lib/web/cookies/util.js +79 -9
- package/node_modules/undici/package.json +1 -1
- package/package.json +7 -7
- package/sling-default-packages.json +2 -1
- package/slingshot/index.js +337 -339
|
@@ -3,11 +3,147 @@
|
|
|
3
3
|
const {
|
|
4
4
|
safeHTTPMethods,
|
|
5
5
|
pathHasQueryOrFragment,
|
|
6
|
-
hasSafeIterator
|
|
6
|
+
hasSafeIterator,
|
|
7
|
+
isValidHTTPToken
|
|
7
8
|
} = require('../core/util')
|
|
8
9
|
|
|
9
10
|
const { serializePathWithQuery } = require('../core/util')
|
|
10
11
|
|
|
12
|
+
const MAX_DELTA_SECONDS = 2147483647
|
|
13
|
+
const RESTRICTIVE_DIRECTIVE_NAMES = ['no-store', 'private', 'no-cache']
|
|
14
|
+
const kInvalidCacheControlDirectives = Symbol('invalid cache-control directives')
|
|
15
|
+
|
|
16
|
+
function trimOWS (value) {
|
|
17
|
+
return value.replace(/^[\t ]+|[\t ]+$/g, '')
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
function arrayIncludes (array, value) {
|
|
21
|
+
for (let i = 0; i < array.length; i++) {
|
|
22
|
+
if (array[i] === value) {
|
|
23
|
+
return true
|
|
24
|
+
}
|
|
25
|
+
}
|
|
26
|
+
|
|
27
|
+
return false
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
function trimOWSStart (value) {
|
|
31
|
+
return value.replace(/^[\t ]+/, '')
|
|
32
|
+
}
|
|
33
|
+
|
|
34
|
+
function trimOWSEnd (value) {
|
|
35
|
+
return value.replace(/[\t ]+$/, '')
|
|
36
|
+
}
|
|
37
|
+
|
|
38
|
+
function findUnescapedQuote (value, start) {
|
|
39
|
+
let escaped = false
|
|
40
|
+
for (let i = start; i < value.length; i++) {
|
|
41
|
+
if (escaped) {
|
|
42
|
+
escaped = false
|
|
43
|
+
} else if (value[i] === '\\') {
|
|
44
|
+
escaped = true
|
|
45
|
+
} else if (value[i] === '"') {
|
|
46
|
+
return i
|
|
47
|
+
}
|
|
48
|
+
}
|
|
49
|
+
|
|
50
|
+
return -1
|
|
51
|
+
}
|
|
52
|
+
|
|
53
|
+
function splitCacheControlHeaderValue (value) {
|
|
54
|
+
const directives = []
|
|
55
|
+
let start = 0
|
|
56
|
+
let quoteStart = -1
|
|
57
|
+
let inQuote = false
|
|
58
|
+
let escaped = false
|
|
59
|
+
|
|
60
|
+
for (let i = 0; i < value.length; i++) {
|
|
61
|
+
if (inQuote) {
|
|
62
|
+
if (escaped) {
|
|
63
|
+
escaped = false
|
|
64
|
+
} else if (value[i] === '\\') {
|
|
65
|
+
escaped = true
|
|
66
|
+
} else if (value[i] === '"') {
|
|
67
|
+
inQuote = false
|
|
68
|
+
quoteStart = -1
|
|
69
|
+
}
|
|
70
|
+
} else if (value[i] === '"') {
|
|
71
|
+
inQuote = true
|
|
72
|
+
quoteStart = i
|
|
73
|
+
} else if (value[i] === ',') {
|
|
74
|
+
directives.push({ value: value.substring(start, i), fromMalformedQuote: false })
|
|
75
|
+
start = i + 1
|
|
76
|
+
}
|
|
77
|
+
}
|
|
78
|
+
|
|
79
|
+
if (!inQuote) {
|
|
80
|
+
directives.push({ value: value.substring(start), fromMalformedQuote: false })
|
|
81
|
+
return directives
|
|
82
|
+
}
|
|
83
|
+
|
|
84
|
+
const tail = value.substring(start)
|
|
85
|
+
const quoteOffset = quoteStart - start
|
|
86
|
+
let tailStart = 0
|
|
87
|
+
for (let i = 0; i < tail.length; i++) {
|
|
88
|
+
if (tail[i] === ',') {
|
|
89
|
+
directives.push({
|
|
90
|
+
value: tail.substring(tailStart, i),
|
|
91
|
+
fromMalformedQuote: tailStart > quoteOffset
|
|
92
|
+
})
|
|
93
|
+
tailStart = i + 1
|
|
94
|
+
}
|
|
95
|
+
}
|
|
96
|
+
|
|
97
|
+
directives.push({
|
|
98
|
+
value: tail.substring(tailStart),
|
|
99
|
+
fromMalformedQuote: tailStart > quoteOffset
|
|
100
|
+
})
|
|
101
|
+
return directives
|
|
102
|
+
}
|
|
103
|
+
|
|
104
|
+
function markInvalidCacheControlDirective (directives, key) {
|
|
105
|
+
let invalidDirectives = directives[kInvalidCacheControlDirectives]
|
|
106
|
+
|
|
107
|
+
if (invalidDirectives === undefined) {
|
|
108
|
+
invalidDirectives = new Set()
|
|
109
|
+
Object.defineProperty(directives, kInvalidCacheControlDirectives, {
|
|
110
|
+
value: invalidDirectives
|
|
111
|
+
})
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
invalidDirectives.add(key)
|
|
115
|
+
}
|
|
116
|
+
|
|
117
|
+
function hasInvalidCacheControlDirective (directives, key) {
|
|
118
|
+
return directives[kInvalidCacheControlDirectives]?.has(key) === true
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
function getMalformedRestrictiveDirectiveName (key) {
|
|
122
|
+
for (const directiveName of RESTRICTIVE_DIRECTIVE_NAMES) {
|
|
123
|
+
if (
|
|
124
|
+
key.startsWith(directiveName) &&
|
|
125
|
+
key.length > directiveName.length &&
|
|
126
|
+
!isValidHTTPToken(key[directiveName.length])
|
|
127
|
+
) {
|
|
128
|
+
return directiveName
|
|
129
|
+
}
|
|
130
|
+
}
|
|
131
|
+
|
|
132
|
+
let tokenOnlyKey = ''
|
|
133
|
+
let hasInvalidTokenChar = false
|
|
134
|
+
for (let i = 0; i < key.length; i++) {
|
|
135
|
+
if (isValidHTTPToken(key[i])) {
|
|
136
|
+
tokenOnlyKey += key[i]
|
|
137
|
+
} else {
|
|
138
|
+
hasInvalidTokenChar = true
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
|
|
142
|
+
if (hasInvalidTokenChar && arrayIncludes(RESTRICTIVE_DIRECTIVE_NAMES, tokenOnlyKey)) {
|
|
143
|
+
return tokenOnlyKey
|
|
144
|
+
}
|
|
145
|
+
}
|
|
146
|
+
|
|
11
147
|
/**
|
|
12
148
|
* @param {import('../../types/dispatcher.d.ts').default.DispatchOptions} opts
|
|
13
149
|
*/
|
|
@@ -30,6 +166,20 @@ function makeCacheKey (opts) {
|
|
|
30
166
|
}
|
|
31
167
|
}
|
|
32
168
|
|
|
169
|
+
function appendHeader (headers, key, val) {
|
|
170
|
+
const headerName = key.toLowerCase()
|
|
171
|
+
const current = headers[headerName]
|
|
172
|
+
const values = Array.isArray(val) ? val : [val]
|
|
173
|
+
|
|
174
|
+
if (current === undefined) {
|
|
175
|
+
headers[headerName] = Array.isArray(val) ? val.slice() : val
|
|
176
|
+
} else if (Array.isArray(current)) {
|
|
177
|
+
current.push(...values)
|
|
178
|
+
} else {
|
|
179
|
+
headers[headerName] = [current, ...values]
|
|
180
|
+
}
|
|
181
|
+
}
|
|
182
|
+
|
|
33
183
|
/**
|
|
34
184
|
* @param {Record<string, string[] | string>}
|
|
35
185
|
* @returns {Record<string, string[] | string>}
|
|
@@ -50,11 +200,11 @@ function normalizeHeaders (opts) {
|
|
|
50
200
|
if (typeof key !== 'string' || typeof val !== 'string') {
|
|
51
201
|
throw new Error('opts.headers is not a valid header map')
|
|
52
202
|
}
|
|
53
|
-
headers
|
|
203
|
+
appendHeader(headers, key, val)
|
|
54
204
|
}
|
|
55
205
|
} else {
|
|
56
206
|
for (const key of Object.keys(opts.headers)) {
|
|
57
|
-
headers
|
|
207
|
+
appendHeader(headers, key, opts.headers[key])
|
|
58
208
|
}
|
|
59
209
|
}
|
|
60
210
|
} else {
|
|
@@ -126,29 +276,37 @@ function parseCacheControlHeader (header) {
|
|
|
126
276
|
* @type {import('../../types/cache-interceptor.d.ts').default.CacheControlDirectives}
|
|
127
277
|
*/
|
|
128
278
|
const output = {}
|
|
279
|
+
const invalidNumericDirectives = new Set()
|
|
280
|
+
const invalidNoArgumentDirectives = new Set()
|
|
129
281
|
|
|
130
|
-
|
|
131
|
-
if (Array.isArray(header)) {
|
|
132
|
-
directives = []
|
|
133
|
-
|
|
134
|
-
for (const directive of header) {
|
|
135
|
-
directives.push(...directive.split(','))
|
|
136
|
-
}
|
|
137
|
-
} else {
|
|
138
|
-
directives = header.split(',')
|
|
139
|
-
}
|
|
282
|
+
const directives = splitCacheControlHeaderValue(Array.isArray(header) ? header.join(',') : header)
|
|
140
283
|
|
|
141
284
|
for (let i = 0; i < directives.length; i++) {
|
|
142
|
-
const
|
|
285
|
+
const directiveRecord = directives[i]
|
|
286
|
+
const directive = directiveRecord.value.toLowerCase()
|
|
287
|
+
const fromMalformedQuote = directiveRecord.fromMalformedQuote
|
|
143
288
|
const keyValueDelimiter = directive.indexOf('=')
|
|
144
289
|
|
|
145
290
|
let key
|
|
146
291
|
let value
|
|
292
|
+
let keyHasTrailingWhitespace = false
|
|
293
|
+
let valueHasLeadingWhitespace = false
|
|
147
294
|
if (keyValueDelimiter !== -1) {
|
|
148
|
-
|
|
149
|
-
|
|
295
|
+
const rawKey = directive.substring(0, keyValueDelimiter)
|
|
296
|
+
const rawValue = directive.substring(keyValueDelimiter + 1)
|
|
297
|
+
|
|
298
|
+
keyHasTrailingWhitespace = trimOWSEnd(rawKey) !== rawKey
|
|
299
|
+
valueHasLeadingWhitespace = trimOWSStart(rawValue) !== rawValue
|
|
300
|
+
key = trimOWS(rawKey)
|
|
301
|
+
value = trimOWSStart(rawValue)
|
|
150
302
|
} else {
|
|
151
|
-
key = directive
|
|
303
|
+
key = trimOWS(directive)
|
|
304
|
+
}
|
|
305
|
+
|
|
306
|
+
const malformedRestrictiveDirectiveName = getMalformedRestrictiveDirectiveName(key)
|
|
307
|
+
if (malformedRestrictiveDirectiveName !== undefined) {
|
|
308
|
+
output[malformedRestrictiveDirectiveName] = true
|
|
309
|
+
continue
|
|
152
310
|
}
|
|
153
311
|
|
|
154
312
|
switch (key) {
|
|
@@ -158,7 +316,14 @@ function parseCacheControlHeader (header) {
|
|
|
158
316
|
case 's-maxage':
|
|
159
317
|
case 'stale-while-revalidate':
|
|
160
318
|
case 'stale-if-error': {
|
|
161
|
-
if (
|
|
319
|
+
if (fromMalformedQuote || invalidNumericDirectives.has(key)) {
|
|
320
|
+
continue
|
|
321
|
+
}
|
|
322
|
+
|
|
323
|
+
if (value === undefined || keyHasTrailingWhitespace || valueHasLeadingWhitespace) {
|
|
324
|
+
delete output[key]
|
|
325
|
+
invalidNumericDirectives.add(key)
|
|
326
|
+
markInvalidCacheControlDirective(output, key)
|
|
162
327
|
continue
|
|
163
328
|
}
|
|
164
329
|
|
|
@@ -170,22 +335,37 @@ function parseCacheControlHeader (header) {
|
|
|
170
335
|
value = value.substring(1, value.length - 1)
|
|
171
336
|
}
|
|
172
337
|
|
|
173
|
-
|
|
174
|
-
|
|
175
|
-
|
|
338
|
+
if (!/^[0-9]+$/.test(value)) {
|
|
339
|
+
delete output[key]
|
|
340
|
+
invalidNumericDirectives.add(key)
|
|
341
|
+
markInvalidCacheControlDirective(output, key)
|
|
176
342
|
continue
|
|
177
343
|
}
|
|
178
344
|
|
|
179
|
-
|
|
180
|
-
continue
|
|
181
|
-
}
|
|
345
|
+
const parsedValue = Math.min(parseInt(value, 10), MAX_DELTA_SECONDS)
|
|
182
346
|
|
|
183
|
-
|
|
347
|
+
if (key === 'min-fresh') {
|
|
348
|
+
if (!(key in output) || output[key] < parsedValue) {
|
|
349
|
+
output[key] = parsedValue
|
|
350
|
+
}
|
|
351
|
+
} else if (!(key in output) || output[key] > parsedValue) {
|
|
352
|
+
output[key] = parsedValue
|
|
353
|
+
}
|
|
184
354
|
|
|
185
355
|
break
|
|
186
356
|
}
|
|
187
357
|
case 'private':
|
|
188
358
|
case 'no-cache': {
|
|
359
|
+
if (fromMalformedQuote) {
|
|
360
|
+
output[key] = true
|
|
361
|
+
break
|
|
362
|
+
}
|
|
363
|
+
|
|
364
|
+
if (value !== undefined && value.length === 0) {
|
|
365
|
+
output[key] = true
|
|
366
|
+
break
|
|
367
|
+
}
|
|
368
|
+
|
|
189
369
|
if (value) {
|
|
190
370
|
// The private and no-cache directives can be unqualified (aka just
|
|
191
371
|
// `private` or `no-cache`) or qualified (w/ a value). When they're
|
|
@@ -193,45 +373,64 @@ function parseCacheControlHeader (header) {
|
|
|
193
373
|
// `no-cache="header1"`, or `no-cache="header1, header2"`
|
|
194
374
|
// If we're given multiple headers, the comma messes us up since
|
|
195
375
|
// we split the full header by commas. So, let's loop through the
|
|
196
|
-
// remaining parts in front of us until we find one that
|
|
197
|
-
// quote. We can then
|
|
198
|
-
//
|
|
199
|
-
// and continue parsing like normal.
|
|
376
|
+
// remaining parts in front of us until we find one that contains a
|
|
377
|
+
// closing quote. We can then skip the consumed quoted-list fragments and
|
|
378
|
+
// continue parsing like normal.
|
|
200
379
|
// https://www.rfc-editor.org/rfc/rfc9111.html#name-no-cache-2
|
|
201
380
|
if (value[0] === '"') {
|
|
202
381
|
// Something like `no-cache="some-header"` OR `no-cache="some-header, another-header"`.
|
|
382
|
+
value = trimOWSEnd(value)
|
|
203
383
|
|
|
204
|
-
|
|
205
|
-
|
|
384
|
+
let fieldList = ''
|
|
385
|
+
let lastQuotedPart = i
|
|
386
|
+
let foundEndingQuote = false
|
|
387
|
+
const closingQuote = findUnescapedQuote(value, 1)
|
|
206
388
|
|
|
207
|
-
|
|
208
|
-
|
|
389
|
+
if (closingQuote !== -1) {
|
|
390
|
+
fieldList = value.substring(1, closingQuote)
|
|
391
|
+
foundEndingQuote = true
|
|
392
|
+
} else {
|
|
209
393
|
// Something like `no-cache="some-header, another-header"`
|
|
210
394
|
// This can still be something invalid, e.g. `no-cache="some-header, ...`
|
|
395
|
+
const fieldListParts = [value.substring(1)]
|
|
396
|
+
|
|
211
397
|
for (let j = i + 1; j < directives.length; j++) {
|
|
212
|
-
const nextPart = directives[j]
|
|
213
|
-
const
|
|
398
|
+
const nextPart = trimOWS(directives[j].value)
|
|
399
|
+
const closingQuote = findUnescapedQuote(nextPart, 0)
|
|
214
400
|
|
|
215
|
-
|
|
401
|
+
lastQuotedPart = j
|
|
216
402
|
|
|
217
|
-
if (
|
|
403
|
+
if (closingQuote !== -1) {
|
|
404
|
+
fieldListParts.push(nextPart.substring(0, closingQuote))
|
|
218
405
|
foundEndingQuote = true
|
|
219
406
|
break
|
|
220
407
|
}
|
|
408
|
+
|
|
409
|
+
fieldListParts.push(nextPart)
|
|
221
410
|
}
|
|
411
|
+
|
|
412
|
+
fieldList = fieldListParts.join(',')
|
|
222
413
|
}
|
|
223
414
|
|
|
224
|
-
if (foundEndingQuote) {
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
|
|
228
|
-
headers[headers.length - 1] = lastHeader
|
|
229
|
-
}
|
|
415
|
+
if (!foundEndingQuote) {
|
|
416
|
+
output[key] = true
|
|
417
|
+
break
|
|
418
|
+
}
|
|
230
419
|
|
|
231
|
-
|
|
232
|
-
|
|
420
|
+
i = lastQuotedPart
|
|
421
|
+
|
|
422
|
+
const headers = fieldList.split(',')
|
|
423
|
+
let validFieldNames = true
|
|
424
|
+
for (let j = 0; j < headers.length; j++) {
|
|
425
|
+
headers[j] = trimOWS(headers[j])
|
|
426
|
+
if (!isValidHTTPToken(headers[j])) {
|
|
427
|
+
validFieldNames = false
|
|
233
428
|
}
|
|
429
|
+
}
|
|
234
430
|
|
|
431
|
+
if (!validFieldNames) {
|
|
432
|
+
output[key] = true
|
|
433
|
+
} else if (output[key] !== true) {
|
|
235
434
|
if (key in output) {
|
|
236
435
|
output[key] = output[key].concat(headers)
|
|
237
436
|
} else {
|
|
@@ -239,13 +438,17 @@ function parseCacheControlHeader (header) {
|
|
|
239
438
|
}
|
|
240
439
|
}
|
|
241
440
|
} else {
|
|
242
|
-
// Something like `no-cache=
|
|
243
|
-
const fieldName = value
|
|
441
|
+
// Something like `no-cache=some-header`
|
|
442
|
+
const fieldName = trimOWS(value)
|
|
244
443
|
|
|
245
|
-
if (
|
|
246
|
-
output[key] =
|
|
247
|
-
} else {
|
|
248
|
-
|
|
444
|
+
if (!isValidHTTPToken(fieldName)) {
|
|
445
|
+
output[key] = true
|
|
446
|
+
} else if (output[key] !== true) {
|
|
447
|
+
if (key in output) {
|
|
448
|
+
output[key] = output[key].concat(fieldName)
|
|
449
|
+
} else {
|
|
450
|
+
output[key] = [fieldName]
|
|
451
|
+
}
|
|
249
452
|
}
|
|
250
453
|
}
|
|
251
454
|
|
|
@@ -254,19 +457,27 @@ function parseCacheControlHeader (header) {
|
|
|
254
457
|
}
|
|
255
458
|
// eslint-disable-next-line no-fallthrough
|
|
256
459
|
case 'public':
|
|
257
|
-
case 'no-store':
|
|
258
460
|
case 'must-revalidate':
|
|
259
461
|
case 'proxy-revalidate':
|
|
260
462
|
case 'immutable':
|
|
261
463
|
case 'no-transform':
|
|
262
464
|
case 'must-understand':
|
|
263
465
|
case 'only-if-cached':
|
|
264
|
-
if (
|
|
466
|
+
if (fromMalformedQuote || invalidNoArgumentDirectives.has(key)) {
|
|
467
|
+
continue
|
|
468
|
+
}
|
|
469
|
+
|
|
470
|
+
if (value !== undefined) {
|
|
265
471
|
// These are qualified (something like `public=...`) when they aren't
|
|
266
|
-
// allowed to be, skip
|
|
472
|
+
// allowed to be, skip all instances of the malformed directive.
|
|
473
|
+
delete output[key]
|
|
474
|
+
invalidNoArgumentDirectives.add(key)
|
|
267
475
|
continue
|
|
268
476
|
}
|
|
269
477
|
|
|
478
|
+
output[key] = true
|
|
479
|
+
break
|
|
480
|
+
case 'no-store':
|
|
270
481
|
output[key] = true
|
|
271
482
|
break
|
|
272
483
|
default:
|
|
@@ -278,31 +489,79 @@ function parseCacheControlHeader (header) {
|
|
|
278
489
|
return output
|
|
279
490
|
}
|
|
280
491
|
|
|
492
|
+
/**
|
|
493
|
+
* @param {string | string[]} varyHeader Vary header from the server
|
|
494
|
+
* @returns {string[]}
|
|
495
|
+
*/
|
|
496
|
+
function splitVaryHeader (varyHeader) {
|
|
497
|
+
const values = Array.isArray(varyHeader) ? varyHeader : [varyHeader]
|
|
498
|
+
const output = []
|
|
499
|
+
|
|
500
|
+
for (let i = 0; i < values.length; i++) {
|
|
501
|
+
const parts = values[i].split(',')
|
|
502
|
+
for (let j = 0; j < parts.length; j++) {
|
|
503
|
+
output.push(parts[j])
|
|
504
|
+
}
|
|
505
|
+
}
|
|
506
|
+
|
|
507
|
+
return output
|
|
508
|
+
}
|
|
509
|
+
|
|
510
|
+
/**
|
|
511
|
+
* @param {string | string[]} varyHeader Vary header from the server
|
|
512
|
+
* @returns {boolean}
|
|
513
|
+
*/
|
|
514
|
+
function hasVaryStar (varyHeader) {
|
|
515
|
+
const values = splitVaryHeader(varyHeader)
|
|
516
|
+
for (let i = 0; i < values.length; i++) {
|
|
517
|
+
if (trimOWS(values[i]).indexOf('*') !== -1) {
|
|
518
|
+
return true
|
|
519
|
+
}
|
|
520
|
+
}
|
|
521
|
+
|
|
522
|
+
return false
|
|
523
|
+
}
|
|
524
|
+
|
|
281
525
|
/**
|
|
282
526
|
* @param {string | string[]} varyHeader Vary header from the server
|
|
283
527
|
* @param {Record<string, string | string[]>} headers Request headers
|
|
284
|
-
* @returns {Record<string, string | string[]>}
|
|
528
|
+
* @returns {Record<string, string | string[] | null> | undefined}
|
|
285
529
|
*/
|
|
286
530
|
function parseVaryHeader (varyHeader, headers) {
|
|
287
|
-
if (
|
|
531
|
+
if (hasVaryStar(varyHeader)) {
|
|
288
532
|
return headers
|
|
289
533
|
}
|
|
290
534
|
|
|
291
535
|
const output = /** @type {Record<string, string | string[] | null>} */ ({})
|
|
292
536
|
|
|
293
|
-
const varyingHeaders =
|
|
294
|
-
? varyHeader.split(',')
|
|
295
|
-
: varyHeader
|
|
537
|
+
const varyingHeaders = splitVaryHeader(varyHeader)
|
|
296
538
|
|
|
297
539
|
for (const header of varyingHeaders) {
|
|
298
|
-
const trimmedHeader = header
|
|
540
|
+
const trimmedHeader = trimOWS(header).toLowerCase()
|
|
541
|
+
|
|
542
|
+
if (trimmedHeader.length === 0) {
|
|
543
|
+
continue
|
|
544
|
+
}
|
|
299
545
|
|
|
300
|
-
|
|
546
|
+
if (!isValidHTTPToken(trimmedHeader)) {
|
|
547
|
+
return undefined
|
|
548
|
+
}
|
|
549
|
+
|
|
550
|
+
const headerValue = headers[trimmedHeader]
|
|
551
|
+
output[trimmedHeader] = Array.isArray(headerValue) ? headerValue.slice() : headerValue ?? null
|
|
301
552
|
}
|
|
302
553
|
|
|
303
554
|
return output
|
|
304
555
|
}
|
|
305
556
|
|
|
557
|
+
/**
|
|
558
|
+
* @param {string | string[]} varyHeader Vary header from the server
|
|
559
|
+
* @returns {boolean}
|
|
560
|
+
*/
|
|
561
|
+
function isInvalidOrWildcardVaryHeader (varyHeader) {
|
|
562
|
+
return hasVaryStar(varyHeader) || parseVaryHeader(varyHeader, {}) === undefined
|
|
563
|
+
}
|
|
564
|
+
|
|
306
565
|
/**
|
|
307
566
|
* Note: this deviates from the spec a little. Empty etags ("", W/"") are valid,
|
|
308
567
|
* however, including them in cached resposnes serves little to no purpose.
|
|
@@ -366,7 +625,7 @@ function assertCacheMethods (methods, name = 'CacheMethods') {
|
|
|
366
625
|
}
|
|
367
626
|
|
|
368
627
|
for (const method of methods) {
|
|
369
|
-
if (!safeHTTPMethods
|
|
628
|
+
if (!arrayIncludes(safeHTTPMethods, method)) {
|
|
370
629
|
throw new TypeError(`element of ${name}-array needs to be one of following values: ${safeHTTPMethods.join(', ')}, got ${method}`)
|
|
371
630
|
}
|
|
372
631
|
}
|
|
@@ -406,7 +665,10 @@ module.exports = {
|
|
|
406
665
|
assertCacheKey,
|
|
407
666
|
assertCacheValue,
|
|
408
667
|
parseCacheControlHeader,
|
|
668
|
+
hasInvalidCacheControlDirective,
|
|
409
669
|
parseVaryHeader,
|
|
670
|
+
hasVaryStar,
|
|
671
|
+
isInvalidOrWildcardVaryHeader,
|
|
410
672
|
isEtagUsable,
|
|
411
673
|
assertCacheMethods,
|
|
412
674
|
assertCacheStore,
|
|
@@ -18,6 +18,26 @@ function parseHttpDate (date) {
|
|
|
18
18
|
}
|
|
19
19
|
}
|
|
20
20
|
|
|
21
|
+
function makeDate (year, monthIdx, day, hour, minute, second, weekday) {
|
|
22
|
+
const result = new Date(Date.UTC(year, monthIdx, day, hour, minute, second))
|
|
23
|
+
|
|
24
|
+
// Date.UTC treats years 0-99 as 1900-1999. Reset the full year so component
|
|
25
|
+
// checks below validate the HTTP date as written.
|
|
26
|
+
if (year >= 0 && year <= 99) {
|
|
27
|
+
result.setUTCFullYear(year)
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
return result.getUTCFullYear() === year &&
|
|
31
|
+
result.getUTCMonth() === monthIdx &&
|
|
32
|
+
result.getUTCDate() === day &&
|
|
33
|
+
result.getUTCHours() === hour &&
|
|
34
|
+
result.getUTCMinutes() === minute &&
|
|
35
|
+
result.getUTCSeconds() === second &&
|
|
36
|
+
result.getUTCDay() === weekday
|
|
37
|
+
? result
|
|
38
|
+
: undefined
|
|
39
|
+
}
|
|
40
|
+
|
|
21
41
|
/**
|
|
22
42
|
* @see https://httpwg.org/specs/rfc9110.html#preferred.date.format
|
|
23
43
|
*
|
|
@@ -224,8 +244,7 @@ function parseImfDate (date) {
|
|
|
224
244
|
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
225
245
|
}
|
|
226
246
|
|
|
227
|
-
|
|
228
|
-
return result.getUTCDay() === weekday ? result : undefined
|
|
247
|
+
return makeDate(year, monthIdx, day, hour, minute, second, weekday)
|
|
229
248
|
}
|
|
230
249
|
|
|
231
250
|
/**
|
|
@@ -429,8 +448,7 @@ function parseAscTimeDate (date) {
|
|
|
429
448
|
}
|
|
430
449
|
const year = (yearDigit1 - 48) * 1000 + (yearDigit2 - 48) * 100 + (yearDigit3 - 48) * 10 + (yearDigit4 - 48)
|
|
431
450
|
|
|
432
|
-
|
|
433
|
-
return result.getUTCDay() === weekday ? result : undefined
|
|
451
|
+
return makeDate(year, monthIdx, day, hour, minute, second, weekday)
|
|
434
452
|
}
|
|
435
453
|
|
|
436
454
|
/**
|
|
@@ -644,8 +662,7 @@ function parseRfc850Date (date) {
|
|
|
644
662
|
second = (code1 - 48) * 10 + (code2 - 48) // Convert ASCII codes to number
|
|
645
663
|
}
|
|
646
664
|
|
|
647
|
-
|
|
648
|
-
return result.getUTCDay() === weekday ? result : undefined
|
|
665
|
+
return makeDate(year, monthIdx, day, hour, minute, second, weekday)
|
|
649
666
|
}
|
|
650
667
|
|
|
651
668
|
module.exports = {
|