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
|
@@ -62,6 +62,7 @@ const writeSSOTokenToFile = (id, ssoToken) => {
|
|
|
62
62
|
};
|
|
63
63
|
|
|
64
64
|
const lastRefreshAttemptTimes = new Map();
|
|
65
|
+
const inFlightRefreshes = new Map();
|
|
65
66
|
const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
66
67
|
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
|
67
68
|
const profiles = await parseKnownFiles(init);
|
|
@@ -76,6 +77,10 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
76
77
|
throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
|
|
77
78
|
}
|
|
78
79
|
const ssoSessionName = profile["sso_session"];
|
|
80
|
+
const inFlightRefresh = inFlightRefreshes.get(ssoSessionName);
|
|
81
|
+
if (inFlightRefresh) {
|
|
82
|
+
return await inFlightRefresh;
|
|
83
|
+
}
|
|
79
84
|
const ssoSessions = await loadSsoSessionData(init);
|
|
80
85
|
const ssoSession = ssoSessions[ssoSessionName];
|
|
81
86
|
if (!ssoSession) {
|
|
@@ -105,6 +110,10 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
105
110
|
if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
|
|
106
111
|
return existingToken;
|
|
107
112
|
}
|
|
113
|
+
const inFlightRefreshAfterReadingToken = inFlightRefreshes.get(ssoSessionName);
|
|
114
|
+
if (inFlightRefreshAfterReadingToken) {
|
|
115
|
+
return await inFlightRefreshAfterReadingToken;
|
|
116
|
+
}
|
|
108
117
|
const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;
|
|
109
118
|
if (Date.now() - lastRefreshAttemptTime < 30 * 1000) {
|
|
110
119
|
validateTokenExpiry(existingToken);
|
|
@@ -113,30 +122,39 @@ const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
113
122
|
validateTokenKey("clientId", ssoToken.clientId, true);
|
|
114
123
|
validateTokenKey("clientSecret", ssoToken.clientSecret, true);
|
|
115
124
|
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
|
116
|
-
|
|
117
|
-
lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
|
|
118
|
-
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
119
|
-
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
120
|
-
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
121
|
-
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
|
|
125
|
+
const refresh = (async () => {
|
|
122
126
|
try {
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
127
|
+
lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
|
|
128
|
+
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
129
|
+
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
130
|
+
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
131
|
+
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
|
|
132
|
+
try {
|
|
133
|
+
await writeSSOTokenToFile(ssoSessionName, {
|
|
134
|
+
...ssoToken,
|
|
135
|
+
accessToken: newSsoOidcToken.accessToken,
|
|
136
|
+
expiresAt: newTokenExpiration.toISOString(),
|
|
137
|
+
refreshToken: newSsoOidcToken.refreshToken,
|
|
138
|
+
});
|
|
139
|
+
}
|
|
140
|
+
catch (error) {
|
|
141
|
+
}
|
|
142
|
+
return {
|
|
143
|
+
token: newSsoOidcToken.accessToken,
|
|
144
|
+
expiration: newTokenExpiration,
|
|
145
|
+
};
|
|
129
146
|
}
|
|
130
147
|
catch (error) {
|
|
148
|
+
validateTokenExpiry(existingToken);
|
|
149
|
+
return existingToken;
|
|
131
150
|
}
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
151
|
+
})();
|
|
152
|
+
inFlightRefreshes.set(ssoSessionName, refresh);
|
|
153
|
+
try {
|
|
154
|
+
return await refresh;
|
|
136
155
|
}
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
return existingToken;
|
|
156
|
+
finally {
|
|
157
|
+
inFlightRefreshes.delete(ssoSessionName);
|
|
140
158
|
}
|
|
141
159
|
};
|
|
142
160
|
|
|
@@ -5,6 +5,7 @@ import { validateTokenExpiry } from "./validateTokenExpiry";
|
|
|
5
5
|
import { validateTokenKey } from "./validateTokenKey";
|
|
6
6
|
import { writeSSOTokenToFile } from "./writeSSOTokenToFile";
|
|
7
7
|
const lastRefreshAttemptTimes = new Map();
|
|
8
|
+
const inFlightRefreshes = new Map();
|
|
8
9
|
export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
9
10
|
init.logger?.debug("@aws-sdk/token-providers - fromSso");
|
|
10
11
|
const profiles = await parseKnownFiles(init);
|
|
@@ -19,6 +20,10 @@ export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
19
20
|
throw new TokenProviderError(`Profile '${profileName}' is missing required property 'sso_session'.`);
|
|
20
21
|
}
|
|
21
22
|
const ssoSessionName = profile["sso_session"];
|
|
23
|
+
const inFlightRefresh = inFlightRefreshes.get(ssoSessionName);
|
|
24
|
+
if (inFlightRefresh) {
|
|
25
|
+
return await inFlightRefresh;
|
|
26
|
+
}
|
|
22
27
|
const ssoSessions = await loadSsoSessionData(init);
|
|
23
28
|
const ssoSession = ssoSessions[ssoSessionName];
|
|
24
29
|
if (!ssoSession) {
|
|
@@ -48,6 +53,10 @@ export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
48
53
|
if (existingToken.expiration.getTime() - Date.now() > EXPIRE_WINDOW_MS) {
|
|
49
54
|
return existingToken;
|
|
50
55
|
}
|
|
56
|
+
const inFlightRefreshAfterReadingToken = inFlightRefreshes.get(ssoSessionName);
|
|
57
|
+
if (inFlightRefreshAfterReadingToken) {
|
|
58
|
+
return await inFlightRefreshAfterReadingToken;
|
|
59
|
+
}
|
|
51
60
|
const lastRefreshAttemptTime = lastRefreshAttemptTimes.get(ssoSessionName) ?? 0;
|
|
52
61
|
if (Date.now() - lastRefreshAttemptTime < 30 * 1000) {
|
|
53
62
|
validateTokenExpiry(existingToken);
|
|
@@ -56,29 +65,38 @@ export const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => {
|
|
|
56
65
|
validateTokenKey("clientId", ssoToken.clientId, true);
|
|
57
66
|
validateTokenKey("clientSecret", ssoToken.clientSecret, true);
|
|
58
67
|
validateTokenKey("refreshToken", ssoToken.refreshToken, true);
|
|
59
|
-
|
|
60
|
-
lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
|
|
61
|
-
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
62
|
-
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
63
|
-
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
64
|
-
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
|
|
68
|
+
const refresh = (async () => {
|
|
65
69
|
try {
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
70
|
+
lastRefreshAttemptTimes.set(ssoSessionName, Date.now());
|
|
71
|
+
const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig);
|
|
72
|
+
validateTokenKey("accessToken", newSsoOidcToken.accessToken);
|
|
73
|
+
validateTokenKey("expiresIn", newSsoOidcToken.expiresIn);
|
|
74
|
+
const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000);
|
|
75
|
+
try {
|
|
76
|
+
await writeSSOTokenToFile(ssoSessionName, {
|
|
77
|
+
...ssoToken,
|
|
78
|
+
accessToken: newSsoOidcToken.accessToken,
|
|
79
|
+
expiresAt: newTokenExpiration.toISOString(),
|
|
80
|
+
refreshToken: newSsoOidcToken.refreshToken,
|
|
81
|
+
});
|
|
82
|
+
}
|
|
83
|
+
catch (error) {
|
|
84
|
+
}
|
|
85
|
+
return {
|
|
86
|
+
token: newSsoOidcToken.accessToken,
|
|
87
|
+
expiration: newTokenExpiration,
|
|
88
|
+
};
|
|
72
89
|
}
|
|
73
90
|
catch (error) {
|
|
91
|
+
validateTokenExpiry(existingToken);
|
|
92
|
+
return existingToken;
|
|
74
93
|
}
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
94
|
+
})();
|
|
95
|
+
inFlightRefreshes.set(ssoSessionName, refresh);
|
|
96
|
+
try {
|
|
97
|
+
return await refresh;
|
|
79
98
|
}
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
return existingToken;
|
|
99
|
+
finally {
|
|
100
|
+
inFlightRefreshes.delete(ssoSessionName);
|
|
83
101
|
}
|
|
84
102
|
};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/token-providers",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.1164.0",
|
|
4
4
|
"description": "A collection of token providers",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"aws",
|
|
@@ -48,10 +48,10 @@
|
|
|
48
48
|
"test:integration:watch": "yarn g:vitest watch -c vitest.config.integ.mts"
|
|
49
49
|
},
|
|
50
50
|
"dependencies": {
|
|
51
|
-
"@aws-sdk/core": "^3.
|
|
52
|
-
"@aws-sdk/nested-clients": "^3.
|
|
53
|
-
"@aws-sdk/types": "^3.
|
|
54
|
-
"@smithy/core": "^3.
|
|
51
|
+
"@aws-sdk/core": "^3.980.1",
|
|
52
|
+
"@aws-sdk/nested-clients": "^3.998.1",
|
|
53
|
+
"@aws-sdk/types": "^3.975.0",
|
|
54
|
+
"@smithy/core": "^3.38.0",
|
|
55
55
|
"@smithy/types": "^4.19.0",
|
|
56
56
|
"tslib": "^2.6.2"
|
|
57
57
|
},
|
|
@@ -8,6 +8,9 @@ export type AwsSdkFeatures = Partial<{
|
|
|
8
8
|
RETRY_MODE_LEGACY: "D";
|
|
9
9
|
RETRY_MODE_STANDARD: "E";
|
|
10
10
|
RETRY_MODE_ADAPTIVE: "F";
|
|
11
|
+
S3_TRANSFER: "G";
|
|
12
|
+
S3_TRANSFER_UPLOAD_DIRECTORY: "9";
|
|
13
|
+
S3_TRANSFER_DOWNLOAD_DIRECTORY: "+";
|
|
11
14
|
S3_EXPRESS_BUCKET: "J";
|
|
12
15
|
S3_ACCESS_GRANTS: "K";
|
|
13
16
|
GZIP_REQUEST_COMPRESSION: "L";
|
|
@@ -5,6 +5,9 @@ export type AwsSdkFeatures = Partial<{
|
|
|
5
5
|
RETRY_MODE_LEGACY: "D";
|
|
6
6
|
RETRY_MODE_STANDARD: "E";
|
|
7
7
|
RETRY_MODE_ADAPTIVE: "F";
|
|
8
|
+
S3_TRANSFER: "G";
|
|
9
|
+
S3_TRANSFER_UPLOAD_DIRECTORY: "9";
|
|
10
|
+
S3_TRANSFER_DOWNLOAD_DIRECTORY: "+";
|
|
8
11
|
S3_EXPRESS_BUCKET: "J";
|
|
9
12
|
S3_ACCESS_GRANTS: "K";
|
|
10
13
|
GZIP_REQUEST_COMPRESSION: "L";
|
|
@@ -139,8 +139,9 @@ const getHttpSigningPlugin = (config) => ({
|
|
|
139
139
|
});
|
|
140
140
|
|
|
141
141
|
const normalizeProvider = (input) => {
|
|
142
|
-
if (typeof input === "function")
|
|
142
|
+
if (typeof input === "function") {
|
|
143
143
|
return input;
|
|
144
|
+
}
|
|
144
145
|
const promisified = Promise.resolve(input);
|
|
145
146
|
return () => promisified;
|
|
146
147
|
};
|
|
@@ -203,8 +204,9 @@ class DefaultIdentityProviderConfig {
|
|
|
203
204
|
authSchemes = new Map();
|
|
204
205
|
constructor(config) {
|
|
205
206
|
for (const key in config) {
|
|
206
|
-
if (!hasOwn(config, key))
|
|
207
|
+
if (!hasOwn(config, key)) {
|
|
207
208
|
continue;
|
|
209
|
+
}
|
|
208
210
|
const value = config[key];
|
|
209
211
|
if (value !== undefined) {
|
|
210
212
|
this.authSchemes.set(key, value);
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
const { nv, NumericValue, calculateBodyLength, generateIdempotencyToken, fromBase64, _parseEpochTimestamp } = require("@smithy/core/serde");
|
|
2
|
-
const { hasOwn
|
|
3
|
-
const { HttpRequest, collectBody, SerdeContext,
|
|
4
|
-
const { NormalizedSchema,
|
|
2
|
+
const { hasOwn } = require("@smithy/core/transport");
|
|
3
|
+
const { HttpRequest, collectBody, SerdeContext, AbstractRpcV2Protocol } = require("@smithy/core/protocols");
|
|
4
|
+
const { NormalizedSchema, TypeRegistry } = require("@smithy/core/schema");
|
|
5
5
|
|
|
6
6
|
const majorUint64 = 0;
|
|
7
7
|
const majorNegativeInt64 = 1;
|
|
@@ -931,8 +931,9 @@ const buildHttpRpcRequest = async (context, headers, path, resolvedHostname, bod
|
|
|
931
931
|
}
|
|
932
932
|
if (endpoint.headers) {
|
|
933
933
|
for (const name in endpoint.headers) {
|
|
934
|
-
if (!hasOwn(endpoint.headers, name))
|
|
934
|
+
if (!hasOwn(endpoint.headers, name)) {
|
|
935
935
|
continue;
|
|
936
|
+
}
|
|
936
937
|
contents.headers[name] = endpoint.headers[name];
|
|
937
938
|
}
|
|
938
939
|
}
|
|
@@ -1193,8 +1194,9 @@ function writeStruct(ns, value, serdeContext) {
|
|
|
1193
1194
|
}
|
|
1194
1195
|
if (typeof value.__type === "string") {
|
|
1195
1196
|
for (const k in value) {
|
|
1196
|
-
if (!hasOwn(value, k))
|
|
1197
|
+
if (!hasOwn(value, k)) {
|
|
1197
1198
|
continue;
|
|
1199
|
+
}
|
|
1198
1200
|
if (!memberNames.includes(k)) {
|
|
1199
1201
|
writeString(k);
|
|
1200
1202
|
writeUntypedValue(value[k]);
|
|
@@ -1260,8 +1262,9 @@ function writeMap(ns, value, isDocument, serdeContext) {
|
|
|
1260
1262
|
const valueSchema = ns.getValueSchema();
|
|
1261
1263
|
const keys = [];
|
|
1262
1264
|
for (const k in value) {
|
|
1263
|
-
if (!hasOwn(value, k))
|
|
1265
|
+
if (!hasOwn(value, k)) {
|
|
1264
1266
|
continue;
|
|
1267
|
+
}
|
|
1265
1268
|
const v = value[k];
|
|
1266
1269
|
if (isDocument ? v !== undefined : v != null || sparse) {
|
|
1267
1270
|
keys.push(k);
|
|
@@ -1675,8 +1678,9 @@ function readStruct(ns, count, startPos) {
|
|
|
1675
1678
|
if (isUnion) {
|
|
1676
1679
|
let resultEmpty = true;
|
|
1677
1680
|
for (const _ in result) {
|
|
1678
|
-
if (!hasOwn(result, _))
|
|
1681
|
+
if (!hasOwn(result, _)) {
|
|
1679
1682
|
continue;
|
|
1683
|
+
}
|
|
1680
1684
|
resultEmpty = false;
|
|
1681
1685
|
break;
|
|
1682
1686
|
}
|
|
@@ -1845,8 +1849,9 @@ function readMapIndefinite(ns) {
|
|
|
1845
1849
|
if (isUnion) {
|
|
1846
1850
|
let resultEmpty = true;
|
|
1847
1851
|
for (const _ in result) {
|
|
1848
|
-
if (!hasOwn(result, _))
|
|
1852
|
+
if (!hasOwn(result, _)) {
|
|
1849
1853
|
continue;
|
|
1854
|
+
}
|
|
1850
1855
|
resultEmpty = false;
|
|
1851
1856
|
break;
|
|
1852
1857
|
}
|
|
@@ -2151,8 +2156,9 @@ function transformObject(ns, value) {
|
|
|
2151
2156
|
if (ns.isMapSchema()) {
|
|
2152
2157
|
const targetSchema = ns.getValueSchema();
|
|
2153
2158
|
for (const key in value) {
|
|
2154
|
-
if (!hasOwn(value, key))
|
|
2159
|
+
if (!hasOwn(value, key)) {
|
|
2155
2160
|
continue;
|
|
2161
|
+
}
|
|
2156
2162
|
newObject[key] = transformObject(targetSchema, value[key]);
|
|
2157
2163
|
}
|
|
2158
2164
|
}
|
|
@@ -2162,8 +2168,9 @@ function transformObject(ns, value) {
|
|
|
2162
2168
|
if (isUnion) {
|
|
2163
2169
|
keys = new Set();
|
|
2164
2170
|
for (const k in value) {
|
|
2165
|
-
if (!hasOwn(value, k))
|
|
2171
|
+
if (!hasOwn(value, k)) {
|
|
2166
2172
|
continue;
|
|
2173
|
+
}
|
|
2167
2174
|
if (k !== "__type") {
|
|
2168
2175
|
keys.add(k);
|
|
2169
2176
|
}
|
|
@@ -2180,8 +2187,9 @@ function transformObject(ns, value) {
|
|
|
2180
2187
|
if (isUnion && keys?.size === 1) {
|
|
2181
2188
|
let newObjectEmpty = true;
|
|
2182
2189
|
for (const _ in newObject) {
|
|
2183
|
-
if (!hasOwn(newObject, _))
|
|
2190
|
+
if (!hasOwn(newObject, _)) {
|
|
2184
2191
|
continue;
|
|
2192
|
+
}
|
|
2185
2193
|
newObjectEmpty = false;
|
|
2186
2194
|
break;
|
|
2187
2195
|
}
|
|
@@ -2192,8 +2200,9 @@ function transformObject(ns, value) {
|
|
|
2192
2200
|
}
|
|
2193
2201
|
else if (typeof value.__type === "string") {
|
|
2194
2202
|
for (const k in value) {
|
|
2195
|
-
if (!hasOwn(value, k))
|
|
2203
|
+
if (!hasOwn(value, k)) {
|
|
2196
2204
|
continue;
|
|
2205
|
+
}
|
|
2197
2206
|
if (!(k in newObject)) {
|
|
2198
2207
|
newObject[k] = value[k];
|
|
2199
2208
|
}
|
|
@@ -2216,51 +2225,27 @@ class CborCodec extends SerdeContext {
|
|
|
2216
2225
|
}
|
|
2217
2226
|
}
|
|
2218
2227
|
|
|
2219
|
-
class SmithyRpcV2CborProtocol extends
|
|
2228
|
+
class SmithyRpcV2CborProtocol extends AbstractRpcV2Protocol {
|
|
2220
2229
|
codec = new CborCodec();
|
|
2221
2230
|
serializer = this.codec.createSerializer();
|
|
2222
2231
|
deserializer = this.codec.createDeserializer();
|
|
2223
|
-
constructor({ defaultNamespace, errorTypeRegistries, }) {
|
|
2224
|
-
super({ defaultNamespace, errorTypeRegistries });
|
|
2225
|
-
}
|
|
2226
2232
|
getShapeId() {
|
|
2227
2233
|
return "smithy.protocols#rpcv2Cbor";
|
|
2228
2234
|
}
|
|
2229
2235
|
getPayloadCodec() {
|
|
2230
2236
|
return this.codec;
|
|
2231
2237
|
}
|
|
2232
|
-
|
|
2233
|
-
|
|
2234
|
-
|
|
2235
|
-
|
|
2236
|
-
|
|
2237
|
-
|
|
2238
|
-
|
|
2239
|
-
if (deref(operationSchema.input) === "unit") {
|
|
2240
|
-
delete request.body;
|
|
2241
|
-
delete request.headers["content-type"];
|
|
2242
|
-
}
|
|
2243
|
-
else {
|
|
2244
|
-
if (!request.body) {
|
|
2245
|
-
this.serializer.write(15, {});
|
|
2246
|
-
request.body = this.serializer.flush();
|
|
2247
|
-
}
|
|
2248
|
-
if (request.body instanceof Uint8Array) {
|
|
2249
|
-
request.headers["content-length"] = String(request.body.byteLength);
|
|
2250
|
-
}
|
|
2251
|
-
}
|
|
2252
|
-
const { service, operation } = getSmithyContext(context);
|
|
2253
|
-
const path = `/service/${service}/operation/${operation}`;
|
|
2254
|
-
if (request.path.endsWith("/")) {
|
|
2255
|
-
request.path += path.slice(1);
|
|
2238
|
+
getSmithyProtocolHeaderValue() {
|
|
2239
|
+
return "rpc-v2-cbor";
|
|
2240
|
+
}
|
|
2241
|
+
applyEmptyBody(request) {
|
|
2242
|
+
if (!request.body) {
|
|
2243
|
+
this.serializer.write(15, {});
|
|
2244
|
+
request.body = this.serializer.flush();
|
|
2256
2245
|
}
|
|
2257
|
-
|
|
2258
|
-
request.
|
|
2246
|
+
if (request.body instanceof Uint8Array) {
|
|
2247
|
+
request.headers["content-length"] = String(request.body.byteLength);
|
|
2259
2248
|
}
|
|
2260
|
-
return request;
|
|
2261
|
-
}
|
|
2262
|
-
async deserializeResponse(operationSchema, context, response) {
|
|
2263
|
-
return super.deserializeResponse(operationSchema, context, response);
|
|
2264
2249
|
}
|
|
2265
2250
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
2266
2251
|
const errorIdentifier = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
|
@@ -2356,8 +2341,9 @@ class CborShapeSerializer extends SerdeContext {
|
|
|
2356
2341
|
if (ns.isMapSchema()) {
|
|
2357
2342
|
const sparse = !!ns.getMergedTraits().sparse;
|
|
2358
2343
|
for (const key in sourceObject) {
|
|
2359
|
-
if (!hasOwn(sourceObject, key))
|
|
2344
|
+
if (!hasOwn(sourceObject, key)) {
|
|
2360
2345
|
continue;
|
|
2346
|
+
}
|
|
2361
2347
|
const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
2362
2348
|
if (value != null || sparse) {
|
|
2363
2349
|
newObject[key] = value;
|
|
@@ -2378,8 +2364,9 @@ class CborShapeSerializer extends SerdeContext {
|
|
|
2378
2364
|
}
|
|
2379
2365
|
else if (typeof sourceObject.__type === "string") {
|
|
2380
2366
|
for (const k in sourceObject) {
|
|
2381
|
-
if (!hasOwn(sourceObject, k))
|
|
2367
|
+
if (!hasOwn(sourceObject, k)) {
|
|
2382
2368
|
continue;
|
|
2369
|
+
}
|
|
2383
2370
|
if (!(k in newObject)) {
|
|
2384
2371
|
newObject[k] = this.serialize(15, sourceObject[k]);
|
|
2385
2372
|
}
|
|
@@ -2396,8 +2383,9 @@ class CborShapeSerializer extends SerdeContext {
|
|
|
2396
2383
|
return newArray;
|
|
2397
2384
|
}
|
|
2398
2385
|
for (const key in sourceObject) {
|
|
2399
|
-
if (!hasOwn(sourceObject, key))
|
|
2386
|
+
if (!hasOwn(sourceObject, key)) {
|
|
2400
2387
|
continue;
|
|
2388
|
+
}
|
|
2401
2389
|
newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
|
2402
2390
|
}
|
|
2403
2391
|
}
|
|
@@ -2472,8 +2460,9 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2472
2460
|
if (ns.isMapSchema()) {
|
|
2473
2461
|
const targetSchema = ns.getValueSchema();
|
|
2474
2462
|
for (const key in value) {
|
|
2475
|
-
if (!hasOwn(value, key))
|
|
2463
|
+
if (!hasOwn(value, key)) {
|
|
2476
2464
|
continue;
|
|
2465
|
+
}
|
|
2477
2466
|
const itemValue = this.readValue(targetSchema, value[key]);
|
|
2478
2467
|
newObject[key] = itemValue;
|
|
2479
2468
|
}
|
|
@@ -2484,8 +2473,9 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2484
2473
|
if (isUnion) {
|
|
2485
2474
|
keys = new Set();
|
|
2486
2475
|
for (const k in value) {
|
|
2487
|
-
if (!hasOwn(value, k))
|
|
2476
|
+
if (!hasOwn(value, k)) {
|
|
2488
2477
|
continue;
|
|
2478
|
+
}
|
|
2489
2479
|
if (k !== "__type") {
|
|
2490
2480
|
keys.add(k);
|
|
2491
2481
|
}
|
|
@@ -2502,8 +2492,9 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2502
2492
|
if (isUnion && keys?.size === 1) {
|
|
2503
2493
|
let newObjectEmpty = true;
|
|
2504
2494
|
for (const _ in newObject) {
|
|
2505
|
-
if (!hasOwn(newObject, _))
|
|
2495
|
+
if (!hasOwn(newObject, _)) {
|
|
2506
2496
|
continue;
|
|
2497
|
+
}
|
|
2507
2498
|
newObjectEmpty = false;
|
|
2508
2499
|
break;
|
|
2509
2500
|
}
|
|
@@ -2514,8 +2505,9 @@ class CborShapeDeserializer extends SerdeContext {
|
|
|
2514
2505
|
}
|
|
2515
2506
|
else if (typeof value.__type === "string") {
|
|
2516
2507
|
for (const k in value) {
|
|
2517
|
-
if (!hasOwn(value, k))
|
|
2508
|
+
if (!hasOwn(value, k)) {
|
|
2518
2509
|
continue;
|
|
2510
|
+
}
|
|
2519
2511
|
if (!(k in newObject)) {
|
|
2520
2512
|
newObject[k] = value[k];
|
|
2521
2513
|
}
|