@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
|
@@ -13,16 +13,12 @@
|
|
|
13
13
|
// limitations under the License.
|
|
14
14
|
import { ScalarType, } from "./descriptors.js";
|
|
15
15
|
import { protoCamelCase, protoSnakeCase } from "./reflect/names.js";
|
|
16
|
+
import { reflect } from "./reflect/reflect.js";
|
|
16
17
|
import { anyUnpack } from "./wkt/index.js";
|
|
17
18
|
import { hasCustomJsonRepresentation, isWrapperDesc } from "./wkt/wrappers.js";
|
|
18
|
-
import { durationSecondsMax, durationSecondsMin, timestampMsMax, timestampMsMin, } from "./wkt/json.js";
|
|
19
19
|
import { base64Encode } from "./wire/index.js";
|
|
20
20
|
import { createExtensionContainer, getExtension } from "./extensions.js";
|
|
21
21
|
import { checkField, formatVal } from "./reflect/reflect-check.js";
|
|
22
|
-
import { FieldError } from "./reflect/error.js";
|
|
23
|
-
import { unsafeLocal } from "./reflect/unsafe.js";
|
|
24
|
-
import { scalarZeroValue } from "./reflect/scalar.js";
|
|
25
|
-
import { localMessageMapper } from "./reflect/message.js";
|
|
26
22
|
// bootstrap-inject google.protobuf.FeatureSet.FieldPresence.LEGACY_REQUIRED: const $name = $number;
|
|
27
23
|
const LEGACY_REQUIRED = 3;
|
|
28
24
|
// bootstrap-inject google.protobuf.FeatureSet.FieldPresence.IMPLICIT: const $name = $number;
|
|
@@ -41,7 +37,7 @@ function makeWriteOptions(options) {
|
|
|
41
37
|
* passed to JSON.stringify().
|
|
42
38
|
*/
|
|
43
39
|
export function toJson(schema, message, options) {
|
|
44
|
-
return
|
|
40
|
+
return reflectToJson(reflect(schema, message), makeWriteOptions(options));
|
|
45
41
|
}
|
|
46
42
|
/**
|
|
47
43
|
* Serialize the message to a JSON string.
|
|
@@ -65,337 +61,123 @@ export function enumToJson(descEnum, value) {
|
|
|
65
61
|
}
|
|
66
62
|
return name;
|
|
67
63
|
}
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
}
|
|
79
|
-
function compileMessage(desc) {
|
|
80
|
-
const typeName = desc.typeName;
|
|
81
|
-
const writeWkt = compileWkt(desc);
|
|
82
|
-
if (writeWkt !== undefined) {
|
|
83
|
-
// The field reported in ForeignFieldError. All well-known types with a
|
|
84
|
-
// custom JSON representation have at least one field.
|
|
85
|
-
const foreignField = desc.fields[0];
|
|
86
|
-
const compiledWriter = (opts, message) => {
|
|
87
|
-
if (message.$typeName !== typeName && foreignField !== undefined) {
|
|
88
|
-
throw new FieldError(foreignField, `cannot use ${foreignField} with message ${message.$typeName}`, "ForeignFieldError");
|
|
64
|
+
function reflectToJson(msg, opts) {
|
|
65
|
+
var _a;
|
|
66
|
+
const wktJson = tryWktToJson(msg, opts);
|
|
67
|
+
if (wktJson !== undefined)
|
|
68
|
+
return wktJson;
|
|
69
|
+
const json = {};
|
|
70
|
+
for (const f of msg.sortedFields) {
|
|
71
|
+
if (!msg.isSet(f)) {
|
|
72
|
+
if (f.presence == LEGACY_REQUIRED) {
|
|
73
|
+
throw new Error(`cannot encode ${f} to JSON: required field not set`);
|
|
89
74
|
}
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
return compiledWriter;
|
|
94
|
-
}
|
|
95
|
-
const sortedFields = desc.fields.concat().sort((a, b) => a.number - b.number);
|
|
96
|
-
// The field reported in ForeignFieldError.
|
|
97
|
-
const foreignField = sortedFields[0];
|
|
98
|
-
const fieldWriters = [];
|
|
99
|
-
const compiledWriter = (opts, message) => {
|
|
100
|
-
if (message.$typeName !== typeName && foreignField !== undefined) {
|
|
101
|
-
throw new FieldError(foreignField, `cannot use ${foreignField} with message ${message.$typeName}`, "ForeignFieldError");
|
|
102
|
-
}
|
|
103
|
-
const json = {};
|
|
104
|
-
for (let i = 0; i < fieldWriters.length; i++) {
|
|
105
|
-
fieldWriters[i](opts, message, json);
|
|
106
|
-
}
|
|
107
|
-
if (opts.registry) {
|
|
108
|
-
writeExtensions(json, opts, opts.registry, message, desc);
|
|
109
|
-
}
|
|
110
|
-
return json;
|
|
111
|
-
};
|
|
112
|
-
// Register before compiling fields, so that recursive message types
|
|
113
|
-
// resolve to this instance instead of compiling endlessly.
|
|
114
|
-
compiledWriters.set(desc, compiledWriter);
|
|
115
|
-
for (const field of sortedFields) {
|
|
116
|
-
fieldWriters.push(compileField(field));
|
|
117
|
-
}
|
|
118
|
-
return compiledWriter;
|
|
119
|
-
}
|
|
120
|
-
/**
|
|
121
|
-
* Compile an encoder for a well-known type with a custom JSON representation,
|
|
122
|
-
* or return undefined for other messages.
|
|
123
|
-
*/
|
|
124
|
-
function compileWkt(desc) {
|
|
125
|
-
if (!desc.typeName.startsWith("google.protobuf.")) {
|
|
126
|
-
return undefined;
|
|
127
|
-
}
|
|
128
|
-
switch (desc.typeName) {
|
|
129
|
-
case "google.protobuf.Any":
|
|
130
|
-
return (opts, message) => anyToJson(message, opts);
|
|
131
|
-
case "google.protobuf.Timestamp":
|
|
132
|
-
return (opts, message) => timestampToJson(message);
|
|
133
|
-
case "google.protobuf.Duration":
|
|
134
|
-
return (opts, message) => durationToJson(message);
|
|
135
|
-
case "google.protobuf.FieldMask":
|
|
136
|
-
return (opts, message) => fieldMaskToJson(message);
|
|
137
|
-
case "google.protobuf.Struct":
|
|
138
|
-
return (opts, message) => structToJson(message);
|
|
139
|
-
case "google.protobuf.Value":
|
|
140
|
-
return (opts, message) => valueToJson(message);
|
|
141
|
-
case "google.protobuf.ListValue":
|
|
142
|
-
return (opts, message) => listValueToJson(message);
|
|
143
|
-
default:
|
|
144
|
-
if (isWrapperDesc(desc)) {
|
|
145
|
-
const valueField = desc.fields[0];
|
|
146
|
-
const localName = valueField.localName;
|
|
147
|
-
const zero = scalarZeroValue(valueField.scalar, false);
|
|
148
|
-
const writeScalar = compileScalarValue(valueField);
|
|
149
|
-
return (opts, message) => {
|
|
150
|
-
const value = message[localName];
|
|
151
|
-
return writeScalar(opts, value === undefined ? zero : value);
|
|
152
|
-
};
|
|
75
|
+
if (!opts.alwaysEmitImplicit || f.presence !== IMPLICIT) {
|
|
76
|
+
// Fields with implicit presence omit zero values (e.g. empty string) by default
|
|
77
|
+
continue;
|
|
153
78
|
}
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
switch (field.fieldKind) {
|
|
159
|
-
case "scalar":
|
|
160
|
-
case "enum":
|
|
161
|
-
case "message":
|
|
162
|
-
return compileSingularField(field);
|
|
163
|
-
case "list":
|
|
164
|
-
case "map": {
|
|
165
|
-
const writeValue = field.fieldKind == "list"
|
|
166
|
-
? compileListValue(field)
|
|
167
|
-
: compileMapValue(field);
|
|
168
|
-
const protoName = field.name;
|
|
169
|
-
const jsonKey = field.jsonName;
|
|
170
|
-
const localName = field.localName;
|
|
171
|
-
return (opts, message, json) => {
|
|
172
|
-
const value = writeValue(opts, message[localName]);
|
|
173
|
-
if (value !== undefined) {
|
|
174
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = value;
|
|
175
|
-
}
|
|
176
|
-
};
|
|
79
|
+
}
|
|
80
|
+
const jsonValue = fieldToJson(f, msg.get(f), opts);
|
|
81
|
+
if (jsonValue !== undefined) {
|
|
82
|
+
json[jsonName(f, opts)] = jsonValue;
|
|
177
83
|
}
|
|
178
84
|
}
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
if (field.oneof) {
|
|
190
|
-
const oneofLocalName = field.oneof.localName;
|
|
191
|
-
return (opts, message, json) => {
|
|
192
|
-
const oneof = message[oneofLocalName];
|
|
193
|
-
if (oneof.case === localName) {
|
|
194
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, oneof.value);
|
|
195
|
-
}
|
|
196
|
-
};
|
|
197
|
-
}
|
|
198
|
-
if (field.presence != IMPLICIT) {
|
|
199
|
-
const requiredError = field.presence == LEGACY_REQUIRED
|
|
200
|
-
? `cannot encode ${field} to JSON: required field not set`
|
|
201
|
-
: undefined;
|
|
202
|
-
return (opts, message, json) => {
|
|
203
|
-
const value = message[localName];
|
|
204
|
-
// Fields with explicit presence have properties on the prototype
|
|
205
|
-
// chain for default / zero values (except for proto3).
|
|
206
|
-
if (value !== undefined &&
|
|
207
|
-
Object.prototype.hasOwnProperty.call(message, localName)) {
|
|
208
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, value);
|
|
209
|
-
}
|
|
210
|
-
else if (requiredError !== undefined) {
|
|
211
|
-
throw new Error(requiredError);
|
|
212
|
-
}
|
|
213
|
-
};
|
|
214
|
-
}
|
|
215
|
-
// Implicit presence: the field is emitted when the value is not the zero
|
|
216
|
-
// value, or when alwaysEmitImplicit is enabled. The zero check is inlined
|
|
217
|
-
// per type, see isScalarZeroValue.
|
|
218
|
-
if (field.fieldKind == "enum") {
|
|
219
|
-
const zero = field.enum.values[0].number;
|
|
220
|
-
return (opts, message, json) => {
|
|
221
|
-
const value = message[localName];
|
|
222
|
-
if (value !== zero || opts.alwaysEmitImplicit) {
|
|
223
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, value);
|
|
224
|
-
}
|
|
225
|
-
};
|
|
226
|
-
}
|
|
227
|
-
switch (field.scalar) {
|
|
228
|
-
case ScalarType.BOOL:
|
|
229
|
-
return (opts, message, json) => {
|
|
230
|
-
const value = message[localName];
|
|
231
|
-
if (value !== false || opts.alwaysEmitImplicit) {
|
|
232
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, value);
|
|
233
|
-
}
|
|
234
|
-
};
|
|
235
|
-
case ScalarType.STRING:
|
|
236
|
-
return (opts, message, json) => {
|
|
237
|
-
const value = message[localName];
|
|
238
|
-
if (value !== "" || opts.alwaysEmitImplicit) {
|
|
239
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, value);
|
|
240
|
-
}
|
|
241
|
-
};
|
|
242
|
-
case ScalarType.BYTES:
|
|
243
|
-
return (opts, message, json) => {
|
|
244
|
-
const value = message[localName];
|
|
245
|
-
if (!(value instanceof Uint8Array) ||
|
|
246
|
-
value.byteLength > 0 ||
|
|
247
|
-
opts.alwaysEmitImplicit) {
|
|
248
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, value);
|
|
249
|
-
}
|
|
250
|
-
};
|
|
251
|
-
case ScalarType.DOUBLE:
|
|
252
|
-
case ScalarType.FLOAT:
|
|
253
|
-
return (opts, message, json) => {
|
|
254
|
-
const value = message[localName];
|
|
255
|
-
// Object.is distinguishes -0 from 0.
|
|
256
|
-
if (!Object.is(value, 0) || opts.alwaysEmitImplicit) {
|
|
257
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, value);
|
|
85
|
+
if (opts.registry) {
|
|
86
|
+
const tagSeen = new Set();
|
|
87
|
+
for (const { no } of (_a = msg.getUnknown()) !== null && _a !== void 0 ? _a : []) {
|
|
88
|
+
// Same tag can appear multiple times, so we
|
|
89
|
+
// keep track and skip identical ones.
|
|
90
|
+
if (!tagSeen.has(no)) {
|
|
91
|
+
tagSeen.add(no);
|
|
92
|
+
const extension = opts.registry.getExtensionFor(msg.desc, no);
|
|
93
|
+
if (!extension) {
|
|
94
|
+
continue;
|
|
258
95
|
}
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
264
|
-
if (value != 0 || opts.alwaysEmitImplicit) {
|
|
265
|
-
json[opts.useProtoFieldName ? protoName : jsonKey] = writeValue(opts, value);
|
|
96
|
+
const value = getExtension(msg.message, extension);
|
|
97
|
+
const [container, field] = createExtensionContainer(extension, value);
|
|
98
|
+
const jsonValue = fieldToJson(field, container.get(field), opts);
|
|
99
|
+
if (jsonValue !== undefined) {
|
|
100
|
+
json[extension.jsonName] = jsonValue;
|
|
266
101
|
}
|
|
267
|
-
}
|
|
102
|
+
}
|
|
103
|
+
}
|
|
268
104
|
}
|
|
105
|
+
return json;
|
|
269
106
|
}
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
* extension values.
|
|
273
|
-
*/
|
|
274
|
-
function compileFieldValue(field) {
|
|
275
|
-
switch (field.fieldKind) {
|
|
107
|
+
function fieldToJson(f, val, opts) {
|
|
108
|
+
switch (f.fieldKind) {
|
|
276
109
|
case "scalar":
|
|
277
|
-
|
|
110
|
+
return scalarToJson(f, val);
|
|
278
111
|
case "message":
|
|
279
|
-
return
|
|
112
|
+
return reflectToJson(val, opts);
|
|
113
|
+
case "enum":
|
|
114
|
+
return enumToJsonInternal(f.enum, val, opts.enumAsInteger);
|
|
280
115
|
case "list":
|
|
281
|
-
return
|
|
116
|
+
return listToJson(val, opts);
|
|
282
117
|
case "map":
|
|
283
|
-
return
|
|
118
|
+
return mapToJson(val, opts);
|
|
284
119
|
}
|
|
285
120
|
}
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
switch (field.fieldKind) {
|
|
121
|
+
function mapToJson(map, opts) {
|
|
122
|
+
const f = map.field();
|
|
123
|
+
const jsonObj = {};
|
|
124
|
+
switch (f.mapKind) {
|
|
291
125
|
case "scalar":
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
126
|
+
for (const [entryKey, entryValue] of map) {
|
|
127
|
+
jsonObj[entryKey] = scalarToJson(f, entryValue);
|
|
128
|
+
}
|
|
129
|
+
break;
|
|
295
130
|
case "message":
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
}
|
|
299
|
-
|
|
300
|
-
* Compile an encoder for the value of a message field.
|
|
301
|
-
*/
|
|
302
|
-
function compileMessageValue(field) {
|
|
303
|
-
const { toMessage } = localMessageMapper(field);
|
|
304
|
-
const writeMessage = compiledWriter(field.message);
|
|
305
|
-
return (opts, value) => writeMessage(opts, toMessage(value));
|
|
306
|
-
}
|
|
307
|
-
/**
|
|
308
|
-
* Compile an encoder for a list field value. Returns undefined for an empty
|
|
309
|
-
* list, unless alwaysEmitImplicit is enabled.
|
|
310
|
-
*/
|
|
311
|
-
function compileListValue(field) {
|
|
312
|
-
const writeItem = compileListItemValue(field);
|
|
313
|
-
return (opts, value) => {
|
|
314
|
-
const items = value;
|
|
315
|
-
if (items.length == 0 && !opts.alwaysEmitImplicit) {
|
|
316
|
-
return undefined;
|
|
317
|
-
}
|
|
318
|
-
const jsonArray = [];
|
|
319
|
-
for (let i = 0; i < items.length; i++) {
|
|
320
|
-
jsonArray.push(writeItem(opts, items[i]));
|
|
321
|
-
}
|
|
322
|
-
return jsonArray;
|
|
323
|
-
};
|
|
324
|
-
}
|
|
325
|
-
function compileListItemValue(field) {
|
|
326
|
-
switch (field.listKind) {
|
|
327
|
-
case "scalar":
|
|
328
|
-
return compileScalarValue(field);
|
|
131
|
+
for (const [entryKey, entryValue] of map) {
|
|
132
|
+
jsonObj[entryKey] = reflectToJson(entryValue, opts);
|
|
133
|
+
}
|
|
134
|
+
break;
|
|
329
135
|
case "enum":
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
136
|
+
for (const [entryKey, entryValue] of map) {
|
|
137
|
+
jsonObj[entryKey] = enumToJsonInternal(f.enum, entryValue, opts.enumAsInteger);
|
|
138
|
+
}
|
|
139
|
+
break;
|
|
333
140
|
}
|
|
141
|
+
return opts.alwaysEmitImplicit || map.size > 0 ? jsonObj : undefined;
|
|
334
142
|
}
|
|
335
|
-
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
*/
|
|
340
|
-
function compileMapValue(field) {
|
|
341
|
-
const writeMapValue = compileMapEntryValue(field);
|
|
342
|
-
return (opts, value) => {
|
|
343
|
-
const record = value;
|
|
344
|
-
const keys = Object.keys(record);
|
|
345
|
-
if (keys.length == 0 && !opts.alwaysEmitImplicit) {
|
|
346
|
-
return undefined;
|
|
347
|
-
}
|
|
348
|
-
const jsonObject = {};
|
|
349
|
-
for (let i = 0; i < keys.length; i++) {
|
|
350
|
-
const key = keys[i];
|
|
351
|
-
jsonObject[key] = writeMapValue(opts, record[key]);
|
|
352
|
-
}
|
|
353
|
-
return jsonObject;
|
|
354
|
-
};
|
|
355
|
-
}
|
|
356
|
-
function compileMapEntryValue(field) {
|
|
357
|
-
switch (field.mapKind) {
|
|
143
|
+
function listToJson(list, opts) {
|
|
144
|
+
const f = list.field();
|
|
145
|
+
const jsonArr = [];
|
|
146
|
+
switch (f.listKind) {
|
|
358
147
|
case "scalar":
|
|
359
|
-
|
|
148
|
+
for (const item of list) {
|
|
149
|
+
jsonArr.push(scalarToJson(f, item));
|
|
150
|
+
}
|
|
151
|
+
break;
|
|
360
152
|
case "enum":
|
|
361
|
-
|
|
153
|
+
for (const item of list) {
|
|
154
|
+
jsonArr.push(enumToJsonInternal(f.enum, item, opts.enumAsInteger));
|
|
155
|
+
}
|
|
156
|
+
break;
|
|
362
157
|
case "message":
|
|
363
|
-
|
|
158
|
+
for (const item of list) {
|
|
159
|
+
jsonArr.push(reflectToJson(item, opts));
|
|
160
|
+
}
|
|
161
|
+
break;
|
|
364
162
|
}
|
|
163
|
+
return opts.alwaysEmitImplicit || jsonArr.length > 0 ? jsonArr : undefined;
|
|
365
164
|
}
|
|
366
|
-
|
|
367
|
-
|
|
368
|
-
|
|
369
|
-
|
|
370
|
-
|
|
165
|
+
function enumToJsonInternal(desc, value, enumAsInteger) {
|
|
166
|
+
var _a;
|
|
167
|
+
if (typeof value != "number") {
|
|
168
|
+
throw new Error(`cannot encode ${desc} to JSON: expected number, got ${formatVal(value)}`);
|
|
169
|
+
}
|
|
371
170
|
if (desc.typeName == "google.protobuf.NullValue") {
|
|
372
|
-
return
|
|
373
|
-
if (typeof value != "number") {
|
|
374
|
-
throw errorEnumValue(desc, value);
|
|
375
|
-
}
|
|
376
|
-
return null;
|
|
377
|
-
};
|
|
171
|
+
return null;
|
|
378
172
|
}
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
382
|
-
|
|
383
|
-
|
|
384
|
-
if (opts.enumAsInteger) {
|
|
385
|
-
return value;
|
|
386
|
-
}
|
|
387
|
-
// If we don't know the enum value, just return the number.
|
|
388
|
-
return (_b = (_a = desc.value[value]) === null || _a === void 0 ? void 0 : _a.name) !== null && _b !== void 0 ? _b : value;
|
|
389
|
-
};
|
|
390
|
-
}
|
|
391
|
-
function errorEnumValue(desc, value) {
|
|
392
|
-
return new Error(`cannot encode ${desc} to JSON: expected number, got ${formatVal(value)}`);
|
|
173
|
+
if (enumAsInteger) {
|
|
174
|
+
return value;
|
|
175
|
+
}
|
|
176
|
+
const val = desc.value[value];
|
|
177
|
+
return (_a = val === null || val === void 0 ? void 0 : val.name) !== null && _a !== void 0 ? _a : value; // if we don't know the enum value, just return the number
|
|
393
178
|
}
|
|
394
|
-
|
|
395
|
-
|
|
396
|
-
* descriptor, which may be a list or map field for items of those fields.
|
|
397
|
-
*/
|
|
398
|
-
function compileScalarValue(field) {
|
|
179
|
+
function scalarToJson(field, value) {
|
|
180
|
+
var _a, _b, _c, _d, _e, _f;
|
|
399
181
|
switch (field.scalar) {
|
|
400
182
|
// int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
|
|
401
183
|
case ScalarType.INT32:
|
|
@@ -403,100 +185,86 @@ function compileScalarValue(field) {
|
|
|
403
185
|
case ScalarType.SINT32:
|
|
404
186
|
case ScalarType.FIXED32:
|
|
405
187
|
case ScalarType.UINT32:
|
|
406
|
-
|
|
407
|
-
|
|
408
|
-
|
|
409
|
-
|
|
410
|
-
return value;
|
|
411
|
-
};
|
|
188
|
+
if (typeof value != "number") {
|
|
189
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_a = checkField(field, value)) === null || _a === void 0 ? void 0 : _a.message}`);
|
|
190
|
+
}
|
|
191
|
+
return value;
|
|
412
192
|
// float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
|
|
413
193
|
// Either numbers or strings are accepted. Exponent notation is also accepted.
|
|
414
194
|
case ScalarType.FLOAT:
|
|
415
|
-
case ScalarType.DOUBLE:
|
|
416
|
-
|
|
417
|
-
|
|
418
|
-
|
|
419
|
-
|
|
420
|
-
|
|
421
|
-
|
|
422
|
-
|
|
423
|
-
|
|
424
|
-
|
|
425
|
-
|
|
426
|
-
return value;
|
|
427
|
-
};
|
|
195
|
+
case ScalarType.DOUBLE: // eslint-disable-line no-fallthrough
|
|
196
|
+
if (typeof value != "number") {
|
|
197
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_b = checkField(field, value)) === null || _b === void 0 ? void 0 : _b.message}`);
|
|
198
|
+
}
|
|
199
|
+
if (Number.isNaN(value))
|
|
200
|
+
return "NaN";
|
|
201
|
+
if (value === Number.POSITIVE_INFINITY)
|
|
202
|
+
return "Infinity";
|
|
203
|
+
if (value === Number.NEGATIVE_INFINITY)
|
|
204
|
+
return "-Infinity";
|
|
205
|
+
return value;
|
|
428
206
|
// string:
|
|
429
207
|
case ScalarType.STRING:
|
|
430
|
-
|
|
431
|
-
|
|
432
|
-
|
|
433
|
-
|
|
434
|
-
return value;
|
|
435
|
-
};
|
|
208
|
+
if (typeof value != "string") {
|
|
209
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_c = checkField(field, value)) === null || _c === void 0 ? void 0 : _c.message}`);
|
|
210
|
+
}
|
|
211
|
+
return value;
|
|
436
212
|
// bool:
|
|
437
213
|
case ScalarType.BOOL:
|
|
438
|
-
|
|
439
|
-
|
|
440
|
-
|
|
441
|
-
|
|
442
|
-
return value;
|
|
443
|
-
};
|
|
214
|
+
if (typeof value != "boolean") {
|
|
215
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_d = checkField(field, value)) === null || _d === void 0 ? void 0 : _d.message}`);
|
|
216
|
+
}
|
|
217
|
+
return value;
|
|
444
218
|
// JSON value will be a decimal string. Either numbers or strings are accepted.
|
|
445
219
|
case ScalarType.UINT64:
|
|
446
220
|
case ScalarType.FIXED64:
|
|
447
221
|
case ScalarType.INT64:
|
|
448
222
|
case ScalarType.SFIXED64:
|
|
449
223
|
case ScalarType.SINT64:
|
|
450
|
-
|
|
451
|
-
|
|
452
|
-
|
|
453
|
-
|
|
454
|
-
|
|
455
|
-
|
|
456
|
-
throw errorScalarValue(field, value);
|
|
457
|
-
};
|
|
224
|
+
if (typeof value == "bigint" ||
|
|
225
|
+
typeof value == "string" ||
|
|
226
|
+
(typeof value == "number" && Number.isInteger(value))) {
|
|
227
|
+
return value.toString();
|
|
228
|
+
}
|
|
229
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_e = checkField(field, value)) === null || _e === void 0 ? void 0 : _e.message}`);
|
|
458
230
|
// bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
|
|
459
231
|
// Either standard or URL-safe base64 encoding with/without paddings are accepted.
|
|
460
232
|
case ScalarType.BYTES:
|
|
461
|
-
|
|
462
|
-
|
|
463
|
-
|
|
464
|
-
|
|
465
|
-
throw errorScalarValue(field, value);
|
|
466
|
-
};
|
|
233
|
+
if (value instanceof Uint8Array) {
|
|
234
|
+
return base64Encode(value);
|
|
235
|
+
}
|
|
236
|
+
throw new Error(`cannot encode ${field} to JSON: ${(_f = checkField(field, value)) === null || _f === void 0 ? void 0 : _f.message}`);
|
|
467
237
|
}
|
|
468
238
|
}
|
|
469
|
-
function
|
|
470
|
-
|
|
471
|
-
return new Error(`cannot encode ${field} to JSON: ${(_a = checkField(field, value)) === null || _a === void 0 ? void 0 : _a.message}`);
|
|
239
|
+
function jsonName(f, opts) {
|
|
240
|
+
return opts.useProtoFieldName ? f.name : f.jsonName;
|
|
472
241
|
}
|
|
473
|
-
|
|
474
|
-
|
|
475
|
-
|
|
476
|
-
|
|
477
|
-
const unknown = message.$unknown;
|
|
478
|
-
if (unknown === undefined) {
|
|
479
|
-
return;
|
|
242
|
+
// returns a json value if wkt, otherwise returns undefined.
|
|
243
|
+
function tryWktToJson(msg, opts) {
|
|
244
|
+
if (!msg.desc.typeName.startsWith("google.protobuf.")) {
|
|
245
|
+
return undefined;
|
|
480
246
|
}
|
|
481
|
-
|
|
482
|
-
|
|
483
|
-
|
|
484
|
-
|
|
485
|
-
|
|
486
|
-
|
|
487
|
-
|
|
488
|
-
|
|
489
|
-
|
|
490
|
-
|
|
491
|
-
|
|
492
|
-
|
|
493
|
-
|
|
494
|
-
|
|
495
|
-
|
|
496
|
-
|
|
497
|
-
|
|
247
|
+
switch (msg.desc.typeName) {
|
|
248
|
+
case "google.protobuf.Any":
|
|
249
|
+
return anyToJson(msg.message, opts);
|
|
250
|
+
case "google.protobuf.Timestamp":
|
|
251
|
+
return timestampToJson(msg.message);
|
|
252
|
+
case "google.protobuf.Duration":
|
|
253
|
+
return durationToJson(msg.message);
|
|
254
|
+
case "google.protobuf.FieldMask":
|
|
255
|
+
return fieldMaskToJson(msg.message);
|
|
256
|
+
case "google.protobuf.Struct":
|
|
257
|
+
return structToJson(msg.message);
|
|
258
|
+
case "google.protobuf.Value":
|
|
259
|
+
return valueToJson(msg.message);
|
|
260
|
+
case "google.protobuf.ListValue":
|
|
261
|
+
return listValueToJson(msg.message);
|
|
262
|
+
default:
|
|
263
|
+
if (isWrapperDesc(msg.desc)) {
|
|
264
|
+
const valueField = msg.desc.fields[0];
|
|
265
|
+
return scalarToJson(valueField, msg.get(valueField));
|
|
498
266
|
}
|
|
499
|
-
|
|
267
|
+
return undefined;
|
|
500
268
|
}
|
|
501
269
|
}
|
|
502
270
|
function anyToJson(val, opts) {
|
|
@@ -515,18 +283,17 @@ function anyToJson(val, opts) {
|
|
|
515
283
|
if (!desc || !message) {
|
|
516
284
|
throw new Error(`cannot encode message ${val.$typeName} to JSON: "${val.typeUrl}" is not in the type registry`);
|
|
517
285
|
}
|
|
286
|
+
const reflected = reflect(desc, message);
|
|
518
287
|
const json = hasCustomJsonRepresentation(desc)
|
|
519
|
-
? {
|
|
520
|
-
|
|
521
|
-
}
|
|
522
|
-
: compiledWriter(desc)(opts, message);
|
|
288
|
+
? { value: tryWktToJson(reflected, opts) }
|
|
289
|
+
: reflectToJson(reflected, opts);
|
|
523
290
|
json["@type"] = val.typeUrl;
|
|
524
291
|
return json;
|
|
525
292
|
}
|
|
526
293
|
function durationToJson(val) {
|
|
527
294
|
const seconds = Number(val.seconds);
|
|
528
295
|
const nanos = val.nanos;
|
|
529
|
-
if (seconds >
|
|
296
|
+
if (seconds > 315576000000 || seconds < -315576000000) {
|
|
530
297
|
throw new Error(`cannot encode message ${val.$typeName} to JSON: value out of range`);
|
|
531
298
|
}
|
|
532
299
|
if ((seconds > 0 && nanos < 0) || (seconds < 0 && nanos > 0)) {
|
|
@@ -561,10 +328,8 @@ function fieldMaskToJson(val) {
|
|
|
561
328
|
}
|
|
562
329
|
function structToJson(val) {
|
|
563
330
|
const json = {};
|
|
564
|
-
const
|
|
565
|
-
|
|
566
|
-
const key = keys[i];
|
|
567
|
-
json[key] = valueToJson(val.fields[key]);
|
|
331
|
+
for (const [k, v] of Object.entries(val.fields)) {
|
|
332
|
+
json[k] = valueToJson(v);
|
|
568
333
|
}
|
|
569
334
|
return json;
|
|
570
335
|
}
|
|
@@ -594,7 +359,8 @@ function listValueToJson(val) {
|
|
|
594
359
|
}
|
|
595
360
|
function timestampToJson(val) {
|
|
596
361
|
const ms = Number(val.seconds) * 1000;
|
|
597
|
-
if (ms <
|
|
362
|
+
if (ms < Date.parse("0001-01-01T00:00:00Z") ||
|
|
363
|
+
ms > Date.parse("9999-12-31T23:59:59Z")) {
|
|
598
364
|
throw new Error(`cannot encode message ${val.$typeName} to JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
|
|
599
365
|
}
|
|
600
366
|
if (val.nanos < 0) {
|