@cdklabs/cdk-ssm-documents 0.0.72 → 0.0.73
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/.jsii +12 -12
- package/lib/construct/synth-utils.js +1 -1
- package/lib/document/automation-document.js +1 -1
- package/lib/document/command-document.js +1 -1
- package/lib/document/document-builder.js +2 -2
- package/lib/document/ssm-document.js +1 -1
- package/lib/domain/aws-service.js +1 -1
- package/lib/domain/choice.js +1 -1
- package/lib/domain/data-type.js +1 -1
- package/lib/domain/enum/install-action.js +2 -2
- package/lib/domain/enum/install-uninstall-repair.js +2 -2
- package/lib/domain/enum/installation-type.js +2 -2
- package/lib/domain/enum/package-name.js +2 -2
- package/lib/domain/input.js +1 -1
- package/lib/domain/operation.js +1 -1
- package/lib/domain/platform.js +1 -1
- package/lib/domain/precondition.js +1 -1
- package/lib/incident-response/incident-response.js +3 -3
- package/lib/interface/approve-hook.js +2 -2
- package/lib/interface/auth-method.js +3 -3
- package/lib/interface/aws-invoker.js +2 -2
- package/lib/interface/downloadable-content.js +8 -8
- package/lib/interface/environment.js +3 -3
- package/lib/interface/execute-automation-hook/api-execute-automation-hook.js +1 -1
- package/lib/interface/observer.js +1 -1
- package/lib/interface/on-failure.js +6 -6
- package/lib/interface/pause-hook.js +2 -2
- package/lib/interface/run-command-hook/api-run-command-hook.js +1 -1
- package/lib/interface/run-document-location.js +2 -2
- package/lib/interface/sleep-hook.js +2 -2
- package/lib/interface/step-ref.js +1 -1
- package/lib/interface/variables/boolean-variable.js +2 -2
- package/lib/interface/variables/map-list-variable.js +2 -2
- package/lib/interface/variables/number-variable.js +2 -2
- package/lib/interface/variables/secure-string-variable.js +4 -4
- package/lib/interface/variables/string-list-variable.js +2 -2
- package/lib/interface/variables/string-map-variable.js +2 -2
- package/lib/interface/variables/string-variable.js +4 -4
- package/lib/interface/variables/variable.js +2 -2
- package/lib/interface/webhook.js +1 -1
- package/lib/parent-steps/automation/approve-step.js +1 -1
- package/lib/parent-steps/automation/assert-aws-resource-step.js +1 -1
- package/lib/parent-steps/automation/aws-api-step.js +1 -1
- package/lib/parent-steps/automation/branch-step.js +1 -1
- package/lib/parent-steps/automation/change-instance-state-step.js +3 -3
- package/lib/parent-steps/automation/copy-image-step.js +1 -1
- package/lib/parent-steps/automation/create-image-step.js +1 -1
- package/lib/parent-steps/automation/create-stack-step.js +3 -3
- package/lib/parent-steps/automation/create-tags-step.js +3 -3
- package/lib/parent-steps/automation/delete-image-step.js +1 -1
- package/lib/parent-steps/automation/delete-stack-step.js +1 -1
- package/lib/parent-steps/automation/execute-automation-step.js +1 -1
- package/lib/parent-steps/automation/execute-script-step.js +5 -5
- package/lib/parent-steps/automation/execute-state-machine-step.js +1 -1
- package/lib/parent-steps/automation/invoke-lambda-function-step.js +1 -1
- package/lib/parent-steps/automation/invoke-webhook-step.js +1 -1
- package/lib/parent-steps/automation/pause-step.js +1 -1
- package/lib/parent-steps/automation/run-command-step.js +3 -3
- package/lib/parent-steps/automation/run-instance-step.js +1 -1
- package/lib/parent-steps/automation/sleep-step.js +1 -1
- package/lib/parent-steps/automation/update-variable.js +1 -1
- package/lib/parent-steps/automation/wait-for-resource-step.js +1 -1
- package/lib/parent-steps/automation-step.js +1 -1
- package/lib/parent-steps/command/applications-step.js +1 -1
- package/lib/parent-steps/command/configure-docker-step.js +1 -1
- package/lib/parent-steps/command/configure-package-step.js +1 -1
- package/lib/parent-steps/command/domain-join-step.js +1 -1
- package/lib/parent-steps/command/download-content-step.js +1 -1
- package/lib/parent-steps/command/ps-module-step.js +1 -1
- package/lib/parent-steps/command/run-docker-action-step.js +1 -1
- package/lib/parent-steps/command/run-document-step.js +1 -1
- package/lib/parent-steps/command/run-powershell-script-step.js +1 -1
- package/lib/parent-steps/command/run-shell-script-step.js +1 -1
- package/lib/parent-steps/command/software-inventory-step.js +1 -1
- package/lib/parent-steps/command/update-agent-step.js +1 -1
- package/lib/parent-steps/command/update-ssm-agent-step.js +1 -1
- package/lib/parent-steps/command-step.js +1 -1
- package/lib/parent-steps/step.js +1 -1
- package/lib/patterns/automation/composite-step.js +2 -2
- package/lib/patterns/automation/reboot-instance-and-wait.js +1 -1
- package/lib/patterns/automation/string-step.js +1 -1
- package/lib/patterns/document/string-document.js +1 -1
- package/lib/patterns/document/timed-document.js +1 -1
- package/lib/samples/hello-world.js +1 -1
- package/lib/simulation/automation/approve-simulation.js +1 -1
- package/lib/simulation/automation/assert-aws-resource-simulation.js +1 -1
- package/lib/simulation/automation/automation-simulation-base.js +1 -1
- package/lib/simulation/automation/aws-api-simulation.js +1 -1
- package/lib/simulation/automation/branch-simulation.js +1 -1
- package/lib/simulation/automation/change-instance-state-simulation.js +1 -1
- package/lib/simulation/automation/copy-image-simulation.js +1 -1
- package/lib/simulation/automation/create-image-simulation.js +1 -1
- package/lib/simulation/automation/create-stack-simulation.js +1 -1
- package/lib/simulation/automation/create-tags-simulation.js +1 -1
- package/lib/simulation/automation/delete-image-simulation.js +1 -1
- package/lib/simulation/automation/delete-stack-simulation.js +1 -1
- package/lib/simulation/automation/execute-script-simulation.js +1 -1
- package/lib/simulation/automation/execute-state-machine-simulation.js +1 -1
- package/lib/simulation/automation/invoke-lambda-function-simulation.js +1 -1
- package/lib/simulation/automation/invoke-webhook-simulation.js +1 -1
- package/lib/simulation/automation/pause-simulation.js +1 -1
- package/lib/simulation/automation/run-command-simulation.js +1 -1
- package/lib/simulation/automation/run-instance-simulation.js +1 -1
- package/lib/simulation/automation/sleep-simulation.js +1 -1
- package/lib/simulation/automation/update-variable-simulation.js +1 -1
- package/lib/simulation/automation/wait-for-resource-simulation.js +1 -1
- package/lib/simulation/automation-step-simulation.js +1 -1
- package/lib/simulation/command/command-simulation-base.js +1 -1
- package/lib/simulation/command/ps-module-simulation.js +1 -1
- package/lib/simulation/command/run-powershell-script-simulation.js +1 -1
- package/lib/simulation/command/run-shell-script-simulation.js +1 -1
- package/lib/simulation/command-step-simulation.js +1 -1
- package/lib/simulation/document/automation-simulation.js +1 -1
- package/lib/simulation/document/command-simulation.js +1 -1
- package/lib/simulation/simulation.js +1 -1
- package/node_modules/@aws-sdk/checksums/package.json +3 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-es/models/enums.js +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/commands/DescribeChangeSetCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/models/models_0.d.ts +7 -3
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/ts3.4/models/enums.d.ts +1 -0
- package/node_modules/@aws-sdk/client-cloudformation/package.json +6 -6
- package/node_modules/@aws-sdk/client-cloudwatch/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudwatch/package.json +8 -8
- package/node_modules/@aws-sdk/client-ec2/README.md +21 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +113 -11
- package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +8 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/CreateTransitGatewayPolicyTableEntryCommand.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/DeleteTransitGatewayPolicyTableEntryCommand.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/ModifyTransitGatewayPolicyTableEntryCommand.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +3 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/GetTransitGatewayPolicyTableEntriesPaginator.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/index.js +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/schemas/schemas_0.js +77 -10
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +28 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +5 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateTransitGatewayPolicyTableEntryCommand.d.ts +100 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteRouteCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteRouteServerCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteRouteServerEndpointCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteRouteServerPeerCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteTransitGatewayPolicyTableEntryCommand.d.ts +88 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImageUsageReportEntriesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImageUsageReportsCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImagesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeTransitGatewayAttachmentsCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetActiveVpnTunnelStatusCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAllowedImagesSettingsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAssociatedEnclaveCertificateIamRolesCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetTransitGatewayPolicyTableEntriesCommand.d.ts +2 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyIpamCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyIpamPolicyAllocationRulesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyIpamPoolCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTransitGatewayPolicyTableEntryCommand.d.ts +100 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/UnassignPrivateNatGatewayAddressCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/UnlockSnapshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/UnmonitorInstancesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +12 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_2.d.ts +175 -116
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_3.d.ts +148 -802
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_4.d.ts +803 -350
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +355 -262
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +305 -227
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +200 -150
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_8.d.ts +145 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/GetTransitGatewayPolicyTableEntriesPaginator.d.ts +7 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/schemas/schemas_0.d.ts +11 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +58 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +18 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateTransitGatewayPolicyTableEntryCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteRouteCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteRouteServerCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteRouteServerEndpointCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteRouteServerPeerCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteTransitGatewayPolicyTableEntryCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeImageUsageReportEntriesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeImageUsageReportsCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeImagesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetActiveVpnTunnelStatusCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetAllowedImagesSettingsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetAssociatedEnclaveCertificateIamRolesCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyIpamCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyIpamPolicyAllocationRulesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyIpamPoolCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTransitGatewayPolicyTableEntryCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/UnassignPrivateNatGatewayAddressCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/UnlockSnapshotCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/UnmonitorInstancesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/UpdateCapacityManagerMonitoredTagKeysCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +3 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +6 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_2.d.ts +41 -30
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_3.d.ts +40 -105
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_4.d.ts +98 -61
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +68 -46
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +43 -50
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +49 -36
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_8.d.ts +36 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/GetTransitGatewayPolicyTableEntriesPaginator.d.ts +11 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/index.d.ts +1 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/schemas/schemas_0.d.ts +11 -0
- package/node_modules/@aws-sdk/client-ec2/package.json +8 -8
- package/node_modules/@aws-sdk/client-iam/dist-cjs/index.js +58 -8
- package/node_modules/@aws-sdk/client-iam/dist-es/models/enums.js +13 -0
- package/node_modules/@aws-sdk/client-iam/dist-es/schemas/schemas_0.js +39 -7
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/GetContextKeysForPrincipalPolicyCommand.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/SimulateCustomPolicyCommand.d.ts +11 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/SimulatePrincipalPolicyCommand.d.ts +19 -3
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/UpdateDelegationRequestCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/UpdateGroupCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/commands/UpdateLoginProfileCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/models/enums.d.ts +29 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/models/models_0.d.ts +201 -104
- package/node_modules/@aws-sdk/client-iam/dist-types/models/models_1.d.ts +86 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/schemas/schemas_0.d.ts +4 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/commands/UpdateDelegationRequestCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/commands/UpdateGroupCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/commands/UpdateLoginProfileCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/models/enums.d.ts +16 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/models/models_0.d.ts +49 -14
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/models/models_1.d.ts +14 -0
- package/node_modules/@aws-sdk/client-iam/dist-types/ts3.4/schemas/schemas_0.d.ts +9 -1
- package/node_modules/@aws-sdk/client-iam/package.json +7 -7
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +39 -37
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +38 -36
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateFunctionCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetFunctionConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetLayerVersionByArnCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetLayerVersionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListLayerVersionsCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListLayersCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListVersionsByFunctionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishLayerVersionCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PublishVersionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionCodeCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionConfigurationCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +57 -55
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +2292 -2292
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +41 -39
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +260 -260
- package/node_modules/@aws-sdk/client-lambda/package.json +7 -7
- package/node_modules/@aws-sdk/client-s3/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-s3/package.json +11 -11
- package/node_modules/@aws-sdk/client-sns/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-sns/package.json +6 -6
- package/node_modules/@aws-sdk/client-sqs/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-sqs/package.json +8 -8
- package/node_modules/@aws-sdk/client-ssm/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-ssm/package.json +6 -6
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +856 -57
- 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 +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -1
- 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} +3 -3
- 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} +66 -60
- 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 +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +1 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +1 -1
- 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 +18 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/util-user-agent-browser/defaultUserAgent.native.d.ts +13 -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 +17 -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 +21 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +21 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +49 -29
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +49 -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 +3 -3
- package/node_modules/@aws-sdk/credential-provider-env/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-http/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-ini/package.json +11 -11
- package/node_modules/@aws-sdk/credential-provider-login/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +3 -3
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-s3/package.json +4 -4
- package/node_modules/@aws-sdk/middleware-sdk-sqs/package.json +2 -2
- 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/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +2 -2
- package/node_modules/@aws-sdk/token-providers/package.json +4 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +1561 -337
- package/node_modules/@smithy/core/dist-es/submodules/cbor/CborCodec.js +4 -205
- 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-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/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/package.json +2 -1
- package/node_modules/@smithy/credential-provider-imds/package.json +2 -2
- package/node_modules/@smithy/fetch-http-handler/package.json +2 -2
- package/node_modules/@smithy/middleware-compression/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/package.json +2 -2
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/js-yaml/dist/js-yaml.js +5 -2
- package/node_modules/js-yaml/dist/js-yaml.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js +1 -1
- package/node_modules/js-yaml/dist/js-yaml.min.js.map +1 -1
- package/node_modules/js-yaml/dist/js-yaml.mjs +3 -3
- package/node_modules/js-yaml/dist/js-yaml.mjs.map +1 -1
- package/node_modules/js-yaml/lib/type/omap.js +3 -3
- package/node_modules/js-yaml/package.json +1 -1
- package/package.json +11 -11
- 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
|
@@ -0,0 +1,621 @@
|
|
|
1
|
+
import { SerdeContext } from "@smithy/core/protocols";
|
|
2
|
+
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
+
import { NumericValue, _parseEpochTimestamp, nv } from "@smithy/core/serde";
|
|
4
|
+
import { extendedFloat16, extendedFloat32, extendedFloat64, extendedOneByte, majorList, majorMap, majorNegativeInt64, majorSpecial, majorTag, majorUint64, majorUnstructuredByteString, majorUtf8String, minorIndefinite, specialFalse, specialNull, specialTrue, specialUndefined, } from "../cbor-types";
|
|
5
|
+
import { loadCborStructIterator } from "./CborShapeSerializer2";
|
|
6
|
+
export class CborShapeDeserializer2 extends SerdeContext {
|
|
7
|
+
read(schema, bytes) {
|
|
8
|
+
payload = bytes;
|
|
9
|
+
isBuffer = USE_BUFFER && bytes instanceof Buffer;
|
|
10
|
+
dataView = new DataView(bytes.buffer, bytes.byteOffset, bytes.byteLength);
|
|
11
|
+
pos = 0;
|
|
12
|
+
end = bytes.length;
|
|
13
|
+
cacheEpoch = (cacheEpoch + 1) & 0xffff;
|
|
14
|
+
return readValue(NormalizedSchema.of(schema));
|
|
15
|
+
}
|
|
16
|
+
readValue(_schema, value) {
|
|
17
|
+
return transformObject(NormalizedSchema.of(_schema), value);
|
|
18
|
+
}
|
|
19
|
+
}
|
|
20
|
+
const USE_BUFFER = typeof Buffer !== "undefined";
|
|
21
|
+
const textDecoder = new TextDecoder();
|
|
22
|
+
let payload = new Uint8Array(0);
|
|
23
|
+
let isBuffer = false;
|
|
24
|
+
let dataView = new DataView(new ArrayBuffer(0));
|
|
25
|
+
let pos = 0;
|
|
26
|
+
let end = 0;
|
|
27
|
+
const STRING_CACHE_SIZE = 2048;
|
|
28
|
+
const stringCache = new Array(STRING_CACHE_SIZE);
|
|
29
|
+
const stringCacheEpochs = new Uint16Array(STRING_CACHE_SIZE);
|
|
30
|
+
let cacheEpoch = 0;
|
|
31
|
+
function readValue(ns) {
|
|
32
|
+
if (pos >= end) {
|
|
33
|
+
throw new Error("unexpected end of CBOR payload.");
|
|
34
|
+
}
|
|
35
|
+
const major = (payload[pos] & 0b1110_0000) >> 5;
|
|
36
|
+
const minor = payload[pos] & 0b0001_1111;
|
|
37
|
+
if (minor === minorIndefinite && major >= 2 && major <= 5) {
|
|
38
|
+
return readIndefinite(ns, major);
|
|
39
|
+
}
|
|
40
|
+
switch (major) {
|
|
41
|
+
case majorUint64:
|
|
42
|
+
return readUnsignedInt();
|
|
43
|
+
case majorNegativeInt64:
|
|
44
|
+
return readNegativeInt();
|
|
45
|
+
case majorUnstructuredByteString:
|
|
46
|
+
return readByteString();
|
|
47
|
+
case majorUtf8String:
|
|
48
|
+
return readUtf8String();
|
|
49
|
+
case majorList:
|
|
50
|
+
return readList(ns);
|
|
51
|
+
case majorMap:
|
|
52
|
+
return readMap(ns);
|
|
53
|
+
case majorTag:
|
|
54
|
+
return readTag(ns);
|
|
55
|
+
case majorSpecial:
|
|
56
|
+
return readSpecial();
|
|
57
|
+
default:
|
|
58
|
+
throw new Error(`unexpected CBOR major type ${major}.`);
|
|
59
|
+
}
|
|
60
|
+
}
|
|
61
|
+
function readList(ns) {
|
|
62
|
+
const count = decodeCount();
|
|
63
|
+
const memberSchema = ns.isListSchema() ? ns.getValueSchema() : ns;
|
|
64
|
+
const list = Array(count);
|
|
65
|
+
for (let i = 0; i < count; ++i) {
|
|
66
|
+
list[i] = readValue(memberSchema);
|
|
67
|
+
}
|
|
68
|
+
return list;
|
|
69
|
+
}
|
|
70
|
+
function readMap(ns) {
|
|
71
|
+
const count = decodeCount();
|
|
72
|
+
if (ns.isStructSchema()) {
|
|
73
|
+
const startPos = pos;
|
|
74
|
+
return readStruct(ns, count, startPos);
|
|
75
|
+
}
|
|
76
|
+
const valueSchema = ns.isMapSchema() ? ns.getValueSchema() : ns;
|
|
77
|
+
const map = {};
|
|
78
|
+
for (let i = 0; i < count; ++i) {
|
|
79
|
+
const key = readUtf8String();
|
|
80
|
+
map[key] = readValue(valueSchema);
|
|
81
|
+
}
|
|
82
|
+
return map;
|
|
83
|
+
}
|
|
84
|
+
function readStruct(ns, count, startPos) {
|
|
85
|
+
const isUnion = ns.isUnionSchema();
|
|
86
|
+
const cache = loadCborStructIterator(ns);
|
|
87
|
+
const { memberSchemas, encodedKeys, memberNames } = cache;
|
|
88
|
+
const z = encodedKeys.length;
|
|
89
|
+
const result = {};
|
|
90
|
+
let unknownKey;
|
|
91
|
+
let unknownValue;
|
|
92
|
+
let unknownCount = 0;
|
|
93
|
+
let hasType = false;
|
|
94
|
+
let hint = 0;
|
|
95
|
+
for (let i = 0; i < count; ++i) {
|
|
96
|
+
const matchIdx = matchStructKey(encodedKeys, z, hint);
|
|
97
|
+
if (matchIdx >= 0) {
|
|
98
|
+
hint = matchIdx + 1;
|
|
99
|
+
if (hint >= z) {
|
|
100
|
+
hint = 0;
|
|
101
|
+
}
|
|
102
|
+
const val = readValue(memberSchemas[matchIdx]);
|
|
103
|
+
if (val != null) {
|
|
104
|
+
result[memberNames[matchIdx]] = val;
|
|
105
|
+
}
|
|
106
|
+
}
|
|
107
|
+
else {
|
|
108
|
+
const key = readUtf8String();
|
|
109
|
+
const val = readValue(NormalizedSchema.of(15));
|
|
110
|
+
if (key === "__type" && typeof val === "string") {
|
|
111
|
+
hasType = true;
|
|
112
|
+
}
|
|
113
|
+
else {
|
|
114
|
+
unknownKey = key;
|
|
115
|
+
unknownValue = val;
|
|
116
|
+
++unknownCount;
|
|
117
|
+
}
|
|
118
|
+
}
|
|
119
|
+
}
|
|
120
|
+
if (isUnion) {
|
|
121
|
+
let resultEmpty = true;
|
|
122
|
+
for (const _ in result) {
|
|
123
|
+
resultEmpty = false;
|
|
124
|
+
break;
|
|
125
|
+
}
|
|
126
|
+
if (resultEmpty && unknownCount === 1) {
|
|
127
|
+
result.$unknown = [unknownKey, unknownValue];
|
|
128
|
+
}
|
|
129
|
+
}
|
|
130
|
+
else if (hasType) {
|
|
131
|
+
pos = startPos;
|
|
132
|
+
const docSchema = NormalizedSchema.of(15);
|
|
133
|
+
for (let i = 0; i < count; ++i) {
|
|
134
|
+
const key = readUtf8String();
|
|
135
|
+
const val = readValue(docSchema);
|
|
136
|
+
if (!(key in result)) {
|
|
137
|
+
result[key] = val;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
return result;
|
|
142
|
+
}
|
|
143
|
+
function readTag(ns) {
|
|
144
|
+
const tagNum = decodeArgument();
|
|
145
|
+
const tagNumber = typeof tagNum === "bigint" ? Number(tagNum) : tagNum;
|
|
146
|
+
if (tagNumber === 1) {
|
|
147
|
+
const docSchema = NormalizedSchema.of(15);
|
|
148
|
+
const epochValue = readValue(docSchema);
|
|
149
|
+
return _parseEpochTimestamp(epochValue);
|
|
150
|
+
}
|
|
151
|
+
if (tagNumber === 2 || tagNumber === 3) {
|
|
152
|
+
const byteStr = readByteString();
|
|
153
|
+
let b = BigInt(0);
|
|
154
|
+
for (let i = 0; i < byteStr.length; ++i) {
|
|
155
|
+
b = (b << BigInt(8)) | BigInt(byteStr[i]);
|
|
156
|
+
}
|
|
157
|
+
return tagNumber === 3 ? -b - BigInt(1) : b;
|
|
158
|
+
}
|
|
159
|
+
if (tagNumber === 4) {
|
|
160
|
+
const docSchema = NormalizedSchema.of(15);
|
|
161
|
+
const pair = readValue(docSchema);
|
|
162
|
+
const [exponent, mantissa] = pair;
|
|
163
|
+
const normalizer = mantissa < 0 ? -1 : 1;
|
|
164
|
+
const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa));
|
|
165
|
+
let numericString;
|
|
166
|
+
const sign = mantissa < 0 ? "-" : "";
|
|
167
|
+
numericString =
|
|
168
|
+
exponent === 0
|
|
169
|
+
? mantissaStr
|
|
170
|
+
: mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent);
|
|
171
|
+
numericString = numericString.replace(/^0+/g, "");
|
|
172
|
+
if (numericString === "") {
|
|
173
|
+
numericString = "0";
|
|
174
|
+
}
|
|
175
|
+
if (numericString[0] === ".") {
|
|
176
|
+
numericString = "0" + numericString;
|
|
177
|
+
}
|
|
178
|
+
numericString = sign + numericString;
|
|
179
|
+
return nv(numericString);
|
|
180
|
+
}
|
|
181
|
+
const docSchema = NormalizedSchema.of(15);
|
|
182
|
+
const innerValue = readValue(docSchema);
|
|
183
|
+
return { tag: castBigInt(tagNum), value: innerValue };
|
|
184
|
+
}
|
|
185
|
+
function readIndefinite(ns, major) {
|
|
186
|
+
switch (major) {
|
|
187
|
+
case majorUtf8String:
|
|
188
|
+
return readUtf8StringIndefinite();
|
|
189
|
+
case majorUnstructuredByteString:
|
|
190
|
+
return readByteStringIndefinite();
|
|
191
|
+
case majorList:
|
|
192
|
+
return readListIndefinite(ns);
|
|
193
|
+
case majorMap:
|
|
194
|
+
return readMapIndefinite(ns);
|
|
195
|
+
default:
|
|
196
|
+
throw new Error(`unexpected indefinite length for major ${major}.`);
|
|
197
|
+
}
|
|
198
|
+
}
|
|
199
|
+
function readUtf8StringIndefinite() {
|
|
200
|
+
pos += 1;
|
|
201
|
+
const chunks = [];
|
|
202
|
+
let totalLen = 0;
|
|
203
|
+
while (pos < end) {
|
|
204
|
+
if (payload[pos] === 0xff) {
|
|
205
|
+
pos += 1;
|
|
206
|
+
const combined = new Uint8Array(totalLen);
|
|
207
|
+
let offset = 0;
|
|
208
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
209
|
+
combined.set(chunks[i], offset);
|
|
210
|
+
offset += chunks[i].length;
|
|
211
|
+
}
|
|
212
|
+
if (USE_BUFFER) {
|
|
213
|
+
return Buffer.from(combined.buffer, combined.byteOffset, combined.byteLength).toString("utf-8");
|
|
214
|
+
}
|
|
215
|
+
return textDecoder.decode(combined);
|
|
216
|
+
}
|
|
217
|
+
const bytes = readByteString();
|
|
218
|
+
chunks.push(bytes);
|
|
219
|
+
totalLen += bytes.length;
|
|
220
|
+
}
|
|
221
|
+
throw new Error("expected break marker.");
|
|
222
|
+
}
|
|
223
|
+
function readByteStringIndefinite() {
|
|
224
|
+
pos += 1;
|
|
225
|
+
const chunks = [];
|
|
226
|
+
let totalLen = 0;
|
|
227
|
+
while (pos < end) {
|
|
228
|
+
if (payload[pos] === 0xff) {
|
|
229
|
+
pos += 1;
|
|
230
|
+
const combined = new Uint8Array(totalLen);
|
|
231
|
+
let offset = 0;
|
|
232
|
+
for (let i = 0; i < chunks.length; ++i) {
|
|
233
|
+
combined.set(chunks[i], offset);
|
|
234
|
+
offset += chunks[i].length;
|
|
235
|
+
}
|
|
236
|
+
return combined;
|
|
237
|
+
}
|
|
238
|
+
const bytes = readByteString();
|
|
239
|
+
chunks.push(bytes);
|
|
240
|
+
totalLen += bytes.length;
|
|
241
|
+
}
|
|
242
|
+
throw new Error("expected break marker.");
|
|
243
|
+
}
|
|
244
|
+
function readListIndefinite(ns) {
|
|
245
|
+
pos += 1;
|
|
246
|
+
const memberSchema = ns.isListSchema() ? ns.getValueSchema() : ns;
|
|
247
|
+
const list = [];
|
|
248
|
+
while (pos < end) {
|
|
249
|
+
if (payload[pos] === 0xff) {
|
|
250
|
+
pos += 1;
|
|
251
|
+
return list;
|
|
252
|
+
}
|
|
253
|
+
list.push(readValue(memberSchema));
|
|
254
|
+
}
|
|
255
|
+
throw new Error("expected break marker.");
|
|
256
|
+
}
|
|
257
|
+
function readMapIndefinite(ns) {
|
|
258
|
+
pos += 1;
|
|
259
|
+
if (ns.isStructSchema()) {
|
|
260
|
+
const cache = loadCborStructIterator(ns);
|
|
261
|
+
const { memberSchemas, encodedKeys, memberNames } = cache;
|
|
262
|
+
const z = encodedKeys.length;
|
|
263
|
+
const isUnion = ns.isUnionSchema();
|
|
264
|
+
const result = {};
|
|
265
|
+
let unknownKey;
|
|
266
|
+
let unknownValue;
|
|
267
|
+
let unknownCount = 0;
|
|
268
|
+
let hint = 0;
|
|
269
|
+
while (pos < end) {
|
|
270
|
+
if (payload[pos] === 0xff) {
|
|
271
|
+
pos += 1;
|
|
272
|
+
if (isUnion) {
|
|
273
|
+
let resultEmpty = true;
|
|
274
|
+
for (const _ in result) {
|
|
275
|
+
resultEmpty = false;
|
|
276
|
+
break;
|
|
277
|
+
}
|
|
278
|
+
if (resultEmpty && unknownCount === 1) {
|
|
279
|
+
result.$unknown = [unknownKey, unknownValue];
|
|
280
|
+
}
|
|
281
|
+
}
|
|
282
|
+
return result;
|
|
283
|
+
}
|
|
284
|
+
const matchIdx = matchStructKey(encodedKeys, z, hint);
|
|
285
|
+
if (matchIdx >= 0) {
|
|
286
|
+
hint = matchIdx + 1;
|
|
287
|
+
if (hint >= z) {
|
|
288
|
+
hint = 0;
|
|
289
|
+
}
|
|
290
|
+
const val = readValue(memberSchemas[matchIdx]);
|
|
291
|
+
if (val != null) {
|
|
292
|
+
result[memberNames[matchIdx]] = val;
|
|
293
|
+
}
|
|
294
|
+
}
|
|
295
|
+
else {
|
|
296
|
+
const key = readUtf8String();
|
|
297
|
+
const val = readValue(NormalizedSchema.of(15));
|
|
298
|
+
if (key !== "__type") {
|
|
299
|
+
unknownKey = key;
|
|
300
|
+
unknownValue = val;
|
|
301
|
+
++unknownCount;
|
|
302
|
+
}
|
|
303
|
+
}
|
|
304
|
+
}
|
|
305
|
+
throw new Error("expected break marker.");
|
|
306
|
+
}
|
|
307
|
+
const valueSchema = ns.isMapSchema() ? ns.getValueSchema() : ns;
|
|
308
|
+
const map = {};
|
|
309
|
+
while (pos < end) {
|
|
310
|
+
if (payload[pos] === 0xff) {
|
|
311
|
+
pos += 1;
|
|
312
|
+
return map;
|
|
313
|
+
}
|
|
314
|
+
const key = readUtf8String();
|
|
315
|
+
map[key] = readValue(valueSchema);
|
|
316
|
+
}
|
|
317
|
+
throw new Error("expected break marker.");
|
|
318
|
+
}
|
|
319
|
+
function matchStructKey(encodedKeys, z, hint) {
|
|
320
|
+
const hintKey = encodedKeys[hint];
|
|
321
|
+
if (pos + hintKey.length <= end && bytesMatch(pos, hintKey)) {
|
|
322
|
+
pos += hintKey.length;
|
|
323
|
+
return hint;
|
|
324
|
+
}
|
|
325
|
+
for (let i = 0; i < z; ++i) {
|
|
326
|
+
if (i === hint) {
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
const ek = encodedKeys[i];
|
|
330
|
+
if (pos + ek.length <= end && bytesMatch(pos, ek)) {
|
|
331
|
+
pos += ek.length;
|
|
332
|
+
return i;
|
|
333
|
+
}
|
|
334
|
+
}
|
|
335
|
+
return -1;
|
|
336
|
+
}
|
|
337
|
+
function bytesMatch(at, expected) {
|
|
338
|
+
const len = expected.length;
|
|
339
|
+
if (payload[at] !== expected[0]) {
|
|
340
|
+
return false;
|
|
341
|
+
}
|
|
342
|
+
for (let i = 1; i < len; ++i) {
|
|
343
|
+
if (payload[at + i] !== expected[i]) {
|
|
344
|
+
return false;
|
|
345
|
+
}
|
|
346
|
+
}
|
|
347
|
+
return true;
|
|
348
|
+
}
|
|
349
|
+
function decodeArgument() {
|
|
350
|
+
const minor = payload[pos] & 0b0001_1111;
|
|
351
|
+
if (minor < 24) {
|
|
352
|
+
pos += 1;
|
|
353
|
+
return minor;
|
|
354
|
+
}
|
|
355
|
+
switch (minor) {
|
|
356
|
+
case extendedOneByte:
|
|
357
|
+
if (end - pos < 2) {
|
|
358
|
+
overflow(1);
|
|
359
|
+
}
|
|
360
|
+
pos += 2;
|
|
361
|
+
return payload[pos - 1];
|
|
362
|
+
case extendedFloat16:
|
|
363
|
+
if (end - pos < 3) {
|
|
364
|
+
overflow(2);
|
|
365
|
+
}
|
|
366
|
+
pos += 3;
|
|
367
|
+
return dataView.getUint16(pos - 2);
|
|
368
|
+
case extendedFloat32:
|
|
369
|
+
if (end - pos < 5) {
|
|
370
|
+
overflow(4);
|
|
371
|
+
}
|
|
372
|
+
pos += 5;
|
|
373
|
+
return dataView.getUint32(pos - 4);
|
|
374
|
+
case extendedFloat64: {
|
|
375
|
+
if (end - pos < 9) {
|
|
376
|
+
overflow(8);
|
|
377
|
+
}
|
|
378
|
+
pos += 9;
|
|
379
|
+
const hi = dataView.getUint32(pos - 8);
|
|
380
|
+
if (hi < 0x00200000) {
|
|
381
|
+
return hi * 4294967296 + dataView.getUint32(pos - 4);
|
|
382
|
+
}
|
|
383
|
+
return dataView.getBigUint64(pos - 8);
|
|
384
|
+
}
|
|
385
|
+
default:
|
|
386
|
+
throw new Error(`unexpected minor value ${minor}.`);
|
|
387
|
+
}
|
|
388
|
+
}
|
|
389
|
+
function decodeCount() {
|
|
390
|
+
const val = decodeArgument();
|
|
391
|
+
return typeof val === "bigint" ? Number(val) : val;
|
|
392
|
+
}
|
|
393
|
+
function readUnsignedInt() {
|
|
394
|
+
const val = decodeArgument();
|
|
395
|
+
return castBigInt(val);
|
|
396
|
+
}
|
|
397
|
+
function readNegativeInt() {
|
|
398
|
+
const val = decodeArgument();
|
|
399
|
+
if (typeof val === "bigint") {
|
|
400
|
+
return BigInt(-1) - val;
|
|
401
|
+
}
|
|
402
|
+
return -1 - val;
|
|
403
|
+
}
|
|
404
|
+
function readByteString() {
|
|
405
|
+
const length = decodeCount();
|
|
406
|
+
if (end - pos < length) {
|
|
407
|
+
overflow(length);
|
|
408
|
+
}
|
|
409
|
+
const start = pos;
|
|
410
|
+
pos += length;
|
|
411
|
+
return payload.subarray(start, start + length);
|
|
412
|
+
}
|
|
413
|
+
function readUtf8String() {
|
|
414
|
+
const length = decodeCount();
|
|
415
|
+
if (end - pos < length) {
|
|
416
|
+
overflow(length);
|
|
417
|
+
}
|
|
418
|
+
const start = pos;
|
|
419
|
+
pos += length;
|
|
420
|
+
if (length < 24) {
|
|
421
|
+
return decodeUtf8Cached(start, length);
|
|
422
|
+
}
|
|
423
|
+
if (isBuffer) {
|
|
424
|
+
return payload.toString("utf-8", start, start + length);
|
|
425
|
+
}
|
|
426
|
+
return textDecoder.decode(payload.subarray(start, start + length));
|
|
427
|
+
}
|
|
428
|
+
function decodeUtf8Cached(at, length) {
|
|
429
|
+
let h = length;
|
|
430
|
+
for (let i = 0; i < length; ++i) {
|
|
431
|
+
h = (h * 31 + payload[at + i]) | 0;
|
|
432
|
+
}
|
|
433
|
+
const slot = (h >>> 0) & (STRING_CACHE_SIZE - 1);
|
|
434
|
+
const cached = stringCache[slot];
|
|
435
|
+
if (cached !== undefined && cached.length === length) {
|
|
436
|
+
let match = true;
|
|
437
|
+
for (let i = 0; i < length; ++i) {
|
|
438
|
+
if (cached.charCodeAt(i) !== payload[at + i]) {
|
|
439
|
+
match = false;
|
|
440
|
+
break;
|
|
441
|
+
}
|
|
442
|
+
}
|
|
443
|
+
if (match) {
|
|
444
|
+
stringCacheEpochs[slot] = cacheEpoch;
|
|
445
|
+
return cached;
|
|
446
|
+
}
|
|
447
|
+
}
|
|
448
|
+
const result = isBuffer
|
|
449
|
+
? payload.toString("utf-8", at, at + length)
|
|
450
|
+
: textDecoder.decode(payload.subarray(at, at + length));
|
|
451
|
+
if (stringCacheEpochs[slot] !== cacheEpoch) {
|
|
452
|
+
stringCache[slot] = result;
|
|
453
|
+
stringCacheEpochs[slot] = cacheEpoch;
|
|
454
|
+
}
|
|
455
|
+
return result;
|
|
456
|
+
}
|
|
457
|
+
function readSpecial() {
|
|
458
|
+
const p = pos;
|
|
459
|
+
const minor = payload[p] & 0b0001_1111;
|
|
460
|
+
switch (minor) {
|
|
461
|
+
case specialTrue:
|
|
462
|
+
pos = p + 1;
|
|
463
|
+
return true;
|
|
464
|
+
case specialFalse:
|
|
465
|
+
pos = p + 1;
|
|
466
|
+
return false;
|
|
467
|
+
case specialNull:
|
|
468
|
+
pos = p + 1;
|
|
469
|
+
return null;
|
|
470
|
+
case specialUndefined:
|
|
471
|
+
pos = p + 1;
|
|
472
|
+
return null;
|
|
473
|
+
case extendedFloat16: {
|
|
474
|
+
if (end - p < 3) {
|
|
475
|
+
overflow(2);
|
|
476
|
+
}
|
|
477
|
+
pos = p + 3;
|
|
478
|
+
return bytesToFloat16(payload[p + 1], payload[p + 2]);
|
|
479
|
+
}
|
|
480
|
+
case extendedFloat32: {
|
|
481
|
+
if (end - p < 5) {
|
|
482
|
+
overflow(4);
|
|
483
|
+
}
|
|
484
|
+
pos = p + 5;
|
|
485
|
+
return dataView.getFloat32(p + 1);
|
|
486
|
+
}
|
|
487
|
+
case extendedFloat64: {
|
|
488
|
+
if (end - p < 9) {
|
|
489
|
+
overflow(8);
|
|
490
|
+
}
|
|
491
|
+
pos = p + 9;
|
|
492
|
+
return dataView.getFloat64(p + 1);
|
|
493
|
+
}
|
|
494
|
+
default:
|
|
495
|
+
throw new Error(`unexpected minor value ${minor} for major 7.`);
|
|
496
|
+
}
|
|
497
|
+
}
|
|
498
|
+
function bytesToFloat16(a, b) {
|
|
499
|
+
const sign = a >> 7;
|
|
500
|
+
const exponent = (a & 0b0111_1100) >> 2;
|
|
501
|
+
const fraction = ((a & 0b0000_0011) << 8) | b;
|
|
502
|
+
const scalar = sign === 0 ? 1 : -1;
|
|
503
|
+
if (exponent === 0b00000) {
|
|
504
|
+
if (fraction === 0) {
|
|
505
|
+
return 0;
|
|
506
|
+
}
|
|
507
|
+
return scalar * (Math.pow(2, 1 - 15) * (fraction / 1024));
|
|
508
|
+
}
|
|
509
|
+
else if (exponent === 0b11111) {
|
|
510
|
+
if (fraction === 0) {
|
|
511
|
+
return scalar * Infinity;
|
|
512
|
+
}
|
|
513
|
+
return NaN;
|
|
514
|
+
}
|
|
515
|
+
return scalar * (Math.pow(2, exponent - 15) * (1 + fraction / 1024));
|
|
516
|
+
}
|
|
517
|
+
function castBigInt(value) {
|
|
518
|
+
if (typeof value === "number") {
|
|
519
|
+
return value;
|
|
520
|
+
}
|
|
521
|
+
const num = Number(value);
|
|
522
|
+
if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) {
|
|
523
|
+
return num;
|
|
524
|
+
}
|
|
525
|
+
return value;
|
|
526
|
+
}
|
|
527
|
+
function overflow(n) {
|
|
528
|
+
throw new Error(`CBOR: length ${n} greater than remaining buffer length.`);
|
|
529
|
+
}
|
|
530
|
+
function transformObject(ns, value) {
|
|
531
|
+
if (ns.isTimestampSchema()) {
|
|
532
|
+
if (typeof value === "number") {
|
|
533
|
+
return _parseEpochTimestamp(value);
|
|
534
|
+
}
|
|
535
|
+
if (typeof value === "object" && value !== null) {
|
|
536
|
+
if (value.tag === 1 && "value" in value) {
|
|
537
|
+
return _parseEpochTimestamp(value.value);
|
|
538
|
+
}
|
|
539
|
+
}
|
|
540
|
+
}
|
|
541
|
+
if (ns.isBlobSchema()) {
|
|
542
|
+
return value;
|
|
543
|
+
}
|
|
544
|
+
if (typeof value === "undefined" ||
|
|
545
|
+
typeof value === "boolean" ||
|
|
546
|
+
typeof value === "number" ||
|
|
547
|
+
typeof value === "string" ||
|
|
548
|
+
typeof value === "bigint" ||
|
|
549
|
+
typeof value === "symbol") {
|
|
550
|
+
return value;
|
|
551
|
+
}
|
|
552
|
+
if (typeof value !== "object" || value === null) {
|
|
553
|
+
return value;
|
|
554
|
+
}
|
|
555
|
+
if ("byteLength" in value) {
|
|
556
|
+
return value;
|
|
557
|
+
}
|
|
558
|
+
if (value instanceof Date) {
|
|
559
|
+
return value;
|
|
560
|
+
}
|
|
561
|
+
if (value instanceof NumericValue) {
|
|
562
|
+
return value;
|
|
563
|
+
}
|
|
564
|
+
if (ns.isDocumentSchema()) {
|
|
565
|
+
return value;
|
|
566
|
+
}
|
|
567
|
+
if (ns.isListSchema()) {
|
|
568
|
+
const memberSchema = ns.getValueSchema();
|
|
569
|
+
const out = [];
|
|
570
|
+
for (const item of value) {
|
|
571
|
+
out.push(transformObject(memberSchema, item));
|
|
572
|
+
}
|
|
573
|
+
return out;
|
|
574
|
+
}
|
|
575
|
+
const newObject = {};
|
|
576
|
+
if (ns.isMapSchema()) {
|
|
577
|
+
const targetSchema = ns.getValueSchema();
|
|
578
|
+
for (const key in value) {
|
|
579
|
+
newObject[key] = transformObject(targetSchema, value[key]);
|
|
580
|
+
}
|
|
581
|
+
}
|
|
582
|
+
else if (ns.isStructSchema()) {
|
|
583
|
+
const isUnion = ns.isUnionSchema();
|
|
584
|
+
let keys;
|
|
585
|
+
if (isUnion) {
|
|
586
|
+
keys = new Set();
|
|
587
|
+
for (const k in value) {
|
|
588
|
+
if (k !== "__type") {
|
|
589
|
+
keys.add(k);
|
|
590
|
+
}
|
|
591
|
+
}
|
|
592
|
+
}
|
|
593
|
+
for (const [key, memberSchema] of ns.structIterator()) {
|
|
594
|
+
if (isUnion) {
|
|
595
|
+
keys.delete(key);
|
|
596
|
+
}
|
|
597
|
+
if (value[key] != null) {
|
|
598
|
+
newObject[key] = transformObject(memberSchema, value[key]);
|
|
599
|
+
}
|
|
600
|
+
}
|
|
601
|
+
if (isUnion && keys?.size === 1) {
|
|
602
|
+
let newObjectEmpty = true;
|
|
603
|
+
for (const _ in newObject) {
|
|
604
|
+
newObjectEmpty = false;
|
|
605
|
+
break;
|
|
606
|
+
}
|
|
607
|
+
if (newObjectEmpty) {
|
|
608
|
+
const k = keys.values().next().value;
|
|
609
|
+
newObject.$unknown = [k, value[k]];
|
|
610
|
+
}
|
|
611
|
+
}
|
|
612
|
+
else if (typeof value.__type === "string") {
|
|
613
|
+
for (const k in value) {
|
|
614
|
+
if (!(k in newObject)) {
|
|
615
|
+
newObject[k] = value[k];
|
|
616
|
+
}
|
|
617
|
+
}
|
|
618
|
+
}
|
|
619
|
+
}
|
|
620
|
+
return newObject;
|
|
621
|
+
}
|