@code-yeongyu/senpi 2026.8.20-2 → 2026.8.20
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/CHANGELOG.md +0 -16
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +13 -38
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/index.js +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-es/schemas/schemas_0.js +12 -34
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ConverseCommand.d.ts +0 -29
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ConverseStreamCommand.d.ts +0 -15
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/CountTokensCommand.d.ts +0 -14
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/models/models_0.d.ts +1 -119
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/runtimeConfig.browser.d.ts +46 -46
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/runtimeConfig.d.ts +36 -36
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/runtimeConfig.native.d.ts +48 -48
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/schemas/schemas_0.d.ts +0 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/models/models_0.d.ts +0 -76
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/runtimeConfig.browser.d.ts +72 -70
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/runtimeConfig.d.ts +68 -68
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/runtimeConfig.native.d.ts +88 -86
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/schemas/schemas_0.d.ts +0 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +14 -14
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +426 -1343
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +5 -8
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +2 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +3 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{codec-v1/JsonCodec.js → JsonCodec.js} +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{codec-v1/JsonShapeDeserializer.js → JsonShapeDeserializer.js} +6 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{codec-v1/JsonShapeSerializer.js → JsonShapeSerializer.js} +5 -8
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{codec-v2/JsonShapeDeserializer2.js → experimental/BufferJsonShapeDeserializer.js} +18 -38
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{codec-v2/JsonShapeSerializer2.js → experimental/ByteJsonShapeSerializer.js} +71 -107
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +9 -93
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-endpoints/lib/aws/partitions.d.ts +54 -54
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +6 -9
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +3 -4
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +3 -5
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{codec-v1/JsonCodec.d.ts → JsonCodec.d.ts} +8 -4
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{codec-v1/JsonShapeDeserializer.d.ts → JsonShapeDeserializer.d.ts} +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{codec-v1/JsonShapeSerializer.d.ts → JsonShapeSerializer.d.ts} +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{codec-v2/JsonShapeDeserializer2.d.ts → experimental/BufferJsonShapeDeserializer.d.ts} +3 -4
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{codec-v2/JsonShapeSerializer2.d.ts → experimental/ByteJsonShapeSerializer.d.ts} +16 -19
- 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 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +18 -10
- 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 -14
- 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 -39
- 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 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +7 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +13 -4
- 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 -57
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.browser.d.ts +11 -32
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +9 -32
- 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 -2
- 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 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/index.d.ts +4 -4
- 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 -30
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +22 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +22 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +29 -50
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +36 -52
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +19 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +28 -0
- 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 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +29 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +57 -0
- 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 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +22 -14
- 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 -1
- 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 +6 -6
- package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +840 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +50 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +241 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +136 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +173 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +64 -0
- package/node_modules/@aws-sdk/credential-provider-http/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
- package/node_modules/@aws-sdk/credential-provider-login/dist-cjs/index.js +28 -35
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js +28 -35
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/LoginCredentialsFetcher.d.ts +0 -1
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/LoginCredentialsFetcher.d.ts +0 -1
- package/node_modules/@aws-sdk/credential-provider-login/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-node/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-process/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-sso/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +7 -7
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +6 -6
- package/node_modules/@aws-sdk/eventstream-handler-node/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-eventstream/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-websocket/package.json +7 -7
- 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 +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.native.d.ts +41 -41
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.browser.d.ts +43 -43
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +43 -43
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.native.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.browser.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.native.d.ts +41 -41
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.browser.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +42 -42
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.native.d.ts +41 -41
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.browser.d.ts +44 -44
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +35 -35
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.native.d.ts +43 -43
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.shared.d.ts +2 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.browser.d.ts +66 -64
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +65 -65
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.native.d.ts +70 -68
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.browser.d.ts +69 -67
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +66 -66
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.native.d.ts +73 -71
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.browser.d.ts +66 -64
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +65 -65
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.native.d.ts +70 -68
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.browser.d.ts +66 -64
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +65 -65
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.native.d.ts +70 -68
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.browser.d.ts +70 -68
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +68 -68
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.native.d.ts +74 -72
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.shared.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +201 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +840 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +19 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +1 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +50 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +241 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +136 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +173 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +21 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +22 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +23 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +63 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +10 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +5 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +4 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +3 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +47 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +46 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +36 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +76 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +6 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +2 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +9 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +12 -0
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +64 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +8 -8
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +4 -4
- package/node_modules/@aws-sdk/token-providers/package.json +6 -6
- package/node_modules/@aws-sdk/types/package.json +2 -2
- package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
- package/node_modules/@bufbuild/protobuf/README.md +15 -12
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +162 -199
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +153 -321
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +303 -601
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +1 -27
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +56 -80
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +80 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +3 -12
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +0 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +127 -365
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +159 -393
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +1 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +8 -40
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +19 -37
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +85 -281
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +1 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +2 -19
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +13 -47
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +4 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +23 -35
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +12 -12
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +162 -199
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +153 -321
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +304 -602
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +1 -27
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +57 -79
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +78 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +3 -12
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +0 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +127 -365
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +159 -393
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +1 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +8 -40
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +19 -37
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +87 -283
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/index.js +1 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.d.ts +2 -19
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +13 -46
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +4 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +23 -35
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/wrappers.js +12 -12
- package/node_modules/@bufbuild/protobuf/package.json +2 -2
- package/node_modules/@code-yeongyu/senpi-codemode/CHANGELOG.md +0 -12
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@earendil-works/pi-agent-core/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/package.json +8 -8
- package/node_modules/@earendil-works/pi-pty/package.json +2 -2
- package/node_modules/@earendil-works/pi-telemetry/package.json +2 -2
- package/node_modules/@earendil-works/pi-tui/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +337 -1560
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +23 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +23 -23
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +13 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +10 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +205 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/index.js +1 -5
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +4 -4
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +19 -19
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +4 -3
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +4 -6
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +5 -8
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +2 -0
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +2 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +27 -5
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/cbor/index.d.ts +1 -5
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +1 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateCondition.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateConditions.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateExpression.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/evaluateRules.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/endpoints/util-endpoints/utils/getReferenceValue.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/event-streams/EventStreamSerde.d.ts +2 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +2 -7
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/retries-2026-config.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/submodules/serde/parse-utils.d.ts +5 -5
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/CborCodec.d.ts +27 -5
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/index.d.ts +1 -5
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +7 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +1 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateCondition.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateConditions.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateExpression.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/evaluateRules.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/getEndpointProperties.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/endpoints/util-endpoints/utils/getReferenceValue.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/event-streams/EventStreamSerde.d.ts +2 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +2 -7
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/retries-2026-config.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/schema/TypeRegistry.d.ts +1 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/parse-utils.d.ts +5 -5
- package/node_modules/@smithy/core/package.json +11 -4
- package/node_modules/@smithy/credential-provider-imds/package.json +12 -4
- package/node_modules/@smithy/fetch-http-handler/package.json +13 -5
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +2 -9
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +2 -9
- package/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +1 -1
- package/node_modules/@smithy/node-http-handler/package.json +13 -5
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +9 -9
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +9 -9
- package/node_modules/@smithy/signature-v4/package.json +12 -4
- package/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +14 -14
- package/node_modules/@smithy/types/package.json +39 -29
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/child_process.d.ts +1 -0
- package/node_modules/@types/node/crypto.d.ts +7 -7
- package/node_modules/@types/node/dns/promises.d.ts +5 -5
- package/node_modules/@types/node/dns.d.ts +5 -5
- package/node_modules/@types/node/fs.d.ts +0 -7
- package/node_modules/@types/node/http.d.ts +0 -30
- package/node_modules/@types/node/http2.d.ts +4 -4
- package/node_modules/@types/node/os.d.ts +30 -30
- package/node_modules/@types/node/package.json +2 -2
- package/node_modules/@types/node/perf_hooks.d.ts +1 -2
- package/node_modules/@types/node/process.d.ts +43 -42
- package/node_modules/@types/node/quic.d.ts +84 -1049
- package/node_modules/@types/node/sqlite.d.ts +1 -14
- package/node_modules/@types/node/stream/iter.d.ts +2 -3
- package/node_modules/@types/node/test.d.ts +0 -61
- package/node_modules/@types/node/v8.d.ts +23 -20
- package/package.json +36 -36
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +0 -7
- 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/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -51
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -11
- 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/JsonCodec2.d.ts +0 -9
- 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/@bufbuild/protobuf/dist/commonjs/reflect/message.d.ts +0 -49
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +0 -157
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.d.ts +0 -28
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +0 -44
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.d.ts +0 -49
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +0 -152
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.d.ts +0 -28
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +0 -41
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +0 -113
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +0 -103
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +0 -621
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +0 -602
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeDeserializer.d.ts +0 -13
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +0 -15
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/CborShapeDeserializer2.d.ts +0 -18
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/CborShapeSerializer2.d.ts +0 -35
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v1/CborShapeDeserializer.d.ts +0 -13
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +0 -15
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/CborShapeDeserializer2.d.ts +0 -18
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/CborShapeSerializer2.d.ts +0 -35
|
@@ -11,9 +11,9 @@
|
|
|
11
11
|
// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
|
12
12
|
// See the License for the specific language governing permissions and
|
|
13
13
|
// limitations under the License.
|
|
14
|
-
import { varint32read, varint64read } from "./varint.js";
|
|
14
|
+
import { varint32read, varint32write, varint64read, varint64write, } from "./varint.js";
|
|
15
15
|
import { protoInt64 } from "../proto-int64.js";
|
|
16
|
-
import {
|
|
16
|
+
import { getTextEncoding } from "./text-encoding.js";
|
|
17
17
|
/**
|
|
18
18
|
* Protobuf binary format wire types.
|
|
19
19
|
*
|
|
@@ -77,55 +77,34 @@ export const INT32_MAX = 0x7fffffff;
|
|
|
77
77
|
*/
|
|
78
78
|
export const INT32_MIN = -0x80000000;
|
|
79
79
|
export class BinaryWriter {
|
|
80
|
-
constructor(encodeUtf8) {
|
|
80
|
+
constructor(encodeUtf8 = getTextEncoding().encodeUtf8) {
|
|
81
|
+
this.encodeUtf8 = encodeUtf8;
|
|
81
82
|
/**
|
|
82
|
-
* Previous fork
|
|
83
|
-
* `fork()` was called).
|
|
83
|
+
* Previous fork states.
|
|
84
84
|
*/
|
|
85
|
-
this.
|
|
86
|
-
this.
|
|
87
|
-
|
|
88
|
-
: getTextEncoding().encodeUtf8Into;
|
|
89
|
-
this.buffer = EMPTY_BUFFER;
|
|
90
|
-
this.viewCache = EMPTY_VIEW;
|
|
91
|
-
this.pos = 0;
|
|
92
|
-
}
|
|
93
|
-
ensureCapacity(size) {
|
|
94
|
-
const required = this.pos + size;
|
|
95
|
-
if (required > this.buffer.length) {
|
|
96
|
-
let newLen = this.buffer.length || INITIAL_SIZE;
|
|
97
|
-
while (newLen < required)
|
|
98
|
-
newLen *= 2;
|
|
99
|
-
const newBuf = new Uint8Array(newLen);
|
|
100
|
-
if (this.pos > 0)
|
|
101
|
-
newBuf.set(this.buffer);
|
|
102
|
-
this.buffer = newBuf;
|
|
103
|
-
}
|
|
104
|
-
}
|
|
105
|
-
/**
|
|
106
|
-
* The DataView over `buffer`, rebuilt only if the buffer has grown since it
|
|
107
|
-
* was last used.
|
|
108
|
-
*/
|
|
109
|
-
view() {
|
|
110
|
-
const bytes = this.buffer;
|
|
111
|
-
const view = this.viewCache;
|
|
112
|
-
// Since ensureCapacity() only ever replaces the buffer with a strictly larger one,
|
|
113
|
-
// equal lengths mean the view is still current. This is faster than comparing
|
|
114
|
-
// buffers directly.
|
|
115
|
-
if (view.byteLength === bytes.byteLength)
|
|
116
|
-
return view;
|
|
117
|
-
const newView = new DataView(bytes.buffer);
|
|
118
|
-
this.viewCache = newView;
|
|
119
|
-
return newView;
|
|
85
|
+
this.stack = [];
|
|
86
|
+
this.chunks = [];
|
|
87
|
+
this.buf = [];
|
|
120
88
|
}
|
|
121
89
|
/**
|
|
122
90
|
* Return all bytes written and reset this writer.
|
|
123
91
|
*/
|
|
124
92
|
finish() {
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
93
|
+
if (this.buf.length) {
|
|
94
|
+
this.chunks.push(new Uint8Array(this.buf)); // flush the buffer
|
|
95
|
+
this.buf = [];
|
|
96
|
+
}
|
|
97
|
+
let len = 0;
|
|
98
|
+
for (let i = 0; i < this.chunks.length; i++)
|
|
99
|
+
len += this.chunks[i].length;
|
|
100
|
+
let bytes = new Uint8Array(len);
|
|
101
|
+
let offset = 0;
|
|
102
|
+
for (let i = 0; i < this.chunks.length; i++) {
|
|
103
|
+
bytes.set(this.chunks[i], offset);
|
|
104
|
+
offset += this.chunks[i].length;
|
|
105
|
+
}
|
|
106
|
+
this.chunks = [];
|
|
107
|
+
return bytes;
|
|
129
108
|
}
|
|
130
109
|
/**
|
|
131
110
|
* Start a new fork for length-delimited data like a message
|
|
@@ -134,11 +113,9 @@ export class BinaryWriter {
|
|
|
134
113
|
* Must be joined later with `join()`.
|
|
135
114
|
*/
|
|
136
115
|
fork() {
|
|
137
|
-
this.
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
this.ensureCapacity(DEFAULT_LEN_PREFIX_SIZE);
|
|
141
|
-
this.buffer[this.pos++] = 0;
|
|
116
|
+
this.stack.push({ chunks: this.chunks, buf: this.buf });
|
|
117
|
+
this.chunks = [];
|
|
118
|
+
this.buf = [];
|
|
142
119
|
return this;
|
|
143
120
|
}
|
|
144
121
|
/**
|
|
@@ -146,24 +123,17 @@ export class BinaryWriter {
|
|
|
146
123
|
* return to the previous state.
|
|
147
124
|
*/
|
|
148
125
|
join() {
|
|
149
|
-
|
|
150
|
-
|
|
126
|
+
// get chunk of fork
|
|
127
|
+
let chunk = this.finish();
|
|
128
|
+
// restore previous state
|
|
129
|
+
let prev = this.stack.pop();
|
|
130
|
+
if (!prev)
|
|
151
131
|
throw new Error("invalid state, fork stack empty");
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
// Widening pushes the payload past the end of the buffer, so grow first:
|
|
158
|
-
// copyWithin clamps to the buffer instead of throwing, so a short buffer
|
|
159
|
-
// would silently drop the tail of the payload.
|
|
160
|
-
this.ensureCapacity(lenPrefixSize - DEFAULT_LEN_PREFIX_SIZE);
|
|
161
|
-
this.buffer.copyWithin(forkPos + lenPrefixSize, forkPos + DEFAULT_LEN_PREFIX_SIZE, this.pos);
|
|
162
|
-
}
|
|
163
|
-
this.pos = forkPos;
|
|
164
|
-
this.uint32(len);
|
|
165
|
-
this.pos += len;
|
|
166
|
-
return this;
|
|
132
|
+
this.chunks = prev.chunks;
|
|
133
|
+
this.buf = prev.buf;
|
|
134
|
+
// write length of chunk as varint
|
|
135
|
+
this.uint32(chunk.byteLength);
|
|
136
|
+
return this.raw(chunk);
|
|
167
137
|
}
|
|
168
138
|
/**
|
|
169
139
|
* Writes a tag (field number and wire type).
|
|
@@ -179,9 +149,11 @@ export class BinaryWriter {
|
|
|
179
149
|
* Write a chunk of raw bytes.
|
|
180
150
|
*/
|
|
181
151
|
raw(chunk) {
|
|
182
|
-
this.
|
|
183
|
-
|
|
184
|
-
|
|
152
|
+
if (this.buf.length) {
|
|
153
|
+
this.chunks.push(new Uint8Array(this.buf));
|
|
154
|
+
this.buf = [];
|
|
155
|
+
}
|
|
156
|
+
this.chunks.push(chunk);
|
|
185
157
|
return this;
|
|
186
158
|
}
|
|
187
159
|
/**
|
|
@@ -189,18 +161,12 @@ export class BinaryWriter {
|
|
|
189
161
|
*/
|
|
190
162
|
uint32(value) {
|
|
191
163
|
assertUInt32(value);
|
|
192
|
-
//
|
|
193
|
-
// capacity checks.
|
|
194
|
-
this.ensureCapacity(5);
|
|
195
|
-
if (value < 0x80) {
|
|
196
|
-
this.buffer[this.pos++] = value;
|
|
197
|
-
return this;
|
|
198
|
-
}
|
|
164
|
+
// write value as varint 32, inlined for speed
|
|
199
165
|
while (value > 0x7f) {
|
|
200
|
-
this.
|
|
201
|
-
value
|
|
166
|
+
this.buf.push((value & 0x7f) | 0x80);
|
|
167
|
+
value = value >>> 7;
|
|
202
168
|
}
|
|
203
|
-
this.
|
|
169
|
+
this.buf.push(value);
|
|
204
170
|
return this;
|
|
205
171
|
}
|
|
206
172
|
/**
|
|
@@ -208,158 +174,101 @@ export class BinaryWriter {
|
|
|
208
174
|
*/
|
|
209
175
|
int32(value) {
|
|
210
176
|
assertInt32(value);
|
|
211
|
-
|
|
212
|
-
return this.uint32(value);
|
|
213
|
-
}
|
|
214
|
-
// Negative: sign-extend to 64 bits, encodes to 10 bytes.
|
|
215
|
-
this.ensureCapacity(10);
|
|
216
|
-
for (let i = 0; i < 9; i++) {
|
|
217
|
-
this.buffer[this.pos++] = (value & 0x7f) | 0x80;
|
|
218
|
-
value >>= 7;
|
|
219
|
-
}
|
|
220
|
-
this.buffer[this.pos++] = 1;
|
|
177
|
+
varint32write(value, this.buf);
|
|
221
178
|
return this;
|
|
222
179
|
}
|
|
223
180
|
/**
|
|
224
181
|
* Write a `bool` value, a varint.
|
|
225
182
|
*/
|
|
226
183
|
bool(value) {
|
|
227
|
-
this.
|
|
228
|
-
this.buffer[this.pos++] = value ? 1 : 0;
|
|
184
|
+
this.buf.push(value ? 1 : 0);
|
|
229
185
|
return this;
|
|
230
186
|
}
|
|
231
187
|
/**
|
|
232
188
|
* Write a `bytes` value, length-delimited arbitrary data.
|
|
233
189
|
*/
|
|
234
190
|
bytes(value) {
|
|
235
|
-
this.uint32(value.byteLength);
|
|
191
|
+
this.uint32(value.byteLength); // write length of chunk as varint
|
|
236
192
|
return this.raw(value);
|
|
237
193
|
}
|
|
238
194
|
/**
|
|
239
195
|
* Write a `string` value, length-delimited data converted to UTF-8 text.
|
|
240
196
|
*/
|
|
241
197
|
string(value) {
|
|
242
|
-
|
|
243
|
-
//
|
|
244
|
-
|
|
245
|
-
value = String(value);
|
|
246
|
-
}
|
|
247
|
-
const len = value.length;
|
|
248
|
-
// Fast path for ASCII.
|
|
249
|
-
if (len <= ASCII_MAX_LENGTH) {
|
|
250
|
-
this.ensureCapacity(len + 1);
|
|
251
|
-
const ascii = this.buffer;
|
|
252
|
-
let pos = this.pos;
|
|
253
|
-
ascii[pos++] = len;
|
|
254
|
-
let i = 0;
|
|
255
|
-
for (; i < len; i++) {
|
|
256
|
-
const code = value.charCodeAt(i);
|
|
257
|
-
if (code > 0x7f)
|
|
258
|
-
break;
|
|
259
|
-
ascii[pos++] = code;
|
|
260
|
-
}
|
|
261
|
-
if (i == len) {
|
|
262
|
-
this.pos = pos;
|
|
263
|
-
return this;
|
|
264
|
-
}
|
|
265
|
-
}
|
|
266
|
-
// encodeUtf8Into needs the full-length buffer upfront. The length prefix
|
|
267
|
-
// can be upto 5 bytes, and a UTF-16 code unit takes at most 3 UTF-8 bytes.
|
|
268
|
-
this.ensureCapacity(len * 3 + 5);
|
|
269
|
-
// The length prefix goes first, but the byte length is only known after
|
|
270
|
-
// encoding. We guess the final varint size here (assuming most text is
|
|
271
|
-
// ASCII) and then encode.
|
|
272
|
-
const lenPrefixSizeGuess = varint32Size(len);
|
|
273
|
-
const buf = this.buffer;
|
|
274
|
-
const start = this.pos;
|
|
275
|
-
const { written } = this.encodeUtf8Into(value, buf.subarray(start + lenPrefixSizeGuess));
|
|
276
|
-
// If our guess was incorrect, we need to shift the bytes we just wrote.
|
|
277
|
-
const lenPrefixSize = varint32Size(written);
|
|
278
|
-
if (lenPrefixSize != lenPrefixSizeGuess) {
|
|
279
|
-
buf.copyWithin(start + lenPrefixSize, start + lenPrefixSizeGuess, start + lenPrefixSizeGuess + written);
|
|
280
|
-
}
|
|
281
|
-
// Write the lenPrefix and advance the pos.
|
|
282
|
-
this.uint32(written);
|
|
283
|
-
this.pos += written;
|
|
284
|
-
return this;
|
|
198
|
+
let chunk = this.encodeUtf8(value);
|
|
199
|
+
this.uint32(chunk.byteLength); // write length of chunk as varint
|
|
200
|
+
return this.raw(chunk);
|
|
285
201
|
}
|
|
286
202
|
/**
|
|
287
203
|
* Write a `float` value, 32-bit floating point number.
|
|
288
204
|
*/
|
|
289
205
|
float(value) {
|
|
290
206
|
assertFloat32(value);
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
this.
|
|
294
|
-
return this;
|
|
207
|
+
let chunk = new Uint8Array(4);
|
|
208
|
+
new DataView(chunk.buffer).setFloat32(0, value, true);
|
|
209
|
+
return this.raw(chunk);
|
|
295
210
|
}
|
|
296
211
|
/**
|
|
297
212
|
* Write a `double` value, a 64-bit floating point number.
|
|
298
213
|
*/
|
|
299
214
|
double(value) {
|
|
300
|
-
|
|
301
|
-
|
|
302
|
-
this.
|
|
303
|
-
return this;
|
|
215
|
+
let chunk = new Uint8Array(8);
|
|
216
|
+
new DataView(chunk.buffer).setFloat64(0, value, true);
|
|
217
|
+
return this.raw(chunk);
|
|
304
218
|
}
|
|
305
219
|
/**
|
|
306
220
|
* Write a `fixed32` value, an unsigned, fixed-length 32-bit integer.
|
|
307
221
|
*/
|
|
308
222
|
fixed32(value) {
|
|
309
223
|
assertUInt32(value);
|
|
310
|
-
|
|
311
|
-
|
|
312
|
-
this.
|
|
313
|
-
return this;
|
|
224
|
+
let chunk = new Uint8Array(4);
|
|
225
|
+
new DataView(chunk.buffer).setUint32(0, value, true);
|
|
226
|
+
return this.raw(chunk);
|
|
314
227
|
}
|
|
315
228
|
/**
|
|
316
229
|
* Write a `sfixed32` value, a signed, fixed-length 32-bit integer.
|
|
317
230
|
*/
|
|
318
231
|
sfixed32(value) {
|
|
319
232
|
assertInt32(value);
|
|
320
|
-
|
|
321
|
-
|
|
322
|
-
this.
|
|
323
|
-
return this;
|
|
233
|
+
let chunk = new Uint8Array(4);
|
|
234
|
+
new DataView(chunk.buffer).setInt32(0, value, true);
|
|
235
|
+
return this.raw(chunk);
|
|
324
236
|
}
|
|
325
237
|
/**
|
|
326
238
|
* Write a `sint32` value, a signed, zigzag-encoded 32-bit varint.
|
|
327
239
|
*/
|
|
328
240
|
sint32(value) {
|
|
329
241
|
assertInt32(value);
|
|
330
|
-
// zigzag encode
|
|
331
|
-
|
|
242
|
+
// zigzag encode
|
|
243
|
+
value = ((value << 1) ^ (value >> 31)) >>> 0;
|
|
244
|
+
varint32write(value, this.buf);
|
|
245
|
+
return this;
|
|
332
246
|
}
|
|
333
247
|
/**
|
|
334
248
|
* Write a `sfixed64` value, a signed, fixed-length 64-bit integer.
|
|
335
249
|
*/
|
|
336
250
|
sfixed64(value) {
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
view.setInt32(this.pos + 4, tc.hi, true);
|
|
342
|
-
this.pos += 8;
|
|
343
|
-
return this;
|
|
251
|
+
let chunk = new Uint8Array(8), view = new DataView(chunk.buffer), tc = protoInt64.enc(value);
|
|
252
|
+
view.setInt32(0, tc.lo, true);
|
|
253
|
+
view.setInt32(4, tc.hi, true);
|
|
254
|
+
return this.raw(chunk);
|
|
344
255
|
}
|
|
345
256
|
/**
|
|
346
257
|
* Write a `fixed64` value, an unsigned, fixed-length 64 bit integer.
|
|
347
258
|
*/
|
|
348
259
|
fixed64(value) {
|
|
349
|
-
|
|
350
|
-
|
|
351
|
-
|
|
352
|
-
|
|
353
|
-
view.setInt32(this.pos + 4, tc.hi, true);
|
|
354
|
-
this.pos += 8;
|
|
355
|
-
return this;
|
|
260
|
+
let chunk = new Uint8Array(8), view = new DataView(chunk.buffer), tc = protoInt64.uEnc(value);
|
|
261
|
+
view.setInt32(0, tc.lo, true);
|
|
262
|
+
view.setInt32(4, tc.hi, true);
|
|
263
|
+
return this.raw(chunk);
|
|
356
264
|
}
|
|
357
265
|
/**
|
|
358
266
|
* Write a `int64` value, a signed 64-bit varint.
|
|
359
267
|
*/
|
|
360
268
|
int64(value) {
|
|
361
|
-
|
|
362
|
-
|
|
269
|
+
let tc = protoInt64.enc(value);
|
|
270
|
+
varint64write(tc.lo, tc.hi, this.buf);
|
|
271
|
+
return this;
|
|
363
272
|
}
|
|
364
273
|
/**
|
|
365
274
|
* Write a `sint64` value, a signed, zig-zag-encoded 64-bit varint.
|
|
@@ -368,102 +277,21 @@ export class BinaryWriter {
|
|
|
368
277
|
const tc = protoInt64.enc(value),
|
|
369
278
|
// zigzag encode
|
|
370
279
|
sign = tc.hi >> 31, lo = (tc.lo << 1) ^ sign, hi = ((tc.hi << 1) | (tc.lo >>> 31)) ^ sign;
|
|
371
|
-
|
|
280
|
+
varint64write(lo, hi, this.buf);
|
|
281
|
+
return this;
|
|
372
282
|
}
|
|
373
283
|
/**
|
|
374
284
|
* Write a `uint64` value, an unsigned 64-bit varint.
|
|
375
285
|
*/
|
|
376
286
|
uint64(value) {
|
|
377
287
|
const tc = protoInt64.uEnc(value);
|
|
378
|
-
|
|
379
|
-
}
|
|
380
|
-
/**
|
|
381
|
-
* Write a 64-bit varint directly into the buffer. Accepts the value as
|
|
382
|
-
* split low/high 32-bit words.
|
|
383
|
-
*
|
|
384
|
-
* Ported from varint64write() to avoid the intermediate number[] buffer.
|
|
385
|
-
* See https://github.com/protocolbuffers/protobuf/blob/8a71927d74a4ce34efe2d8769fda198f52d20d12/js/experimental/runtime/kernel/writer.js#L344
|
|
386
|
-
*/
|
|
387
|
-
writeVarint64(lo, hi) {
|
|
388
|
-
// Worst case: 10 bytes.
|
|
389
|
-
this.ensureCapacity(10);
|
|
390
|
-
const buf = this.buffer;
|
|
391
|
-
let pos = this.pos;
|
|
392
|
-
for (let i = 0; i < 28; i = i + 7) {
|
|
393
|
-
const shift = lo >>> i;
|
|
394
|
-
const hasNext = !(shift >>> 7 == 0 && hi == 0);
|
|
395
|
-
buf[pos++] = (hasNext ? shift | 0x80 : shift) & 0xff;
|
|
396
|
-
if (!hasNext) {
|
|
397
|
-
this.pos = pos;
|
|
398
|
-
return this;
|
|
399
|
-
}
|
|
400
|
-
}
|
|
401
|
-
const splitBits = ((lo >>> 28) & 0x0f) | ((hi & 0x07) << 4);
|
|
402
|
-
const hasMoreBits = !(hi >> 3 == 0);
|
|
403
|
-
buf[pos++] = (hasMoreBits ? splitBits | 0x80 : splitBits) & 0xff;
|
|
404
|
-
if (!hasMoreBits) {
|
|
405
|
-
this.pos = pos;
|
|
406
|
-
return this;
|
|
407
|
-
}
|
|
408
|
-
for (let i = 3; i < 31; i = i + 7) {
|
|
409
|
-
const shift = hi >>> i;
|
|
410
|
-
const hasNext = !(shift >>> 7 == 0);
|
|
411
|
-
buf[pos++] = (hasNext ? shift | 0x80 : shift) & 0xff;
|
|
412
|
-
if (!hasNext) {
|
|
413
|
-
this.pos = pos;
|
|
414
|
-
return this;
|
|
415
|
-
}
|
|
416
|
-
}
|
|
417
|
-
buf[pos++] = (hi >>> 31) & 0x01;
|
|
418
|
-
this.pos = pos;
|
|
288
|
+
varint64write(tc.lo, tc.hi, this.buf);
|
|
419
289
|
return this;
|
|
420
290
|
}
|
|
421
291
|
}
|
|
422
|
-
/**
|
|
423
|
-
* Capacity of the buffer allocated by the first write..
|
|
424
|
-
*/
|
|
425
|
-
const INITIAL_SIZE = 128;
|
|
426
|
-
/**
|
|
427
|
-
* Bytes `fork()` reserves for the length prefix, betting that the payload will
|
|
428
|
-
* be under 128 bytes. `join()` fills them in, and widens them if the bet was
|
|
429
|
-
* wrong.
|
|
430
|
-
*/
|
|
431
|
-
const DEFAULT_LEN_PREFIX_SIZE = 1;
|
|
432
|
-
/**
|
|
433
|
-
* Shared empty buffer used as the initial value before the first write.
|
|
434
|
-
* Avoids allocating and zeroing `INITIAL_SIZE` bytes per BinaryWriter when a
|
|
435
|
-
* writer is only used for a tiny message (or not used at all).
|
|
436
|
-
*/
|
|
437
|
-
const EMPTY_BUFFER = new Uint8Array(0);
|
|
438
|
-
/**
|
|
439
|
-
* Shared empty view, paired with `EMPTY_BUFFER`. Never written to: any
|
|
440
|
-
* fixed-width write first grows the buffer, which replaces this view.
|
|
441
|
-
*/
|
|
442
|
-
const EMPTY_VIEW = new DataView(EMPTY_BUFFER.buffer);
|
|
443
|
-
/**
|
|
444
|
-
* Longest string on the ASCII fast paths. Must stay below 0x80, so
|
|
445
|
-
* that the writer's length prefix always fits a single varint byte.
|
|
446
|
-
*/
|
|
447
|
-
const ASCII_MAX_LENGTH = 32;
|
|
448
|
-
/**
|
|
449
|
-
* Number of bytes needed to encode `value` as an unsigned 32-bit varint.
|
|
450
|
-
*/
|
|
451
|
-
function varint32Size(value) {
|
|
452
|
-
if (value < 0x80)
|
|
453
|
-
return 1;
|
|
454
|
-
if (value < 0x4000)
|
|
455
|
-
return 2;
|
|
456
|
-
if (value < 0x200000)
|
|
457
|
-
return 3;
|
|
458
|
-
if (value < 0x10000000)
|
|
459
|
-
return 4;
|
|
460
|
-
return 5;
|
|
461
|
-
}
|
|
462
292
|
export class BinaryReader {
|
|
463
293
|
constructor(buf, decodeUtf8 = getTextEncoding().decodeUtf8) {
|
|
464
294
|
this.decodeUtf8 = decodeUtf8;
|
|
465
|
-
this.varint64Lo = 0;
|
|
466
|
-
this.varint64Hi = 0;
|
|
467
295
|
this.varint64 = varint64read; // dirty cast for `this`
|
|
468
296
|
/**
|
|
469
297
|
* Read a `uint32` field, an unsigned 32 bit varint.
|
|
@@ -564,23 +392,19 @@ export class BinaryReader {
|
|
|
564
392
|
* Read a `int64` field, a signed 64-bit varint.
|
|
565
393
|
*/
|
|
566
394
|
int64() {
|
|
567
|
-
this.varint64();
|
|
568
|
-
return protoInt64.dec(this.varint64Lo, this.varint64Hi);
|
|
395
|
+
return protoInt64.dec(...this.varint64());
|
|
569
396
|
}
|
|
570
397
|
/**
|
|
571
398
|
* Read a `uint64` field, an unsigned 64-bit varint.
|
|
572
399
|
*/
|
|
573
400
|
uint64() {
|
|
574
|
-
this.varint64();
|
|
575
|
-
return protoInt64.uDec(this.varint64Lo, this.varint64Hi);
|
|
401
|
+
return protoInt64.uDec(...this.varint64());
|
|
576
402
|
}
|
|
577
403
|
/**
|
|
578
404
|
* Read a `sint64` field, a signed, zig-zag-encoded 64-bit varint.
|
|
579
405
|
*/
|
|
580
406
|
sint64() {
|
|
581
|
-
this.varint64();
|
|
582
|
-
let lo = this.varint64Lo;
|
|
583
|
-
let hi = this.varint64Hi;
|
|
407
|
+
let [lo, hi] = this.varint64();
|
|
584
408
|
// decode zig zag
|
|
585
409
|
let s = -(lo & 1);
|
|
586
410
|
lo = ((lo >>> 1) | ((hi & 1) << 31)) ^ s;
|
|
@@ -591,14 +415,8 @@ export class BinaryReader {
|
|
|
591
415
|
* Read a `bool` field, a variant.
|
|
592
416
|
*/
|
|
593
417
|
bool() {
|
|
594
|
-
|
|
595
|
-
|
|
596
|
-
if (b < 0x80) {
|
|
597
|
-
this.pos++;
|
|
598
|
-
return b !== 0;
|
|
599
|
-
}
|
|
600
|
-
this.varint64();
|
|
601
|
-
return this.varint64Lo !== 0 || this.varint64Hi !== 0;
|
|
418
|
+
let [lo, hi] = this.varint64();
|
|
419
|
+
return lo !== 0 || hi !== 0;
|
|
602
420
|
}
|
|
603
421
|
/**
|
|
604
422
|
* Read a `fixed32` field, an unsigned, fixed-length 32-bit integer.
|
|
@@ -654,21 +472,7 @@ export class BinaryReader {
|
|
|
654
472
|
* `strict` is true, throw on invalid UTF-8 instead of substituting U+FFFD.
|
|
655
473
|
*/
|
|
656
474
|
string(strict) {
|
|
657
|
-
|
|
658
|
-
const len = bytes.length;
|
|
659
|
-
// Fast path for ASCII.
|
|
660
|
-
if (len <= ASCII_MAX_LENGTH) {
|
|
661
|
-
const codes = new Array(len);
|
|
662
|
-
for (let i = 0; i < len; i++) {
|
|
663
|
-
const byte = bytes[i];
|
|
664
|
-
if (byte > 0x7f) {
|
|
665
|
-
return this.decodeUtf8(bytes, strict);
|
|
666
|
-
}
|
|
667
|
-
codes[i] = byte;
|
|
668
|
-
}
|
|
669
|
-
return String.fromCharCode.apply(String, codes);
|
|
670
|
-
}
|
|
671
|
-
return this.decodeUtf8(bytes, strict);
|
|
475
|
+
return this.decodeUtf8(this.bytes(), strict);
|
|
672
476
|
}
|
|
673
477
|
}
|
|
674
478
|
/**
|
|
@@ -13,6 +13,6 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
export * from "./binary-encoding.js";
|
|
15
15
|
export * from "./base64-encoding.js";
|
|
16
|
-
export
|
|
16
|
+
export * from "./text-encoding.js";
|
|
17
17
|
export * from "./text-format.js";
|
|
18
18
|
export * from "./size-delimited.js";
|
|
@@ -7,12 +7,6 @@ interface TextEncoding {
|
|
|
7
7
|
* Encode UTF-8 text to binary.
|
|
8
8
|
*/
|
|
9
9
|
encodeUtf8: (text: string) => Uint8Array<ArrayBuffer>;
|
|
10
|
-
/**
|
|
11
|
-
* Encode UTF-8 text to a Uint8Array. The destination must be large enough.
|
|
12
|
-
*/
|
|
13
|
-
encodeUtf8Into: (text: string, dest: Uint8Array) => {
|
|
14
|
-
written: number;
|
|
15
|
-
};
|
|
16
10
|
/**
|
|
17
11
|
* Decode UTF-8 text from binary. If `strict` is true, throw on invalid byte
|
|
18
12
|
* sequences instead of silently substituting U+FFFD. Implementations that
|
|
@@ -20,26 +14,15 @@ interface TextEncoding {
|
|
|
20
14
|
*/
|
|
21
15
|
decodeUtf8: (bytes: Uint8Array, strict?: boolean) => string;
|
|
22
16
|
}
|
|
23
|
-
type TextEncodingConfig = Omit<TextEncoding, "encodeUtf8Into"> & Partial<Pick<TextEncoding, "encodeUtf8Into">>;
|
|
24
17
|
/**
|
|
25
18
|
* Protobuf-ES requires the Text Encoding API to convert UTF-8 from and to
|
|
26
19
|
* binary. This WHATWG API is widely available, but it is not part of the
|
|
27
20
|
* ECMAScript standard. On runtimes where it is not available, use this
|
|
28
21
|
* function to provide your own implementation.
|
|
29
22
|
*
|
|
30
|
-
* Providing `encodeUtf8Into` is optional for backwards compatibility. If it
|
|
31
|
-
* is omitted, we emulate it with a wrapper that calls `encodeUtf8`.
|
|
32
|
-
*
|
|
33
23
|
* Note that the Text Encoding API does not provide a way to validate UTF-8.
|
|
34
|
-
* Our implementation
|
|
35
|
-
* to use encodeURIComponent().
|
|
24
|
+
* Our implementation falls back to use encodeURIComponent().
|
|
36
25
|
*/
|
|
37
|
-
export declare function configureTextEncoding(textEncoding:
|
|
26
|
+
export declare function configureTextEncoding(textEncoding: TextEncoding): void;
|
|
38
27
|
export declare function getTextEncoding(): TextEncoding;
|
|
39
|
-
/**
|
|
40
|
-
* Simplistic polyfill for encodeUtf8Into.
|
|
41
|
-
*
|
|
42
|
-
* @private
|
|
43
|
-
*/
|
|
44
|
-
export declare function emulateEncodeInto(encodeUtf8: (str: string) => Uint8Array): TextEncoding["encodeUtf8Into"];
|
|
45
28
|
export {};
|
|
@@ -18,37 +18,29 @@ const symbol = Symbol.for("@bufbuild/protobuf/text-encoding");
|
|
|
18
18
|
* ECMAScript standard. On runtimes where it is not available, use this
|
|
19
19
|
* function to provide your own implementation.
|
|
20
20
|
*
|
|
21
|
-
* Providing `encodeUtf8Into` is optional for backwards compatibility. If it
|
|
22
|
-
* is omitted, we emulate it with a wrapper that calls `encodeUtf8`.
|
|
23
|
-
*
|
|
24
21
|
* Note that the Text Encoding API does not provide a way to validate UTF-8.
|
|
25
|
-
* Our implementation
|
|
26
|
-
* to use encodeURIComponent().
|
|
22
|
+
* Our implementation falls back to use encodeURIComponent().
|
|
27
23
|
*/
|
|
28
24
|
export function configureTextEncoding(textEncoding) {
|
|
29
|
-
|
|
30
|
-
globalThis[symbol] = Object.assign(Object.assign({}, textEncoding), { encodeUtf8Into: (_a = textEncoding.encodeUtf8Into) !== null && _a !== void 0 ? _a : emulateEncodeInto(textEncoding.encodeUtf8.bind(textEncoding)) });
|
|
25
|
+
globalThis[symbol] = textEncoding;
|
|
31
26
|
}
|
|
32
27
|
export function getTextEncoding() {
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
const
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
const config = {
|
|
28
|
+
if (globalThis[symbol] == undefined) {
|
|
29
|
+
const te = new globalThis.TextEncoder();
|
|
30
|
+
const td = new globalThis.TextDecoder();
|
|
31
|
+
let tdStrict;
|
|
32
|
+
globalThis[symbol] = {
|
|
39
33
|
encodeUtf8(text) {
|
|
40
|
-
return
|
|
34
|
+
return te.encode(text);
|
|
41
35
|
},
|
|
42
36
|
decodeUtf8(bytes, strict) {
|
|
43
37
|
if (strict) {
|
|
44
|
-
if (
|
|
45
|
-
|
|
46
|
-
fatal: true,
|
|
47
|
-
});
|
|
38
|
+
if (tdStrict === undefined) {
|
|
39
|
+
tdStrict = new globalThis.TextDecoder("utf-8", { fatal: true });
|
|
48
40
|
}
|
|
49
|
-
return
|
|
41
|
+
return tdStrict.decode(bytes);
|
|
50
42
|
}
|
|
51
|
-
return
|
|
43
|
+
return td.decode(bytes);
|
|
52
44
|
},
|
|
53
45
|
checkUtf8(text) {
|
|
54
46
|
try {
|
|
@@ -60,31 +52,6 @@ export function getTextEncoding() {
|
|
|
60
52
|
}
|
|
61
53
|
},
|
|
62
54
|
};
|
|
63
|
-
// If encodeInto is available, use it. Otherwise, configureTextEncoding
|
|
64
|
-
// fills in a slower fallback that uses encodeUtf8.
|
|
65
|
-
if (textEncoder.encodeInto) {
|
|
66
|
-
config.encodeUtf8Into = textEncoder.encodeInto.bind(textEncoder);
|
|
67
|
-
}
|
|
68
|
-
// Native String.prototype.isWellFormed, if the runtime provides it.
|
|
69
|
-
const nativeStringIsWellFormed = String.prototype.isWellFormed;
|
|
70
|
-
if (nativeStringIsWellFormed) {
|
|
71
|
-
config.checkUtf8 = (text) => {
|
|
72
|
-
return nativeStringIsWellFormed.call(text);
|
|
73
|
-
};
|
|
74
|
-
}
|
|
75
|
-
configureTextEncoding(config);
|
|
76
55
|
}
|
|
77
|
-
return
|
|
78
|
-
}
|
|
79
|
-
/**
|
|
80
|
-
* Simplistic polyfill for encodeUtf8Into.
|
|
81
|
-
*
|
|
82
|
-
* @private
|
|
83
|
-
*/
|
|
84
|
-
export function emulateEncodeInto(encodeUtf8) {
|
|
85
|
-
return (text, dest) => {
|
|
86
|
-
const bytes = encodeUtf8(text);
|
|
87
|
-
dest.set(bytes);
|
|
88
|
-
return { written: bytes.byteLength };
|
|
89
|
-
};
|
|
56
|
+
return globalThis[symbol];
|
|
90
57
|
}
|