@code-yeongyu/senpi 2026.8.19 → 2026.8.20-2
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 +133 -0
- package/dist/cli-main.js +4 -0
- package/dist/cli-main.js.map +1 -1
- package/dist/cli.js +31 -3
- package/dist/cli.js.map +1 -1
- package/dist/compile-cache.d.ts +2 -0
- package/dist/compile-cache.d.ts.map +1 -0
- package/dist/compile-cache.js +33 -0
- package/dist/compile-cache.js.map +1 -0
- package/dist/core/agent-session.d.ts +5 -0
- package/dist/core/agent-session.d.ts.map +1 -1
- package/dist/core/agent-session.js +94 -12
- package/dist/core/agent-session.js.map +1 -1
- package/dist/core/compaction/compaction.d.ts +6 -0
- package/dist/core/compaction/compaction.d.ts.map +1 -1
- package/dist/core/compaction/compaction.js +13 -0
- package/dist/core/compaction/compaction.js.map +1 -1
- package/dist/core/cursor-exec-bridge-session.d.ts +2 -1
- package/dist/core/cursor-exec-bridge-session.d.ts.map +1 -1
- package/dist/core/cursor-exec-bridge-session.js +5 -2
- package/dist/core/cursor-exec-bridge-session.js.map +1 -1
- package/dist/core/cursor-exec-bridge.d.ts +9 -1
- package/dist/core/cursor-exec-bridge.d.ts.map +1 -1
- package/dist/core/cursor-exec-bridge.js +26 -2
- package/dist/core/cursor-exec-bridge.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools.d.ts +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools.js +5 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/custom-tools.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts +6 -4
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.js +24 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.lazy.d.ts +39 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.lazy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.lazy.js +31 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/sdk-boundary.lazy.js.map +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts +2 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js +35 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-continuity.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js +1 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-observability.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts +8 -0
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js +4 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-reattach.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.js +28 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/session-turn-attempt.js.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.d.ts.map +1 -1
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js +5 -2
- package/dist/core/extensions/builtin/claude-sdk-oauth/stream.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/index.js +5 -0
- package/dist/core/extensions/builtin/compaction/index.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts +1 -1
- package/dist/core/extensions/builtin/compaction/log.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/log.js +1 -0
- package/dist/core/extensions/builtin/compaction/log.js.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.d.ts +1 -0
- package/dist/core/extensions/builtin/compaction/speculative.d.ts.map +1 -1
- package/dist/core/extensions/builtin/compaction/speculative.js +4 -0
- package/dist/core/extensions/builtin/compaction/speculative.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/index.js +13 -10
- package/dist/core/extensions/builtin/config-reload/index.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/watch-engine.d.ts +8 -1
- package/dist/core/extensions/builtin/config-reload/watch-engine.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/watch-engine.js +98 -18
- package/dist/core/extensions/builtin/config-reload/watch-engine.js.map +1 -1
- package/dist/core/extensions/builtin/config-reload/watch-event-source.d.ts +1 -1
- package/dist/core/extensions/builtin/config-reload/watch-event-source.d.ts.map +1 -1
- package/dist/core/extensions/builtin/config-reload/watch-event-source.js +7 -2
- package/dist/core/extensions/builtin/config-reload/watch-event-source.js.map +1 -1
- package/dist/core/extensions/builtin/goal/elapsed-ticker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/elapsed-ticker.js +15 -1
- package/dist/core/extensions/builtin/goal/elapsed-ticker.js.map +1 -1
- package/dist/core/extensions/builtin/goal/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/index.js +7 -22
- package/dist/core/extensions/builtin/goal/index.js.map +1 -1
- package/dist/core/extensions/builtin/goal/stale-context.d.ts +9 -0
- package/dist/core/extensions/builtin/goal/stale-context.d.ts.map +1 -0
- package/dist/core/extensions/builtin/goal/stale-context.js +11 -0
- package/dist/core/extensions/builtin/goal/stale-context.js.map +1 -0
- package/dist/core/extensions/builtin/goal/wait-ticker.d.ts +8 -0
- package/dist/core/extensions/builtin/goal/wait-ticker.d.ts.map +1 -1
- package/dist/core/extensions/builtin/goal/wait-ticker.js +37 -3
- package/dist/core/extensions/builtin/goal/wait-ticker.js.map +1 -1
- package/dist/core/extensions/builtin/mcp/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/mcp/index.js +12 -1
- package/dist/core/extensions/builtin/mcp/index.js.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.d.ts.map +1 -1
- package/dist/core/extensions/builtin/prompt-url-widget.js +7 -15
- package/dist/core/extensions/builtin/prompt-url-widget.js.map +1 -1
- package/dist/core/extensions/builtin/rules/ui/rules-banner.d.ts.map +1 -1
- package/dist/core/extensions/builtin/rules/ui/rules-banner.js +21 -25
- package/dist/core/extensions/builtin/rules/ui/rules-banner.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.d.ts.map +1 -1
- package/dist/core/extensions/builtin/todotools/index.js +20 -0
- package/dist/core/extensions/builtin/todotools/index.js.map +1 -1
- package/dist/core/extensions/builtin/todotools/native-todo-mirror.d.ts +3 -0
- package/dist/core/extensions/builtin/todotools/native-todo-mirror.d.ts.map +1 -0
- package/dist/core/extensions/builtin/todotools/native-todo-mirror.js +22 -0
- package/dist/core/extensions/builtin/todotools/native-todo-mirror.js.map +1 -0
- package/dist/core/extensions/builtin/webfetch/webfetch/content.lazy.d.ts +17 -0
- package/dist/core/extensions/builtin/webfetch/webfetch/content.lazy.d.ts.map +1 -0
- package/dist/core/extensions/builtin/webfetch/webfetch/content.lazy.js +22 -0
- package/dist/core/extensions/builtin/webfetch/webfetch/content.lazy.js.map +1 -0
- package/dist/core/extensions/builtin/webfetch/webfetch/tool.js +3 -3
- package/dist/core/extensions/builtin/webfetch/webfetch/tool.js.map +1 -1
- package/dist/core/messages.d.ts +9 -2
- package/dist/core/messages.d.ts.map +1 -1
- package/dist/core/messages.js +13 -18
- package/dist/core/messages.js.map +1 -1
- package/dist/core/retry-fallback/hint-policy.d.ts +3 -2
- package/dist/core/retry-fallback/hint-policy.d.ts.map +1 -1
- package/dist/core/retry-fallback/hint-policy.js +19 -8
- package/dist/core/retry-fallback/hint-policy.js.map +1 -1
- package/dist/core/retry-fallback/settings.js.map +1 -1
- package/dist/core/session-discovery.d.ts +16 -0
- package/dist/core/session-discovery.d.ts.map +1 -0
- package/dist/core/session-discovery.js +101 -0
- package/dist/core/session-discovery.js.map +1 -0
- package/dist/core/session-manager.d.ts +2 -1
- package/dist/core/session-manager.d.ts.map +1 -1
- package/dist/core/session-manager.js +4 -170
- package/dist/core/session-manager.js.map +1 -1
- package/dist/core/session-record.d.ts +14 -0
- package/dist/core/session-record.d.ts.map +1 -0
- package/dist/core/session-record.js +47 -0
- package/dist/core/session-record.js.map +1 -0
- package/dist/core/session-summary-cache.d.ts +40 -0
- package/dist/core/session-summary-cache.d.ts.map +1 -0
- package/dist/core/session-summary-cache.js +79 -0
- package/dist/core/session-summary-cache.js.map +1 -0
- package/dist/core/session-summary-lru.d.ts +54 -0
- package/dist/core/session-summary-lru.d.ts.map +1 -0
- package/dist/core/session-summary-lru.js +72 -0
- package/dist/core/session-summary-lru.js.map +1 -0
- package/dist/core/session-summary.d.ts +29 -0
- package/dist/core/session-summary.d.ts.map +1 -0
- package/dist/core/session-summary.js +90 -0
- package/dist/core/session-summary.js.map +1 -0
- package/dist/index.d.ts +1 -0
- package/dist/index.d.ts.map +1 -1
- package/dist/index.js +2 -0
- package/dist/index.js.map +1 -1
- package/dist/inspector-policy.d.ts +6 -0
- package/dist/inspector-policy.d.ts.map +1 -1
- package/dist/inspector-policy.js +6 -1
- package/dist/inspector-policy.js.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.d.ts.map +1 -1
- package/dist/modes/interactive/components/earendil-announcement.js +8 -8
- package/dist/modes/interactive/components/earendil-announcement.js.map +1 -1
- package/dist/modes/interactive/components/progressive-transcript-container.d.ts +72 -0
- package/dist/modes/interactive/components/progressive-transcript-container.d.ts.map +1 -0
- package/dist/modes/interactive/components/progressive-transcript-container.js +150 -0
- package/dist/modes/interactive/components/progressive-transcript-container.js.map +1 -0
- package/dist/modes/interactive/components/status-indicator.d.ts +1 -1
- package/dist/modes/interactive/components/status-indicator.d.ts.map +1 -1
- package/dist/modes/interactive/components/status-indicator.js +8 -2
- package/dist/modes/interactive/components/status-indicator.js.map +1 -1
- package/dist/modes/interactive/interactive-mode.d.ts +4 -0
- package/dist/modes/interactive/interactive-mode.d.ts.map +1 -1
- package/dist/modes/interactive/interactive-mode.js +127 -65
- package/dist/modes/interactive/interactive-mode.js.map +1 -1
- package/dist/modes/interactive/split-trailing-assistant-text.d.ts +7 -0
- package/dist/modes/interactive/split-trailing-assistant-text.d.ts.map +1 -0
- package/dist/modes/interactive/split-trailing-assistant-text.js +19 -0
- package/dist/modes/interactive/split-trailing-assistant-text.js.map +1 -0
- package/dist/senpi +31 -3
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-cjs/index.js +38 -13
- 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 +34 -12
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ConverseCommand.d.ts +29 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/ConverseStreamCommand.d.ts +15 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/commands/CountTokensCommand.d.ts +14 -0
- 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 +119 -1
- 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 +3 -0
- 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 +76 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/dist-types/ts3.4/runtimeConfig.browser.d.ts +70 -72
- 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 +86 -88
- 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 +3 -0
- package/node_modules/@aws-sdk/client-bedrock-runtime/package.json +14 -14
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +1328 -411
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +8 -5
- 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/JsonSettings.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{JsonCodec.js → codec-v1/JsonCodec.js} +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{JsonShapeDeserializer.js → codec-v1/JsonShapeDeserializer.js} +6 -6
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{JsonShapeSerializer.js → codec-v1/JsonShapeSerializer.js} +8 -5
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +103 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +20 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{experimental/BufferJsonShapeDeserializer.js → codec-v2/JsonShapeDeserializer2.js} +38 -18
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/{experimental/ByteJsonShapeSerializer.js → codec-v2/JsonShapeSerializer2.js} +107 -71
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +93 -9
- 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 +9 -6
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +4 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +5 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{JsonCodec.d.ts → codec-v1/JsonCodec.d.ts} +4 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +7 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{JsonShapeDeserializer.d.ts → codec-v1/JsonShapeDeserializer.d.ts} +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{JsonShapeSerializer.d.ts → codec-v1/JsonShapeSerializer.d.ts} +3 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +51 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{experimental/BufferJsonShapeDeserializer.d.ts → codec-v2/JsonShapeDeserializer2.d.ts} +4 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/{experimental/ByteJsonShapeSerializer.d.ts → codec-v2/JsonShapeSerializer2.d.ts} +19 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/api-extractor-type-index.d.ts +4 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/index.d.ts +61 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConfigResolver.d.ts +13 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/AccountIdEndpointModeConstants.d.ts +4 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/NodeAccountIdEndpointModeConfigOptions.d.ts +5 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/account-id-endpoint/index.d.ts +16 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/emitWarningIfUnsupportedVersion.d.ts +4 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +107 -47
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +112 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +107 -48
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/longPollMiddleware.d.ts +13 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-host-header/hostHeaderMiddleware.d.ts +25 -35
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-logger/loggerMiddleware.d.ts +14 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/configuration.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.browser.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/getRecursionDetectionPlugin.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.browser.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.d.ts +2 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-recursion-detection/recursionDetectionMiddleware.native.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/check-features.d.ts +16 -20
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/middleware-user-agent/configurations.d.ts +21 -44
- 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 +2 -5
- 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 +8 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/extensions.d.ts +14 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.browser.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.d.ts +7 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/region-config-resolver/stsRegionDefaultResolver.native.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setCredentialFeature.d.ts +6 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setFeature.d.ts +6 -12
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/setTokenFeature.d.ts +6 -7
- 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 +4 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/parseArn.d.ts +2 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partition.d.ts +28 -38
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-endpoints/lib/aws/partitions.d.ts +647 -638
- 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 +29 -56
- 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 +6 -1
- 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 +12 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/configurations.d.ts +4 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/createUserAgentStringParsingProvider.d.ts +7 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.browser.d.ts +7 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.d.ts +15 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +10 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/crt-availability.d.ts +3 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/defaultUserAgent.d.ts +14 -28
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/getRuntimeUserAgentPair.d.ts +2 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/is-crt-available.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-node/nodeAppIdConfigOptions.d.ts +4 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4ASigner.d.ts +9 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.d.ts +39 -44
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.d.ts +2 -5
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.browser.d.ts +1 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-defaults.d.ts +1 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/clock-skew-node-config.d.ts +4 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/index.d.ts +23 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4AConfig.d.ts +13 -38
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.d.ts +57 -133
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.browser.d.ts +32 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/index.d.ts +32 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.d.ts +1 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.d.ts +1 -6
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getDateHeader.d.ts +2 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.d.ts +1 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +6 -26
- 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 +1 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ConfigurableSerdeContext.d.ts +5 -8
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/ProtocolLib.d.ts +40 -74
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/UnionSerde.d.ts +9 -24
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.d.ts +36 -25
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/coercing-serializers.d.ts +3 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/common.d.ts +5 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +30 -22
- 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 +50 -29
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +52 -36
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/awsExpectUnion.d.ts +1 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +13 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +18 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +27 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +9 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +15 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +39 -0
- 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/jsonReplacer.d.ts +7 -21
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +7 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +2 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +14 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsEc2QueryProtocol.d.ts +18 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/AwsQueryProtocol.d.ts +57 -49
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QuerySerializerSettings.d.ts +7 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/query/QueryShapeSerializer.d.ts +21 -16
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/writeKey.d.ts +1 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/AwsRestXmlProtocol.d.ts +47 -31
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlCodec.d.ts +17 -14
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/XmlShapeDeserializer.d.ts +15 -20
- 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 +4 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/xml/simpleFormatXml.d.ts +1 -6
- 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 +14 -32
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/util/util-format-url/format-url.d.ts +4 -2
- 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/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 +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-es/LoginCredentialsFetcher.js +35 -28
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/LoginCredentialsFetcher.d.ts +1 -0
- package/node_modules/@aws-sdk/credential-provider-login/dist-types/ts3.4/LoginCredentialsFetcher.d.ts +1 -0
- 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 +64 -66
- 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 +68 -70
- 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 +67 -69
- 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 +71 -73
- 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 +64 -66
- 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 +68 -70
- 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 +64 -66
- 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 +68 -70
- 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 +68 -70
- 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 +72 -74
- 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/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 +12 -15
- package/node_modules/@bufbuild/protobuf/dist/commonjs/create.js +199 -162
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-binary.js +321 -153
- package/node_modules/@bufbuild/protobuf/dist/commonjs/from-json.js +601 -303
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/message.js +157 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.d.ts +27 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect-check.js +80 -56
- package/node_modules/@bufbuild/protobuf/dist/commonjs/reflect/reflect.js +3 -80
- package/node_modules/@bufbuild/protobuf/dist/commonjs/registry.js +12 -3
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-binary.js +365 -127
- package/node_modules/@bufbuild/protobuf/dist/commonjs/to-json.js +393 -159
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.d.ts +3 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/base64-encoding.js +40 -8
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.d.ts +37 -19
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/binary-encoding.js +281 -85
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.d.ts +1 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/index.js +4 -1
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.d.ts +19 -2
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/text-encoding.js +47 -13
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.d.ts +4 -4
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wire/varint.js +35 -23
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/json.js +44 -0
- package/node_modules/@bufbuild/protobuf/dist/commonjs/wkt/wrappers.js +12 -12
- package/node_modules/@bufbuild/protobuf/dist/esm/create.js +199 -162
- package/node_modules/@bufbuild/protobuf/dist/esm/from-binary.js +321 -153
- package/node_modules/@bufbuild/protobuf/dist/esm/from-json.js +602 -304
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.d.ts +49 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/message.js +152 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.d.ts +27 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect-check.js +79 -57
- package/node_modules/@bufbuild/protobuf/dist/esm/reflect/reflect.js +1 -78
- package/node_modules/@bufbuild/protobuf/dist/esm/registry.js +12 -3
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.d.ts +4 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/to-binary.js +365 -127
- package/node_modules/@bufbuild/protobuf/dist/esm/to-json.js +393 -159
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.d.ts +3 -1
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/base64-encoding.js +40 -8
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.d.ts +37 -19
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/binary-encoding.js +283 -87
- 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 +19 -2
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/text-encoding.js +46 -13
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.d.ts +4 -4
- package/node_modules/@bufbuild/protobuf/dist/esm/wire/varint.js +35 -23
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.d.ts +28 -0
- package/node_modules/@bufbuild/protobuf/dist/esm/wkt/json.js +41 -0
- 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 +24 -0
- package/node_modules/@code-yeongyu/senpi-codemode/package.json +4 -4
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js +38 -3
- package/node_modules/@earendil-works/pi-agent-core/dist/agent-loop.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.d.ts +8 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js +25 -1
- package/node_modules/@earendil-works/pi-agent-core/dist/assistant-terminal-state.js.map +1 -1
- package/node_modules/@earendil-works/pi-agent-core/package.json +6 -6
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js +284 -209
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-agent.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.d.ts +37 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.js +110 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-conversation-rotation.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-task-args.d.ts +3 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-task-args.d.ts.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-task-args.js +17 -0
- package/node_modules/@earendil-works/pi-ai/dist/api/cursor-task-args.js.map +1 -0
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.js +27 -11
- package/node_modules/@earendil-works/pi-ai/dist/cursor/selection-descriptor.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/.manifest.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/amazon-bedrock.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/baseten.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/huggingface.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode-go.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/opencode.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/openrouter.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/providers/data/vercel-ai-gateway.json +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js +2 -0
- package/node_modules/@earendil-works/pi-ai/dist/tool-call-middleware/index.js.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts +30 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.d.ts.map +1 -1
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js +33 -0
- package/node_modules/@earendil-works/pi-ai/dist/utils/overflow.js.map +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 +1562 -339
- 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 +17 -13
- package/node_modules/@smithy/core/dist-cjs/submodules/schema/index.js +0 -10
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +4 -205
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +1 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/cbor-encode.js +1 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +113 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +103 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +621 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +602 -0
- package/node_modules/@smithy/core/dist-es/submodules/cbor/index.js +5 -1
- 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 +3 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/middleware-content-length/contentLengthMiddleware.js +6 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +8 -5
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/ListSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/MapSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/OperationSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/SimpleSchema.js +0 -2
- package/node_modules/@smithy/core/dist-es/submodules/schema/schemas/StructureSchema.js +0 -2
- package/node_modules/@smithy/core/dist-types/submodules/cbor/CborCodec.d.ts +5 -27
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +2 -2
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeDeserializer.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/CborShapeDeserializer2.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/codec-v2/CborShapeSerializer2.d.ts +35 -0
- package/node_modules/@smithy/core/dist-types/submodules/cbor/index.d.ts +5 -1
- package/node_modules/@smithy/core/dist-types/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +1 -7
- package/node_modules/@smithy/core/dist-types/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +2 -1
- 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 +14 -2
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +7 -2
- 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 +5 -27
- 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/codec-v1/CborShapeDeserializer.d.ts +13 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v1/CborShapeSerializer.d.ts +15 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/CborShapeDeserializer2.d.ts +18 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/codec-v2/CborShapeSerializer2.d.ts +35 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/index.d.ts +5 -1
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/client/smithy-client/extensions/defaultExtensionConfiguration.d.ts +1 -7
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/config/config-resolver/regionConfig/checkRegion.d.ts +2 -1
- 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 +14 -2
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +7 -2
- 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 +4 -11
- package/node_modules/@smithy/credential-provider-imds/package.json +4 -12
- package/node_modules/@smithy/fetch-http-handler/package.json +5 -13
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +9 -2
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +9 -2
- 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 +5 -13
- 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 +4 -12
- package/node_modules/@smithy/types/dist-types/schema/sentinels.d.ts +14 -14
- package/node_modules/@smithy/types/package.json +29 -39
- package/node_modules/@types/node/README.md +1 -1
- package/node_modules/@types/node/child_process.d.ts +0 -1
- 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 +7 -0
- package/node_modules/@types/node/http.d.ts +30 -0
- 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 +2 -1
- package/node_modules/@types/node/process.d.ts +42 -43
- package/node_modules/@types/node/quic.d.ts +1049 -84
- package/node_modules/@types/node/sqlite.d.ts +14 -1
- package/node_modules/@types/node/stream/iter.d.ts +3 -2
- package/node_modules/@types/node/test.d.ts +61 -0
- package/node_modules/@types/node/v8.d.ts +20 -23
- package/package.json +36 -36
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonCodec.d.ts +0 -19
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonShapeSerializer.d.ts +0 -28
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/BufferJsonShapeDeserializer.d.ts +0 -29
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/experimental/ByteJsonShapeSerializer.d.ts +0 -57
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/LICENSE +0 -201
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/README.md +0 -9
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -840
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -9
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -50
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -241
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -136
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -173
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/node-https.js +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +0 -46
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -47
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -46
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -36
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -76
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -9
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +0 -46
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -47
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -46
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -36
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -76
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -9
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
- package/node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler/package.json +0 -64
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/LICENSE +0 -201
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/README.md +0 -9
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-cjs/index.js +0 -840
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/build-abort-error.js +0 -19
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/constants.js +0 -1
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +0 -9
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/http2/ClientHttp2SessionRef.js +0 -50
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/index.js +0 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +0 -241
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-manager.js +0 -136
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-connection-pool.js +0 -46
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +0 -173
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-http2.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/node-https.js +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-connection-timeout.js +0 -36
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-request-timeout.js +0 -21
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-keep-alive.js +0 -22
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +0 -23
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/timing.js +0 -4
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-es/write-request-body.js +0 -63
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/build-abort-error.d.ts +0 -10
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/constants.d.ts +0 -5
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/get-transformed-headers.d.ts +0 -4
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/http2/ClientHttp2SessionRef.d.ts +0 -46
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/index.d.ts +0 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +0 -47
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-manager.d.ts +0 -46
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-connection-pool.d.ts +0 -36
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2-handler.d.ts +0 -76
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-http2.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/node-https.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-connection-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-request-timeout.d.ts +0 -6
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-keep-alive.d.ts +0 -6
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/timing.d.ts +0 -9
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/build-abort-error.d.ts +0 -10
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/constants.d.ts +0 -5
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/get-transformed-headers.d.ts +0 -4
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/http2/ClientHttp2SessionRef.d.ts +0 -46
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/index.d.ts +0 -3
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +0 -47
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-manager.d.ts +0 -46
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-connection-pool.d.ts +0 -36
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2-handler.d.ts +0 -76
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http2.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-https.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-connection-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-request-timeout.d.ts +0 -6
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-keep-alive.d.ts +0 -6
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +0 -2
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/timing.d.ts +0 -9
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/ts3.4/write-request-body.d.ts +0 -12
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/dist-types/write-request-body.d.ts +0 -12
- package/node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler/package.json +0 -64
|
@@ -14,13 +14,18 @@
|
|
|
14
14
|
import { ScalarType, } from "./descriptors.js";
|
|
15
15
|
import { protoInt64 } from "./proto-int64.js";
|
|
16
16
|
import { create } from "./create.js";
|
|
17
|
-
import { reflect } from "./reflect/reflect.js";
|
|
18
17
|
import { FieldError, isFieldError } from "./reflect/error.js";
|
|
19
|
-
import { formatVal } from "./reflect/reflect-check.js";
|
|
18
|
+
import { formatVal, reasonSingular, checkScalarValue, } from "./reflect/reflect-check.js";
|
|
20
19
|
import { protoSnakeCase } from "./reflect/names.js";
|
|
20
|
+
import { scalarZeroValue } from "./reflect/scalar.js";
|
|
21
|
+
import { unsafeLocal } from "./reflect/unsafe.js";
|
|
22
|
+
import { localMessageMapper } from "./reflect/message.js";
|
|
21
23
|
import { base64Decode } from "./wire/base64-encoding.js";
|
|
22
24
|
import { hasCustomJsonRepresentation, isWrapperDesc, anyPack, ListValueSchema, NullValue, StructSchema, ValueSchema, } from "./wkt/index.js";
|
|
23
25
|
import { createExtensionContainer, setExtension } from "./extensions.js";
|
|
26
|
+
import { durationSecondsMax, durationSecondsMin, timestampMsMax, timestampMsMin, } from "./wkt/json.js";
|
|
27
|
+
// bootstrap-inject google.protobuf.FeatureSet.FieldPresence.IMPLICIT: const $name = $number;
|
|
28
|
+
const IMPLICIT = 2;
|
|
24
29
|
function makeReadContext(options) {
|
|
25
30
|
return Object.assign(Object.assign({ ignoreUnknownFields: false, recursionLimit: 100 }, options), { depth: 0 });
|
|
26
31
|
}
|
|
@@ -54,20 +59,9 @@ export function mergeFromJsonString(schema, target, json, options) {
|
|
|
54
59
|
* duplicate-key checking.
|
|
55
60
|
*/
|
|
56
61
|
export function fromJson(schema, json, options) {
|
|
57
|
-
const
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
}
|
|
61
|
-
catch (e) {
|
|
62
|
-
if (isFieldError(e)) {
|
|
63
|
-
// @ts-expect-error we use the ES2022 error CTOR option "cause" for better stack traces
|
|
64
|
-
throw new Error(`cannot decode ${e.field()} from JSON: ${e.message}`, {
|
|
65
|
-
cause: e,
|
|
66
|
-
});
|
|
67
|
-
}
|
|
68
|
-
throw e;
|
|
69
|
-
}
|
|
70
|
-
return msg.message;
|
|
62
|
+
const message = create(schema);
|
|
63
|
+
readMessage(schema, message, json, options);
|
|
64
|
+
return message;
|
|
71
65
|
}
|
|
72
66
|
/**
|
|
73
67
|
* Parse a message from a JSON value, merging fields into the target.
|
|
@@ -82,8 +76,20 @@ export function fromJson(schema, json, options) {
|
|
|
82
76
|
* for strict checking.
|
|
83
77
|
*/
|
|
84
78
|
export function mergeFromJson(schema, target, json, options) {
|
|
79
|
+
if (target.$typeName !== schema.typeName &&
|
|
80
|
+
schema.fields.length > 0) {
|
|
81
|
+
throw new FieldError(schema.fields[0], `cannot use ${schema.fields[0]} with message ${target.$typeName}`, "ForeignFieldError");
|
|
82
|
+
}
|
|
83
|
+
readMessage(schema, target, json, options);
|
|
84
|
+
return target;
|
|
85
|
+
}
|
|
86
|
+
/**
|
|
87
|
+
* Run the compiled decoder for the message, wrapping FieldErrors with the
|
|
88
|
+
* standard error message.
|
|
89
|
+
*/
|
|
90
|
+
function readMessage(schema, message, json, options) {
|
|
85
91
|
try {
|
|
86
|
-
|
|
92
|
+
compiledReader(schema)(message, json, makeReadContext(options));
|
|
87
93
|
}
|
|
88
94
|
catch (e) {
|
|
89
95
|
if (isFieldError(e)) {
|
|
@@ -94,13 +100,14 @@ export function mergeFromJson(schema, target, json, options) {
|
|
|
94
100
|
}
|
|
95
101
|
throw e;
|
|
96
102
|
}
|
|
97
|
-
return target;
|
|
98
103
|
}
|
|
99
104
|
/**
|
|
100
105
|
* Parses an enum value from JSON.
|
|
101
106
|
*/
|
|
102
107
|
export function enumFromJson(descEnum, json) {
|
|
103
|
-
|
|
108
|
+
// With ignoreUnknownFields false, the converter never returns the token
|
|
109
|
+
// for ignored unknown enum values.
|
|
110
|
+
return compileEnumConverter(descEnum)(json, false);
|
|
104
111
|
}
|
|
105
112
|
/**
|
|
106
113
|
* Is the given value a JSON enum value?
|
|
@@ -108,315 +115,646 @@ export function enumFromJson(descEnum, json) {
|
|
|
108
115
|
export function isEnumJson(descEnum, value) {
|
|
109
116
|
return undefined !== descEnum.values.find((v) => v.name === value);
|
|
110
117
|
}
|
|
111
|
-
const
|
|
112
|
-
|
|
113
|
-
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
messageJsonFields.set(desc, jsonNames);
|
|
118
|
+
const compiledReaders = new WeakMap();
|
|
119
|
+
/**
|
|
120
|
+
* Return the compiled decoder for a message, compiling it on first use.
|
|
121
|
+
*/
|
|
122
|
+
function compiledReader(desc) {
|
|
123
|
+
let compiled = compiledReaders.get(desc);
|
|
124
|
+
if (compiled === undefined) {
|
|
125
|
+
compiled = compileMessage(desc);
|
|
120
126
|
}
|
|
121
|
-
return
|
|
127
|
+
return compiled;
|
|
122
128
|
}
|
|
123
|
-
function
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
ctx
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
if (json == null || Array.isArray(json) || typeof json != "object") {
|
|
133
|
-
throw new Error(`cannot decode ${msg.desc} from JSON: ${formatVal(json)}`);
|
|
134
|
-
}
|
|
135
|
-
const oneofSeen = new Map();
|
|
136
|
-
const fieldSeen = new Set();
|
|
137
|
-
for (const [jsonKey, jsonValue] of Object.entries(json)) {
|
|
138
|
-
const field = getJsonField(msg.desc, jsonKey);
|
|
139
|
-
if (field) {
|
|
140
|
-
if (fieldSeen.has(field)) {
|
|
141
|
-
// The same field may be set by its proto name and its JSON name, or by
|
|
142
|
-
// a duplicate or unicode-escaped key that JSON.parse already collapsed.
|
|
143
|
-
// Checked before the null-skip below so that a null entry still counts.
|
|
144
|
-
throw new FieldError(field, "set multiple times");
|
|
129
|
+
function compileMessage(desc) {
|
|
130
|
+
const descString = String(desc);
|
|
131
|
+
const readWkt = compileWkt(desc);
|
|
132
|
+
if (readWkt !== undefined) {
|
|
133
|
+
// All message decoders count against the recursion limit, including
|
|
134
|
+
// well-known types with a custom JSON representation.
|
|
135
|
+
const compiled = (message, json, ctx) => {
|
|
136
|
+
if (++ctx.depth > ctx.recursionLimit) {
|
|
137
|
+
throw new Error(`cannot decode ${descString} from JSON: maximum recursion depth of ${ctx.recursionLimit} reached`);
|
|
145
138
|
}
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
139
|
+
readWkt(message, json, ctx);
|
|
140
|
+
ctx.depth--;
|
|
141
|
+
};
|
|
142
|
+
compiledReaders.set(desc, compiled);
|
|
143
|
+
return compiled;
|
|
144
|
+
}
|
|
145
|
+
const typeName = desc.typeName;
|
|
146
|
+
// Fields are looked up by their proto name and their JSON name.
|
|
147
|
+
const fieldsByJsonKey = new Map();
|
|
148
|
+
const compiled = (message, json, ctx) => {
|
|
149
|
+
var _a;
|
|
150
|
+
if (++ctx.depth > ctx.recursionLimit) {
|
|
151
|
+
throw new Error(`cannot decode ${descString} from JSON: maximum recursion depth of ${ctx.recursionLimit} reached`);
|
|
152
|
+
}
|
|
153
|
+
if (json == null || Array.isArray(json) || typeof json != "object") {
|
|
154
|
+
throw new Error(`cannot decode ${descString} from JSON: ${formatVal(json)}`);
|
|
155
|
+
}
|
|
156
|
+
const oneofSeen = new Map();
|
|
157
|
+
const fieldSeen = new Set();
|
|
158
|
+
const jsonKeys = Object.keys(json);
|
|
159
|
+
for (let i = 0; i < jsonKeys.length; i++) {
|
|
160
|
+
const jsonKey = jsonKeys[i];
|
|
161
|
+
const jsonValue = json[jsonKey];
|
|
162
|
+
const entry = fieldsByJsonKey.get(jsonKey);
|
|
163
|
+
if (entry !== undefined) {
|
|
164
|
+
const field = entry.field;
|
|
165
|
+
if (fieldSeen.has(field)) {
|
|
166
|
+
// The same field may be set by its proto name and its JSON name, or by
|
|
167
|
+
// a duplicate or unicode-escaped key that JSON.parse already collapsed.
|
|
168
|
+
// Checked before the null-skip below so that a null entry still counts.
|
|
169
|
+
throw new FieldError(field, "set multiple times");
|
|
170
|
+
}
|
|
171
|
+
fieldSeen.add(field);
|
|
172
|
+
if (entry.oneofScalarNullSkip && jsonValue === null) {
|
|
173
|
+
continue;
|
|
174
|
+
}
|
|
175
|
+
if (entry.oneof) {
|
|
176
|
+
const seen = oneofSeen.get(entry.oneof);
|
|
177
|
+
if (seen !== undefined) {
|
|
178
|
+
throw new FieldError(entry.oneof, `oneof set multiple times by ${seen.name} and ${field.name}`);
|
|
179
|
+
}
|
|
180
|
+
oneofSeen.set(entry.oneof, field);
|
|
181
|
+
}
|
|
182
|
+
entry.read(message, jsonValue, ctx);
|
|
150
183
|
}
|
|
151
|
-
|
|
152
|
-
const
|
|
153
|
-
|
|
154
|
-
|
|
184
|
+
else {
|
|
185
|
+
const extension = jsonKey.startsWith("[") && jsonKey.endsWith("]")
|
|
186
|
+
? (_a = ctx.registry) === null || _a === void 0 ? void 0 : _a.getExtension(jsonKey.substring(1, jsonKey.length - 1))
|
|
187
|
+
: undefined;
|
|
188
|
+
if ((extension === null || extension === void 0 ? void 0 : extension.extendee.typeName) == typeName) {
|
|
189
|
+
const [container, field, get] = createExtensionContainer(extension);
|
|
190
|
+
compileFieldReader(field)(container[unsafeLocal], jsonValue, ctx);
|
|
191
|
+
setExtension(message, extension, get());
|
|
192
|
+
}
|
|
193
|
+
if (extension === undefined && !ctx.ignoreUnknownFields) {
|
|
194
|
+
throw new Error(`cannot decode ${descString} from JSON: key "${jsonKey}" is unknown`);
|
|
155
195
|
}
|
|
156
|
-
oneofSeen.set(field.oneof, field);
|
|
157
196
|
}
|
|
158
|
-
readField(msg, field, jsonValue, ctx);
|
|
159
197
|
}
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
198
|
+
ctx.depth--;
|
|
199
|
+
};
|
|
200
|
+
// Register before compiling fields, so that recursive message types
|
|
201
|
+
// resolve to this instance instead of compiling endlessly.
|
|
202
|
+
compiledReaders.set(desc, compiled);
|
|
203
|
+
for (const field of desc.fields) {
|
|
204
|
+
const entry = {
|
|
205
|
+
read: compileFieldReader(field),
|
|
206
|
+
field,
|
|
207
|
+
oneof: field.oneof,
|
|
208
|
+
oneofScalarNullSkip: field.oneof !== undefined && field.fieldKind == "scalar",
|
|
209
|
+
};
|
|
210
|
+
fieldsByJsonKey.set(field.name, entry).set(field.jsonName, entry);
|
|
211
|
+
}
|
|
212
|
+
return compiled;
|
|
213
|
+
}
|
|
214
|
+
/**
|
|
215
|
+
* Compile a decoder for a well-known type with a custom JSON representation,
|
|
216
|
+
* or return undefined for other messages. The recursion limit is enforced by
|
|
217
|
+
* the caller.
|
|
218
|
+
*/
|
|
219
|
+
function compileWkt(desc) {
|
|
220
|
+
if (!desc.typeName.startsWith("google.protobuf.")) {
|
|
221
|
+
return undefined;
|
|
222
|
+
}
|
|
223
|
+
switch (desc.typeName) {
|
|
224
|
+
case "google.protobuf.Any":
|
|
225
|
+
return (message, json, ctx) => anyFromJson(message, json, ctx);
|
|
226
|
+
case "google.protobuf.Timestamp":
|
|
227
|
+
return (message, json) => timestampFromJson(message, json);
|
|
228
|
+
case "google.protobuf.Duration":
|
|
229
|
+
return (message, json) => durationFromJson(message, json);
|
|
230
|
+
case "google.protobuf.FieldMask":
|
|
231
|
+
return (message, json) => fieldMaskFromJson(message, json);
|
|
232
|
+
case "google.protobuf.Struct":
|
|
233
|
+
return (message, json, ctx) => structFromJson(message, json, ctx);
|
|
234
|
+
case "google.protobuf.Value":
|
|
235
|
+
return (message, json, ctx) => valueFromJson(message, json, ctx);
|
|
236
|
+
case "google.protobuf.ListValue":
|
|
237
|
+
return (message, json, ctx) => listValueFromJson(message, json, ctx);
|
|
238
|
+
default:
|
|
239
|
+
if (isWrapperDesc(desc)) {
|
|
240
|
+
const valueField = desc.fields[0];
|
|
241
|
+
const localName = valueField.localName;
|
|
242
|
+
const scalar = valueField.scalar;
|
|
243
|
+
const longAsString = valueField.longAsString;
|
|
244
|
+
const readScalar = compileScalarConverter(valueField);
|
|
245
|
+
return (message, json) => {
|
|
246
|
+
if (json === null) {
|
|
247
|
+
message[localName] = scalarZeroValue(scalar, longAsString);
|
|
248
|
+
}
|
|
249
|
+
else {
|
|
250
|
+
message[localName] = readScalar(json);
|
|
251
|
+
}
|
|
252
|
+
};
|
|
173
253
|
}
|
|
174
|
-
|
|
254
|
+
return undefined;
|
|
175
255
|
}
|
|
176
|
-
ctx.depth--;
|
|
177
256
|
}
|
|
178
|
-
function
|
|
257
|
+
function compileFieldReader(field) {
|
|
179
258
|
switch (field.fieldKind) {
|
|
180
259
|
case "scalar":
|
|
181
|
-
|
|
182
|
-
break;
|
|
260
|
+
return compileScalarFieldReader(field);
|
|
183
261
|
case "enum":
|
|
184
|
-
|
|
185
|
-
break;
|
|
262
|
+
return compileEnumFieldReader(field);
|
|
186
263
|
case "message":
|
|
187
|
-
|
|
188
|
-
break;
|
|
264
|
+
return compileMessageFieldReader(field);
|
|
189
265
|
case "list":
|
|
190
|
-
|
|
191
|
-
break;
|
|
266
|
+
return compileListFieldReader(field);
|
|
192
267
|
case "map":
|
|
193
|
-
|
|
194
|
-
break;
|
|
268
|
+
return compileMapFieldReader(field);
|
|
195
269
|
}
|
|
196
270
|
}
|
|
197
|
-
function
|
|
198
|
-
|
|
199
|
-
|
|
200
|
-
|
|
201
|
-
|
|
202
|
-
const
|
|
203
|
-
|
|
204
|
-
|
|
271
|
+
function compileScalarFieldReader(field) {
|
|
272
|
+
const readScalar = compileScalarConverter(field);
|
|
273
|
+
const localName = field.localName;
|
|
274
|
+
if (field.oneof) {
|
|
275
|
+
// JSON null for a oneof scalar member is skipped by the message decoder.
|
|
276
|
+
const oneofLocalName = field.oneof.localName;
|
|
277
|
+
return (message, json) => {
|
|
278
|
+
message[oneofLocalName] = {
|
|
279
|
+
case: localName,
|
|
280
|
+
value: readScalar(json),
|
|
281
|
+
};
|
|
282
|
+
};
|
|
205
283
|
}
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
}
|
|
211
|
-
function readMapField(map, json, ctx) {
|
|
212
|
-
if (json === null) {
|
|
213
|
-
return;
|
|
214
|
-
}
|
|
215
|
-
const field = map.field();
|
|
216
|
-
if (typeof json != "object" || Array.isArray(json)) {
|
|
217
|
-
throw new FieldError(field, "expected object, got " + formatVal(json));
|
|
218
|
-
}
|
|
219
|
-
const seen = new Set();
|
|
220
|
-
for (const [jsonMapKey, jsonMapValue] of Object.entries(json)) {
|
|
221
|
-
const key = mapKeyFromJson(field.mapKey, jsonMapKey);
|
|
222
|
-
if (seen.has(key)) {
|
|
223
|
-
throw new FieldError(field, `duplicate map key "${jsonMapKey}"`);
|
|
284
|
+
const clear = compileClear(field);
|
|
285
|
+
return (message, json) => {
|
|
286
|
+
if (json === null) {
|
|
287
|
+
clear(message);
|
|
224
288
|
}
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
if (value !== tokenIgnoredUnknownEnum) {
|
|
228
|
-
map.set(key, value);
|
|
289
|
+
else {
|
|
290
|
+
message[localName] = readScalar(json);
|
|
229
291
|
}
|
|
230
|
-
}
|
|
292
|
+
};
|
|
231
293
|
}
|
|
232
|
-
|
|
233
|
-
|
|
234
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
294
|
+
/**
|
|
295
|
+
* Compile a function that resets the field to unset, mirroring the clear
|
|
296
|
+
* operation of the reflect API for fields that are not part of a oneof.
|
|
297
|
+
*/
|
|
298
|
+
function compileClear(field) {
|
|
299
|
+
const localName = field.localName;
|
|
300
|
+
if (field.presence != IMPLICIT) {
|
|
301
|
+
// Fields with explicit presence have properties on the prototype chain
|
|
302
|
+
// for default / zero values (except for proto3). By deleting their own
|
|
303
|
+
// property, the field is reset.
|
|
304
|
+
return (message) => {
|
|
305
|
+
delete message[localName];
|
|
306
|
+
};
|
|
239
307
|
}
|
|
240
|
-
|
|
241
|
-
const
|
|
242
|
-
|
|
243
|
-
|
|
244
|
-
}
|
|
308
|
+
if (field.fieldKind == "enum") {
|
|
309
|
+
const zero = field.enum.values[0].number;
|
|
310
|
+
return (message) => {
|
|
311
|
+
message[localName] = zero;
|
|
312
|
+
};
|
|
245
313
|
}
|
|
314
|
+
const scalar = field.scalar;
|
|
315
|
+
const longAsString = field.longAsString;
|
|
316
|
+
return (message) => {
|
|
317
|
+
message[localName] = scalarZeroValue(scalar, longAsString);
|
|
318
|
+
};
|
|
246
319
|
}
|
|
247
|
-
function
|
|
248
|
-
|
|
249
|
-
|
|
250
|
-
|
|
320
|
+
function compileEnumFieldReader(field) {
|
|
321
|
+
const readEnumValue = compileEnumConverter(field.enum);
|
|
322
|
+
const checkEnum = compileEnumCheck(field.enum);
|
|
323
|
+
const localName = field.localName;
|
|
324
|
+
// Fields with enum google.protobuf.NullValue permit a Protobuf-serializable
|
|
325
|
+
// null; for all other enums, JSON null resets the field.
|
|
326
|
+
const nullResets = field.enum.typeName != "google.protobuf.NullValue";
|
|
327
|
+
if (field.oneof) {
|
|
328
|
+
const oneofLocalName = field.oneof.localName;
|
|
329
|
+
return (message, json, ctx) => {
|
|
330
|
+
if (json === null && nullResets) {
|
|
331
|
+
const oneof = message[oneofLocalName];
|
|
332
|
+
if (oneof.case === localName) {
|
|
333
|
+
message[oneofLocalName] = { case: undefined };
|
|
334
|
+
}
|
|
335
|
+
return;
|
|
336
|
+
}
|
|
337
|
+
const value = readEnumValue(json, ctx.ignoreUnknownFields);
|
|
338
|
+
if (value === tokenIgnoredUnknownEnum) {
|
|
339
|
+
return;
|
|
340
|
+
}
|
|
341
|
+
const check = checkEnum(value);
|
|
342
|
+
if (check !== true) {
|
|
343
|
+
throw new FieldError(field, reasonSingular(field, value, check));
|
|
344
|
+
}
|
|
345
|
+
message[oneofLocalName] = { case: localName, value };
|
|
346
|
+
};
|
|
251
347
|
}
|
|
252
|
-
const
|
|
253
|
-
|
|
254
|
-
|
|
348
|
+
const clear = compileClear(field);
|
|
349
|
+
return (message, json, ctx) => {
|
|
350
|
+
if (json === null && nullResets) {
|
|
351
|
+
clear(message);
|
|
352
|
+
return;
|
|
353
|
+
}
|
|
354
|
+
const value = readEnumValue(json, ctx.ignoreUnknownFields);
|
|
355
|
+
if (value === tokenIgnoredUnknownEnum) {
|
|
356
|
+
return;
|
|
357
|
+
}
|
|
358
|
+
const check = checkEnum(value);
|
|
359
|
+
if (check !== true) {
|
|
360
|
+
throw new FieldError(field, reasonSingular(field, value, check));
|
|
361
|
+
}
|
|
362
|
+
message[localName] = value;
|
|
363
|
+
};
|
|
255
364
|
}
|
|
256
|
-
function
|
|
257
|
-
|
|
258
|
-
|
|
259
|
-
|
|
260
|
-
|
|
261
|
-
|
|
262
|
-
|
|
263
|
-
|
|
365
|
+
function compileMessageFieldReader(field) {
|
|
366
|
+
const localName = field.localName;
|
|
367
|
+
const { toMessage, toLocal } = localMessageMapper(field);
|
|
368
|
+
const readChild = compiledReader(field.message);
|
|
369
|
+
// Fields with message google.protobuf.Value permit a Protobuf-serializable
|
|
370
|
+
// null; for all other messages, JSON null resets the field.
|
|
371
|
+
const nullResets = field.message.typeName != "google.protobuf.Value";
|
|
372
|
+
if (field.oneof) {
|
|
373
|
+
const oneofLocalName = field.oneof.localName;
|
|
374
|
+
return (message, json, ctx) => {
|
|
375
|
+
const oneof = message[oneofLocalName];
|
|
376
|
+
if (json === null && nullResets) {
|
|
377
|
+
if (oneof.case === localName) {
|
|
378
|
+
message[oneofLocalName] = { case: undefined };
|
|
379
|
+
}
|
|
380
|
+
return;
|
|
381
|
+
}
|
|
382
|
+
const child = toMessage(oneof.case === localName ? oneof.value : undefined);
|
|
383
|
+
readChild(child, json, ctx);
|
|
384
|
+
message[oneofLocalName] = { case: localName, value: toLocal(child) };
|
|
385
|
+
};
|
|
264
386
|
}
|
|
387
|
+
return (message, json, ctx) => {
|
|
388
|
+
if (json === null && nullResets) {
|
|
389
|
+
delete message[localName];
|
|
390
|
+
return;
|
|
391
|
+
}
|
|
392
|
+
const child = toMessage(message[localName]);
|
|
393
|
+
readChild(child, json, ctx);
|
|
394
|
+
message[localName] = toLocal(child);
|
|
395
|
+
};
|
|
265
396
|
}
|
|
266
|
-
function
|
|
267
|
-
|
|
268
|
-
|
|
269
|
-
|
|
270
|
-
|
|
271
|
-
|
|
272
|
-
|
|
397
|
+
function compileListFieldReader(field) {
|
|
398
|
+
const localName = field.localName;
|
|
399
|
+
const readItem = compileListItemReader(field);
|
|
400
|
+
return (message, json, ctx) => {
|
|
401
|
+
if (json === null) {
|
|
402
|
+
return;
|
|
403
|
+
}
|
|
404
|
+
if (!Array.isArray(json)) {
|
|
405
|
+
throw new FieldError(field, "expected Array, got " + formatVal(json));
|
|
406
|
+
}
|
|
407
|
+
const items = message[localName];
|
|
408
|
+
for (let i = 0; i < json.length; i++) {
|
|
409
|
+
const value = readItem(json[i], ctx, items.length);
|
|
410
|
+
if (value !== tokenIgnoredUnknownEnum) {
|
|
411
|
+
items.push(value);
|
|
412
|
+
}
|
|
413
|
+
}
|
|
414
|
+
};
|
|
273
415
|
}
|
|
274
416
|
/**
|
|
275
|
-
*
|
|
276
|
-
*
|
|
277
|
-
* For this to be true, the value must be a JSON null and the field must not
|
|
278
|
-
* permit a present, Protobuf-serializable null.
|
|
279
|
-
*
|
|
280
|
-
* Only message google.protobuf.Value and enum google.protobuf.NullValue fields
|
|
281
|
-
* permit Protobuf-serializable nulls.
|
|
282
|
-
*
|
|
283
|
-
* Note that field-resetting sentinel nulls are not permitted in lists and maps.
|
|
417
|
+
* Compile a decoder for a list item. The index is only used in errors, and
|
|
418
|
+
* accounts for previously merged items.
|
|
284
419
|
*/
|
|
285
|
-
function
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
420
|
+
function compileListItemReader(field) {
|
|
421
|
+
switch (field.listKind) {
|
|
422
|
+
case "scalar": {
|
|
423
|
+
const parseScalar = compileScalarParse(field);
|
|
424
|
+
const checkValue = checkScalarValue(field.scalar);
|
|
425
|
+
const toLocal = compileScalarToLocal(field);
|
|
426
|
+
return (json, ctx, index) => {
|
|
427
|
+
if (json === null) {
|
|
428
|
+
throw new FieldError(field, "list item must not be null");
|
|
429
|
+
}
|
|
430
|
+
const value = parseScalar(json);
|
|
431
|
+
const check = checkValue(value);
|
|
432
|
+
if (check !== true) {
|
|
433
|
+
throw new FieldError(field, `list item #${index + 1}: ${reasonSingular(field, value, check)}`);
|
|
434
|
+
}
|
|
435
|
+
return toLocal(value);
|
|
436
|
+
};
|
|
437
|
+
}
|
|
438
|
+
case "enum": {
|
|
439
|
+
const readEnumValue = compileEnumConverter(field.enum);
|
|
440
|
+
const checkEnum = compileEnumCheck(field.enum);
|
|
441
|
+
const nullResets = field.enum.typeName != "google.protobuf.NullValue";
|
|
442
|
+
return (json, ctx, index) => {
|
|
443
|
+
if (json === null && nullResets) {
|
|
444
|
+
throw new FieldError(field, "list item must not be null");
|
|
445
|
+
}
|
|
446
|
+
const value = readEnumValue(json, ctx.ignoreUnknownFields);
|
|
447
|
+
if (value === tokenIgnoredUnknownEnum) {
|
|
448
|
+
return value;
|
|
449
|
+
}
|
|
450
|
+
const check = checkEnum(value);
|
|
451
|
+
if (check !== true) {
|
|
452
|
+
throw new FieldError(field, `list item #${index + 1}: ${reasonSingular(field, value, check)}`);
|
|
453
|
+
}
|
|
454
|
+
return value;
|
|
455
|
+
};
|
|
456
|
+
}
|
|
457
|
+
case "message": {
|
|
458
|
+
const { toMessage, toLocal } = localMessageMapper(field);
|
|
459
|
+
const readChild = compiledReader(field.message);
|
|
460
|
+
const nullResets = field.message.typeName != "google.protobuf.Value";
|
|
461
|
+
return (json, ctx) => {
|
|
462
|
+
if (json === null && nullResets) {
|
|
463
|
+
throw new FieldError(field, "list item must not be null");
|
|
464
|
+
}
|
|
465
|
+
const child = toMessage(undefined);
|
|
466
|
+
readChild(child, json, ctx);
|
|
467
|
+
return toLocal(child);
|
|
468
|
+
};
|
|
469
|
+
}
|
|
470
|
+
}
|
|
290
471
|
}
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
472
|
+
function compileMapFieldReader(field) {
|
|
473
|
+
const localName = field.localName;
|
|
474
|
+
const mapKey = field.mapKey;
|
|
475
|
+
const parseMapKey = compileMapKeyParse(mapKey);
|
|
476
|
+
const checkMapKey = checkScalarValue(mapKey);
|
|
477
|
+
let parseValue;
|
|
478
|
+
// Additional validation for scalar and enum values, matching the checks
|
|
479
|
+
// of the reflect API. Message values need no validation.
|
|
480
|
+
let checkValue;
|
|
481
|
+
let toLocalValue = (value) => value;
|
|
482
|
+
// Fields with google.protobuf.Value or google.protobuf.NullValue values
|
|
483
|
+
// permit a Protobuf-serializable null.
|
|
484
|
+
let nullResets = true;
|
|
485
|
+
switch (field.mapKind) {
|
|
486
|
+
case "scalar": {
|
|
487
|
+
parseValue = compileScalarParse(field);
|
|
488
|
+
checkValue = checkScalarValue(field.scalar);
|
|
489
|
+
toLocalValue = compileScalarToLocal(field);
|
|
490
|
+
break;
|
|
491
|
+
}
|
|
492
|
+
case "enum": {
|
|
493
|
+
const readEnumValue = compileEnumConverter(field.enum);
|
|
494
|
+
parseValue = (json, ctx) => readEnumValue(json, ctx.ignoreUnknownFields);
|
|
495
|
+
checkValue = compileEnumCheck(field.enum);
|
|
496
|
+
nullResets = field.enum.typeName != "google.protobuf.NullValue";
|
|
497
|
+
break;
|
|
498
|
+
}
|
|
499
|
+
case "message": {
|
|
500
|
+
const { toMessage, toLocal } = localMessageMapper(field);
|
|
501
|
+
const readChild = compiledReader(field.message);
|
|
502
|
+
nullResets = field.message.typeName != "google.protobuf.Value";
|
|
503
|
+
parseValue = (json, ctx) => {
|
|
504
|
+
const child = toMessage(undefined);
|
|
505
|
+
readChild(child, json, ctx);
|
|
506
|
+
return toLocal(child);
|
|
507
|
+
};
|
|
508
|
+
break;
|
|
509
|
+
}
|
|
295
510
|
}
|
|
296
|
-
|
|
297
|
-
|
|
298
|
-
|
|
299
|
-
|
|
511
|
+
return (message, json, ctx) => {
|
|
512
|
+
if (json === null) {
|
|
513
|
+
return;
|
|
514
|
+
}
|
|
515
|
+
if (typeof json != "object" || Array.isArray(json)) {
|
|
516
|
+
throw new FieldError(field, "expected object, got " + formatVal(json));
|
|
517
|
+
}
|
|
518
|
+
const record = message[localName];
|
|
519
|
+
const seen = new Set();
|
|
520
|
+
const jsonMapKeys = Object.keys(json);
|
|
521
|
+
for (let i = 0; i < jsonMapKeys.length; i++) {
|
|
522
|
+
const jsonMapKey = jsonMapKeys[i];
|
|
523
|
+
const jsonMapValue = json[jsonMapKey];
|
|
524
|
+
const key = parseMapKey(jsonMapKey);
|
|
525
|
+
if (seen.has(key)) {
|
|
526
|
+
throw new FieldError(field, `duplicate map key "${jsonMapKey}"`);
|
|
300
527
|
}
|
|
301
|
-
|
|
302
|
-
|
|
303
|
-
|
|
304
|
-
if (value !== undefined) {
|
|
305
|
-
return value.number;
|
|
528
|
+
seen.add(key);
|
|
529
|
+
if (jsonMapValue === null && nullResets) {
|
|
530
|
+
throw new FieldError(field, "map value must not be null");
|
|
306
531
|
}
|
|
307
|
-
|
|
308
|
-
|
|
532
|
+
const value = parseValue(jsonMapValue, ctx);
|
|
533
|
+
if (value === tokenIgnoredUnknownEnum) {
|
|
534
|
+
continue;
|
|
309
535
|
}
|
|
310
|
-
|
|
536
|
+
const checkKey = checkMapKey(key);
|
|
537
|
+
if (checkKey !== true) {
|
|
538
|
+
throw new FieldError(field, `invalid map key: ${reasonSingular({ scalar: mapKey }, key, checkKey)}`);
|
|
539
|
+
}
|
|
540
|
+
if (checkValue !== undefined) {
|
|
541
|
+
const check = checkValue(value);
|
|
542
|
+
if (check !== true) {
|
|
543
|
+
throw new FieldError(field, `map entry ${formatVal(key)}: ${reasonSingular(field, value, check)}`);
|
|
544
|
+
}
|
|
545
|
+
}
|
|
546
|
+
// Object property keys are always strings or symbols. Assigning with a
|
|
547
|
+
// boolean, number, or bigint key implicitly converts it to a string.
|
|
548
|
+
record[key] = toLocalValue(value);
|
|
549
|
+
}
|
|
550
|
+
};
|
|
551
|
+
}
|
|
552
|
+
const tokenIgnoredUnknownEnum = Symbol();
|
|
553
|
+
/**
|
|
554
|
+
* Compile a converter from a JSON value to an enum value. JSON null returns
|
|
555
|
+
* the enum's first value. With ignoreUnknownFields false, unknown string
|
|
556
|
+
* values raise an error; with true, they return tokenIgnoredUnknownEnum.
|
|
557
|
+
* The value is not checked against the enum's values, see compileEnumCheck.
|
|
558
|
+
*/
|
|
559
|
+
function compileEnumConverter(desc) {
|
|
560
|
+
const zero = desc.values[0].number;
|
|
561
|
+
const values = desc.values;
|
|
562
|
+
return (json, ignoreUnknownFields) => {
|
|
563
|
+
if (json === null) {
|
|
564
|
+
return zero;
|
|
565
|
+
}
|
|
566
|
+
switch (typeof json) {
|
|
567
|
+
case "number":
|
|
568
|
+
if (Number.isInteger(json)) {
|
|
569
|
+
return json;
|
|
570
|
+
}
|
|
571
|
+
break;
|
|
572
|
+
case "string": {
|
|
573
|
+
const value = values.find((ev) => ev.name === json);
|
|
574
|
+
if (value !== undefined) {
|
|
575
|
+
return value.number;
|
|
576
|
+
}
|
|
577
|
+
if (ignoreUnknownFields) {
|
|
578
|
+
return tokenIgnoredUnknownEnum;
|
|
579
|
+
}
|
|
580
|
+
break;
|
|
581
|
+
}
|
|
582
|
+
}
|
|
583
|
+
throw new Error(`cannot decode ${desc} from JSON: ${formatVal(json)}`);
|
|
584
|
+
};
|
|
585
|
+
}
|
|
586
|
+
/**
|
|
587
|
+
* Compile the check that the reflect API performs for enum values: open
|
|
588
|
+
* enums accept any int32 value, closed enums accept only declared values.
|
|
589
|
+
*/
|
|
590
|
+
function compileEnumCheck(desc) {
|
|
591
|
+
if (desc.open) {
|
|
592
|
+
return checkScalarValue(ScalarType.INT32);
|
|
311
593
|
}
|
|
312
|
-
|
|
594
|
+
const values = desc.values;
|
|
595
|
+
return (value) => values.some((v) => v.number === value);
|
|
313
596
|
}
|
|
314
597
|
/**
|
|
315
|
-
*
|
|
316
|
-
*
|
|
317
|
-
*
|
|
318
|
-
|
|
598
|
+
* Compile a converter from a JSON value to the local representation of a
|
|
599
|
+
* scalar, fusing JSON parsing, the validation of the reflect API, and the
|
|
600
|
+
* conversion to the local 64-bit integer representation.
|
|
601
|
+
*/
|
|
602
|
+
function compileScalarConverter(field) {
|
|
603
|
+
const parseScalar = compileScalarParse(field);
|
|
604
|
+
const checkValue = checkScalarValue(field.scalar);
|
|
605
|
+
const toLocal = compileScalarToLocal(field);
|
|
606
|
+
return (json) => {
|
|
607
|
+
const value = parseScalar(json);
|
|
608
|
+
const check = checkValue(value);
|
|
609
|
+
if (check !== true) {
|
|
610
|
+
throw new FieldError(field, reasonSingular(field, value, check));
|
|
611
|
+
}
|
|
612
|
+
return toLocal(value);
|
|
613
|
+
};
|
|
614
|
+
}
|
|
615
|
+
/**
|
|
616
|
+
* Compile the JSON-specific parsing step for a scalar value: the special
|
|
617
|
+
* string values of float and double, string-encoded numbers, and base64
|
|
618
|
+
* bytes. Returns the input unchanged if the JSON value cannot be converted;
|
|
619
|
+
* the validation step raises an error for it.
|
|
319
620
|
*/
|
|
320
|
-
function
|
|
321
|
-
// int64, sfixed64, sint64, fixed64, uint64: Reflect supports string and number.
|
|
322
|
-
// string, bool: Supported by reflect.
|
|
621
|
+
function compileScalarParse(field) {
|
|
323
622
|
switch (field.scalar) {
|
|
324
623
|
// float, double: JSON value will be a number or one of the special string values "NaN", "Infinity", and "-Infinity".
|
|
325
624
|
// Either numbers or strings are accepted. Exponent notation is also accepted.
|
|
326
625
|
case ScalarType.DOUBLE:
|
|
327
626
|
case ScalarType.FLOAT:
|
|
328
|
-
|
|
329
|
-
|
|
330
|
-
|
|
331
|
-
|
|
332
|
-
|
|
333
|
-
|
|
334
|
-
|
|
335
|
-
if (
|
|
336
|
-
|
|
337
|
-
|
|
338
|
-
|
|
339
|
-
|
|
340
|
-
|
|
341
|
-
|
|
342
|
-
|
|
343
|
-
|
|
344
|
-
|
|
345
|
-
if (typeof json == "string") {
|
|
346
|
-
if (json === "") {
|
|
347
|
-
// empty string is not a number
|
|
348
|
-
break;
|
|
349
|
-
}
|
|
350
|
-
if (json.trim().length !== json.length) {
|
|
351
|
-
// extra whitespace
|
|
352
|
-
break;
|
|
627
|
+
return (json) => {
|
|
628
|
+
if (json === "NaN")
|
|
629
|
+
return NaN;
|
|
630
|
+
if (json === "Infinity")
|
|
631
|
+
return Number.POSITIVE_INFINITY;
|
|
632
|
+
if (json === "-Infinity")
|
|
633
|
+
return Number.NEGATIVE_INFINITY;
|
|
634
|
+
if (typeof json == "number") {
|
|
635
|
+
if (Number.isNaN(json)) {
|
|
636
|
+
// NaN must be encoded with string constants
|
|
637
|
+
throw new FieldError(field, "unexpected NaN number");
|
|
638
|
+
}
|
|
639
|
+
if (!Number.isFinite(json)) {
|
|
640
|
+
// Infinity must be encoded with string constants
|
|
641
|
+
throw new FieldError(field, "unexpected infinite number");
|
|
642
|
+
}
|
|
643
|
+
return json;
|
|
353
644
|
}
|
|
354
|
-
|
|
355
|
-
|
|
356
|
-
|
|
357
|
-
|
|
645
|
+
if (typeof json == "string") {
|
|
646
|
+
if (json === "") {
|
|
647
|
+
// empty string is not a number
|
|
648
|
+
return json;
|
|
649
|
+
}
|
|
650
|
+
if (json.trim().length !== json.length) {
|
|
651
|
+
// extra whitespace
|
|
652
|
+
return json;
|
|
653
|
+
}
|
|
654
|
+
const float = Number(json);
|
|
655
|
+
if (!Number.isFinite(float)) {
|
|
656
|
+
// Infinity and NaN must be encoded with string constants
|
|
657
|
+
return json;
|
|
658
|
+
}
|
|
659
|
+
return float;
|
|
358
660
|
}
|
|
359
|
-
return
|
|
360
|
-
}
|
|
361
|
-
break;
|
|
661
|
+
return json;
|
|
662
|
+
};
|
|
362
663
|
// int32, fixed32, uint32: JSON value will be a decimal number. Either numbers or strings are accepted.
|
|
363
664
|
case ScalarType.INT32:
|
|
364
665
|
case ScalarType.FIXED32:
|
|
365
666
|
case ScalarType.SFIXED32:
|
|
366
667
|
case ScalarType.SINT32:
|
|
367
668
|
case ScalarType.UINT32:
|
|
368
|
-
return int32FromJson
|
|
669
|
+
return int32FromJson;
|
|
369
670
|
// bytes: JSON value will be the data encoded as a string using standard base64 encoding with paddings.
|
|
370
671
|
// Either standard or URL-safe base64 encoding with/without paddings are accepted.
|
|
371
672
|
case ScalarType.BYTES:
|
|
372
|
-
|
|
373
|
-
if (json
|
|
374
|
-
|
|
375
|
-
|
|
376
|
-
|
|
377
|
-
|
|
378
|
-
|
|
379
|
-
|
|
380
|
-
|
|
381
|
-
|
|
673
|
+
return (json) => {
|
|
674
|
+
if (typeof json == "string") {
|
|
675
|
+
if (json === "") {
|
|
676
|
+
return new Uint8Array(0);
|
|
677
|
+
}
|
|
678
|
+
try {
|
|
679
|
+
return base64Decode(json);
|
|
680
|
+
}
|
|
681
|
+
catch (e) {
|
|
682
|
+
const message = e instanceof Error ? e.message : String(e);
|
|
683
|
+
throw new FieldError(field, message);
|
|
684
|
+
}
|
|
382
685
|
}
|
|
686
|
+
return json;
|
|
687
|
+
};
|
|
688
|
+
// int64, sfixed64, sint64, fixed64, uint64: The validation step accepts
|
|
689
|
+
// string and number. string, bool: no conversion.
|
|
690
|
+
default:
|
|
691
|
+
return (json) => json;
|
|
692
|
+
}
|
|
693
|
+
}
|
|
694
|
+
/**
|
|
695
|
+
* Compile the conversion of a validated scalar value to its local
|
|
696
|
+
* representation: 64-bit integers become bigint, or string with the
|
|
697
|
+
* longAsString option.
|
|
698
|
+
*/
|
|
699
|
+
function compileScalarToLocal(field) {
|
|
700
|
+
const longAsString = field.fieldKind !== "map" && field.longAsString;
|
|
701
|
+
switch (field.scalar) {
|
|
702
|
+
case ScalarType.INT64:
|
|
703
|
+
case ScalarType.SFIXED64:
|
|
704
|
+
case ScalarType.SINT64:
|
|
705
|
+
if (longAsString) {
|
|
706
|
+
return (value) => String(value);
|
|
383
707
|
}
|
|
384
|
-
|
|
708
|
+
return (value) => typeof value == "string" || typeof value == "number"
|
|
709
|
+
? protoInt64.parse(value)
|
|
710
|
+
: value;
|
|
711
|
+
case ScalarType.FIXED64:
|
|
712
|
+
case ScalarType.UINT64:
|
|
713
|
+
if (longAsString) {
|
|
714
|
+
return (value) => String(value);
|
|
715
|
+
}
|
|
716
|
+
return (value) => typeof value == "string" || typeof value == "number"
|
|
717
|
+
? protoInt64.uParse(value)
|
|
718
|
+
: value;
|
|
719
|
+
default:
|
|
720
|
+
return (value) => value;
|
|
385
721
|
}
|
|
386
|
-
return json;
|
|
387
722
|
}
|
|
388
723
|
/**
|
|
389
|
-
*
|
|
390
|
-
* Canonicalizes 64-bit integers given as string, so that "01 and "1" are
|
|
391
|
-
* key, and duplicates can raise an error.
|
|
392
|
-
*
|
|
724
|
+
* Return a parser from a JSON value to a map key for the given key type.
|
|
725
|
+
* Canonicalizes 64-bit integers given as string, so that "01" and "1" are
|
|
726
|
+
* one key, and duplicates can raise an error.
|
|
727
|
+
* The parser returns the input if the JSON value cannot be converted.
|
|
393
728
|
*/
|
|
394
|
-
function
|
|
729
|
+
function compileMapKeyParse(type) {
|
|
395
730
|
switch (type) {
|
|
396
731
|
case ScalarType.BOOL:
|
|
397
|
-
|
|
398
|
-
|
|
399
|
-
|
|
400
|
-
|
|
401
|
-
|
|
402
|
-
|
|
403
|
-
|
|
732
|
+
return (jsonString) => {
|
|
733
|
+
switch (jsonString) {
|
|
734
|
+
case "true":
|
|
735
|
+
return true;
|
|
736
|
+
case "false":
|
|
737
|
+
return false;
|
|
738
|
+
}
|
|
739
|
+
return jsonString;
|
|
740
|
+
};
|
|
404
741
|
case ScalarType.INT32:
|
|
405
742
|
case ScalarType.FIXED32:
|
|
406
743
|
case ScalarType.UINT32:
|
|
407
744
|
case ScalarType.SFIXED32:
|
|
408
745
|
case ScalarType.SINT32:
|
|
409
|
-
return int32FromJson
|
|
746
|
+
return int32FromJson;
|
|
410
747
|
case ScalarType.INT64:
|
|
411
748
|
case ScalarType.SINT64:
|
|
412
749
|
case ScalarType.SFIXED64:
|
|
413
750
|
case ScalarType.UINT64:
|
|
414
751
|
case ScalarType.FIXED64:
|
|
415
|
-
return /^-?0+$/.test(jsonString)
|
|
752
|
+
return (jsonString) => /^-?0+$/.test(jsonString)
|
|
416
753
|
? "0"
|
|
417
754
|
: jsonString.replace(/^(-?)0+(?=\d)/, "$1");
|
|
418
755
|
default:
|
|
419
|
-
|
|
756
|
+
// ScalarType.STRING
|
|
757
|
+
return (jsonString) => jsonString;
|
|
420
758
|
}
|
|
421
759
|
}
|
|
422
760
|
/**
|
|
@@ -536,46 +874,6 @@ function checkDuplicateKeys(jsonString, typeName) {
|
|
|
536
874
|
}
|
|
537
875
|
}
|
|
538
876
|
}
|
|
539
|
-
function tryWktFromJson(msg, jsonValue, ctx) {
|
|
540
|
-
if (!msg.desc.typeName.startsWith("google.protobuf.")) {
|
|
541
|
-
return false;
|
|
542
|
-
}
|
|
543
|
-
switch (msg.desc.typeName) {
|
|
544
|
-
case "google.protobuf.Any":
|
|
545
|
-
anyFromJson(msg.message, jsonValue, ctx);
|
|
546
|
-
return true;
|
|
547
|
-
case "google.protobuf.Timestamp":
|
|
548
|
-
timestampFromJson(msg.message, jsonValue);
|
|
549
|
-
return true;
|
|
550
|
-
case "google.protobuf.Duration":
|
|
551
|
-
durationFromJson(msg.message, jsonValue);
|
|
552
|
-
return true;
|
|
553
|
-
case "google.protobuf.FieldMask":
|
|
554
|
-
fieldMaskFromJson(msg.message, jsonValue);
|
|
555
|
-
return true;
|
|
556
|
-
case "google.protobuf.Struct":
|
|
557
|
-
structFromJson(msg.message, jsonValue, ctx);
|
|
558
|
-
return true;
|
|
559
|
-
case "google.protobuf.Value":
|
|
560
|
-
valueFromJson(msg.message, jsonValue, ctx);
|
|
561
|
-
return true;
|
|
562
|
-
case "google.protobuf.ListValue":
|
|
563
|
-
listValueFromJson(msg.message, jsonValue, ctx);
|
|
564
|
-
return true;
|
|
565
|
-
default:
|
|
566
|
-
if (isWrapperDesc(msg.desc)) {
|
|
567
|
-
const valueField = msg.desc.fields[0];
|
|
568
|
-
if (jsonValue === null) {
|
|
569
|
-
msg.clear(valueField);
|
|
570
|
-
}
|
|
571
|
-
else {
|
|
572
|
-
msg.set(valueField, scalarFromJson(valueField, jsonValue));
|
|
573
|
-
}
|
|
574
|
-
return true;
|
|
575
|
-
}
|
|
576
|
-
return false;
|
|
577
|
-
}
|
|
578
|
-
}
|
|
579
877
|
function anyFromJson(any, json, ctx) {
|
|
580
878
|
var _a;
|
|
581
879
|
if (json === null || Array.isArray(json) || typeof json != "object") {
|
|
@@ -598,19 +896,18 @@ function anyFromJson(any, json, ctx) {
|
|
|
598
896
|
if (!desc) {
|
|
599
897
|
throw new Error(`cannot decode message ${any.$typeName} from JSON: ${typeUrl} is not in the type registry`);
|
|
600
898
|
}
|
|
601
|
-
const
|
|
899
|
+
const message = create(desc);
|
|
602
900
|
if (hasCustomJsonRepresentation(desc) &&
|
|
603
901
|
Object.prototype.hasOwnProperty.call(json, "value")) {
|
|
604
|
-
|
|
605
|
-
readMessage(msg, value, ctx);
|
|
902
|
+
compiledReader(desc)(message, json.value, ctx);
|
|
606
903
|
}
|
|
607
904
|
else {
|
|
608
905
|
const copy = Object.assign({}, json);
|
|
609
906
|
// biome-ignore lint/performance/noDelete: <explanation>
|
|
610
907
|
delete copy["@type"];
|
|
611
|
-
|
|
908
|
+
compiledReader(desc)(message, copy, ctx);
|
|
612
909
|
}
|
|
613
|
-
anyPack(
|
|
910
|
+
anyPack(desc, message, any);
|
|
614
911
|
}
|
|
615
912
|
function timestampFromJson(timestamp, json) {
|
|
616
913
|
if (typeof json !== "string") {
|
|
@@ -626,8 +923,7 @@ function timestampFromJson(timestamp, json) {
|
|
|
626
923
|
if (Number.isNaN(ms)) {
|
|
627
924
|
throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: invalid RFC 3339 string`);
|
|
628
925
|
}
|
|
629
|
-
if (ms <
|
|
630
|
-
ms > Date.parse("9999-12-31T23:59:59Z")) {
|
|
926
|
+
if (ms < timestampMsMin || ms > timestampMsMax) {
|
|
631
927
|
throw new Error(`cannot decode message ${timestamp.$typeName} from JSON: must be from 0001-01-01T00:00:00Z to 9999-12-31T23:59:59Z inclusive`);
|
|
632
928
|
}
|
|
633
929
|
timestamp.seconds = protoInt64.parse(ms / 1000);
|
|
@@ -647,7 +943,7 @@ function durationFromJson(duration, json) {
|
|
|
647
943
|
throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${formatVal(json)}`);
|
|
648
944
|
}
|
|
649
945
|
const longSeconds = Number(match[1]);
|
|
650
|
-
if (longSeconds >
|
|
946
|
+
if (longSeconds > durationSecondsMax || longSeconds < durationSecondsMin) {
|
|
651
947
|
throw new Error(`cannot decode message ${duration.$typeName} from JSON: ${formatVal(json)}`);
|
|
652
948
|
}
|
|
653
949
|
duration.seconds = protoInt64.parse(longSeconds);
|
|
@@ -678,10 +974,12 @@ function structFromJson(struct, json, ctx) {
|
|
|
678
974
|
if (typeof json != "object" || json == null || Array.isArray(json)) {
|
|
679
975
|
throw new Error(`cannot decode message ${struct.$typeName} from JSON ${formatVal(json)}`);
|
|
680
976
|
}
|
|
681
|
-
|
|
682
|
-
|
|
683
|
-
|
|
684
|
-
|
|
977
|
+
const keys = Object.keys(json);
|
|
978
|
+
for (let i = 0; i < keys.length; i++) {
|
|
979
|
+
const key = keys[i];
|
|
980
|
+
const parsedValue = create(ValueSchema);
|
|
981
|
+
valueFromJson(parsedValue, json[key], ctx);
|
|
982
|
+
struct.fields[key] = parsedValue;
|
|
685
983
|
}
|
|
686
984
|
}
|
|
687
985
|
function valueFromJson(value, json, ctx) {
|
|
@@ -723,9 +1021,9 @@ function listValueFromJson(listValue, json, ctx) {
|
|
|
723
1021
|
if (!Array.isArray(json)) {
|
|
724
1022
|
throw new Error(`cannot decode message ${listValue.$typeName} from JSON ${formatVal(json)}`);
|
|
725
1023
|
}
|
|
726
|
-
for (
|
|
1024
|
+
for (let i = 0; i < json.length; i++) {
|
|
727
1025
|
const value = create(ValueSchema);
|
|
728
|
-
valueFromJson(value,
|
|
1026
|
+
valueFromJson(value, json[i], ctx);
|
|
729
1027
|
listValue.values.push(value);
|
|
730
1028
|
}
|
|
731
1029
|
}
|