cdk-preflight 1.11.1 → 1.12.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.jsii +4 -4
- package/README.md +34 -0
- package/lib/cli.js +118 -4
- package/lib/index.js +1 -1
- package/llms.txt +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-cloudformation/dist-types/CloudFormationClient.d.ts +2 -1
- package/node_modules/@aws-sdk/client-cloudformation/package.json +6 -6
- package/node_modules/@aws-sdk/client-ec2/README.md +28 -0
- package/node_modules/@aws-sdk/client-ec2/dist-cjs/index.js +499 -113
- package/node_modules/@aws-sdk/client-ec2/dist-es/EC2.js +10 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetCapacityManagerSupportabilityScoresCommand.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetImageFindingsCommand.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/GetTransitGatewayAttachmentNatConfigurationCommand.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/commands/index.js +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-es/models/enums.js +80 -29
- package/node_modules/@aws-sdk/client-ec2/dist-es/pagination/GetImageFindingsPaginator.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 +365 -83
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2.d.ts +35 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/EC2Client.d.ts +8 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCapacityReservationFleetCommand.d.ts +82 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateCarrierGatewayCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/CreateTransitGatewayRouteCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteLaunchTemplateCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteTransitGatewayRouteCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DeleteTransitGatewayRouteTableCommand.d.ts +5 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeCapacityReservationFleetsCommand.d.ts +81 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeFleetHistoryCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeImagesCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeInstanceStatusCommand.d.ts +5 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeNetworkInsightsAnalysesCommand.d.ts +48 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesModificationsCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DescribeReservedInstancesOfferingsCommand.d.ts +1 -2
- 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/DisassociateTransitGatewayPolicyTableCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/DisassociateTransitGatewayRouteTableCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetAllowedImagesSettingsCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDataCommand.d.ts +2 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerMetricDimensionsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetCapacityManagerSupportabilityScoresCommand.d.ts +183 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetImageFindingsCommand.d.ts +90 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetNetworkInsightsAccessScopeAnalysisFindingsCommand.d.ts +19 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetTransitGatewayAttachmentNatConfigurationCommand.d.ts +82 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVerifiedAccessEndpointTargetsCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVerifiedAccessGroupPolicyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpcResourcesBlockingEncryptionEnforcementCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnConnectionDeviceSampleConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnConnectionDeviceTypesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/GetVpnTunnelReplacementStatusCommand.d.ts +1 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.d.ts +107 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectTransitGatewayPeeringAttachmentCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectTransitGatewayVpcAttachmentCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectVpcEndpointConnectionsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/RejectVpcPeeringConnectionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseAddressCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseHostsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReleaseIpamPoolAllocationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceIamInstanceProfileAssociationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceImageCriteriaInAllowedImagesSettingsCommand.d.ts +9 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/ReplaceTransitGatewayRouteCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/SearchTransitGatewayRoutesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/StartNetworkInsightsAnalysisCommand.d.ts +48 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/commands/index.d.ts +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/enums.d.ts +192 -77
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_0.d.ts +165 -291
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_1.d.ts +1839 -1665
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_2.d.ts +25 -12
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_3.d.ts +27 -38
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_4.d.ts +241 -242
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_5.d.ts +247 -57
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_6.d.ts +537 -341
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_7.d.ts +389 -246
- package/node_modules/@aws-sdk/client-ec2/dist-types/models/models_8.d.ts +360 -3
- package/node_modules/@aws-sdk/client-ec2/dist-types/pagination/GetImageFindingsPaginator.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 +21 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2.d.ts +75 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/EC2Client.d.ts +24 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateCapacityReservationFleetCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/CreateCarrierGatewayCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DeleteLaunchTemplateCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeFleetHistoryCommand.d.ts +2 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeReservedInstancesModificationsCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DescribeReservedInstancesOfferingsCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DisassociateTransitGatewayPolicyTableCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/DisassociateTransitGatewayRouteTableCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetCapacityManagerSupportabilityScoresCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetImageFindingsCommand.d.ts +38 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetTransitGatewayAttachmentNatConfigurationCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVerifiedAccessEndpointTargetsCommand.d.ts +2 -4
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVerifiedAccessGroupPolicyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpcResourcesBlockingEncryptionEnforcementCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnConnectionDeviceSampleConfigurationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnConnectionDeviceTypesCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/GetVpnTunnelReplacementStatusCommand.d.ts +4 -2
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ModifyTransitGatewayAttachmentNatConfigurationCommand.d.ts +42 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectTransitGatewayPeeringAttachmentCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectTransitGatewayVpcAttachmentCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectVpcEndpointConnectionsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/RejectVpcPeeringConnectionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseAddressCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseHostsCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReleaseIpamPoolAllocationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/ReplaceIamInstanceProfileAssociationCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/commands/index.d.ts +4 -0
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/enums.d.ts +99 -35
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_0.d.ts +27 -60
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_1.d.ts +118 -69
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_2.d.ts +6 -6
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_3.d.ts +10 -9
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_4.d.ts +31 -34
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_5.d.ts +37 -14
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_6.d.ts +89 -68
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_7.d.ts +86 -64
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/models/models_8.d.ts +76 -1
- package/node_modules/@aws-sdk/client-ec2/dist-types/ts3.4/pagination/GetImageFindingsPaginator.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 +21 -0
- package/node_modules/@aws-sdk/client-ec2/package.json +8 -8
- package/node_modules/@aws-sdk/client-lambda/README.md +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-cjs/index.js +9 -3
- package/node_modules/@aws-sdk/client-lambda/dist-es/models/enums.js +4 -0
- package/node_modules/@aws-sdk/client-lambda/dist-es/schemas/schemas_0.js +3 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/Lambda.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/LambdaClient.d.ts +3 -2
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/CreateEventSourceMappingCommand.d.ts +2 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteEventSourceMappingCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/DeleteFunctionConcurrencyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/GetEventSourceMappingCommand.d.ts +1 -0
- 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/ListEventSourceMappingsCommand.d.ts +1 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/ListFunctionEventInvokeConfigsCommand.d.ts +1 -1
- 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/PublishVersionCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionConcurrencyCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/PutFunctionRecursionConfigCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateEventSourceMappingCommand.d.ts +2 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/commands/UpdateFunctionUrlConfigCommand.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/index.d.ts +1 -1
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/enums.d.ts +12 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/models/models_0.d.ts +21 -16
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/enums.d.ts +6 -0
- package/node_modules/@aws-sdk/client-lambda/dist-types/ts3.4/models/models_0.d.ts +2 -0
- package/node_modules/@aws-sdk/client-lambda/package.json +7 -7
- package/node_modules/@aws-sdk/client-service-quotas/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-service-quotas/dist-types/ServiceQuotasClient.d.ts +2 -1
- package/node_modules/@aws-sdk/client-service-quotas/package.json +6 -6
- package/node_modules/@aws-sdk/client-sts/dist-cjs/index.js +1 -1
- package/node_modules/@aws-sdk/client-sts/dist-types/STSClient.d.ts +2 -1
- package/node_modules/@aws-sdk/client-sts/package.json +8 -8
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/client/index.js +38 -13
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/httpAuthSchemes/index.js +7 -7
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/protocols/index.js +104 -1549
- package/node_modules/@aws-sdk/core/dist-cjs/submodules/util/index.js +2 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/getDefaultSocketTimeout.js +10 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.browser.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/index.native.js +1 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/middleware-host-header/hostHeaderMiddleware.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-endpoints/lib/aws/parseArn.js +4 -2
- package/node_modules/@aws-sdk/core/dist-es/submodules/client/util-user-agent-browser/defaultUserAgent.js +18 -9
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js +6 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js +1 -4
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/index.js +2 -7
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsJsonRpcProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsRestJsonProtocol.js +1 -3
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.js +51 -0
- package/node_modules/@aws-sdk/core/dist-es/submodules/util/util-arn-parser/arn.js +2 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/getDefaultSocketTimeout.d.ts +11 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.d.ts +3 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/index.d.ts +3 -8
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +25 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/getDefaultSocketTimeout.d.ts +4 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.browser.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/client/index.native.d.ts +1 -0
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/index.d.ts +11 -10
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_0Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJson1_1Protocol.d.ts +1 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsJsonRpcProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsRestJsonProtocol.d.ts +2 -3
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/AwsSmithyRpcV2JsonProtocol.d.ts +36 -0
- package/node_modules/@aws-sdk/core/package.json +5 -5
- package/node_modules/@aws-sdk/credential-provider-env/package.json +4 -4
- 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 +5 -5
- package/node_modules/@aws-sdk/credential-provider-node/package.json +9 -9
- package/node_modules/@aws-sdk/credential-provider-process/package.json +4 -4
- package/node_modules/@aws-sdk/credential-provider-sso/package.json +6 -6
- package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +5 -5
- package/node_modules/@aws-sdk/middleware-sdk-ec2/package.json +5 -5
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/cognito-identity/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/signin/index.js +10 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sso-oidc/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +3 -2
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/cognito-identity/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/models/enums.js +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso-oidc/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/CognitoIdentityClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/Signin.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/SigninClient.d.ts +3 -3
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenCommand.d.ts +5 -59
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/commands/CreateOAuth2TokenWithIAMCommand.d.ts +5 -33
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/index.d.ts +1 -2
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/enums.d.ts +16 -9
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/errors.d.ts +8 -39
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/models/models_0.d.ts +36 -48
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/SSOClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/SSOOIDCClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/STSClient.d.ts +2 -1
- package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/cognito-identity/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/models/enums.d.ts +7 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/signin/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sso-oidc/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/runtimeConfig.d.ts +1 -0
- package/node_modules/@aws-sdk/nested-clients/package.json +6 -6
- package/node_modules/@aws-sdk/signature-v4-multi-region/package.json +3 -3
- package/node_modules/@aws-sdk/token-providers/dist-cjs/index.js +37 -19
- package/node_modules/@aws-sdk/token-providers/dist-es/fromSso.js +37 -19
- package/node_modules/@aws-sdk/token-providers/package.json +5 -5
- package/node_modules/@aws-sdk/types/dist-types/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/dist-types/ts3.4/feature-ids.d.ts +3 -0
- package/node_modules/@aws-sdk/types/package.json +1 -1
- package/node_modules/@aws-sdk/xml-builder/package.json +1 -1
- package/node_modules/@smithy/core/dist-cjs/index.js +4 -2
- package/node_modules/@smithy/core/dist-cjs/submodules/cbor/index.js +45 -53
- package/node_modules/@smithy/core/dist-cjs/submodules/client/index.js +52 -19
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.browser.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.js +16 -8
- package/node_modules/@smithy/core/dist-cjs/submodules/config/index.native.js +8 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.browser.js +2 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/endpoints/index.js +10 -5
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.browser.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/event-streams/index.js +28 -9
- package/node_modules/@smithy/core/dist-cjs/submodules/protocols/index.js +91 -58
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.browser.js +53 -15
- package/node_modules/@smithy/core/dist-cjs/submodules/retry/index.js +57 -17
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.browser.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.js +7 -1
- package/node_modules/@smithy/core/dist-cjs/submodules/serde/index.native.js +13 -4
- package/node_modules/@smithy/core/dist-cjs/submodules/transport/index.js +6 -3
- package/node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js +2 -1
- package/node_modules/@smithy/core/dist-es/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/cbor/SmithyRpcV2CborProtocol.js +12 -37
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeDeserializer.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v1/CborShapeSerializer.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeDeserializer2.js +12 -6
- package/node_modules/@smithy/core/dist-es/submodules/cbor/codec-v2/CborShapeSerializer2.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/middleware-stack/MiddlewareStack.js +10 -5
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/command.js +17 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/create-aggregated-client.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/exceptions.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/extensions/checksum.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/get-value-from-text-node.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/object-mapping.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/schemaLogFilter.js +10 -4
- package/node_modules/@smithy/core/dist-es/submodules/client/smithy-client/serde-json.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/config/shared-ini-file-loader/getHomeDir.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/booleanSelector.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/config/util-config-provider/numberSelector.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/middleware-endpoint/adaptors/getEndpointUrlConfig.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/endpoints/util-endpoints/resolveEndpoint.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/EventStreamSerde.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/HeaderMarshaller.js +12 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/Int64.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-codec/SmithyMessageDecoderStream.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde/utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/event-streams/eventstream-serde-universal/getUnmarshalledStream.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/AbstractRpcV2Protocol.js +35 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpBindingProtocol.js +8 -4
- package/node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js +6 -2
- package/node_modules/@smithy/core/dist-es/submodules/protocols/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/SmithyRpcV2JsonProtocol.js +8 -31
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +7 -5
- package/node_modules/@smithy/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +11 -8
- package/node_modules/@smithy/core/dist-es/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.js +3 -0
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/configurations.js +4 -2
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/parseRetryAfterHeader.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retry-pre-sra-deprecated/StandardRetryStrategy.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/retryMiddleware.js +17 -8
- package/node_modules/@smithy/core/dist-es/submodules/retry/middleware-retry/util.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/retry/util-retry/race.js +22 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.browser.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/index.native.js +1 -0
- package/node_modules/@smithy/core/dist-es/submodules/serde/parse-utils.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/serde/util-body-length/calculateBodyLength.browser.js +6 -3
- package/node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/normalizeProvider.js +2 -1
- package/node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js +2 -1
- package/node_modules/@smithy/core/dist-types/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/cbor/SmithyRpcV2CborProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/AbstractRpcV2Protocol.d.ts +45 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/RpcProtocol.d.ts +12 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/json/SmithyRpcV2JsonProtocol.d.ts +5 -14
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/protocols/protocol-http/extensions/httpExtensionConfiguration.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/retry/util-retry/race.d.ts +3 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.browser.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.d.ts +1 -0
- package/node_modules/@smithy/core/dist-types/ts3.4/submodules/serde/index.native.d.ts +1 -0
- package/node_modules/@smithy/core/package.json +2 -2
- package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +84 -29
- package/node_modules/@smithy/node-http-handler/dist-es/get-transformed-headers.js +2 -1
- package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +23 -11
- package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +26 -2
- package/node_modules/@smithy/node-http-handler/dist-es/resolve-default-socket-timeout.js +4 -0
- package/node_modules/@smithy/node-http-handler/dist-es/set-socket-timeout.js +30 -15
- package/node_modules/@smithy/node-http-handler/dist-types/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/set-socket-timeout.d.ts +10 -1
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/resolve-default-socket-timeout.d.ts +4 -0
- package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/set-socket-timeout.d.ts +10 -1
- package/node_modules/@smithy/node-http-handler/package.json +3 -3
- package/node_modules/@smithy/signature-v4/dist-cjs/index.js +23 -11
- package/node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js +4 -2
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js +5 -1
- package/node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/headerUtil.js +6 -3
- package/node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js +2 -1
- package/node_modules/@smithy/signature-v4/dist-es/prepareRequest.js +2 -1
- package/node_modules/@smithy/signature-v4/package.json +2 -2
- package/node_modules/@smithy/types/dist-types/middleware.d.ts +6 -0
- package/node_modules/@smithy/types/dist-types/ts3.4/middleware.d.ts +6 -0
- package/node_modules/@smithy/types/package.json +1 -1
- package/package.json +1 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/JsonSettings.js +0 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonCodec.js +0 -20
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonSettings.js +0 -1
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeDeserializer.js +0 -160
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js +0 -193
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.js +0 -103
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonCodec2.js +0 -20
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.js +0 -200
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v2/JsonShapeSerializer2.js +0 -519
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/detectBufferParsing.js +0 -18
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReplacer.js +0 -46
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/jsonReviver.js +0 -121
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/needsReviver.js +0 -41
- package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js +0 -89
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/JsonSettings.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -14
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -29
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -51
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -30
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -60
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReplacer.d.ts +0 -21
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/jsonReviver.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/needsReviver.d.ts +0 -11
- package/node_modules/@aws-sdk/core/dist-types/submodules/protocols/json/parseJsonBody.d.ts +0 -22
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonCodec.d.ts +0 -11
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonSettings.d.ts +0 -4
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeDeserializer.d.ts +0 -13
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v1/JsonShapeSerializer.d.ts +0 -18
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonBytesStringAdapter.d.ts +0 -27
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonCodec2.d.ts +0 -9
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeDeserializer2.d.ts +0 -15
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/codec-v2/JsonShapeSerializer2.d.ts +0 -39
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/detectBufferParsing.d.ts +0 -1
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReplacer.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/jsonReviver.d.ts +0 -7
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/needsReviver.d.ts +0 -2
- package/node_modules/@aws-sdk/core/dist-types/ts3.4/submodules/protocols/json/parseJsonBody.d.ts +0 -14
- /package/node_modules/@smithy/core/dist-es/submodules/{protocols → serde}/writeKey.js +0 -0
- /package/node_modules/@smithy/core/dist-types/submodules/{protocols → serde}/writeKey.d.ts +0 -0
- /package/node_modules/@smithy/core/dist-types/ts3.4/submodules/{protocols → serde}/writeKey.d.ts +0 -0
package/node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/codec-v1/JsonShapeSerializer.js
DELETED
|
@@ -1,193 +0,0 @@
|
|
|
1
|
-
import { determineTimestampFormat } from "@smithy/core/protocols";
|
|
2
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
-
import { dateToUtcString, generateIdempotencyToken, LazyJsonString, NumericValue, toBase64 } from "@smithy/core/serde";
|
|
4
|
-
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
5
|
-
import { JsonReplacer } from "../jsonReplacer";
|
|
6
|
-
import { writeKey } from "../../writeKey";
|
|
7
|
-
export class JsonShapeSerializer extends SerdeContextConfig {
|
|
8
|
-
settings;
|
|
9
|
-
buffer;
|
|
10
|
-
useReplacer = false;
|
|
11
|
-
rootSchema;
|
|
12
|
-
constructor(settings) {
|
|
13
|
-
super();
|
|
14
|
-
this.settings = settings;
|
|
15
|
-
}
|
|
16
|
-
write(schema, value) {
|
|
17
|
-
this.rootSchema = NormalizedSchema.of(schema);
|
|
18
|
-
this.buffer = this._write(this.rootSchema, value);
|
|
19
|
-
}
|
|
20
|
-
flush() {
|
|
21
|
-
const { rootSchema, useReplacer } = this;
|
|
22
|
-
this.rootSchema = undefined;
|
|
23
|
-
this.useReplacer = false;
|
|
24
|
-
if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) {
|
|
25
|
-
if (!useReplacer) {
|
|
26
|
-
return JSON.stringify(this.buffer);
|
|
27
|
-
}
|
|
28
|
-
const replacer = new JsonReplacer();
|
|
29
|
-
return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0));
|
|
30
|
-
}
|
|
31
|
-
return this.buffer;
|
|
32
|
-
}
|
|
33
|
-
writeDiscriminatedDocument(schema, value) {
|
|
34
|
-
this.write(schema, value);
|
|
35
|
-
if (typeof this.buffer === "object") {
|
|
36
|
-
this.buffer.__type = NormalizedSchema.of(schema).getName(true);
|
|
37
|
-
}
|
|
38
|
-
}
|
|
39
|
-
_write(schema, value, container) {
|
|
40
|
-
const isObject = value !== null && typeof value === "object";
|
|
41
|
-
const ns = NormalizedSchema.of(schema);
|
|
42
|
-
if (isObject) {
|
|
43
|
-
if (ns.isStructSchema()) {
|
|
44
|
-
const record = value;
|
|
45
|
-
const out = {};
|
|
46
|
-
const { jsonName } = this.settings;
|
|
47
|
-
let nameMap = void 0;
|
|
48
|
-
if (jsonName) {
|
|
49
|
-
nameMap = {};
|
|
50
|
-
}
|
|
51
|
-
let outCount = 0;
|
|
52
|
-
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
53
|
-
const serializableValue = this._write(memberSchema, record[memberName], ns);
|
|
54
|
-
if (serializableValue !== undefined) {
|
|
55
|
-
let targetKey = memberName;
|
|
56
|
-
if (jsonName) {
|
|
57
|
-
targetKey = memberSchema.getMergedTraits().jsonName ?? memberName;
|
|
58
|
-
nameMap[memberName] = targetKey;
|
|
59
|
-
}
|
|
60
|
-
out[targetKey] = serializableValue;
|
|
61
|
-
outCount++;
|
|
62
|
-
}
|
|
63
|
-
}
|
|
64
|
-
if (ns.isUnionSchema() && outCount === 0) {
|
|
65
|
-
const { $unknown } = record;
|
|
66
|
-
if (Array.isArray($unknown)) {
|
|
67
|
-
const [k, v] = $unknown;
|
|
68
|
-
if (k === "__proto__") {
|
|
69
|
-
writeKey(out);
|
|
70
|
-
}
|
|
71
|
-
out[k] = this._write(15, v);
|
|
72
|
-
}
|
|
73
|
-
}
|
|
74
|
-
else if (typeof record.__type === "string") {
|
|
75
|
-
for (const k in record) {
|
|
76
|
-
const v = record[k];
|
|
77
|
-
const targetKey = jsonName ? (nameMap[k] ?? k) : k;
|
|
78
|
-
if (!(targetKey in out)) {
|
|
79
|
-
out[targetKey] = this._write(15, v);
|
|
80
|
-
}
|
|
81
|
-
}
|
|
82
|
-
}
|
|
83
|
-
return out;
|
|
84
|
-
}
|
|
85
|
-
if (Array.isArray(value) && ns.isListSchema()) {
|
|
86
|
-
const listMember = ns.getValueSchema();
|
|
87
|
-
const out = [];
|
|
88
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
89
|
-
for (const item of value) {
|
|
90
|
-
if (sparse || item != null) {
|
|
91
|
-
out.push(this._write(listMember, item));
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return out;
|
|
95
|
-
}
|
|
96
|
-
if (ns.isMapSchema()) {
|
|
97
|
-
const mapMember = ns.getValueSchema();
|
|
98
|
-
const out = {};
|
|
99
|
-
const sparse = !!ns.getMergedTraits().sparse;
|
|
100
|
-
for (const _k in value) {
|
|
101
|
-
const _v = value[_k];
|
|
102
|
-
if (sparse || _v != null) {
|
|
103
|
-
if (_k === "__proto__") {
|
|
104
|
-
writeKey(out);
|
|
105
|
-
}
|
|
106
|
-
out[_k] = this._write(mapMember, _v);
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
return out;
|
|
110
|
-
}
|
|
111
|
-
if (value instanceof Uint8Array && ns.isBlobSchema()) {
|
|
112
|
-
if (ns === this.rootSchema) {
|
|
113
|
-
return value;
|
|
114
|
-
}
|
|
115
|
-
return (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
116
|
-
}
|
|
117
|
-
if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) {
|
|
118
|
-
const format = determineTimestampFormat(ns, this.settings);
|
|
119
|
-
switch (format) {
|
|
120
|
-
case 5:
|
|
121
|
-
return value.toISOString().replace(".000Z", "Z");
|
|
122
|
-
case 6:
|
|
123
|
-
return dateToUtcString(value);
|
|
124
|
-
case 7:
|
|
125
|
-
return value.getTime() / 1000;
|
|
126
|
-
default:
|
|
127
|
-
console.warn("Missing timestamp format, using epoch seconds", value);
|
|
128
|
-
return value.getTime() / 1000;
|
|
129
|
-
}
|
|
130
|
-
}
|
|
131
|
-
if (value instanceof NumericValue) {
|
|
132
|
-
this.useReplacer = true;
|
|
133
|
-
}
|
|
134
|
-
}
|
|
135
|
-
if (value === null && container?.isStructSchema()) {
|
|
136
|
-
return void 0;
|
|
137
|
-
}
|
|
138
|
-
if (ns.isStringSchema()) {
|
|
139
|
-
if (typeof value === "undefined" && ns.isIdempotencyToken()) {
|
|
140
|
-
return generateIdempotencyToken();
|
|
141
|
-
}
|
|
142
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
143
|
-
if (value != null && mediaType) {
|
|
144
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
145
|
-
if (isJson) {
|
|
146
|
-
return LazyJsonString.from(value);
|
|
147
|
-
}
|
|
148
|
-
}
|
|
149
|
-
return value;
|
|
150
|
-
}
|
|
151
|
-
if (typeof value === "number") {
|
|
152
|
-
if (Math.abs(value) === Infinity || isNaN(value)) {
|
|
153
|
-
return String(value);
|
|
154
|
-
}
|
|
155
|
-
return value;
|
|
156
|
-
}
|
|
157
|
-
if (typeof value === "string" && ns.isBlobSchema()) {
|
|
158
|
-
if (ns === this.rootSchema) {
|
|
159
|
-
return value;
|
|
160
|
-
}
|
|
161
|
-
return (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
162
|
-
}
|
|
163
|
-
if (typeof value === "bigint") {
|
|
164
|
-
this.useReplacer = true;
|
|
165
|
-
}
|
|
166
|
-
if (ns.isDocumentSchema()) {
|
|
167
|
-
if (isObject) {
|
|
168
|
-
if (value instanceof Uint8Array) {
|
|
169
|
-
return (this.serdeContext?.base64Encoder ?? toBase64)(value);
|
|
170
|
-
}
|
|
171
|
-
const out = Array.isArray(value) ? [] : {};
|
|
172
|
-
for (const k in value) {
|
|
173
|
-
const v = value[k];
|
|
174
|
-
if (k === "__proto__") {
|
|
175
|
-
writeKey(out);
|
|
176
|
-
}
|
|
177
|
-
if (v instanceof NumericValue) {
|
|
178
|
-
this.useReplacer = true;
|
|
179
|
-
out[k] = v;
|
|
180
|
-
}
|
|
181
|
-
else {
|
|
182
|
-
out[k] = this._write(ns, v);
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
return out;
|
|
186
|
-
}
|
|
187
|
-
else {
|
|
188
|
-
return structuredClone(value);
|
|
189
|
-
}
|
|
190
|
-
}
|
|
191
|
-
return value;
|
|
192
|
-
}
|
|
193
|
-
}
|
|
@@ -1,103 +0,0 @@
|
|
|
1
|
-
import { toUtf8 } from "@smithy/core/serde";
|
|
2
|
-
export class JsonBytesStringAdapter extends Uint8Array {
|
|
3
|
-
string = null;
|
|
4
|
-
static allocUnsafe(bytes) {
|
|
5
|
-
if (typeof Buffer === "function") {
|
|
6
|
-
const buffer = Buffer.allocUnsafe(bytes);
|
|
7
|
-
return new JsonBytesStringAdapter(buffer.buffer, buffer.byteOffset, buffer.byteLength);
|
|
8
|
-
}
|
|
9
|
-
return new JsonBytesStringAdapter(bytes);
|
|
10
|
-
}
|
|
11
|
-
toString() {
|
|
12
|
-
return this.s();
|
|
13
|
-
}
|
|
14
|
-
valueOf() {
|
|
15
|
-
return this.s();
|
|
16
|
-
}
|
|
17
|
-
includes(searchString, position) {
|
|
18
|
-
if (typeof searchString === "string") {
|
|
19
|
-
return this.s().includes(searchString, position);
|
|
20
|
-
}
|
|
21
|
-
return Uint8Array.prototype.includes.call(this, searchString, position);
|
|
22
|
-
}
|
|
23
|
-
indexOf(searchString, position) {
|
|
24
|
-
if (typeof searchString === "string") {
|
|
25
|
-
return this.s().indexOf(searchString, position);
|
|
26
|
-
}
|
|
27
|
-
return Uint8Array.prototype.indexOf.call(this, searchString, position);
|
|
28
|
-
}
|
|
29
|
-
lastIndexOf(searchString, position) {
|
|
30
|
-
if (typeof searchString === "string") {
|
|
31
|
-
return this.s().lastIndexOf(searchString, position);
|
|
32
|
-
}
|
|
33
|
-
const fn = Uint8Array.prototype.lastIndexOf;
|
|
34
|
-
if (position !== undefined) {
|
|
35
|
-
return fn.call(this, searchString, position);
|
|
36
|
-
}
|
|
37
|
-
return fn.call(this, searchString);
|
|
38
|
-
}
|
|
39
|
-
startsWith(searchString, position) {
|
|
40
|
-
return this.s().startsWith(searchString, position);
|
|
41
|
-
}
|
|
42
|
-
endsWith(searchString, endPosition) {
|
|
43
|
-
return this.s().endsWith(searchString, endPosition);
|
|
44
|
-
}
|
|
45
|
-
match(regexp) {
|
|
46
|
-
return this.s().match(regexp);
|
|
47
|
-
}
|
|
48
|
-
replace(searchValue, replaceValue) {
|
|
49
|
-
return this.s().replace(searchValue, replaceValue);
|
|
50
|
-
}
|
|
51
|
-
search(regexp) {
|
|
52
|
-
return this.s().search(regexp);
|
|
53
|
-
}
|
|
54
|
-
split(separator, limit) {
|
|
55
|
-
return this.s().split(separator, limit);
|
|
56
|
-
}
|
|
57
|
-
substring(start, end) {
|
|
58
|
-
return this.s().substring(start, end);
|
|
59
|
-
}
|
|
60
|
-
trim() {
|
|
61
|
-
return this.s().trim();
|
|
62
|
-
}
|
|
63
|
-
trimStart() {
|
|
64
|
-
return this.s().trimStart();
|
|
65
|
-
}
|
|
66
|
-
trimEnd() {
|
|
67
|
-
return this.s().trimEnd();
|
|
68
|
-
}
|
|
69
|
-
charAt(pos) {
|
|
70
|
-
return this.s().charAt(pos);
|
|
71
|
-
}
|
|
72
|
-
charCodeAt(index) {
|
|
73
|
-
return this.s().charCodeAt(index);
|
|
74
|
-
}
|
|
75
|
-
padStart(maxLength, fillString) {
|
|
76
|
-
return this.s().padStart(maxLength, fillString);
|
|
77
|
-
}
|
|
78
|
-
padEnd(maxLength, fillString) {
|
|
79
|
-
return this.s().padEnd(maxLength, fillString);
|
|
80
|
-
}
|
|
81
|
-
repeat(count) {
|
|
82
|
-
return this.s().repeat(count);
|
|
83
|
-
}
|
|
84
|
-
toUpperCase() {
|
|
85
|
-
return this.s().toUpperCase();
|
|
86
|
-
}
|
|
87
|
-
toLowerCase() {
|
|
88
|
-
return this.s().toLowerCase();
|
|
89
|
-
}
|
|
90
|
-
s() {
|
|
91
|
-
if (this.string == null) {
|
|
92
|
-
const n = Date.now();
|
|
93
|
-
if (n > warned + 60_000) {
|
|
94
|
-
console.warn("@aws-sdk/core/protocols - WARN - JsonCodec2: you have called a string method on a Uint8Array request body. " +
|
|
95
|
-
"It has been automatically converted to string. In a future version this will throw an error.");
|
|
96
|
-
warned = n;
|
|
97
|
-
}
|
|
98
|
-
this.string = toUtf8(this);
|
|
99
|
-
}
|
|
100
|
-
return this.string;
|
|
101
|
-
}
|
|
102
|
-
}
|
|
103
|
-
var warned = 0;
|
|
@@ -1,20 +0,0 @@
|
|
|
1
|
-
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
2
|
-
import { JsonShapeDeserializer2 } from "./JsonShapeDeserializer2";
|
|
3
|
-
import { JsonShapeSerializer2 } from "./JsonShapeSerializer2";
|
|
4
|
-
export class JsonCodec2 extends SerdeContextConfig {
|
|
5
|
-
settings;
|
|
6
|
-
constructor(settings) {
|
|
7
|
-
super();
|
|
8
|
-
this.settings = settings;
|
|
9
|
-
}
|
|
10
|
-
createSerializer() {
|
|
11
|
-
const serializer = new JsonShapeSerializer2(this.settings);
|
|
12
|
-
serializer.setSerdeContext(this.serdeContext);
|
|
13
|
-
return serializer;
|
|
14
|
-
}
|
|
15
|
-
createDeserializer() {
|
|
16
|
-
const deserializer = new JsonShapeDeserializer2(this.settings);
|
|
17
|
-
deserializer.setSerdeContext(this.serdeContext);
|
|
18
|
-
return deserializer;
|
|
19
|
-
}
|
|
20
|
-
}
|
|
@@ -1,200 +0,0 @@
|
|
|
1
|
-
import { determineTimestampFormat } from "@smithy/core/protocols";
|
|
2
|
-
import { NormalizedSchema } from "@smithy/core/schema";
|
|
3
|
-
import { fromBase64, LazyJsonString, NumericValue, parseEpochTimestamp, parseRfc3339DateTimeWithOffset, parseRfc7231DateTime, } from "@smithy/core/serde";
|
|
4
|
-
import { SerdeContextConfig } from "../../ConfigurableSerdeContext";
|
|
5
|
-
import { UnionSerde } from "../../UnionSerde";
|
|
6
|
-
import { detectBufferParsing } from "../detectBufferParsing";
|
|
7
|
-
import { jsonReviver } from "../jsonReviver";
|
|
8
|
-
import { needsReviver } from "../needsReviver";
|
|
9
|
-
import { parseJsonBody } from "../parseJsonBody";
|
|
10
|
-
import { writeKey } from "../../writeKey";
|
|
11
|
-
export class JsonShapeDeserializer2 extends SerdeContextConfig {
|
|
12
|
-
settings;
|
|
13
|
-
constructor(settings) {
|
|
14
|
-
super();
|
|
15
|
-
this.settings = settings;
|
|
16
|
-
}
|
|
17
|
-
async read(schema, data) {
|
|
18
|
-
const reviver = needsReviver(schema) ? jsonReviver : undefined;
|
|
19
|
-
let parsed;
|
|
20
|
-
if (typeof data === "string") {
|
|
21
|
-
if (data.length === 0) {
|
|
22
|
-
return {};
|
|
23
|
-
}
|
|
24
|
-
parsed = JSON.parse(data, reviver);
|
|
25
|
-
}
|
|
26
|
-
else if (data instanceof Uint8Array && detectBufferParsing()) {
|
|
27
|
-
if (data.byteLength === 0) {
|
|
28
|
-
return {};
|
|
29
|
-
}
|
|
30
|
-
const buf = Buffer.isBuffer(data) ? data : Buffer.from(data.buffer, data.byteOffset, data.byteLength);
|
|
31
|
-
parsed = JSON.parse(buf, reviver);
|
|
32
|
-
}
|
|
33
|
-
else {
|
|
34
|
-
parsed = await parseJsonBody(data, this.serdeContext, schema);
|
|
35
|
-
}
|
|
36
|
-
return this._read(schema, parsed);
|
|
37
|
-
}
|
|
38
|
-
readObject(schema, data) {
|
|
39
|
-
return this._read(schema, data);
|
|
40
|
-
}
|
|
41
|
-
_read(schema, value) {
|
|
42
|
-
const isObject = value !== null && typeof value === "object";
|
|
43
|
-
const ns = NormalizedSchema.of(schema);
|
|
44
|
-
if (isObject) {
|
|
45
|
-
if (ns.isStructSchema()) {
|
|
46
|
-
return this._readStruct(ns, value);
|
|
47
|
-
}
|
|
48
|
-
if (Array.isArray(value) && ns.isListSchema()) {
|
|
49
|
-
const listMember = ns.getValueSchema();
|
|
50
|
-
if (this.needsTransform(listMember)) {
|
|
51
|
-
for (let i = 0; i < value.length; ++i) {
|
|
52
|
-
value[i] = this._read(listMember, value[i]);
|
|
53
|
-
}
|
|
54
|
-
}
|
|
55
|
-
return value;
|
|
56
|
-
}
|
|
57
|
-
if (ns.isMapSchema()) {
|
|
58
|
-
const mapMember = ns.getValueSchema();
|
|
59
|
-
const map = value;
|
|
60
|
-
if (this.needsTransform(mapMember)) {
|
|
61
|
-
for (const k in map) {
|
|
62
|
-
if (k === "__proto__") {
|
|
63
|
-
writeKey(map);
|
|
64
|
-
}
|
|
65
|
-
map[k] = this._read(mapMember, map[k]);
|
|
66
|
-
}
|
|
67
|
-
}
|
|
68
|
-
return map;
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
if (ns.isBlobSchema() && typeof value === "string") {
|
|
72
|
-
return fromBase64(value);
|
|
73
|
-
}
|
|
74
|
-
const mediaType = ns.getMergedTraits().mediaType;
|
|
75
|
-
if (ns.isStringSchema() && typeof value === "string" && mediaType) {
|
|
76
|
-
const isJson = mediaType === "application/json" || mediaType.endsWith("+json");
|
|
77
|
-
if (isJson) {
|
|
78
|
-
return LazyJsonString.from(value);
|
|
79
|
-
}
|
|
80
|
-
return value;
|
|
81
|
-
}
|
|
82
|
-
if (ns.isTimestampSchema() && value != null) {
|
|
83
|
-
const format = determineTimestampFormat(ns, this.settings);
|
|
84
|
-
switch (format) {
|
|
85
|
-
case 5:
|
|
86
|
-
return parseRfc3339DateTimeWithOffset(value);
|
|
87
|
-
case 6:
|
|
88
|
-
return parseRfc7231DateTime(value);
|
|
89
|
-
case 7:
|
|
90
|
-
return parseEpochTimestamp(value);
|
|
91
|
-
default:
|
|
92
|
-
console.warn("Missing timestamp format, parsing value with Date constructor:", value);
|
|
93
|
-
return new Date(value);
|
|
94
|
-
}
|
|
95
|
-
}
|
|
96
|
-
if (ns.isBigIntegerSchema() && (typeof value === "number" || typeof value === "string")) {
|
|
97
|
-
return BigInt(value);
|
|
98
|
-
}
|
|
99
|
-
if (ns.isBigDecimalSchema() && value != undefined) {
|
|
100
|
-
if (value instanceof NumericValue) {
|
|
101
|
-
return value;
|
|
102
|
-
}
|
|
103
|
-
const untyped = value;
|
|
104
|
-
if (untyped.type === "bigDecimal" && "string" in untyped) {
|
|
105
|
-
return new NumericValue(untyped.string, untyped.type);
|
|
106
|
-
}
|
|
107
|
-
return new NumericValue(String(value), "bigDecimal");
|
|
108
|
-
}
|
|
109
|
-
if (ns.isNumericSchema() && typeof value === "string") {
|
|
110
|
-
switch (value) {
|
|
111
|
-
case "Infinity":
|
|
112
|
-
return Infinity;
|
|
113
|
-
case "-Infinity":
|
|
114
|
-
return -Infinity;
|
|
115
|
-
case "NaN":
|
|
116
|
-
return NaN;
|
|
117
|
-
}
|
|
118
|
-
return value;
|
|
119
|
-
}
|
|
120
|
-
if (ns.isDocumentSchema()) {
|
|
121
|
-
if (isObject) {
|
|
122
|
-
if (Array.isArray(value)) {
|
|
123
|
-
for (let i = 0; i < value.length; ++i) {
|
|
124
|
-
const v = value[i];
|
|
125
|
-
if (!(v instanceof NumericValue)) {
|
|
126
|
-
value[i] = this._read(ns, v);
|
|
127
|
-
}
|
|
128
|
-
}
|
|
129
|
-
}
|
|
130
|
-
else {
|
|
131
|
-
const doc = value;
|
|
132
|
-
for (const k in doc) {
|
|
133
|
-
if (k === "__proto__") {
|
|
134
|
-
writeKey(doc);
|
|
135
|
-
}
|
|
136
|
-
const v = doc[k];
|
|
137
|
-
if (!(v instanceof NumericValue)) {
|
|
138
|
-
doc[k] = this._read(ns, v);
|
|
139
|
-
}
|
|
140
|
-
}
|
|
141
|
-
}
|
|
142
|
-
}
|
|
143
|
-
}
|
|
144
|
-
return value;
|
|
145
|
-
}
|
|
146
|
-
_readStruct(ns, record) {
|
|
147
|
-
const union = ns.isUnionSchema();
|
|
148
|
-
const out = {};
|
|
149
|
-
let nameMap;
|
|
150
|
-
const hasType = typeof record.__type === "string";
|
|
151
|
-
const { jsonName } = this.settings;
|
|
152
|
-
if (jsonName && hasType) {
|
|
153
|
-
nameMap = {};
|
|
154
|
-
}
|
|
155
|
-
let unionSerde;
|
|
156
|
-
if (union) {
|
|
157
|
-
unionSerde = new UnionSerde(record, out);
|
|
158
|
-
}
|
|
159
|
-
for (const [memberName, memberSchema] of ns.structIterator()) {
|
|
160
|
-
let fromKey = memberName;
|
|
161
|
-
if (jsonName) {
|
|
162
|
-
fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey;
|
|
163
|
-
if (hasType) {
|
|
164
|
-
nameMap[fromKey] = memberName;
|
|
165
|
-
}
|
|
166
|
-
}
|
|
167
|
-
if (union) {
|
|
168
|
-
unionSerde.mark(fromKey);
|
|
169
|
-
}
|
|
170
|
-
if (record[fromKey] != null) {
|
|
171
|
-
out[memberName] = this._read(memberSchema, record[fromKey]);
|
|
172
|
-
}
|
|
173
|
-
}
|
|
174
|
-
if (union) {
|
|
175
|
-
unionSerde.writeUnknown();
|
|
176
|
-
}
|
|
177
|
-
else if (hasType) {
|
|
178
|
-
for (const k in record) {
|
|
179
|
-
const v = record[k];
|
|
180
|
-
const t = jsonName ? (nameMap[k] ?? k) : k;
|
|
181
|
-
if (!(t in out)) {
|
|
182
|
-
out[t] = v;
|
|
183
|
-
}
|
|
184
|
-
}
|
|
185
|
-
}
|
|
186
|
-
return out;
|
|
187
|
-
}
|
|
188
|
-
needsTransform(ns) {
|
|
189
|
-
if (ns.isBlobSchema() || ns.isTimestampSchema() || ns.isBigIntegerSchema() || ns.isBigDecimalSchema()) {
|
|
190
|
-
return true;
|
|
191
|
-
}
|
|
192
|
-
if (ns.isDocumentSchema() || ns.isStructSchema() || ns.isListSchema() || ns.isMapSchema()) {
|
|
193
|
-
return true;
|
|
194
|
-
}
|
|
195
|
-
if (ns.isStringSchema() && ns.getMergedTraits().mediaType) {
|
|
196
|
-
return true;
|
|
197
|
-
}
|
|
198
|
-
return false;
|
|
199
|
-
}
|
|
200
|
-
}
|