diff --git a/dist/136.index.js b/dist/136.index.js index d50e461..6ef110a 100644 --- a/dist/136.index.js +++ b/dist/136.index.js @@ -215,7 +215,7 @@ exports.commonParams = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __webpack_require__(3068); +const util_endpoints_1 = __webpack_require__(6707); const util_endpoints_2 = __webpack_require__(9674); const ruleset_1 = __webpack_require__(1670); const cache = new util_endpoints_2.EndpointCache({ @@ -257,312 +257,11 @@ var STSClient = __webpack_require__(3723); var smithyClient = __webpack_require__(1411); var middlewareEndpoint = __webpack_require__(99); var EndpointParameters = __webpack_require__(6811); -var schema = __webpack_require__(6890); +var schemas_0 = __webpack_require__(1684); +var errors = __webpack_require__(1688); var client = __webpack_require__(5152); var regionConfigResolver = __webpack_require__(6463); - -let STSServiceException$1 = class STSServiceException extends smithyClient.ServiceException { - constructor(options) { - super(options); - Object.setPrototypeOf(this, STSServiceException.prototype); - } -}; - -let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceException$1 { - name = "ExpiredTokenException"; - $fault = "client"; - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ExpiredTokenException.prototype); - } -}; -let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException extends STSServiceException$1 { - name = "MalformedPolicyDocumentException"; - $fault = "client"; - constructor(opts) { - super({ - name: "MalformedPolicyDocumentException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); - } -}; -let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extends STSServiceException$1 { - name = "PackedPolicyTooLargeException"; - $fault = "client"; - constructor(opts) { - super({ - name: "PackedPolicyTooLargeException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype); - } -}; -let RegionDisabledException$1 = class RegionDisabledException extends STSServiceException$1 { - name = "RegionDisabledException"; - $fault = "client"; - constructor(opts) { - super({ - name: "RegionDisabledException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, RegionDisabledException.prototype); - } -}; -let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSServiceException$1 { - name = "IDPRejectedClaimException"; - $fault = "client"; - constructor(opts) { - super({ - name: "IDPRejectedClaimException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, IDPRejectedClaimException.prototype); - } -}; -let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extends STSServiceException$1 { - name = "InvalidIdentityTokenException"; - $fault = "client"; - constructor(opts) { - super({ - name: "InvalidIdentityTokenException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype); - } -}; -let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException extends STSServiceException$1 { - name = "IDPCommunicationErrorException"; - $fault = "client"; - constructor(opts) { - super({ - name: "IDPCommunicationErrorException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); - } -}; - -const _A = "Arn"; -const _AKI = "AccessKeyId"; -const _AR = "AssumeRole"; -const _ARI = "AssumedRoleId"; -const _ARR = "AssumeRoleRequest"; -const _ARRs = "AssumeRoleResponse"; -const _ARU = "AssumedRoleUser"; -const _ARWWI = "AssumeRoleWithWebIdentity"; -const _ARWWIR = "AssumeRoleWithWebIdentityRequest"; -const _ARWWIRs = "AssumeRoleWithWebIdentityResponse"; -const _Au = "Audience"; -const _C = "Credentials"; -const _CA = "ContextAssertion"; -const _DS = "DurationSeconds"; -const _E = "Expiration"; -const _EI = "ExternalId"; -const _ETE = "ExpiredTokenException"; -const _IDPCEE = "IDPCommunicationErrorException"; -const _IDPRCE = "IDPRejectedClaimException"; -const _IITE = "InvalidIdentityTokenException"; -const _K = "Key"; -const _MPDE = "MalformedPolicyDocumentException"; -const _P = "Policy"; -const _PA = "PolicyArns"; -const _PAr = "ProviderArn"; -const _PC = "ProvidedContexts"; -const _PCLT = "ProvidedContextsListType"; -const _PCr = "ProvidedContext"; -const _PDT = "PolicyDescriptorType"; -const _PI = "ProviderId"; -const _PPS = "PackedPolicySize"; -const _PPTLE = "PackedPolicyTooLargeException"; -const _Pr = "Provider"; -const _RA = "RoleArn"; -const _RDE = "RegionDisabledException"; -const _RSN = "RoleSessionName"; -const _SAK = "SecretAccessKey"; -const _SFWIT = "SubjectFromWebIdentityToken"; -const _SI = "SourceIdentity"; -const _SN = "SerialNumber"; -const _ST = "SessionToken"; -const _T = "Tags"; -const _TC = "TokenCode"; -const _TTK = "TransitiveTagKeys"; -const _Ta = "Tag"; -const _V = "Value"; -const _WIT = "WebIdentityToken"; -const _a = "arn"; -const _aKST = "accessKeySecretType"; -const _aQE = "awsQueryError"; -const _c = "client"; -const _cTT = "clientTokenType"; -const _e = "error"; -const _hE = "httpError"; -const _m = "message"; -const _pDLT = "policyDescriptorListType"; -const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts"; -const _tLT = "tagListType"; -const n0 = "com.amazonaws.sts"; -var accessKeySecretType = [0, n0, _aKST, 8, 0]; -var clientTokenType = [0, n0, _cTT, 8, 0]; -var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]]; -var AssumeRoleRequest = [ - 3, - n0, - _ARR, - 0, - [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC], - [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType], -]; -var AssumeRoleResponse = [ - 3, - n0, - _ARRs, - 0, - [_C, _ARU, _PPS, _SI], - [[() => Credentials, 0], () => AssumedRoleUser, 1, 0], -]; -var AssumeRoleWithWebIdentityRequest = [ - 3, - n0, - _ARWWIR, - 0, - [_RA, _RSN, _WIT, _PI, _PA, _P, _DS], - [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1], -]; -var AssumeRoleWithWebIdentityResponse = [ - 3, - n0, - _ARWWIRs, - 0, - [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI], - [[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0], -]; -var Credentials = [ - 3, - n0, - _C, - 0, - [_AKI, _SAK, _ST, _E], - [0, [() => accessKeySecretType, 0], 0, 4], -]; -var ExpiredTokenException = [ - -3, - n0, - _ETE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`ExpiredTokenException`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1); -var IDPCommunicationErrorException = [ - -3, - n0, - _IDPCEE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`IDPCommunicationError`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException, IDPCommunicationErrorException$1); -var IDPRejectedClaimException = [ - -3, - n0, - _IDPRCE, - { - [_e]: _c, - [_hE]: 403, - [_aQE]: [`IDPRejectedClaim`, 403], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException, IDPRejectedClaimException$1); -var InvalidIdentityTokenException = [ - -3, - n0, - _IITE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`InvalidIdentityToken`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, InvalidIdentityTokenException$1); -var MalformedPolicyDocumentException = [ - -3, - n0, - _MPDE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`MalformedPolicyDocument`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, MalformedPolicyDocumentException$1); -var PackedPolicyTooLargeException = [ - -3, - n0, - _PPTLE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`PackedPolicyTooLarge`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException, PackedPolicyTooLargeException$1); -var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]]; -var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]]; -var RegionDisabledException = [ - -3, - n0, - _RDE, - { - [_e]: _c, - [_hE]: 403, - [_aQE]: [`RegionDisabledException`, 403], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(RegionDisabledException, RegionDisabledException$1); -var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]]; -var STSServiceException = [-3, _s, "STSServiceException", 0, [], []]; -schema.TypeRegistry.for(_s).registerError(STSServiceException, STSServiceException$1); -var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType]; -var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext]; -var tagListType = [1, n0, _tLT, 0, () => Tag]; -var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse]; -var AssumeRoleWithWebIdentity = [ - 9, - n0, - _ARWWI, - 0, - () => AssumeRoleWithWebIdentityRequest, - () => AssumeRoleWithWebIdentityResponse, -]; +var STSServiceException = __webpack_require__(7171); class AssumeRoleCommand extends smithyClient.Command .classBuilder() @@ -572,7 +271,7 @@ class AssumeRoleCommand extends smithyClient.Command }) .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}) .n("STSClient", "AssumeRoleCommand") - .sc(AssumeRole) + .sc(schemas_0.AssumeRole$) .build() { } @@ -584,7 +283,7 @@ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command }) .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}) .n("STSClient", "AssumeRoleWithWebIdentityCommand") - .sc(AssumeRoleWithWebIdentity) + .sc(schemas_0.AssumeRoleWithWebIdentity$) .build() { } @@ -608,9 +307,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => { const region = typeof _region === "function" ? await _region() : _region; const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; - const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)(); + let stsDefaultRegion = ""; + const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)()); credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`); - return region ?? parentRegion ?? stsDefaultRegion; + return resolvedRegion; }; const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => { let stsClient; @@ -719,17 +419,13 @@ Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithyClient.Command; } })); +Object.defineProperty(exports, "STSServiceException", ({ + enumerable: true, + get: function () { return STSServiceException.STSServiceException; } +})); exports.AssumeRoleCommand = AssumeRoleCommand; exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; -exports.ExpiredTokenException = ExpiredTokenException$1; -exports.IDPCommunicationErrorException = IDPCommunicationErrorException$1; -exports.IDPRejectedClaimException = IDPRejectedClaimException$1; -exports.InvalidIdentityTokenException = InvalidIdentityTokenException$1; -exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException$1; -exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException$1; -exports.RegionDisabledException = RegionDisabledException$1; exports.STS = STS; -exports.STSServiceException = STSServiceException$1; exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; exports.getDefaultRoleAssumer = getDefaultRoleAssumer; exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; @@ -739,6 +435,139 @@ Object.keys(STSClient).forEach(function (k) { get: function () { return STSClient[k]; } }); }); +Object.keys(schemas_0).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return schemas_0[k]; } + }); +}); +Object.keys(errors).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return errors[k]; } + }); +}); + + +/***/ }), + +/***/ 7171: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STSServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __webpack_require__(1411); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +class STSServiceException extends smithy_client_1.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, STSServiceException.prototype); + } +} +exports.STSServiceException = STSServiceException; + + +/***/ }), + +/***/ 1688: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0; +const STSServiceException_1 = __webpack_require__(7171); +class ExpiredTokenException extends STSServiceException_1.STSServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ExpiredTokenException.prototype); + } +} +exports.ExpiredTokenException = ExpiredTokenException; +class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException { + name = "MalformedPolicyDocumentException"; + $fault = "client"; + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); + } +} +exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException; +class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException { + name = "PackedPolicyTooLargeException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype); + } +} +exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException; +class RegionDisabledException extends STSServiceException_1.STSServiceException { + name = "RegionDisabledException"; + $fault = "client"; + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, RegionDisabledException.prototype); + } +} +exports.RegionDisabledException = RegionDisabledException; +class IDPRejectedClaimException extends STSServiceException_1.STSServiceException { + name = "IDPRejectedClaimException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IDPRejectedClaimException.prototype); + } +} +exports.IDPRejectedClaimException = IDPRejectedClaimException; +class InvalidIdentityTokenException extends STSServiceException_1.STSServiceException { + name = "InvalidIdentityTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype); + } +} +exports.InvalidIdentityTokenException = InvalidIdentityTokenException; +class IDPCommunicationErrorException extends STSServiceException_1.STSServiceException { + name = "IDPCommunicationErrorException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); + } +} +exports.IDPCommunicationErrorException = IDPCommunicationErrorException; /***/ }), @@ -758,15 +587,14 @@ const core_2 = __webpack_require__(402); const hash_node_1 = __webpack_require__(2711); const middleware_retry_1 = __webpack_require__(9618); const node_config_provider_1 = __webpack_require__(5704); -const node_http_handler_1 = __webpack_require__(1279); +const node_http_handler_1 = __webpack_require__(2764); +const smithy_client_1 = __webpack_require__(1411); const util_body_length_node_1 = __webpack_require__(3638); +const util_defaults_mode_node_1 = __webpack_require__(5435); const util_retry_1 = __webpack_require__(5518); const runtimeConfig_shared_1 = __webpack_require__(4443); -const smithy_client_1 = __webpack_require__(1411); -const util_defaults_mode_node_1 = __webpack_require__(5435); -const smithy_client_2 = __webpack_require__(1411); const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); @@ -833,6 +661,7 @@ const util_base64_1 = __webpack_require__(8385); const util_utf8_1 = __webpack_require__(1577); const httpAuthSchemeProvider_1 = __webpack_require__(7851); const endpointResolver_1 = __webpack_require__(9765); +const schemas_0_1 = __webpack_require__(1684); const getRuntimeConfig = (config) => { return { apiVersion: "2011-06-15", @@ -855,12 +684,14 @@ const getRuntimeConfig = (config) => { }, ], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - protocol: config?.protocol ?? - new protocols_1.AwsQueryProtocol({ - defaultNamespace: "com.amazonaws.sts", - xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/", - version: "2011-06-15", - }), + protocol: config?.protocol ?? protocols_1.AwsQueryProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.sts", + errorTypeRegistries: schemas_0_1.errorTypeRegistries, + xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/", + version: "2011-06-15", + serviceTarget: "AWSSecurityTokenServiceV20110615", + }, serviceId: config?.serviceId ?? "STS", urlParser: config?.urlParser ?? url_parser_1.parseUrl, utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, @@ -892,10 +723,205 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions; /***/ }), -/***/ 9955: -/***/ ((module) => { +/***/ 1684: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleWithWebIdentity$ = exports.AssumeRole$ = exports.Tag$ = exports.ProvidedContext$ = exports.PolicyDescriptorType$ = exports.Credentials$ = exports.AssumeRoleWithWebIdentityResponse$ = exports.AssumeRoleWithWebIdentityRequest$ = exports.AssumeRoleResponse$ = exports.AssumeRoleRequest$ = exports.AssumedRoleUser$ = exports.errorTypeRegistries = exports.RegionDisabledException$ = exports.PackedPolicyTooLargeException$ = exports.MalformedPolicyDocumentException$ = exports.InvalidIdentityTokenException$ = exports.IDPRejectedClaimException$ = exports.IDPCommunicationErrorException$ = exports.ExpiredTokenException$ = exports.STSServiceException$ = void 0; +const _A = "Arn"; +const _AKI = "AccessKeyId"; +const _AR = "AssumeRole"; +const _ARI = "AssumedRoleId"; +const _ARR = "AssumeRoleRequest"; +const _ARRs = "AssumeRoleResponse"; +const _ARU = "AssumedRoleUser"; +const _ARWWI = "AssumeRoleWithWebIdentity"; +const _ARWWIR = "AssumeRoleWithWebIdentityRequest"; +const _ARWWIRs = "AssumeRoleWithWebIdentityResponse"; +const _Au = "Audience"; +const _C = "Credentials"; +const _CA = "ContextAssertion"; +const _DS = "DurationSeconds"; +const _E = "Expiration"; +const _EI = "ExternalId"; +const _ETE = "ExpiredTokenException"; +const _IDPCEE = "IDPCommunicationErrorException"; +const _IDPRCE = "IDPRejectedClaimException"; +const _IITE = "InvalidIdentityTokenException"; +const _K = "Key"; +const _MPDE = "MalformedPolicyDocumentException"; +const _P = "Policy"; +const _PA = "PolicyArns"; +const _PAr = "ProviderArn"; +const _PC = "ProvidedContexts"; +const _PCLT = "ProvidedContextsListType"; +const _PCr = "ProvidedContext"; +const _PDT = "PolicyDescriptorType"; +const _PI = "ProviderId"; +const _PPS = "PackedPolicySize"; +const _PPTLE = "PackedPolicyTooLargeException"; +const _Pr = "Provider"; +const _RA = "RoleArn"; +const _RDE = "RegionDisabledException"; +const _RSN = "RoleSessionName"; +const _SAK = "SecretAccessKey"; +const _SFWIT = "SubjectFromWebIdentityToken"; +const _SI = "SourceIdentity"; +const _SN = "SerialNumber"; +const _ST = "SessionToken"; +const _T = "Tags"; +const _TC = "TokenCode"; +const _TTK = "TransitiveTagKeys"; +const _Ta = "Tag"; +const _V = "Value"; +const _WIT = "WebIdentityToken"; +const _a = "arn"; +const _aKST = "accessKeySecretType"; +const _aQE = "awsQueryError"; +const _c = "client"; +const _cTT = "clientTokenType"; +const _e = "error"; +const _hE = "httpError"; +const _m = "message"; +const _pDLT = "policyDescriptorListType"; +const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts"; +const _tLT = "tagListType"; +const n0 = "com.amazonaws.sts"; +const schema_1 = __webpack_require__(6890); +const errors_1 = __webpack_require__(1688); +const STSServiceException_1 = __webpack_require__(7171); +const _s_registry = schema_1.TypeRegistry.for(_s); +exports.STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []]; +_s_registry.registerError(exports.STSServiceException$, STSServiceException_1.STSServiceException); +const n0_registry = schema_1.TypeRegistry.for(n0); +exports.ExpiredTokenException$ = [ + -3, + n0, + _ETE, + { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.ExpiredTokenException$, errors_1.ExpiredTokenException); +exports.IDPCommunicationErrorException$ = [ + -3, + n0, + _IDPCEE, + { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.IDPCommunicationErrorException$, errors_1.IDPCommunicationErrorException); +exports.IDPRejectedClaimException$ = [ + -3, + n0, + _IDPRCE, + { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 }, + [_m], + [0], +]; +n0_registry.registerError(exports.IDPRejectedClaimException$, errors_1.IDPRejectedClaimException); +exports.InvalidIdentityTokenException$ = [ + -3, + n0, + _IITE, + { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.InvalidIdentityTokenException$, errors_1.InvalidIdentityTokenException); +exports.MalformedPolicyDocumentException$ = [ + -3, + n0, + _MPDE, + { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.MalformedPolicyDocumentException$, errors_1.MalformedPolicyDocumentException); +exports.PackedPolicyTooLargeException$ = [ + -3, + n0, + _PPTLE, + { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.PackedPolicyTooLargeException$, errors_1.PackedPolicyTooLargeException); +exports.RegionDisabledException$ = [ + -3, + n0, + _RDE, + { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 }, + [_m], + [0], +]; +n0_registry.registerError(exports.RegionDisabledException$, errors_1.RegionDisabledException); +exports.errorTypeRegistries = [_s_registry, n0_registry]; +var accessKeySecretType = [0, n0, _aKST, 8, 0]; +var clientTokenType = [0, n0, _cTT, 8, 0]; +exports.AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2]; +exports.AssumeRoleRequest$ = [ + 3, + n0, + _ARR, + 0, + [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC], + [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType], + 2, +]; +exports.AssumeRoleResponse$ = [ + 3, + n0, + _ARRs, + 0, + [_C, _ARU, _PPS, _SI], + [[() => exports.Credentials$, 0], () => exports.AssumedRoleUser$, 1, 0], +]; +exports.AssumeRoleWithWebIdentityRequest$ = [ + 3, + n0, + _ARWWIR, + 0, + [_RA, _RSN, _WIT, _PI, _PA, _P, _DS], + [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1], + 3, +]; +exports.AssumeRoleWithWebIdentityResponse$ = [ + 3, + n0, + _ARWWIRs, + 0, + [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI], + [[() => exports.Credentials$, 0], 0, () => exports.AssumedRoleUser$, 1, 0, 0, 0], +]; +exports.Credentials$ = [ + 3, + n0, + _C, + 0, + [_AKI, _SAK, _ST, _E], + [0, [() => accessKeySecretType, 0], 0, 4], + 4, +]; +exports.PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]]; +exports.ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]]; +exports.Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2]; +var policyDescriptorListType = [1, n0, _pDLT, 0, () => exports.PolicyDescriptorType$]; +var ProvidedContextsListType = [1, n0, _PCLT, 0, () => exports.ProvidedContext$]; +var tagKeyListType = (/* unused pure expression or super */ null && (64 | 0)); +var tagListType = [1, n0, _tLT, 0, () => exports.Tag$]; +exports.AssumeRole$ = [9, n0, _AR, 0, () => exports.AssumeRoleRequest$, () => exports.AssumeRoleResponse$]; +exports.AssumeRoleWithWebIdentity$ = [ + 9, + n0, + _ARWWI, + 0, + () => exports.AssumeRoleWithWebIdentityRequest$, + () => exports.AssumeRoleWithWebIdentityResponse$, +]; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.935.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.935.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.935.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.935.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); /***/ }) diff --git a/dist/346.index.js b/dist/346.index.js new file mode 100644 index 0000000..b36e61b --- /dev/null +++ b/dist/346.index.js @@ -0,0 +1,1182 @@ +"use strict"; +exports.id = 346; +exports.ids = [346]; +exports.modules = { + +/***/ 6707: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var utilEndpoints = __webpack_require__(9674); +var urlParser = __webpack_require__(4494); + +const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!utilEndpoints.isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (utilEndpoints.isIpAddress(value)) { + return false; + } + return true; +}; + +const ARN_DELIMITER = ":"; +const RESOURCE_DELIMITER = "/"; +const parseArn = (value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition, + service, + region, + accountId, + resourceId, + }; +}; + +var partitions = [ + { + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, + { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, + { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, + { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, + { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, + { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, + { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, + { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + } +]; +var version = "1.1"; +var partitionsInfo = { + partitions: partitions, + version: version +}; + +let selectedPartitionsInfo = partitionsInfo; +let selectedUserAgentPrefix = ""; +const partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData, + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs, + }; +}; +const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +const useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); +}; +const getUserAgentPrefix = () => selectedUserAgentPrefix; + +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, + parseArn: parseArn, + partition: partition, +}; +utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions; + +const resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + return toEndpointV1(input.endpointProvider({ + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" + ? await input.useDualstackEndpoint() + : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: undefined, + }, { logger: input.logger })); + }; + } + return input; +}; +const toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url); + +Object.defineProperty(exports, "EndpointError", ({ + enumerable: true, + get: function () { return utilEndpoints.EndpointError; } +})); +Object.defineProperty(exports, "isIpAddress", ({ + enumerable: true, + get: function () { return utilEndpoints.isIpAddress; } +})); +Object.defineProperty(exports, "resolveEndpoint", ({ + enumerable: true, + get: function () { return utilEndpoints.resolveEndpoint; } +})); +exports.awsEndpointFunctions = awsEndpointFunctions; +exports.getUserAgentPrefix = getUserAgentPrefix; +exports.partition = partition; +exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; +exports.setPartitionInfo = setPartitionInfo; +exports.toEndpointV1 = toEndpointV1; +exports.useDefaultPartitionInfo = useDefaultPartitionInfo; + + +/***/ }), + +/***/ 2764: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var protocolHttp = __webpack_require__(2356); +var querystringBuilder = __webpack_require__(8256); +var http = __webpack_require__(8611); +var https = __webpack_require__(5692); +var stream = __webpack_require__(2203); +var http2 = __webpack_require__(5675); + +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; + +const timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId), +}; + +const DEFER_EVENT_LISTENER_TIME$2 = 1000; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError", + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } + else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); + } + else { + request.on("socket", doWithSocket); + } + }; + if (timeoutInMs < 2000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); +}; + +const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { + if (timeoutInMs) { + return timing.setTimeout(() => { + let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; + if (throwOnRequestTimeout) { + const error = Object.assign(new Error(msg), { + name: "TimeoutError", + code: "ETIMEDOUT", + }); + req.destroy(error); + reject(error); + } + else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger?.warn?.(msg); + } + }, timeoutInMs); + } + return -1; +}; + +const DEFER_EVENT_LISTENER_TIME$1 = 3000; +const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } + else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); +}; + +const DEFER_EVENT_LISTENER_TIME = 3000; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); + } + else { + request.setTimeout(timeout, onTimeout); + } + }; + if (0 < timeoutInMs && timeoutInMs < 6000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); +}; + +const MIN_WAIT_TIME = 6_000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }), + ]); + } + if (sendBody) { + writeBody(httpRequest, request.body); + } +} +function writeBody(httpRequest, body) { + if (body instanceof stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + const isBuffer = Buffer.isBuffer(body); + const isString = typeof body === "string"; + if (isBuffer || isString) { + if (isBuffer && body.byteLength === 0) { + httpRequest.end(); + } + else { + httpRequest.end(body); + } + return; + } + const uint8 = body; + if (typeof uint8 === "object" && + uint8.buffer && + typeof uint8.byteOffset === "number" && + typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); +} + +const DEFAULT_REQUEST_TIMEOUT = 0; +class NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15_000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgent: (() => { + if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger, + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + const config = this.config; + let writeRequestBodyPromise = undefined; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? https.Agent : http.Agent)({ + keepAlive: false, + maxSockets: Infinity, + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } + else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? https.request : http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +} + +class NodeHttp2ConnectionPool { + sessions = []; + constructor(sessions) { + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } +} + +class NodeHttp2ConnectionManager { + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + config; + sessionCache = new Map(); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = http2.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); + } + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); + } +} + +class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); + } + else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [http2.constants.HTTP2_HEADER_PATH]: path, + [http2.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } +} + +class Collector extends stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +} + +const streamCollector = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); +}; +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} + +exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; +exports.NodeHttp2Handler = NodeHttp2Handler; +exports.NodeHttpHandler = NodeHttpHandler; +exports.streamCollector = streamCollector; + + +/***/ }), + +/***/ 9955: +/***/ ((module) => { + +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.993.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=20.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.11","@aws-sdk/middleware-host-header":"^3.972.3","@aws-sdk/middleware-logger":"^3.972.3","@aws-sdk/middleware-recursion-detection":"^3.972.3","@aws-sdk/middleware-user-agent":"^3.972.11","@aws-sdk/region-config-resolver":"^3.972.3","@aws-sdk/types":"^3.973.1","@aws-sdk/util-endpoints":"3.993.0","@aws-sdk/util-user-agent-browser":"^3.972.3","@aws-sdk/util-user-agent-node":"^3.972.9","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.23.2","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.16","@smithy/middleware-retry":"^4.4.33","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.10","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.11.5","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.32","@smithy/util-defaults-mode-node":"^4.2.35","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./signin.d.ts","./signin.js","./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/signin/runtimeConfig":"./dist-es/submodules/signin/runtimeConfig.browser","./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./package.json":"./package.json","./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"},"./signin":{"types":"./dist-types/submodules/signin/index.d.ts","module":"./dist-es/submodules/signin/index.js","node":"./dist-cjs/submodules/signin/index.js","import":"./dist-es/submodules/signin/index.js","require":"./dist-cjs/submodules/signin/index.js"}}}'); + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/443.index.js b/dist/443.index.js index b422576..1971fc0 100644 --- a/dist/443.index.js +++ b/dist/443.index.js @@ -72,7 +72,7 @@ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __webpack_require__(3068); +const util_endpoints_1 = __webpack_require__(6707); const util_endpoints_2 = __webpack_require__(9674); const ruleset_1 = __webpack_require__(9947); const cache = new util_endpoints_2.EndpointCache({ @@ -108,7 +108,6 @@ exports.ruleSet = _data; /***/ 9443: /***/ ((__unused_webpack_module, exports, __webpack_require__) => { -var __webpack_unused_export__; var middlewareHostHeader = __webpack_require__(2590); @@ -126,6 +125,9 @@ var httpAuthSchemeProvider = __webpack_require__(8396); var runtimeConfig = __webpack_require__(6901); var regionConfigResolver = __webpack_require__(6463); var protocolHttp = __webpack_require__(2356); +var schemas_0 = __webpack_require__(7143); +var errors = __webpack_require__(5843); +var SSOOIDCServiceException = __webpack_require__(3952); const resolveClientEndpointParameters = (options) => { return Object.assign(options, { @@ -221,14 +223,95 @@ class SSOOIDCClient extends smithyClient.Client { } } -let SSOOIDCServiceException$1 = class SSOOIDCServiceException extends smithyClient.ServiceException { +class CreateTokenCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("AWSSSOOIDCService", "CreateToken", {}) + .n("SSOOIDCClient", "CreateTokenCommand") + .sc(schemas_0.CreateToken$) + .build() { +} + +const commands = { + CreateTokenCommand, +}; +class SSOOIDC extends SSOOIDCClient { +} +smithyClient.createAggregatedClient(commands, SSOOIDC); + +const AccessDeniedExceptionReason = { + KMS_ACCESS_DENIED: "KMS_AccessDeniedException", +}; +const InvalidRequestExceptionReason = { + KMS_DISABLED_KEY: "KMS_DisabledException", + KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException", + KMS_INVALID_STATE: "KMS_InvalidStateException", + KMS_KEY_NOT_FOUND: "KMS_NotFoundException", +}; + +Object.defineProperty(exports, "$Command", ({ + enumerable: true, + get: function () { return smithyClient.Command; } +})); +Object.defineProperty(exports, "__Client", ({ + enumerable: true, + get: function () { return smithyClient.Client; } +})); +Object.defineProperty(exports, "SSOOIDCServiceException", ({ + enumerable: true, + get: function () { return SSOOIDCServiceException.SSOOIDCServiceException; } +})); +exports.AccessDeniedExceptionReason = AccessDeniedExceptionReason; +exports.CreateTokenCommand = CreateTokenCommand; +exports.InvalidRequestExceptionReason = InvalidRequestExceptionReason; +exports.SSOOIDC = SSOOIDC; +exports.SSOOIDCClient = SSOOIDCClient; +Object.keys(schemas_0).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return schemas_0[k]; } + }); +}); +Object.keys(errors).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return errors[k]; } + }); +}); + + +/***/ }), + +/***/ 3952: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SSOOIDCServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __webpack_require__(1411); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +class SSOOIDCServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, SSOOIDCServiceException.prototype); } -}; +} +exports.SSOOIDCServiceException = SSOOIDCServiceException; + -let AccessDeniedException$1 = class AccessDeniedException extends SSOOIDCServiceException$1 { +/***/ }), + +/***/ 5843: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UnsupportedGrantTypeException = exports.UnauthorizedClientException = exports.SlowDownException = exports.InvalidScopeException = exports.InvalidRequestException = exports.InvalidGrantException = exports.InvalidClientException = exports.InternalServerException = exports.ExpiredTokenException = exports.AuthorizationPendingException = exports.AccessDeniedException = void 0; +const SSOOIDCServiceException_1 = __webpack_require__(3952); +class AccessDeniedException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "AccessDeniedException"; $fault = "client"; error; @@ -245,8 +328,9 @@ let AccessDeniedException$1 = class AccessDeniedException extends SSOOIDCService this.reason = opts.reason; this.error_description = opts.error_description; } -}; -let AuthorizationPendingException$1 = class AuthorizationPendingException extends SSOOIDCServiceException$1 { +} +exports.AccessDeniedException = AccessDeniedException; +class AuthorizationPendingException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "AuthorizationPendingException"; $fault = "client"; error; @@ -261,8 +345,9 @@ let AuthorizationPendingException$1 = class AuthorizationPendingException extend this.error = opts.error; this.error_description = opts.error_description; } -}; -let ExpiredTokenException$1 = class ExpiredTokenException extends SSOOIDCServiceException$1 { +} +exports.AuthorizationPendingException = AuthorizationPendingException; +class ExpiredTokenException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "ExpiredTokenException"; $fault = "client"; error; @@ -277,8 +362,9 @@ let ExpiredTokenException$1 = class ExpiredTokenException extends SSOOIDCService this.error = opts.error; this.error_description = opts.error_description; } -}; -let InternalServerException$1 = class InternalServerException extends SSOOIDCServiceException$1 { +} +exports.ExpiredTokenException = ExpiredTokenException; +class InternalServerException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "InternalServerException"; $fault = "server"; error; @@ -293,8 +379,9 @@ let InternalServerException$1 = class InternalServerException extends SSOOIDCSer this.error = opts.error; this.error_description = opts.error_description; } -}; -let InvalidClientException$1 = class InvalidClientException extends SSOOIDCServiceException$1 { +} +exports.InternalServerException = InternalServerException; +class InvalidClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "InvalidClientException"; $fault = "client"; error; @@ -309,8 +396,9 @@ let InvalidClientException$1 = class InvalidClientException extends SSOOIDCServi this.error = opts.error; this.error_description = opts.error_description; } -}; -let InvalidGrantException$1 = class InvalidGrantException extends SSOOIDCServiceException$1 { +} +exports.InvalidClientException = InvalidClientException; +class InvalidGrantException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "InvalidGrantException"; $fault = "client"; error; @@ -325,8 +413,9 @@ let InvalidGrantException$1 = class InvalidGrantException extends SSOOIDCService this.error = opts.error; this.error_description = opts.error_description; } -}; -let InvalidRequestException$1 = class InvalidRequestException extends SSOOIDCServiceException$1 { +} +exports.InvalidGrantException = InvalidGrantException; +class InvalidRequestException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "InvalidRequestException"; $fault = "client"; error; @@ -343,8 +432,9 @@ let InvalidRequestException$1 = class InvalidRequestException extends SSOOIDCSer this.reason = opts.reason; this.error_description = opts.error_description; } -}; -let InvalidScopeException$1 = class InvalidScopeException extends SSOOIDCServiceException$1 { +} +exports.InvalidRequestException = InvalidRequestException; +class InvalidScopeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "InvalidScopeException"; $fault = "client"; error; @@ -359,8 +449,9 @@ let InvalidScopeException$1 = class InvalidScopeException extends SSOOIDCService this.error = opts.error; this.error_description = opts.error_description; } -}; -let SlowDownException$1 = class SlowDownException extends SSOOIDCServiceException$1 { +} +exports.InvalidScopeException = InvalidScopeException; +class SlowDownException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "SlowDownException"; $fault = "client"; error; @@ -375,8 +466,9 @@ let SlowDownException$1 = class SlowDownException extends SSOOIDCServiceExceptio this.error = opts.error; this.error_description = opts.error_description; } -}; -let UnauthorizedClientException$1 = class UnauthorizedClientException extends SSOOIDCServiceException$1 { +} +exports.SlowDownException = SlowDownException; +class UnauthorizedClientException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "UnauthorizedClientException"; $fault = "client"; error; @@ -391,8 +483,9 @@ let UnauthorizedClientException$1 = class UnauthorizedClientException extends SS this.error = opts.error; this.error_description = opts.error_description; } -}; -let UnsupportedGrantTypeException$1 = class UnsupportedGrantTypeException extends SSOOIDCServiceException$1 { +} +exports.UnauthorizedClientException = UnauthorizedClientException; +class UnsupportedGrantTypeException extends SSOOIDCServiceException_1.SSOOIDCServiceException { name = "UnsupportedGrantTypeException"; $fault = "client"; error; @@ -407,269 +500,8 @@ let UnsupportedGrantTypeException$1 = class UnsupportedGrantTypeException extend this.error = opts.error; this.error_description = opts.error_description; } -}; - -const _ADE = "AccessDeniedException"; -const _APE = "AuthorizationPendingException"; -const _AT = "AccessToken"; -const _CS = "ClientSecret"; -const _CT = "CreateToken"; -const _CTR = "CreateTokenRequest"; -const _CTRr = "CreateTokenResponse"; -const _CV = "CodeVerifier"; -const _ETE = "ExpiredTokenException"; -const _ICE = "InvalidClientException"; -const _IGE = "InvalidGrantException"; -const _IRE = "InvalidRequestException"; -const _ISE = "InternalServerException"; -const _ISEn = "InvalidScopeException"; -const _IT = "IdToken"; -const _RT = "RefreshToken"; -const _SDE = "SlowDownException"; -const _UCE = "UnauthorizedClientException"; -const _UGTE = "UnsupportedGrantTypeException"; -const _aT = "accessToken"; -const _c = "client"; -const _cI = "clientId"; -const _cS = "clientSecret"; -const _cV = "codeVerifier"; -const _co = "code"; -const _dC = "deviceCode"; -const _e = "error"; -const _eI = "expiresIn"; -const _ed = "error_description"; -const _gT = "grantType"; -const _h = "http"; -const _hE = "httpError"; -const _iT = "idToken"; -const _r = "reason"; -const _rT = "refreshToken"; -const _rU = "redirectUri"; -const _s = "scope"; -const _se = "server"; -const _sm = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc"; -const _tT = "tokenType"; -const n0 = "com.amazonaws.ssooidc"; -var AccessToken = [0, n0, _AT, 8, 0]; -var ClientSecret = [0, n0, _CS, 8, 0]; -var CodeVerifier = [0, n0, _CV, 8, 0]; -var IdToken = [0, n0, _IT, 8, 0]; -var RefreshToken = [0, n0, _RT, 8, 0]; -var AccessDeniedException = [ - -3, - n0, - _ADE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _r, _ed], - [0, 0, 0], -]; -schema.TypeRegistry.for(n0).registerError(AccessDeniedException, AccessDeniedException$1); -var AuthorizationPendingException = [ - -3, - n0, - _APE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(AuthorizationPendingException, AuthorizationPendingException$1); -var CreateTokenRequest = [ - 3, - n0, - _CTR, - 0, - [_cI, _cS, _gT, _dC, _co, _rT, _s, _rU, _cV], - [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]], -]; -var CreateTokenResponse = [ - 3, - n0, - _CTRr, - 0, - [_aT, _tT, _eI, _rT, _iT], - [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]], -]; -var ExpiredTokenException = [ - -3, - n0, - _ETE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1); -var InternalServerException = [ - -3, - n0, - _ISE, - { - [_e]: _se, - [_hE]: 500, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(InternalServerException, InternalServerException$1); -var InvalidClientException = [ - -3, - n0, - _ICE, - { - [_e]: _c, - [_hE]: 401, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidClientException, InvalidClientException$1); -var InvalidGrantException = [ - -3, - n0, - _IGE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidGrantException, InvalidGrantException$1); -var InvalidRequestException = [ - -3, - n0, - _IRE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _r, _ed], - [0, 0, 0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1); -var InvalidScopeException = [ - -3, - n0, - _ISEn, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidScopeException, InvalidScopeException$1); -var SlowDownException = [ - -3, - n0, - _SDE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(SlowDownException, SlowDownException$1); -var UnauthorizedClientException = [ - -3, - n0, - _UCE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(UnauthorizedClientException, UnauthorizedClientException$1); -var UnsupportedGrantTypeException = [ - -3, - n0, - _UGTE, - { - [_e]: _c, - [_hE]: 400, - }, - [_e, _ed], - [0, 0], -]; -schema.TypeRegistry.for(n0).registerError(UnsupportedGrantTypeException, UnsupportedGrantTypeException$1); -var SSOOIDCServiceException = [-3, _sm, "SSOOIDCServiceException", 0, [], []]; -schema.TypeRegistry.for(_sm).registerError(SSOOIDCServiceException, SSOOIDCServiceException$1); -var CreateToken = [ - 9, - n0, - _CT, - { - [_h]: ["POST", "/token", 200], - }, - () => CreateTokenRequest, - () => CreateTokenResponse, -]; - -class CreateTokenCommand extends smithyClient.Command - .classBuilder() - .ep(commonParams) - .m(function (Command, cs, config, o) { - return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; -}) - .s("AWSSSOOIDCService", "CreateToken", {}) - .n("SSOOIDCClient", "CreateTokenCommand") - .sc(CreateToken) - .build() { -} - -const commands = { - CreateTokenCommand, -}; -class SSOOIDC extends SSOOIDCClient { } -smithyClient.createAggregatedClient(commands, SSOOIDC); - -const AccessDeniedExceptionReason = { - KMS_ACCESS_DENIED: "KMS_AccessDeniedException", -}; -const InvalidRequestExceptionReason = { - KMS_DISABLED_KEY: "KMS_DisabledException", - KMS_INVALID_KEY_USAGE: "KMS_InvalidKeyUsageException", - KMS_INVALID_STATE: "KMS_InvalidStateException", - KMS_KEY_NOT_FOUND: "KMS_NotFoundException", -}; - -__webpack_unused_export__ = ({ - enumerable: true, - get: function () { return smithyClient.Command; } -}); -__webpack_unused_export__ = ({ - enumerable: true, - get: function () { return smithyClient.Client; } -}); -__webpack_unused_export__ = AccessDeniedException$1; -__webpack_unused_export__ = AccessDeniedExceptionReason; -__webpack_unused_export__ = AuthorizationPendingException$1; -exports.CreateTokenCommand = CreateTokenCommand; -__webpack_unused_export__ = ExpiredTokenException$1; -__webpack_unused_export__ = InternalServerException$1; -__webpack_unused_export__ = InvalidClientException$1; -__webpack_unused_export__ = InvalidGrantException$1; -__webpack_unused_export__ = InvalidRequestException$1; -__webpack_unused_export__ = InvalidRequestExceptionReason; -__webpack_unused_export__ = InvalidScopeException$1; -__webpack_unused_export__ = SSOOIDC; -exports.SSOOIDCClient = SSOOIDCClient; -__webpack_unused_export__ = SSOOIDCServiceException$1; -__webpack_unused_export__ = SlowDownException$1; -__webpack_unused_export__ = UnauthorizedClientException$1; -__webpack_unused_export__ = UnsupportedGrantTypeException$1; +exports.UnsupportedGrantTypeException = UnsupportedGrantTypeException; /***/ }), @@ -688,15 +520,14 @@ const config_resolver_1 = __webpack_require__(9316); const hash_node_1 = __webpack_require__(2711); const middleware_retry_1 = __webpack_require__(9618); const node_config_provider_1 = __webpack_require__(5704); -const node_http_handler_1 = __webpack_require__(1279); +const node_http_handler_1 = __webpack_require__(2764); +const smithy_client_1 = __webpack_require__(1411); const util_body_length_node_1 = __webpack_require__(3638); +const util_defaults_mode_node_1 = __webpack_require__(5435); const util_retry_1 = __webpack_require__(5518); const runtimeConfig_shared_1 = __webpack_require__(1546); -const smithy_client_1 = __webpack_require__(1411); -const util_defaults_mode_node_1 = __webpack_require__(5435); -const smithy_client_2 = __webpack_require__(1411); const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); @@ -750,6 +581,7 @@ const util_base64_1 = __webpack_require__(8385); const util_utf8_1 = __webpack_require__(1577); const httpAuthSchemeProvider_1 = __webpack_require__(8396); const endpointResolver_1 = __webpack_require__(546); +const schemas_0_1 = __webpack_require__(7143); const getRuntimeConfig = (config) => { return { apiVersion: "2019-06-10", @@ -772,7 +604,13 @@ const getRuntimeConfig = (config) => { }, ], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.ssooidc" }), + protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.ssooidc", + errorTypeRegistries: schemas_0_1.errorTypeRegistries, + version: "2019-06-10", + serviceTarget: "AWSSSOOIDCService", + }, serviceId: config?.serviceId ?? "SSO OIDC", urlParser: config?.urlParser ?? url_parser_1.parseUrl, utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, @@ -784,10 +622,150 @@ exports.getRuntimeConfig = getRuntimeConfig; /***/ }), -/***/ 9955: -/***/ ((module) => { +/***/ 7143: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateToken$ = exports.CreateTokenResponse$ = exports.CreateTokenRequest$ = exports.errorTypeRegistries = exports.UnsupportedGrantTypeException$ = exports.UnauthorizedClientException$ = exports.SlowDownException$ = exports.InvalidScopeException$ = exports.InvalidRequestException$ = exports.InvalidGrantException$ = exports.InvalidClientException$ = exports.InternalServerException$ = exports.ExpiredTokenException$ = exports.AuthorizationPendingException$ = exports.AccessDeniedException$ = exports.SSOOIDCServiceException$ = void 0; +const _ADE = "AccessDeniedException"; +const _APE = "AuthorizationPendingException"; +const _AT = "AccessToken"; +const _CS = "ClientSecret"; +const _CT = "CreateToken"; +const _CTR = "CreateTokenRequest"; +const _CTRr = "CreateTokenResponse"; +const _CV = "CodeVerifier"; +const _ETE = "ExpiredTokenException"; +const _ICE = "InvalidClientException"; +const _IGE = "InvalidGrantException"; +const _IRE = "InvalidRequestException"; +const _ISE = "InternalServerException"; +const _ISEn = "InvalidScopeException"; +const _IT = "IdToken"; +const _RT = "RefreshToken"; +const _SDE = "SlowDownException"; +const _UCE = "UnauthorizedClientException"; +const _UGTE = "UnsupportedGrantTypeException"; +const _aT = "accessToken"; +const _c = "client"; +const _cI = "clientId"; +const _cS = "clientSecret"; +const _cV = "codeVerifier"; +const _co = "code"; +const _dC = "deviceCode"; +const _e = "error"; +const _eI = "expiresIn"; +const _ed = "error_description"; +const _gT = "grantType"; +const _h = "http"; +const _hE = "httpError"; +const _iT = "idToken"; +const _r = "reason"; +const _rT = "refreshToken"; +const _rU = "redirectUri"; +const _s = "smithy.ts.sdk.synthetic.com.amazonaws.ssooidc"; +const _sc = "scope"; +const _se = "server"; +const _tT = "tokenType"; +const n0 = "com.amazonaws.ssooidc"; +const schema_1 = __webpack_require__(6890); +const errors_1 = __webpack_require__(5843); +const SSOOIDCServiceException_1 = __webpack_require__(3952); +const _s_registry = schema_1.TypeRegistry.for(_s); +exports.SSOOIDCServiceException$ = [-3, _s, "SSOOIDCServiceException", 0, [], []]; +_s_registry.registerError(exports.SSOOIDCServiceException$, SSOOIDCServiceException_1.SSOOIDCServiceException); +const n0_registry = schema_1.TypeRegistry.for(n0); +exports.AccessDeniedException$ = [ + -3, + n0, + _ADE, + { [_e]: _c, [_hE]: 400 }, + [_e, _r, _ed], + [0, 0, 0], +]; +n0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException); +exports.AuthorizationPendingException$ = [ + -3, + n0, + _APE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0], +]; +n0_registry.registerError(exports.AuthorizationPendingException$, errors_1.AuthorizationPendingException); +exports.ExpiredTokenException$ = [-3, n0, _ETE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]]; +n0_registry.registerError(exports.ExpiredTokenException$, errors_1.ExpiredTokenException); +exports.InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _ed], [0, 0]]; +n0_registry.registerError(exports.InternalServerException$, errors_1.InternalServerException); +exports.InvalidClientException$ = [-3, n0, _ICE, { [_e]: _c, [_hE]: 401 }, [_e, _ed], [0, 0]]; +n0_registry.registerError(exports.InvalidClientException$, errors_1.InvalidClientException); +exports.InvalidGrantException$ = [-3, n0, _IGE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]]; +n0_registry.registerError(exports.InvalidGrantException$, errors_1.InvalidGrantException); +exports.InvalidRequestException$ = [ + -3, + n0, + _IRE, + { [_e]: _c, [_hE]: 400 }, + [_e, _r, _ed], + [0, 0, 0], +]; +n0_registry.registerError(exports.InvalidRequestException$, errors_1.InvalidRequestException); +exports.InvalidScopeException$ = [-3, n0, _ISEn, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]]; +n0_registry.registerError(exports.InvalidScopeException$, errors_1.InvalidScopeException); +exports.SlowDownException$ = [-3, n0, _SDE, { [_e]: _c, [_hE]: 400 }, [_e, _ed], [0, 0]]; +n0_registry.registerError(exports.SlowDownException$, errors_1.SlowDownException); +exports.UnauthorizedClientException$ = [ + -3, + n0, + _UCE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0], +]; +n0_registry.registerError(exports.UnauthorizedClientException$, errors_1.UnauthorizedClientException); +exports.UnsupportedGrantTypeException$ = [ + -3, + n0, + _UGTE, + { [_e]: _c, [_hE]: 400 }, + [_e, _ed], + [0, 0], +]; +n0_registry.registerError(exports.UnsupportedGrantTypeException$, errors_1.UnsupportedGrantTypeException); +exports.errorTypeRegistries = [_s_registry, n0_registry]; +var AccessToken = [0, n0, _AT, 8, 0]; +var ClientSecret = [0, n0, _CS, 8, 0]; +var CodeVerifier = [0, n0, _CV, 8, 0]; +var IdToken = [0, n0, _IT, 8, 0]; +var RefreshToken = [0, n0, _RT, 8, 0]; +exports.CreateTokenRequest$ = [ + 3, + n0, + _CTR, + 0, + [_cI, _cS, _gT, _dC, _co, _rT, _sc, _rU, _cV], + [0, [() => ClientSecret, 0], 0, 0, 0, [() => RefreshToken, 0], 64 | 0, 0, [() => CodeVerifier, 0]], + 3, +]; +exports.CreateTokenResponse$ = [ + 3, + n0, + _CTRr, + 0, + [_aT, _tT, _eI, _rT, _iT], + [[() => AccessToken, 0], 0, 1, [() => RefreshToken, 0], [() => IdToken, 0]], +]; +var Scopes = (/* unused pure expression or super */ null && (64 | 0)); +exports.CreateToken$ = [ + 9, + n0, + _CT, + { [_h]: ["POST", "/token", 200] }, + () => exports.CreateTokenRequest$, + () => exports.CreateTokenResponse$, +]; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.935.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.935.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.935.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.935.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); /***/ }) diff --git a/dist/579.index.js b/dist/579.index.js index ef7e63d..bcdedb5 100644 --- a/dist/579.index.js +++ b/dist/579.index.js @@ -134,6 +134,11 @@ class EventStreamSerde { [unionMember]: out, }; } + if (body.byteLength === 0) { + return { + [unionMember]: {}, + }; + } } return { [unionMember]: await this.deserializer.read(eventStreamSchema, body), @@ -195,7 +200,6 @@ class EventStreamSerde { const { eventHeader, eventPayload } = memberSchema.getMergedTraits(); if (eventPayload) { explicitPayloadMember = memberName; - break; } else if (eventHeader) { const value = event[unionMember][memberName]; @@ -240,6 +244,9 @@ class EventStreamSerde { serializer.write(eventSchema, event[unionMember]); } } + else if (eventSchema.isUnitSchema()) { + serializer.write(eventSchema, {}); + } else { throw new Error("@smithy/core/event-streams - non-struct member not supported in event stream union."); } diff --git a/dist/605.index.js b/dist/605.index.js index 0ff2fce..f6e4c57 100644 --- a/dist/605.index.js +++ b/dist/605.index.js @@ -64,7 +64,7 @@ Object.defineProperty(exports, "__esModule", ({ value: true })); exports.fromHttp = void 0; const tslib_1 = __webpack_require__(1860); const client_1 = __webpack_require__(5152); -const node_http_handler_1 = __webpack_require__(1279); +const node_http_handler_1 = __webpack_require__(2402); const property_provider_1 = __webpack_require__(8857); const promises_1 = tslib_1.__importDefault(__webpack_require__(1943)); const checkUrl_1 = __webpack_require__(1509); @@ -228,6 +228,752 @@ var fromHttp_1 = __webpack_require__(8712); Object.defineProperty(exports, "fromHttp", ({ enumerable: true, get: function () { return fromHttp_1.fromHttp; } })); +/***/ }), + +/***/ 2402: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var protocolHttp = __webpack_require__(2356); +var querystringBuilder = __webpack_require__(8256); +var http = __webpack_require__(8611); +var https = __webpack_require__(5692); +var stream = __webpack_require__(2203); +var http2 = __webpack_require__(5675); + +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; + +const timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId), +}; + +const DEFER_EVENT_LISTENER_TIME$2 = 1000; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError", + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } + else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); + } + else { + request.on("socket", doWithSocket); + } + }; + if (timeoutInMs < 2000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); +}; + +const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { + if (timeoutInMs) { + return timing.setTimeout(() => { + let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; + if (throwOnRequestTimeout) { + const error = Object.assign(new Error(msg), { + name: "TimeoutError", + code: "ETIMEDOUT", + }); + req.destroy(error); + reject(error); + } + else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger?.warn?.(msg); + } + }, timeoutInMs); + } + return -1; +}; + +const DEFER_EVENT_LISTENER_TIME$1 = 3000; +const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } + else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); +}; + +const DEFER_EVENT_LISTENER_TIME = 3000; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); + } + else { + request.setTimeout(timeout, onTimeout); + } + }; + if (0 < timeoutInMs && timeoutInMs < 6000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); +}; + +const MIN_WAIT_TIME = 6_000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }), + ]); + } + if (sendBody) { + writeBody(httpRequest, request.body); + } +} +function writeBody(httpRequest, body) { + if (body instanceof stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + const isBuffer = Buffer.isBuffer(body); + const isString = typeof body === "string"; + if (isBuffer || isString) { + if (isBuffer && body.byteLength === 0) { + httpRequest.end(); + } + else { + httpRequest.end(body); + } + return; + } + const uint8 = body; + if (typeof uint8 === "object" && + uint8.buffer && + typeof uint8.byteOffset === "number" && + typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); +} + +const DEFAULT_REQUEST_TIMEOUT = 0; +class NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15_000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgent: (() => { + if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger, + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + const config = this.config; + let writeRequestBodyPromise = undefined; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? https.Agent : http.Agent)({ + keepAlive: false, + maxSockets: Infinity, + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } + else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? https.request : http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +} + +class NodeHttp2ConnectionPool { + sessions = []; + constructor(sessions) { + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } +} + +class NodeHttp2ConnectionManager { + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + config; + sessionCache = new Map(); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = http2.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); + } + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); + } +} + +class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); + } + else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [http2.constants.HTTP2_HEADER_PATH]: path, + [http2.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } +} + +class Collector extends stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +} + +const streamCollector = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); +}; +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} + +exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; +exports.NodeHttp2Handler = NodeHttp2Handler; +exports.NodeHttpHandler = NodeHttpHandler; +exports.streamCollector = streamCollector; + + /***/ }) }; diff --git a/dist/762.index.js b/dist/762.index.js new file mode 100644 index 0000000..671db46 --- /dev/null +++ b/dist/762.index.js @@ -0,0 +1,625 @@ +"use strict"; +exports.id = 762; +exports.ids = [762]; +exports.modules = { + +/***/ 7709: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.resolveHttpAuthSchemeConfig = exports.defaultSigninHttpAuthSchemeProvider = exports.defaultSigninHttpAuthSchemeParametersProvider = void 0; +const core_1 = __webpack_require__(8704); +const util_middleware_1 = __webpack_require__(6324); +const defaultSigninHttpAuthSchemeParametersProvider = async (config, context, input) => { + return { + operation: (0, util_middleware_1.getSmithyContext)(context).operation, + region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || + (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), + }; +}; +exports.defaultSigninHttpAuthSchemeParametersProvider = defaultSigninHttpAuthSchemeParametersProvider; +function createAwsAuthSigv4HttpAuthOption(authParameters) { + return { + schemeId: "aws.auth#sigv4", + signingProperties: { + name: "signin", + region: authParameters.region, + }, + propertiesExtractor: (config, context) => ({ + signingProperties: { + config, + context, + }, + }), + }; +} +function createSmithyApiNoAuthHttpAuthOption(authParameters) { + return { + schemeId: "smithy.api#noAuth", + }; +} +const defaultSigninHttpAuthSchemeProvider = (authParameters) => { + const options = []; + switch (authParameters.operation) { + case "CreateOAuth2Token": { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + default: { + options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); + } + } + return options; +}; +exports.defaultSigninHttpAuthSchemeProvider = defaultSigninHttpAuthSchemeProvider; +const resolveHttpAuthSchemeConfig = (config) => { + const config_0 = (0, core_1.resolveAwsSdkSigV4Config)(config); + return Object.assign(config_0, { + authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? []), + }); +}; +exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; + + +/***/ }), + +/***/ 4928: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.defaultEndpointResolver = void 0; +const util_endpoints_1 = __webpack_require__(6707); +const util_endpoints_2 = __webpack_require__(9674); +const ruleset_1 = __webpack_require__(6904); +const cache = new util_endpoints_2.EndpointCache({ + size: 50, + params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"], +}); +const defaultEndpointResolver = (endpointParams, context = {}) => { + return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, { + endpointParams: endpointParams, + logger: context.logger, + })); +}; +exports.defaultEndpointResolver = defaultEndpointResolver; +util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions; + + +/***/ }), + +/***/ 6904: +/***/ ((__unused_webpack_module, exports) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ruleSet = void 0; +const u = "required", v = "fn", w = "argv", x = "ref"; +const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: true, "default": false, "type": "boolean" }, j = { [u]: false, "type": "string" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, p = { [v]: c, [w]: [{ [x]: "UseFIPS" }, false] }, q = { [v]: c, [w]: [{ [x]: "UseDualStack" }, false] }, r = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, s = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, t = [{ [x]: "Region" }]; +const _data = { version: "1.0", parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j }, rules: [{ conditions: [{ [v]: b, [w]: [k] }], rules: [{ conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d }, { rules: [{ conditions: [m], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d }, { endpoint: { url: k, properties: n, headers: n }, type: e }], type: f }], type: f }, { rules: [{ conditions: [{ [v]: b, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: g }], rules: [{ conditions: [{ [v]: h, [w]: [o, "aws"] }, p, q], endpoint: { url: "https://{Region}.signin.aws.amazon.com", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-cn"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws.cn", properties: n, headers: n }, type: e }, { conditions: [{ [v]: h, [w]: [o, "aws-us-gov"] }, p, q], endpoint: { url: "https://{Region}.signin.amazonaws-us-gov.com", properties: n, headers: n }, type: e }, { conditions: [l, m], rules: [{ conditions: [{ [v]: c, [w]: [a, r] }, s], rules: [{ endpoint: { url: "https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: d }], type: f }, { conditions: [l, q], rules: [{ conditions: [{ [v]: c, [w]: [r, a] }], rules: [{ endpoint: { url: "https://signin-fips.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "FIPS is enabled but this partition does not support FIPS", type: d }], type: f }, { conditions: [p, m], rules: [{ conditions: [s], rules: [{ endpoint: { url: "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: n, headers: n }, type: e }], type: f }, { error: "DualStack is enabled but this partition does not support DualStack", type: d }], type: f }, { endpoint: { url: "https://signin.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n }, type: e }], type: f }], type: f }, { error: "Invalid Configuration: Missing Region", type: d }], type: f }] }; +exports.ruleSet = _data; + + +/***/ }), + +/***/ 9762: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var middlewareHostHeader = __webpack_require__(2590); +var middlewareLogger = __webpack_require__(5242); +var middlewareRecursionDetection = __webpack_require__(1568); +var middlewareUserAgent = __webpack_require__(2959); +var configResolver = __webpack_require__(9316); +var core = __webpack_require__(402); +var schema = __webpack_require__(6890); +var middlewareContentLength = __webpack_require__(7212); +var middlewareEndpoint = __webpack_require__(99); +var middlewareRetry = __webpack_require__(9618); +var smithyClient = __webpack_require__(1411); +var httpAuthSchemeProvider = __webpack_require__(7709); +var runtimeConfig = __webpack_require__(2836); +var regionConfigResolver = __webpack_require__(6463); +var protocolHttp = __webpack_require__(2356); +var schemas_0 = __webpack_require__(890); +var errors = __webpack_require__(7214); +var SigninServiceException = __webpack_require__(2831); + +const resolveClientEndpointParameters = (options) => { + return Object.assign(options, { + useDualstackEndpoint: options.useDualstackEndpoint ?? false, + useFipsEndpoint: options.useFipsEndpoint ?? false, + defaultSigningName: "signin", + }); +}; +const commonParams = { + UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" }, + Endpoint: { type: "builtInParams", name: "endpoint" }, + Region: { type: "builtInParams", name: "region" }, + UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }, +}; + +const getHttpAuthExtensionConfiguration = (runtimeConfig) => { + const _httpAuthSchemes = runtimeConfig.httpAuthSchemes; + let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider; + let _credentials = runtimeConfig.credentials; + return { + setHttpAuthScheme(httpAuthScheme) { + const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId); + if (index === -1) { + _httpAuthSchemes.push(httpAuthScheme); + } + else { + _httpAuthSchemes.splice(index, 1, httpAuthScheme); + } + }, + httpAuthSchemes() { + return _httpAuthSchemes; + }, + setHttpAuthSchemeProvider(httpAuthSchemeProvider) { + _httpAuthSchemeProvider = httpAuthSchemeProvider; + }, + httpAuthSchemeProvider() { + return _httpAuthSchemeProvider; + }, + setCredentials(credentials) { + _credentials = credentials; + }, + credentials() { + return _credentials; + }, + }; +}; +const resolveHttpAuthRuntimeConfig = (config) => { + return { + httpAuthSchemes: config.httpAuthSchemes(), + httpAuthSchemeProvider: config.httpAuthSchemeProvider(), + credentials: config.credentials(), + }; +}; + +const resolveRuntimeExtensions = (runtimeConfig, extensions) => { + const extensionConfiguration = Object.assign(regionConfigResolver.getAwsRegionExtensionConfiguration(runtimeConfig), smithyClient.getDefaultExtensionConfiguration(runtimeConfig), protocolHttp.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig)); + extensions.forEach((extension) => extension.configure(extensionConfiguration)); + return Object.assign(runtimeConfig, regionConfigResolver.resolveAwsRegionExtensionConfiguration(extensionConfiguration), smithyClient.resolveDefaultRuntimeConfig(extensionConfiguration), protocolHttp.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration)); +}; + +class SigninClient extends smithyClient.Client { + config; + constructor(...[configuration]) { + const _config_0 = runtimeConfig.getRuntimeConfig(configuration || {}); + super(_config_0); + this.initConfig = _config_0; + const _config_1 = resolveClientEndpointParameters(_config_0); + const _config_2 = middlewareUserAgent.resolveUserAgentConfig(_config_1); + const _config_3 = middlewareRetry.resolveRetryConfig(_config_2); + const _config_4 = configResolver.resolveRegionConfig(_config_3); + const _config_5 = middlewareHostHeader.resolveHostHeaderConfig(_config_4); + const _config_6 = middlewareEndpoint.resolveEndpointConfig(_config_5); + const _config_7 = httpAuthSchemeProvider.resolveHttpAuthSchemeConfig(_config_6); + const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []); + this.config = _config_8; + this.middlewareStack.use(schema.getSchemaSerdePlugin(this.config)); + this.middlewareStack.use(middlewareUserAgent.getUserAgentPlugin(this.config)); + this.middlewareStack.use(middlewareRetry.getRetryPlugin(this.config)); + this.middlewareStack.use(middlewareContentLength.getContentLengthPlugin(this.config)); + this.middlewareStack.use(middlewareHostHeader.getHostHeaderPlugin(this.config)); + this.middlewareStack.use(middlewareLogger.getLoggerPlugin(this.config)); + this.middlewareStack.use(middlewareRecursionDetection.getRecursionDetectionPlugin(this.config)); + this.middlewareStack.use(core.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, { + httpAuthSchemeParametersProvider: httpAuthSchemeProvider.defaultSigninHttpAuthSchemeParametersProvider, + identityProviderConfigProvider: async (config) => new core.DefaultIdentityProviderConfig({ + "aws.auth#sigv4": config.credentials, + }), + })); + this.middlewareStack.use(core.getHttpSigningPlugin(this.config)); + } + destroy() { + super.destroy(); + } +} + +class CreateOAuth2TokenCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("Signin", "CreateOAuth2Token", {}) + .n("SigninClient", "CreateOAuth2TokenCommand") + .sc(schemas_0.CreateOAuth2Token$) + .build() { +} + +const commands = { + CreateOAuth2TokenCommand, +}; +class Signin extends SigninClient { +} +smithyClient.createAggregatedClient(commands, Signin); + +const OAuth2ErrorCode = { + AUTHCODE_EXPIRED: "AUTHCODE_EXPIRED", + INSUFFICIENT_PERMISSIONS: "INSUFFICIENT_PERMISSIONS", + INVALID_REQUEST: "INVALID_REQUEST", + SERVER_ERROR: "server_error", + TOKEN_EXPIRED: "TOKEN_EXPIRED", + USER_CREDENTIALS_CHANGED: "USER_CREDENTIALS_CHANGED", +}; + +Object.defineProperty(exports, "$Command", ({ + enumerable: true, + get: function () { return smithyClient.Command; } +})); +Object.defineProperty(exports, "__Client", ({ + enumerable: true, + get: function () { return smithyClient.Client; } +})); +Object.defineProperty(exports, "SigninServiceException", ({ + enumerable: true, + get: function () { return SigninServiceException.SigninServiceException; } +})); +exports.CreateOAuth2TokenCommand = CreateOAuth2TokenCommand; +exports.OAuth2ErrorCode = OAuth2ErrorCode; +exports.Signin = Signin; +exports.SigninClient = SigninClient; +Object.keys(schemas_0).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return schemas_0[k]; } + }); +}); +Object.keys(errors).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return errors[k]; } + }); +}); + + +/***/ }), + +/***/ 2831: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SigninServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __webpack_require__(1411); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +class SigninServiceException extends smithy_client_1.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, SigninServiceException.prototype); + } +} +exports.SigninServiceException = SigninServiceException; + + +/***/ }), + +/***/ 7214: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ValidationException = exports.TooManyRequestsError = exports.InternalServerException = exports.AccessDeniedException = void 0; +const SigninServiceException_1 = __webpack_require__(2831); +class AccessDeniedException extends SigninServiceException_1.SigninServiceException { + name = "AccessDeniedException"; + $fault = "client"; + error; + constructor(opts) { + super({ + name: "AccessDeniedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AccessDeniedException.prototype); + this.error = opts.error; + } +} +exports.AccessDeniedException = AccessDeniedException; +class InternalServerException extends SigninServiceException_1.SigninServiceException { + name = "InternalServerException"; + $fault = "server"; + error; + constructor(opts) { + super({ + name: "InternalServerException", + $fault: "server", + ...opts, + }); + Object.setPrototypeOf(this, InternalServerException.prototype); + this.error = opts.error; + } +} +exports.InternalServerException = InternalServerException; +class TooManyRequestsError extends SigninServiceException_1.SigninServiceException { + name = "TooManyRequestsError"; + $fault = "client"; + error; + constructor(opts) { + super({ + name: "TooManyRequestsError", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, TooManyRequestsError.prototype); + this.error = opts.error; + } +} +exports.TooManyRequestsError = TooManyRequestsError; +class ValidationException extends SigninServiceException_1.SigninServiceException { + name = "ValidationException"; + $fault = "client"; + error; + constructor(opts) { + super({ + name: "ValidationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ValidationException.prototype); + this.error = opts.error; + } +} +exports.ValidationException = ValidationException; + + +/***/ }), + +/***/ 2836: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __webpack_require__(1860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(9955)); +const core_1 = __webpack_require__(8704); +const util_user_agent_node_1 = __webpack_require__(1656); +const config_resolver_1 = __webpack_require__(9316); +const hash_node_1 = __webpack_require__(2711); +const middleware_retry_1 = __webpack_require__(9618); +const node_config_provider_1 = __webpack_require__(5704); +const node_http_handler_1 = __webpack_require__(2764); +const smithy_client_1 = __webpack_require__(1411); +const util_body_length_node_1 = __webpack_require__(3638); +const util_defaults_mode_node_1 = __webpack_require__(5435); +const util_retry_1 = __webpack_require__(5518); +const runtimeConfig_shared_1 = __webpack_require__(357); +const getRuntimeConfig = (config) => { + (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger, + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? + (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? + (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }, config), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 357: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __webpack_require__(8704); +const protocols_1 = __webpack_require__(7288); +const core_2 = __webpack_require__(402); +const smithy_client_1 = __webpack_require__(1411); +const url_parser_1 = __webpack_require__(4494); +const util_base64_1 = __webpack_require__(8385); +const util_utf8_1 = __webpack_require__(1577); +const httpAuthSchemeProvider_1 = __webpack_require__(7709); +const endpointResolver_1 = __webpack_require__(4928); +const schemas_0_1 = __webpack_require__(890); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2023-01-01", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSigninHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.signin", + errorTypeRegistries: schemas_0_1.errorTypeRegistries, + version: "2023-01-01", + serviceTarget: "Signin", + }, + serviceId: config?.serviceId ?? "Signin", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 890: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CreateOAuth2Token$ = exports.CreateOAuth2TokenResponseBody$ = exports.CreateOAuth2TokenResponse$ = exports.CreateOAuth2TokenRequestBody$ = exports.CreateOAuth2TokenRequest$ = exports.AccessToken$ = exports.errorTypeRegistries = exports.ValidationException$ = exports.TooManyRequestsError$ = exports.InternalServerException$ = exports.AccessDeniedException$ = exports.SigninServiceException$ = void 0; +const _ADE = "AccessDeniedException"; +const _AT = "AccessToken"; +const _COAT = "CreateOAuth2Token"; +const _COATR = "CreateOAuth2TokenRequest"; +const _COATRB = "CreateOAuth2TokenRequestBody"; +const _COATRBr = "CreateOAuth2TokenResponseBody"; +const _COATRr = "CreateOAuth2TokenResponse"; +const _ISE = "InternalServerException"; +const _RT = "RefreshToken"; +const _TMRE = "TooManyRequestsError"; +const _VE = "ValidationException"; +const _aKI = "accessKeyId"; +const _aT = "accessToken"; +const _c = "client"; +const _cI = "clientId"; +const _cV = "codeVerifier"; +const _co = "code"; +const _e = "error"; +const _eI = "expiresIn"; +const _gT = "grantType"; +const _h = "http"; +const _hE = "httpError"; +const _iT = "idToken"; +const _jN = "jsonName"; +const _m = "message"; +const _rT = "refreshToken"; +const _rU = "redirectUri"; +const _s = "smithy.ts.sdk.synthetic.com.amazonaws.signin"; +const _sAK = "secretAccessKey"; +const _sT = "sessionToken"; +const _se = "server"; +const _tI = "tokenInput"; +const _tO = "tokenOutput"; +const _tT = "tokenType"; +const n0 = "com.amazonaws.signin"; +const schema_1 = __webpack_require__(6890); +const errors_1 = __webpack_require__(7214); +const SigninServiceException_1 = __webpack_require__(2831); +const _s_registry = schema_1.TypeRegistry.for(_s); +exports.SigninServiceException$ = [-3, _s, "SigninServiceException", 0, [], []]; +_s_registry.registerError(exports.SigninServiceException$, SigninServiceException_1.SigninServiceException); +const n0_registry = schema_1.TypeRegistry.for(n0); +exports.AccessDeniedException$ = [-3, n0, _ADE, { [_e]: _c }, [_e, _m], [0, 0], 2]; +n0_registry.registerError(exports.AccessDeniedException$, errors_1.AccessDeniedException); +exports.InternalServerException$ = [-3, n0, _ISE, { [_e]: _se, [_hE]: 500 }, [_e, _m], [0, 0], 2]; +n0_registry.registerError(exports.InternalServerException$, errors_1.InternalServerException); +exports.TooManyRequestsError$ = [-3, n0, _TMRE, { [_e]: _c, [_hE]: 429 }, [_e, _m], [0, 0], 2]; +n0_registry.registerError(exports.TooManyRequestsError$, errors_1.TooManyRequestsError); +exports.ValidationException$ = [-3, n0, _VE, { [_e]: _c, [_hE]: 400 }, [_e, _m], [0, 0], 2]; +n0_registry.registerError(exports.ValidationException$, errors_1.ValidationException); +exports.errorTypeRegistries = [_s_registry, n0_registry]; +var RefreshToken = [0, n0, _RT, 8, 0]; +exports.AccessToken$ = [ + 3, + n0, + _AT, + 8, + [_aKI, _sAK, _sT], + [ + [0, { [_jN]: _aKI }], + [0, { [_jN]: _sAK }], + [0, { [_jN]: _sT }], + ], + 3, +]; +exports.CreateOAuth2TokenRequest$ = [ + 3, + n0, + _COATR, + 0, + [_tI], + [[() => exports.CreateOAuth2TokenRequestBody$, 16]], + 1, +]; +exports.CreateOAuth2TokenRequestBody$ = [ + 3, + n0, + _COATRB, + 0, + [_cI, _gT, _co, _rU, _cV, _rT], + [ + [0, { [_jN]: _cI }], + [0, { [_jN]: _gT }], + 0, + [0, { [_jN]: _rU }], + [0, { [_jN]: _cV }], + [() => RefreshToken, { [_jN]: _rT }], + ], + 2, +]; +exports.CreateOAuth2TokenResponse$ = [ + 3, + n0, + _COATRr, + 0, + [_tO], + [[() => exports.CreateOAuth2TokenResponseBody$, 16]], + 1, +]; +exports.CreateOAuth2TokenResponseBody$ = [ + 3, + n0, + _COATRBr, + 0, + [_aT, _tT, _eI, _rT, _iT], + [ + [() => exports.AccessToken$, { [_jN]: _aT }], + [0, { [_jN]: _tT }], + [1, { [_jN]: _eI }], + [() => RefreshToken, { [_jN]: _rT }], + [0, { [_jN]: _iT }], + ], + 4, +]; +exports.CreateOAuth2Token$ = [ + 9, + n0, + _COAT, + { [_h]: ["POST", "/v1/token", 200] }, + () => exports.CreateOAuth2TokenRequest$, + () => exports.CreateOAuth2TokenResponse$, +]; + + +/***/ }) + +}; +; \ No newline at end of file diff --git a/dist/869.index.js b/dist/869.index.js index 8680c7f..2e9e12b 100644 --- a/dist/869.index.js +++ b/dist/869.index.js @@ -11,6 +11,7 @@ exports.modules = { var sharedIniFileLoader = __webpack_require__(4964); var propertyProvider = __webpack_require__(8857); var client = __webpack_require__(5152); +var credentialProviderLogin = __webpack_require__(4072); const resolveCredentialSource = (credentialSource, profileName, logger) => { const sourceProvidersMap = { @@ -64,18 +65,19 @@ const isCredentialSourceProfile = (arg, { profile, logger }) => { } return withProviderProfile; }; -const resolveAssumeRoleCredentials = async (profileName, profiles, options, visitedProfiles = {}, resolveProfileData) => { +const resolveAssumeRoleCredentials = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, resolveProfileData) => { options.logger?.debug("@aws-sdk/credential-provider-ini - resolveAssumeRoleCredentials (STS)"); const profileData = profiles[profileName]; const { source_profile, region } = profileData; if (!options.roleAssumer) { - const { getDefaultRoleAssumer } = await __webpack_require__.e(/* import() */ 136).then(__webpack_require__.t.bind(__webpack_require__, 1136, 23)); + const { getDefaultRoleAssumer } = await Promise.all(/* import() */[__webpack_require__.e(346), __webpack_require__.e(136)]).then(__webpack_require__.t.bind(__webpack_require__, 1136, 23)); options.roleAssumer = getDefaultRoleAssumer({ ...options.clientConfig, credentialProviderLogger: options.logger, parentClientConfig: { + ...callerClientConfig, ...options?.parentClientConfig, - region: region ?? options?.parentClientConfig?.region, + region: region ?? options?.parentClientConfig?.region ?? callerClientConfig?.region, }, }, options.clientPlugins); } @@ -86,7 +88,7 @@ const resolveAssumeRoleCredentials = async (profileName, profiles, options, visi } options.logger?.debug(`@aws-sdk/credential-provider-ini - finding credential resolver using ${source_profile ? `source_profile=[${source_profile}]` : `profile=[${profileName}]`}`); const sourceCredsProvider = source_profile - ? resolveProfileData(source_profile, profiles, options, { + ? resolveProfileData(source_profile, profiles, options, callerClientConfig, { ...visitedProfiles, [source_profile]: true, }, isCredentialSourceWithoutRoleArn(profiles[source_profile] ?? {})) @@ -117,20 +119,33 @@ const isCredentialSourceWithoutRoleArn = (section) => { return !section.role_arn && !!section.credential_source; }; +const isLoginProfile = (data) => { + return Boolean(data && data.login_session); +}; +const resolveLoginCredentials = async (profileName, options, callerClientConfig) => { + const credentials = await credentialProviderLogin.fromLoginCredentials({ + ...options, + profile: profileName, + })({ callerClientConfig }); + return client.setCredentialFeature(credentials, "CREDENTIALS_PROFILE_LOGIN", "AC"); +}; + const isProcessProfile = (arg) => Boolean(arg) && typeof arg === "object" && typeof arg.credential_process === "string"; const resolveProcessCredentials = async (options, profile) => __webpack_require__.e(/* import() */ 360).then(__webpack_require__.t.bind(__webpack_require__, 5360, 19)).then(({ fromProcess }) => fromProcess({ ...options, profile, })().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_PROCESS", "v"))); -const resolveSsoCredentials = async (profile, profileData, options = {}) => { +const resolveSsoCredentials = async (profile, profileData, options = {}, callerClientConfig) => { const { fromSSO } = await __webpack_require__.e(/* import() */ 998).then(__webpack_require__.t.bind(__webpack_require__, 998, 19)); return fromSSO({ profile, logger: options.logger, parentClientConfig: options.parentClientConfig, clientConfig: options.clientConfig, - })().then((creds) => { + })({ + callerClientConfig, + }).then((creds) => { if (profileData.sso_session) { return client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_SSO", "r"); } @@ -169,56 +184,347 @@ const isWebIdentityProfile = (arg) => Boolean(arg) && typeof arg.web_identity_token_file === "string" && typeof arg.role_arn === "string" && ["undefined", "string"].indexOf(typeof arg.role_session_name) > -1; -const resolveWebIdentityCredentials = async (profile, options) => __webpack_require__.e(/* import() */ 956).then(__webpack_require__.t.bind(__webpack_require__, 9956, 23)).then(({ fromTokenFile }) => fromTokenFile({ +const resolveWebIdentityCredentials = async (profile, options, callerClientConfig) => Promise.all(/* import() */[__webpack_require__.e(346), __webpack_require__.e(956)]).then(__webpack_require__.t.bind(__webpack_require__, 9956, 23)).then(({ fromTokenFile }) => fromTokenFile({ webIdentityTokenFile: profile.web_identity_token_file, roleArn: profile.role_arn, roleSessionName: profile.role_session_name, roleAssumerWithWebIdentity: options.roleAssumerWithWebIdentity, logger: options.logger, parentClientConfig: options.parentClientConfig, -})().then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"))); +})({ + callerClientConfig, +}).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_PROFILE_STS_WEB_ID_TOKEN", "q"))); -const resolveProfileData = async (profileName, profiles, options, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => { +const resolveProfileData = async (profileName, profiles, options, callerClientConfig, visitedProfiles = {}, isAssumeRoleRecursiveCall = false) => { const data = profiles[profileName]; if (Object.keys(visitedProfiles).length > 0 && isStaticCredsProfile(data)) { return resolveStaticCredentials(data, options); } if (isAssumeRoleRecursiveCall || isAssumeRoleProfile(data, { profile: profileName, logger: options.logger })) { - return resolveAssumeRoleCredentials(profileName, profiles, options, visitedProfiles, resolveProfileData); + return resolveAssumeRoleCredentials(profileName, profiles, options, callerClientConfig, visitedProfiles, resolveProfileData); } if (isStaticCredsProfile(data)) { return resolveStaticCredentials(data, options); } if (isWebIdentityProfile(data)) { - return resolveWebIdentityCredentials(data, options); + return resolveWebIdentityCredentials(data, options, callerClientConfig); } if (isProcessProfile(data)) { return resolveProcessCredentials(options, profileName); } if (isSsoProfile(data)) { - return await resolveSsoCredentials(profileName, data, options); + return await resolveSsoCredentials(profileName, data, options, callerClientConfig); + } + if (isLoginProfile(data)) { + return resolveLoginCredentials(profileName, options, callerClientConfig); } throw new propertyProvider.CredentialsProviderError(`Could not resolve credentials using profile: [${profileName}] in configuration/credentials file(s).`, { logger: options.logger }); }; -const fromIni = (_init = {}) => async ({ callerClientConfig } = {}) => { - const init = { - ..._init, - parentClientConfig: { - ...callerClientConfig, - ..._init.parentClientConfig, - }, - }; +const fromIni = (init = {}) => async ({ callerClientConfig } = {}) => { init.logger?.debug("@aws-sdk/credential-provider-ini - fromIni"); const profiles = await sharedIniFileLoader.parseKnownFiles(init); return resolveProfileData(sharedIniFileLoader.getProfileName({ - profile: _init.profile ?? callerClientConfig?.profile, - }), profiles, init); + profile: init.profile ?? callerClientConfig?.profile, + }), profiles, init, callerClientConfig); }; exports.fromIni = fromIni; +/***/ }), + +/***/ 4072: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var client = __webpack_require__(5152); +var propertyProvider = __webpack_require__(8857); +var sharedIniFileLoader = __webpack_require__(4964); +var protocolHttp = __webpack_require__(2356); +var node_crypto = __webpack_require__(7598); +var node_fs = __webpack_require__(3024); +var node_os = __webpack_require__(8161); +var node_path = __webpack_require__(6760); + +class LoginCredentialsFetcher { + profileData; + init; + callerClientConfig; + static REFRESH_THRESHOLD = 5 * 60 * 1000; + constructor(profileData, init, callerClientConfig) { + this.profileData = profileData; + this.init = init; + this.callerClientConfig = callerClientConfig; + } + async loadCredentials() { + const token = await this.loadToken(); + if (!token) { + throw new propertyProvider.CredentialsProviderError(`Failed to load a token for session ${this.loginSession}, please re-authenticate using aws login`, { tryNextLink: false, logger: this.logger }); + } + const accessToken = token.accessToken; + const now = Date.now(); + const expiryTime = new Date(accessToken.expiresAt).getTime(); + const timeUntilExpiry = expiryTime - now; + if (timeUntilExpiry <= LoginCredentialsFetcher.REFRESH_THRESHOLD) { + return this.refresh(token); + } + return { + accessKeyId: accessToken.accessKeyId, + secretAccessKey: accessToken.secretAccessKey, + sessionToken: accessToken.sessionToken, + accountId: accessToken.accountId, + expiration: new Date(accessToken.expiresAt), + }; + } + get logger() { + return this.init?.logger; + } + get loginSession() { + return this.profileData.login_session; + } + async refresh(token) { + const { SigninClient, CreateOAuth2TokenCommand } = await Promise.all(/* import() */[__webpack_require__.e(346), __webpack_require__.e(762)]).then(__webpack_require__.t.bind(__webpack_require__, 9762, 23)); + const { logger, userAgentAppId } = this.callerClientConfig ?? {}; + const isH2 = (requestHandler) => { + return requestHandler?.metadata?.handlerProtocol === "h2"; + }; + const requestHandler = isH2(this.callerClientConfig?.requestHandler) + ? undefined + : this.callerClientConfig?.requestHandler; + const region = this.profileData.region ?? (await this.callerClientConfig?.region?.()) ?? process.env.AWS_REGION; + const client = new SigninClient({ + credentials: { + accessKeyId: "", + secretAccessKey: "", + }, + region, + requestHandler, + logger, + userAgentAppId, + ...this.init?.clientConfig, + }); + this.createDPoPInterceptor(client.middlewareStack); + const commandInput = { + tokenInput: { + clientId: token.clientId, + refreshToken: token.refreshToken, + grantType: "refresh_token", + }, + }; + try { + const response = await client.send(new CreateOAuth2TokenCommand(commandInput)); + const { accessKeyId, secretAccessKey, sessionToken } = response.tokenOutput?.accessToken ?? {}; + const { refreshToken, expiresIn } = response.tokenOutput ?? {}; + if (!accessKeyId || !secretAccessKey || !sessionToken || !refreshToken) { + throw new propertyProvider.CredentialsProviderError("Token refresh response missing required fields", { + logger: this.logger, + tryNextLink: false, + }); + } + const expiresInMs = (expiresIn ?? 900) * 1000; + const expiration = new Date(Date.now() + expiresInMs); + const updatedToken = { + ...token, + accessToken: { + ...token.accessToken, + accessKeyId: accessKeyId, + secretAccessKey: secretAccessKey, + sessionToken: sessionToken, + expiresAt: expiration.toISOString(), + }, + refreshToken: refreshToken, + }; + await this.saveToken(updatedToken); + const newAccessToken = updatedToken.accessToken; + return { + accessKeyId: newAccessToken.accessKeyId, + secretAccessKey: newAccessToken.secretAccessKey, + sessionToken: newAccessToken.sessionToken, + accountId: newAccessToken.accountId, + expiration, + }; + } + catch (error) { + if (error.name === "AccessDeniedException") { + const errorType = error.error; + let message; + switch (errorType) { + case "TOKEN_EXPIRED": + message = "Your session has expired. Please reauthenticate."; + break; + case "USER_CREDENTIALS_CHANGED": + message = + "Unable to refresh credentials because of a change in your password. Please reauthenticate with your new password."; + break; + case "INSUFFICIENT_PERMISSIONS": + message = + "Unable to refresh credentials due to insufficient permissions. You may be missing permission for the 'CreateOAuth2Token' action."; + break; + default: + message = `Failed to refresh token: ${String(error)}. Please re-authenticate using \`aws login\``; + } + throw new propertyProvider.CredentialsProviderError(message, { logger: this.logger, tryNextLink: false }); + } + throw new propertyProvider.CredentialsProviderError(`Failed to refresh token: ${String(error)}. Please re-authenticate using aws login`, { logger: this.logger }); + } + } + async loadToken() { + const tokenFilePath = this.getTokenFilePath(); + try { + let tokenData; + try { + tokenData = await sharedIniFileLoader.readFile(tokenFilePath, { ignoreCache: this.init?.ignoreCache }); + } + catch { + tokenData = await node_fs.promises.readFile(tokenFilePath, "utf8"); + } + const token = JSON.parse(tokenData); + const missingFields = ["accessToken", "clientId", "refreshToken", "dpopKey"].filter((k) => !token[k]); + if (!token.accessToken?.accountId) { + missingFields.push("accountId"); + } + if (missingFields.length > 0) { + throw new propertyProvider.CredentialsProviderError(`Token validation failed, missing fields: ${missingFields.join(", ")}`, { + logger: this.logger, + tryNextLink: false, + }); + } + return token; + } + catch (error) { + throw new propertyProvider.CredentialsProviderError(`Failed to load token from ${tokenFilePath}: ${String(error)}`, { + logger: this.logger, + tryNextLink: false, + }); + } + } + async saveToken(token) { + const tokenFilePath = this.getTokenFilePath(); + const directory = node_path.dirname(tokenFilePath); + try { + await node_fs.promises.mkdir(directory, { recursive: true }); + } + catch (error) { + } + await node_fs.promises.writeFile(tokenFilePath, JSON.stringify(token, null, 2), "utf8"); + } + getTokenFilePath() { + const directory = process.env.AWS_LOGIN_CACHE_DIRECTORY ?? node_path.join(node_os.homedir(), ".aws", "login", "cache"); + const loginSessionBytes = Buffer.from(this.loginSession, "utf8"); + const loginSessionSha256 = node_crypto.createHash("sha256").update(loginSessionBytes).digest("hex"); + return node_path.join(directory, `${loginSessionSha256}.json`); + } + derToRawSignature(derSignature) { + let offset = 2; + if (derSignature[offset] !== 0x02) { + throw new Error("Invalid DER signature"); + } + offset++; + const rLength = derSignature[offset++]; + let r = derSignature.subarray(offset, offset + rLength); + offset += rLength; + if (derSignature[offset] !== 0x02) { + throw new Error("Invalid DER signature"); + } + offset++; + const sLength = derSignature[offset++]; + let s = derSignature.subarray(offset, offset + sLength); + r = r[0] === 0x00 ? r.subarray(1) : r; + s = s[0] === 0x00 ? s.subarray(1) : s; + const rPadded = Buffer.concat([Buffer.alloc(32 - r.length), r]); + const sPadded = Buffer.concat([Buffer.alloc(32 - s.length), s]); + return Buffer.concat([rPadded, sPadded]); + } + createDPoPInterceptor(middlewareStack) { + middlewareStack.add((next) => async (args) => { + if (protocolHttp.HttpRequest.isInstance(args.request)) { + const request = args.request; + const actualEndpoint = `${request.protocol}//${request.hostname}${request.port ? `:${request.port}` : ""}${request.path}`; + const dpop = await this.generateDpop(request.method, actualEndpoint); + request.headers = { + ...request.headers, + DPoP: dpop, + }; + } + return next(args); + }, { + step: "finalizeRequest", + name: "dpopInterceptor", + override: true, + }); + } + async generateDpop(method = "POST", endpoint) { + const token = await this.loadToken(); + try { + const privateKey = node_crypto.createPrivateKey({ + key: token.dpopKey, + format: "pem", + type: "sec1", + }); + const publicKey = node_crypto.createPublicKey(privateKey); + const publicDer = publicKey.export({ format: "der", type: "spki" }); + let pointStart = -1; + for (let i = 0; i < publicDer.length; i++) { + if (publicDer[i] === 0x04) { + pointStart = i; + break; + } + } + const x = publicDer.slice(pointStart + 1, pointStart + 33); + const y = publicDer.slice(pointStart + 33, pointStart + 65); + const header = { + alg: "ES256", + typ: "dpop+jwt", + jwk: { + kty: "EC", + crv: "P-256", + x: x.toString("base64url"), + y: y.toString("base64url"), + }, + }; + const payload = { + jti: crypto.randomUUID(), + htm: method, + htu: endpoint, + iat: Math.floor(Date.now() / 1000), + }; + const headerB64 = Buffer.from(JSON.stringify(header)).toString("base64url"); + const payloadB64 = Buffer.from(JSON.stringify(payload)).toString("base64url"); + const message = `${headerB64}.${payloadB64}`; + const asn1Signature = node_crypto.sign("sha256", Buffer.from(message), privateKey); + const rawSignature = this.derToRawSignature(asn1Signature); + const signatureB64 = rawSignature.toString("base64url"); + return `${message}.${signatureB64}`; + } + catch (error) { + throw new propertyProvider.CredentialsProviderError(`Failed to generate Dpop proof: ${error instanceof Error ? error.message : String(error)}`, { logger: this.logger, tryNextLink: false }); + } + } +} + +const fromLoginCredentials = (init) => async ({ callerClientConfig } = {}) => { + init?.logger?.debug?.("@aws-sdk/credential-providers - fromLoginCredentials"); + const profiles = await sharedIniFileLoader.parseKnownFiles(init || {}); + const profileName = sharedIniFileLoader.getProfileName({ + profile: init?.profile ?? callerClientConfig?.profile, + }); + const profile = profiles[profileName]; + if (!profile?.login_session) { + throw new propertyProvider.CredentialsProviderError(`Profile ${profileName} does not contain login_session.`, { + tryNextLink: true, + logger: init?.logger, + }); + } + const fetcher = new LoginCredentialsFetcher(profile, init, callerClientConfig); + const credentials = await fetcher.loadCredentials(); + return client.setCredentialFeature(credentials, "CREDENTIALS_LOGIN", "AD"); +}; + +exports.fromLoginCredentials = fromLoginCredentials; + + /***/ }) }; diff --git a/dist/956.index.js b/dist/956.index.js index b2ce7d4..3e9e833 100644 --- a/dist/956.index.js +++ b/dist/956.index.js @@ -351,7 +351,7 @@ exports.commonParams = { Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __webpack_require__(3068); +const util_endpoints_1 = __webpack_require__(6707); const util_endpoints_2 = __webpack_require__(9674); const ruleset_1 = __webpack_require__(1670); const cache = new util_endpoints_2.EndpointCache({ @@ -393,312 +393,11 @@ var STSClient = __webpack_require__(3723); var smithyClient = __webpack_require__(1411); var middlewareEndpoint = __webpack_require__(99); var EndpointParameters = __webpack_require__(6811); -var schema = __webpack_require__(6890); +var schemas_0 = __webpack_require__(1684); +var errors = __webpack_require__(1688); var client = __webpack_require__(5152); var regionConfigResolver = __webpack_require__(6463); - -let STSServiceException$1 = class STSServiceException extends smithyClient.ServiceException { - constructor(options) { - super(options); - Object.setPrototypeOf(this, STSServiceException.prototype); - } -}; - -let ExpiredTokenException$1 = class ExpiredTokenException extends STSServiceException$1 { - name = "ExpiredTokenException"; - $fault = "client"; - constructor(opts) { - super({ - name: "ExpiredTokenException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ExpiredTokenException.prototype); - } -}; -let MalformedPolicyDocumentException$1 = class MalformedPolicyDocumentException extends STSServiceException$1 { - name = "MalformedPolicyDocumentException"; - $fault = "client"; - constructor(opts) { - super({ - name: "MalformedPolicyDocumentException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); - } -}; -let PackedPolicyTooLargeException$1 = class PackedPolicyTooLargeException extends STSServiceException$1 { - name = "PackedPolicyTooLargeException"; - $fault = "client"; - constructor(opts) { - super({ - name: "PackedPolicyTooLargeException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype); - } -}; -let RegionDisabledException$1 = class RegionDisabledException extends STSServiceException$1 { - name = "RegionDisabledException"; - $fault = "client"; - constructor(opts) { - super({ - name: "RegionDisabledException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, RegionDisabledException.prototype); - } -}; -let IDPRejectedClaimException$1 = class IDPRejectedClaimException extends STSServiceException$1 { - name = "IDPRejectedClaimException"; - $fault = "client"; - constructor(opts) { - super({ - name: "IDPRejectedClaimException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, IDPRejectedClaimException.prototype); - } -}; -let InvalidIdentityTokenException$1 = class InvalidIdentityTokenException extends STSServiceException$1 { - name = "InvalidIdentityTokenException"; - $fault = "client"; - constructor(opts) { - super({ - name: "InvalidIdentityTokenException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype); - } -}; -let IDPCommunicationErrorException$1 = class IDPCommunicationErrorException extends STSServiceException$1 { - name = "IDPCommunicationErrorException"; - $fault = "client"; - constructor(opts) { - super({ - name: "IDPCommunicationErrorException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); - } -}; - -const _A = "Arn"; -const _AKI = "AccessKeyId"; -const _AR = "AssumeRole"; -const _ARI = "AssumedRoleId"; -const _ARR = "AssumeRoleRequest"; -const _ARRs = "AssumeRoleResponse"; -const _ARU = "AssumedRoleUser"; -const _ARWWI = "AssumeRoleWithWebIdentity"; -const _ARWWIR = "AssumeRoleWithWebIdentityRequest"; -const _ARWWIRs = "AssumeRoleWithWebIdentityResponse"; -const _Au = "Audience"; -const _C = "Credentials"; -const _CA = "ContextAssertion"; -const _DS = "DurationSeconds"; -const _E = "Expiration"; -const _EI = "ExternalId"; -const _ETE = "ExpiredTokenException"; -const _IDPCEE = "IDPCommunicationErrorException"; -const _IDPRCE = "IDPRejectedClaimException"; -const _IITE = "InvalidIdentityTokenException"; -const _K = "Key"; -const _MPDE = "MalformedPolicyDocumentException"; -const _P = "Policy"; -const _PA = "PolicyArns"; -const _PAr = "ProviderArn"; -const _PC = "ProvidedContexts"; -const _PCLT = "ProvidedContextsListType"; -const _PCr = "ProvidedContext"; -const _PDT = "PolicyDescriptorType"; -const _PI = "ProviderId"; -const _PPS = "PackedPolicySize"; -const _PPTLE = "PackedPolicyTooLargeException"; -const _Pr = "Provider"; -const _RA = "RoleArn"; -const _RDE = "RegionDisabledException"; -const _RSN = "RoleSessionName"; -const _SAK = "SecretAccessKey"; -const _SFWIT = "SubjectFromWebIdentityToken"; -const _SI = "SourceIdentity"; -const _SN = "SerialNumber"; -const _ST = "SessionToken"; -const _T = "Tags"; -const _TC = "TokenCode"; -const _TTK = "TransitiveTagKeys"; -const _Ta = "Tag"; -const _V = "Value"; -const _WIT = "WebIdentityToken"; -const _a = "arn"; -const _aKST = "accessKeySecretType"; -const _aQE = "awsQueryError"; -const _c = "client"; -const _cTT = "clientTokenType"; -const _e = "error"; -const _hE = "httpError"; -const _m = "message"; -const _pDLT = "policyDescriptorListType"; -const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts"; -const _tLT = "tagListType"; -const n0 = "com.amazonaws.sts"; -var accessKeySecretType = [0, n0, _aKST, 8, 0]; -var clientTokenType = [0, n0, _cTT, 8, 0]; -var AssumedRoleUser = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]]; -var AssumeRoleRequest = [ - 3, - n0, - _ARR, - 0, - [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC], - [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType], -]; -var AssumeRoleResponse = [ - 3, - n0, - _ARRs, - 0, - [_C, _ARU, _PPS, _SI], - [[() => Credentials, 0], () => AssumedRoleUser, 1, 0], -]; -var AssumeRoleWithWebIdentityRequest = [ - 3, - n0, - _ARWWIR, - 0, - [_RA, _RSN, _WIT, _PI, _PA, _P, _DS], - [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1], -]; -var AssumeRoleWithWebIdentityResponse = [ - 3, - n0, - _ARWWIRs, - 0, - [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI], - [[() => Credentials, 0], 0, () => AssumedRoleUser, 1, 0, 0, 0], -]; -var Credentials = [ - 3, - n0, - _C, - 0, - [_AKI, _SAK, _ST, _E], - [0, [() => accessKeySecretType, 0], 0, 4], -]; -var ExpiredTokenException = [ - -3, - n0, - _ETE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`ExpiredTokenException`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(ExpiredTokenException, ExpiredTokenException$1); -var IDPCommunicationErrorException = [ - -3, - n0, - _IDPCEE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`IDPCommunicationError`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException, IDPCommunicationErrorException$1); -var IDPRejectedClaimException = [ - -3, - n0, - _IDPRCE, - { - [_e]: _c, - [_hE]: 403, - [_aQE]: [`IDPRejectedClaim`, 403], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException, IDPRejectedClaimException$1); -var InvalidIdentityTokenException = [ - -3, - n0, - _IITE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`InvalidIdentityToken`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException, InvalidIdentityTokenException$1); -var MalformedPolicyDocumentException = [ - -3, - n0, - _MPDE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`MalformedPolicyDocument`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException, MalformedPolicyDocumentException$1); -var PackedPolicyTooLargeException = [ - -3, - n0, - _PPTLE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`PackedPolicyTooLarge`, 400], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException, PackedPolicyTooLargeException$1); -var PolicyDescriptorType = [3, n0, _PDT, 0, [_a], [0]]; -var ProvidedContext = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]]; -var RegionDisabledException = [ - -3, - n0, - _RDE, - { - [_e]: _c, - [_hE]: 403, - [_aQE]: [`RegionDisabledException`, 403], - }, - [_m], - [0], -]; -schema.TypeRegistry.for(n0).registerError(RegionDisabledException, RegionDisabledException$1); -var Tag = [3, n0, _Ta, 0, [_K, _V], [0, 0]]; -var STSServiceException = [-3, _s, "STSServiceException", 0, [], []]; -schema.TypeRegistry.for(_s).registerError(STSServiceException, STSServiceException$1); -var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType]; -var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext]; -var tagListType = [1, n0, _tLT, 0, () => Tag]; -var AssumeRole = [9, n0, _AR, 0, () => AssumeRoleRequest, () => AssumeRoleResponse]; -var AssumeRoleWithWebIdentity = [ - 9, - n0, - _ARWWI, - 0, - () => AssumeRoleWithWebIdentityRequest, - () => AssumeRoleWithWebIdentityResponse, -]; +var STSServiceException = __webpack_require__(7171); class AssumeRoleCommand extends smithyClient.Command .classBuilder() @@ -708,7 +407,7 @@ class AssumeRoleCommand extends smithyClient.Command }) .s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}) .n("STSClient", "AssumeRoleCommand") - .sc(AssumeRole) + .sc(schemas_0.AssumeRole$) .build() { } @@ -720,7 +419,7 @@ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command }) .s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}) .n("STSClient", "AssumeRoleWithWebIdentityCommand") - .sc(AssumeRoleWithWebIdentity) + .sc(schemas_0.AssumeRoleWithWebIdentity$) .build() { } @@ -744,9 +443,10 @@ const getAccountIdFromAssumedRoleUser = (assumedRoleUser) => { const resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => { const region = typeof _region === "function" ? await _region() : _region; const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion; - const stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)(); + let stsDefaultRegion = ""; + const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)()); credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`); - return region ?? parentRegion ?? stsDefaultRegion; + return resolvedRegion; }; const getDefaultRoleAssumer$1 = (stsOptions, STSClient) => { let stsClient; @@ -855,17 +555,13 @@ Object.defineProperty(exports, "$Command", ({ enumerable: true, get: function () { return smithyClient.Command; } })); +Object.defineProperty(exports, "STSServiceException", ({ + enumerable: true, + get: function () { return STSServiceException.STSServiceException; } +})); exports.AssumeRoleCommand = AssumeRoleCommand; exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand; -exports.ExpiredTokenException = ExpiredTokenException$1; -exports.IDPCommunicationErrorException = IDPCommunicationErrorException$1; -exports.IDPRejectedClaimException = IDPRejectedClaimException$1; -exports.InvalidIdentityTokenException = InvalidIdentityTokenException$1; -exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException$1; -exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException$1; -exports.RegionDisabledException = RegionDisabledException$1; exports.STS = STS; -exports.STSServiceException = STSServiceException$1; exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider; exports.getDefaultRoleAssumer = getDefaultRoleAssumer; exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity; @@ -875,6 +571,139 @@ Object.keys(STSClient).forEach(function (k) { get: function () { return STSClient[k]; } }); }); +Object.keys(schemas_0).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return schemas_0[k]; } + }); +}); +Object.keys(errors).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return errors[k]; } + }); +}); + + +/***/ }), + +/***/ 7171: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.STSServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __webpack_require__(1411); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +class STSServiceException extends smithy_client_1.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, STSServiceException.prototype); + } +} +exports.STSServiceException = STSServiceException; + + +/***/ }), + +/***/ 1688: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.IDPCommunicationErrorException = exports.InvalidIdentityTokenException = exports.IDPRejectedClaimException = exports.RegionDisabledException = exports.PackedPolicyTooLargeException = exports.MalformedPolicyDocumentException = exports.ExpiredTokenException = void 0; +const STSServiceException_1 = __webpack_require__(7171); +class ExpiredTokenException extends STSServiceException_1.STSServiceException { + name = "ExpiredTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "ExpiredTokenException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ExpiredTokenException.prototype); + } +} +exports.ExpiredTokenException = ExpiredTokenException; +class MalformedPolicyDocumentException extends STSServiceException_1.STSServiceException { + name = "MalformedPolicyDocumentException"; + $fault = "client"; + constructor(opts) { + super({ + name: "MalformedPolicyDocumentException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype); + } +} +exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException; +class PackedPolicyTooLargeException extends STSServiceException_1.STSServiceException { + name = "PackedPolicyTooLargeException"; + $fault = "client"; + constructor(opts) { + super({ + name: "PackedPolicyTooLargeException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype); + } +} +exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException; +class RegionDisabledException extends STSServiceException_1.STSServiceException { + name = "RegionDisabledException"; + $fault = "client"; + constructor(opts) { + super({ + name: "RegionDisabledException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, RegionDisabledException.prototype); + } +} +exports.RegionDisabledException = RegionDisabledException; +class IDPRejectedClaimException extends STSServiceException_1.STSServiceException { + name = "IDPRejectedClaimException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPRejectedClaimException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IDPRejectedClaimException.prototype); + } +} +exports.IDPRejectedClaimException = IDPRejectedClaimException; +class InvalidIdentityTokenException extends STSServiceException_1.STSServiceException { + name = "InvalidIdentityTokenException"; + $fault = "client"; + constructor(opts) { + super({ + name: "InvalidIdentityTokenException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype); + } +} +exports.InvalidIdentityTokenException = InvalidIdentityTokenException; +class IDPCommunicationErrorException extends STSServiceException_1.STSServiceException { + name = "IDPCommunicationErrorException"; + $fault = "client"; + constructor(opts) { + super({ + name: "IDPCommunicationErrorException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype); + } +} +exports.IDPCommunicationErrorException = IDPCommunicationErrorException; /***/ }), @@ -894,15 +723,14 @@ const core_2 = __webpack_require__(402); const hash_node_1 = __webpack_require__(2711); const middleware_retry_1 = __webpack_require__(9618); const node_config_provider_1 = __webpack_require__(5704); -const node_http_handler_1 = __webpack_require__(1279); +const node_http_handler_1 = __webpack_require__(2764); +const smithy_client_1 = __webpack_require__(1411); const util_body_length_node_1 = __webpack_require__(3638); +const util_defaults_mode_node_1 = __webpack_require__(5435); const util_retry_1 = __webpack_require__(5518); const runtimeConfig_shared_1 = __webpack_require__(4443); -const smithy_client_1 = __webpack_require__(1411); -const util_defaults_mode_node_1 = __webpack_require__(5435); -const smithy_client_2 = __webpack_require__(1411); const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); + (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version); const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); @@ -969,6 +797,7 @@ const util_base64_1 = __webpack_require__(8385); const util_utf8_1 = __webpack_require__(1577); const httpAuthSchemeProvider_1 = __webpack_require__(7851); const endpointResolver_1 = __webpack_require__(9765); +const schemas_0_1 = __webpack_require__(1684); const getRuntimeConfig = (config) => { return { apiVersion: "2011-06-15", @@ -991,12 +820,14 @@ const getRuntimeConfig = (config) => { }, ], logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - protocol: config?.protocol ?? - new protocols_1.AwsQueryProtocol({ - defaultNamespace: "com.amazonaws.sts", - xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/", - version: "2011-06-15", - }), + protocol: config?.protocol ?? protocols_1.AwsQueryProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.sts", + errorTypeRegistries: schemas_0_1.errorTypeRegistries, + xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/", + version: "2011-06-15", + serviceTarget: "AWSSecurityTokenServiceV20110615", + }, serviceId: config?.serviceId ?? "STS", urlParser: config?.urlParser ?? url_parser_1.parseUrl, utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, @@ -1028,10 +859,205 @@ exports.resolveRuntimeExtensions = resolveRuntimeExtensions; /***/ }), -/***/ 9955: -/***/ ((module) => { +/***/ 1684: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.AssumeRoleWithWebIdentity$ = exports.AssumeRole$ = exports.Tag$ = exports.ProvidedContext$ = exports.PolicyDescriptorType$ = exports.Credentials$ = exports.AssumeRoleWithWebIdentityResponse$ = exports.AssumeRoleWithWebIdentityRequest$ = exports.AssumeRoleResponse$ = exports.AssumeRoleRequest$ = exports.AssumedRoleUser$ = exports.errorTypeRegistries = exports.RegionDisabledException$ = exports.PackedPolicyTooLargeException$ = exports.MalformedPolicyDocumentException$ = exports.InvalidIdentityTokenException$ = exports.IDPRejectedClaimException$ = exports.IDPCommunicationErrorException$ = exports.ExpiredTokenException$ = exports.STSServiceException$ = void 0; +const _A = "Arn"; +const _AKI = "AccessKeyId"; +const _AR = "AssumeRole"; +const _ARI = "AssumedRoleId"; +const _ARR = "AssumeRoleRequest"; +const _ARRs = "AssumeRoleResponse"; +const _ARU = "AssumedRoleUser"; +const _ARWWI = "AssumeRoleWithWebIdentity"; +const _ARWWIR = "AssumeRoleWithWebIdentityRequest"; +const _ARWWIRs = "AssumeRoleWithWebIdentityResponse"; +const _Au = "Audience"; +const _C = "Credentials"; +const _CA = "ContextAssertion"; +const _DS = "DurationSeconds"; +const _E = "Expiration"; +const _EI = "ExternalId"; +const _ETE = "ExpiredTokenException"; +const _IDPCEE = "IDPCommunicationErrorException"; +const _IDPRCE = "IDPRejectedClaimException"; +const _IITE = "InvalidIdentityTokenException"; +const _K = "Key"; +const _MPDE = "MalformedPolicyDocumentException"; +const _P = "Policy"; +const _PA = "PolicyArns"; +const _PAr = "ProviderArn"; +const _PC = "ProvidedContexts"; +const _PCLT = "ProvidedContextsListType"; +const _PCr = "ProvidedContext"; +const _PDT = "PolicyDescriptorType"; +const _PI = "ProviderId"; +const _PPS = "PackedPolicySize"; +const _PPTLE = "PackedPolicyTooLargeException"; +const _Pr = "Provider"; +const _RA = "RoleArn"; +const _RDE = "RegionDisabledException"; +const _RSN = "RoleSessionName"; +const _SAK = "SecretAccessKey"; +const _SFWIT = "SubjectFromWebIdentityToken"; +const _SI = "SourceIdentity"; +const _SN = "SerialNumber"; +const _ST = "SessionToken"; +const _T = "Tags"; +const _TC = "TokenCode"; +const _TTK = "TransitiveTagKeys"; +const _Ta = "Tag"; +const _V = "Value"; +const _WIT = "WebIdentityToken"; +const _a = "arn"; +const _aKST = "accessKeySecretType"; +const _aQE = "awsQueryError"; +const _c = "client"; +const _cTT = "clientTokenType"; +const _e = "error"; +const _hE = "httpError"; +const _m = "message"; +const _pDLT = "policyDescriptorListType"; +const _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts"; +const _tLT = "tagListType"; +const n0 = "com.amazonaws.sts"; +const schema_1 = __webpack_require__(6890); +const errors_1 = __webpack_require__(1688); +const STSServiceException_1 = __webpack_require__(7171); +const _s_registry = schema_1.TypeRegistry.for(_s); +exports.STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []]; +_s_registry.registerError(exports.STSServiceException$, STSServiceException_1.STSServiceException); +const n0_registry = schema_1.TypeRegistry.for(n0); +exports.ExpiredTokenException$ = [ + -3, + n0, + _ETE, + { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.ExpiredTokenException$, errors_1.ExpiredTokenException); +exports.IDPCommunicationErrorException$ = [ + -3, + n0, + _IDPCEE, + { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.IDPCommunicationErrorException$, errors_1.IDPCommunicationErrorException); +exports.IDPRejectedClaimException$ = [ + -3, + n0, + _IDPRCE, + { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 }, + [_m], + [0], +]; +n0_registry.registerError(exports.IDPRejectedClaimException$, errors_1.IDPRejectedClaimException); +exports.InvalidIdentityTokenException$ = [ + -3, + n0, + _IITE, + { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.InvalidIdentityTokenException$, errors_1.InvalidIdentityTokenException); +exports.MalformedPolicyDocumentException$ = [ + -3, + n0, + _MPDE, + { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.MalformedPolicyDocumentException$, errors_1.MalformedPolicyDocumentException); +exports.PackedPolicyTooLargeException$ = [ + -3, + n0, + _PPTLE, + { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 }, + [_m], + [0], +]; +n0_registry.registerError(exports.PackedPolicyTooLargeException$, errors_1.PackedPolicyTooLargeException); +exports.RegionDisabledException$ = [ + -3, + n0, + _RDE, + { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 }, + [_m], + [0], +]; +n0_registry.registerError(exports.RegionDisabledException$, errors_1.RegionDisabledException); +exports.errorTypeRegistries = [_s_registry, n0_registry]; +var accessKeySecretType = [0, n0, _aKST, 8, 0]; +var clientTokenType = [0, n0, _cTT, 8, 0]; +exports.AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0], 2]; +exports.AssumeRoleRequest$ = [ + 3, + n0, + _ARR, + 0, + [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC], + [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType], + 2, +]; +exports.AssumeRoleResponse$ = [ + 3, + n0, + _ARRs, + 0, + [_C, _ARU, _PPS, _SI], + [[() => exports.Credentials$, 0], () => exports.AssumedRoleUser$, 1, 0], +]; +exports.AssumeRoleWithWebIdentityRequest$ = [ + 3, + n0, + _ARWWIR, + 0, + [_RA, _RSN, _WIT, _PI, _PA, _P, _DS], + [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1], + 3, +]; +exports.AssumeRoleWithWebIdentityResponse$ = [ + 3, + n0, + _ARWWIRs, + 0, + [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI], + [[() => exports.Credentials$, 0], 0, () => exports.AssumedRoleUser$, 1, 0, 0, 0], +]; +exports.Credentials$ = [ + 3, + n0, + _C, + 0, + [_AKI, _SAK, _ST, _E], + [0, [() => accessKeySecretType, 0], 0, 4], + 4, +]; +exports.PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]]; +exports.ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]]; +exports.Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0], 2]; +var policyDescriptorListType = [1, n0, _pDLT, 0, () => exports.PolicyDescriptorType$]; +var ProvidedContextsListType = [1, n0, _PCLT, 0, () => exports.ProvidedContext$]; +var tagKeyListType = (/* unused pure expression or super */ null && (64 | 0)); +var tagListType = [1, n0, _tLT, 0, () => exports.Tag$]; +exports.AssumeRole$ = [9, n0, _AR, 0, () => exports.AssumeRoleRequest$, () => exports.AssumeRoleResponse$]; +exports.AssumeRoleWithWebIdentity$ = [ + 9, + n0, + _ARWWI, + 0, + () => exports.AssumeRoleWithWebIdentityRequest$, + () => exports.AssumeRoleWithWebIdentityResponse$, +]; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.935.0","description":"Nested clients for AWS SDK packages.","main":"./dist-cjs/index.js","module":"./dist-es/index.js","types":"./dist-types/index.d.ts","scripts":{"build":"yarn lint && concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline nested-clients","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","lint":"node ../../scripts/validation/submodules-linter.js --pkg nested-clients","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"engines":{"node":">=18.0.0"},"sideEffects":false,"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.935.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.935.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.935.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["./sso-oidc.d.ts","./sso-oidc.js","./sts.d.ts","./sts.js","dist-*/**"],"browser":{"./dist-es/submodules/sso-oidc/runtimeConfig":"./dist-es/submodules/sso-oidc/runtimeConfig.browser","./dist-es/submodules/sts/runtimeConfig":"./dist-es/submodules/sts/runtimeConfig.browser"},"react-native":{},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/packages/nested-clients","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"packages/nested-clients"},"exports":{"./sso-oidc":{"types":"./dist-types/submodules/sso-oidc/index.d.ts","module":"./dist-es/submodules/sso-oidc/index.js","node":"./dist-cjs/submodules/sso-oidc/index.js","import":"./dist-es/submodules/sso-oidc/index.js","require":"./dist-cjs/submodules/sso-oidc/index.js"},"./sts":{"types":"./dist-types/submodules/sts/index.d.ts","module":"./dist-es/submodules/sts/index.js","node":"./dist-cjs/submodules/sts/index.js","import":"./dist-es/submodules/sts/index.js","require":"./dist-cjs/submodules/sts/index.js"}}}'); /***/ }) diff --git a/dist/998.index.js b/dist/998.index.js index 2e16556..4688864 100644 --- a/dist/998.index.js +++ b/dist/998.index.js @@ -14,10 +14,9 @@ const util_middleware_1 = __webpack_require__(6324); const defaultSSOHttpAuthSchemeParametersProvider = async (config, context, input) => { return { operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), + region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), }; }; exports.defaultSSOHttpAuthSchemeParametersProvider = defaultSSOHttpAuthSchemeParametersProvider; @@ -44,22 +43,30 @@ function createSmithyApiNoAuthHttpAuthOption(authParameters) { const defaultSSOHttpAuthSchemeProvider = (authParameters) => { const options = []; switch (authParameters.operation) { - case "GetRoleCredentials": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "ListAccountRoles": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "ListAccounts": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } - case "Logout": { - options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); - break; - } + case "GetRoleCredentials": + { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + ; + case "ListAccountRoles": + { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + ; + case "ListAccounts": + { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + ; + case "Logout": + { + options.push(createSmithyApiNoAuthHttpAuthOption(authParameters)); + break; + } + ; default: { options.push(createAwsAuthSigv4HttpAuthOption(authParameters)); } @@ -84,7 +91,7 @@ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig; Object.defineProperty(exports, "__esModule", ({ value: true })); exports.defaultEndpointResolver = void 0; -const util_endpoints_1 = __webpack_require__(3068); +const util_endpoints_1 = __webpack_require__(3956); const util_endpoints_2 = __webpack_require__(9674); const ruleset_1 = __webpack_require__(1308); const cache = new util_endpoints_2.EndpointCache({ @@ -137,6 +144,9 @@ var httpAuthSchemeProvider = __webpack_require__(2041); var runtimeConfig = __webpack_require__(2696); var regionConfigResolver = __webpack_require__(6463); var protocolHttp = __webpack_require__(2356); +var schemas_0 = __webpack_require__(1382); +var errors = __webpack_require__(2378); +var SSOServiceException = __webpack_require__(7330); const resolveClientEndpointParameters = (options) => { return Object.assign(options, { @@ -232,14 +242,135 @@ class SSOClient extends smithyClient.Client { } } -let SSOServiceException$1 = class SSOServiceException extends smithyClient.ServiceException { +class GetRoleCredentialsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("SWBPortalService", "GetRoleCredentials", {}) + .n("SSOClient", "GetRoleCredentialsCommand") + .sc(schemas_0.GetRoleCredentials$) + .build() { +} + +class ListAccountRolesCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("SWBPortalService", "ListAccountRoles", {}) + .n("SSOClient", "ListAccountRolesCommand") + .sc(schemas_0.ListAccountRoles$) + .build() { +} + +class ListAccountsCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("SWBPortalService", "ListAccounts", {}) + .n("SSOClient", "ListAccountsCommand") + .sc(schemas_0.ListAccounts$) + .build() { +} + +class LogoutCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("SWBPortalService", "Logout", {}) + .n("SSOClient", "LogoutCommand") + .sc(schemas_0.Logout$) + .build() { +} + +const paginateListAccountRoles = core.createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); + +const paginateListAccounts = core.createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); + +const commands = { + GetRoleCredentialsCommand, + ListAccountRolesCommand, + ListAccountsCommand, + LogoutCommand, +}; +const paginators = { + paginateListAccountRoles, + paginateListAccounts, +}; +class SSO extends SSOClient { +} +smithyClient.createAggregatedClient(commands, SSO, { paginators }); + +Object.defineProperty(exports, "$Command", ({ + enumerable: true, + get: function () { return smithyClient.Command; } +})); +Object.defineProperty(exports, "__Client", ({ + enumerable: true, + get: function () { return smithyClient.Client; } +})); +Object.defineProperty(exports, "SSOServiceException", ({ + enumerable: true, + get: function () { return SSOServiceException.SSOServiceException; } +})); +exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; +exports.ListAccountRolesCommand = ListAccountRolesCommand; +exports.ListAccountsCommand = ListAccountsCommand; +exports.LogoutCommand = LogoutCommand; +exports.SSO = SSO; +exports.SSOClient = SSOClient; +exports.paginateListAccountRoles = paginateListAccountRoles; +exports.paginateListAccounts = paginateListAccounts; +Object.keys(schemas_0).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return schemas_0[k]; } + }); +}); +Object.keys(errors).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return errors[k]; } + }); +}); + + +/***/ }), + +/***/ 7330: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.SSOServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __webpack_require__(1411); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +class SSOServiceException extends smithy_client_1.ServiceException { constructor(options) { super(options); Object.setPrototypeOf(this, SSOServiceException.prototype); } -}; +} +exports.SSOServiceException = SSOServiceException; + + +/***/ }), + +/***/ 2378: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + -let InvalidRequestException$1 = class InvalidRequestException extends SSOServiceException$1 { +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.UnauthorizedException = exports.TooManyRequestsException = exports.ResourceNotFoundException = exports.InvalidRequestException = void 0; +const SSOServiceException_1 = __webpack_require__(7330); +class InvalidRequestException extends SSOServiceException_1.SSOServiceException { name = "InvalidRequestException"; $fault = "client"; constructor(opts) { @@ -250,8 +381,9 @@ let InvalidRequestException$1 = class InvalidRequestException extends SSOService }); Object.setPrototypeOf(this, InvalidRequestException.prototype); } -}; -let ResourceNotFoundException$1 = class ResourceNotFoundException extends SSOServiceException$1 { +} +exports.InvalidRequestException = InvalidRequestException; +class ResourceNotFoundException extends SSOServiceException_1.SSOServiceException { name = "ResourceNotFoundException"; $fault = "client"; constructor(opts) { @@ -262,8 +394,9 @@ let ResourceNotFoundException$1 = class ResourceNotFoundException extends SSOSer }); Object.setPrototypeOf(this, ResourceNotFoundException.prototype); } -}; -let TooManyRequestsException$1 = class TooManyRequestsException extends SSOServiceException$1 { +} +exports.ResourceNotFoundException = ResourceNotFoundException; +class TooManyRequestsException extends SSOServiceException_1.SSOServiceException { name = "TooManyRequestsException"; $fault = "client"; constructor(opts) { @@ -274,8 +407,9 @@ let TooManyRequestsException$1 = class TooManyRequestsException extends SSOServi }); Object.setPrototypeOf(this, TooManyRequestsException.prototype); } -}; -let UnauthorizedException$1 = class UnauthorizedException extends SSOServiceException$1 { +} +exports.TooManyRequestsException = TooManyRequestsException; +class UnauthorizedException extends SSOServiceException_1.SSOServiceException { name = "UnauthorizedException"; $fault = "client"; constructor(opts) { @@ -286,8 +420,132 @@ let UnauthorizedException$1 = class UnauthorizedException extends SSOServiceExce }); Object.setPrototypeOf(this, UnauthorizedException.prototype); } +} +exports.UnauthorizedException = UnauthorizedException; + + +/***/ }), + +/***/ 2696: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __webpack_require__(1860); +const package_json_1 = tslib_1.__importDefault(__webpack_require__(2807)); +const core_1 = __webpack_require__(8704); +const util_user_agent_node_1 = __webpack_require__(1656); +const config_resolver_1 = __webpack_require__(9316); +const hash_node_1 = __webpack_require__(2711); +const middleware_retry_1 = __webpack_require__(9618); +const node_config_provider_1 = __webpack_require__(5704); +const node_http_handler_1 = __webpack_require__(967); +const smithy_client_1 = __webpack_require__(1411); +const util_body_length_node_1 = __webpack_require__(3638); +const util_defaults_mode_node_1 = __webpack_require__(5435); +const util_retry_1 = __webpack_require__(5518); +const runtimeConfig_shared_1 = __webpack_require__(8073); +const getRuntimeConfig = (config) => { + (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger, + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }, config), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 8073: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __webpack_require__(8704); +const protocols_1 = __webpack_require__(7288); +const core_2 = __webpack_require__(402); +const smithy_client_1 = __webpack_require__(1411); +const url_parser_1 = __webpack_require__(4494); +const util_base64_1 = __webpack_require__(8385); +const util_utf8_1 = __webpack_require__(1577); +const httpAuthSchemeProvider_1 = __webpack_require__(2041); +const endpointResolver_1 = __webpack_require__(3903); +const schemas_0_1 = __webpack_require__(1382); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2019-06-10", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + { + schemeId: "smithy.api#noAuth", + identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), + signer: new core_2.NoAuthSigner(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + protocol: config?.protocol ?? protocols_1.AwsRestJsonProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.sso", + errorTypeRegistries: schemas_0_1.errorTypeRegistries, + version: "2019-06-10", + serviceTarget: "SWBPortalService", + }, + serviceId: config?.serviceId ?? "SSO", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; }; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 1382: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.Logout$ = exports.ListAccounts$ = exports.ListAccountRoles$ = exports.GetRoleCredentials$ = exports.RoleInfo$ = exports.RoleCredentials$ = exports.LogoutRequest$ = exports.ListAccountsResponse$ = exports.ListAccountsRequest$ = exports.ListAccountRolesResponse$ = exports.ListAccountRolesRequest$ = exports.GetRoleCredentialsResponse$ = exports.GetRoleCredentialsRequest$ = exports.AccountInfo$ = exports.errorTypeRegistries = exports.UnauthorizedException$ = exports.TooManyRequestsException$ = exports.ResourceNotFoundException$ = exports.InvalidRequestException$ = exports.SSOServiceException$ = void 0; const _AI = "AccountInfo"; const _ALT = "AccountListType"; const _ATT = "AccessTokenType"; @@ -339,411 +597,1281 @@ const _sAK = "secretAccessKey"; const _sT = "sessionToken"; const _xasbt = "x-amz-sso_bearer_token"; const n0 = "com.amazonaws.sso"; +const schema_1 = __webpack_require__(6890); +const errors_1 = __webpack_require__(2378); +const SSOServiceException_1 = __webpack_require__(7330); +const _s_registry = schema_1.TypeRegistry.for(_s); +exports.SSOServiceException$ = [-3, _s, "SSOServiceException", 0, [], []]; +_s_registry.registerError(exports.SSOServiceException$, SSOServiceException_1.SSOServiceException); +const n0_registry = schema_1.TypeRegistry.for(n0); +exports.InvalidRequestException$ = [-3, n0, _IRE, + { [_e]: _c, [_hE]: 400 }, + [_m], + [0] +]; +n0_registry.registerError(exports.InvalidRequestException$, errors_1.InvalidRequestException); +exports.ResourceNotFoundException$ = [-3, n0, _RNFE, + { [_e]: _c, [_hE]: 404 }, + [_m], + [0] +]; +n0_registry.registerError(exports.ResourceNotFoundException$, errors_1.ResourceNotFoundException); +exports.TooManyRequestsException$ = [-3, n0, _TMRE, + { [_e]: _c, [_hE]: 429 }, + [_m], + [0] +]; +n0_registry.registerError(exports.TooManyRequestsException$, errors_1.TooManyRequestsException); +exports.UnauthorizedException$ = [-3, n0, _UE, + { [_e]: _c, [_hE]: 401 }, + [_m], + [0] +]; +n0_registry.registerError(exports.UnauthorizedException$, errors_1.UnauthorizedException); +exports.errorTypeRegistries = [ + _s_registry, + n0_registry, +]; var AccessTokenType = [0, n0, _ATT, 8, 0]; var SecretAccessKeyType = [0, n0, _SAKT, 8, 0]; var SessionTokenType = [0, n0, _STT, 8, 0]; -var AccountInfo = [3, n0, _AI, 0, [_aI, _aN, _eA], [0, 0, 0]]; -var GetRoleCredentialsRequest = [ - 3, - n0, - _GRCR, +exports.AccountInfo$ = [3, n0, _AI, + 0, + [_aI, _aN, _eA], + [0, 0, 0] +]; +exports.GetRoleCredentialsRequest$ = [3, n0, _GRCR, 0, [_rN, _aI, _aT], - [ - [ - 0, - { - [_hQ]: _rn, - }, - ], - [ - 0, - { - [_hQ]: _ai, - }, - ], - [ - () => AccessTokenType, - { - [_hH]: _xasbt, - }, - ], - ], + [[0, { [_hQ]: _rn }], [0, { [_hQ]: _ai }], [() => AccessTokenType, { [_hH]: _xasbt }]], 3 ]; -var GetRoleCredentialsResponse = [3, n0, _GRCRe, 0, [_rC], [[() => RoleCredentials, 0]]]; -var InvalidRequestException = [ - -3, - n0, - _IRE, - { - [_e]: _c, - [_hE]: 400, - }, - [_m], - [0], +exports.GetRoleCredentialsResponse$ = [3, n0, _GRCRe, + 0, + [_rC], + [[() => exports.RoleCredentials$, 0]] ]; -schema.TypeRegistry.for(n0).registerError(InvalidRequestException, InvalidRequestException$1); -var ListAccountRolesRequest = [ - 3, - n0, - _LARR, +exports.ListAccountRolesRequest$ = [3, n0, _LARR, 0, - [_nT, _mR, _aT, _aI], - [ - [ - 0, - { - [_hQ]: _nt, - }, - ], - [ - 1, - { - [_hQ]: _mr, - }, - ], - [ - () => AccessTokenType, - { - [_hH]: _xasbt, - }, - ], - [ - 0, - { - [_hQ]: _ai, - }, - ], - ], + [_aT, _aI, _nT, _mR], + [[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _ai }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 2 ]; -var ListAccountRolesResponse = [3, n0, _LARRi, 0, [_nT, _rL], [0, () => RoleListType]]; -var ListAccountsRequest = [ - 3, - n0, - _LAR, +exports.ListAccountRolesResponse$ = [3, n0, _LARRi, 0, - [_nT, _mR, _aT], - [ - [ - 0, - { - [_hQ]: _nt, - }, - ], - [ - 1, - { - [_hQ]: _mr, - }, - ], - [ - () => AccessTokenType, - { - [_hH]: _xasbt, - }, - ], - ], + [_nT, _rL], + [0, () => RoleListType] ]; -var ListAccountsResponse = [3, n0, _LARi, 0, [_nT, _aL], [0, () => AccountListType]]; -var LogoutRequest = [ - 3, - n0, - _LR, +exports.ListAccountsRequest$ = [3, n0, _LAR, 0, - [_aT], - [ - [ - () => AccessTokenType, - { - [_hH]: _xasbt, - }, - ], - ], + [_aT, _nT, _mR], + [[() => AccessTokenType, { [_hH]: _xasbt }], [0, { [_hQ]: _nt }], [1, { [_hQ]: _mr }]], 1 ]; -var ResourceNotFoundException = [ - -3, - n0, - _RNFE, - { - [_e]: _c, - [_hE]: 404, - }, - [_m], - [0], +exports.ListAccountsResponse$ = [3, n0, _LARi, + 0, + [_nT, _aL], + [0, () => AccountListType] ]; -schema.TypeRegistry.for(n0).registerError(ResourceNotFoundException, ResourceNotFoundException$1); -var RoleCredentials = [ - 3, - n0, - _RC, +exports.LogoutRequest$ = [3, n0, _LR, 0, - [_aKI, _sAK, _sT, _ex], - [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1], + [_aT], + [[() => AccessTokenType, { [_hH]: _xasbt }]], 1 ]; -var RoleInfo = [3, n0, _RI, 0, [_rN, _aI], [0, 0]]; -var TooManyRequestsException = [ - -3, - n0, - _TMRE, - { - [_e]: _c, - [_hE]: 429, - }, - [_m], - [0], +exports.RoleCredentials$ = [3, n0, _RC, + 0, + [_aKI, _sAK, _sT, _ex], + [0, [() => SecretAccessKeyType, 0], [() => SessionTokenType, 0], 1] ]; -schema.TypeRegistry.for(n0).registerError(TooManyRequestsException, TooManyRequestsException$1); -var UnauthorizedException = [ - -3, - n0, - _UE, - { - [_e]: _c, - [_hE]: 401, - }, - [_m], - [0], +exports.RoleInfo$ = [3, n0, _RI, + 0, + [_rN, _aI], + [0, 0] ]; -schema.TypeRegistry.for(n0).registerError(UnauthorizedException, UnauthorizedException$1); var __Unit = "unit"; -var SSOServiceException = [-3, _s, "SSOServiceException", 0, [], []]; -schema.TypeRegistry.for(_s).registerError(SSOServiceException, SSOServiceException$1); -var AccountListType = [1, n0, _ALT, 0, () => AccountInfo]; -var RoleListType = [1, n0, _RLT, 0, () => RoleInfo]; -var GetRoleCredentials = [ - 9, - n0, - _GRC, - { - [_h]: ["GET", "/federation/credentials", 200], - }, - () => GetRoleCredentialsRequest, - () => GetRoleCredentialsResponse, +var AccountListType = [1, n0, _ALT, + 0, () => exports.AccountInfo$ ]; -var ListAccountRoles = [ - 9, - n0, - _LARis, - { - [_h]: ["GET", "/assignment/roles", 200], - }, - () => ListAccountRolesRequest, - () => ListAccountRolesResponse, +var RoleListType = [1, n0, _RLT, + 0, () => exports.RoleInfo$ ]; -var ListAccounts = [ - 9, - n0, - _LA, - { - [_h]: ["GET", "/assignment/accounts", 200], - }, - () => ListAccountsRequest, - () => ListAccountsResponse, +exports.GetRoleCredentials$ = [9, n0, _GRC, + { [_h]: ["GET", "/federation/credentials", 200] }, () => exports.GetRoleCredentialsRequest$, () => exports.GetRoleCredentialsResponse$ ]; -var Logout = [ - 9, - n0, - _L, - { - [_h]: ["POST", "/logout", 200], - }, - () => LogoutRequest, - () => __Unit, +exports.ListAccountRoles$ = [9, n0, _LARis, + { [_h]: ["GET", "/assignment/roles", 200] }, () => exports.ListAccountRolesRequest$, () => exports.ListAccountRolesResponse$ +]; +exports.ListAccounts$ = [9, n0, _LA, + { [_h]: ["GET", "/assignment/accounts", 200] }, () => exports.ListAccountsRequest$, () => exports.ListAccountsResponse$ +]; +exports.Logout$ = [9, n0, _L, + { [_h]: ["POST", "/logout", 200] }, () => exports.LogoutRequest$, () => __Unit ]; -class GetRoleCredentialsCommand extends smithyClient.Command - .classBuilder() - .ep(commonParams) - .m(function (Command, cs, config, o) { - return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; -}) - .s("SWBPortalService", "GetRoleCredentials", {}) - .n("SSOClient", "GetRoleCredentialsCommand") - .sc(GetRoleCredentials) - .build() { + +/***/ }), + +/***/ 3956: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var utilEndpoints = __webpack_require__(9674); +var urlParser = __webpack_require__(4494); + +const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!utilEndpoints.isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (utilEndpoints.isIpAddress(value)) { + return false; + } + return true; +}; + +const ARN_DELIMITER = ":"; +const RESOURCE_DELIMITER = "/"; +const parseArn = (value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition, + service, + region, + accountId, + resourceId, + }; +}; + +var partitions = [ + { + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, + { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, + { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, + { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, + { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, + { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, + { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, + { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + } +]; +var version = "1.1"; +var partitionsInfo = { + partitions: partitions, + version: version +}; + +let selectedPartitionsInfo = partitionsInfo; +let selectedUserAgentPrefix = ""; +const partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData, + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs, + }; +}; +const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +const useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); +}; +const getUserAgentPrefix = () => selectedUserAgentPrefix; + +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, + parseArn: parseArn, + partition: partition, +}; +utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions; + +const resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + return toEndpointV1(input.endpointProvider({ + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" + ? await input.useDualstackEndpoint() + : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: undefined, + }, { logger: input.logger })); + }; + } + return input; +}; +const toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url); + +Object.defineProperty(exports, "EndpointError", ({ + enumerable: true, + get: function () { return utilEndpoints.EndpointError; } +})); +Object.defineProperty(exports, "isIpAddress", ({ + enumerable: true, + get: function () { return utilEndpoints.isIpAddress; } +})); +Object.defineProperty(exports, "resolveEndpoint", ({ + enumerable: true, + get: function () { return utilEndpoints.resolveEndpoint; } +})); +exports.awsEndpointFunctions = awsEndpointFunctions; +exports.getUserAgentPrefix = getUserAgentPrefix; +exports.partition = partition; +exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; +exports.setPartitionInfo = setPartitionInfo; +exports.toEndpointV1 = toEndpointV1; +exports.useDefaultPartitionInfo = useDefaultPartitionInfo; + + +/***/ }), + +/***/ 967: +/***/ ((__unused_webpack_module, exports, __webpack_require__) => { + + + +var protocolHttp = __webpack_require__(2356); +var querystringBuilder = __webpack_require__(8256); +var http = __webpack_require__(8611); +var https = __webpack_require__(5692); +var stream = __webpack_require__(2203); +var http2 = __webpack_require__(5675); + +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; + +const timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId), +}; + +const DEFER_EVENT_LISTENER_TIME$2 = 1000; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError", + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } + else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); + } + else { + request.on("socket", doWithSocket); + } + }; + if (timeoutInMs < 2000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); +}; + +const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { + if (timeoutInMs) { + return timing.setTimeout(() => { + let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; + if (throwOnRequestTimeout) { + const error = Object.assign(new Error(msg), { + name: "TimeoutError", + code: "ETIMEDOUT", + }); + req.destroy(error); + reject(error); + } + else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger?.warn?.(msg); + } + }, timeoutInMs); + } + return -1; +}; + +const DEFER_EVENT_LISTENER_TIME$1 = 3000; +const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } + else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); +}; + +const DEFER_EVENT_LISTENER_TIME = 3000; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); + } + else { + request.setTimeout(timeout, onTimeout); + } + }; + if (0 < timeoutInMs && timeoutInMs < 6000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); +}; + +const MIN_WAIT_TIME = 6_000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }), + ]); + } + if (sendBody) { + writeBody(httpRequest, request.body); + } +} +function writeBody(httpRequest, body) { + if (body instanceof stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + const isBuffer = Buffer.isBuffer(body); + const isString = typeof body === "string"; + if (isBuffer || isString) { + if (isBuffer && body.byteLength === 0) { + httpRequest.end(); + } + else { + httpRequest.end(body); + } + return; + } + const uint8 = body; + if (typeof uint8 === "object" && + uint8.buffer && + typeof uint8.byteOffset === "number" && + typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); +} + +const DEFAULT_REQUEST_TIMEOUT = 0; +class NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15_000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgent: (() => { + if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger, + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + const config = this.config; + let writeRequestBodyPromise = undefined; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? https.Agent : http.Agent)({ + keepAlive: false, + maxSockets: Infinity, + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } + else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? https.request : http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } } -class ListAccountRolesCommand extends smithyClient.Command - .classBuilder() - .ep(commonParams) - .m(function (Command, cs, config, o) { - return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; -}) - .s("SWBPortalService", "ListAccountRoles", {}) - .n("SSOClient", "ListAccountRolesCommand") - .sc(ListAccountRoles) - .build() { +class NodeHttp2ConnectionPool { + sessions = []; + constructor(sessions) { + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } } -class ListAccountsCommand extends smithyClient.Command - .classBuilder() - .ep(commonParams) - .m(function (Command, cs, config, o) { - return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; -}) - .s("SWBPortalService", "ListAccounts", {}) - .n("SSOClient", "ListAccountsCommand") - .sc(ListAccounts) - .build() { +class NodeHttp2ConnectionManager { + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + config; + sessionCache = new Map(); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = http2.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); + } + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); + } } -class LogoutCommand extends smithyClient.Command - .classBuilder() - .ep(commonParams) - .m(function (Command, cs, config, o) { - return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; -}) - .s("SWBPortalService", "Logout", {}) - .n("SSOClient", "LogoutCommand") - .sc(Logout) - .build() { +class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); + } + else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [http2.constants.HTTP2_HEADER_PATH]: path, + [http2.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } } -const commands = { - GetRoleCredentialsCommand, - ListAccountRolesCommand, - ListAccountsCommand, - LogoutCommand, -}; -class SSO extends SSOClient { +class Collector extends stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } } -smithyClient.createAggregatedClient(commands, SSO); - -const paginateListAccountRoles = core.createPaginator(SSOClient, ListAccountRolesCommand, "nextToken", "nextToken", "maxResults"); -const paginateListAccounts = core.createPaginator(SSOClient, ListAccountsCommand, "nextToken", "nextToken", "maxResults"); - -Object.defineProperty(exports, "$Command", ({ - enumerable: true, - get: function () { return smithyClient.Command; } -})); -Object.defineProperty(exports, "__Client", ({ - enumerable: true, - get: function () { return smithyClient.Client; } -})); -exports.GetRoleCredentialsCommand = GetRoleCredentialsCommand; -exports.InvalidRequestException = InvalidRequestException$1; -exports.ListAccountRolesCommand = ListAccountRolesCommand; -exports.ListAccountsCommand = ListAccountsCommand; -exports.LogoutCommand = LogoutCommand; -exports.ResourceNotFoundException = ResourceNotFoundException$1; -exports.SSO = SSO; -exports.SSOClient = SSOClient; -exports.SSOServiceException = SSOServiceException$1; -exports.TooManyRequestsException = TooManyRequestsException$1; -exports.UnauthorizedException = UnauthorizedException$1; -exports.paginateListAccountRoles = paginateListAccountRoles; -exports.paginateListAccounts = paginateListAccounts; - - -/***/ }), - -/***/ 2696: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __webpack_require__(1860); -const package_json_1 = tslib_1.__importDefault(__webpack_require__(2807)); -const core_1 = __webpack_require__(8704); -const util_user_agent_node_1 = __webpack_require__(1656); -const config_resolver_1 = __webpack_require__(9316); -const hash_node_1 = __webpack_require__(2711); -const middleware_retry_1 = __webpack_require__(9618); -const node_config_provider_1 = __webpack_require__(5704); -const node_http_handler_1 = __webpack_require__(1279); -const util_body_length_node_1 = __webpack_require__(3638); -const util_retry_1 = __webpack_require__(5518); -const runtimeConfig_shared_1 = __webpack_require__(8073); -const smithy_client_1 = __webpack_require__(1411); -const util_defaults_mode_node_1 = __webpack_require__(5435); -const smithy_client_2 = __webpack_require__(1411); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const loaderConfig = { - profile: config?.profile, - logger: clientSharedValues.logger, - }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), - }; +const streamCollector = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); }; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 8073: -/***/ ((__unused_webpack_module, exports, __webpack_require__) => { - +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __webpack_require__(8704); -const protocols_1 = __webpack_require__(7288); -const core_2 = __webpack_require__(402); -const smithy_client_1 = __webpack_require__(1411); -const url_parser_1 = __webpack_require__(4494); -const util_base64_1 = __webpack_require__(8385); -const util_utf8_1 = __webpack_require__(1577); -const httpAuthSchemeProvider_1 = __webpack_require__(2041); -const endpointResolver_1 = __webpack_require__(3903); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2019-06-10", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSSOHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - { - schemeId: "smithy.api#noAuth", - identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})), - signer: new core_2.NoAuthSigner(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - protocol: config?.protocol ?? new protocols_1.AwsRestJsonProtocol({ defaultNamespace: "com.amazonaws.sso" }), - serviceId: config?.serviceId ?? "SSO", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; +exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; +exports.NodeHttp2Handler = NodeHttp2Handler; +exports.NodeHttpHandler = NodeHttpHandler; +exports.streamCollector = streamCollector; /***/ }), @@ -927,7 +2055,15 @@ const resolveAwsSdkSigV4Config = (config) => { }); const boundProvider = bindCallerConfig(config, memoizedProvider); if (isUserSupplied && !boundProvider.attributed) { - resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e")); + const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null; + resolvedCredentials = async (options) => { + const creds = await boundProvider(options); + const attributedCreds = creds; + if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) { + return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); + } + return attributedCreds; + }; resolvedCredentials.memoized = boundProvider.memoized; resolvedCredentials.configBound = boundProvider.configBound; resolvedCredentials.attributed = true; @@ -1073,7 +2209,7 @@ const isSsoProfile = (arg) => arg && typeof arg.sso_role_name === "string"); const SHOULD_FAIL_CREDENTIAL_CHAIN = false; -const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => { +const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ssoRegion, ssoRoleName, ssoClient, clientConfig, parentClientConfig, callerClientConfig, profile, filepath, configFilepath, ignoreCache, logger, }) => { let token; const refreshMessage = `To refresh this SSO session run aws sso login with the corresponding profile.`; if (ssoSession) { @@ -1117,9 +2253,9 @@ const resolveSSOCredentials = async ({ ssoStartUrl, ssoSession, ssoAccountId, ss const { SSOClient, GetRoleCredentialsCommand } = await Promise.resolve().then(function () { return __webpack_require__(6553); }); const sso = ssoClient || new SSOClient(Object.assign({}, clientConfig ?? {}, { - logger: clientConfig?.logger ?? parentClientConfig?.logger, + logger: clientConfig?.logger ?? callerClientConfig?.logger ?? parentClientConfig?.logger, region: clientConfig?.region ?? ssoRegion, - userAgentAppId: clientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId, + userAgentAppId: clientConfig?.userAgentAppId ?? callerClientConfig?.userAgentAppId ?? parentClientConfig?.userAgentAppId, })); let ssoResp; try { @@ -1215,6 +2351,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => { ssoClient: ssoClient, clientConfig: init.clientConfig, parentClientConfig: init.parentClientConfig, + callerClientConfig: init.callerClientConfig, profile: profileName, filepath: init.filepath, configFilepath: init.configFilepath, @@ -1236,6 +2373,7 @@ const fromSSO = (init = {}) => async ({ callerClientConfig } = {}) => { ssoClient, clientConfig: init.clientConfig, parentClientConfig: init.parentClientConfig, + callerClientConfig: init.callerClientConfig, profile: profileName, filepath: init.filepath, configFilepath: init.configFilepath, @@ -1301,9 +2439,9 @@ const fromEnvSigningName = ({ logger, signingName } = {}) => async () => { const EXPIRE_WINDOW_MS = 5 * 60 * 1000; const REFRESH_MESSAGE = `To refresh this SSO session run 'aws sso login' with the corresponding profile.`; -const getSsoOidcClient = async (ssoRegion, init = {}) => { - const { SSOOIDCClient } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19)); - const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop]; +const getSsoOidcClient = async (ssoRegion, init = {}, callerClientConfig) => { + const { SSOOIDCClient } = await Promise.all(/* import() */[__webpack_require__.e(346), __webpack_require__.e(443)]).then(__webpack_require__.t.bind(__webpack_require__, 9443, 23)); + const coalesce = (prop) => init.clientConfig?.[prop] ?? init.parentClientConfig?.[prop] ?? callerClientConfig?.[prop]; const ssoOidcClient = new SSOOIDCClient(Object.assign({}, init.clientConfig ?? {}, { region: ssoRegion ?? init.clientConfig?.region, logger: coalesce("logger"), @@ -1312,9 +2450,9 @@ const getSsoOidcClient = async (ssoRegion, init = {}) => { return ssoOidcClient; }; -const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}) => { - const { CreateTokenCommand } = await __webpack_require__.e(/* import() */ 443).then(__webpack_require__.t.bind(__webpack_require__, 9443, 19)); - const ssoOidcClient = await getSsoOidcClient(ssoRegion, init); +const getNewSsoOidcToken = async (ssoToken, ssoRegion, init = {}, callerClientConfig) => { + const { CreateTokenCommand } = await Promise.all(/* import() */[__webpack_require__.e(346), __webpack_require__.e(443)]).then(__webpack_require__.t.bind(__webpack_require__, 9443, 23)); + const ssoOidcClient = await getSsoOidcClient(ssoRegion, init, callerClientConfig); return ssoOidcClient.send(new CreateTokenCommand({ clientId: ssoToken.clientId, clientSecret: ssoToken.clientSecret, @@ -1343,14 +2481,7 @@ const writeSSOTokenToFile = (id, ssoToken) => { }; const lastRefreshAttemptTime = new Date(0); -const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => { - const init = { - ..._init, - parentClientConfig: { - ...callerClientConfig, - ..._init.parentClientConfig, - }, - }; +const fromSso = (init = {}) => async ({ callerClientConfig } = {}) => { init.logger?.debug("@aws-sdk/token-providers - fromSso"); const profiles = await sharedIniFileLoader.parseKnownFiles(init); const profileName = sharedIniFileLoader.getProfileName({ @@ -1399,7 +2530,7 @@ const fromSso = (_init = {}) => async ({ callerClientConfig } = {}) => { validateTokenKey("refreshToken", ssoToken.refreshToken, true); try { lastRefreshAttemptTime.setTime(Date.now()); - const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init); + const newSsoOidcToken = await getNewSsoOidcToken(ssoToken, ssoRegion, init, callerClientConfig); validateTokenKey("accessToken", newSsoOidcToken.accessToken); validateTokenKey("expiresIn", newSsoOidcToken.expiresIn); const newTokenExpiration = new Date(Date.now() + newSsoOidcToken.expiresIn * 1000); @@ -1447,7 +2578,7 @@ exports.nodeProvider = nodeProvider; /***/ 2807: /***/ ((module) => { -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.935.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.935.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.935.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.935.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","description":"AWS SDK for JavaScript Sso Client for Node.js, Browser and React Native","version":"3.993.0","scripts":{"build":"concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-sso","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo sso","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.11","@aws-sdk/middleware-host-header":"^3.972.3","@aws-sdk/middleware-logger":"^3.972.3","@aws-sdk/middleware-recursion-detection":"^3.972.3","@aws-sdk/middleware-user-agent":"^3.972.11","@aws-sdk/region-config-resolver":"^3.972.3","@aws-sdk/types":"^3.973.1","@aws-sdk/util-endpoints":"3.993.0","@aws-sdk/util-user-agent-browser":"^3.972.3","@aws-sdk/util-user-agent-node":"^3.972.9","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.23.2","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.16","@smithy/middleware-retry":"^4.4.33","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.10","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.11.5","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.32","@smithy/util-defaults-mode-node":"^4.2.35","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8","concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"engines":{"node":">=20.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-sso","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sso"}}'); /***/ }) diff --git a/dist/index.js b/dist/index.js index e69f67d..03176df 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3459,10 +3459,9 @@ const util_middleware_1 = __nccwpck_require__(6324); const defaultCloudFormationHttpAuthSchemeParametersProvider = async (config, context, input) => { return { operation: (0, util_middleware_1.getSmithyContext)(context).operation, - region: (await (0, util_middleware_1.normalizeProvider)(config.region)()) || - (() => { - throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); - })(), + region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => { + throw new Error("expected `region` to be configured for `aws.auth#sigv4`"); + })(), }; }; exports.defaultCloudFormationHttpAuthSchemeParametersProvider = defaultCloudFormationHttpAuthSchemeParametersProvider; @@ -3564,7 +3563,10 @@ var httpAuthSchemeProvider = __nccwpck_require__(398); var runtimeConfig = __nccwpck_require__(7079); var regionConfigResolver = __nccwpck_require__(6463); var protocolHttp = __nccwpck_require__(2356); +var schemas_0 = __nccwpck_require__(3389); var utilWaiter = __nccwpck_require__(5290); +var errors = __nccwpck_require__(4689); +var CloudFormationServiceException = __nccwpck_require__(22); const resolveClientEndpointParameters = (options) => { return Object.assign(options, { @@ -3660,3599 +3662,29 @@ class CloudFormationClient extends smithyClient.Client { } } -let CloudFormationServiceException$1 = class CloudFormationServiceException extends smithyClient.ServiceException { - constructor(options) { - super(options); - Object.setPrototypeOf(this, CloudFormationServiceException.prototype); - } -}; +class ActivateOrganizationsAccessCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("CloudFormation", "ActivateOrganizationsAccess", {}) + .n("CloudFormationClient", "ActivateOrganizationsAccessCommand") + .sc(schemas_0.ActivateOrganizationsAccess$) + .build() { +} -let InvalidOperationException$1 = class InvalidOperationException extends CloudFormationServiceException$1 { - name = "InvalidOperationException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "InvalidOperationException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidOperationException.prototype); - this.Message = opts.Message; - } -}; -let OperationNotFoundException$1 = class OperationNotFoundException extends CloudFormationServiceException$1 { - name = "OperationNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "OperationNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, OperationNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let CFNRegistryException$1 = class CFNRegistryException extends CloudFormationServiceException$1 { - name = "CFNRegistryException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "CFNRegistryException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, CFNRegistryException.prototype); - this.Message = opts.Message; - } -}; -let TypeNotFoundException$1 = class TypeNotFoundException extends CloudFormationServiceException$1 { - name = "TypeNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "TypeNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, TypeNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let AlreadyExistsException$1 = class AlreadyExistsException extends CloudFormationServiceException$1 { - name = "AlreadyExistsException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "AlreadyExistsException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, AlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -let TypeConfigurationNotFoundException$1 = class TypeConfigurationNotFoundException extends CloudFormationServiceException$1 { - name = "TypeConfigurationNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "TypeConfigurationNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, TypeConfigurationNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let TokenAlreadyExistsException$1 = class TokenAlreadyExistsException extends CloudFormationServiceException$1 { - name = "TokenAlreadyExistsException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "TokenAlreadyExistsException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, TokenAlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -let ChangeSetNotFoundException$1 = class ChangeSetNotFoundException extends CloudFormationServiceException$1 { - name = "ChangeSetNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "ChangeSetNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ChangeSetNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let InsufficientCapabilitiesException$1 = class InsufficientCapabilitiesException extends CloudFormationServiceException$1 { - name = "InsufficientCapabilitiesException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "InsufficientCapabilitiesException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InsufficientCapabilitiesException.prototype); - this.Message = opts.Message; - } -}; -let LimitExceededException$1 = class LimitExceededException extends CloudFormationServiceException$1 { - name = "LimitExceededException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "LimitExceededException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, LimitExceededException.prototype); - this.Message = opts.Message; - } -}; -let ConcurrentResourcesLimitExceededException$1 = class ConcurrentResourcesLimitExceededException extends CloudFormationServiceException$1 { - name = "ConcurrentResourcesLimitExceededException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "ConcurrentResourcesLimitExceededException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ConcurrentResourcesLimitExceededException.prototype); - this.Message = opts.Message; - } -}; -let OperationIdAlreadyExistsException$1 = class OperationIdAlreadyExistsException extends CloudFormationServiceException$1 { - name = "OperationIdAlreadyExistsException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "OperationIdAlreadyExistsException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, OperationIdAlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -let OperationInProgressException$1 = class OperationInProgressException extends CloudFormationServiceException$1 { - name = "OperationInProgressException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "OperationInProgressException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, OperationInProgressException.prototype); - this.Message = opts.Message; - } -}; -let StackSetNotFoundException$1 = class StackSetNotFoundException extends CloudFormationServiceException$1 { - name = "StackSetNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "StackSetNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, StackSetNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let StaleRequestException$1 = class StaleRequestException extends CloudFormationServiceException$1 { - name = "StaleRequestException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "StaleRequestException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, StaleRequestException.prototype); - this.Message = opts.Message; - } -}; -let CreatedButModifiedException$1 = class CreatedButModifiedException extends CloudFormationServiceException$1 { - name = "CreatedButModifiedException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "CreatedButModifiedException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, CreatedButModifiedException.prototype); - this.Message = opts.Message; - } -}; -let NameAlreadyExistsException$1 = class NameAlreadyExistsException extends CloudFormationServiceException$1 { - name = "NameAlreadyExistsException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "NameAlreadyExistsException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, NameAlreadyExistsException.prototype); - this.Message = opts.Message; - } -}; -let InvalidChangeSetStatusException$1 = class InvalidChangeSetStatusException extends CloudFormationServiceException$1 { - name = "InvalidChangeSetStatusException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "InvalidChangeSetStatusException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidChangeSetStatusException.prototype); - this.Message = opts.Message; - } -}; -let GeneratedTemplateNotFoundException$1 = class GeneratedTemplateNotFoundException extends CloudFormationServiceException$1 { - name = "GeneratedTemplateNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "GeneratedTemplateNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, GeneratedTemplateNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let StackSetNotEmptyException$1 = class StackSetNotEmptyException extends CloudFormationServiceException$1 { - name = "StackSetNotEmptyException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "StackSetNotEmptyException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, StackSetNotEmptyException.prototype); - this.Message = opts.Message; - } -}; -let ResourceScanNotFoundException$1 = class ResourceScanNotFoundException extends CloudFormationServiceException$1 { - name = "ResourceScanNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "ResourceScanNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceScanNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let StackInstanceNotFoundException$1 = class StackInstanceNotFoundException extends CloudFormationServiceException$1 { - name = "StackInstanceNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "StackInstanceNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, StackInstanceNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let StackRefactorNotFoundException$1 = class StackRefactorNotFoundException extends CloudFormationServiceException$1 { - name = "StackRefactorNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "StackRefactorNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, StackRefactorNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let HookResultNotFoundException$1 = class HookResultNotFoundException extends CloudFormationServiceException$1 { - name = "HookResultNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "HookResultNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, HookResultNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let StackNotFoundException$1 = class StackNotFoundException extends CloudFormationServiceException$1 { - name = "StackNotFoundException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "StackNotFoundException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, StackNotFoundException.prototype); - this.Message = opts.Message; - } -}; -let ResourceScanInProgressException$1 = class ResourceScanInProgressException extends CloudFormationServiceException$1 { - name = "ResourceScanInProgressException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "ResourceScanInProgressException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceScanInProgressException.prototype); - this.Message = opts.Message; - } -}; -let InvalidStateTransitionException$1 = class InvalidStateTransitionException extends CloudFormationServiceException$1 { - name = "InvalidStateTransitionException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "InvalidStateTransitionException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, InvalidStateTransitionException.prototype); - this.Message = opts.Message; - } -}; -let OperationStatusCheckFailedException$1 = class OperationStatusCheckFailedException extends CloudFormationServiceException$1 { - name = "OperationStatusCheckFailedException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "OperationStatusCheckFailedException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, OperationStatusCheckFailedException.prototype); - this.Message = opts.Message; - } -}; -let ResourceScanLimitExceededException$1 = class ResourceScanLimitExceededException extends CloudFormationServiceException$1 { - name = "ResourceScanLimitExceededException"; - $fault = "client"; - Message; - constructor(opts) { - super({ - name: "ResourceScanLimitExceededException", - $fault: "client", - ...opts, - }); - Object.setPrototypeOf(this, ResourceScanLimitExceededException.prototype); - this.Message = opts.Message; - } -}; - -const _A = "Arn"; -const _AC = "AfterContext"; -const _ACT = "AttributeChangeType"; -const _AD = "AutoDeployment"; -const _AEE = "AlreadyExistsException"; -const _AFT = "AccountFilterType"; -const _AGR = "AccountGateResult"; -const _AL = "AccountLimit"; -const _ALL = "AccountLimitList"; -const _ALc = "AccountLimits"; -const _ALn = "AnnotationList"; -const _AN = "AnnotationName"; -const _AOA = "ActivateOrganizationsAccess"; -const _AOAI = "ActivateOrganizationsAccessInput"; -const _AOAO = "ActivateOrganizationsAccessOutput"; -const _AP = "ActualProperties"; -const _AR = "AddResources"; -const _ARARN = "AdministrationRoleARN"; -const _AT = "ActivateType"; -const _ATAC = "AcceptTermsAndConditions"; -const _ATI = "ActivateTypeInput"; -const _ATO = "ActivateTypeOutput"; -const _AU = "AutoUpdate"; -const _AUc = "AccountsUrl"; -const _AV = "ActualValue"; -const _AVF = "AfterValueFrom"; -const _AVf = "AfterValue"; -const _AVl = "AllowedValues"; -const _Ac = "Accounts"; -const _Acc = "Account"; -const _Act = "Action"; -const _Acti = "Active"; -const _Al = "Alias"; -const _An = "Annotation"; -const _Ann = "Annotations"; -const _At = "Attribute"; -const _BC = "BeforeContext"; -const _BDTC = "BatchDescribeTypeConfigurations"; -const _BDTCE = "BatchDescribeTypeConfigurationsError"; -const _BDTCEa = "BatchDescribeTypeConfigurationsErrors"; -const _BDTCI = "BatchDescribeTypeConfigurationsInput"; -const _BDTCO = "BatchDescribeTypeConfigurationsOutput"; -const _BT = "BearerToken"; -const _BV = "BeforeValue"; -const _BVF = "BeforeValueFrom"; -const _C = "Change"; -const _CA = "CallAs"; -const _CAo = "ConnectionArn"; -const _CAon = "ConfigurationAlias"; -const _CAonf = "ConfigurationArn"; -const _CBME = "CreatedButModifiedException"; -const _CCS = "CreateChangeSet"; -const _CCSI = "CreateChangeSetInput"; -const _CCSO = "CreateChangeSetOutput"; -const _CE = "CausingEntity"; -const _CFNRE = "CFNRegistryException"; -const _CGT = "CreateGeneratedTemplate"; -const _CGTI = "CreateGeneratedTemplateInput"; -const _CGTO = "CreateGeneratedTemplateOutput"; -const _CM = "ConcurrencyMode"; -const _COS = "CurrentOperationStatus"; -const _CR = "CapabilitiesReason"; -const _CRLEE = "ConcurrentResourcesLimitExceededException"; -const _CRT = "ClientRequestToken"; -const _CS = "ConfigurationSchema"; -const _CSH = "ChangeSetHook"; -const _CSHRTD = "ChangeSetHookResourceTargetDetails"; -const _CSHTD = "ChangeSetHookTargetDetails"; -const _CSHh = "ChangeSetHooks"; -const _CSI = "ChangeSetId"; -const _CSII = "CreateStackInstancesInput"; -const _CSIO = "CreateStackInstancesOutput"; -const _CSIr = "CreateStackInput"; -const _CSIre = "CreateStackInstances"; -const _CSN = "ChangeSetName"; -const _CSNFE = "ChangeSetNotFoundException"; -const _CSO = "CreateStackOutput"; -const _CSR = "CreateStackRefactor"; -const _CSRI = "CreateStackRefactorInput"; -const _CSRO = "CreateStackRefactorOutput"; -const _CSS = "ChangeSetSummary"; -const _CSSI = "CreateStackSetInput"; -const _CSSO = "CreateStackSetOutput"; -const _CSSh = "ChangeSetSummaries"; -const _CSSr = "CreateStackSet"; -const _CST = "ChangeSetType"; -const _CSh = "ChangeSource"; -const _CSr = "CreateStack"; -const _CT = "CreationTime"; -const _CTl = "ClientToken"; -const _CTr = "CreationTimestamp"; -const _CUR = "ContinueUpdateRollback"; -const _CURI = "ContinueUpdateRollbackInput"; -const _CURO = "ContinueUpdateRollbackOutput"; -const _CUS = "CancelUpdateStack"; -const _CUSI = "CancelUpdateStackInput"; -const _Ca = "Capabilities"; -const _Cat = "Category"; -const _Ch = "Changes"; -const _Co = "Configuration"; -const _D = "Description"; -const _DAL = "DescribeAccountLimits"; -const _DALI = "DescribeAccountLimitsInput"; -const _DALO = "DescribeAccountLimitsOutput"; -const _DCS = "DeleteChangeSet"; -const _DCSH = "DescribeChangeSetHooks"; -const _DCSHI = "DescribeChangeSetHooksInput"; -const _DCSHO = "DescribeChangeSetHooksOutput"; -const _DCSI = "DeleteChangeSetInput"; -const _DCSIe = "DescribeChangeSetInput"; -const _DCSO = "DeleteChangeSetOutput"; -const _DCSOe = "DescribeChangeSetOutput"; -const _DCSe = "DescribeChangeSet"; -const _DDS = "DriftDetectionStatus"; -const _DDT = "DriftDetectionTimestamp"; -const _DE = "DescribeEvents"; -const _DEI = "DescribeEventsInput"; -const _DEO = "DescribeEventsOutput"; -const _DGT = "DeleteGeneratedTemplate"; -const _DGTI = "DeleteGeneratedTemplateInput"; -const _DGTIe = "DescribeGeneratedTemplateInput"; -const _DGTO = "DescribeGeneratedTemplateOutput"; -const _DGTe = "DescribeGeneratedTemplate"; -const _DI = "DriftInformation"; -const _DM = "DeploymentMode"; -const _DMe = "DeletionMode"; -const _DOA = "DeactivateOrganizationsAccess"; -const _DOAI = "DeactivateOrganizationsAccessInput"; -const _DOAIe = "DescribeOrganizationsAccessInput"; -const _DOAO = "DeactivateOrganizationsAccessOutput"; -const _DOAOe = "DescribeOrganizationsAccessOutput"; -const _DOAe = "DescribeOrganizationsAccess"; -const _DP = "DeletionPolicy"; -const _DPI = "DescribePublisherInput"; -const _DPO = "DescribePublisherOutput"; -const _DPe = "DescribePublisher"; -const _DR = "DisableRollback"; -const _DRS = "DescribeResourceScan"; -const _DRSI = "DescribeResourceScanInput"; -const _DRSO = "DescribeResourceScanOutput"; -const _DRe = "DetectionReason"; -const _DS = "DetectionStatus"; -const _DSD = "DetectStackDrift"; -const _DSDDS = "DescribeStackDriftDetectionStatus"; -const _DSDDSI = "DescribeStackDriftDetectionStatusInput"; -const _DSDDSO = "DescribeStackDriftDetectionStatusOutput"; -const _DSDI = "DetectStackDriftInput"; -const _DSDO = "DetectStackDriftOutput"; -const _DSE = "DescribeStackEvents"; -const _DSEI = "DescribeStackEventsInput"; -const _DSEO = "DescribeStackEventsOutput"; -const _DSI = "DeleteStackInput"; -const _DSIC = "DriftedStackInstancesCount"; -const _DSII = "DeleteStackInstancesInput"; -const _DSIIe = "DescribeStackInstanceInput"; -const _DSIO = "DeleteStackInstancesOutput"; -const _DSIOe = "DescribeStackInstanceOutput"; -const _DSIe = "DescribeStacksInput"; -const _DSIel = "DeleteStackInstances"; -const _DSIes = "DescribeStackInstance"; -const _DSO = "DescribeStacksOutput"; -const _DSR = "DetectionStatusReason"; -const _DSRC = "DriftedStackResourceCount"; -const _DSRD = "DescribeStackResourceDrifts"; -const _DSRDI = "DescribeStackResourceDriftsInput"; -const _DSRDIe = "DetectStackResourceDriftInput"; -const _DSRDO = "DescribeStackResourceDriftsOutput"; -const _DSRDOe = "DetectStackResourceDriftOutput"; -const _DSRDe = "DetectStackResourceDrift"; -const _DSRI = "DescribeStackRefactorInput"; -const _DSRIe = "DescribeStackResourceInput"; -const _DSRIes = "DescribeStackResourcesInput"; -const _DSRO = "DescribeStackRefactorOutput"; -const _DSROe = "DescribeStackResourceOutput"; -const _DSROes = "DescribeStackResourcesOutput"; -const _DSRe = "DescribeStackRefactor"; -const _DSRes = "DescribeStackResource"; -const _DSResc = "DescribeStackResources"; -const _DSRr = "DriftStatusReason"; -const _DSS = "DeleteStackSet"; -const _DSSD = "DetectStackSetDrift"; -const _DSSDI = "DetectStackSetDriftInput"; -const _DSSDO = "DetectStackSetDriftOutput"; -const _DSSI = "DeleteStackSetInput"; -const _DSSIe = "DescribeStackSetInput"; -const _DSSO = "DeleteStackSetOutput"; -const _DSSOI = "DescribeStackSetOperationInput"; -const _DSSOO = "DescribeStackSetOperationOutput"; -const _DSSOe = "DescribeStackSetOutput"; -const _DSSOes = "DescribeStackSetOperation"; -const _DSSe = "DescribeStackSet"; -const _DSe = "DeprecatedStatus"; -const _DSel = "DeleteStack"; -const _DSes = "DescribeStacks"; -const _DSet = "DetailedStatus"; -const _DSr = "DriftStatus"; -const _DT = "DeploymentTargets"; -const _DTI = "DeactivateTypeInput"; -const _DTIe = "DeregisterTypeInput"; -const _DTIes = "DescribeTypeInput"; -const _DTO = "DeactivateTypeOutput"; -const _DTOe = "DeregisterTypeOutput"; -const _DTOes = "DescribeTypeOutput"; -const _DTR = "DescribeTypeRegistration"; -const _DTRI = "DescribeTypeRegistrationInput"; -const _DTRO = "DescribeTypeRegistrationOutput"; -const _DTe = "DeclaredTransforms"; -const _DTea = "DeactivateType"; -const _DTel = "DeletionTime"; -const _DTer = "DeregisterType"; -const _DTes = "DescribeType"; -const _DTi = "DifferenceType"; -const _DU = "DocumentationUrl"; -const _DV = "DefaultValue"; -const _DVI = "DefaultVersionId"; -const _De = "Details"; -const _Des = "Destination"; -const _Det = "Detection"; -const _Dr = "Drift"; -const _E = "Enabled"; -const _EC = "ErrorCode"; -const _ECS = "ExecuteChangeSet"; -const _ECSI = "ExecuteChangeSetInput"; -const _ECSO = "ExecuteChangeSetOutput"; -const _EF = "EventFilter"; -const _EI = "EventId"; -const _EM = "ErrorMessage"; -const _EN = "ExportName"; -const _EP = "ExpectedProperties"; -const _ERA = "ExecutionRoleArn"; -const _ERN = "ExecutionRoleName"; -const _ES = "ExecutionStatus"; -const _ESC = "EnableStackCreation"; -const _ESF = "ExecutionStatusFilter"; -const _ESI = "ExportingStackId"; -const _ESR = "ExecutionStatusReason"; -const _ESRI = "ExecuteStackRefactorInput"; -const _ESRx = "ExecuteStackRefactor"; -const _ET = "EndTime"; -const _ETC = "EstimateTemplateCost"; -const _ETCI = "EstimateTemplateCostInput"; -const _ETCO = "EstimateTemplateCostOutput"; -const _ETP = "EnableTerminationProtection"; -const _ETn = "EndTimestamp"; -const _ETv = "EventType"; -const _EV = "ExpectedValue"; -const _En = "Entity"; -const _Er = "Errors"; -const _Ev = "Evaluation"; -const _Ex = "Export"; -const _Exp = "Exports"; -const _F = "Filters"; -const _FE = "FailedEvents"; -const _FM = "FailureMode"; -const _FSIC = "FailedStackInstancesCount"; -const _FTC = "FailureToleranceCount"; -const _FTP = "FailureTolerancePercentage"; -const _Fo = "Format"; -const _GGT = "GetGeneratedTemplate"; -const _GGTI = "GetGeneratedTemplateInput"; -const _GGTO = "GetGeneratedTemplateOutput"; -const _GHR = "GetHookResult"; -const _GHRI = "GetHookResultInput"; -const _GHRO = "GetHookResultOutput"; -const _GSP = "GetStackPolicy"; -const _GSPI = "GetStackPolicyInput"; -const _GSPO = "GetStackPolicyOutput"; -const _GT = "GetTemplate"; -const _GTI = "GeneratedTemplateId"; -const _GTIe = "GetTemplateInput"; -const _GTN = "GeneratedTemplateName"; -const _GTNFE = "GeneratedTemplateNotFoundException"; -const _GTO = "GetTemplateOutput"; -const _GTS = "GetTemplateSummary"; -const _GTSI = "GetTemplateSummaryInput"; -const _GTSO = "GetTemplateSummaryOutput"; -const _H = "Hooks"; -const _HET = "HookExecutionTarget"; -const _HFM = "HookFailureMode"; -const _HIC = "HookInvocationCount"; -const _HII = "HookInvocationId"; -const _HIP = "HookInvocationPoint"; -const _HR = "HookResults"; -const _HRI = "HookResultId"; -const _HRNFE = "HookResultNotFoundException"; -const _HRS = "HookResultSummary"; -const _HRSo = "HookResultSummaries"; -const _HS = "HookStatus"; -const _HSR = "HookStatusReason"; -const _HT = "HookTarget"; -const _HTo = "HookType"; -const _I = "Id"; -const _IA = "IsActivated"; -const _IAn = "InvokedAt"; -const _ICE = "InsufficientCapabilitiesException"; -const _ICSSE = "InvalidChangeSetStatusException"; -const _IDC = "IsDefaultConfiguration"; -const _IDV = "IsDefaultVersion"; -const _IER = "ImportExistingResources"; -const _INS = "IncludeNestedStacks"; -const _IOE = "InvalidOperationException"; -const _IP = "InvocationPoint"; -const _IPSIC = "InProgressStackInstancesCount"; -const _IPV = "IncludePropertyValues"; -const _IPd = "IdentityProvider"; -const _ISSIC = "InSyncStackInstancesCount"; -const _ISTE = "InvalidStateTransitionException"; -const _ISTSS = "ImportStacksToStackSet"; -const _ISTSSI = "ImportStacksToStackSetInput"; -const _ISTSSO = "ImportStacksToStackSetOutput"; -const _Im = "Imports"; -const _K = "Key"; -const _LC = "LoggingConfig"; -const _LCS = "ListChangeSets"; -const _LCSI = "ListChangeSetsInput"; -const _LCSO = "ListChangeSetsOutput"; -const _LCT = "LastCheckTimestamp"; -const _LDB = "LogDeliveryBucket"; -const _LDCT = "LastDriftCheckTimestamp"; -const _LE = "ListExports"; -const _LEE = "LimitExceededException"; -const _LEI = "ListExportsInput"; -const _LEO = "ListExportsOutput"; -const _LGN = "LogGroupName"; -const _LGT = "ListGeneratedTemplates"; -const _LGTI = "ListGeneratedTemplatesInput"; -const _LGTO = "ListGeneratedTemplatesOutput"; -const _LHR = "ListHookResults"; -const _LHRI = "ListHookResultsInput"; -const _LHRO = "ListHookResultsOutput"; -const _LI = "ListImports"; -const _LIH = "LogicalIdHierarchy"; -const _LII = "ListImportsInput"; -const _LIO = "ListImportsOutput"; -const _LO = "LastOperations"; -const _LOI = "LastOperationId"; -const _LPV = "LatestPublicVersion"; -const _LRA = "LogRoleArn"; -const _LRD = "LiveResourceDrift"; -const _LRI = "LogicalResourceId"; -const _LRIo = "LogicalResourceIds"; -const _LRS = "ListResourceScans"; -const _LRSI = "ListResourceScansInput"; -const _LRSO = "ListResourceScansOutput"; -const _LRSR = "ListResourceScanResources"; -const _LRSRI = "ListResourceScanResourcesInput"; -const _LRSRO = "ListResourceScanResourcesOutput"; -const _LRSRR = "ListResourceScanRelatedResources"; -const _LRSRRI = "ListResourceScanRelatedResourcesInput"; -const _LRSRRO = "ListResourceScanRelatedResourcesOutput"; -const _LS = "ListStacks"; -const _LSI = "ListStacksInput"; -const _LSII = "ListStackInstancesInput"; -const _LSIO = "ListStackInstancesOutput"; -const _LSIRD = "ListStackInstanceResourceDrifts"; -const _LSIRDI = "ListStackInstanceResourceDriftsInput"; -const _LSIRDO = "ListStackInstanceResourceDriftsOutput"; -const _LSIi = "ListStackInstances"; -const _LSO = "ListStacksOutput"; -const _LSR = "ListStackRefactors"; -const _LSRA = "ListStackRefactorActions"; -const _LSRAI = "ListStackRefactorActionsInput"; -const _LSRAO = "ListStackRefactorActionsOutput"; -const _LSRI = "ListStackRefactorsInput"; -const _LSRIi = "ListStackResourcesInput"; -const _LSRO = "ListStackRefactorsOutput"; -const _LSROi = "ListStackResourcesOutput"; -const _LSRi = "ListStackResources"; -const _LSS = "ListStackSets"; -const _LSSADT = "ListStackSetAutoDeploymentTargets"; -const _LSSADTI = "ListStackSetAutoDeploymentTargetsInput"; -const _LSSADTO = "ListStackSetAutoDeploymentTargetsOutput"; -const _LSSI = "ListStackSetsInput"; -const _LSSO = "ListStackSetsOutput"; -const _LSSOI = "ListStackSetOperationsInput"; -const _LSSOO = "ListStackSetOperationsOutput"; -const _LSSOR = "ListStackSetOperationResults"; -const _LSSORI = "ListStackSetOperationResultsInput"; -const _LSSORO = "ListStackSetOperationResultsOutput"; -const _LSSOi = "ListStackSetOperations"; -const _LT = "ListTypes"; -const _LTI = "ListTypesInput"; -const _LTO = "ListTypesOutput"; -const _LTR = "ListTypeRegistrations"; -const _LTRI = "ListTypeRegistrationsInput"; -const _LTRO = "ListTypeRegistrationsOutput"; -const _LTV = "ListTypeVersions"; -const _LTVI = "ListTypeVersionsInput"; -const _LTVO = "ListTypeVersionsOutput"; -const _LU = "LastUpdated"; -const _LUT = "LastUpdatedTime"; -const _LUTa = "LastUpdatedTimestamp"; -const _M = "Message"; -const _MBS = "ManagedByStack"; -const _MCC = "MaxConcurrentCount"; -const _MCP = "MaxConcurrentPercentage"; -const _ME = "ManagedExecution"; -const _MI = "ModuleInfo"; -const _MR = "MaxResults"; -const _MTIM = "MonitoringTimeInMinutes"; -const _MV = "MajorVersion"; -const _Me = "Metadata"; -const _N = "Name"; -const _NAEE = "NameAlreadyExistsException"; -const _NARN = "NotificationARNs"; -const _NE = "NoEcho"; -const _NGTN = "NewGeneratedTemplateName"; -const _NOR = "NumberOfResources"; -const _NT = "NextToken"; -const _O = "Output"; -const _OE = "OperationEvents"; -const _OEp = "OperationEntry"; -const _OEpe = "OperationEvent"; -const _OF = "OnFailure"; -const _OI = "OperationId"; -const _OIAEE = "OperationIdAlreadyExistsException"; -const _OIPE = "OperationInProgressException"; -const _OK = "OutputKey"; -const _ONFE = "OperationNotFoundException"; -const _OP = "OperationPreferences"; -const _ORF = "OperationResultFilter"; -const _ORFp = "OperationResultFilters"; -const _OS = "OperationStatus"; -const _OSCFE = "OperationStatusCheckFailedException"; -const _OSF = "OnStackFailure"; -const _OT = "OperationType"; -const _OTA = "OriginalTypeArn"; -const _OTN = "OriginalTypeName"; -const _OUI = "OrganizationalUnitIds"; -const _OUIr = "OrganizationalUnitId"; -const _OV = "OutputValue"; -const _Ou = "Outputs"; -const _P = "Parameters"; -const _PA = "PolicyAction"; -const _PC = "PercentageCompleted"; -const _PCSI = "ParentChangeSetId"; -const _PCa = "ParameterConstraints"; -const _PD = "ParameterDeclaration"; -const _PDC = "PreviousDeploymentContext"; -const _PDa = "ParameterDeclarations"; -const _PDr = "PropertyDifference"; -const _PDro = "PropertyDifferences"; -const _PI = "PublisherId"; -const _PIa = "ParentId"; -const _PIu = "PublisherIdentity"; -const _PK = "ParameterKey"; -const _PM = "PermissionModel"; -const _PN = "PublisherName"; -const _PO = "ParameterOverrides"; -const _PP = "PublisherProfile"; -const _PPr = "PropertyPath"; -const _PRI = "PhysicalResourceId"; -const _PRIC = "PhysicalResourceIdContext"; -const _PRICKVP = "PhysicalResourceIdContextKeyValuePair"; -const _PS = "PublisherStatus"; -const _PSr = "ProgressStatus"; -const _PT = "ProvisioningType"; -const _PTA = "PublicTypeArn"; -const _PTI = "PublishTypeInput"; -const _PTO = "PublishTypeOutput"; -const _PTa = "ParameterType"; -const _PTu = "PublishType"; -const _PV = "PreviousValue"; -const _PVN = "PublicVersionNumber"; -const _PVa = "ParameterValue"; -const _Pa = "Parameter"; -const _Pat = "Path"; -const _Pr = "Progress"; -const _Pro = "Properties"; -const _R = "Resources"; -const _RA = "ResourceAction"; -const _RAR = "RefreshAllResources"; -const _RARN = "RoleARN"; -const _RAT = "RequiredActivatedTypes"; -const _RATe = "RequiredActivatedType"; -const _RC = "ResourceChange"; -const _RCD = "ResourceChangeDetail"; -const _RCDe = "ResourceChangeDetails"; -const _RCSI = "RootChangeSetId"; -const _RCT = "RegionConcurrencyType"; -const _RCo = "RollbackConfiguration"; -const _RD = "ResourceDefinition"; -const _RDIA = "ResourceDriftIgnoredAttributes"; -const _RDIAe = "ResourceDriftIgnoredAttribute"; -const _RDS = "ResourceDriftStatus"; -const _RDe = "ResourceDetail"; -const _RDes = "ResourceDefinitions"; -const _RDeso = "ResourceDetails"; -const _REOC = "RetainExceptOnCreate"; -const _RF = "ResourcesFailed"; -const _RHP = "RecordHandlerProgress"; -const _RHPI = "RecordHandlerProgressInput"; -const _RHPO = "RecordHandlerProgressOutput"; -const _RI = "ResourceIdentifier"; -const _RIS = "ResourceIdentifierSummaries"; -const _RISe = "ResourceIdentifierSummary"; -const _RIe = "ResourceIdentifiers"; -const _RIo = "RootId"; -const _RL = "RemediationLink"; -const _RLe = "ResourceLocation"; -const _RM = "RemediationMessage"; -const _RMe = "ResourceMappings"; -const _RMes = "ResourceModel"; -const _RMeso = "ResourceMapping"; -const _RO = "RegionOrder"; -const _RP = "ResourceProperties"; -const _RPI = "RegisterPublisherInput"; -const _RPO = "RegisterPublisherOutput"; -const _RPe = "ResourcesProcessing"; -const _RPeg = "RegisterPublisher"; -const _RPes = "ResourcesPending"; -const _RR = "RetainResources"; -const _RRe = "ResourcesRead"; -const _RRel = "RelatedResources"; -const _RRem = "RemoveResources"; -const _RReq = "RequiresRecreation"; -const _RS = "RetainStacks"; -const _RSF = "RegistrationStatusFilter"; -const _RSI = "ResourceScanId"; -const _RSIPE = "ResourceScanInProgressException"; -const _RSIo = "RollbackStackInput"; -const _RSLEE = "ResourceScanLimitExceededException"; -const _RSNFE = "ResourceScanNotFoundException"; -const _RSO = "RollbackStackOutput"; -const _RSOAR = "RetainStacksOnAccountRemoval"; -const _RSR = "ResourceStatusReason"; -const _RSS = "ResourceScanSummaries"; -const _RSSe = "ResourceScanSummary"; -const _RSe = "ResourcesScanned"; -const _RSes = "ResourceStatus"; -const _RSeso = "ResourcesSucceeded"; -const _RSo = "RollbackStack"; -const _RT = "ResourceType"; -const _RTD = "ResourceTargetDetails"; -const _RTDe = "ResourceTargetDefinition"; -const _RTI = "ResourcesToImport"; -const _RTIe = "RegisterTypeInput"; -const _RTIes = "ResourceToImport"; -const _RTL = "RegistrationTokenList"; -const _RTO = "RegisterTypeOutput"; -const _RTP = "ResourceTypePrefix"; -const _RTS = "ResourcesToSkip"; -const _RTe = "ResourceTypes"; -const _RTeg = "RegistrationToken"; -const _RTegi = "RegisterType"; -const _RTo = "RollbackTriggers"; -const _RTol = "RollbackTrigger"; -const _RV = "ResolvedValue"; -const _Re = "Regions"; -const _Rea = "Reason"; -const _Reg = "Region"; -const _Rep = "Replacement"; -const _Req = "Required"; -const _S = "Status"; -const _SA = "StagesAvailable"; -const _SD = "StackDefinitions"; -const _SDDI = "StackDriftDetectionId"; -const _SDI = "StackDriftInformation"; -const _SDIS = "StackDriftInformationSummary"; -const _SDS = "StackDriftStatus"; -const _SDt = "StackDefinition"; -const _SDta = "StatusDetails"; -const _SE = "StackEvents"; -const _SEt = "StackEvent"; -const _SF = "ScanFilters"; -const _SFc = "ScanFilter"; -const _SHP = "SchemaHandlerPackage"; -const _SI = "StackId"; -const _SIA = "StackInstanceAccount"; -const _SICS = "StackInstanceComprehensiveStatus"; -const _SIF = "StackInstanceFilter"; -const _SIFt = "StackInstanceFilters"; -const _SINFE = "StackInstanceNotFoundException"; -const _SIR = "StackInstanceRegion"; -const _SIRDS = "StackInstanceResourceDriftStatuses"; -const _SIRDSt = "StackInstanceResourceDriftsSummary"; -const _SIRDSta = "StackInstanceResourceDriftsSummaries"; -const _SIS = "StackInstanceStatus"; -const _SISt = "StackInstanceSummary"; -const _SISta = "StackInstanceSummaries"; -const _SIU = "StackIdsUrl"; -const _SIt = "StackInstance"; -const _SIta = "StackIds"; -const _SL = "SeverityLevel"; -const _SM = "StatusMessage"; -const _SMV = "SupportedMajorVersions"; -const _SN = "StackName"; -const _SNFE = "StackNotFoundException"; -const _SPB = "StackPolicyBody"; -const _SPDUB = "StackPolicyDuringUpdateBody"; -const _SPDUURL = "StackPolicyDuringUpdateURL"; -const _SPURL = "StackPolicyURL"; -const _SR = "StatusReason"; -const _SRA = "StackRefactorActions"; -const _SRAt = "StackRefactorAction"; -const _SRD = "StackResourceDrifts"; -const _SRDI = "StackResourceDriftInformation"; -const _SRDIS = "StackResourceDriftInformationSummary"; -const _SRDS = "StackResourceDriftStatus"; -const _SRDSF = "StackResourceDriftStatusFilters"; -const _SRDt = "StackResourceDetail"; -const _SRDta = "StackResourceDrift"; -const _SRE = "StaleRequestException"; -const _SRI = "StackRefactorId"; -const _SRIc = "ScannedResourceIdentifier"; -const _SRIca = "ScannedResourceIdentifiers"; -const _SRIi = "SignalResourceInput"; -const _SRNFE = "StackRefactorNotFoundException"; -const _SRS = "StackRefactorSummaries"; -const _SRSI = "StartResourceScanInput"; -const _SRSO = "StartResourceScanOutput"; -const _SRSt = "StackResourceSummaries"; -const _SRSta = "StackRefactorSummary"; -const _SRStac = "StackResourceSummary"; -const _SRStar = "StartResourceScan"; -const _SRTR = "StackRefactorTagResources"; -const _SRc = "ScannedResource"; -const _SRca = "ScannedResources"; -const _SRi = "SignalResource"; -const _SRt = "StackResources"; -const _SRta = "StackResource"; -const _SS = "StackSet"; -const _SSADTS = "StackSetAutoDeploymentTargetSummary"; -const _SSADTSt = "StackSetAutoDeploymentTargetSummaries"; -const _SSARN = "StackSetARN"; -const _SSDDD = "StackSetDriftDetectionDetails"; -const _SSF = "StackStatusFilter"; -const _SSI = "StackSetId"; -const _SSN = "StackSetName"; -const _SSNEE = "StackSetNotEmptyException"; -const _SSNFE = "StackSetNotFoundException"; -const _SSO = "StackSetOperation"; -const _SSOP = "StackSetOperationPreferences"; -const _SSORS = "StackSetOperationResultSummary"; -const _SSORSt = "StackSetOperationResultSummaries"; -const _SSOS = "StackSetOperationSummary"; -const _SSOSD = "StackSetOperationStatusDetails"; -const _SSOSt = "StackSetOperationSummaries"; -const _SSP = "SetStackPolicy"; -const _SSPI = "SetStackPolicyInput"; -const _SSR = "StackStatusReason"; -const _SSS = "StackSetSummary"; -const _SSSO = "StopStackSetOperation"; -const _SSSOI = "StopStackSetOperationInput"; -const _SSSOO = "StopStackSetOperationOutput"; -const _SSSt = "StackSetSummaries"; -const _SSt = "StackSummaries"; -const _SSta = "StackStatus"; -const _SStac = "StackSummary"; -const _ST = "StartTime"; -const _STC = "SetTypeConfiguration"; -const _STCI = "SetTypeConfigurationInput"; -const _STCO = "SetTypeConfigurationOutput"; -const _STDV = "SetTypeDefaultVersion"; -const _STDVI = "SetTypeDefaultVersionInput"; -const _STDVO = "SetTypeDefaultVersionOutput"; -const _STF = "ScanTypeFilter"; -const _STc = "ScanType"; -const _SU = "SourceUrl"; -const _Sc = "Schema"; -const _Sco = "Scope"; -const _So = "Source"; -const _St = "Stacks"; -const _Sta = "Stack"; -const _Su = "Summaries"; -const _T = "Type"; -const _TA = "TypeArn"; -const _TAEE = "TokenAlreadyExistsException"; -const _TB = "TemplateBody"; -const _TC = "TypeConfigurations"; -const _TCA = "TypeConfigurationAlias"; -const _TCAy = "TypeConfigurationArn"; -const _TCD = "TypeConfigurationDetails"; -const _TCDL = "TypeConfigurationDetailsList"; -const _TCI = "TypeConfigurationIdentifier"; -const _TCIy = "TypeConfigurationIdentifiers"; -const _TCNFE = "TypeConfigurationNotFoundException"; -const _TCVI = "TypeConfigurationVersionId"; -const _TCe = "TemplateConfiguration"; -const _TCi = "TimeCreated"; -const _TD = "TargetDetails"; -const _TDe = "TemplateDescription"; -const _TF = "TypeFilters"; -const _TH = "TypeHierarchy"; -const _TI = "TargetId"; -const _TIM = "TimeoutInMinutes"; -const _TK = "TagKey"; -const _TN = "TypeName"; -const _TNA = "TypeNameAlias"; -const _TNFE = "TypeNotFoundException"; -const _TNP = "TypeNamePrefix"; -const _TP = "TemplateParameter"; -const _TPe = "TemplateProgress"; -const _TPem = "TemplateParameters"; -const _TR = "TagResources"; -const _TS = "TemplateStage"; -const _TSC = "TemplateSummaryConfig"; -const _TSIC = "TotalStackInstancesCount"; -const _TSe = "TemplateSummary"; -const _TSem = "TemplateSummaries"; -const _TSy = "TypeSummaries"; -const _TSyp = "TypeSummary"; -const _TT = "TargetType"; -const _TTI = "TestTypeInput"; -const _TTN = "TargetTypeName"; -const _TTO = "TestTypeOutput"; -const _TTS = "TypeTestsStatus"; -const _TTSD = "TypeTestsStatusDescription"; -const _TTe = "TestType"; -const _TURL = "TemplateURL"; -const _TURTAW = "TreatUnrecognizedResourceTypesAsWarnings"; -const _TV = "TagValue"; -const _TVA = "TypeVersionArn"; -const _TVI = "TypeVersionId"; -const _TVS = "TypeVersionSummaries"; -const _TVSy = "TypeVersionSummary"; -const _TW = "TotalWarnings"; -const _Ta = "Tags"; -const _Tag = "Tag"; -const _Tar = "Target"; -const _Ti = "Timestamp"; -const _Ty = "Types"; -const _U = "Url"; -const _UGT = "UpdateGeneratedTemplate"; -const _UGTI = "UpdateGeneratedTemplateInput"; -const _UGTO = "UpdateGeneratedTemplateOutput"; -const _UI = "UniqueId"; -const _UPT = "UsePreviousTemplate"; -const _UPV = "UsePreviousValue"; -const _UR = "UntagResources"; -const _URP = "UpdateReplacePolicy"; -const _URT = "UnrecognizedResourceTypes"; -const _US = "UpdateStack"; -const _USI = "UpdateStackInput"; -const _USII = "UpdateStackInstancesInput"; -const _USIO = "UpdateStackInstancesOutput"; -const _USIp = "UpdateStackInstances"; -const _USO = "UpdateStackOutput"; -const _USS = "UpdateStackSet"; -const _USSI = "UpdateStackSetInput"; -const _USSO = "UpdateStackSetOutput"; -const _UTC = "UnprocessedTypeConfigurations"; -const _UTP = "UpdateTerminationProtection"; -const _UTPI = "UpdateTerminationProtectionInput"; -const _UTPO = "UpdateTerminationProtectionOutput"; -const _V = "Value"; -const _VB = "VersionBump"; -const _VFM = "ValidationFailureMode"; -const _VI = "VersionId"; -const _VN = "ValidationName"; -const _VP = "ValidationPath"; -const _VS = "ValidationStatus"; -const _VSR = "ValidationStatusReason"; -const _VT = "ValidateTemplate"; -const _VTI = "ValidateTemplateInput"; -const _VTO = "ValidateTemplateOutput"; -const _Va = "Values"; -const _Ve = "Version"; -const _Vi = "Visibility"; -const _W = "Warnings"; -const _WD = "WarningDetail"; -const _WDa = "WarningDetails"; -const _WP = "WarningProperty"; -const _WPa = "WarningProperties"; -const _aQE = "awsQueryError"; -const _c = "client"; -const _e = "error"; -const _hE = "httpError"; -const _s = "smithy.ts.sdk.synthetic.com.amazonaws.cloudformation"; -const n0 = "com.amazonaws.cloudformation"; -var AccountGateResult = [3, n0, _AGR, 0, [_S, _SR], [0, 0]]; -var AccountLimit = [3, n0, _AL, 0, [_N, _V], [0, 1]]; -var ActivateOrganizationsAccessInput = [3, n0, _AOAI, 0, [], []]; -var ActivateOrganizationsAccessOutput = [3, n0, _AOAO, 0, [], []]; -var ActivateTypeInput = [ - 3, - n0, - _ATI, - 0, - [_T, _PTA, _PI, _TN, _TNA, _AU, _LC, _ERA, _VB, _MV], - [0, 0, 0, 0, 0, 2, () => LoggingConfig, 0, 0, 1], -]; -var ActivateTypeOutput = [3, n0, _ATO, 0, [_A], [0]]; -var AlreadyExistsException = [ - -3, - n0, - _AEE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`AlreadyExistsException`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(AlreadyExistsException, AlreadyExistsException$1); -var Annotation = [3, n0, _An, 0, [_AN, _S, _SM, _RM, _RL, _SL], [0, 0, 0, 0, 0, 0]]; -var AutoDeployment = [3, n0, _AD, 0, [_E, _RSOAR], [2, 2]]; -var BatchDescribeTypeConfigurationsError = [ - 3, - n0, - _BDTCE, - 0, - [_EC, _EM, _TCI], - [0, 0, () => TypeConfigurationIdentifier], -]; -var BatchDescribeTypeConfigurationsInput = [ - 3, - n0, - _BDTCI, - 0, - [_TCIy], - [() => TypeConfigurationIdentifiers], -]; -var BatchDescribeTypeConfigurationsOutput = [ - 3, - n0, - _BDTCO, - 0, - [_Er, _UTC, _TC], - [ - () => BatchDescribeTypeConfigurationsErrors, - () => UnprocessedTypeConfigurations, - () => TypeConfigurationDetailsList, - ], -]; -var CancelUpdateStackInput = [3, n0, _CUSI, 0, [_SN, _CRT], [0, 0]]; -var CFNRegistryException = [ - -3, - n0, - _CFNRE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`CFNRegistryException`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(CFNRegistryException, CFNRegistryException$1); -var Change = [3, n0, _C, 0, [_T, _HIC, _RC], [0, 1, () => ResourceChange]]; -var ChangeSetHook = [ - 3, - n0, - _CSH, - 0, - [_IP, _FM, _TN, _TVI, _TCVI, _TD], - [0, 0, 0, 0, 0, () => ChangeSetHookTargetDetails], -]; -var ChangeSetHookResourceTargetDetails = [3, n0, _CSHRTD, 0, [_LRI, _RT, _RA], [0, 0, 0]]; -var ChangeSetHookTargetDetails = [ - 3, - n0, - _CSHTD, - 0, - [_TT, _RTD], - [0, () => ChangeSetHookResourceTargetDetails], -]; -var ChangeSetNotFoundException = [ - -3, - n0, - _CSNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`ChangeSetNotFound`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(ChangeSetNotFoundException, ChangeSetNotFoundException$1); -var ChangeSetSummary = [ - 3, - n0, - _CSS, - 0, - [_SI, _SN, _CSI, _CSN, _ES, _S, _SR, _CT, _D, _INS, _PCSI, _RCSI, _IER], - [0, 0, 0, 0, 0, 0, 0, 4, 0, 2, 0, 0, 2], -]; -var ConcurrentResourcesLimitExceededException = [ - -3, - n0, - _CRLEE, - { - [_e]: _c, - [_hE]: 429, - [_aQE]: [`ConcurrentResourcesLimitExceeded`, 429], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(ConcurrentResourcesLimitExceededException, ConcurrentResourcesLimitExceededException$1); -var ContinueUpdateRollbackInput = [ - 3, - n0, - _CURI, - 0, - [_SN, _RARN, _RTS, _CRT], - [0, 0, 64 | 0, 0], -]; -var ContinueUpdateRollbackOutput = [3, n0, _CURO, 0, [], []]; -var CreateChangeSetInput = [ - 3, - n0, - _CCSI, - 0, - [_SN, _TB, _TURL, _UPT, _P, _Ca, _RTe, _RARN, _RCo, _NARN, _Ta, _CSN, _CTl, _D, _CST, _RTI, _INS, _OSF, _IER, _DM], - [ - 0, - 0, - 0, - 2, - () => _Parameters, - 64 | 0, - 64 | 0, - 0, - () => RollbackConfiguration, - 64 | 0, - () => Tags, - 0, - 0, - 0, - 0, - () => ResourcesToImport, - 2, - 0, - 2, - 0, - ], -]; -var CreateChangeSetOutput = [3, n0, _CCSO, 0, [_I, _SI], [0, 0]]; -var CreatedButModifiedException = [ - -3, - n0, - _CBME, - { - [_e]: _c, - [_hE]: 409, - [_aQE]: [`CreatedButModifiedException`, 409], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(CreatedButModifiedException, CreatedButModifiedException$1); -var CreateGeneratedTemplateInput = [ - 3, - n0, - _CGTI, - 0, - [_R, _GTN, _SN, _TCe], - [() => ResourceDefinitions, 0, 0, () => TemplateConfiguration], -]; -var CreateGeneratedTemplateOutput = [3, n0, _CGTO, 0, [_GTI], [0]]; -var CreateStackInput = [ - 3, - n0, - _CSIr, - 0, - [_SN, _TB, _TURL, _P, _DR, _RCo, _TIM, _NARN, _Ca, _RTe, _RARN, _OF, _SPB, _SPURL, _Ta, _CRT, _ETP, _REOC], - [ - 0, - 0, - 0, - () => _Parameters, - 2, - () => RollbackConfiguration, - 1, - 64 | 0, - 64 | 0, - 64 | 0, - 0, - 0, - 0, - 0, - () => Tags, - 0, - 2, - 2, - ], -]; -var CreateStackInstancesInput = [ - 3, - n0, - _CSII, - 0, - [_SSN, _Ac, _DT, _Re, _PO, _OP, _OI, _CA], - [0, 64 | 0, () => DeploymentTargets, 64 | 0, () => _Parameters, () => StackSetOperationPreferences, [0, 4], 0], -]; -var CreateStackInstancesOutput = [3, n0, _CSIO, 0, [_OI], [0]]; -var CreateStackOutput = [3, n0, _CSO, 0, [_SI, _OI], [0, 0]]; -var CreateStackRefactorInput = [ - 3, - n0, - _CSRI, - 0, - [_D, _ESC, _RMe, _SD], - [0, 2, () => ResourceMappings, () => StackDefinitions], -]; -var CreateStackRefactorOutput = [3, n0, _CSRO, 0, [_SRI], [0]]; -var CreateStackSetInput = [ - 3, - n0, - _CSSI, - 0, - [_SSN, _D, _TB, _TURL, _SI, _P, _Ca, _Ta, _ARARN, _ERN, _PM, _AD, _CA, _CRT, _ME], - [ - 0, - 0, - 0, - 0, - 0, - () => _Parameters, - 64 | 0, - () => Tags, - 0, - 0, - 0, - () => AutoDeployment, - 0, - [0, 4], - () => ManagedExecution, - ], -]; -var CreateStackSetOutput = [3, n0, _CSSO, 0, [_SSI], [0]]; -var DeactivateOrganizationsAccessInput = [3, n0, _DOAI, 0, [], []]; -var DeactivateOrganizationsAccessOutput = [3, n0, _DOAO, 0, [], []]; -var DeactivateTypeInput = [3, n0, _DTI, 0, [_TN, _T, _A], [0, 0, 0]]; -var DeactivateTypeOutput = [3, n0, _DTO, 0, [], []]; -var DeleteChangeSetInput = [3, n0, _DCSI, 0, [_CSN, _SN], [0, 0]]; -var DeleteChangeSetOutput = [3, n0, _DCSO, 0, [], []]; -var DeleteGeneratedTemplateInput = [3, n0, _DGTI, 0, [_GTN], [0]]; -var DeleteStackInput = [ - 3, - n0, - _DSI, - 0, - [_SN, _RR, _RARN, _CRT, _DMe], - [0, 64 | 0, 0, 0, 0], -]; -var DeleteStackInstancesInput = [ - 3, - n0, - _DSII, - 0, - [_SSN, _Ac, _DT, _Re, _OP, _RS, _OI, _CA], - [0, 64 | 0, () => DeploymentTargets, 64 | 0, () => StackSetOperationPreferences, 2, [0, 4], 0], -]; -var DeleteStackInstancesOutput = [3, n0, _DSIO, 0, [_OI], [0]]; -var DeleteStackSetInput = [3, n0, _DSSI, 0, [_SSN, _CA], [0, 0]]; -var DeleteStackSetOutput = [3, n0, _DSSO, 0, [], []]; -var DeploymentTargets = [3, n0, _DT, 0, [_Ac, _AUc, _OUI, _AFT], [64 | 0, 0, 64 | 0, 0]]; -var DeregisterTypeInput = [3, n0, _DTIe, 0, [_A, _T, _TN, _VI], [0, 0, 0, 0]]; -var DeregisterTypeOutput = [3, n0, _DTOe, 0, [], []]; -var DescribeAccountLimitsInput = [3, n0, _DALI, 0, [_NT], [0]]; -var DescribeAccountLimitsOutput = [ - 3, - n0, - _DALO, - 0, - [_ALc, _NT], - [() => AccountLimitList, 0], -]; -var DescribeChangeSetHooksInput = [ - 3, - n0, - _DCSHI, - 0, - [_CSN, _SN, _NT, _LRI], - [0, 0, 0, 0], -]; -var DescribeChangeSetHooksOutput = [ - 3, - n0, - _DCSHO, - 0, - [_CSI, _CSN, _H, _S, _NT, _SI, _SN], - [0, 0, () => ChangeSetHooks, 0, 0, 0, 0], -]; -var DescribeChangeSetInput = [3, n0, _DCSIe, 0, [_CSN, _SN, _NT, _IPV], [0, 0, 0, 2]]; -var DescribeChangeSetOutput = [ - 3, - n0, - _DCSOe, - 0, - [ - _CSN, - _CSI, - _SI, - _SN, - _D, - _P, - _CT, - _ES, - _S, - _SR, - _SDS, - _NARN, - _RCo, - _Ca, - _Ta, - _Ch, - _NT, - _INS, - _PCSI, - _RCSI, - _OSF, - _IER, - _DM, - ], - [ - 0, - 0, - 0, - 0, - 0, - () => _Parameters, - 4, - 0, - 0, - 0, - 0, - 64 | 0, - () => RollbackConfiguration, - 64 | 0, - () => Tags, - () => Changes, - 0, - 2, - 0, - 0, - 0, - 2, - 0, - ], -]; -var DescribeEventsInput = [ - 3, - n0, - _DEI, - 0, - [_SN, _CSN, _OI, _F, _NT], - [0, 0, 0, () => EventFilter, 0], -]; -var DescribeEventsOutput = [3, n0, _DEO, 0, [_OE, _NT], [() => OperationEvents, 0]]; -var DescribeGeneratedTemplateInput = [3, n0, _DGTIe, 0, [_GTN], [0]]; -var DescribeGeneratedTemplateOutput = [ - 3, - n0, - _DGTO, - 0, - [_GTI, _GTN, _R, _S, _SR, _CT, _LUT, _Pr, _SI, _TCe, _TW], - [0, 0, () => ResourceDetails, 0, 0, 4, 4, () => TemplateProgress, 0, () => TemplateConfiguration, 1], -]; -var DescribeOrganizationsAccessInput = [3, n0, _DOAIe, 0, [_CA], [0]]; -var DescribeOrganizationsAccessOutput = [3, n0, _DOAOe, 0, [_S], [0]]; -var DescribePublisherInput = [3, n0, _DPI, 0, [_PI], [0]]; -var DescribePublisherOutput = [3, n0, _DPO, 0, [_PI, _PS, _IPd, _PP], [0, 0, 0, 0]]; -var DescribeResourceScanInput = [3, n0, _DRSI, 0, [_RSI], [0]]; -var DescribeResourceScanOutput = [ - 3, - n0, - _DRSO, - 0, - [_RSI, _S, _SR, _ST, _ET, _PC, _RTe, _RSe, _RRe, _SF], - [0, 0, 0, 4, 4, 1, 64 | 0, 1, 1, () => ScanFilters], -]; -var DescribeStackDriftDetectionStatusInput = [3, n0, _DSDDSI, 0, [_SDDI], [0]]; -var DescribeStackDriftDetectionStatusOutput = [ - 3, - n0, - _DSDDSO, - 0, - [_SI, _SDDI, _SDS, _DS, _DSR, _DSRC, _Ti], - [0, 0, 0, 0, 0, 1, 4], -]; -var DescribeStackEventsInput = [3, n0, _DSEI, 0, [_SN, _NT], [0, 0]]; -var DescribeStackEventsOutput = [3, n0, _DSEO, 0, [_SE, _NT], [() => StackEvents, 0]]; -var DescribeStackInstanceInput = [ - 3, - n0, - _DSIIe, - 0, - [_SSN, _SIA, _SIR, _CA], - [0, 0, 0, 0], -]; -var DescribeStackInstanceOutput = [3, n0, _DSIOe, 0, [_SIt], [() => StackInstance]]; -var DescribeStackRefactorInput = [3, n0, _DSRI, 0, [_SRI], [0]]; -var DescribeStackRefactorOutput = [ - 3, - n0, - _DSRO, - 0, - [_D, _SRI, _SIta, _ES, _ESR, _S, _SR], - [0, 0, 64 | 0, 0, 0, 0, 0], -]; -var DescribeStackResourceDriftsInput = [ - 3, - n0, - _DSRDI, - 0, - [_SN, _SRDSF, _NT, _MR], - [0, 64 | 0, 0, 1], -]; -var DescribeStackResourceDriftsOutput = [ - 3, - n0, - _DSRDO, - 0, - [_SRD, _NT], - [() => StackResourceDrifts, 0], -]; -var DescribeStackResourceInput = [3, n0, _DSRIe, 0, [_SN, _LRI], [0, 0]]; -var DescribeStackResourceOutput = [ - 3, - n0, - _DSROe, - 0, - [_SRDt], - [() => StackResourceDetail], -]; -var DescribeStackResourcesInput = [3, n0, _DSRIes, 0, [_SN, _LRI, _PRI], [0, 0, 0]]; -var DescribeStackResourcesOutput = [3, n0, _DSROes, 0, [_SRt], [() => StackResources]]; -var DescribeStackSetInput = [3, n0, _DSSIe, 0, [_SSN, _CA], [0, 0]]; -var DescribeStackSetOperationInput = [3, n0, _DSSOI, 0, [_SSN, _OI, _CA], [0, 0, 0]]; -var DescribeStackSetOperationOutput = [ - 3, - n0, - _DSSOO, - 0, - [_SSO], - [() => StackSetOperation], -]; -var DescribeStackSetOutput = [3, n0, _DSSOe, 0, [_SS], [() => StackSet]]; -var DescribeStacksInput = [3, n0, _DSIe, 0, [_SN, _NT], [0, 0]]; -var DescribeStacksOutput = [3, n0, _DSO, 0, [_St, _NT], [() => Stacks, 0]]; -var DescribeTypeInput = [ - 3, - n0, - _DTIes, - 0, - [_T, _TN, _A, _VI, _PI, _PVN], - [0, 0, 0, 0, 0, 0], -]; -var DescribeTypeOutput = [ - 3, - n0, - _DTOes, - 0, - [ - _A, - _T, - _TN, - _DVI, - _IDV, - _TTS, - _TTSD, - _D, - _Sc, - _PT, - _DSe, - _LC, - _RAT, - _ERA, - _Vi, - _SU, - _DU, - _LU, - _TCi, - _CS, - _PI, - _OTN, - _OTA, - _PVN, - _LPV, - _IA, - _AU, - ], - [ - 0, - 0, - 0, - 0, - 2, - 0, - 0, - 0, - 0, - 0, - 0, - () => LoggingConfig, - () => RequiredActivatedTypes, - 0, - 0, - 0, - 0, - 4, - 4, - 0, - 0, - 0, - 0, - 0, - 0, - 2, - 2, - ], -]; -var DescribeTypeRegistrationInput = [3, n0, _DTRI, 0, [_RTeg], [0]]; -var DescribeTypeRegistrationOutput = [ - 3, - n0, - _DTRO, - 0, - [_PSr, _D, _TA, _TVA], - [0, 0, 0, 0], -]; -var DetectStackDriftInput = [3, n0, _DSDI, 0, [_SN, _LRIo], [0, 64 | 0]]; -var DetectStackDriftOutput = [3, n0, _DSDO, 0, [_SDDI], [0]]; -var DetectStackResourceDriftInput = [3, n0, _DSRDIe, 0, [_SN, _LRI], [0, 0]]; -var DetectStackResourceDriftOutput = [ - 3, - n0, - _DSRDOe, - 0, - [_SRDta], - [() => StackResourceDrift], -]; -var DetectStackSetDriftInput = [ - 3, - n0, - _DSSDI, - 0, - [_SSN, _OP, _OI, _CA], - [0, () => StackSetOperationPreferences, [0, 4], 0], -]; -var DetectStackSetDriftOutput = [3, n0, _DSSDO, 0, [_OI], [0]]; -var EstimateTemplateCostInput = [ - 3, - n0, - _ETCI, - 0, - [_TB, _TURL, _P], - [0, 0, () => _Parameters], -]; -var EstimateTemplateCostOutput = [3, n0, _ETCO, 0, [_U], [0]]; -var EventFilter = [3, n0, _EF, 0, [_FE], [2]]; -var ExecuteChangeSetInput = [ - 3, - n0, - _ECSI, - 0, - [_CSN, _SN, _CRT, _DR, _REOC], - [0, 0, 0, 2, 2], -]; -var ExecuteChangeSetOutput = [3, n0, _ECSO, 0, [], []]; -var ExecuteStackRefactorInput = [3, n0, _ESRI, 0, [_SRI], [0]]; -var Export = [3, n0, _Ex, 0, [_ESI, _N, _V], [0, 0, 0]]; -var GeneratedTemplateNotFoundException = [ - -3, - n0, - _GTNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`GeneratedTemplateNotFound`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(GeneratedTemplateNotFoundException, GeneratedTemplateNotFoundException$1); -var GetGeneratedTemplateInput = [3, n0, _GGTI, 0, [_Fo, _GTN], [0, 0]]; -var GetGeneratedTemplateOutput = [3, n0, _GGTO, 0, [_S, _TB], [0, 0]]; -var GetHookResultInput = [3, n0, _GHRI, 0, [_HRI], [0]]; -var GetHookResultOutput = [ - 3, - n0, - _GHRO, - 0, - [_HRI, _IP, _FM, _TN, _OTN, _TVI, _TCVI, _TA, _S, _HSR, _IAn, _Tar, _Ann], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, () => HookTarget, () => AnnotationList], -]; -var GetStackPolicyInput = [3, n0, _GSPI, 0, [_SN], [0]]; -var GetStackPolicyOutput = [3, n0, _GSPO, 0, [_SPB], [0]]; -var GetTemplateInput = [3, n0, _GTIe, 0, [_SN, _CSN, _TS], [0, 0, 0]]; -var GetTemplateOutput = [3, n0, _GTO, 0, [_TB, _SA], [0, 64 | 0]]; -var GetTemplateSummaryInput = [ - 3, - n0, - _GTSI, - 0, - [_TB, _TURL, _SN, _SSN, _CA, _TSC], - [0, 0, 0, 0, 0, () => TemplateSummaryConfig], -]; -var GetTemplateSummaryOutput = [ - 3, - n0, - _GTSO, - 0, - [_P, _D, _Ca, _CR, _RTe, _Ve, _Me, _DTe, _RIS, _W], - [() => ParameterDeclarations, 0, 64 | 0, 0, 64 | 0, 0, 0, 64 | 0, () => ResourceIdentifierSummaries, () => Warnings], -]; -var HookResultNotFoundException = [ - -3, - n0, - _HRNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`HookResultNotFound`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(HookResultNotFoundException, HookResultNotFoundException$1); -var HookResultSummary = [ - 3, - n0, - _HRS, - 0, - [_HRI, _IP, _FM, _TN, _TVI, _TCVI, _S, _HSR, _IAn, _TT, _TI, _TA, _HET], - [0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0], -]; -var HookTarget = [3, n0, _HT, 0, [_TT, _TTN, _TI, _Act], [0, 0, 0, 0]]; -var ImportStacksToStackSetInput = [ - 3, - n0, - _ISTSSI, - 0, - [_SSN, _SIta, _SIU, _OUI, _OP, _OI, _CA], - [0, 64 | 0, 0, 64 | 0, () => StackSetOperationPreferences, [0, 4], 0], -]; -var ImportStacksToStackSetOutput = [3, n0, _ISTSSO, 0, [_OI], [0]]; -var InsufficientCapabilitiesException = [ - -3, - n0, - _ICE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`InsufficientCapabilitiesException`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(InsufficientCapabilitiesException, InsufficientCapabilitiesException$1); -var InvalidChangeSetStatusException = [ - -3, - n0, - _ICSSE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`InvalidChangeSetStatus`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidChangeSetStatusException, InvalidChangeSetStatusException$1); -var InvalidOperationException = [ - -3, - n0, - _IOE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`InvalidOperationException`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidOperationException, InvalidOperationException$1); -var InvalidStateTransitionException = [ - -3, - n0, - _ISTE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`InvalidStateTransition`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(InvalidStateTransitionException, InvalidStateTransitionException$1); -var LimitExceededException = [ - -3, - n0, - _LEE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`LimitExceededException`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(LimitExceededException, LimitExceededException$1); -var ListChangeSetsInput = [3, n0, _LCSI, 0, [_SN, _NT], [0, 0]]; -var ListChangeSetsOutput = [3, n0, _LCSO, 0, [_Su, _NT], [() => ChangeSetSummaries, 0]]; -var ListExportsInput = [3, n0, _LEI, 0, [_NT], [0]]; -var ListExportsOutput = [3, n0, _LEO, 0, [_Exp, _NT], [() => Exports, 0]]; -var ListGeneratedTemplatesInput = [3, n0, _LGTI, 0, [_NT, _MR], [0, 1]]; -var ListGeneratedTemplatesOutput = [ - 3, - n0, - _LGTO, - 0, - [_Su, _NT], - [() => TemplateSummaries, 0], -]; -var ListHookResultsInput = [3, n0, _LHRI, 0, [_TT, _TI, _TA, _S, _NT], [0, 0, 0, 0, 0]]; -var ListHookResultsOutput = [ - 3, - n0, - _LHRO, - 0, - [_TT, _TI, _HR, _NT], - [0, 0, () => HookResultSummaries, 0], -]; -var ListImportsInput = [3, n0, _LII, 0, [_EN, _NT], [0, 0]]; -var ListImportsOutput = [3, n0, _LIO, 0, [_Im, _NT], [64 | 0, 0]]; -var ListResourceScanRelatedResourcesInput = [ - 3, - n0, - _LRSRRI, - 0, - [_RSI, _R, _NT, _MR], - [0, () => ScannedResourceIdentifiers, 0, 1], -]; -var ListResourceScanRelatedResourcesOutput = [ - 3, - n0, - _LRSRRO, - 0, - [_RRel, _NT], - [() => RelatedResources, 0], -]; -var ListResourceScanResourcesInput = [ - 3, - n0, - _LRSRI, - 0, - [_RSI, _RI, _RTP, _TK, _TV, _NT, _MR], - [0, 0, 0, 0, 0, 0, 1], -]; -var ListResourceScanResourcesOutput = [ - 3, - n0, - _LRSRO, - 0, - [_R, _NT], - [() => ScannedResources, 0], -]; -var ListResourceScansInput = [3, n0, _LRSI, 0, [_NT, _MR, _STF], [0, 1, 0]]; -var ListResourceScansOutput = [ - 3, - n0, - _LRSO, - 0, - [_RSS, _NT], - [() => ResourceScanSummaries, 0], -]; -var ListStackInstanceResourceDriftsInput = [ - 3, - n0, - _LSIRDI, - 0, - [_SSN, _NT, _MR, _SIRDS, _SIA, _SIR, _OI, _CA], - [0, 0, 1, 64 | 0, 0, 0, 0, 0], -]; -var ListStackInstanceResourceDriftsOutput = [ - 3, - n0, - _LSIRDO, - 0, - [_Su, _NT], - [() => StackInstanceResourceDriftsSummaries, 0], -]; -var ListStackInstancesInput = [ - 3, - n0, - _LSII, - 0, - [_SSN, _NT, _MR, _F, _SIA, _SIR, _CA], - [0, 0, 1, () => StackInstanceFilters, 0, 0, 0], -]; -var ListStackInstancesOutput = [ - 3, - n0, - _LSIO, - 0, - [_Su, _NT], - [() => StackInstanceSummaries, 0], -]; -var ListStackRefactorActionsInput = [3, n0, _LSRAI, 0, [_SRI, _NT, _MR], [0, 0, 1]]; -var ListStackRefactorActionsOutput = [ - 3, - n0, - _LSRAO, - 0, - [_SRA, _NT], - [() => StackRefactorActions, 0], -]; -var ListStackRefactorsInput = [3, n0, _LSRI, 0, [_ESF, _NT, _MR], [64 | 0, 0, 1]]; -var ListStackRefactorsOutput = [ - 3, - n0, - _LSRO, - 0, - [_SRS, _NT], - [() => StackRefactorSummaries, 0], -]; -var ListStackResourcesInput = [3, n0, _LSRIi, 0, [_SN, _NT], [0, 0]]; -var ListStackResourcesOutput = [ - 3, - n0, - _LSROi, - 0, - [_SRSt, _NT], - [() => StackResourceSummaries, 0], -]; -var ListStackSetAutoDeploymentTargetsInput = [ - 3, - n0, - _LSSADTI, - 0, - [_SSN, _NT, _MR, _CA], - [0, 0, 1, 0], -]; -var ListStackSetAutoDeploymentTargetsOutput = [ - 3, - n0, - _LSSADTO, - 0, - [_Su, _NT], - [() => StackSetAutoDeploymentTargetSummaries, 0], -]; -var ListStackSetOperationResultsInput = [ - 3, - n0, - _LSSORI, - 0, - [_SSN, _OI, _NT, _MR, _CA, _F], - [0, 0, 0, 1, 0, () => OperationResultFilters], -]; -var ListStackSetOperationResultsOutput = [ - 3, - n0, - _LSSORO, - 0, - [_Su, _NT], - [() => StackSetOperationResultSummaries, 0], -]; -var ListStackSetOperationsInput = [3, n0, _LSSOI, 0, [_SSN, _NT, _MR, _CA], [0, 0, 1, 0]]; -var ListStackSetOperationsOutput = [ - 3, - n0, - _LSSOO, - 0, - [_Su, _NT], - [() => StackSetOperationSummaries, 0], -]; -var ListStackSetsInput = [3, n0, _LSSI, 0, [_NT, _MR, _S, _CA], [0, 1, 0, 0]]; -var ListStackSetsOutput = [3, n0, _LSSO, 0, [_Su, _NT], [() => StackSetSummaries, 0]]; -var ListStacksInput = [3, n0, _LSI, 0, [_NT, _SSF], [0, 64 | 0]]; -var ListStacksOutput = [3, n0, _LSO, 0, [_SSt, _NT], [() => StackSummaries, 0]]; -var ListTypeRegistrationsInput = [ - 3, - n0, - _LTRI, - 0, - [_T, _TN, _TA, _RSF, _MR, _NT], - [0, 0, 0, 0, 1, 0], -]; -var ListTypeRegistrationsOutput = [3, n0, _LTRO, 0, [_RTL, _NT], [64 | 0, 0]]; -var ListTypesInput = [ - 3, - n0, - _LTI, - 0, - [_Vi, _PT, _DSe, _T, _F, _MR, _NT], - [0, 0, 0, 0, () => TypeFilters, 1, 0], -]; -var ListTypesOutput = [3, n0, _LTO, 0, [_TSy, _NT], [() => TypeSummaries, 0]]; -var ListTypeVersionsInput = [ - 3, - n0, - _LTVI, - 0, - [_T, _TN, _A, _MR, _NT, _DSe, _PI], - [0, 0, 0, 1, 0, 0, 0], -]; -var ListTypeVersionsOutput = [ - 3, - n0, - _LTVO, - 0, - [_TVS, _NT], - [() => TypeVersionSummaries, 0], -]; -var LiveResourceDrift = [3, n0, _LRD, 0, [_PV, _AV, _DDT], [0, 0, 4]]; -var LoggingConfig = [3, n0, _LC, 0, [_LRA, _LGN], [0, 0]]; -var ManagedExecution = [3, n0, _ME, 0, [_Acti], [2]]; -var ModuleInfo = [3, n0, _MI, 0, [_TH, _LIH], [0, 0]]; -var NameAlreadyExistsException = [ - -3, - n0, - _NAEE, - { - [_e]: _c, - [_hE]: 409, - [_aQE]: [`NameAlreadyExistsException`, 409], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(NameAlreadyExistsException, NameAlreadyExistsException$1); -var OperationEntry = [3, n0, _OEp, 0, [_OT, _OI], [0, 0]]; -var OperationEvent = [ - 3, - n0, - _OEpe, - 0, - [ - _EI, - _SI, - _OI, - _OT, - _OS, - _ETv, - _LRI, - _PRI, - _RT, - _Ti, - _ST, - _ET, - _RSes, - _RSR, - _RP, - _CRT, - _HTo, - _HS, - _HSR, - _HIP, - _HFM, - _DSet, - _VFM, - _VN, - _VS, - _VSR, - _VP, - ], - [0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], -]; -var OperationIdAlreadyExistsException = [ - -3, - n0, - _OIAEE, - { - [_e]: _c, - [_hE]: 409, - [_aQE]: [`OperationIdAlreadyExistsException`, 409], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(OperationIdAlreadyExistsException, OperationIdAlreadyExistsException$1); -var OperationInProgressException = [ - -3, - n0, - _OIPE, - { - [_e]: _c, - [_hE]: 409, - [_aQE]: [`OperationInProgressException`, 409], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(OperationInProgressException, OperationInProgressException$1); -var OperationNotFoundException = [ - -3, - n0, - _ONFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`OperationNotFoundException`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(OperationNotFoundException, OperationNotFoundException$1); -var OperationResultFilter = [3, n0, _ORF, 0, [_N, _Va], [0, 0]]; -var OperationStatusCheckFailedException = [ - -3, - n0, - _OSCFE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`ConditionalCheckFailed`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(OperationStatusCheckFailedException, OperationStatusCheckFailedException$1); -var Output = [3, n0, _O, 0, [_OK, _OV, _D, _EN], [0, 0, 0, 0]]; -var Parameter = [3, n0, _Pa, 0, [_PK, _PVa, _UPV, _RV], [0, 0, 2, 0]]; -var ParameterConstraints = [3, n0, _PCa, 0, [_AVl], [64 | 0]]; -var ParameterDeclaration = [ - 3, - n0, - _PD, - 0, - [_PK, _DV, _PTa, _NE, _D, _PCa], - [0, 0, 0, 2, 0, () => ParameterConstraints], -]; -var PhysicalResourceIdContextKeyValuePair = [3, n0, _PRICKVP, 0, [_K, _V], [0, 0]]; -var PropertyDifference = [3, n0, _PDr, 0, [_PPr, _EV, _AV, _DTi], [0, 0, 0, 0]]; -var PublishTypeInput = [3, n0, _PTI, 0, [_T, _A, _TN, _PVN], [0, 0, 0, 0]]; -var PublishTypeOutput = [3, n0, _PTO, 0, [_PTA], [0]]; -var RecordHandlerProgressInput = [ - 3, - n0, - _RHPI, - 0, - [_BT, _OS, _COS, _SM, _EC, _RMes, _CRT], - [0, 0, 0, 0, 0, 0, 0], -]; -var RecordHandlerProgressOutput = [3, n0, _RHPO, 0, [], []]; -var RegisterPublisherInput = [3, n0, _RPI, 0, [_ATAC, _CAo], [2, 0]]; -var RegisterPublisherOutput = [3, n0, _RPO, 0, [_PI], [0]]; -var RegisterTypeInput = [ - 3, - n0, - _RTIe, - 0, - [_T, _TN, _SHP, _LC, _ERA, _CRT], - [0, 0, 0, () => LoggingConfig, 0, 0], -]; -var RegisterTypeOutput = [3, n0, _RTO, 0, [_RTeg], [0]]; -var RequiredActivatedType = [3, n0, _RATe, 0, [_TNA, _OTN, _PI, _SMV], [0, 0, 0, 64 | 1]]; -var ResourceChange = [ - 3, - n0, - _RC, - 0, - [_PA, _Act, _LRI, _PRI, _RT, _Rep, _Sco, _RDS, _RDIA, _De, _CSI, _MI, _BC, _AC, _PDC], - [ - 0, - 0, - 0, - 0, - 0, - 0, - 64 | 0, - 0, - () => ResourceDriftIgnoredAttributes, - () => ResourceChangeDetails, - 0, - () => ModuleInfo, - 0, - 0, - 0, - ], -]; -var ResourceChangeDetail = [ - 3, - n0, - _RCD, - 0, - [_Tar, _Ev, _CSh, _CE], - [() => ResourceTargetDefinition, 0, 0, 0], -]; -var ResourceDefinition = [3, n0, _RD, 0, [_RT, _LRI, _RI], [0, 0, 128 | 0]]; -var ResourceDetail = [ - 3, - n0, - _RDe, - 0, - [_RT, _LRI, _RI, _RSes, _RSR, _W], - [0, 0, 128 | 0, 0, 0, () => WarningDetails], -]; -var ResourceDriftIgnoredAttribute = [3, n0, _RDIAe, 0, [_Pat, _Rea], [0, 0]]; -var ResourceIdentifierSummary = [ - 3, - n0, - _RISe, - 0, - [_RT, _LRIo, _RIe], - [0, 64 | 0, 64 | 0], -]; -var ResourceLocation = [3, n0, _RLe, 0, [_SN, _LRI], [0, 0]]; -var ResourceMapping = [ - 3, - n0, - _RMeso, - 0, - [_So, _Des], - [() => ResourceLocation, () => ResourceLocation], -]; -var ResourceScanInProgressException = [ - -3, - n0, - _RSIPE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`ResourceScanInProgress`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(ResourceScanInProgressException, ResourceScanInProgressException$1); -var ResourceScanLimitExceededException = [ - -3, - n0, - _RSLEE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`ResourceScanLimitExceeded`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(ResourceScanLimitExceededException, ResourceScanLimitExceededException$1); -var ResourceScanNotFoundException = [ - -3, - n0, - _RSNFE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`ResourceScanNotFound`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(ResourceScanNotFoundException, ResourceScanNotFoundException$1); -var ResourceScanSummary = [ - 3, - n0, - _RSSe, - 0, - [_RSI, _S, _SR, _ST, _ET, _PC, _STc], - [0, 0, 0, 4, 4, 1, 0], -]; -var ResourceTargetDefinition = [ - 3, - n0, - _RTDe, - 0, - [_At, _N, _RReq, _Pat, _BV, _AVf, _BVF, _AVF, _Dr, _ACT], - [0, 0, 0, 0, 0, 0, 0, 0, () => LiveResourceDrift, 0], -]; -var ResourceToImport = [3, n0, _RTIes, 0, [_RT, _LRI, _RI], [0, 0, 128 | 0]]; -var RollbackConfiguration = [3, n0, _RCo, 0, [_RTo, _MTIM], [() => RollbackTriggers, 1]]; -var RollbackStackInput = [3, n0, _RSIo, 0, [_SN, _RARN, _CRT, _REOC], [0, 0, 0, 2]]; -var RollbackStackOutput = [3, n0, _RSO, 0, [_SI, _OI], [0, 0]]; -var RollbackTrigger = [3, n0, _RTol, 0, [_A, _T], [0, 0]]; -var ScanFilter = [3, n0, _SFc, 0, [_Ty], [64 | 0]]; -var ScannedResource = [3, n0, _SRc, 0, [_RT, _RI, _MBS], [0, 128 | 0, 2]]; -var ScannedResourceIdentifier = [3, n0, _SRIc, 0, [_RT, _RI], [0, 128 | 0]]; -var SetStackPolicyInput = [3, n0, _SSPI, 0, [_SN, _SPB, _SPURL], [0, 0, 0]]; -var SetTypeConfigurationInput = [ - 3, - n0, - _STCI, - 0, - [_TA, _Co, _CAon, _TN, _T], - [0, 0, 0, 0, 0], -]; -var SetTypeConfigurationOutput = [3, n0, _STCO, 0, [_CAonf], [0]]; -var SetTypeDefaultVersionInput = [3, n0, _STDVI, 0, [_A, _T, _TN, _VI], [0, 0, 0, 0]]; -var SetTypeDefaultVersionOutput = [3, n0, _STDVO, 0, [], []]; -var SignalResourceInput = [3, n0, _SRIi, 0, [_SN, _LRI, _UI, _S], [0, 0, 0, 0]]; -var Stack = [ - 3, - n0, - _Sta, - 0, - [ - _SI, - _SN, - _CSI, - _D, - _P, - _CT, - _DTel, - _LUT, - _RCo, - _SSta, - _SSR, - _DR, - _NARN, - _TIM, - _Ca, - _Ou, - _RARN, - _Ta, - _ETP, - _PIa, - _RIo, - _DI, - _REOC, - _DMe, - _DSet, - _LO, - ], - [ - 0, - 0, - 0, - 0, - () => _Parameters, - 4, - 4, - 4, - () => RollbackConfiguration, - 0, - 0, - 2, - 64 | 0, - 1, - 64 | 0, - () => Outputs, - 0, - () => Tags, - 2, - 0, - 0, - () => StackDriftInformation, - 2, - 0, - 0, - () => LastOperations, - ], -]; -var StackDefinition = [3, n0, _SDt, 0, [_SN, _TB, _TURL], [0, 0, 0]]; -var StackDriftInformation = [3, n0, _SDI, 0, [_SDS, _LCT], [0, 4]]; -var StackDriftInformationSummary = [3, n0, _SDIS, 0, [_SDS, _LCT], [0, 4]]; -var StackEvent = [ - 3, - n0, - _SEt, - 0, - [_SI, _EI, _SN, _OI, _LRI, _PRI, _RT, _Ti, _RSes, _RSR, _RP, _CRT, _HTo, _HS, _HSR, _HIP, _HII, _HFM, _DSet], - [0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], -]; -var StackInstance = [ - 3, - n0, - _SIt, - 0, - [_SSI, _Reg, _Acc, _SI, _PO, _S, _SIS, _SR, _OUIr, _DSr, _LDCT, _LOI], - [0, 0, 0, 0, () => _Parameters, 0, () => StackInstanceComprehensiveStatus, 0, 0, 0, 4, 0], -]; -var StackInstanceComprehensiveStatus = [3, n0, _SICS, 0, [_DSet], [0]]; -var StackInstanceFilter = [3, n0, _SIF, 0, [_N, _Va], [0, 0]]; -var StackInstanceNotFoundException = [ - -3, - n0, - _SINFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`StackInstanceNotFoundException`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(StackInstanceNotFoundException, StackInstanceNotFoundException$1); -var StackInstanceResourceDriftsSummary = [ - 3, - n0, - _SIRDSt, - 0, - [_SI, _LRI, _PRI, _PRIC, _RT, _PDro, _SRDS, _Ti], - [0, 0, 0, () => PhysicalResourceIdContext, 0, () => PropertyDifferences, 0, 4], -]; -var StackInstanceSummary = [ - 3, - n0, - _SISt, - 0, - [_SSI, _Reg, _Acc, _SI, _S, _SR, _SIS, _OUIr, _DSr, _LDCT, _LOI], - [0, 0, 0, 0, 0, 0, () => StackInstanceComprehensiveStatus, 0, 0, 4, 0], -]; -var StackNotFoundException = [ - -3, - n0, - _SNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`StackNotFoundException`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(StackNotFoundException, StackNotFoundException$1); -var StackRefactorAction = [ - 3, - n0, - _SRAt, - 0, - [_Act, _En, _PRI, _RI, _D, _Det, _DRe, _TR, _UR, _RMeso], - [0, 0, 0, 0, 0, 0, 0, () => StackRefactorTagResources, 64 | 0, () => ResourceMapping], -]; -var StackRefactorNotFoundException = [ - -3, - n0, - _SRNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`StackRefactorNotFoundException`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(StackRefactorNotFoundException, StackRefactorNotFoundException$1); -var StackRefactorSummary = [ - 3, - n0, - _SRSta, - 0, - [_SRI, _D, _ES, _ESR, _S, _SR], - [0, 0, 0, 0, 0, 0], -]; -var StackResource = [ - 3, - n0, - _SRta, - 0, - [_SN, _SI, _LRI, _PRI, _RT, _Ti, _RSes, _RSR, _D, _DI, _MI], - [0, 0, 0, 0, 0, 4, 0, 0, 0, () => StackResourceDriftInformation, () => ModuleInfo], -]; -var StackResourceDetail = [ - 3, - n0, - _SRDt, - 0, - [_SN, _SI, _LRI, _PRI, _RT, _LUTa, _RSes, _RSR, _D, _Me, _DI, _MI], - [0, 0, 0, 0, 0, 4, 0, 0, 0, 0, () => StackResourceDriftInformation, () => ModuleInfo], -]; -var StackResourceDrift = [ - 3, - n0, - _SRDta, - 0, - [_SI, _LRI, _PRI, _PRIC, _RT, _EP, _AP, _PDro, _SRDS, _Ti, _MI, _DSRr], - [0, 0, 0, () => PhysicalResourceIdContext, 0, 0, 0, () => PropertyDifferences, 0, 4, () => ModuleInfo, 0], -]; -var StackResourceDriftInformation = [3, n0, _SRDI, 0, [_SRDS, _LCT], [0, 4]]; -var StackResourceDriftInformationSummary = [3, n0, _SRDIS, 0, [_SRDS, _LCT], [0, 4]]; -var StackResourceSummary = [ - 3, - n0, - _SRStac, - 0, - [_LRI, _PRI, _RT, _LUTa, _RSes, _RSR, _DI, _MI], - [0, 0, 0, 4, 0, 0, () => StackResourceDriftInformationSummary, () => ModuleInfo], -]; -var StackSet = [ - 3, - n0, - _SS, - 0, - [_SSN, _SSI, _D, _S, _TB, _P, _Ca, _Ta, _SSARN, _ARARN, _ERN, _SSDDD, _AD, _PM, _OUI, _ME, _Re], - [ - 0, - 0, - 0, - 0, - 0, - () => _Parameters, - 64 | 0, - () => Tags, - 0, - 0, - 0, - () => StackSetDriftDetectionDetails, - () => AutoDeployment, - 0, - 64 | 0, - () => ManagedExecution, - 64 | 0, - ], -]; -var StackSetAutoDeploymentTargetSummary = [3, n0, _SSADTS, 0, [_OUIr, _Re], [0, 64 | 0]]; -var StackSetDriftDetectionDetails = [ - 3, - n0, - _SSDDD, - 0, - [_DSr, _DDS, _LDCT, _TSIC, _DSIC, _ISSIC, _IPSIC, _FSIC], - [0, 0, 4, 1, 1, 1, 1, 1], -]; -var StackSetNotEmptyException = [ - -3, - n0, - _SSNEE, - { - [_e]: _c, - [_hE]: 409, - [_aQE]: [`StackSetNotEmptyException`, 409], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(StackSetNotEmptyException, StackSetNotEmptyException$1); -var StackSetNotFoundException = [ - -3, - n0, - _SSNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`StackSetNotFoundException`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(StackSetNotFoundException, StackSetNotFoundException$1); -var StackSetOperation = [ - 3, - n0, - _SSO, - 0, - [_OI, _SSI, _Act, _S, _OP, _RS, _ARARN, _ERN, _CTr, _ETn, _DT, _SSDDD, _SR, _SDta], - [ - 0, - 0, - 0, - 0, - () => StackSetOperationPreferences, - 2, - 0, - 0, - 4, - 4, - () => DeploymentTargets, - () => StackSetDriftDetectionDetails, - 0, - () => StackSetOperationStatusDetails, - ], -]; -var StackSetOperationPreferences = [ - 3, - n0, - _SSOP, - 0, - [_RCT, _RO, _FTC, _FTP, _MCC, _MCP, _CM], - [0, 64 | 0, 1, 1, 1, 1, 0], -]; -var StackSetOperationResultSummary = [ - 3, - n0, - _SSORS, - 0, - [_Acc, _Reg, _S, _SR, _AGR, _OUIr], - [0, 0, 0, 0, () => AccountGateResult, 0], -]; -var StackSetOperationStatusDetails = [3, n0, _SSOSD, 0, [_FSIC], [1]]; -var StackSetOperationSummary = [ - 3, - n0, - _SSOS, - 0, - [_OI, _Act, _S, _CTr, _ETn, _SR, _SDta, _OP], - [0, 0, 0, 4, 4, 0, () => StackSetOperationStatusDetails, () => StackSetOperationPreferences], -]; -var StackSetSummary = [ - 3, - n0, - _SSS, - 0, - [_SSN, _SSI, _D, _S, _AD, _PM, _DSr, _LDCT, _ME], - [0, 0, 0, 0, () => AutoDeployment, 0, 0, 4, () => ManagedExecution], -]; -var StackSummary = [ - 3, - n0, - _SStac, - 0, - [_SI, _SN, _TDe, _CT, _LUT, _DTel, _SSta, _SSR, _PIa, _RIo, _DI, _LO], - [0, 0, 0, 4, 4, 4, 0, 0, 0, 0, () => StackDriftInformationSummary, () => LastOperations], -]; -var StaleRequestException = [ - -3, - n0, - _SRE, - { - [_e]: _c, - [_hE]: 409, - [_aQE]: [`StaleRequestException`, 409], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(StaleRequestException, StaleRequestException$1); -var StartResourceScanInput = [3, n0, _SRSI, 0, [_CRT, _SF], [0, () => ScanFilters]]; -var StartResourceScanOutput = [3, n0, _SRSO, 0, [_RSI], [0]]; -var StopStackSetOperationInput = [3, n0, _SSSOI, 0, [_SSN, _OI, _CA], [0, 0, 0]]; -var StopStackSetOperationOutput = [3, n0, _SSSOO, 0, [], []]; -var Tag = [3, n0, _Tag, 0, [_K, _V], [0, 0]]; -var TemplateConfiguration = [3, n0, _TCe, 0, [_DP, _URP], [0, 0]]; -var TemplateParameter = [3, n0, _TP, 0, [_PK, _DV, _NE, _D], [0, 0, 2, 0]]; -var TemplateProgress = [3, n0, _TPe, 0, [_RSeso, _RF, _RPe, _RPes], [1, 1, 1, 1]]; -var TemplateSummary = [ - 3, - n0, - _TSe, - 0, - [_GTI, _GTN, _S, _SR, _CT, _LUT, _NOR], - [0, 0, 0, 0, 4, 4, 1], -]; -var TemplateSummaryConfig = [3, n0, _TSC, 0, [_TURTAW], [2]]; -var TestTypeInput = [3, n0, _TTI, 0, [_A, _T, _TN, _VI, _LDB], [0, 0, 0, 0, 0]]; -var TestTypeOutput = [3, n0, _TTO, 0, [_TVA], [0]]; -var TokenAlreadyExistsException = [ - -3, - n0, - _TAEE, - { - [_e]: _c, - [_hE]: 400, - [_aQE]: [`TokenAlreadyExistsException`, 400], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(TokenAlreadyExistsException, TokenAlreadyExistsException$1); -var TypeConfigurationDetails = [ - 3, - n0, - _TCD, - 0, - [_A, _Al, _Co, _LU, _TA, _TN, _IDC], - [0, 0, 0, 4, 0, 0, 2], -]; -var TypeConfigurationIdentifier = [ - 3, - n0, - _TCI, - 0, - [_TA, _TCA, _TCAy, _T, _TN], - [0, 0, 0, 0, 0], -]; -var TypeConfigurationNotFoundException = [ - -3, - n0, - _TCNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`TypeConfigurationNotFoundException`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(TypeConfigurationNotFoundException, TypeConfigurationNotFoundException$1); -var TypeFilters = [3, n0, _TF, 0, [_Cat, _PI, _TNP], [0, 0, 0]]; -var TypeNotFoundException = [ - -3, - n0, - _TNFE, - { - [_e]: _c, - [_hE]: 404, - [_aQE]: [`TypeNotFoundException`, 404], - }, - [_M], - [0], -]; -schema.TypeRegistry.for(n0).registerError(TypeNotFoundException, TypeNotFoundException$1); -var TypeSummary = [ - 3, - n0, - _TSyp, - 0, - [_T, _TN, _DVI, _TA, _LU, _D, _PI, _OTN, _PVN, _LPV, _PIu, _PN, _IA], - [0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2], -]; -var TypeVersionSummary = [ - 3, - n0, - _TVSy, - 0, - [_T, _TN, _VI, _IDV, _A, _TCi, _D, _PVN], - [0, 0, 0, 2, 0, 4, 0, 0], -]; -var UpdateGeneratedTemplateInput = [ - 3, - n0, - _UGTI, - 0, - [_GTN, _NGTN, _AR, _RRem, _RAR, _TCe], - [0, 0, () => ResourceDefinitions, 64 | 0, 2, () => TemplateConfiguration], -]; -var UpdateGeneratedTemplateOutput = [3, n0, _UGTO, 0, [_GTI], [0]]; -var UpdateStackInput = [ - 3, - n0, - _USI, - 0, - [_SN, _TB, _TURL, _UPT, _SPDUB, _SPDUURL, _P, _Ca, _RTe, _RARN, _RCo, _SPB, _SPURL, _NARN, _Ta, _DR, _CRT, _REOC], - [ - 0, - 0, - 0, - 2, - 0, - 0, - () => _Parameters, - 64 | 0, - 64 | 0, - 0, - () => RollbackConfiguration, - 0, - 0, - 64 | 0, - () => Tags, - 2, - 0, - 2, - ], -]; -var UpdateStackInstancesInput = [ - 3, - n0, - _USII, - 0, - [_SSN, _Ac, _DT, _Re, _PO, _OP, _OI, _CA], - [0, 64 | 0, () => DeploymentTargets, 64 | 0, () => _Parameters, () => StackSetOperationPreferences, [0, 4], 0], -]; -var UpdateStackInstancesOutput = [3, n0, _USIO, 0, [_OI], [0]]; -var UpdateStackOutput = [3, n0, _USO, 0, [_SI, _OI], [0, 0]]; -var UpdateStackSetInput = [ - 3, - n0, - _USSI, - 0, - [_SSN, _D, _TB, _TURL, _UPT, _P, _Ca, _Ta, _OP, _ARARN, _ERN, _DT, _PM, _AD, _OI, _Ac, _Re, _CA, _ME], - [ - 0, - 0, - 0, - 0, - 2, - () => _Parameters, - 64 | 0, - () => Tags, - () => StackSetOperationPreferences, - 0, - 0, - () => DeploymentTargets, - 0, - () => AutoDeployment, - [0, 4], - 64 | 0, - 64 | 0, - 0, - () => ManagedExecution, - ], -]; -var UpdateStackSetOutput = [3, n0, _USSO, 0, [_OI], [0]]; -var UpdateTerminationProtectionInput = [3, n0, _UTPI, 0, [_ETP, _SN], [2, 0]]; -var UpdateTerminationProtectionOutput = [3, n0, _UTPO, 0, [_SI], [0]]; -var ValidateTemplateInput = [3, n0, _VTI, 0, [_TB, _TURL], [0, 0]]; -var ValidateTemplateOutput = [ - 3, - n0, - _VTO, - 0, - [_P, _D, _Ca, _CR, _DTe], - [() => TemplateParameters, 0, 64 | 0, 0, 64 | 0], -]; -var WarningDetail = [3, n0, _WD, 0, [_T, _Pro], [0, () => WarningProperties]]; -var WarningProperty = [3, n0, _WP, 0, [_PPr, _Req, _D], [0, 2, 0]]; -var Warnings = [3, n0, _W, 0, [_URT], [64 | 0]]; -var __Unit = "unit"; -var CloudFormationServiceException = [-3, _s, "CloudFormationServiceException", 0, [], []]; -schema.TypeRegistry.for(_s).registerError(CloudFormationServiceException, CloudFormationServiceException$1); -var AccountLimitList = [1, n0, _ALL, 0, () => AccountLimit]; -var AnnotationList = [1, n0, _ALn, 0, () => Annotation]; -var BatchDescribeTypeConfigurationsErrors = [ - 1, - n0, - _BDTCEa, - 0, - () => BatchDescribeTypeConfigurationsError, -]; -var Changes = [1, n0, _Ch, 0, () => Change]; -var ChangeSetHooks = [1, n0, _CSHh, 0, () => ChangeSetHook]; -var ChangeSetSummaries = [1, n0, _CSSh, 0, () => ChangeSetSummary]; -var Exports = [1, n0, _Exp, 0, () => Export]; -var HookResultSummaries = [1, n0, _HRSo, 0, () => HookResultSummary]; -var LastOperations = [1, n0, _LO, 0, () => OperationEntry]; -var OperationEvents = [1, n0, _OE, 0, () => OperationEvent]; -var OperationResultFilters = [1, n0, _ORFp, 0, () => OperationResultFilter]; -var Outputs = [1, n0, _Ou, 0, () => Output]; -var ParameterDeclarations = [1, n0, _PDa, 0, () => ParameterDeclaration]; -var _Parameters = [1, n0, _P, 0, () => Parameter]; -var PhysicalResourceIdContext = [1, n0, _PRIC, 0, () => PhysicalResourceIdContextKeyValuePair]; -var PropertyDifferences = [1, n0, _PDro, 0, () => PropertyDifference]; -var RelatedResources = [1, n0, _RRel, 0, () => ScannedResource]; -var RequiredActivatedTypes = [1, n0, _RAT, 0, () => RequiredActivatedType]; -var ResourceChangeDetails = [1, n0, _RCDe, 0, () => ResourceChangeDetail]; -var ResourceDefinitions = [1, n0, _RDes, 0, () => ResourceDefinition]; -var ResourceDetails = [1, n0, _RDeso, 0, () => ResourceDetail]; -var ResourceDriftIgnoredAttributes = [1, n0, _RDIA, 0, () => ResourceDriftIgnoredAttribute]; -var ResourceIdentifierSummaries = [1, n0, _RIS, 0, () => ResourceIdentifierSummary]; -var ResourceMappings = [1, n0, _RMe, 0, () => ResourceMapping]; -var ResourceScanSummaries = [1, n0, _RSS, 0, () => ResourceScanSummary]; -var ResourcesToImport = [1, n0, _RTI, 0, () => ResourceToImport]; -var RollbackTriggers = [1, n0, _RTo, 0, () => RollbackTrigger]; -var ScanFilters = [1, n0, _SF, 0, () => ScanFilter]; -var ScannedResourceIdentifiers = [1, n0, _SRIca, 0, () => ScannedResourceIdentifier]; -var ScannedResources = [1, n0, _SRca, 0, () => ScannedResource]; -var StackDefinitions = [1, n0, _SD, 0, () => StackDefinition]; -var StackEvents = [1, n0, _SE, 0, () => StackEvent]; -var StackInstanceFilters = [1, n0, _SIFt, 0, () => StackInstanceFilter]; -var StackInstanceResourceDriftsSummaries = [ - 1, - n0, - _SIRDSta, - 0, - () => StackInstanceResourceDriftsSummary, -]; -var StackInstanceSummaries = [1, n0, _SISta, 0, () => StackInstanceSummary]; -var StackRefactorActions = [1, n0, _SRA, 0, () => StackRefactorAction]; -var StackRefactorSummaries = [1, n0, _SRS, 0, () => StackRefactorSummary]; -var StackRefactorTagResources = [1, n0, _SRTR, 0, () => Tag]; -var StackResourceDrifts = [1, n0, _SRD, 0, () => StackResourceDrift]; -var StackResources = [1, n0, _SRt, 0, () => StackResource]; -var StackResourceSummaries = [1, n0, _SRSt, 0, () => StackResourceSummary]; -var Stacks = [1, n0, _St, 0, () => Stack]; -var StackSetAutoDeploymentTargetSummaries = [ - 1, - n0, - _SSADTSt, - 0, - () => StackSetAutoDeploymentTargetSummary, -]; -var StackSetOperationResultSummaries = [ - 1, - n0, - _SSORSt, - 0, - () => StackSetOperationResultSummary, -]; -var StackSetOperationSummaries = [1, n0, _SSOSt, 0, () => StackSetOperationSummary]; -var StackSetSummaries = [1, n0, _SSSt, 0, () => StackSetSummary]; -var StackSummaries = [1, n0, _SSt, 0, () => StackSummary]; -var Tags = [1, n0, _Ta, 0, () => Tag]; -var TemplateParameters = [1, n0, _TPem, 0, () => TemplateParameter]; -var TemplateSummaries = [1, n0, _TSem, 0, () => TemplateSummary]; -var TypeConfigurationDetailsList = [1, n0, _TCDL, 0, () => TypeConfigurationDetails]; -var TypeConfigurationIdentifiers = [1, n0, _TCIy, 0, () => TypeConfigurationIdentifier]; -var TypeSummaries = [1, n0, _TSy, 0, () => TypeSummary]; -var TypeVersionSummaries = [1, n0, _TVS, 0, () => TypeVersionSummary]; -var UnprocessedTypeConfigurations = [1, n0, _UTC, 0, () => TypeConfigurationIdentifier]; -var WarningDetails = [1, n0, _WDa, 0, () => WarningDetail]; -var WarningProperties = [1, n0, _WPa, 0, () => WarningProperty]; -var ActivateOrganizationsAccess = [ - 9, - n0, - _AOA, - 0, - () => ActivateOrganizationsAccessInput, - () => ActivateOrganizationsAccessOutput, -]; -var ActivateType = [9, n0, _AT, 2, () => ActivateTypeInput, () => ActivateTypeOutput]; -var BatchDescribeTypeConfigurations = [ - 9, - n0, - _BDTC, - 0, - () => BatchDescribeTypeConfigurationsInput, - () => BatchDescribeTypeConfigurationsOutput, -]; -var CancelUpdateStack = [9, n0, _CUS, 0, () => CancelUpdateStackInput, () => __Unit]; -var ContinueUpdateRollback = [ - 9, - n0, - _CUR, - 0, - () => ContinueUpdateRollbackInput, - () => ContinueUpdateRollbackOutput, -]; -var CreateChangeSet = [ - 9, - n0, - _CCS, - 0, - () => CreateChangeSetInput, - () => CreateChangeSetOutput, -]; -var CreateGeneratedTemplate = [ - 9, - n0, - _CGT, - 0, - () => CreateGeneratedTemplateInput, - () => CreateGeneratedTemplateOutput, -]; -var CreateStack = [9, n0, _CSr, 0, () => CreateStackInput, () => CreateStackOutput]; -var CreateStackInstances = [ - 9, - n0, - _CSIre, - 0, - () => CreateStackInstancesInput, - () => CreateStackInstancesOutput, -]; -var CreateStackRefactor = [ - 9, - n0, - _CSR, - 0, - () => CreateStackRefactorInput, - () => CreateStackRefactorOutput, -]; -var CreateStackSet = [ - 9, - n0, - _CSSr, - 0, - () => CreateStackSetInput, - () => CreateStackSetOutput, -]; -var DeactivateOrganizationsAccess = [ - 9, - n0, - _DOA, - 0, - () => DeactivateOrganizationsAccessInput, - () => DeactivateOrganizationsAccessOutput, -]; -var DeactivateType = [ - 9, - n0, - _DTea, - 2, - () => DeactivateTypeInput, - () => DeactivateTypeOutput, -]; -var DeleteChangeSet = [ - 9, - n0, - _DCS, - 0, - () => DeleteChangeSetInput, - () => DeleteChangeSetOutput, -]; -var DeleteGeneratedTemplate = [ - 9, - n0, - _DGT, - 0, - () => DeleteGeneratedTemplateInput, - () => __Unit, -]; -var DeleteStack = [9, n0, _DSel, 0, () => DeleteStackInput, () => __Unit]; -var DeleteStackInstances = [ - 9, - n0, - _DSIel, - 0, - () => DeleteStackInstancesInput, - () => DeleteStackInstancesOutput, -]; -var DeleteStackSet = [ - 9, - n0, - _DSS, - 0, - () => DeleteStackSetInput, - () => DeleteStackSetOutput, -]; -var DeregisterType = [ - 9, - n0, - _DTer, - 2, - () => DeregisterTypeInput, - () => DeregisterTypeOutput, -]; -var DescribeAccountLimits = [ - 9, - n0, - _DAL, - 0, - () => DescribeAccountLimitsInput, - () => DescribeAccountLimitsOutput, -]; -var DescribeChangeSet = [ - 9, - n0, - _DCSe, - 0, - () => DescribeChangeSetInput, - () => DescribeChangeSetOutput, -]; -var DescribeChangeSetHooks = [ - 9, - n0, - _DCSH, - 0, - () => DescribeChangeSetHooksInput, - () => DescribeChangeSetHooksOutput, -]; -var DescribeEvents = [ - 9, - n0, - _DE, - 0, - () => DescribeEventsInput, - () => DescribeEventsOutput, -]; -var DescribeGeneratedTemplate = [ - 9, - n0, - _DGTe, - 0, - () => DescribeGeneratedTemplateInput, - () => DescribeGeneratedTemplateOutput, -]; -var DescribeOrganizationsAccess = [ - 9, - n0, - _DOAe, - 0, - () => DescribeOrganizationsAccessInput, - () => DescribeOrganizationsAccessOutput, -]; -var DescribePublisher = [ - 9, - n0, - _DPe, - 2, - () => DescribePublisherInput, - () => DescribePublisherOutput, -]; -var DescribeResourceScan = [ - 9, - n0, - _DRS, - 0, - () => DescribeResourceScanInput, - () => DescribeResourceScanOutput, -]; -var DescribeStackDriftDetectionStatus = [ - 9, - n0, - _DSDDS, - 0, - () => DescribeStackDriftDetectionStatusInput, - () => DescribeStackDriftDetectionStatusOutput, -]; -var DescribeStackEvents = [ - 9, - n0, - _DSE, - 0, - () => DescribeStackEventsInput, - () => DescribeStackEventsOutput, -]; -var DescribeStackInstance = [ - 9, - n0, - _DSIes, - 0, - () => DescribeStackInstanceInput, - () => DescribeStackInstanceOutput, -]; -var DescribeStackRefactor = [ - 9, - n0, - _DSRe, - 0, - () => DescribeStackRefactorInput, - () => DescribeStackRefactorOutput, -]; -var DescribeStackResource = [ - 9, - n0, - _DSRes, - 0, - () => DescribeStackResourceInput, - () => DescribeStackResourceOutput, -]; -var DescribeStackResourceDrifts = [ - 9, - n0, - _DSRD, - 0, - () => DescribeStackResourceDriftsInput, - () => DescribeStackResourceDriftsOutput, -]; -var DescribeStackResources = [ - 9, - n0, - _DSResc, - 0, - () => DescribeStackResourcesInput, - () => DescribeStackResourcesOutput, -]; -var DescribeStacks = [ - 9, - n0, - _DSes, - 0, - () => DescribeStacksInput, - () => DescribeStacksOutput, -]; -var DescribeStackSet = [ - 9, - n0, - _DSSe, - 0, - () => DescribeStackSetInput, - () => DescribeStackSetOutput, -]; -var DescribeStackSetOperation = [ - 9, - n0, - _DSSOes, - 0, - () => DescribeStackSetOperationInput, - () => DescribeStackSetOperationOutput, -]; -var DescribeType = [9, n0, _DTes, 2, () => DescribeTypeInput, () => DescribeTypeOutput]; -var DescribeTypeRegistration = [ - 9, - n0, - _DTR, - 2, - () => DescribeTypeRegistrationInput, - () => DescribeTypeRegistrationOutput, -]; -var DetectStackDrift = [ - 9, - n0, - _DSD, - 0, - () => DetectStackDriftInput, - () => DetectStackDriftOutput, -]; -var DetectStackResourceDrift = [ - 9, - n0, - _DSRDe, - 0, - () => DetectStackResourceDriftInput, - () => DetectStackResourceDriftOutput, -]; -var DetectStackSetDrift = [ - 9, - n0, - _DSSD, - 0, - () => DetectStackSetDriftInput, - () => DetectStackSetDriftOutput, -]; -var EstimateTemplateCost = [ - 9, - n0, - _ETC, - 0, - () => EstimateTemplateCostInput, - () => EstimateTemplateCostOutput, -]; -var ExecuteChangeSet = [ - 9, - n0, - _ECS, - 0, - () => ExecuteChangeSetInput, - () => ExecuteChangeSetOutput, -]; -var ExecuteStackRefactor = [ - 9, - n0, - _ESRx, - 0, - () => ExecuteStackRefactorInput, - () => __Unit, -]; -var GetGeneratedTemplate = [ - 9, - n0, - _GGT, - 0, - () => GetGeneratedTemplateInput, - () => GetGeneratedTemplateOutput, -]; -var GetHookResult = [9, n0, _GHR, 0, () => GetHookResultInput, () => GetHookResultOutput]; -var GetStackPolicy = [ - 9, - n0, - _GSP, - 0, - () => GetStackPolicyInput, - () => GetStackPolicyOutput, -]; -var GetTemplate = [9, n0, _GT, 0, () => GetTemplateInput, () => GetTemplateOutput]; -var GetTemplateSummary = [ - 9, - n0, - _GTS, - 0, - () => GetTemplateSummaryInput, - () => GetTemplateSummaryOutput, -]; -var ImportStacksToStackSet = [ - 9, - n0, - _ISTSS, - 0, - () => ImportStacksToStackSetInput, - () => ImportStacksToStackSetOutput, -]; -var ListChangeSets = [ - 9, - n0, - _LCS, - 0, - () => ListChangeSetsInput, - () => ListChangeSetsOutput, -]; -var ListExports = [9, n0, _LE, 0, () => ListExportsInput, () => ListExportsOutput]; -var ListGeneratedTemplates = [ - 9, - n0, - _LGT, - 0, - () => ListGeneratedTemplatesInput, - () => ListGeneratedTemplatesOutput, -]; -var ListHookResults = [ - 9, - n0, - _LHR, - 0, - () => ListHookResultsInput, - () => ListHookResultsOutput, -]; -var ListImports = [9, n0, _LI, 0, () => ListImportsInput, () => ListImportsOutput]; -var ListResourceScanRelatedResources = [ - 9, - n0, - _LRSRR, - 0, - () => ListResourceScanRelatedResourcesInput, - () => ListResourceScanRelatedResourcesOutput, -]; -var ListResourceScanResources = [ - 9, - n0, - _LRSR, - 0, - () => ListResourceScanResourcesInput, - () => ListResourceScanResourcesOutput, -]; -var ListResourceScans = [ - 9, - n0, - _LRS, - 0, - () => ListResourceScansInput, - () => ListResourceScansOutput, -]; -var ListStackInstanceResourceDrifts = [ - 9, - n0, - _LSIRD, - 0, - () => ListStackInstanceResourceDriftsInput, - () => ListStackInstanceResourceDriftsOutput, -]; -var ListStackInstances = [ - 9, - n0, - _LSIi, - 0, - () => ListStackInstancesInput, - () => ListStackInstancesOutput, -]; -var ListStackRefactorActions = [ - 9, - n0, - _LSRA, - 0, - () => ListStackRefactorActionsInput, - () => ListStackRefactorActionsOutput, -]; -var ListStackRefactors = [ - 9, - n0, - _LSR, - 0, - () => ListStackRefactorsInput, - () => ListStackRefactorsOutput, -]; -var ListStackResources = [ - 9, - n0, - _LSRi, - 0, - () => ListStackResourcesInput, - () => ListStackResourcesOutput, -]; -var ListStacks = [9, n0, _LS, 0, () => ListStacksInput, () => ListStacksOutput]; -var ListStackSetAutoDeploymentTargets = [ - 9, - n0, - _LSSADT, - 0, - () => ListStackSetAutoDeploymentTargetsInput, - () => ListStackSetAutoDeploymentTargetsOutput, -]; -var ListStackSetOperationResults = [ - 9, - n0, - _LSSOR, - 0, - () => ListStackSetOperationResultsInput, - () => ListStackSetOperationResultsOutput, -]; -var ListStackSetOperations = [ - 9, - n0, - _LSSOi, - 0, - () => ListStackSetOperationsInput, - () => ListStackSetOperationsOutput, -]; -var ListStackSets = [9, n0, _LSS, 0, () => ListStackSetsInput, () => ListStackSetsOutput]; -var ListTypeRegistrations = [ - 9, - n0, - _LTR, - 2, - () => ListTypeRegistrationsInput, - () => ListTypeRegistrationsOutput, -]; -var ListTypes = [9, n0, _LT, 2, () => ListTypesInput, () => ListTypesOutput]; -var ListTypeVersions = [ - 9, - n0, - _LTV, - 2, - () => ListTypeVersionsInput, - () => ListTypeVersionsOutput, -]; -var PublishType = [9, n0, _PTu, 2, () => PublishTypeInput, () => PublishTypeOutput]; -var RecordHandlerProgress = [ - 9, - n0, - _RHP, - 2, - () => RecordHandlerProgressInput, - () => RecordHandlerProgressOutput, -]; -var RegisterPublisher = [ - 9, - n0, - _RPeg, - 2, - () => RegisterPublisherInput, - () => RegisterPublisherOutput, -]; -var RegisterType = [9, n0, _RTegi, 2, () => RegisterTypeInput, () => RegisterTypeOutput]; -var RollbackStack = [9, n0, _RSo, 0, () => RollbackStackInput, () => RollbackStackOutput]; -var SetStackPolicy = [9, n0, _SSP, 0, () => SetStackPolicyInput, () => __Unit]; -var SetTypeConfiguration = [ - 9, - n0, - _STC, - 0, - () => SetTypeConfigurationInput, - () => SetTypeConfigurationOutput, -]; -var SetTypeDefaultVersion = [ - 9, - n0, - _STDV, - 2, - () => SetTypeDefaultVersionInput, - () => SetTypeDefaultVersionOutput, -]; -var SignalResource = [9, n0, _SRi, 0, () => SignalResourceInput, () => __Unit]; -var StartResourceScan = [ - 9, - n0, - _SRStar, - 0, - () => StartResourceScanInput, - () => StartResourceScanOutput, -]; -var StopStackSetOperation = [ - 9, - n0, - _SSSO, - 0, - () => StopStackSetOperationInput, - () => StopStackSetOperationOutput, -]; -var TestType = [9, n0, _TTe, 2, () => TestTypeInput, () => TestTypeOutput]; -var UpdateGeneratedTemplate = [ - 9, - n0, - _UGT, - 0, - () => UpdateGeneratedTemplateInput, - () => UpdateGeneratedTemplateOutput, -]; -var UpdateStack = [9, n0, _US, 0, () => UpdateStackInput, () => UpdateStackOutput]; -var UpdateStackInstances = [ - 9, - n0, - _USIp, - 0, - () => UpdateStackInstancesInput, - () => UpdateStackInstancesOutput, -]; -var UpdateStackSet = [ - 9, - n0, - _USS, - 0, - () => UpdateStackSetInput, - () => UpdateStackSetOutput, -]; -var UpdateTerminationProtection = [ - 9, - n0, - _UTP, - 0, - () => UpdateTerminationProtectionInput, - () => UpdateTerminationProtectionOutput, -]; -var ValidateTemplate = [ - 9, - n0, - _VT, - 0, - () => ValidateTemplateInput, - () => ValidateTemplateOutput, -]; - -class ActivateOrganizationsAccessCommand extends smithyClient.Command - .classBuilder() - .ep(commonParams) - .m(function (Command, cs, config, o) { - return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; -}) - .s("CloudFormation", "ActivateOrganizationsAccess", {}) - .n("CloudFormationClient", "ActivateOrganizationsAccessCommand") - .sc(ActivateOrganizationsAccess) - .build() { -} - -class ActivateTypeCommand extends smithyClient.Command - .classBuilder() - .ep(commonParams) - .m(function (Command, cs, config, o) { - return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; -}) - .s("CloudFormation", "ActivateType", {}) - .n("CloudFormationClient", "ActivateTypeCommand") - .sc(ActivateType) - .build() { -} +class ActivateTypeCommand extends smithyClient.Command + .classBuilder() + .ep(commonParams) + .m(function (Command, cs, config, o) { + return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())]; +}) + .s("CloudFormation", "ActivateType", {}) + .n("CloudFormationClient", "ActivateTypeCommand") + .sc(schemas_0.ActivateType$) + .build() { +} class BatchDescribeTypeConfigurationsCommand extends smithyClient.Command .classBuilder() @@ -7262,7 +3694,7 @@ class BatchDescribeTypeConfigurationsCommand extends smithyClient.Command }) .s("CloudFormation", "BatchDescribeTypeConfigurations", {}) .n("CloudFormationClient", "BatchDescribeTypeConfigurationsCommand") - .sc(BatchDescribeTypeConfigurations) + .sc(schemas_0.BatchDescribeTypeConfigurations$) .build() { } @@ -7274,7 +3706,7 @@ class CancelUpdateStackCommand extends smithyClient.Command }) .s("CloudFormation", "CancelUpdateStack", {}) .n("CloudFormationClient", "CancelUpdateStackCommand") - .sc(CancelUpdateStack) + .sc(schemas_0.CancelUpdateStack$) .build() { } @@ -7286,7 +3718,7 @@ class ContinueUpdateRollbackCommand extends smithyClient.Command }) .s("CloudFormation", "ContinueUpdateRollback", {}) .n("CloudFormationClient", "ContinueUpdateRollbackCommand") - .sc(ContinueUpdateRollback) + .sc(schemas_0.ContinueUpdateRollback$) .build() { } @@ -7298,7 +3730,7 @@ class CreateChangeSetCommand extends smithyClient.Command }) .s("CloudFormation", "CreateChangeSet", {}) .n("CloudFormationClient", "CreateChangeSetCommand") - .sc(CreateChangeSet) + .sc(schemas_0.CreateChangeSet$) .build() { } @@ -7310,7 +3742,7 @@ class CreateGeneratedTemplateCommand extends smithyClient.Command }) .s("CloudFormation", "CreateGeneratedTemplate", {}) .n("CloudFormationClient", "CreateGeneratedTemplateCommand") - .sc(CreateGeneratedTemplate) + .sc(schemas_0.CreateGeneratedTemplate$) .build() { } @@ -7322,7 +3754,7 @@ class CreateStackCommand extends smithyClient.Command }) .s("CloudFormation", "CreateStack", {}) .n("CloudFormationClient", "CreateStackCommand") - .sc(CreateStack) + .sc(schemas_0.CreateStack$) .build() { } @@ -7334,7 +3766,7 @@ class CreateStackInstancesCommand extends smithyClient.Command }) .s("CloudFormation", "CreateStackInstances", {}) .n("CloudFormationClient", "CreateStackInstancesCommand") - .sc(CreateStackInstances) + .sc(schemas_0.CreateStackInstances$) .build() { } @@ -7346,7 +3778,7 @@ class CreateStackRefactorCommand extends smithyClient.Command }) .s("CloudFormation", "CreateStackRefactor", {}) .n("CloudFormationClient", "CreateStackRefactorCommand") - .sc(CreateStackRefactor) + .sc(schemas_0.CreateStackRefactor$) .build() { } @@ -7358,7 +3790,7 @@ class CreateStackSetCommand extends smithyClient.Command }) .s("CloudFormation", "CreateStackSet", {}) .n("CloudFormationClient", "CreateStackSetCommand") - .sc(CreateStackSet) + .sc(schemas_0.CreateStackSet$) .build() { } @@ -7370,7 +3802,7 @@ class DeactivateOrganizationsAccessCommand extends smithyClient.Command }) .s("CloudFormation", "DeactivateOrganizationsAccess", {}) .n("CloudFormationClient", "DeactivateOrganizationsAccessCommand") - .sc(DeactivateOrganizationsAccess) + .sc(schemas_0.DeactivateOrganizationsAccess$) .build() { } @@ -7382,7 +3814,7 @@ class DeactivateTypeCommand extends smithyClient.Command }) .s("CloudFormation", "DeactivateType", {}) .n("CloudFormationClient", "DeactivateTypeCommand") - .sc(DeactivateType) + .sc(schemas_0.DeactivateType$) .build() { } @@ -7394,7 +3826,7 @@ class DeleteChangeSetCommand extends smithyClient.Command }) .s("CloudFormation", "DeleteChangeSet", {}) .n("CloudFormationClient", "DeleteChangeSetCommand") - .sc(DeleteChangeSet) + .sc(schemas_0.DeleteChangeSet$) .build() { } @@ -7406,7 +3838,7 @@ class DeleteGeneratedTemplateCommand extends smithyClient.Command }) .s("CloudFormation", "DeleteGeneratedTemplate", {}) .n("CloudFormationClient", "DeleteGeneratedTemplateCommand") - .sc(DeleteGeneratedTemplate) + .sc(schemas_0.DeleteGeneratedTemplate$) .build() { } @@ -7418,7 +3850,7 @@ class DeleteStackCommand extends smithyClient.Command }) .s("CloudFormation", "DeleteStack", {}) .n("CloudFormationClient", "DeleteStackCommand") - .sc(DeleteStack) + .sc(schemas_0.DeleteStack$) .build() { } @@ -7430,7 +3862,7 @@ class DeleteStackInstancesCommand extends smithyClient.Command }) .s("CloudFormation", "DeleteStackInstances", {}) .n("CloudFormationClient", "DeleteStackInstancesCommand") - .sc(DeleteStackInstances) + .sc(schemas_0.DeleteStackInstances$) .build() { } @@ -7442,7 +3874,7 @@ class DeleteStackSetCommand extends smithyClient.Command }) .s("CloudFormation", "DeleteStackSet", {}) .n("CloudFormationClient", "DeleteStackSetCommand") - .sc(DeleteStackSet) + .sc(schemas_0.DeleteStackSet$) .build() { } @@ -7454,7 +3886,7 @@ class DeregisterTypeCommand extends smithyClient.Command }) .s("CloudFormation", "DeregisterType", {}) .n("CloudFormationClient", "DeregisterTypeCommand") - .sc(DeregisterType) + .sc(schemas_0.DeregisterType$) .build() { } @@ -7466,7 +3898,7 @@ class DescribeAccountLimitsCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeAccountLimits", {}) .n("CloudFormationClient", "DescribeAccountLimitsCommand") - .sc(DescribeAccountLimits) + .sc(schemas_0.DescribeAccountLimits$) .build() { } @@ -7478,7 +3910,7 @@ class DescribeChangeSetCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeChangeSet", {}) .n("CloudFormationClient", "DescribeChangeSetCommand") - .sc(DescribeChangeSet) + .sc(schemas_0.DescribeChangeSet$) .build() { } @@ -7490,7 +3922,7 @@ class DescribeChangeSetHooksCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeChangeSetHooks", {}) .n("CloudFormationClient", "DescribeChangeSetHooksCommand") - .sc(DescribeChangeSetHooks) + .sc(schemas_0.DescribeChangeSetHooks$) .build() { } @@ -7502,7 +3934,7 @@ class DescribeEventsCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeEvents", {}) .n("CloudFormationClient", "DescribeEventsCommand") - .sc(DescribeEvents) + .sc(schemas_0.DescribeEvents$) .build() { } @@ -7514,7 +3946,7 @@ class DescribeGeneratedTemplateCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeGeneratedTemplate", {}) .n("CloudFormationClient", "DescribeGeneratedTemplateCommand") - .sc(DescribeGeneratedTemplate) + .sc(schemas_0.DescribeGeneratedTemplate$) .build() { } @@ -7526,7 +3958,7 @@ class DescribeOrganizationsAccessCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeOrganizationsAccess", {}) .n("CloudFormationClient", "DescribeOrganizationsAccessCommand") - .sc(DescribeOrganizationsAccess) + .sc(schemas_0.DescribeOrganizationsAccess$) .build() { } @@ -7538,7 +3970,7 @@ class DescribePublisherCommand extends smithyClient.Command }) .s("CloudFormation", "DescribePublisher", {}) .n("CloudFormationClient", "DescribePublisherCommand") - .sc(DescribePublisher) + .sc(schemas_0.DescribePublisher$) .build() { } @@ -7550,7 +3982,7 @@ class DescribeResourceScanCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeResourceScan", {}) .n("CloudFormationClient", "DescribeResourceScanCommand") - .sc(DescribeResourceScan) + .sc(schemas_0.DescribeResourceScan$) .build() { } @@ -7562,7 +3994,7 @@ class DescribeStackDriftDetectionStatusCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackDriftDetectionStatus", {}) .n("CloudFormationClient", "DescribeStackDriftDetectionStatusCommand") - .sc(DescribeStackDriftDetectionStatus) + .sc(schemas_0.DescribeStackDriftDetectionStatus$) .build() { } @@ -7574,7 +4006,7 @@ class DescribeStackEventsCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackEvents", {}) .n("CloudFormationClient", "DescribeStackEventsCommand") - .sc(DescribeStackEvents) + .sc(schemas_0.DescribeStackEvents$) .build() { } @@ -7586,7 +4018,7 @@ class DescribeStackInstanceCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackInstance", {}) .n("CloudFormationClient", "DescribeStackInstanceCommand") - .sc(DescribeStackInstance) + .sc(schemas_0.DescribeStackInstance$) .build() { } @@ -7598,7 +4030,7 @@ class DescribeStackRefactorCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackRefactor", {}) .n("CloudFormationClient", "DescribeStackRefactorCommand") - .sc(DescribeStackRefactor) + .sc(schemas_0.DescribeStackRefactor$) .build() { } @@ -7610,7 +4042,7 @@ class DescribeStackResourceCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackResource", {}) .n("CloudFormationClient", "DescribeStackResourceCommand") - .sc(DescribeStackResource) + .sc(schemas_0.DescribeStackResource$) .build() { } @@ -7622,7 +4054,7 @@ class DescribeStackResourceDriftsCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackResourceDrifts", {}) .n("CloudFormationClient", "DescribeStackResourceDriftsCommand") - .sc(DescribeStackResourceDrifts) + .sc(schemas_0.DescribeStackResourceDrifts$) .build() { } @@ -7634,7 +4066,7 @@ class DescribeStackResourcesCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackResources", {}) .n("CloudFormationClient", "DescribeStackResourcesCommand") - .sc(DescribeStackResources) + .sc(schemas_0.DescribeStackResources$) .build() { } @@ -7646,7 +4078,7 @@ class DescribeStacksCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStacks", {}) .n("CloudFormationClient", "DescribeStacksCommand") - .sc(DescribeStacks) + .sc(schemas_0.DescribeStacks$) .build() { } @@ -7658,7 +4090,7 @@ class DescribeStackSetCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackSet", {}) .n("CloudFormationClient", "DescribeStackSetCommand") - .sc(DescribeStackSet) + .sc(schemas_0.DescribeStackSet$) .build() { } @@ -7670,7 +4102,7 @@ class DescribeStackSetOperationCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeStackSetOperation", {}) .n("CloudFormationClient", "DescribeStackSetOperationCommand") - .sc(DescribeStackSetOperation) + .sc(schemas_0.DescribeStackSetOperation$) .build() { } @@ -7682,7 +4114,7 @@ class DescribeTypeCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeType", {}) .n("CloudFormationClient", "DescribeTypeCommand") - .sc(DescribeType) + .sc(schemas_0.DescribeType$) .build() { } @@ -7694,7 +4126,7 @@ class DescribeTypeRegistrationCommand extends smithyClient.Command }) .s("CloudFormation", "DescribeTypeRegistration", {}) .n("CloudFormationClient", "DescribeTypeRegistrationCommand") - .sc(DescribeTypeRegistration) + .sc(schemas_0.DescribeTypeRegistration$) .build() { } @@ -7706,7 +4138,7 @@ class DetectStackDriftCommand extends smithyClient.Command }) .s("CloudFormation", "DetectStackDrift", {}) .n("CloudFormationClient", "DetectStackDriftCommand") - .sc(DetectStackDrift) + .sc(schemas_0.DetectStackDrift$) .build() { } @@ -7718,7 +4150,7 @@ class DetectStackResourceDriftCommand extends smithyClient.Command }) .s("CloudFormation", "DetectStackResourceDrift", {}) .n("CloudFormationClient", "DetectStackResourceDriftCommand") - .sc(DetectStackResourceDrift) + .sc(schemas_0.DetectStackResourceDrift$) .build() { } @@ -7730,7 +4162,7 @@ class DetectStackSetDriftCommand extends smithyClient.Command }) .s("CloudFormation", "DetectStackSetDrift", {}) .n("CloudFormationClient", "DetectStackSetDriftCommand") - .sc(DetectStackSetDrift) + .sc(schemas_0.DetectStackSetDrift$) .build() { } @@ -7742,7 +4174,7 @@ class EstimateTemplateCostCommand extends smithyClient.Command }) .s("CloudFormation", "EstimateTemplateCost", {}) .n("CloudFormationClient", "EstimateTemplateCostCommand") - .sc(EstimateTemplateCost) + .sc(schemas_0.EstimateTemplateCost$) .build() { } @@ -7754,7 +4186,7 @@ class ExecuteChangeSetCommand extends smithyClient.Command }) .s("CloudFormation", "ExecuteChangeSet", {}) .n("CloudFormationClient", "ExecuteChangeSetCommand") - .sc(ExecuteChangeSet) + .sc(schemas_0.ExecuteChangeSet$) .build() { } @@ -7766,7 +4198,7 @@ class ExecuteStackRefactorCommand extends smithyClient.Command }) .s("CloudFormation", "ExecuteStackRefactor", {}) .n("CloudFormationClient", "ExecuteStackRefactorCommand") - .sc(ExecuteStackRefactor) + .sc(schemas_0.ExecuteStackRefactor$) .build() { } @@ -7778,7 +4210,7 @@ class GetGeneratedTemplateCommand extends smithyClient.Command }) .s("CloudFormation", "GetGeneratedTemplate", {}) .n("CloudFormationClient", "GetGeneratedTemplateCommand") - .sc(GetGeneratedTemplate) + .sc(schemas_0.GetGeneratedTemplate$) .build() { } @@ -7790,7 +4222,7 @@ class GetHookResultCommand extends smithyClient.Command }) .s("CloudFormation", "GetHookResult", {}) .n("CloudFormationClient", "GetHookResultCommand") - .sc(GetHookResult) + .sc(schemas_0.GetHookResult$) .build() { } @@ -7802,7 +4234,7 @@ class GetStackPolicyCommand extends smithyClient.Command }) .s("CloudFormation", "GetStackPolicy", {}) .n("CloudFormationClient", "GetStackPolicyCommand") - .sc(GetStackPolicy) + .sc(schemas_0.GetStackPolicy$) .build() { } @@ -7814,7 +4246,7 @@ class GetTemplateCommand extends smithyClient.Command }) .s("CloudFormation", "GetTemplate", {}) .n("CloudFormationClient", "GetTemplateCommand") - .sc(GetTemplate) + .sc(schemas_0.GetTemplate$) .build() { } @@ -7826,7 +4258,7 @@ class GetTemplateSummaryCommand extends smithyClient.Command }) .s("CloudFormation", "GetTemplateSummary", {}) .n("CloudFormationClient", "GetTemplateSummaryCommand") - .sc(GetTemplateSummary) + .sc(schemas_0.GetTemplateSummary$) .build() { } @@ -7838,7 +4270,7 @@ class ImportStacksToStackSetCommand extends smithyClient.Command }) .s("CloudFormation", "ImportStacksToStackSet", {}) .n("CloudFormationClient", "ImportStacksToStackSetCommand") - .sc(ImportStacksToStackSet) + .sc(schemas_0.ImportStacksToStackSet$) .build() { } @@ -7850,7 +4282,7 @@ class ListChangeSetsCommand extends smithyClient.Command }) .s("CloudFormation", "ListChangeSets", {}) .n("CloudFormationClient", "ListChangeSetsCommand") - .sc(ListChangeSets) + .sc(schemas_0.ListChangeSets$) .build() { } @@ -7862,7 +4294,7 @@ class ListExportsCommand extends smithyClient.Command }) .s("CloudFormation", "ListExports", {}) .n("CloudFormationClient", "ListExportsCommand") - .sc(ListExports) + .sc(schemas_0.ListExports$) .build() { } @@ -7874,7 +4306,7 @@ class ListGeneratedTemplatesCommand extends smithyClient.Command }) .s("CloudFormation", "ListGeneratedTemplates", {}) .n("CloudFormationClient", "ListGeneratedTemplatesCommand") - .sc(ListGeneratedTemplates) + .sc(schemas_0.ListGeneratedTemplates$) .build() { } @@ -7886,7 +4318,7 @@ class ListHookResultsCommand extends smithyClient.Command }) .s("CloudFormation", "ListHookResults", {}) .n("CloudFormationClient", "ListHookResultsCommand") - .sc(ListHookResults) + .sc(schemas_0.ListHookResults$) .build() { } @@ -7898,7 +4330,7 @@ class ListImportsCommand extends smithyClient.Command }) .s("CloudFormation", "ListImports", {}) .n("CloudFormationClient", "ListImportsCommand") - .sc(ListImports) + .sc(schemas_0.ListImports$) .build() { } @@ -7910,7 +4342,7 @@ class ListResourceScanRelatedResourcesCommand extends smithyClient.Command }) .s("CloudFormation", "ListResourceScanRelatedResources", {}) .n("CloudFormationClient", "ListResourceScanRelatedResourcesCommand") - .sc(ListResourceScanRelatedResources) + .sc(schemas_0.ListResourceScanRelatedResources$) .build() { } @@ -7922,7 +4354,7 @@ class ListResourceScanResourcesCommand extends smithyClient.Command }) .s("CloudFormation", "ListResourceScanResources", {}) .n("CloudFormationClient", "ListResourceScanResourcesCommand") - .sc(ListResourceScanResources) + .sc(schemas_0.ListResourceScanResources$) .build() { } @@ -7934,7 +4366,7 @@ class ListResourceScansCommand extends smithyClient.Command }) .s("CloudFormation", "ListResourceScans", {}) .n("CloudFormationClient", "ListResourceScansCommand") - .sc(ListResourceScans) + .sc(schemas_0.ListResourceScans$) .build() { } @@ -7946,7 +4378,7 @@ class ListStackInstanceResourceDriftsCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackInstanceResourceDrifts", {}) .n("CloudFormationClient", "ListStackInstanceResourceDriftsCommand") - .sc(ListStackInstanceResourceDrifts) + .sc(schemas_0.ListStackInstanceResourceDrifts$) .build() { } @@ -7958,7 +4390,7 @@ class ListStackInstancesCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackInstances", {}) .n("CloudFormationClient", "ListStackInstancesCommand") - .sc(ListStackInstances) + .sc(schemas_0.ListStackInstances$) .build() { } @@ -7970,7 +4402,7 @@ class ListStackRefactorActionsCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackRefactorActions", {}) .n("CloudFormationClient", "ListStackRefactorActionsCommand") - .sc(ListStackRefactorActions) + .sc(schemas_0.ListStackRefactorActions$) .build() { } @@ -7982,7 +4414,7 @@ class ListStackRefactorsCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackRefactors", {}) .n("CloudFormationClient", "ListStackRefactorsCommand") - .sc(ListStackRefactors) + .sc(schemas_0.ListStackRefactors$) .build() { } @@ -7994,7 +4426,7 @@ class ListStackResourcesCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackResources", {}) .n("CloudFormationClient", "ListStackResourcesCommand") - .sc(ListStackResources) + .sc(schemas_0.ListStackResources$) .build() { } @@ -8006,7 +4438,7 @@ class ListStacksCommand extends smithyClient.Command }) .s("CloudFormation", "ListStacks", {}) .n("CloudFormationClient", "ListStacksCommand") - .sc(ListStacks) + .sc(schemas_0.ListStacks$) .build() { } @@ -8018,7 +4450,7 @@ class ListStackSetAutoDeploymentTargetsCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackSetAutoDeploymentTargets", {}) .n("CloudFormationClient", "ListStackSetAutoDeploymentTargetsCommand") - .sc(ListStackSetAutoDeploymentTargets) + .sc(schemas_0.ListStackSetAutoDeploymentTargets$) .build() { } @@ -8030,7 +4462,7 @@ class ListStackSetOperationResultsCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackSetOperationResults", {}) .n("CloudFormationClient", "ListStackSetOperationResultsCommand") - .sc(ListStackSetOperationResults) + .sc(schemas_0.ListStackSetOperationResults$) .build() { } @@ -8042,7 +4474,7 @@ class ListStackSetOperationsCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackSetOperations", {}) .n("CloudFormationClient", "ListStackSetOperationsCommand") - .sc(ListStackSetOperations) + .sc(schemas_0.ListStackSetOperations$) .build() { } @@ -8054,7 +4486,7 @@ class ListStackSetsCommand extends smithyClient.Command }) .s("CloudFormation", "ListStackSets", {}) .n("CloudFormationClient", "ListStackSetsCommand") - .sc(ListStackSets) + .sc(schemas_0.ListStackSets$) .build() { } @@ -8066,7 +4498,7 @@ class ListTypeRegistrationsCommand extends smithyClient.Command }) .s("CloudFormation", "ListTypeRegistrations", {}) .n("CloudFormationClient", "ListTypeRegistrationsCommand") - .sc(ListTypeRegistrations) + .sc(schemas_0.ListTypeRegistrations$) .build() { } @@ -8078,7 +4510,7 @@ class ListTypesCommand extends smithyClient.Command }) .s("CloudFormation", "ListTypes", {}) .n("CloudFormationClient", "ListTypesCommand") - .sc(ListTypes) + .sc(schemas_0.ListTypes$) .build() { } @@ -8090,7 +4522,7 @@ class ListTypeVersionsCommand extends smithyClient.Command }) .s("CloudFormation", "ListTypeVersions", {}) .n("CloudFormationClient", "ListTypeVersionsCommand") - .sc(ListTypeVersions) + .sc(schemas_0.ListTypeVersions$) .build() { } @@ -8102,7 +4534,7 @@ class PublishTypeCommand extends smithyClient.Command }) .s("CloudFormation", "PublishType", {}) .n("CloudFormationClient", "PublishTypeCommand") - .sc(PublishType) + .sc(schemas_0.PublishType$) .build() { } @@ -8114,7 +4546,7 @@ class RecordHandlerProgressCommand extends smithyClient.Command }) .s("CloudFormation", "RecordHandlerProgress", {}) .n("CloudFormationClient", "RecordHandlerProgressCommand") - .sc(RecordHandlerProgress) + .sc(schemas_0.RecordHandlerProgress$) .build() { } @@ -8126,7 +4558,7 @@ class RegisterPublisherCommand extends smithyClient.Command }) .s("CloudFormation", "RegisterPublisher", {}) .n("CloudFormationClient", "RegisterPublisherCommand") - .sc(RegisterPublisher) + .sc(schemas_0.RegisterPublisher$) .build() { } @@ -8138,7 +4570,7 @@ class RegisterTypeCommand extends smithyClient.Command }) .s("CloudFormation", "RegisterType", {}) .n("CloudFormationClient", "RegisterTypeCommand") - .sc(RegisterType) + .sc(schemas_0.RegisterType$) .build() { } @@ -8150,7 +4582,7 @@ class RollbackStackCommand extends smithyClient.Command }) .s("CloudFormation", "RollbackStack", {}) .n("CloudFormationClient", "RollbackStackCommand") - .sc(RollbackStack) + .sc(schemas_0.RollbackStack$) .build() { } @@ -8162,7 +4594,7 @@ class SetStackPolicyCommand extends smithyClient.Command }) .s("CloudFormation", "SetStackPolicy", {}) .n("CloudFormationClient", "SetStackPolicyCommand") - .sc(SetStackPolicy) + .sc(schemas_0.SetStackPolicy$) .build() { } @@ -8174,7 +4606,7 @@ class SetTypeConfigurationCommand extends smithyClient.Command }) .s("CloudFormation", "SetTypeConfiguration", {}) .n("CloudFormationClient", "SetTypeConfigurationCommand") - .sc(SetTypeConfiguration) + .sc(schemas_0.SetTypeConfiguration$) .build() { } @@ -8186,7 +4618,7 @@ class SetTypeDefaultVersionCommand extends smithyClient.Command }) .s("CloudFormation", "SetTypeDefaultVersion", {}) .n("CloudFormationClient", "SetTypeDefaultVersionCommand") - .sc(SetTypeDefaultVersion) + .sc(schemas_0.SetTypeDefaultVersion$) .build() { } @@ -8198,7 +4630,7 @@ class SignalResourceCommand extends smithyClient.Command }) .s("CloudFormation", "SignalResource", {}) .n("CloudFormationClient", "SignalResourceCommand") - .sc(SignalResource) + .sc(schemas_0.SignalResource$) .build() { } @@ -8210,7 +4642,7 @@ class StartResourceScanCommand extends smithyClient.Command }) .s("CloudFormation", "StartResourceScan", {}) .n("CloudFormationClient", "StartResourceScanCommand") - .sc(StartResourceScan) + .sc(schemas_0.StartResourceScan$) .build() { } @@ -8222,7 +4654,7 @@ class StopStackSetOperationCommand extends smithyClient.Command }) .s("CloudFormation", "StopStackSetOperation", {}) .n("CloudFormationClient", "StopStackSetOperationCommand") - .sc(StopStackSetOperation) + .sc(schemas_0.StopStackSetOperation$) .build() { } @@ -8234,7 +4666,7 @@ class TestTypeCommand extends smithyClient.Command }) .s("CloudFormation", "TestType", {}) .n("CloudFormationClient", "TestTypeCommand") - .sc(TestType) + .sc(schemas_0.TestType$) .build() { } @@ -8246,7 +4678,7 @@ class UpdateGeneratedTemplateCommand extends smithyClient.Command }) .s("CloudFormation", "UpdateGeneratedTemplate", {}) .n("CloudFormationClient", "UpdateGeneratedTemplateCommand") - .sc(UpdateGeneratedTemplate) + .sc(schemas_0.UpdateGeneratedTemplate$) .build() { } @@ -8258,7 +4690,7 @@ class UpdateStackCommand extends smithyClient.Command }) .s("CloudFormation", "UpdateStack", {}) .n("CloudFormationClient", "UpdateStackCommand") - .sc(UpdateStack) + .sc(schemas_0.UpdateStack$) .build() { } @@ -8270,7 +4702,7 @@ class UpdateStackInstancesCommand extends smithyClient.Command }) .s("CloudFormation", "UpdateStackInstances", {}) .n("CloudFormationClient", "UpdateStackInstancesCommand") - .sc(UpdateStackInstances) + .sc(schemas_0.UpdateStackInstances$) .build() { } @@ -8282,7 +4714,7 @@ class UpdateStackSetCommand extends smithyClient.Command }) .s("CloudFormation", "UpdateStackSet", {}) .n("CloudFormationClient", "UpdateStackSetCommand") - .sc(UpdateStackSet) + .sc(schemas_0.UpdateStackSet$) .build() { } @@ -8294,7 +4726,7 @@ class UpdateTerminationProtectionCommand extends smithyClient.Command }) .s("CloudFormation", "UpdateTerminationProtection", {}) .n("CloudFormationClient", "UpdateTerminationProtectionCommand") - .sc(UpdateTerminationProtection) + .sc(schemas_0.UpdateTerminationProtection$) .build() { } @@ -8306,106 +4738,10 @@ class ValidateTemplateCommand extends smithyClient.Command }) .s("CloudFormation", "ValidateTemplate", {}) .n("CloudFormationClient", "ValidateTemplateCommand") - .sc(ValidateTemplate) + .sc(schemas_0.ValidateTemplate$) .build() { } -const commands = { - ActivateOrganizationsAccessCommand, - ActivateTypeCommand, - BatchDescribeTypeConfigurationsCommand, - CancelUpdateStackCommand, - ContinueUpdateRollbackCommand, - CreateChangeSetCommand, - CreateGeneratedTemplateCommand, - CreateStackCommand, - CreateStackInstancesCommand, - CreateStackRefactorCommand, - CreateStackSetCommand, - DeactivateOrganizationsAccessCommand, - DeactivateTypeCommand, - DeleteChangeSetCommand, - DeleteGeneratedTemplateCommand, - DeleteStackCommand, - DeleteStackInstancesCommand, - DeleteStackSetCommand, - DeregisterTypeCommand, - DescribeAccountLimitsCommand, - DescribeChangeSetCommand, - DescribeChangeSetHooksCommand, - DescribeEventsCommand, - DescribeGeneratedTemplateCommand, - DescribeOrganizationsAccessCommand, - DescribePublisherCommand, - DescribeResourceScanCommand, - DescribeStackDriftDetectionStatusCommand, - DescribeStackEventsCommand, - DescribeStackInstanceCommand, - DescribeStackRefactorCommand, - DescribeStackResourceCommand, - DescribeStackResourceDriftsCommand, - DescribeStackResourcesCommand, - DescribeStacksCommand, - DescribeStackSetCommand, - DescribeStackSetOperationCommand, - DescribeTypeCommand, - DescribeTypeRegistrationCommand, - DetectStackDriftCommand, - DetectStackResourceDriftCommand, - DetectStackSetDriftCommand, - EstimateTemplateCostCommand, - ExecuteChangeSetCommand, - ExecuteStackRefactorCommand, - GetGeneratedTemplateCommand, - GetHookResultCommand, - GetStackPolicyCommand, - GetTemplateCommand, - GetTemplateSummaryCommand, - ImportStacksToStackSetCommand, - ListChangeSetsCommand, - ListExportsCommand, - ListGeneratedTemplatesCommand, - ListHookResultsCommand, - ListImportsCommand, - ListResourceScanRelatedResourcesCommand, - ListResourceScanResourcesCommand, - ListResourceScansCommand, - ListStackInstanceResourceDriftsCommand, - ListStackInstancesCommand, - ListStackRefactorActionsCommand, - ListStackRefactorsCommand, - ListStackResourcesCommand, - ListStacksCommand, - ListStackSetAutoDeploymentTargetsCommand, - ListStackSetOperationResultsCommand, - ListStackSetOperationsCommand, - ListStackSetsCommand, - ListTypeRegistrationsCommand, - ListTypesCommand, - ListTypeVersionsCommand, - PublishTypeCommand, - RecordHandlerProgressCommand, - RegisterPublisherCommand, - RegisterTypeCommand, - RollbackStackCommand, - SetStackPolicyCommand, - SetTypeConfigurationCommand, - SetTypeDefaultVersionCommand, - SignalResourceCommand, - StartResourceScanCommand, - StopStackSetOperationCommand, - TestTypeCommand, - UpdateGeneratedTemplateCommand, - UpdateStackCommand, - UpdateStackInstancesCommand, - UpdateStackSetCommand, - UpdateTerminationProtectionCommand, - ValidateTemplateCommand, -}; -class CloudFormation extends CloudFormationClient { -} -smithyClient.createAggregatedClient(commands, CloudFormation); - const paginateDescribeAccountLimits = core.createPaginator(CloudFormationClient, DescribeAccountLimitsCommand, "NextToken", "NextToken", ""); const paginateDescribeChangeSet = core.createPaginator(CloudFormationClient, DescribeChangeSetCommand, "NextToken", "NextToken", ""); @@ -8450,14 +4786,14 @@ const paginateListStacks = core.createPaginator(CloudFormationClient, ListStacks const paginateListTypeRegistrations = core.createPaginator(CloudFormationClient, ListTypeRegistrationsCommand, "NextToken", "NextToken", "MaxResults"); -const paginateListTypeVersions = core.createPaginator(CloudFormationClient, ListTypeVersionsCommand, "NextToken", "NextToken", "MaxResults"); - const paginateListTypes = core.createPaginator(CloudFormationClient, ListTypesCommand, "NextToken", "NextToken", "MaxResults"); +const paginateListTypeVersions = core.createPaginator(CloudFormationClient, ListTypeVersionsCommand, "NextToken", "NextToken", "MaxResults"); + const checkState$9 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeChangeSetCommand(input)); + let result = await client.send(new DescribeChangeSetCommand(input)); reason = result; try { const returnComparator = () => { @@ -8499,19 +4835,19 @@ const waitUntilChangeSetCreateComplete = async (params, input) => { const checkState$8 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStacksCommand(input)); + let result = await client.send(new DescribeStacksCommand(input)); reason = result; try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "CREATE_COMPLETE"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "CREATE_COMPLETE"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8520,15 +4856,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_COMPLETE"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8537,15 +4873,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_IN_PROGRESS"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_IN_PROGRESS"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8554,15 +4890,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_COMPLETE_CLEANUP_IN_PROGRESS"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8571,15 +4907,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_FAILED"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_FAILED"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8588,15 +4924,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_IN_PROGRESS"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_ROLLBACK_IN_PROGRESS"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8605,15 +4941,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_FAILED"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_ROLLBACK_FAILED"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8622,15 +4958,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_ROLLBACK_COMPLETE_CLEANUP_IN_PROGRESS"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8639,15 +4975,15 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_ROLLBACK_COMPLETE"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8656,13 +4992,13 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "CREATE_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8671,13 +5007,13 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "DELETE_COMPLETE") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8686,13 +5022,13 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "DELETE_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8701,13 +5037,13 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "ROLLBACK_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8716,13 +5052,13 @@ const checkState$8 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "ROLLBACK_COMPLETE") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8751,19 +5087,19 @@ const waitUntilStackCreateComplete = async (params, input) => { const checkState$7 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStacksCommand(input)); + let result = await client.send(new DescribeStacksCommand(input)); reason = result; try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "DELETE_COMPLETE"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "DELETE_COMPLETE"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8772,13 +5108,13 @@ const checkState$7 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "DELETE_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8787,13 +5123,13 @@ const checkState$7 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "CREATE_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8802,13 +5138,13 @@ const checkState$7 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "ROLLBACK_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8817,13 +5153,13 @@ const checkState$7 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_ROLLBACK_IN_PROGRESS") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8832,13 +5168,13 @@ const checkState$7 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8847,13 +5183,13 @@ const checkState$7 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_ROLLBACK_COMPLETE") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8862,13 +5198,13 @@ const checkState$7 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_COMPLETE") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8897,7 +5233,7 @@ const waitUntilStackDeleteComplete = async (params, input) => { const checkState$6 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStacksCommand(input)); + let result = await client.send(new DescribeStacksCommand(input)); reason = result; return { state: utilWaiter.WaiterState.SUCCESS, reason }; } @@ -8922,19 +5258,19 @@ const waitUntilStackExists = async (params, input) => { const checkState$5 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStacksCommand(input)); + let result = await client.send(new DescribeStacksCommand(input)); reason = result; try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "IMPORT_COMPLETE"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "IMPORT_COMPLETE"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -8943,13 +5279,13 @@ const checkState$5 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "ROLLBACK_COMPLETE") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8958,13 +5294,13 @@ const checkState$5 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "ROLLBACK_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8973,13 +5309,13 @@ const checkState$5 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "IMPORT_ROLLBACK_IN_PROGRESS") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -8988,13 +5324,13 @@ const checkState$5 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "IMPORT_ROLLBACK_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9003,13 +5339,13 @@ const checkState$5 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "IMPORT_ROLLBACK_COMPLETE") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9038,7 +5374,7 @@ const waitUntilStackImportComplete = async (params, input) => { const checkState$4 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStackRefactorCommand(input)); + let result = await client.send(new DescribeStackRefactorCommand(input)); reason = result; try { const returnComparator = () => { @@ -9080,7 +5416,7 @@ const waitUntilStackRefactorCreateComplete = async (params, input) => { const checkState$3 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStackRefactorCommand(input)); + let result = await client.send(new DescribeStackRefactorCommand(input)); reason = result; try { const returnComparator = () => { @@ -9131,19 +5467,19 @@ const waitUntilStackRefactorExecuteComplete = async (params, input) => { const checkState$2 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStacksCommand(input)); + let result = await client.send(new DescribeStacksCommand(input)); reason = result; try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_ROLLBACK_COMPLETE"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_ROLLBACK_COMPLETE"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -9152,13 +5488,13 @@ const checkState$2 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9167,13 +5503,13 @@ const checkState$2 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9182,13 +5518,13 @@ const checkState$2 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "DELETE_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9217,19 +5553,19 @@ const waitUntilStackRollbackComplete = async (params, input) => { const checkState$1 = async (client, input) => { let reason; try { - const result = await client.send(new DescribeStacksCommand(input)); + let result = await client.send(new DescribeStacksCommand(input)); reason = result; try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - let allStringEq_5 = returnComparator().length > 0; - for (const element_4 of returnComparator()) { - allStringEq_5 = allStringEq_5 && element_4 == "UPDATE_COMPLETE"; + let allStringEq_5 = (returnComparator().length > 0); + for (let element_4 of returnComparator()) { + allStringEq_5 = allStringEq_5 && (element_4 == "UPDATE_COMPLETE"); } if (allStringEq_5) { return { state: utilWaiter.WaiterState.SUCCESS, reason }; @@ -9238,13 +5574,13 @@ const checkState$1 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9253,13 +5589,13 @@ const checkState$1 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_ROLLBACK_FAILED") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9268,13 +5604,13 @@ const checkState$1 = async (client, input) => { catch (e) { } try { const returnComparator = () => { - const flat_1 = [].concat(...result.Stacks); - const projection_3 = flat_1.map((element_2) => { + let flat_1 = [].concat(...result.Stacks); + let projection_3 = flat_1.map((element_2) => { return element_2.StackStatus; }); return projection_3; }; - for (const anyStringEq_4 of returnComparator()) { + for (let anyStringEq_4 of returnComparator()) { if (anyStringEq_4 == "UPDATE_ROLLBACK_COMPLETE") { return { state: utilWaiter.WaiterState.FAILURE, reason }; } @@ -9303,7 +5639,7 @@ const waitUntilStackUpdateComplete = async (params, input) => { const checkState = async (client, input) => { let reason; try { - const result = await client.send(new DescribeTypeRegistrationCommand(input)); + let result = await client.send(new DescribeTypeRegistrationCommand(input)); reason = result; try { const returnComparator = () => { @@ -9333,11 +5669,145 @@ const waitForTypeRegistrationComplete = async (params, input) => { const serviceDefaults = { minDelay: 30, maxDelay: 120 }; return utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState); }; -const waitUntilTypeRegistrationComplete = async (params, input) => { - const serviceDefaults = { minDelay: 30, maxDelay: 120 }; - const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState); - return utilWaiter.checkExceptions(result); +const waitUntilTypeRegistrationComplete = async (params, input) => { + const serviceDefaults = { minDelay: 30, maxDelay: 120 }; + const result = await utilWaiter.createWaiter({ ...serviceDefaults, ...params }, input, checkState); + return utilWaiter.checkExceptions(result); +}; + +const commands = { + ActivateOrganizationsAccessCommand, + ActivateTypeCommand, + BatchDescribeTypeConfigurationsCommand, + CancelUpdateStackCommand, + ContinueUpdateRollbackCommand, + CreateChangeSetCommand, + CreateGeneratedTemplateCommand, + CreateStackCommand, + CreateStackInstancesCommand, + CreateStackRefactorCommand, + CreateStackSetCommand, + DeactivateOrganizationsAccessCommand, + DeactivateTypeCommand, + DeleteChangeSetCommand, + DeleteGeneratedTemplateCommand, + DeleteStackCommand, + DeleteStackInstancesCommand, + DeleteStackSetCommand, + DeregisterTypeCommand, + DescribeAccountLimitsCommand, + DescribeChangeSetCommand, + DescribeChangeSetHooksCommand, + DescribeEventsCommand, + DescribeGeneratedTemplateCommand, + DescribeOrganizationsAccessCommand, + DescribePublisherCommand, + DescribeResourceScanCommand, + DescribeStackDriftDetectionStatusCommand, + DescribeStackEventsCommand, + DescribeStackInstanceCommand, + DescribeStackRefactorCommand, + DescribeStackResourceCommand, + DescribeStackResourceDriftsCommand, + DescribeStackResourcesCommand, + DescribeStacksCommand, + DescribeStackSetCommand, + DescribeStackSetOperationCommand, + DescribeTypeCommand, + DescribeTypeRegistrationCommand, + DetectStackDriftCommand, + DetectStackResourceDriftCommand, + DetectStackSetDriftCommand, + EstimateTemplateCostCommand, + ExecuteChangeSetCommand, + ExecuteStackRefactorCommand, + GetGeneratedTemplateCommand, + GetHookResultCommand, + GetStackPolicyCommand, + GetTemplateCommand, + GetTemplateSummaryCommand, + ImportStacksToStackSetCommand, + ListChangeSetsCommand, + ListExportsCommand, + ListGeneratedTemplatesCommand, + ListHookResultsCommand, + ListImportsCommand, + ListResourceScanRelatedResourcesCommand, + ListResourceScanResourcesCommand, + ListResourceScansCommand, + ListStackInstanceResourceDriftsCommand, + ListStackInstancesCommand, + ListStackRefactorActionsCommand, + ListStackRefactorsCommand, + ListStackResourcesCommand, + ListStacksCommand, + ListStackSetAutoDeploymentTargetsCommand, + ListStackSetOperationResultsCommand, + ListStackSetOperationsCommand, + ListStackSetsCommand, + ListTypeRegistrationsCommand, + ListTypesCommand, + ListTypeVersionsCommand, + PublishTypeCommand, + RecordHandlerProgressCommand, + RegisterPublisherCommand, + RegisterTypeCommand, + RollbackStackCommand, + SetStackPolicyCommand, + SetTypeConfigurationCommand, + SetTypeDefaultVersionCommand, + SignalResourceCommand, + StartResourceScanCommand, + StopStackSetOperationCommand, + TestTypeCommand, + UpdateGeneratedTemplateCommand, + UpdateStackCommand, + UpdateStackInstancesCommand, + UpdateStackSetCommand, + UpdateTerminationProtectionCommand, + ValidateTemplateCommand, +}; +const paginators = { + paginateDescribeAccountLimits, + paginateDescribeChangeSet, + paginateDescribeEvents, + paginateDescribeStackEvents, + paginateDescribeStackResourceDrifts, + paginateDescribeStacks, + paginateListChangeSets, + paginateListExports, + paginateListGeneratedTemplates, + paginateListImports, + paginateListResourceScanRelatedResources, + paginateListResourceScanResources, + paginateListResourceScans, + paginateListStackInstances, + paginateListStackRefactorActions, + paginateListStackRefactors, + paginateListStackResources, + paginateListStacks, + paginateListStackSetOperationResults, + paginateListStackSetOperations, + paginateListStackSets, + paginateListTypeRegistrations, + paginateListTypes, + paginateListTypeVersions, +}; +const waiters = { + waitUntilChangeSetCreateComplete, + waitUntilStackRefactorCreateComplete, + waitUntilStackRefactorExecuteComplete, + waitUntilStackCreateComplete, + waitUntilStackDeleteComplete, + waitUntilStackExists, + waitUntilStackImportComplete, + waitUntilStackRollbackComplete, + waitUntilStackUpdateComplete, + waitUntilTypeRegistrationComplete, }; +class CloudFormation extends CloudFormationClient { +} +smithyClient.createAggregatedClient(commands, CloudFormation, { paginators, waiters }); const AccountFilterType = { DIFFERENCE: "DIFFERENCE", @@ -9814,424 +6284,4373 @@ const StackRefactorDetection = { AUTO: "AUTO", MANUAL: "MANUAL", }; -const StackRefactorActionEntity = { - RESOURCE: "RESOURCE", - STACK: "STACK", +const StackRefactorActionEntity = { + RESOURCE: "RESOURCE", + STACK: "STACK", +}; +const OperationResultFilterName = { + OPERATION_RESULT_STATUS: "OPERATION_RESULT_STATUS", +}; +const StackSetOperationResultStatus = { + CANCELLED: "CANCELLED", + FAILED: "FAILED", + PENDING: "PENDING", + RUNNING: "RUNNING", + SUCCEEDED: "SUCCEEDED", +}; +const OperationStatus = { + FAILED: "FAILED", + IN_PROGRESS: "IN_PROGRESS", + PENDING: "PENDING", + SUCCESS: "SUCCESS", +}; +const HandlerErrorCode = { + AccessDenied: "AccessDenied", + AlreadyExists: "AlreadyExists", + GeneralServiceException: "GeneralServiceException", + HandlerInternalFailure: "HandlerInternalFailure", + InternalFailure: "InternalFailure", + InvalidCredentials: "InvalidCredentials", + InvalidRequest: "InvalidRequest", + InvalidTypeConfiguration: "InvalidTypeConfiguration", + NetworkFailure: "NetworkFailure", + NonCompliant: "NonCompliant", + NotFound: "NotFound", + NotUpdatable: "NotUpdatable", + ResourceConflict: "ResourceConflict", + ServiceInternalError: "ServiceInternalError", + ServiceLimitExceeded: "ServiceLimitExceeded", + ServiceTimeout: "NotStabilized", + Throttling: "Throttling", + Unknown: "Unknown", + UnsupportedTarget: "UnsupportedTarget", +}; +const ResourceSignalStatus = { + FAILURE: "FAILURE", + SUCCESS: "SUCCESS", +}; + +Object.defineProperty(exports, "$Command", ({ + enumerable: true, + get: function () { return smithyClient.Command; } +})); +Object.defineProperty(exports, "__Client", ({ + enumerable: true, + get: function () { return smithyClient.Client; } +})); +Object.defineProperty(exports, "CloudFormationServiceException", ({ + enumerable: true, + get: function () { return CloudFormationServiceException.CloudFormationServiceException; } +})); +exports.AccountFilterType = AccountFilterType; +exports.AccountGateStatus = AccountGateStatus; +exports.ActivateOrganizationsAccessCommand = ActivateOrganizationsAccessCommand; +exports.ActivateTypeCommand = ActivateTypeCommand; +exports.AfterValueFrom = AfterValueFrom; +exports.AnnotationSeverityLevel = AnnotationSeverityLevel; +exports.AnnotationStatus = AnnotationStatus; +exports.AttributeChangeType = AttributeChangeType; +exports.BatchDescribeTypeConfigurationsCommand = BatchDescribeTypeConfigurationsCommand; +exports.BeaconStackOperationStatus = BeaconStackOperationStatus; +exports.BeforeValueFrom = BeforeValueFrom; +exports.CallAs = CallAs; +exports.CancelUpdateStackCommand = CancelUpdateStackCommand; +exports.Capability = Capability; +exports.Category = Category; +exports.ChangeAction = ChangeAction; +exports.ChangeSetHooksStatus = ChangeSetHooksStatus; +exports.ChangeSetStatus = ChangeSetStatus; +exports.ChangeSetType = ChangeSetType; +exports.ChangeSource = ChangeSource; +exports.ChangeType = ChangeType; +exports.CloudFormation = CloudFormation; +exports.CloudFormationClient = CloudFormationClient; +exports.ConcurrencyMode = ConcurrencyMode; +exports.ContinueUpdateRollbackCommand = ContinueUpdateRollbackCommand; +exports.CreateChangeSetCommand = CreateChangeSetCommand; +exports.CreateGeneratedTemplateCommand = CreateGeneratedTemplateCommand; +exports.CreateStackCommand = CreateStackCommand; +exports.CreateStackInstancesCommand = CreateStackInstancesCommand; +exports.CreateStackRefactorCommand = CreateStackRefactorCommand; +exports.CreateStackSetCommand = CreateStackSetCommand; +exports.DeactivateOrganizationsAccessCommand = DeactivateOrganizationsAccessCommand; +exports.DeactivateTypeCommand = DeactivateTypeCommand; +exports.DeleteChangeSetCommand = DeleteChangeSetCommand; +exports.DeleteGeneratedTemplateCommand = DeleteGeneratedTemplateCommand; +exports.DeleteStackCommand = DeleteStackCommand; +exports.DeleteStackInstancesCommand = DeleteStackInstancesCommand; +exports.DeleteStackSetCommand = DeleteStackSetCommand; +exports.DeletionMode = DeletionMode; +exports.DeploymentMode = DeploymentMode; +exports.DeprecatedStatus = DeprecatedStatus; +exports.DeregisterTypeCommand = DeregisterTypeCommand; +exports.DescribeAccountLimitsCommand = DescribeAccountLimitsCommand; +exports.DescribeChangeSetCommand = DescribeChangeSetCommand; +exports.DescribeChangeSetHooksCommand = DescribeChangeSetHooksCommand; +exports.DescribeEventsCommand = DescribeEventsCommand; +exports.DescribeGeneratedTemplateCommand = DescribeGeneratedTemplateCommand; +exports.DescribeOrganizationsAccessCommand = DescribeOrganizationsAccessCommand; +exports.DescribePublisherCommand = DescribePublisherCommand; +exports.DescribeResourceScanCommand = DescribeResourceScanCommand; +exports.DescribeStackDriftDetectionStatusCommand = DescribeStackDriftDetectionStatusCommand; +exports.DescribeStackEventsCommand = DescribeStackEventsCommand; +exports.DescribeStackInstanceCommand = DescribeStackInstanceCommand; +exports.DescribeStackRefactorCommand = DescribeStackRefactorCommand; +exports.DescribeStackResourceCommand = DescribeStackResourceCommand; +exports.DescribeStackResourceDriftsCommand = DescribeStackResourceDriftsCommand; +exports.DescribeStackResourcesCommand = DescribeStackResourcesCommand; +exports.DescribeStackSetCommand = DescribeStackSetCommand; +exports.DescribeStackSetOperationCommand = DescribeStackSetOperationCommand; +exports.DescribeStacksCommand = DescribeStacksCommand; +exports.DescribeTypeCommand = DescribeTypeCommand; +exports.DescribeTypeRegistrationCommand = DescribeTypeRegistrationCommand; +exports.DetailedStatus = DetailedStatus; +exports.DetectStackDriftCommand = DetectStackDriftCommand; +exports.DetectStackResourceDriftCommand = DetectStackResourceDriftCommand; +exports.DetectStackSetDriftCommand = DetectStackSetDriftCommand; +exports.DifferenceType = DifferenceType; +exports.DriftIgnoredReason = DriftIgnoredReason; +exports.EstimateTemplateCostCommand = EstimateTemplateCostCommand; +exports.EvaluationType = EvaluationType; +exports.EventType = EventType; +exports.ExecuteChangeSetCommand = ExecuteChangeSetCommand; +exports.ExecuteStackRefactorCommand = ExecuteStackRefactorCommand; +exports.ExecutionStatus = ExecutionStatus; +exports.GeneratedTemplateDeletionPolicy = GeneratedTemplateDeletionPolicy; +exports.GeneratedTemplateResourceStatus = GeneratedTemplateResourceStatus; +exports.GeneratedTemplateStatus = GeneratedTemplateStatus; +exports.GeneratedTemplateUpdateReplacePolicy = GeneratedTemplateUpdateReplacePolicy; +exports.GetGeneratedTemplateCommand = GetGeneratedTemplateCommand; +exports.GetHookResultCommand = GetHookResultCommand; +exports.GetStackPolicyCommand = GetStackPolicyCommand; +exports.GetTemplateCommand = GetTemplateCommand; +exports.GetTemplateSummaryCommand = GetTemplateSummaryCommand; +exports.HandlerErrorCode = HandlerErrorCode; +exports.HookFailureMode = HookFailureMode; +exports.HookInvocationPoint = HookInvocationPoint; +exports.HookStatus = HookStatus; +exports.HookTargetAction = HookTargetAction; +exports.HookTargetType = HookTargetType; +exports.IdentityProvider = IdentityProvider; +exports.ImportStacksToStackSetCommand = ImportStacksToStackSetCommand; +exports.ListChangeSetsCommand = ListChangeSetsCommand; +exports.ListExportsCommand = ListExportsCommand; +exports.ListGeneratedTemplatesCommand = ListGeneratedTemplatesCommand; +exports.ListHookResultsCommand = ListHookResultsCommand; +exports.ListHookResultsTargetType = ListHookResultsTargetType; +exports.ListImportsCommand = ListImportsCommand; +exports.ListResourceScanRelatedResourcesCommand = ListResourceScanRelatedResourcesCommand; +exports.ListResourceScanResourcesCommand = ListResourceScanResourcesCommand; +exports.ListResourceScansCommand = ListResourceScansCommand; +exports.ListStackInstanceResourceDriftsCommand = ListStackInstanceResourceDriftsCommand; +exports.ListStackInstancesCommand = ListStackInstancesCommand; +exports.ListStackRefactorActionsCommand = ListStackRefactorActionsCommand; +exports.ListStackRefactorsCommand = ListStackRefactorsCommand; +exports.ListStackResourcesCommand = ListStackResourcesCommand; +exports.ListStackSetAutoDeploymentTargetsCommand = ListStackSetAutoDeploymentTargetsCommand; +exports.ListStackSetOperationResultsCommand = ListStackSetOperationResultsCommand; +exports.ListStackSetOperationsCommand = ListStackSetOperationsCommand; +exports.ListStackSetsCommand = ListStackSetsCommand; +exports.ListStacksCommand = ListStacksCommand; +exports.ListTypeRegistrationsCommand = ListTypeRegistrationsCommand; +exports.ListTypeVersionsCommand = ListTypeVersionsCommand; +exports.ListTypesCommand = ListTypesCommand; +exports.OnFailure = OnFailure; +exports.OnStackFailure = OnStackFailure; +exports.OperationResultFilterName = OperationResultFilterName; +exports.OperationStatus = OperationStatus; +exports.OperationType = OperationType; +exports.OrganizationStatus = OrganizationStatus; +exports.PermissionModels = PermissionModels; +exports.PolicyAction = PolicyAction; +exports.ProvisioningType = ProvisioningType; +exports.PublishTypeCommand = PublishTypeCommand; +exports.PublisherStatus = PublisherStatus; +exports.RecordHandlerProgressCommand = RecordHandlerProgressCommand; +exports.RegionConcurrencyType = RegionConcurrencyType; +exports.RegisterPublisherCommand = RegisterPublisherCommand; +exports.RegisterTypeCommand = RegisterTypeCommand; +exports.RegistrationStatus = RegistrationStatus; +exports.RegistryType = RegistryType; +exports.Replacement = Replacement; +exports.RequiresRecreation = RequiresRecreation; +exports.ResourceAttribute = ResourceAttribute; +exports.ResourceScanStatus = ResourceScanStatus; +exports.ResourceSignalStatus = ResourceSignalStatus; +exports.ResourceStatus = ResourceStatus; +exports.RollbackStackCommand = RollbackStackCommand; +exports.ScanType = ScanType; +exports.SetStackPolicyCommand = SetStackPolicyCommand; +exports.SetTypeConfigurationCommand = SetTypeConfigurationCommand; +exports.SetTypeDefaultVersionCommand = SetTypeDefaultVersionCommand; +exports.SignalResourceCommand = SignalResourceCommand; +exports.StackDriftDetectionStatus = StackDriftDetectionStatus; +exports.StackDriftStatus = StackDriftStatus; +exports.StackInstanceDetailedStatus = StackInstanceDetailedStatus; +exports.StackInstanceFilterName = StackInstanceFilterName; +exports.StackInstanceStatus = StackInstanceStatus; +exports.StackRefactorActionEntity = StackRefactorActionEntity; +exports.StackRefactorActionType = StackRefactorActionType; +exports.StackRefactorDetection = StackRefactorDetection; +exports.StackRefactorExecutionStatus = StackRefactorExecutionStatus; +exports.StackRefactorStatus = StackRefactorStatus; +exports.StackResourceDriftStatus = StackResourceDriftStatus; +exports.StackSetDriftDetectionStatus = StackSetDriftDetectionStatus; +exports.StackSetDriftStatus = StackSetDriftStatus; +exports.StackSetOperationAction = StackSetOperationAction; +exports.StackSetOperationResultStatus = StackSetOperationResultStatus; +exports.StackSetOperationStatus = StackSetOperationStatus; +exports.StackSetStatus = StackSetStatus; +exports.StackStatus = StackStatus; +exports.StartResourceScanCommand = StartResourceScanCommand; +exports.StopStackSetOperationCommand = StopStackSetOperationCommand; +exports.TemplateFormat = TemplateFormat; +exports.TemplateStage = TemplateStage; +exports.TestTypeCommand = TestTypeCommand; +exports.ThirdPartyType = ThirdPartyType; +exports.TypeTestsStatus = TypeTestsStatus; +exports.UpdateGeneratedTemplateCommand = UpdateGeneratedTemplateCommand; +exports.UpdateStackCommand = UpdateStackCommand; +exports.UpdateStackInstancesCommand = UpdateStackInstancesCommand; +exports.UpdateStackSetCommand = UpdateStackSetCommand; +exports.UpdateTerminationProtectionCommand = UpdateTerminationProtectionCommand; +exports.ValidateTemplateCommand = ValidateTemplateCommand; +exports.ValidationStatus = ValidationStatus; +exports.VersionBump = VersionBump; +exports.Visibility = Visibility; +exports.WarningType = WarningType; +exports.paginateDescribeAccountLimits = paginateDescribeAccountLimits; +exports.paginateDescribeChangeSet = paginateDescribeChangeSet; +exports.paginateDescribeEvents = paginateDescribeEvents; +exports.paginateDescribeStackEvents = paginateDescribeStackEvents; +exports.paginateDescribeStackResourceDrifts = paginateDescribeStackResourceDrifts; +exports.paginateDescribeStacks = paginateDescribeStacks; +exports.paginateListChangeSets = paginateListChangeSets; +exports.paginateListExports = paginateListExports; +exports.paginateListGeneratedTemplates = paginateListGeneratedTemplates; +exports.paginateListImports = paginateListImports; +exports.paginateListResourceScanRelatedResources = paginateListResourceScanRelatedResources; +exports.paginateListResourceScanResources = paginateListResourceScanResources; +exports.paginateListResourceScans = paginateListResourceScans; +exports.paginateListStackInstances = paginateListStackInstances; +exports.paginateListStackRefactorActions = paginateListStackRefactorActions; +exports.paginateListStackRefactors = paginateListStackRefactors; +exports.paginateListStackResources = paginateListStackResources; +exports.paginateListStackSetOperationResults = paginateListStackSetOperationResults; +exports.paginateListStackSetOperations = paginateListStackSetOperations; +exports.paginateListStackSets = paginateListStackSets; +exports.paginateListStacks = paginateListStacks; +exports.paginateListTypeRegistrations = paginateListTypeRegistrations; +exports.paginateListTypeVersions = paginateListTypeVersions; +exports.paginateListTypes = paginateListTypes; +exports.waitForChangeSetCreateComplete = waitForChangeSetCreateComplete; +exports.waitForStackCreateComplete = waitForStackCreateComplete; +exports.waitForStackDeleteComplete = waitForStackDeleteComplete; +exports.waitForStackExists = waitForStackExists; +exports.waitForStackImportComplete = waitForStackImportComplete; +exports.waitForStackRefactorCreateComplete = waitForStackRefactorCreateComplete; +exports.waitForStackRefactorExecuteComplete = waitForStackRefactorExecuteComplete; +exports.waitForStackRollbackComplete = waitForStackRollbackComplete; +exports.waitForStackUpdateComplete = waitForStackUpdateComplete; +exports.waitForTypeRegistrationComplete = waitForTypeRegistrationComplete; +exports.waitUntilChangeSetCreateComplete = waitUntilChangeSetCreateComplete; +exports.waitUntilStackCreateComplete = waitUntilStackCreateComplete; +exports.waitUntilStackDeleteComplete = waitUntilStackDeleteComplete; +exports.waitUntilStackExists = waitUntilStackExists; +exports.waitUntilStackImportComplete = waitUntilStackImportComplete; +exports.waitUntilStackRefactorCreateComplete = waitUntilStackRefactorCreateComplete; +exports.waitUntilStackRefactorExecuteComplete = waitUntilStackRefactorExecuteComplete; +exports.waitUntilStackRollbackComplete = waitUntilStackRollbackComplete; +exports.waitUntilStackUpdateComplete = waitUntilStackUpdateComplete; +exports.waitUntilTypeRegistrationComplete = waitUntilTypeRegistrationComplete; +Object.keys(schemas_0).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return schemas_0[k]; } + }); +}); +Object.keys(errors).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return errors[k]; } + }); +}); + + +/***/ }), + +/***/ 22: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.CloudFormationServiceException = exports.__ServiceException = void 0; +const smithy_client_1 = __nccwpck_require__(1411); +Object.defineProperty(exports, "__ServiceException", ({ enumerable: true, get: function () { return smithy_client_1.ServiceException; } })); +class CloudFormationServiceException extends smithy_client_1.ServiceException { + constructor(options) { + super(options); + Object.setPrototypeOf(this, CloudFormationServiceException.prototype); + } +} +exports.CloudFormationServiceException = CloudFormationServiceException; + + +/***/ }), + +/***/ 4689: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ResourceScanLimitExceededException = exports.OperationStatusCheckFailedException = exports.InvalidStateTransitionException = exports.ResourceScanInProgressException = exports.StackNotFoundException = exports.HookResultNotFoundException = exports.StackRefactorNotFoundException = exports.StackInstanceNotFoundException = exports.ResourceScanNotFoundException = exports.StackSetNotEmptyException = exports.GeneratedTemplateNotFoundException = exports.InvalidChangeSetStatusException = exports.NameAlreadyExistsException = exports.CreatedButModifiedException = exports.StaleRequestException = exports.StackSetNotFoundException = exports.OperationInProgressException = exports.OperationIdAlreadyExistsException = exports.ConcurrentResourcesLimitExceededException = exports.LimitExceededException = exports.InsufficientCapabilitiesException = exports.ChangeSetNotFoundException = exports.TokenAlreadyExistsException = exports.TypeConfigurationNotFoundException = exports.AlreadyExistsException = exports.TypeNotFoundException = exports.CFNRegistryException = exports.OperationNotFoundException = exports.InvalidOperationException = void 0; +const CloudFormationServiceException_1 = __nccwpck_require__(22); +class InvalidOperationException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "InvalidOperationException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidOperationException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidOperationException.prototype); + this.Message = opts.Message; + } +} +exports.InvalidOperationException = InvalidOperationException; +class OperationNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "OperationNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OperationNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, OperationNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.OperationNotFoundException = OperationNotFoundException; +class CFNRegistryException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "CFNRegistryException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "CFNRegistryException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, CFNRegistryException.prototype); + this.Message = opts.Message; + } +} +exports.CFNRegistryException = CFNRegistryException; +class TypeNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "TypeNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "TypeNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, TypeNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.TypeNotFoundException = TypeNotFoundException; +class AlreadyExistsException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "AlreadyExistsException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "AlreadyExistsException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, AlreadyExistsException.prototype); + this.Message = opts.Message; + } +} +exports.AlreadyExistsException = AlreadyExistsException; +class TypeConfigurationNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "TypeConfigurationNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "TypeConfigurationNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, TypeConfigurationNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.TypeConfigurationNotFoundException = TypeConfigurationNotFoundException; +class TokenAlreadyExistsException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "TokenAlreadyExistsException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "TokenAlreadyExistsException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, TokenAlreadyExistsException.prototype); + this.Message = opts.Message; + } +} +exports.TokenAlreadyExistsException = TokenAlreadyExistsException; +class ChangeSetNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "ChangeSetNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ChangeSetNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ChangeSetNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.ChangeSetNotFoundException = ChangeSetNotFoundException; +class InsufficientCapabilitiesException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "InsufficientCapabilitiesException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InsufficientCapabilitiesException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InsufficientCapabilitiesException.prototype); + this.Message = opts.Message; + } +} +exports.InsufficientCapabilitiesException = InsufficientCapabilitiesException; +class LimitExceededException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "LimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "LimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, LimitExceededException.prototype); + this.Message = opts.Message; + } +} +exports.LimitExceededException = LimitExceededException; +class ConcurrentResourcesLimitExceededException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "ConcurrentResourcesLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ConcurrentResourcesLimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ConcurrentResourcesLimitExceededException.prototype); + this.Message = opts.Message; + } +} +exports.ConcurrentResourcesLimitExceededException = ConcurrentResourcesLimitExceededException; +class OperationIdAlreadyExistsException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "OperationIdAlreadyExistsException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OperationIdAlreadyExistsException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, OperationIdAlreadyExistsException.prototype); + this.Message = opts.Message; + } +} +exports.OperationIdAlreadyExistsException = OperationIdAlreadyExistsException; +class OperationInProgressException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "OperationInProgressException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OperationInProgressException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, OperationInProgressException.prototype); + this.Message = opts.Message; + } +} +exports.OperationInProgressException = OperationInProgressException; +class StackSetNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "StackSetNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "StackSetNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, StackSetNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.StackSetNotFoundException = StackSetNotFoundException; +class StaleRequestException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "StaleRequestException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "StaleRequestException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, StaleRequestException.prototype); + this.Message = opts.Message; + } +} +exports.StaleRequestException = StaleRequestException; +class CreatedButModifiedException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "CreatedButModifiedException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "CreatedButModifiedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, CreatedButModifiedException.prototype); + this.Message = opts.Message; + } +} +exports.CreatedButModifiedException = CreatedButModifiedException; +class NameAlreadyExistsException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "NameAlreadyExistsException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "NameAlreadyExistsException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, NameAlreadyExistsException.prototype); + this.Message = opts.Message; + } +} +exports.NameAlreadyExistsException = NameAlreadyExistsException; +class InvalidChangeSetStatusException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "InvalidChangeSetStatusException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidChangeSetStatusException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidChangeSetStatusException.prototype); + this.Message = opts.Message; + } +} +exports.InvalidChangeSetStatusException = InvalidChangeSetStatusException; +class GeneratedTemplateNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "GeneratedTemplateNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "GeneratedTemplateNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, GeneratedTemplateNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.GeneratedTemplateNotFoundException = GeneratedTemplateNotFoundException; +class StackSetNotEmptyException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "StackSetNotEmptyException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "StackSetNotEmptyException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, StackSetNotEmptyException.prototype); + this.Message = opts.Message; + } +} +exports.StackSetNotEmptyException = StackSetNotEmptyException; +class ResourceScanNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "ResourceScanNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceScanNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceScanNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.ResourceScanNotFoundException = ResourceScanNotFoundException; +class StackInstanceNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "StackInstanceNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "StackInstanceNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, StackInstanceNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.StackInstanceNotFoundException = StackInstanceNotFoundException; +class StackRefactorNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "StackRefactorNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "StackRefactorNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, StackRefactorNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.StackRefactorNotFoundException = StackRefactorNotFoundException; +class HookResultNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "HookResultNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "HookResultNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, HookResultNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.HookResultNotFoundException = HookResultNotFoundException; +class StackNotFoundException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "StackNotFoundException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "StackNotFoundException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, StackNotFoundException.prototype); + this.Message = opts.Message; + } +} +exports.StackNotFoundException = StackNotFoundException; +class ResourceScanInProgressException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "ResourceScanInProgressException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceScanInProgressException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceScanInProgressException.prototype); + this.Message = opts.Message; + } +} +exports.ResourceScanInProgressException = ResourceScanInProgressException; +class InvalidStateTransitionException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "InvalidStateTransitionException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "InvalidStateTransitionException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, InvalidStateTransitionException.prototype); + this.Message = opts.Message; + } +} +exports.InvalidStateTransitionException = InvalidStateTransitionException; +class OperationStatusCheckFailedException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "OperationStatusCheckFailedException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "OperationStatusCheckFailedException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, OperationStatusCheckFailedException.prototype); + this.Message = opts.Message; + } +} +exports.OperationStatusCheckFailedException = OperationStatusCheckFailedException; +class ResourceScanLimitExceededException extends CloudFormationServiceException_1.CloudFormationServiceException { + name = "ResourceScanLimitExceededException"; + $fault = "client"; + Message; + constructor(opts) { + super({ + name: "ResourceScanLimitExceededException", + $fault: "client", + ...opts, + }); + Object.setPrototypeOf(this, ResourceScanLimitExceededException.prototype); + this.Message = opts.Message; + } +} +exports.ResourceScanLimitExceededException = ResourceScanLimitExceededException; + + +/***/ }), + +/***/ 7079: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const tslib_1 = __nccwpck_require__(1860); +const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(9027)); +const core_1 = __nccwpck_require__(8704); +const credential_provider_node_1 = __nccwpck_require__(5861); +const util_user_agent_node_1 = __nccwpck_require__(1656); +const config_resolver_1 = __nccwpck_require__(9316); +const hash_node_1 = __nccwpck_require__(2711); +const middleware_retry_1 = __nccwpck_require__(9618); +const node_config_provider_1 = __nccwpck_require__(5704); +const node_http_handler_1 = __nccwpck_require__(5522); +const smithy_client_1 = __nccwpck_require__(1411); +const util_body_length_node_1 = __nccwpck_require__(3638); +const util_defaults_mode_node_1 = __nccwpck_require__(5435); +const util_retry_1 = __nccwpck_require__(5518); +const runtimeConfig_shared_1 = __nccwpck_require__(6036); +const getRuntimeConfig = (config) => { + (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version); + const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); + const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); + const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); + (0, core_1.emitWarningIfUnsupportedVersion)(process.version); + const loaderConfig = { + profile: config?.profile, + logger: clientSharedValues.logger, + }; + return { + ...clientSharedValues, + ...config, + runtime: "node", + defaultsMode, + authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), + bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, + credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, + defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), + maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), + region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), + requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), + retryMode: config?.retryMode ?? + (0, node_config_provider_1.loadConfig)({ + ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, + default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, + }, config), + sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), + streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, + useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), + userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), + }; +}; +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 6036: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getRuntimeConfig = void 0; +const core_1 = __nccwpck_require__(8704); +const protocols_1 = __nccwpck_require__(7288); +const smithy_client_1 = __nccwpck_require__(1411); +const url_parser_1 = __nccwpck_require__(4494); +const util_base64_1 = __nccwpck_require__(8385); +const util_utf8_1 = __nccwpck_require__(1577); +const httpAuthSchemeProvider_1 = __nccwpck_require__(398); +const endpointResolver_1 = __nccwpck_require__(2840); +const schemas_0_1 = __nccwpck_require__(3389); +const getRuntimeConfig = (config) => { + return { + apiVersion: "2010-05-15", + base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, + base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, + disableHostPrefix: config?.disableHostPrefix ?? false, + endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, + extensions: config?.extensions ?? [], + httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudFormationHttpAuthSchemeProvider, + httpAuthSchemes: config?.httpAuthSchemes ?? [ + { + schemeId: "aws.auth#sigv4", + identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), + signer: new core_1.AwsSdkSigV4Signer(), + }, + ], + logger: config?.logger ?? new smithy_client_1.NoOpLogger(), + protocol: config?.protocol ?? protocols_1.AwsQueryProtocol, + protocolSettings: config?.protocolSettings ?? { + defaultNamespace: "com.amazonaws.cloudformation", + errorTypeRegistries: schemas_0_1.errorTypeRegistries, + xmlNamespace: "http://cloudformation.amazonaws.com/doc/2010-05-15/", + version: "2010-05-15", + serviceTarget: "CloudFormation", + }, + serviceId: config?.serviceId ?? "CloudFormation", + urlParser: config?.urlParser ?? url_parser_1.parseUrl, + utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, + utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, + }; }; -const OperationResultFilterName = { - OPERATION_RESULT_STATUS: "OPERATION_RESULT_STATUS", +exports.getRuntimeConfig = getRuntimeConfig; + + +/***/ }), + +/***/ 3389: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ContinueUpdateRollbackOutput$ = exports.ContinueUpdateRollbackInput$ = exports.ChangeSetSummary$ = exports.ChangeSetHookTargetDetails$ = exports.ChangeSetHookResourceTargetDetails$ = exports.ChangeSetHook$ = exports.Change$ = exports.CancelUpdateStackInput$ = exports.BatchDescribeTypeConfigurationsOutput$ = exports.BatchDescribeTypeConfigurationsInput$ = exports.BatchDescribeTypeConfigurationsError$ = exports.AutoDeployment$ = exports.Annotation$ = exports.ActivateTypeOutput$ = exports.ActivateTypeInput$ = exports.ActivateOrganizationsAccessOutput$ = exports.ActivateOrganizationsAccessInput$ = exports.AccountLimit$ = exports.AccountGateResult$ = exports.errorTypeRegistries = exports.TypeNotFoundException$ = exports.TypeConfigurationNotFoundException$ = exports.TokenAlreadyExistsException$ = exports.StaleRequestException$ = exports.StackSetNotFoundException$ = exports.StackSetNotEmptyException$ = exports.StackRefactorNotFoundException$ = exports.StackNotFoundException$ = exports.StackInstanceNotFoundException$ = exports.ResourceScanNotFoundException$ = exports.ResourceScanLimitExceededException$ = exports.ResourceScanInProgressException$ = exports.OperationStatusCheckFailedException$ = exports.OperationNotFoundException$ = exports.OperationInProgressException$ = exports.OperationIdAlreadyExistsException$ = exports.NameAlreadyExistsException$ = exports.LimitExceededException$ = exports.InvalidStateTransitionException$ = exports.InvalidOperationException$ = exports.InvalidChangeSetStatusException$ = exports.InsufficientCapabilitiesException$ = exports.HookResultNotFoundException$ = exports.GeneratedTemplateNotFoundException$ = exports.CreatedButModifiedException$ = exports.ConcurrentResourcesLimitExceededException$ = exports.ChangeSetNotFoundException$ = exports.CFNRegistryException$ = exports.AlreadyExistsException$ = exports.CloudFormationServiceException$ = void 0; +exports.DescribeStackRefactorInput$ = exports.DescribeStackInstanceOutput$ = exports.DescribeStackInstanceInput$ = exports.DescribeStackEventsOutput$ = exports.DescribeStackEventsInput$ = exports.DescribeStackDriftDetectionStatusOutput$ = exports.DescribeStackDriftDetectionStatusInput$ = exports.DescribeResourceScanOutput$ = exports.DescribeResourceScanInput$ = exports.DescribePublisherOutput$ = exports.DescribePublisherInput$ = exports.DescribeOrganizationsAccessOutput$ = exports.DescribeOrganizationsAccessInput$ = exports.DescribeGeneratedTemplateOutput$ = exports.DescribeGeneratedTemplateInput$ = exports.DescribeEventsOutput$ = exports.DescribeEventsInput$ = exports.DescribeChangeSetOutput$ = exports.DescribeChangeSetInput$ = exports.DescribeChangeSetHooksOutput$ = exports.DescribeChangeSetHooksInput$ = exports.DescribeAccountLimitsOutput$ = exports.DescribeAccountLimitsInput$ = exports.DeregisterTypeOutput$ = exports.DeregisterTypeInput$ = exports.DeploymentTargets$ = exports.DeleteStackSetOutput$ = exports.DeleteStackSetInput$ = exports.DeleteStackInstancesOutput$ = exports.DeleteStackInstancesInput$ = exports.DeleteStackInput$ = exports.DeleteGeneratedTemplateInput$ = exports.DeleteChangeSetOutput$ = exports.DeleteChangeSetInput$ = exports.DeactivateTypeOutput$ = exports.DeactivateTypeInput$ = exports.DeactivateOrganizationsAccessOutput$ = exports.DeactivateOrganizationsAccessInput$ = exports.CreateStackSetOutput$ = exports.CreateStackSetInput$ = exports.CreateStackRefactorOutput$ = exports.CreateStackRefactorInput$ = exports.CreateStackOutput$ = exports.CreateStackInstancesOutput$ = exports.CreateStackInstancesInput$ = exports.CreateStackInput$ = exports.CreateGeneratedTemplateOutput$ = exports.CreateGeneratedTemplateInput$ = exports.CreateChangeSetOutput$ = exports.CreateChangeSetInput$ = void 0; +exports.ListGeneratedTemplatesOutput$ = exports.ListGeneratedTemplatesInput$ = exports.ListExportsOutput$ = exports.ListExportsInput$ = exports.ListChangeSetsOutput$ = exports.ListChangeSetsInput$ = exports.ImportStacksToStackSetOutput$ = exports.ImportStacksToStackSetInput$ = exports.HookTarget$ = exports.HookResultSummary$ = exports.GetTemplateSummaryOutput$ = exports.GetTemplateSummaryInput$ = exports.GetTemplateOutput$ = exports.GetTemplateInput$ = exports.GetStackPolicyOutput$ = exports.GetStackPolicyInput$ = exports.GetHookResultOutput$ = exports.GetHookResultInput$ = exports.GetGeneratedTemplateOutput$ = exports.GetGeneratedTemplateInput$ = exports.Export$ = exports.ExecuteStackRefactorInput$ = exports.ExecuteChangeSetOutput$ = exports.ExecuteChangeSetInput$ = exports.EventFilter$ = exports.EstimateTemplateCostOutput$ = exports.EstimateTemplateCostInput$ = exports.DetectStackSetDriftOutput$ = exports.DetectStackSetDriftInput$ = exports.DetectStackResourceDriftOutput$ = exports.DetectStackResourceDriftInput$ = exports.DetectStackDriftOutput$ = exports.DetectStackDriftInput$ = exports.DescribeTypeRegistrationOutput$ = exports.DescribeTypeRegistrationInput$ = exports.DescribeTypeOutput$ = exports.DescribeTypeInput$ = exports.DescribeStacksOutput$ = exports.DescribeStacksInput$ = exports.DescribeStackSetOutput$ = exports.DescribeStackSetOperationOutput$ = exports.DescribeStackSetOperationInput$ = exports.DescribeStackSetInput$ = exports.DescribeStackResourcesOutput$ = exports.DescribeStackResourcesInput$ = exports.DescribeStackResourceOutput$ = exports.DescribeStackResourceInput$ = exports.DescribeStackResourceDriftsOutput$ = exports.DescribeStackResourceDriftsInput$ = exports.DescribeStackRefactorOutput$ = void 0; +exports.PublishTypeInput$ = exports.PropertyDifference$ = exports.PhysicalResourceIdContextKeyValuePair$ = exports.ParameterDeclaration$ = exports.ParameterConstraints$ = exports.Parameter$ = exports.Output$ = exports.OperationResultFilter$ = exports.OperationEvent$ = exports.OperationEntry$ = exports.ModuleInfo$ = exports.ManagedExecution$ = exports.LoggingConfig$ = exports.LiveResourceDrift$ = exports.ListTypeVersionsOutput$ = exports.ListTypeVersionsInput$ = exports.ListTypesOutput$ = exports.ListTypesInput$ = exports.ListTypeRegistrationsOutput$ = exports.ListTypeRegistrationsInput$ = exports.ListStacksOutput$ = exports.ListStacksInput$ = exports.ListStackSetsOutput$ = exports.ListStackSetsInput$ = exports.ListStackSetOperationsOutput$ = exports.ListStackSetOperationsInput$ = exports.ListStackSetOperationResultsOutput$ = exports.ListStackSetOperationResultsInput$ = exports.ListStackSetAutoDeploymentTargetsOutput$ = exports.ListStackSetAutoDeploymentTargetsInput$ = exports.ListStackResourcesOutput$ = exports.ListStackResourcesInput$ = exports.ListStackRefactorsOutput$ = exports.ListStackRefactorsInput$ = exports.ListStackRefactorActionsOutput$ = exports.ListStackRefactorActionsInput$ = exports.ListStackInstancesOutput$ = exports.ListStackInstancesInput$ = exports.ListStackInstanceResourceDriftsOutput$ = exports.ListStackInstanceResourceDriftsInput$ = exports.ListResourceScansOutput$ = exports.ListResourceScansInput$ = exports.ListResourceScanResourcesOutput$ = exports.ListResourceScanResourcesInput$ = exports.ListResourceScanRelatedResourcesOutput$ = exports.ListResourceScanRelatedResourcesInput$ = exports.ListImportsOutput$ = exports.ListImportsInput$ = exports.ListHookResultsOutput$ = exports.ListHookResultsInput$ = void 0; +exports.StackResourceSummary$ = exports.StackResourceDriftInformationSummary$ = exports.StackResourceDriftInformation$ = exports.StackResourceDrift$ = exports.StackResourceDetail$ = exports.StackResource$ = exports.StackRefactorSummary$ = exports.StackRefactorAction$ = exports.StackInstanceSummary$ = exports.StackInstanceResourceDriftsSummary$ = exports.StackInstanceFilter$ = exports.StackInstanceComprehensiveStatus$ = exports.StackInstance$ = exports.StackEvent$ = exports.StackDriftInformationSummary$ = exports.StackDriftInformation$ = exports.StackDefinition$ = exports.Stack$ = exports.SignalResourceInput$ = exports.SetTypeDefaultVersionOutput$ = exports.SetTypeDefaultVersionInput$ = exports.SetTypeConfigurationOutput$ = exports.SetTypeConfigurationInput$ = exports.SetStackPolicyInput$ = exports.ScannedResourceIdentifier$ = exports.ScannedResource$ = exports.ScanFilter$ = exports.RollbackTrigger$ = exports.RollbackStackOutput$ = exports.RollbackStackInput$ = exports.RollbackConfiguration$ = exports.ResourceToImport$ = exports.ResourceTargetDefinition$ = exports.ResourceScanSummary$ = exports.ResourceMapping$ = exports.ResourceLocation$ = exports.ResourceIdentifierSummary$ = exports.ResourceDriftIgnoredAttribute$ = exports.ResourceDetail$ = exports.ResourceDefinition$ = exports.ResourceChangeDetail$ = exports.ResourceChange$ = exports.RequiredActivatedType$ = exports.RegisterTypeOutput$ = exports.RegisterTypeInput$ = exports.RegisterPublisherOutput$ = exports.RegisterPublisherInput$ = exports.RecordHandlerProgressOutput$ = exports.RecordHandlerProgressInput$ = exports.PublishTypeOutput$ = void 0; +exports.CreateStack$ = exports.CreateGeneratedTemplate$ = exports.CreateChangeSet$ = exports.ContinueUpdateRollback$ = exports.CancelUpdateStack$ = exports.BatchDescribeTypeConfigurations$ = exports.ActivateType$ = exports.ActivateOrganizationsAccess$ = exports.Warnings$ = exports.WarningProperty$ = exports.WarningDetail$ = exports.ValidateTemplateOutput$ = exports.ValidateTemplateInput$ = exports.UpdateTerminationProtectionOutput$ = exports.UpdateTerminationProtectionInput$ = exports.UpdateStackSetOutput$ = exports.UpdateStackSetInput$ = exports.UpdateStackOutput$ = exports.UpdateStackInstancesOutput$ = exports.UpdateStackInstancesInput$ = exports.UpdateStackInput$ = exports.UpdateGeneratedTemplateOutput$ = exports.UpdateGeneratedTemplateInput$ = exports.TypeVersionSummary$ = exports.TypeSummary$ = exports.TypeFilters$ = exports.TypeConfigurationIdentifier$ = exports.TypeConfigurationDetails$ = exports.TestTypeOutput$ = exports.TestTypeInput$ = exports.TemplateSummaryConfig$ = exports.TemplateSummary$ = exports.TemplateProgress$ = exports.TemplateParameter$ = exports.TemplateConfiguration$ = exports.Tag$ = exports.StopStackSetOperationOutput$ = exports.StopStackSetOperationInput$ = exports.StartResourceScanOutput$ = exports.StartResourceScanInput$ = exports.StackSummary$ = exports.StackSetSummary$ = exports.StackSetOperationSummary$ = exports.StackSetOperationStatusDetails$ = exports.StackSetOperationResultSummary$ = exports.StackSetOperationPreferences$ = exports.StackSetOperation$ = exports.StackSetDriftDetectionDetails$ = exports.StackSetAutoDeploymentTargetSummary$ = exports.StackSet$ = void 0; +exports.ListResourceScanResources$ = exports.ListResourceScanRelatedResources$ = exports.ListImports$ = exports.ListHookResults$ = exports.ListGeneratedTemplates$ = exports.ListExports$ = exports.ListChangeSets$ = exports.ImportStacksToStackSet$ = exports.GetTemplateSummary$ = exports.GetTemplate$ = exports.GetStackPolicy$ = exports.GetHookResult$ = exports.GetGeneratedTemplate$ = exports.ExecuteStackRefactor$ = exports.ExecuteChangeSet$ = exports.EstimateTemplateCost$ = exports.DetectStackSetDrift$ = exports.DetectStackResourceDrift$ = exports.DetectStackDrift$ = exports.DescribeTypeRegistration$ = exports.DescribeType$ = exports.DescribeStackSetOperation$ = exports.DescribeStackSet$ = exports.DescribeStacks$ = exports.DescribeStackResources$ = exports.DescribeStackResourceDrifts$ = exports.DescribeStackResource$ = exports.DescribeStackRefactor$ = exports.DescribeStackInstance$ = exports.DescribeStackEvents$ = exports.DescribeStackDriftDetectionStatus$ = exports.DescribeResourceScan$ = exports.DescribePublisher$ = exports.DescribeOrganizationsAccess$ = exports.DescribeGeneratedTemplate$ = exports.DescribeEvents$ = exports.DescribeChangeSetHooks$ = exports.DescribeChangeSet$ = exports.DescribeAccountLimits$ = exports.DeregisterType$ = exports.DeleteStackSet$ = exports.DeleteStackInstances$ = exports.DeleteStack$ = exports.DeleteGeneratedTemplate$ = exports.DeleteChangeSet$ = exports.DeactivateType$ = exports.DeactivateOrganizationsAccess$ = exports.CreateStackSet$ = exports.CreateStackRefactor$ = exports.CreateStackInstances$ = void 0; +exports.ValidateTemplate$ = exports.UpdateTerminationProtection$ = exports.UpdateStackSet$ = exports.UpdateStackInstances$ = exports.UpdateStack$ = exports.UpdateGeneratedTemplate$ = exports.TestType$ = exports.StopStackSetOperation$ = exports.StartResourceScan$ = exports.SignalResource$ = exports.SetTypeDefaultVersion$ = exports.SetTypeConfiguration$ = exports.SetStackPolicy$ = exports.RollbackStack$ = exports.RegisterType$ = exports.RegisterPublisher$ = exports.RecordHandlerProgress$ = exports.PublishType$ = exports.ListTypeVersions$ = exports.ListTypes$ = exports.ListTypeRegistrations$ = exports.ListStackSets$ = exports.ListStackSetOperations$ = exports.ListStackSetOperationResults$ = exports.ListStackSetAutoDeploymentTargets$ = exports.ListStacks$ = exports.ListStackResources$ = exports.ListStackRefactors$ = exports.ListStackRefactorActions$ = exports.ListStackInstances$ = exports.ListStackInstanceResourceDrifts$ = exports.ListResourceScans$ = void 0; +const _A = "Arn"; +const _AC = "AfterContext"; +const _ACT = "AttributeChangeType"; +const _AD = "AutoDeployment"; +const _AEE = "AlreadyExistsException"; +const _AFT = "AccountFilterType"; +const _AGR = "AccountGateResult"; +const _AL = "AccountLimit"; +const _ALL = "AccountLimitList"; +const _ALc = "AccountLimits"; +const _ALn = "AnnotationList"; +const _AN = "AnnotationName"; +const _AOA = "ActivateOrganizationsAccess"; +const _AOAI = "ActivateOrganizationsAccessInput"; +const _AOAO = "ActivateOrganizationsAccessOutput"; +const _AP = "ActualProperties"; +const _AR = "AddResources"; +const _ARARN = "AdministrationRoleARN"; +const _AT = "ActivateType"; +const _ATAC = "AcceptTermsAndConditions"; +const _ATI = "ActivateTypeInput"; +const _ATO = "ActivateTypeOutput"; +const _AU = "AutoUpdate"; +const _AUc = "AccountsUrl"; +const _AV = "ActualValue"; +const _AVF = "AfterValueFrom"; +const _AVf = "AfterValue"; +const _AVl = "AllowedValues"; +const _Ac = "Accounts"; +const _Acc = "Account"; +const _Act = "Action"; +const _Acti = "Active"; +const _Al = "Alias"; +const _An = "Annotation"; +const _Ann = "Annotations"; +const _At = "Attribute"; +const _BC = "BeforeContext"; +const _BDTC = "BatchDescribeTypeConfigurations"; +const _BDTCE = "BatchDescribeTypeConfigurationsError"; +const _BDTCEa = "BatchDescribeTypeConfigurationsErrors"; +const _BDTCI = "BatchDescribeTypeConfigurationsInput"; +const _BDTCO = "BatchDescribeTypeConfigurationsOutput"; +const _BT = "BearerToken"; +const _BV = "BeforeValue"; +const _BVF = "BeforeValueFrom"; +const _C = "Change"; +const _CA = "CallAs"; +const _CAo = "ConnectionArn"; +const _CAon = "ConfigurationAlias"; +const _CAonf = "ConfigurationArn"; +const _CBME = "CreatedButModifiedException"; +const _CCS = "CreateChangeSet"; +const _CCSI = "CreateChangeSetInput"; +const _CCSO = "CreateChangeSetOutput"; +const _CE = "CausingEntity"; +const _CFNRE = "CFNRegistryException"; +const _CGT = "CreateGeneratedTemplate"; +const _CGTI = "CreateGeneratedTemplateInput"; +const _CGTO = "CreateGeneratedTemplateOutput"; +const _CM = "ConcurrencyMode"; +const _COS = "CurrentOperationStatus"; +const _CR = "CapabilitiesReason"; +const _CRLEE = "ConcurrentResourcesLimitExceededException"; +const _CRT = "ClientRequestToken"; +const _CS = "ConfigurationSchema"; +const _CSH = "ChangeSetHook"; +const _CSHRTD = "ChangeSetHookResourceTargetDetails"; +const _CSHTD = "ChangeSetHookTargetDetails"; +const _CSHh = "ChangeSetHooks"; +const _CSI = "ChangeSetId"; +const _CSII = "CreateStackInstancesInput"; +const _CSIO = "CreateStackInstancesOutput"; +const _CSIr = "CreateStackInput"; +const _CSIre = "CreateStackInstances"; +const _CSN = "ChangeSetName"; +const _CSNFE = "ChangeSetNotFoundException"; +const _CSO = "CreateStackOutput"; +const _CSR = "CreateStackRefactor"; +const _CSRI = "CreateStackRefactorInput"; +const _CSRO = "CreateStackRefactorOutput"; +const _CSS = "ChangeSetSummary"; +const _CSSI = "CreateStackSetInput"; +const _CSSO = "CreateStackSetOutput"; +const _CSSh = "ChangeSetSummaries"; +const _CSSr = "CreateStackSet"; +const _CST = "ChangeSetType"; +const _CSh = "ChangeSource"; +const _CSr = "CreateStack"; +const _CT = "CreationTime"; +const _CTl = "ClientToken"; +const _CTr = "CreationTimestamp"; +const _CUR = "ContinueUpdateRollback"; +const _CURI = "ContinueUpdateRollbackInput"; +const _CURO = "ContinueUpdateRollbackOutput"; +const _CUS = "CancelUpdateStack"; +const _CUSI = "CancelUpdateStackInput"; +const _Ca = "Capabilities"; +const _Cat = "Category"; +const _Ch = "Changes"; +const _Co = "Configuration"; +const _D = "Description"; +const _DAL = "DescribeAccountLimits"; +const _DALI = "DescribeAccountLimitsInput"; +const _DALO = "DescribeAccountLimitsOutput"; +const _DCS = "DeleteChangeSet"; +const _DCSH = "DescribeChangeSetHooks"; +const _DCSHI = "DescribeChangeSetHooksInput"; +const _DCSHO = "DescribeChangeSetHooksOutput"; +const _DCSI = "DeleteChangeSetInput"; +const _DCSIe = "DescribeChangeSetInput"; +const _DCSO = "DeleteChangeSetOutput"; +const _DCSOe = "DescribeChangeSetOutput"; +const _DCSe = "DescribeChangeSet"; +const _DDS = "DriftDetectionStatus"; +const _DDT = "DriftDetectionTimestamp"; +const _DE = "DescribeEvents"; +const _DEI = "DescribeEventsInput"; +const _DEO = "DescribeEventsOutput"; +const _DGT = "DeleteGeneratedTemplate"; +const _DGTI = "DeleteGeneratedTemplateInput"; +const _DGTIe = "DescribeGeneratedTemplateInput"; +const _DGTO = "DescribeGeneratedTemplateOutput"; +const _DGTe = "DescribeGeneratedTemplate"; +const _DI = "DriftInformation"; +const _DM = "DeploymentMode"; +const _DMe = "DeletionMode"; +const _DO = "DependsOn"; +const _DOA = "DeactivateOrganizationsAccess"; +const _DOAI = "DeactivateOrganizationsAccessInput"; +const _DOAIe = "DescribeOrganizationsAccessInput"; +const _DOAO = "DeactivateOrganizationsAccessOutput"; +const _DOAOe = "DescribeOrganizationsAccessOutput"; +const _DOAe = "DescribeOrganizationsAccess"; +const _DP = "DeletionPolicy"; +const _DPI = "DescribePublisherInput"; +const _DPO = "DescribePublisherOutput"; +const _DPe = "DescribePublisher"; +const _DR = "DisableRollback"; +const _DRS = "DescribeResourceScan"; +const _DRSI = "DescribeResourceScanInput"; +const _DRSO = "DescribeResourceScanOutput"; +const _DRe = "DetectionReason"; +const _DS = "DetectionStatus"; +const _DSD = "DetectStackDrift"; +const _DSDDS = "DescribeStackDriftDetectionStatus"; +const _DSDDSI = "DescribeStackDriftDetectionStatusInput"; +const _DSDDSO = "DescribeStackDriftDetectionStatusOutput"; +const _DSDI = "DetectStackDriftInput"; +const _DSDO = "DetectStackDriftOutput"; +const _DSE = "DescribeStackEvents"; +const _DSEI = "DescribeStackEventsInput"; +const _DSEO = "DescribeStackEventsOutput"; +const _DSI = "DeleteStackInput"; +const _DSIC = "DriftedStackInstancesCount"; +const _DSII = "DeleteStackInstancesInput"; +const _DSIIe = "DescribeStackInstanceInput"; +const _DSIO = "DeleteStackInstancesOutput"; +const _DSIOe = "DescribeStackInstanceOutput"; +const _DSIe = "DescribeStacksInput"; +const _DSIel = "DeleteStackInstances"; +const _DSIes = "DescribeStackInstance"; +const _DSO = "DescribeStacksOutput"; +const _DSR = "DetectionStatusReason"; +const _DSRC = "DriftedStackResourceCount"; +const _DSRD = "DescribeStackResourceDrifts"; +const _DSRDI = "DescribeStackResourceDriftsInput"; +const _DSRDIe = "DetectStackResourceDriftInput"; +const _DSRDO = "DescribeStackResourceDriftsOutput"; +const _DSRDOe = "DetectStackResourceDriftOutput"; +const _DSRDe = "DetectStackResourceDrift"; +const _DSRI = "DescribeStackRefactorInput"; +const _DSRIe = "DescribeStackResourceInput"; +const _DSRIes = "DescribeStackResourcesInput"; +const _DSRO = "DescribeStackRefactorOutput"; +const _DSROe = "DescribeStackResourceOutput"; +const _DSROes = "DescribeStackResourcesOutput"; +const _DSRe = "DescribeStackRefactor"; +const _DSRes = "DescribeStackResource"; +const _DSResc = "DescribeStackResources"; +const _DSRr = "DriftStatusReason"; +const _DSS = "DeleteStackSet"; +const _DSSD = "DetectStackSetDrift"; +const _DSSDI = "DetectStackSetDriftInput"; +const _DSSDO = "DetectStackSetDriftOutput"; +const _DSSI = "DeleteStackSetInput"; +const _DSSIe = "DescribeStackSetInput"; +const _DSSO = "DeleteStackSetOutput"; +const _DSSOI = "DescribeStackSetOperationInput"; +const _DSSOO = "DescribeStackSetOperationOutput"; +const _DSSOe = "DescribeStackSetOutput"; +const _DSSOes = "DescribeStackSetOperation"; +const _DSSe = "DescribeStackSet"; +const _DSe = "DeprecatedStatus"; +const _DSel = "DeleteStack"; +const _DSes = "DescribeStacks"; +const _DSet = "DetailedStatus"; +const _DSr = "DriftStatus"; +const _DT = "DeploymentTargets"; +const _DTI = "DeactivateTypeInput"; +const _DTIe = "DeregisterTypeInput"; +const _DTIes = "DescribeTypeInput"; +const _DTO = "DeactivateTypeOutput"; +const _DTOe = "DeregisterTypeOutput"; +const _DTOes = "DescribeTypeOutput"; +const _DTR = "DescribeTypeRegistration"; +const _DTRI = "DescribeTypeRegistrationInput"; +const _DTRO = "DescribeTypeRegistrationOutput"; +const _DTe = "DeclaredTransforms"; +const _DTea = "DeactivateType"; +const _DTel = "DeletionTime"; +const _DTer = "DeregisterType"; +const _DTes = "DescribeType"; +const _DTi = "DifferenceType"; +const _DU = "DocumentationUrl"; +const _DV = "DefaultValue"; +const _DVI = "DefaultVersionId"; +const _De = "Details"; +const _Des = "Destination"; +const _Det = "Detection"; +const _Dr = "Drift"; +const _E = "Enabled"; +const _EC = "ErrorCode"; +const _ECS = "ExecuteChangeSet"; +const _ECSI = "ExecuteChangeSetInput"; +const _ECSO = "ExecuteChangeSetOutput"; +const _EF = "EventFilter"; +const _EI = "EventId"; +const _EM = "ErrorMessage"; +const _EN = "ExportName"; +const _EP = "ExpectedProperties"; +const _ERA = "ExecutionRoleArn"; +const _ERN = "ExecutionRoleName"; +const _ES = "ExecutionStatus"; +const _ESC = "EnableStackCreation"; +const _ESF = "ExecutionStatusFilter"; +const _ESI = "ExportingStackId"; +const _ESR = "ExecutionStatusReason"; +const _ESRI = "ExecuteStackRefactorInput"; +const _ESRx = "ExecuteStackRefactor"; +const _ET = "EndTime"; +const _ETC = "EstimateTemplateCost"; +const _ETCI = "EstimateTemplateCostInput"; +const _ETCO = "EstimateTemplateCostOutput"; +const _ETP = "EnableTerminationProtection"; +const _ETn = "EndTimestamp"; +const _ETv = "EventType"; +const _EV = "ExpectedValue"; +const _En = "Entity"; +const _Er = "Errors"; +const _Ev = "Evaluation"; +const _Ex = "Export"; +const _Exp = "Exports"; +const _F = "Filters"; +const _FE = "FailedEvents"; +const _FM = "FailureMode"; +const _FSIC = "FailedStackInstancesCount"; +const _FTC = "FailureToleranceCount"; +const _FTP = "FailureTolerancePercentage"; +const _Fo = "Format"; +const _GGT = "GetGeneratedTemplate"; +const _GGTI = "GetGeneratedTemplateInput"; +const _GGTO = "GetGeneratedTemplateOutput"; +const _GHR = "GetHookResult"; +const _GHRI = "GetHookResultInput"; +const _GHRO = "GetHookResultOutput"; +const _GSP = "GetStackPolicy"; +const _GSPI = "GetStackPolicyInput"; +const _GSPO = "GetStackPolicyOutput"; +const _GT = "GetTemplate"; +const _GTI = "GeneratedTemplateId"; +const _GTIe = "GetTemplateInput"; +const _GTN = "GeneratedTemplateName"; +const _GTNFE = "GeneratedTemplateNotFoundException"; +const _GTO = "GetTemplateOutput"; +const _GTS = "GetTemplateSummary"; +const _GTSI = "GetTemplateSummaryInput"; +const _GTSO = "GetTemplateSummaryOutput"; +const _H = "Hooks"; +const _HET = "HookExecutionTarget"; +const _HFM = "HookFailureMode"; +const _HIC = "HookInvocationCount"; +const _HII = "HookInvocationId"; +const _HIP = "HookInvocationPoint"; +const _HR = "HookResults"; +const _HRI = "HookResultId"; +const _HRNFE = "HookResultNotFoundException"; +const _HRS = "HookResultSummary"; +const _HRSo = "HookResultSummaries"; +const _HS = "HookStatus"; +const _HSR = "HookStatusReason"; +const _HT = "HookTarget"; +const _HTo = "HookType"; +const _I = "Id"; +const _IA = "IsActivated"; +const _IAn = "InvokedAt"; +const _ICE = "InsufficientCapabilitiesException"; +const _ICSSE = "InvalidChangeSetStatusException"; +const _IDC = "IsDefaultConfiguration"; +const _IDV = "IsDefaultVersion"; +const _IER = "ImportExistingResources"; +const _INS = "IncludeNestedStacks"; +const _IOE = "InvalidOperationException"; +const _IP = "InvocationPoint"; +const _IPSIC = "InProgressStackInstancesCount"; +const _IPV = "IncludePropertyValues"; +const _IPd = "IdentityProvider"; +const _ISSIC = "InSyncStackInstancesCount"; +const _ISTE = "InvalidStateTransitionException"; +const _ISTSS = "ImportStacksToStackSet"; +const _ISTSSI = "ImportStacksToStackSetInput"; +const _ISTSSO = "ImportStacksToStackSetOutput"; +const _Im = "Imports"; +const _K = "Key"; +const _LC = "LoggingConfig"; +const _LCS = "ListChangeSets"; +const _LCSI = "ListChangeSetsInput"; +const _LCSO = "ListChangeSetsOutput"; +const _LCT = "LastCheckTimestamp"; +const _LDB = "LogDeliveryBucket"; +const _LDCT = "LastDriftCheckTimestamp"; +const _LE = "ListExports"; +const _LEE = "LimitExceededException"; +const _LEI = "ListExportsInput"; +const _LEO = "ListExportsOutput"; +const _LGN = "LogGroupName"; +const _LGT = "ListGeneratedTemplates"; +const _LGTI = "ListGeneratedTemplatesInput"; +const _LGTO = "ListGeneratedTemplatesOutput"; +const _LHR = "ListHookResults"; +const _LHRI = "ListHookResultsInput"; +const _LHRO = "ListHookResultsOutput"; +const _LI = "ListImports"; +const _LIH = "LogicalIdHierarchy"; +const _LII = "ListImportsInput"; +const _LIO = "ListImportsOutput"; +const _LO = "LastOperations"; +const _LOI = "LastOperationId"; +const _LPV = "LatestPublicVersion"; +const _LRA = "LogRoleArn"; +const _LRD = "LiveResourceDrift"; +const _LRI = "LogicalResourceId"; +const _LRIo = "LogicalResourceIds"; +const _LRS = "ListResourceScans"; +const _LRSI = "ListResourceScansInput"; +const _LRSO = "ListResourceScansOutput"; +const _LRSR = "ListResourceScanResources"; +const _LRSRI = "ListResourceScanResourcesInput"; +const _LRSRO = "ListResourceScanResourcesOutput"; +const _LRSRR = "ListResourceScanRelatedResources"; +const _LRSRRI = "ListResourceScanRelatedResourcesInput"; +const _LRSRRO = "ListResourceScanRelatedResourcesOutput"; +const _LS = "ListStacks"; +const _LSI = "ListStacksInput"; +const _LSII = "ListStackInstancesInput"; +const _LSIO = "ListStackInstancesOutput"; +const _LSIRD = "ListStackInstanceResourceDrifts"; +const _LSIRDI = "ListStackInstanceResourceDriftsInput"; +const _LSIRDO = "ListStackInstanceResourceDriftsOutput"; +const _LSIi = "ListStackInstances"; +const _LSO = "ListStacksOutput"; +const _LSR = "ListStackRefactors"; +const _LSRA = "ListStackRefactorActions"; +const _LSRAI = "ListStackRefactorActionsInput"; +const _LSRAO = "ListStackRefactorActionsOutput"; +const _LSRI = "ListStackRefactorsInput"; +const _LSRIi = "ListStackResourcesInput"; +const _LSRO = "ListStackRefactorsOutput"; +const _LSROi = "ListStackResourcesOutput"; +const _LSRi = "ListStackResources"; +const _LSS = "ListStackSets"; +const _LSSADT = "ListStackSetAutoDeploymentTargets"; +const _LSSADTI = "ListStackSetAutoDeploymentTargetsInput"; +const _LSSADTO = "ListStackSetAutoDeploymentTargetsOutput"; +const _LSSI = "ListStackSetsInput"; +const _LSSO = "ListStackSetsOutput"; +const _LSSOI = "ListStackSetOperationsInput"; +const _LSSOO = "ListStackSetOperationsOutput"; +const _LSSOR = "ListStackSetOperationResults"; +const _LSSORI = "ListStackSetOperationResultsInput"; +const _LSSORO = "ListStackSetOperationResultsOutput"; +const _LSSOi = "ListStackSetOperations"; +const _LT = "ListTypes"; +const _LTI = "ListTypesInput"; +const _LTO = "ListTypesOutput"; +const _LTR = "ListTypeRegistrations"; +const _LTRI = "ListTypeRegistrationsInput"; +const _LTRO = "ListTypeRegistrationsOutput"; +const _LTV = "ListTypeVersions"; +const _LTVI = "ListTypeVersionsInput"; +const _LTVO = "ListTypeVersionsOutput"; +const _LU = "LastUpdated"; +const _LUT = "LastUpdatedTime"; +const _LUTa = "LastUpdatedTimestamp"; +const _M = "Message"; +const _MBS = "ManagedByStack"; +const _MCC = "MaxConcurrentCount"; +const _MCP = "MaxConcurrentPercentage"; +const _ME = "ManagedExecution"; +const _MI = "ModuleInfo"; +const _MR = "MaxResults"; +const _MTIM = "MonitoringTimeInMinutes"; +const _MV = "MajorVersion"; +const _Me = "Metadata"; +const _N = "Name"; +const _NAEE = "NameAlreadyExistsException"; +const _NARN = "NotificationARNs"; +const _NE = "NoEcho"; +const _NGTN = "NewGeneratedTemplateName"; +const _NOR = "NumberOfResources"; +const _NT = "NextToken"; +const _O = "Output"; +const _OE = "OperationEvents"; +const _OEp = "OperationEntry"; +const _OEpe = "OperationEvent"; +const _OF = "OnFailure"; +const _OI = "OperationId"; +const _OIAEE = "OperationIdAlreadyExistsException"; +const _OIPE = "OperationInProgressException"; +const _OK = "OutputKey"; +const _ONFE = "OperationNotFoundException"; +const _OP = "OperationPreferences"; +const _ORF = "OperationResultFilter"; +const _ORFp = "OperationResultFilters"; +const _OS = "OperationStatus"; +const _OSCFE = "OperationStatusCheckFailedException"; +const _OSF = "OnStackFailure"; +const _OT = "OperationType"; +const _OTA = "OriginalTypeArn"; +const _OTN = "OriginalTypeName"; +const _OUI = "OrganizationalUnitIds"; +const _OUIr = "OrganizationalUnitId"; +const _OV = "OutputValue"; +const _Ou = "Outputs"; +const _P = "Parameters"; +const _PA = "PolicyAction"; +const _PC = "PercentageCompleted"; +const _PCSI = "ParentChangeSetId"; +const _PCa = "ParameterConstraints"; +const _PD = "ParameterDeclaration"; +const _PDC = "PreviousDeploymentContext"; +const _PDa = "ParameterDeclarations"; +const _PDr = "PropertyDifference"; +const _PDro = "PropertyDifferences"; +const _PI = "PublisherId"; +const _PIa = "ParentId"; +const _PIu = "PublisherIdentity"; +const _PK = "ParameterKey"; +const _PM = "PermissionModel"; +const _PN = "PublisherName"; +const _PO = "ParameterOverrides"; +const _PP = "PublisherProfile"; +const _PPr = "PropertyPath"; +const _PRI = "PhysicalResourceId"; +const _PRIC = "PhysicalResourceIdContext"; +const _PRICKVP = "PhysicalResourceIdContextKeyValuePair"; +const _PS = "PublisherStatus"; +const _PSr = "ProgressStatus"; +const _PT = "ProvisioningType"; +const _PTA = "PublicTypeArn"; +const _PTI = "PublishTypeInput"; +const _PTO = "PublishTypeOutput"; +const _PTa = "ParameterType"; +const _PTu = "PublishType"; +const _PV = "PreviousValue"; +const _PVN = "PublicVersionNumber"; +const _PVa = "ParameterValue"; +const _Pa = "Parameter"; +const _Pat = "Path"; +const _Pr = "Progress"; +const _Pro = "Properties"; +const _R = "Resources"; +const _RA = "ResourceAction"; +const _RAR = "RefreshAllResources"; +const _RARN = "RoleARN"; +const _RAT = "RequiredActivatedTypes"; +const _RATe = "RequiredActivatedType"; +const _RC = "ResourceChange"; +const _RCD = "ResourceChangeDetail"; +const _RCDe = "ResourceChangeDetails"; +const _RCSI = "RootChangeSetId"; +const _RCT = "RegionConcurrencyType"; +const _RCo = "RollbackConfiguration"; +const _RD = "ResourceDefinition"; +const _RDIA = "ResourceDriftIgnoredAttributes"; +const _RDIAe = "ResourceDriftIgnoredAttribute"; +const _RDS = "ResourceDriftStatus"; +const _RDe = "ResourceDetail"; +const _RDes = "ResourceDefinitions"; +const _RDeso = "ResourceDetails"; +const _REOC = "RetainExceptOnCreate"; +const _RF = "ResourcesFailed"; +const _RHP = "RecordHandlerProgress"; +const _RHPI = "RecordHandlerProgressInput"; +const _RHPO = "RecordHandlerProgressOutput"; +const _RI = "ResourceIdentifier"; +const _RIS = "ResourceIdentifierSummaries"; +const _RISe = "ResourceIdentifierSummary"; +const _RIe = "ResourceIdentifiers"; +const _RIo = "RootId"; +const _RL = "RemediationLink"; +const _RLe = "ResourceLocation"; +const _RM = "RemediationMessage"; +const _RMe = "ResourceMappings"; +const _RMes = "ResourceModel"; +const _RMeso = "ResourceMapping"; +const _RO = "RegionOrder"; +const _RP = "ResourceProperties"; +const _RPI = "RegisterPublisherInput"; +const _RPO = "RegisterPublisherOutput"; +const _RPe = "ResourcesProcessing"; +const _RPeg = "RegisterPublisher"; +const _RPes = "ResourcesPending"; +const _RR = "RetainResources"; +const _RRe = "ResourcesRead"; +const _RRel = "RelatedResources"; +const _RRem = "RemoveResources"; +const _RReq = "RequiresRecreation"; +const _RS = "RetainStacks"; +const _RSF = "RegistrationStatusFilter"; +const _RSI = "ResourceScanId"; +const _RSIPE = "ResourceScanInProgressException"; +const _RSIo = "RollbackStackInput"; +const _RSLEE = "ResourceScanLimitExceededException"; +const _RSNFE = "ResourceScanNotFoundException"; +const _RSO = "RollbackStackOutput"; +const _RSOAR = "RetainStacksOnAccountRemoval"; +const _RSR = "ResourceStatusReason"; +const _RSS = "ResourceScanSummaries"; +const _RSSe = "ResourceScanSummary"; +const _RSe = "ResourcesScanned"; +const _RSes = "ResourceStatus"; +const _RSeso = "ResourcesSucceeded"; +const _RSo = "RollbackStack"; +const _RT = "ResourceType"; +const _RTD = "ResourceTargetDetails"; +const _RTDe = "ResourceTargetDefinition"; +const _RTI = "ResourcesToImport"; +const _RTIe = "RegisterTypeInput"; +const _RTIes = "ResourceToImport"; +const _RTL = "RegistrationTokenList"; +const _RTO = "RegisterTypeOutput"; +const _RTP = "ResourceTypePrefix"; +const _RTS = "ResourcesToSkip"; +const _RTe = "ResourceTypes"; +const _RTeg = "RegistrationToken"; +const _RTegi = "RegisterType"; +const _RTo = "RollbackTriggers"; +const _RTol = "RollbackTrigger"; +const _RV = "ResolvedValue"; +const _Re = "Regions"; +const _Rea = "Reason"; +const _Reg = "Region"; +const _Rep = "Replacement"; +const _Req = "Required"; +const _S = "Status"; +const _SA = "StagesAvailable"; +const _SD = "StackDefinitions"; +const _SDDI = "StackDriftDetectionId"; +const _SDI = "StackDriftInformation"; +const _SDIS = "StackDriftInformationSummary"; +const _SDS = "StackDriftStatus"; +const _SDt = "StackDefinition"; +const _SDta = "StatusDetails"; +const _SE = "StackEvents"; +const _SEt = "StackEvent"; +const _SF = "ScanFilters"; +const _SFc = "ScanFilter"; +const _SHP = "SchemaHandlerPackage"; +const _SI = "StackId"; +const _SIA = "StackInstanceAccount"; +const _SICS = "StackInstanceComprehensiveStatus"; +const _SIF = "StackInstanceFilter"; +const _SIFt = "StackInstanceFilters"; +const _SINFE = "StackInstanceNotFoundException"; +const _SIR = "StackInstanceRegion"; +const _SIRDS = "StackInstanceResourceDriftStatuses"; +const _SIRDSt = "StackInstanceResourceDriftsSummary"; +const _SIRDSta = "StackInstanceResourceDriftsSummaries"; +const _SIS = "StackInstanceStatus"; +const _SISt = "StackInstanceSummary"; +const _SISta = "StackInstanceSummaries"; +const _SIU = "StackIdsUrl"; +const _SIt = "StackInstance"; +const _SIta = "StackIds"; +const _SL = "SeverityLevel"; +const _SM = "StatusMessage"; +const _SMV = "SupportedMajorVersions"; +const _SN = "StackName"; +const _SNFE = "StackNotFoundException"; +const _SPB = "StackPolicyBody"; +const _SPDUB = "StackPolicyDuringUpdateBody"; +const _SPDUURL = "StackPolicyDuringUpdateURL"; +const _SPURL = "StackPolicyURL"; +const _SR = "StatusReason"; +const _SRA = "StackRefactorActions"; +const _SRAt = "StackRefactorAction"; +const _SRD = "StackResourceDrifts"; +const _SRDI = "StackResourceDriftInformation"; +const _SRDIS = "StackResourceDriftInformationSummary"; +const _SRDS = "StackResourceDriftStatus"; +const _SRDSF = "StackResourceDriftStatusFilters"; +const _SRDt = "StackResourceDetail"; +const _SRDta = "StackResourceDrift"; +const _SRE = "StaleRequestException"; +const _SRI = "StackRefactorId"; +const _SRIc = "ScannedResourceIdentifier"; +const _SRIca = "ScannedResourceIdentifiers"; +const _SRIi = "SignalResourceInput"; +const _SRNFE = "StackRefactorNotFoundException"; +const _SRS = "StackRefactorSummaries"; +const _SRSI = "StartResourceScanInput"; +const _SRSO = "StartResourceScanOutput"; +const _SRSt = "StackResourceSummaries"; +const _SRSta = "StackRefactorSummary"; +const _SRStac = "StackResourceSummary"; +const _SRStar = "StartResourceScan"; +const _SRTR = "StackRefactorTagResources"; +const _SRc = "ScannedResource"; +const _SRca = "ScannedResources"; +const _SRi = "SignalResource"; +const _SRt = "StackResources"; +const _SRta = "StackResource"; +const _SS = "StackSet"; +const _SSADTS = "StackSetAutoDeploymentTargetSummary"; +const _SSADTSt = "StackSetAutoDeploymentTargetSummaries"; +const _SSARN = "StackSetARN"; +const _SSDDD = "StackSetDriftDetectionDetails"; +const _SSF = "StackStatusFilter"; +const _SSI = "StackSetId"; +const _SSN = "StackSetName"; +const _SSNEE = "StackSetNotEmptyException"; +const _SSNFE = "StackSetNotFoundException"; +const _SSO = "StackSetOperation"; +const _SSOP = "StackSetOperationPreferences"; +const _SSORS = "StackSetOperationResultSummary"; +const _SSORSt = "StackSetOperationResultSummaries"; +const _SSOS = "StackSetOperationSummary"; +const _SSOSD = "StackSetOperationStatusDetails"; +const _SSOSt = "StackSetOperationSummaries"; +const _SSP = "SetStackPolicy"; +const _SSPI = "SetStackPolicyInput"; +const _SSR = "StackStatusReason"; +const _SSS = "StackSetSummary"; +const _SSSO = "StopStackSetOperation"; +const _SSSOI = "StopStackSetOperationInput"; +const _SSSOO = "StopStackSetOperationOutput"; +const _SSSt = "StackSetSummaries"; +const _SSt = "StackSummaries"; +const _SSta = "StackStatus"; +const _SStac = "StackSummary"; +const _ST = "StartTime"; +const _STC = "SetTypeConfiguration"; +const _STCI = "SetTypeConfigurationInput"; +const _STCO = "SetTypeConfigurationOutput"; +const _STDV = "SetTypeDefaultVersion"; +const _STDVI = "SetTypeDefaultVersionInput"; +const _STDVO = "SetTypeDefaultVersionOutput"; +const _STF = "ScanTypeFilter"; +const _STc = "ScanType"; +const _SU = "SourceUrl"; +const _Sc = "Schema"; +const _Sco = "Scope"; +const _So = "Source"; +const _St = "Stacks"; +const _Sta = "Stack"; +const _Su = "Summaries"; +const _T = "Type"; +const _TA = "TypeArn"; +const _TAEE = "TokenAlreadyExistsException"; +const _TB = "TemplateBody"; +const _TC = "TypeConfigurations"; +const _TCA = "TypeConfigurationAlias"; +const _TCAy = "TypeConfigurationArn"; +const _TCD = "TypeConfigurationDetails"; +const _TCDL = "TypeConfigurationDetailsList"; +const _TCI = "TypeConfigurationIdentifier"; +const _TCIy = "TypeConfigurationIdentifiers"; +const _TCNFE = "TypeConfigurationNotFoundException"; +const _TCVI = "TypeConfigurationVersionId"; +const _TCe = "TemplateConfiguration"; +const _TCi = "TimeCreated"; +const _TD = "TargetDetails"; +const _TDe = "TemplateDescription"; +const _TF = "TypeFilters"; +const _TH = "TypeHierarchy"; +const _TI = "TargetId"; +const _TIM = "TimeoutInMinutes"; +const _TK = "TagKey"; +const _TN = "TypeName"; +const _TNA = "TypeNameAlias"; +const _TNFE = "TypeNotFoundException"; +const _TNP = "TypeNamePrefix"; +const _TP = "TemplateParameter"; +const _TPe = "TemplateProgress"; +const _TPem = "TemplateParameters"; +const _TR = "TagResources"; +const _TS = "TemplateStage"; +const _TSC = "TemplateSummaryConfig"; +const _TSIC = "TotalStackInstancesCount"; +const _TSe = "TemplateSummary"; +const _TSem = "TemplateSummaries"; +const _TSy = "TypeSummaries"; +const _TSyp = "TypeSummary"; +const _TT = "TargetType"; +const _TTI = "TestTypeInput"; +const _TTN = "TargetTypeName"; +const _TTO = "TestTypeOutput"; +const _TTS = "TypeTestsStatus"; +const _TTSD = "TypeTestsStatusDescription"; +const _TTe = "TestType"; +const _TURL = "TemplateURL"; +const _TURTAW = "TreatUnrecognizedResourceTypesAsWarnings"; +const _TV = "TagValue"; +const _TVA = "TypeVersionArn"; +const _TVI = "TypeVersionId"; +const _TVS = "TypeVersionSummaries"; +const _TVSy = "TypeVersionSummary"; +const _TW = "TotalWarnings"; +const _Ta = "Tags"; +const _Tag = "Tag"; +const _Tar = "Target"; +const _Ti = "Timestamp"; +const _Ty = "Types"; +const _U = "Url"; +const _UGT = "UpdateGeneratedTemplate"; +const _UGTI = "UpdateGeneratedTemplateInput"; +const _UGTO = "UpdateGeneratedTemplateOutput"; +const _UI = "UniqueId"; +const _UPT = "UsePreviousTemplate"; +const _UPV = "UsePreviousValue"; +const _UR = "UntagResources"; +const _URP = "UpdateReplacePolicy"; +const _URT = "UnrecognizedResourceTypes"; +const _US = "UpdateStack"; +const _USI = "UpdateStackInput"; +const _USII = "UpdateStackInstancesInput"; +const _USIO = "UpdateStackInstancesOutput"; +const _USIp = "UpdateStackInstances"; +const _USO = "UpdateStackOutput"; +const _USS = "UpdateStackSet"; +const _USSI = "UpdateStackSetInput"; +const _USSO = "UpdateStackSetOutput"; +const _UTC = "UnprocessedTypeConfigurations"; +const _UTP = "UpdateTerminationProtection"; +const _UTPI = "UpdateTerminationProtectionInput"; +const _UTPO = "UpdateTerminationProtectionOutput"; +const _V = "Value"; +const _VB = "VersionBump"; +const _VFM = "ValidationFailureMode"; +const _VI = "VersionId"; +const _VN = "ValidationName"; +const _VP = "ValidationPath"; +const _VS = "ValidationStatus"; +const _VSR = "ValidationStatusReason"; +const _VT = "ValidateTemplate"; +const _VTI = "ValidateTemplateInput"; +const _VTO = "ValidateTemplateOutput"; +const _Va = "Values"; +const _Ve = "Version"; +const _Vi = "Visibility"; +const _W = "Warnings"; +const _WD = "WarningDetail"; +const _WDa = "WarningDetails"; +const _WP = "WarningProperty"; +const _WPa = "WarningProperties"; +const _aQE = "awsQueryError"; +const _c = "client"; +const _e = "error"; +const _hE = "httpError"; +const _s = "smithy.ts.sdk.synthetic.com.amazonaws.cloudformation"; +const n0 = "com.amazonaws.cloudformation"; +const schema_1 = __nccwpck_require__(6890); +const CloudFormationServiceException_1 = __nccwpck_require__(22); +const errors_1 = __nccwpck_require__(4689); +const _s_registry = schema_1.TypeRegistry.for(_s); +exports.CloudFormationServiceException$ = [-3, _s, "CloudFormationServiceException", 0, [], []]; +_s_registry.registerError(exports.CloudFormationServiceException$, CloudFormationServiceException_1.CloudFormationServiceException); +const n0_registry = schema_1.TypeRegistry.for(n0); +exports.AlreadyExistsException$ = [-3, n0, _AEE, + { [_aQE]: [`AlreadyExistsException`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.AlreadyExistsException$, errors_1.AlreadyExistsException); +exports.CFNRegistryException$ = [-3, n0, _CFNRE, + { [_aQE]: [`CFNRegistryException`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.CFNRegistryException$, errors_1.CFNRegistryException); +exports.ChangeSetNotFoundException$ = [-3, n0, _CSNFE, + { [_aQE]: [`ChangeSetNotFound`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.ChangeSetNotFoundException$, errors_1.ChangeSetNotFoundException); +exports.ConcurrentResourcesLimitExceededException$ = [-3, n0, _CRLEE, + { [_aQE]: [`ConcurrentResourcesLimitExceeded`, 429], [_e]: _c, [_hE]: 429 }, + [_M], + [0] +]; +n0_registry.registerError(exports.ConcurrentResourcesLimitExceededException$, errors_1.ConcurrentResourcesLimitExceededException); +exports.CreatedButModifiedException$ = [-3, n0, _CBME, + { [_aQE]: [`CreatedButModifiedException`, 409], [_e]: _c, [_hE]: 409 }, + [_M], + [0] +]; +n0_registry.registerError(exports.CreatedButModifiedException$, errors_1.CreatedButModifiedException); +exports.GeneratedTemplateNotFoundException$ = [-3, n0, _GTNFE, + { [_aQE]: [`GeneratedTemplateNotFound`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.GeneratedTemplateNotFoundException$, errors_1.GeneratedTemplateNotFoundException); +exports.HookResultNotFoundException$ = [-3, n0, _HRNFE, + { [_aQE]: [`HookResultNotFound`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.HookResultNotFoundException$, errors_1.HookResultNotFoundException); +exports.InsufficientCapabilitiesException$ = [-3, n0, _ICE, + { [_aQE]: [`InsufficientCapabilitiesException`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.InsufficientCapabilitiesException$, errors_1.InsufficientCapabilitiesException); +exports.InvalidChangeSetStatusException$ = [-3, n0, _ICSSE, + { [_aQE]: [`InvalidChangeSetStatus`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.InvalidChangeSetStatusException$, errors_1.InvalidChangeSetStatusException); +exports.InvalidOperationException$ = [-3, n0, _IOE, + { [_aQE]: [`InvalidOperationException`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.InvalidOperationException$, errors_1.InvalidOperationException); +exports.InvalidStateTransitionException$ = [-3, n0, _ISTE, + { [_aQE]: [`InvalidStateTransition`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.InvalidStateTransitionException$, errors_1.InvalidStateTransitionException); +exports.LimitExceededException$ = [-3, n0, _LEE, + { [_aQE]: [`LimitExceededException`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.LimitExceededException$, errors_1.LimitExceededException); +exports.NameAlreadyExistsException$ = [-3, n0, _NAEE, + { [_aQE]: [`NameAlreadyExistsException`, 409], [_e]: _c, [_hE]: 409 }, + [_M], + [0] +]; +n0_registry.registerError(exports.NameAlreadyExistsException$, errors_1.NameAlreadyExistsException); +exports.OperationIdAlreadyExistsException$ = [-3, n0, _OIAEE, + { [_aQE]: [`OperationIdAlreadyExistsException`, 409], [_e]: _c, [_hE]: 409 }, + [_M], + [0] +]; +n0_registry.registerError(exports.OperationIdAlreadyExistsException$, errors_1.OperationIdAlreadyExistsException); +exports.OperationInProgressException$ = [-3, n0, _OIPE, + { [_aQE]: [`OperationInProgressException`, 409], [_e]: _c, [_hE]: 409 }, + [_M], + [0] +]; +n0_registry.registerError(exports.OperationInProgressException$, errors_1.OperationInProgressException); +exports.OperationNotFoundException$ = [-3, n0, _ONFE, + { [_aQE]: [`OperationNotFoundException`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.OperationNotFoundException$, errors_1.OperationNotFoundException); +exports.OperationStatusCheckFailedException$ = [-3, n0, _OSCFE, + { [_aQE]: [`ConditionalCheckFailed`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.OperationStatusCheckFailedException$, errors_1.OperationStatusCheckFailedException); +exports.ResourceScanInProgressException$ = [-3, n0, _RSIPE, + { [_aQE]: [`ResourceScanInProgress`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.ResourceScanInProgressException$, errors_1.ResourceScanInProgressException); +exports.ResourceScanLimitExceededException$ = [-3, n0, _RSLEE, + { [_aQE]: [`ResourceScanLimitExceeded`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.ResourceScanLimitExceededException$, errors_1.ResourceScanLimitExceededException); +exports.ResourceScanNotFoundException$ = [-3, n0, _RSNFE, + { [_aQE]: [`ResourceScanNotFound`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.ResourceScanNotFoundException$, errors_1.ResourceScanNotFoundException); +exports.StackInstanceNotFoundException$ = [-3, n0, _SINFE, + { [_aQE]: [`StackInstanceNotFoundException`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.StackInstanceNotFoundException$, errors_1.StackInstanceNotFoundException); +exports.StackNotFoundException$ = [-3, n0, _SNFE, + { [_aQE]: [`StackNotFoundException`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.StackNotFoundException$, errors_1.StackNotFoundException); +exports.StackRefactorNotFoundException$ = [-3, n0, _SRNFE, + { [_aQE]: [`StackRefactorNotFoundException`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.StackRefactorNotFoundException$, errors_1.StackRefactorNotFoundException); +exports.StackSetNotEmptyException$ = [-3, n0, _SSNEE, + { [_aQE]: [`StackSetNotEmptyException`, 409], [_e]: _c, [_hE]: 409 }, + [_M], + [0] +]; +n0_registry.registerError(exports.StackSetNotEmptyException$, errors_1.StackSetNotEmptyException); +exports.StackSetNotFoundException$ = [-3, n0, _SSNFE, + { [_aQE]: [`StackSetNotFoundException`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.StackSetNotFoundException$, errors_1.StackSetNotFoundException); +exports.StaleRequestException$ = [-3, n0, _SRE, + { [_aQE]: [`StaleRequestException`, 409], [_e]: _c, [_hE]: 409 }, + [_M], + [0] +]; +n0_registry.registerError(exports.StaleRequestException$, errors_1.StaleRequestException); +exports.TokenAlreadyExistsException$ = [-3, n0, _TAEE, + { [_aQE]: [`TokenAlreadyExistsException`, 400], [_e]: _c, [_hE]: 400 }, + [_M], + [0] +]; +n0_registry.registerError(exports.TokenAlreadyExistsException$, errors_1.TokenAlreadyExistsException); +exports.TypeConfigurationNotFoundException$ = [-3, n0, _TCNFE, + { [_aQE]: [`TypeConfigurationNotFoundException`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.TypeConfigurationNotFoundException$, errors_1.TypeConfigurationNotFoundException); +exports.TypeNotFoundException$ = [-3, n0, _TNFE, + { [_aQE]: [`TypeNotFoundException`, 404], [_e]: _c, [_hE]: 404 }, + [_M], + [0] +]; +n0_registry.registerError(exports.TypeNotFoundException$, errors_1.TypeNotFoundException); +exports.errorTypeRegistries = [ + _s_registry, + n0_registry, +]; +exports.AccountGateResult$ = [3, n0, _AGR, + 0, + [_S, _SR], + [0, 0] +]; +exports.AccountLimit$ = [3, n0, _AL, + 0, + [_N, _V], + [0, 1] +]; +exports.ActivateOrganizationsAccessInput$ = [3, n0, _AOAI, + 0, + [], + [] +]; +exports.ActivateOrganizationsAccessOutput$ = [3, n0, _AOAO, + 0, + [], + [] +]; +exports.ActivateTypeInput$ = [3, n0, _ATI, + 0, + [_T, _PTA, _PI, _TN, _TNA, _AU, _LC, _ERA, _VB, _MV], + [0, 0, 0, 0, 0, 2, () => exports.LoggingConfig$, 0, 0, 1] +]; +exports.ActivateTypeOutput$ = [3, n0, _ATO, + 0, + [_A], + [0] +]; +exports.Annotation$ = [3, n0, _An, + 0, + [_AN, _S, _SM, _RM, _RL, _SL], + [0, 0, 0, 0, 0, 0] +]; +exports.AutoDeployment$ = [3, n0, _AD, + 0, + [_E, _RSOAR, _DO], + [2, 2, 64 | 0] +]; +exports.BatchDescribeTypeConfigurationsError$ = [3, n0, _BDTCE, + 0, + [_EC, _EM, _TCI], + [0, 0, () => exports.TypeConfigurationIdentifier$] +]; +exports.BatchDescribeTypeConfigurationsInput$ = [3, n0, _BDTCI, + 0, + [_TCIy], + [() => TypeConfigurationIdentifiers], 1 +]; +exports.BatchDescribeTypeConfigurationsOutput$ = [3, n0, _BDTCO, + 0, + [_Er, _UTC, _TC], + [() => BatchDescribeTypeConfigurationsErrors, () => UnprocessedTypeConfigurations, () => TypeConfigurationDetailsList] +]; +exports.CancelUpdateStackInput$ = [3, n0, _CUSI, + 0, + [_SN, _CRT], + [0, 0], 1 +]; +exports.Change$ = [3, n0, _C, + 0, + [_T, _HIC, _RC], + [0, 1, () => exports.ResourceChange$] +]; +exports.ChangeSetHook$ = [3, n0, _CSH, + 0, + [_IP, _FM, _TN, _TVI, _TCVI, _TD], + [0, 0, 0, 0, 0, () => exports.ChangeSetHookTargetDetails$] +]; +exports.ChangeSetHookResourceTargetDetails$ = [3, n0, _CSHRTD, + 0, + [_LRI, _RT, _RA], + [0, 0, 0] +]; +exports.ChangeSetHookTargetDetails$ = [3, n0, _CSHTD, + 0, + [_TT, _RTD], + [0, () => exports.ChangeSetHookResourceTargetDetails$] +]; +exports.ChangeSetSummary$ = [3, n0, _CSS, + 0, + [_SI, _SN, _CSI, _CSN, _ES, _S, _SR, _CT, _D, _INS, _PCSI, _RCSI, _IER], + [0, 0, 0, 0, 0, 0, 0, 4, 0, 2, 0, 0, 2] +]; +exports.ContinueUpdateRollbackInput$ = [3, n0, _CURI, + 0, + [_SN, _RARN, _RTS, _CRT], + [0, 0, 64 | 0, 0], 1 +]; +exports.ContinueUpdateRollbackOutput$ = [3, n0, _CURO, + 0, + [], + [] +]; +exports.CreateChangeSetInput$ = [3, n0, _CCSI, + 0, + [_SN, _CSN, _TB, _TURL, _UPT, _P, _Ca, _RTe, _RARN, _RCo, _NARN, _Ta, _CTl, _D, _CST, _RTI, _INS, _OSF, _IER, _DM], + [0, 0, 0, 0, 2, () => _Parameters, 64 | 0, 64 | 0, 0, () => exports.RollbackConfiguration$, 64 | 0, () => Tags, 0, 0, 0, () => ResourcesToImport, 2, 0, 2, 0], 2 +]; +exports.CreateChangeSetOutput$ = [3, n0, _CCSO, + 0, + [_I, _SI], + [0, 0] +]; +exports.CreateGeneratedTemplateInput$ = [3, n0, _CGTI, + 0, + [_GTN, _R, _SN, _TCe], + [0, () => ResourceDefinitions, 0, () => exports.TemplateConfiguration$], 1 +]; +exports.CreateGeneratedTemplateOutput$ = [3, n0, _CGTO, + 0, + [_GTI], + [0] +]; +exports.CreateStackInput$ = [3, n0, _CSIr, + 0, + [_SN, _TB, _TURL, _P, _DR, _RCo, _TIM, _NARN, _Ca, _RTe, _RARN, _OF, _SPB, _SPURL, _Ta, _CRT, _ETP, _REOC], + [0, 0, 0, () => _Parameters, 2, () => exports.RollbackConfiguration$, 1, 64 | 0, 64 | 0, 64 | 0, 0, 0, 0, 0, () => Tags, 0, 2, 2], 1 +]; +exports.CreateStackInstancesInput$ = [3, n0, _CSII, + 0, + [_SSN, _Re, _Ac, _DT, _PO, _OP, _OI, _CA], + [0, 64 | 0, 64 | 0, () => exports.DeploymentTargets$, () => _Parameters, () => exports.StackSetOperationPreferences$, [0, 4], 0], 2 +]; +exports.CreateStackInstancesOutput$ = [3, n0, _CSIO, + 0, + [_OI], + [0] +]; +exports.CreateStackOutput$ = [3, n0, _CSO, + 0, + [_SI, _OI], + [0, 0] +]; +exports.CreateStackRefactorInput$ = [3, n0, _CSRI, + 0, + [_SD, _D, _ESC, _RMe], + [() => StackDefinitions, 0, 2, () => ResourceMappings], 1 +]; +exports.CreateStackRefactorOutput$ = [3, n0, _CSRO, + 0, + [_SRI], + [0], 1 +]; +exports.CreateStackSetInput$ = [3, n0, _CSSI, + 0, + [_SSN, _D, _TB, _TURL, _SI, _P, _Ca, _Ta, _ARARN, _ERN, _PM, _AD, _CA, _CRT, _ME], + [0, 0, 0, 0, 0, () => _Parameters, 64 | 0, () => Tags, 0, 0, 0, () => exports.AutoDeployment$, 0, [0, 4], () => exports.ManagedExecution$], 1 +]; +exports.CreateStackSetOutput$ = [3, n0, _CSSO, + 0, + [_SSI], + [0] +]; +exports.DeactivateOrganizationsAccessInput$ = [3, n0, _DOAI, + 0, + [], + [] +]; +exports.DeactivateOrganizationsAccessOutput$ = [3, n0, _DOAO, + 0, + [], + [] +]; +exports.DeactivateTypeInput$ = [3, n0, _DTI, + 0, + [_TN, _T, _A], + [0, 0, 0] +]; +exports.DeactivateTypeOutput$ = [3, n0, _DTO, + 0, + [], + [] +]; +exports.DeleteChangeSetInput$ = [3, n0, _DCSI, + 0, + [_CSN, _SN], + [0, 0], 1 +]; +exports.DeleteChangeSetOutput$ = [3, n0, _DCSO, + 0, + [], + [] +]; +exports.DeleteGeneratedTemplateInput$ = [3, n0, _DGTI, + 0, + [_GTN], + [0], 1 +]; +exports.DeleteStackInput$ = [3, n0, _DSI, + 0, + [_SN, _RR, _RARN, _CRT, _DMe], + [0, 64 | 0, 0, 0, 0], 1 +]; +exports.DeleteStackInstancesInput$ = [3, n0, _DSII, + 0, + [_SSN, _Re, _RS, _Ac, _DT, _OP, _OI, _CA], + [0, 64 | 0, 2, 64 | 0, () => exports.DeploymentTargets$, () => exports.StackSetOperationPreferences$, [0, 4], 0], 3 +]; +exports.DeleteStackInstancesOutput$ = [3, n0, _DSIO, + 0, + [_OI], + [0] +]; +exports.DeleteStackSetInput$ = [3, n0, _DSSI, + 0, + [_SSN, _CA], + [0, 0], 1 +]; +exports.DeleteStackSetOutput$ = [3, n0, _DSSO, + 0, + [], + [] +]; +exports.DeploymentTargets$ = [3, n0, _DT, + 0, + [_Ac, _AUc, _OUI, _AFT], + [64 | 0, 0, 64 | 0, 0] +]; +exports.DeregisterTypeInput$ = [3, n0, _DTIe, + 0, + [_A, _T, _TN, _VI], + [0, 0, 0, 0] +]; +exports.DeregisterTypeOutput$ = [3, n0, _DTOe, + 0, + [], + [] +]; +exports.DescribeAccountLimitsInput$ = [3, n0, _DALI, + 0, + [_NT], + [0] +]; +exports.DescribeAccountLimitsOutput$ = [3, n0, _DALO, + 0, + [_ALc, _NT], + [() => AccountLimitList, 0] +]; +exports.DescribeChangeSetHooksInput$ = [3, n0, _DCSHI, + 0, + [_CSN, _SN, _NT, _LRI], + [0, 0, 0, 0], 1 +]; +exports.DescribeChangeSetHooksOutput$ = [3, n0, _DCSHO, + 0, + [_CSI, _CSN, _H, _S, _NT, _SI, _SN], + [0, 0, () => ChangeSetHooks, 0, 0, 0, 0] +]; +exports.DescribeChangeSetInput$ = [3, n0, _DCSIe, + 0, + [_CSN, _SN, _NT, _IPV], + [0, 0, 0, 2], 1 +]; +exports.DescribeChangeSetOutput$ = [3, n0, _DCSOe, + 0, + [_CSN, _CSI, _SI, _SN, _D, _P, _CT, _ES, _S, _SR, _SDS, _NARN, _RCo, _Ca, _Ta, _Ch, _NT, _INS, _PCSI, _RCSI, _OSF, _IER, _DM], + [0, 0, 0, 0, 0, () => _Parameters, 4, 0, 0, 0, 0, 64 | 0, () => exports.RollbackConfiguration$, 64 | 0, () => Tags, () => Changes, 0, 2, 0, 0, 0, 2, 0] +]; +exports.DescribeEventsInput$ = [3, n0, _DEI, + 0, + [_SN, _CSN, _OI, _F, _NT], + [0, 0, 0, () => exports.EventFilter$, 0] +]; +exports.DescribeEventsOutput$ = [3, n0, _DEO, + 0, + [_OE, _NT], + [() => OperationEvents, 0] +]; +exports.DescribeGeneratedTemplateInput$ = [3, n0, _DGTIe, + 0, + [_GTN], + [0], 1 +]; +exports.DescribeGeneratedTemplateOutput$ = [3, n0, _DGTO, + 0, + [_GTI, _GTN, _R, _S, _SR, _CT, _LUT, _Pr, _SI, _TCe, _TW], + [0, 0, () => ResourceDetails, 0, 0, 4, 4, () => exports.TemplateProgress$, 0, () => exports.TemplateConfiguration$, 1] +]; +exports.DescribeOrganizationsAccessInput$ = [3, n0, _DOAIe, + 0, + [_CA], + [0] +]; +exports.DescribeOrganizationsAccessOutput$ = [3, n0, _DOAOe, + 0, + [_S], + [0] +]; +exports.DescribePublisherInput$ = [3, n0, _DPI, + 0, + [_PI], + [0] +]; +exports.DescribePublisherOutput$ = [3, n0, _DPO, + 0, + [_PI, _PS, _IPd, _PP], + [0, 0, 0, 0] +]; +exports.DescribeResourceScanInput$ = [3, n0, _DRSI, + 0, + [_RSI], + [0], 1 +]; +exports.DescribeResourceScanOutput$ = [3, n0, _DRSO, + 0, + [_RSI, _S, _SR, _ST, _ET, _PC, _RTe, _RSe, _RRe, _SF], + [0, 0, 0, 4, 4, 1, 64 | 0, 1, 1, () => ScanFilters] +]; +exports.DescribeStackDriftDetectionStatusInput$ = [3, n0, _DSDDSI, + 0, + [_SDDI], + [0], 1 +]; +exports.DescribeStackDriftDetectionStatusOutput$ = [3, n0, _DSDDSO, + 0, + [_SI, _SDDI, _DS, _Ti, _SDS, _DSR, _DSRC], + [0, 0, 0, 4, 0, 0, 1], 4 +]; +exports.DescribeStackEventsInput$ = [3, n0, _DSEI, + 0, + [_SN, _NT], + [0, 0], 1 +]; +exports.DescribeStackEventsOutput$ = [3, n0, _DSEO, + 0, + [_SE, _NT], + [() => StackEvents, 0] +]; +exports.DescribeStackInstanceInput$ = [3, n0, _DSIIe, + 0, + [_SSN, _SIA, _SIR, _CA], + [0, 0, 0, 0], 3 +]; +exports.DescribeStackInstanceOutput$ = [3, n0, _DSIOe, + 0, + [_SIt], + [() => exports.StackInstance$] +]; +exports.DescribeStackRefactorInput$ = [3, n0, _DSRI, + 0, + [_SRI], + [0], 1 +]; +exports.DescribeStackRefactorOutput$ = [3, n0, _DSRO, + 0, + [_D, _SRI, _SIta, _ES, _ESR, _S, _SR], + [0, 0, 64 | 0, 0, 0, 0, 0] +]; +exports.DescribeStackResourceDriftsInput$ = [3, n0, _DSRDI, + 0, + [_SN, _SRDSF, _NT, _MR], + [0, 64 | 0, 0, 1], 1 +]; +exports.DescribeStackResourceDriftsOutput$ = [3, n0, _DSRDO, + 0, + [_SRD, _NT], + [() => StackResourceDrifts, 0], 1 +]; +exports.DescribeStackResourceInput$ = [3, n0, _DSRIe, + 0, + [_SN, _LRI], + [0, 0], 2 +]; +exports.DescribeStackResourceOutput$ = [3, n0, _DSROe, + 0, + [_SRDt], + [() => exports.StackResourceDetail$] +]; +exports.DescribeStackResourcesInput$ = [3, n0, _DSRIes, + 0, + [_SN, _LRI, _PRI], + [0, 0, 0] +]; +exports.DescribeStackResourcesOutput$ = [3, n0, _DSROes, + 0, + [_SRt], + [() => StackResources] +]; +exports.DescribeStackSetInput$ = [3, n0, _DSSIe, + 0, + [_SSN, _CA], + [0, 0], 1 +]; +exports.DescribeStackSetOperationInput$ = [3, n0, _DSSOI, + 0, + [_SSN, _OI, _CA], + [0, 0, 0], 2 +]; +exports.DescribeStackSetOperationOutput$ = [3, n0, _DSSOO, + 0, + [_SSO], + [() => exports.StackSetOperation$] +]; +exports.DescribeStackSetOutput$ = [3, n0, _DSSOe, + 0, + [_SS], + [() => exports.StackSet$] +]; +exports.DescribeStacksInput$ = [3, n0, _DSIe, + 0, + [_SN, _NT], + [0, 0] +]; +exports.DescribeStacksOutput$ = [3, n0, _DSO, + 0, + [_St, _NT], + [() => Stacks, 0] +]; +exports.DescribeTypeInput$ = [3, n0, _DTIes, + 0, + [_T, _TN, _A, _VI, _PI, _PVN], + [0, 0, 0, 0, 0, 0] +]; +exports.DescribeTypeOutput$ = [3, n0, _DTOes, + 0, + [_A, _T, _TN, _DVI, _IDV, _TTS, _TTSD, _D, _Sc, _PT, _DSe, _LC, _RAT, _ERA, _Vi, _SU, _DU, _LU, _TCi, _CS, _PI, _OTN, _OTA, _PVN, _LPV, _IA, _AU], + [0, 0, 0, 0, 2, 0, 0, 0, 0, 0, 0, () => exports.LoggingConfig$, () => RequiredActivatedTypes, 0, 0, 0, 0, 4, 4, 0, 0, 0, 0, 0, 0, 2, 2] +]; +exports.DescribeTypeRegistrationInput$ = [3, n0, _DTRI, + 0, + [_RTeg], + [0], 1 +]; +exports.DescribeTypeRegistrationOutput$ = [3, n0, _DTRO, + 0, + [_PSr, _D, _TA, _TVA], + [0, 0, 0, 0] +]; +exports.DetectStackDriftInput$ = [3, n0, _DSDI, + 0, + [_SN, _LRIo], + [0, 64 | 0], 1 +]; +exports.DetectStackDriftOutput$ = [3, n0, _DSDO, + 0, + [_SDDI], + [0], 1 +]; +exports.DetectStackResourceDriftInput$ = [3, n0, _DSRDIe, + 0, + [_SN, _LRI], + [0, 0], 2 +]; +exports.DetectStackResourceDriftOutput$ = [3, n0, _DSRDOe, + 0, + [_SRDta], + [() => exports.StackResourceDrift$], 1 +]; +exports.DetectStackSetDriftInput$ = [3, n0, _DSSDI, + 0, + [_SSN, _OP, _OI, _CA], + [0, () => exports.StackSetOperationPreferences$, [0, 4], 0], 1 +]; +exports.DetectStackSetDriftOutput$ = [3, n0, _DSSDO, + 0, + [_OI], + [0] +]; +exports.EstimateTemplateCostInput$ = [3, n0, _ETCI, + 0, + [_TB, _TURL, _P], + [0, 0, () => _Parameters] +]; +exports.EstimateTemplateCostOutput$ = [3, n0, _ETCO, + 0, + [_U], + [0] +]; +exports.EventFilter$ = [3, n0, _EF, + 0, + [_FE], + [2] +]; +exports.ExecuteChangeSetInput$ = [3, n0, _ECSI, + 0, + [_CSN, _SN, _CRT, _DR, _REOC], + [0, 0, 0, 2, 2], 1 +]; +exports.ExecuteChangeSetOutput$ = [3, n0, _ECSO, + 0, + [], + [] +]; +exports.ExecuteStackRefactorInput$ = [3, n0, _ESRI, + 0, + [_SRI], + [0], 1 +]; +exports.Export$ = [3, n0, _Ex, + 0, + [_ESI, _N, _V], + [0, 0, 0] +]; +exports.GetGeneratedTemplateInput$ = [3, n0, _GGTI, + 0, + [_GTN, _Fo], + [0, 0], 1 +]; +exports.GetGeneratedTemplateOutput$ = [3, n0, _GGTO, + 0, + [_S, _TB], + [0, 0] +]; +exports.GetHookResultInput$ = [3, n0, _GHRI, + 0, + [_HRI], + [0] +]; +exports.GetHookResultOutput$ = [3, n0, _GHRO, + 0, + [_HRI, _IP, _FM, _TN, _OTN, _TVI, _TCVI, _TA, _S, _HSR, _IAn, _Tar, _Ann], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, () => exports.HookTarget$, () => AnnotationList] +]; +exports.GetStackPolicyInput$ = [3, n0, _GSPI, + 0, + [_SN], + [0], 1 +]; +exports.GetStackPolicyOutput$ = [3, n0, _GSPO, + 0, + [_SPB], + [0] +]; +exports.GetTemplateInput$ = [3, n0, _GTIe, + 0, + [_SN, _CSN, _TS], + [0, 0, 0] +]; +exports.GetTemplateOutput$ = [3, n0, _GTO, + 0, + [_TB, _SA], + [0, 64 | 0] +]; +exports.GetTemplateSummaryInput$ = [3, n0, _GTSI, + 0, + [_TB, _TURL, _SN, _SSN, _CA, _TSC], + [0, 0, 0, 0, 0, () => exports.TemplateSummaryConfig$] +]; +exports.GetTemplateSummaryOutput$ = [3, n0, _GTSO, + 0, + [_P, _D, _Ca, _CR, _RTe, _Ve, _Me, _DTe, _RIS, _W], + [() => ParameterDeclarations, 0, 64 | 0, 0, 64 | 0, 0, 0, 64 | 0, () => ResourceIdentifierSummaries, () => exports.Warnings$] +]; +exports.HookResultSummary$ = [3, n0, _HRS, + 0, + [_HRI, _IP, _FM, _TN, _TVI, _TCVI, _S, _HSR, _IAn, _TT, _TI, _TA, _HET], + [0, 0, 0, 0, 0, 0, 0, 0, 4, 0, 0, 0, 0] +]; +exports.HookTarget$ = [3, n0, _HT, + 0, + [_TT, _TTN, _TI, _Act], + [0, 0, 0, 0], 4 +]; +exports.ImportStacksToStackSetInput$ = [3, n0, _ISTSSI, + 0, + [_SSN, _SIta, _SIU, _OUI, _OP, _OI, _CA], + [0, 64 | 0, 0, 64 | 0, () => exports.StackSetOperationPreferences$, [0, 4], 0], 1 +]; +exports.ImportStacksToStackSetOutput$ = [3, n0, _ISTSSO, + 0, + [_OI], + [0] +]; +exports.ListChangeSetsInput$ = [3, n0, _LCSI, + 0, + [_SN, _NT], + [0, 0], 1 +]; +exports.ListChangeSetsOutput$ = [3, n0, _LCSO, + 0, + [_Su, _NT], + [() => ChangeSetSummaries, 0] +]; +exports.ListExportsInput$ = [3, n0, _LEI, + 0, + [_NT], + [0] +]; +exports.ListExportsOutput$ = [3, n0, _LEO, + 0, + [_Exp, _NT], + [() => Exports, 0] +]; +exports.ListGeneratedTemplatesInput$ = [3, n0, _LGTI, + 0, + [_NT, _MR], + [0, 1] +]; +exports.ListGeneratedTemplatesOutput$ = [3, n0, _LGTO, + 0, + [_Su, _NT], + [() => TemplateSummaries, 0] +]; +exports.ListHookResultsInput$ = [3, n0, _LHRI, + 0, + [_TT, _TI, _TA, _S, _NT], + [0, 0, 0, 0, 0] +]; +exports.ListHookResultsOutput$ = [3, n0, _LHRO, + 0, + [_TT, _TI, _HR, _NT], + [0, 0, () => HookResultSummaries, 0] +]; +exports.ListImportsInput$ = [3, n0, _LII, + 0, + [_EN, _NT], + [0, 0], 1 +]; +exports.ListImportsOutput$ = [3, n0, _LIO, + 0, + [_Im, _NT], + [64 | 0, 0] +]; +exports.ListResourceScanRelatedResourcesInput$ = [3, n0, _LRSRRI, + 0, + [_RSI, _R, _NT, _MR], + [0, () => ScannedResourceIdentifiers, 0, 1], 2 +]; +exports.ListResourceScanRelatedResourcesOutput$ = [3, n0, _LRSRRO, + 0, + [_RRel, _NT], + [() => RelatedResources, 0] +]; +exports.ListResourceScanResourcesInput$ = [3, n0, _LRSRI, + 0, + [_RSI, _RI, _RTP, _TK, _TV, _NT, _MR], + [0, 0, 0, 0, 0, 0, 1], 1 +]; +exports.ListResourceScanResourcesOutput$ = [3, n0, _LRSRO, + 0, + [_R, _NT], + [() => ScannedResources, 0] +]; +exports.ListResourceScansInput$ = [3, n0, _LRSI, + 0, + [_NT, _MR, _STF], + [0, 1, 0] +]; +exports.ListResourceScansOutput$ = [3, n0, _LRSO, + 0, + [_RSS, _NT], + [() => ResourceScanSummaries, 0] +]; +exports.ListStackInstanceResourceDriftsInput$ = [3, n0, _LSIRDI, + 0, + [_SSN, _SIA, _SIR, _OI, _NT, _MR, _SIRDS, _CA], + [0, 0, 0, 0, 0, 1, 64 | 0, 0], 4 +]; +exports.ListStackInstanceResourceDriftsOutput$ = [3, n0, _LSIRDO, + 0, + [_Su, _NT], + [() => StackInstanceResourceDriftsSummaries, 0] +]; +exports.ListStackInstancesInput$ = [3, n0, _LSII, + 0, + [_SSN, _NT, _MR, _F, _SIA, _SIR, _CA], + [0, 0, 1, () => StackInstanceFilters, 0, 0, 0], 1 +]; +exports.ListStackInstancesOutput$ = [3, n0, _LSIO, + 0, + [_Su, _NT], + [() => StackInstanceSummaries, 0] +]; +exports.ListStackRefactorActionsInput$ = [3, n0, _LSRAI, + 0, + [_SRI, _NT, _MR], + [0, 0, 1], 1 +]; +exports.ListStackRefactorActionsOutput$ = [3, n0, _LSRAO, + 0, + [_SRA, _NT], + [() => StackRefactorActions, 0], 1 +]; +exports.ListStackRefactorsInput$ = [3, n0, _LSRI, + 0, + [_ESF, _NT, _MR], + [64 | 0, 0, 1] +]; +exports.ListStackRefactorsOutput$ = [3, n0, _LSRO, + 0, + [_SRS, _NT], + [() => StackRefactorSummaries, 0], 1 +]; +exports.ListStackResourcesInput$ = [3, n0, _LSRIi, + 0, + [_SN, _NT], + [0, 0], 1 +]; +exports.ListStackResourcesOutput$ = [3, n0, _LSROi, + 0, + [_SRSt, _NT], + [() => StackResourceSummaries, 0] +]; +exports.ListStackSetAutoDeploymentTargetsInput$ = [3, n0, _LSSADTI, + 0, + [_SSN, _NT, _MR, _CA], + [0, 0, 1, 0], 1 +]; +exports.ListStackSetAutoDeploymentTargetsOutput$ = [3, n0, _LSSADTO, + 0, + [_Su, _NT], + [() => StackSetAutoDeploymentTargetSummaries, 0] +]; +exports.ListStackSetOperationResultsInput$ = [3, n0, _LSSORI, + 0, + [_SSN, _OI, _NT, _MR, _CA, _F], + [0, 0, 0, 1, 0, () => OperationResultFilters], 2 +]; +exports.ListStackSetOperationResultsOutput$ = [3, n0, _LSSORO, + 0, + [_Su, _NT], + [() => StackSetOperationResultSummaries, 0] +]; +exports.ListStackSetOperationsInput$ = [3, n0, _LSSOI, + 0, + [_SSN, _NT, _MR, _CA], + [0, 0, 1, 0], 1 +]; +exports.ListStackSetOperationsOutput$ = [3, n0, _LSSOO, + 0, + [_Su, _NT], + [() => StackSetOperationSummaries, 0] +]; +exports.ListStackSetsInput$ = [3, n0, _LSSI, + 0, + [_NT, _MR, _S, _CA], + [0, 1, 0, 0] +]; +exports.ListStackSetsOutput$ = [3, n0, _LSSO, + 0, + [_Su, _NT], + [() => StackSetSummaries, 0] +]; +exports.ListStacksInput$ = [3, n0, _LSI, + 0, + [_NT, _SSF], + [0, 64 | 0] +]; +exports.ListStacksOutput$ = [3, n0, _LSO, + 0, + [_SSt, _NT], + [() => StackSummaries, 0] +]; +exports.ListTypeRegistrationsInput$ = [3, n0, _LTRI, + 0, + [_T, _TN, _TA, _RSF, _MR, _NT], + [0, 0, 0, 0, 1, 0] +]; +exports.ListTypeRegistrationsOutput$ = [3, n0, _LTRO, + 0, + [_RTL, _NT], + [64 | 0, 0] +]; +exports.ListTypesInput$ = [3, n0, _LTI, + 0, + [_Vi, _PT, _DSe, _T, _F, _MR, _NT], + [0, 0, 0, 0, () => exports.TypeFilters$, 1, 0] +]; +exports.ListTypesOutput$ = [3, n0, _LTO, + 0, + [_TSy, _NT], + [() => TypeSummaries, 0] +]; +exports.ListTypeVersionsInput$ = [3, n0, _LTVI, + 0, + [_T, _TN, _A, _MR, _NT, _DSe, _PI], + [0, 0, 0, 1, 0, 0, 0] +]; +exports.ListTypeVersionsOutput$ = [3, n0, _LTVO, + 0, + [_TVS, _NT], + [() => TypeVersionSummaries, 0] +]; +exports.LiveResourceDrift$ = [3, n0, _LRD, + 0, + [_PV, _AV, _DDT], + [0, 0, 4] +]; +exports.LoggingConfig$ = [3, n0, _LC, + 0, + [_LRA, _LGN], + [0, 0], 2 +]; +exports.ManagedExecution$ = [3, n0, _ME, + 0, + [_Acti], + [2] +]; +exports.ModuleInfo$ = [3, n0, _MI, + 0, + [_TH, _LIH], + [0, 0] +]; +exports.OperationEntry$ = [3, n0, _OEp, + 0, + [_OT, _OI], + [0, 0] +]; +exports.OperationEvent$ = [3, n0, _OEpe, + 0, + [_EI, _SI, _OI, _OT, _OS, _ETv, _LRI, _PRI, _RT, _Ti, _ST, _ET, _RSes, _RSR, _RP, _CRT, _HTo, _HS, _HSR, _HIP, _HFM, _DSet, _VFM, _VN, _VS, _VSR, _VP], + [0, 0, 0, 0, 0, 0, 0, 0, 0, 4, 4, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0] +]; +exports.OperationResultFilter$ = [3, n0, _ORF, + 0, + [_N, _Va], + [0, 0] +]; +exports.Output$ = [3, n0, _O, + 0, + [_OK, _OV, _D, _EN], + [0, 0, 0, 0] +]; +exports.Parameter$ = [3, n0, _Pa, + 0, + [_PK, _PVa, _UPV, _RV], + [0, 0, 2, 0] +]; +exports.ParameterConstraints$ = [3, n0, _PCa, + 0, + [_AVl], + [64 | 0] +]; +exports.ParameterDeclaration$ = [3, n0, _PD, + 0, + [_PK, _DV, _PTa, _NE, _D, _PCa], + [0, 0, 0, 2, 0, () => exports.ParameterConstraints$] +]; +exports.PhysicalResourceIdContextKeyValuePair$ = [3, n0, _PRICKVP, + 0, + [_K, _V], + [0, 0], 2 +]; +exports.PropertyDifference$ = [3, n0, _PDr, + 0, + [_PPr, _EV, _AV, _DTi], + [0, 0, 0, 0], 4 +]; +exports.PublishTypeInput$ = [3, n0, _PTI, + 0, + [_T, _A, _TN, _PVN], + [0, 0, 0, 0] +]; +exports.PublishTypeOutput$ = [3, n0, _PTO, + 0, + [_PTA], + [0] +]; +exports.RecordHandlerProgressInput$ = [3, n0, _RHPI, + 0, + [_BT, _OS, _COS, _SM, _EC, _RMes, _CRT], + [0, 0, 0, 0, 0, 0, 0], 2 +]; +exports.RecordHandlerProgressOutput$ = [3, n0, _RHPO, + 0, + [], + [] +]; +exports.RegisterPublisherInput$ = [3, n0, _RPI, + 0, + [_ATAC, _CAo], + [2, 0] +]; +exports.RegisterPublisherOutput$ = [3, n0, _RPO, + 0, + [_PI], + [0] +]; +exports.RegisterTypeInput$ = [3, n0, _RTIe, + 0, + [_TN, _SHP, _T, _LC, _ERA, _CRT], + [0, 0, 0, () => exports.LoggingConfig$, 0, 0], 2 +]; +exports.RegisterTypeOutput$ = [3, n0, _RTO, + 0, + [_RTeg], + [0] +]; +exports.RequiredActivatedType$ = [3, n0, _RATe, + 0, + [_TNA, _OTN, _PI, _SMV], + [0, 0, 0, 64 | 1] +]; +exports.ResourceChange$ = [3, n0, _RC, + 0, + [_PA, _Act, _LRI, _PRI, _RT, _Rep, _Sco, _RDS, _RDIA, _De, _CSI, _MI, _BC, _AC, _PDC], + [0, 0, 0, 0, 0, 0, 64 | 0, 0, () => ResourceDriftIgnoredAttributes, () => ResourceChangeDetails, 0, () => exports.ModuleInfo$, 0, 0, 0] +]; +exports.ResourceChangeDetail$ = [3, n0, _RCD, + 0, + [_Tar, _Ev, _CSh, _CE], + [() => exports.ResourceTargetDefinition$, 0, 0, 0] +]; +exports.ResourceDefinition$ = [3, n0, _RD, + 0, + [_RT, _RI, _LRI], + [0, 128 | 0, 0], 2 +]; +exports.ResourceDetail$ = [3, n0, _RDe, + 0, + [_RT, _LRI, _RI, _RSes, _RSR, _W], + [0, 0, 128 | 0, 0, 0, () => WarningDetails] +]; +exports.ResourceDriftIgnoredAttribute$ = [3, n0, _RDIAe, + 0, + [_Pat, _Rea], + [0, 0] +]; +exports.ResourceIdentifierSummary$ = [3, n0, _RISe, + 0, + [_RT, _LRIo, _RIe], + [0, 64 | 0, 64 | 0] +]; +exports.ResourceLocation$ = [3, n0, _RLe, + 0, + [_SN, _LRI], + [0, 0], 2 +]; +exports.ResourceMapping$ = [3, n0, _RMeso, + 0, + [_So, _Des], + [() => exports.ResourceLocation$, () => exports.ResourceLocation$], 2 +]; +exports.ResourceScanSummary$ = [3, n0, _RSSe, + 0, + [_RSI, _S, _SR, _ST, _ET, _PC, _STc], + [0, 0, 0, 4, 4, 1, 0] +]; +exports.ResourceTargetDefinition$ = [3, n0, _RTDe, + 0, + [_At, _N, _RReq, _Pat, _BV, _AVf, _BVF, _AVF, _Dr, _ACT], + [0, 0, 0, 0, 0, 0, 0, 0, () => exports.LiveResourceDrift$, 0] +]; +exports.ResourceToImport$ = [3, n0, _RTIes, + 0, + [_RT, _LRI, _RI], + [0, 0, 128 | 0], 3 +]; +exports.RollbackConfiguration$ = [3, n0, _RCo, + 0, + [_RTo, _MTIM], + [() => RollbackTriggers, 1] +]; +exports.RollbackStackInput$ = [3, n0, _RSIo, + 0, + [_SN, _RARN, _CRT, _REOC], + [0, 0, 0, 2], 1 +]; +exports.RollbackStackOutput$ = [3, n0, _RSO, + 0, + [_SI, _OI], + [0, 0] +]; +exports.RollbackTrigger$ = [3, n0, _RTol, + 0, + [_A, _T], + [0, 0], 2 +]; +exports.ScanFilter$ = [3, n0, _SFc, + 0, + [_Ty], + [64 | 0] +]; +exports.ScannedResource$ = [3, n0, _SRc, + 0, + [_RT, _RI, _MBS], + [0, 128 | 0, 2] +]; +exports.ScannedResourceIdentifier$ = [3, n0, _SRIc, + 0, + [_RT, _RI], + [0, 128 | 0], 2 +]; +exports.SetStackPolicyInput$ = [3, n0, _SSPI, + 0, + [_SN, _SPB, _SPURL], + [0, 0, 0], 1 +]; +exports.SetTypeConfigurationInput$ = [3, n0, _STCI, + 0, + [_Co, _TA, _CAon, _TN, _T], + [0, 0, 0, 0, 0], 1 +]; +exports.SetTypeConfigurationOutput$ = [3, n0, _STCO, + 0, + [_CAonf], + [0] +]; +exports.SetTypeDefaultVersionInput$ = [3, n0, _STDVI, + 0, + [_A, _T, _TN, _VI], + [0, 0, 0, 0] +]; +exports.SetTypeDefaultVersionOutput$ = [3, n0, _STDVO, + 0, + [], + [] +]; +exports.SignalResourceInput$ = [3, n0, _SRIi, + 0, + [_SN, _LRI, _UI, _S], + [0, 0, 0, 0], 4 +]; +exports.Stack$ = [3, n0, _Sta, + 0, + [_SN, _CT, _SSta, _SI, _CSI, _D, _P, _DTel, _LUT, _RCo, _SSR, _DR, _NARN, _TIM, _Ca, _Ou, _RARN, _Ta, _ETP, _PIa, _RIo, _DI, _REOC, _DMe, _DSet, _LO], + [0, 4, 0, 0, 0, 0, () => _Parameters, 4, 4, () => exports.RollbackConfiguration$, 0, 2, 64 | 0, 1, 64 | 0, () => Outputs, 0, () => Tags, 2, 0, 0, () => exports.StackDriftInformation$, 2, 0, 0, () => LastOperations], 3 +]; +exports.StackDefinition$ = [3, n0, _SDt, + 0, + [_SN, _TB, _TURL], + [0, 0, 0] +]; +exports.StackDriftInformation$ = [3, n0, _SDI, + 0, + [_SDS, _LCT], + [0, 4], 1 +]; +exports.StackDriftInformationSummary$ = [3, n0, _SDIS, + 0, + [_SDS, _LCT], + [0, 4], 1 +]; +exports.StackEvent$ = [3, n0, _SEt, + 0, + [_SI, _EI, _SN, _Ti, _OI, _LRI, _PRI, _RT, _RSes, _RSR, _RP, _CRT, _HTo, _HS, _HSR, _HIP, _HII, _HFM, _DSet], + [0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0], 4 +]; +exports.StackInstance$ = [3, n0, _SIt, + 0, + [_SSI, _Reg, _Acc, _SI, _PO, _S, _SIS, _SR, _OUIr, _DSr, _LDCT, _LOI], + [0, 0, 0, 0, () => _Parameters, 0, () => exports.StackInstanceComprehensiveStatus$, 0, 0, 0, 4, 0] +]; +exports.StackInstanceComprehensiveStatus$ = [3, n0, _SICS, + 0, + [_DSet], + [0] +]; +exports.StackInstanceFilter$ = [3, n0, _SIF, + 0, + [_N, _Va], + [0, 0] +]; +exports.StackInstanceResourceDriftsSummary$ = [3, n0, _SIRDSt, + 0, + [_SI, _LRI, _RT, _SRDS, _Ti, _PRI, _PRIC, _PDro], + [0, 0, 0, 0, 4, 0, () => PhysicalResourceIdContext, () => PropertyDifferences], 5 +]; +exports.StackInstanceSummary$ = [3, n0, _SISt, + 0, + [_SSI, _Reg, _Acc, _SI, _S, _SR, _SIS, _OUIr, _DSr, _LDCT, _LOI], + [0, 0, 0, 0, 0, 0, () => exports.StackInstanceComprehensiveStatus$, 0, 0, 4, 0] +]; +exports.StackRefactorAction$ = [3, n0, _SRAt, + 0, + [_Act, _En, _PRI, _RI, _D, _Det, _DRe, _TR, _UR, _RMeso], + [0, 0, 0, 0, 0, 0, 0, () => StackRefactorTagResources, 64 | 0, () => exports.ResourceMapping$] +]; +exports.StackRefactorSummary$ = [3, n0, _SRSta, + 0, + [_SRI, _D, _ES, _ESR, _S, _SR], + [0, 0, 0, 0, 0, 0] +]; +exports.StackResource$ = [3, n0, _SRta, + 0, + [_LRI, _RT, _Ti, _RSes, _SN, _SI, _PRI, _RSR, _D, _DI, _MI], + [0, 0, 4, 0, 0, 0, 0, 0, 0, () => exports.StackResourceDriftInformation$, () => exports.ModuleInfo$], 4 +]; +exports.StackResourceDetail$ = [3, n0, _SRDt, + 0, + [_LRI, _RT, _LUTa, _RSes, _SN, _SI, _PRI, _RSR, _D, _Me, _DI, _MI], + [0, 0, 4, 0, 0, 0, 0, 0, 0, 0, () => exports.StackResourceDriftInformation$, () => exports.ModuleInfo$], 4 +]; +exports.StackResourceDrift$ = [3, n0, _SRDta, + 0, + [_SI, _LRI, _RT, _SRDS, _Ti, _PRI, _PRIC, _EP, _AP, _PDro, _MI, _DSRr], + [0, 0, 0, 0, 4, 0, () => PhysicalResourceIdContext, 0, 0, () => PropertyDifferences, () => exports.ModuleInfo$, 0], 5 +]; +exports.StackResourceDriftInformation$ = [3, n0, _SRDI, + 0, + [_SRDS, _LCT], + [0, 4], 1 +]; +exports.StackResourceDriftInformationSummary$ = [3, n0, _SRDIS, + 0, + [_SRDS, _LCT], + [0, 4], 1 +]; +exports.StackResourceSummary$ = [3, n0, _SRStac, + 0, + [_LRI, _RT, _LUTa, _RSes, _PRI, _RSR, _DI, _MI], + [0, 0, 4, 0, 0, 0, () => exports.StackResourceDriftInformationSummary$, () => exports.ModuleInfo$], 4 +]; +exports.StackSet$ = [3, n0, _SS, + 0, + [_SSN, _SSI, _D, _S, _TB, _P, _Ca, _Ta, _SSARN, _ARARN, _ERN, _SSDDD, _AD, _PM, _OUI, _ME, _Re], + [0, 0, 0, 0, 0, () => _Parameters, 64 | 0, () => Tags, 0, 0, 0, () => exports.StackSetDriftDetectionDetails$, () => exports.AutoDeployment$, 0, 64 | 0, () => exports.ManagedExecution$, 64 | 0] +]; +exports.StackSetAutoDeploymentTargetSummary$ = [3, n0, _SSADTS, + 0, + [_OUIr, _Re], + [0, 64 | 0] +]; +exports.StackSetDriftDetectionDetails$ = [3, n0, _SSDDD, + 0, + [_DSr, _DDS, _LDCT, _TSIC, _DSIC, _ISSIC, _IPSIC, _FSIC], + [0, 0, 4, 1, 1, 1, 1, 1] +]; +exports.StackSetOperation$ = [3, n0, _SSO, + 0, + [_OI, _SSI, _Act, _S, _OP, _RS, _ARARN, _ERN, _CTr, _ETn, _DT, _SSDDD, _SR, _SDta], + [0, 0, 0, 0, () => exports.StackSetOperationPreferences$, 2, 0, 0, 4, 4, () => exports.DeploymentTargets$, () => exports.StackSetDriftDetectionDetails$, 0, () => exports.StackSetOperationStatusDetails$] +]; +exports.StackSetOperationPreferences$ = [3, n0, _SSOP, + 0, + [_RCT, _RO, _FTC, _FTP, _MCC, _MCP, _CM], + [0, 64 | 0, 1, 1, 1, 1, 0] +]; +exports.StackSetOperationResultSummary$ = [3, n0, _SSORS, + 0, + [_Acc, _Reg, _S, _SR, _AGR, _OUIr], + [0, 0, 0, 0, () => exports.AccountGateResult$, 0] +]; +exports.StackSetOperationStatusDetails$ = [3, n0, _SSOSD, + 0, + [_FSIC], + [1] +]; +exports.StackSetOperationSummary$ = [3, n0, _SSOS, + 0, + [_OI, _Act, _S, _CTr, _ETn, _SR, _SDta, _OP], + [0, 0, 0, 4, 4, 0, () => exports.StackSetOperationStatusDetails$, () => exports.StackSetOperationPreferences$] +]; +exports.StackSetSummary$ = [3, n0, _SSS, + 0, + [_SSN, _SSI, _D, _S, _AD, _PM, _DSr, _LDCT, _ME], + [0, 0, 0, 0, () => exports.AutoDeployment$, 0, 0, 4, () => exports.ManagedExecution$] +]; +exports.StackSummary$ = [3, n0, _SStac, + 0, + [_SN, _CT, _SSta, _SI, _TDe, _LUT, _DTel, _SSR, _PIa, _RIo, _DI, _LO], + [0, 4, 0, 0, 0, 4, 4, 0, 0, 0, () => exports.StackDriftInformationSummary$, () => LastOperations], 3 +]; +exports.StartResourceScanInput$ = [3, n0, _SRSI, + 0, + [_CRT, _SF], + [0, () => ScanFilters] +]; +exports.StartResourceScanOutput$ = [3, n0, _SRSO, + 0, + [_RSI], + [0] +]; +exports.StopStackSetOperationInput$ = [3, n0, _SSSOI, + 0, + [_SSN, _OI, _CA], + [0, 0, 0], 2 +]; +exports.StopStackSetOperationOutput$ = [3, n0, _SSSOO, + 0, + [], + [] +]; +exports.Tag$ = [3, n0, _Tag, + 0, + [_K, _V], + [0, 0], 2 +]; +exports.TemplateConfiguration$ = [3, n0, _TCe, + 0, + [_DP, _URP], + [0, 0] +]; +exports.TemplateParameter$ = [3, n0, _TP, + 0, + [_PK, _DV, _NE, _D], + [0, 0, 2, 0] +]; +exports.TemplateProgress$ = [3, n0, _TPe, + 0, + [_RSeso, _RF, _RPe, _RPes], + [1, 1, 1, 1] +]; +exports.TemplateSummary$ = [3, n0, _TSe, + 0, + [_GTI, _GTN, _S, _SR, _CT, _LUT, _NOR], + [0, 0, 0, 0, 4, 4, 1] +]; +exports.TemplateSummaryConfig$ = [3, n0, _TSC, + 0, + [_TURTAW], + [2] +]; +exports.TestTypeInput$ = [3, n0, _TTI, + 0, + [_A, _T, _TN, _VI, _LDB], + [0, 0, 0, 0, 0] +]; +exports.TestTypeOutput$ = [3, n0, _TTO, + 0, + [_TVA], + [0] +]; +exports.TypeConfigurationDetails$ = [3, n0, _TCD, + 0, + [_A, _Al, _Co, _LU, _TA, _TN, _IDC], + [0, 0, 0, 4, 0, 0, 2] +]; +exports.TypeConfigurationIdentifier$ = [3, n0, _TCI, + 0, + [_TA, _TCA, _TCAy, _T, _TN], + [0, 0, 0, 0, 0] +]; +exports.TypeFilters$ = [3, n0, _TF, + 0, + [_Cat, _PI, _TNP], + [0, 0, 0] +]; +exports.TypeSummary$ = [3, n0, _TSyp, + 0, + [_T, _TN, _DVI, _TA, _LU, _D, _PI, _OTN, _PVN, _LPV, _PIu, _PN, _IA], + [0, 0, 0, 0, 4, 0, 0, 0, 0, 0, 0, 0, 2] +]; +exports.TypeVersionSummary$ = [3, n0, _TVSy, + 0, + [_T, _TN, _VI, _IDV, _A, _TCi, _D, _PVN], + [0, 0, 0, 2, 0, 4, 0, 0] +]; +exports.UpdateGeneratedTemplateInput$ = [3, n0, _UGTI, + 0, + [_GTN, _NGTN, _AR, _RRem, _RAR, _TCe], + [0, 0, () => ResourceDefinitions, 64 | 0, 2, () => exports.TemplateConfiguration$], 1 +]; +exports.UpdateGeneratedTemplateOutput$ = [3, n0, _UGTO, + 0, + [_GTI], + [0] +]; +exports.UpdateStackInput$ = [3, n0, _USI, + 0, + [_SN, _TB, _TURL, _UPT, _SPDUB, _SPDUURL, _P, _Ca, _RTe, _RARN, _RCo, _SPB, _SPURL, _NARN, _Ta, _DR, _CRT, _REOC], + [0, 0, 0, 2, 0, 0, () => _Parameters, 64 | 0, 64 | 0, 0, () => exports.RollbackConfiguration$, 0, 0, 64 | 0, () => Tags, 2, 0, 2], 1 +]; +exports.UpdateStackInstancesInput$ = [3, n0, _USII, + 0, + [_SSN, _Re, _Ac, _DT, _PO, _OP, _OI, _CA], + [0, 64 | 0, 64 | 0, () => exports.DeploymentTargets$, () => _Parameters, () => exports.StackSetOperationPreferences$, [0, 4], 0], 2 +]; +exports.UpdateStackInstancesOutput$ = [3, n0, _USIO, + 0, + [_OI], + [0] +]; +exports.UpdateStackOutput$ = [3, n0, _USO, + 0, + [_SI, _OI], + [0, 0] +]; +exports.UpdateStackSetInput$ = [3, n0, _USSI, + 0, + [_SSN, _D, _TB, _TURL, _UPT, _P, _Ca, _Ta, _OP, _ARARN, _ERN, _DT, _PM, _AD, _OI, _Ac, _Re, _CA, _ME], + [0, 0, 0, 0, 2, () => _Parameters, 64 | 0, () => Tags, () => exports.StackSetOperationPreferences$, 0, 0, () => exports.DeploymentTargets$, 0, () => exports.AutoDeployment$, [0, 4], 64 | 0, 64 | 0, 0, () => exports.ManagedExecution$], 1 +]; +exports.UpdateStackSetOutput$ = [3, n0, _USSO, + 0, + [_OI], + [0] +]; +exports.UpdateTerminationProtectionInput$ = [3, n0, _UTPI, + 0, + [_ETP, _SN], + [2, 0], 2 +]; +exports.UpdateTerminationProtectionOutput$ = [3, n0, _UTPO, + 0, + [_SI], + [0] +]; +exports.ValidateTemplateInput$ = [3, n0, _VTI, + 0, + [_TB, _TURL], + [0, 0] +]; +exports.ValidateTemplateOutput$ = [3, n0, _VTO, + 0, + [_P, _D, _Ca, _CR, _DTe], + [() => TemplateParameters, 0, 64 | 0, 0, 64 | 0] +]; +exports.WarningDetail$ = [3, n0, _WD, + 0, + [_T, _Pro], + [0, () => WarningProperties] +]; +exports.WarningProperty$ = [3, n0, _WP, + 0, + [_PPr, _Req, _D], + [0, 2, 0] +]; +exports.Warnings$ = [3, n0, _W, + 0, + [_URT], + [64 | 0] +]; +var __Unit = "unit"; +var AccountLimitList = [1, n0, _ALL, + 0, () => exports.AccountLimit$ +]; +var AccountList = (/* unused pure expression or super */ null && (64 | 0)); +var AllowedValues = (/* unused pure expression or super */ null && (64 | 0)); +var AnnotationList = [1, n0, _ALn, + 0, () => exports.Annotation$ +]; +var BatchDescribeTypeConfigurationsErrors = [1, n0, _BDTCEa, + 0, () => exports.BatchDescribeTypeConfigurationsError$ +]; +var Capabilities = (/* unused pure expression or super */ null && (64 | 0)); +var Changes = [1, n0, _Ch, + 0, () => exports.Change$ +]; +var ChangeSetHooks = [1, n0, _CSHh, + 0, () => exports.ChangeSetHook$ +]; +var ChangeSetSummaries = [1, n0, _CSSh, + 0, () => exports.ChangeSetSummary$ +]; +var Exports = [1, n0, _Exp, + 0, () => exports.Export$ +]; +var HookResultSummaries = [1, n0, _HRSo, + 0, () => exports.HookResultSummary$ +]; +var Imports = (/* unused pure expression or super */ null && (64 | 0)); +var JazzLogicalResourceIds = (/* unused pure expression or super */ null && (64 | 0)); +var LastOperations = [1, n0, _LO, + 0, () => exports.OperationEntry$ +]; +var LogicalResourceIds = (/* unused pure expression or super */ null && (64 | 0)); +var NotificationARNs = (/* unused pure expression or super */ null && (64 | 0)); +var OperationEvents = [1, n0, _OE, + 0, () => exports.OperationEvent$ +]; +var OperationResultFilters = [1, n0, _ORFp, + 0, () => exports.OperationResultFilter$ +]; +var OrganizationalUnitIdList = (/* unused pure expression or super */ null && (64 | 0)); +var Outputs = [1, n0, _Ou, + 0, () => exports.Output$ +]; +var ParameterDeclarations = [1, n0, _PDa, + 0, () => exports.ParameterDeclaration$ +]; +var _Parameters = [1, n0, _P, + 0, () => exports.Parameter$ +]; +var PhysicalResourceIdContext = [1, n0, _PRIC, + 0, () => exports.PhysicalResourceIdContextKeyValuePair$ +]; +var PropertyDifferences = [1, n0, _PDro, + 0, () => exports.PropertyDifference$ +]; +var RegionList = (/* unused pure expression or super */ null && (64 | 0)); +var RegistrationTokenList = (/* unused pure expression or super */ null && (64 | 0)); +var RelatedResources = [1, n0, _RRel, + 0, () => exports.ScannedResource$ +]; +var RequiredActivatedTypes = [1, n0, _RAT, + 0, () => exports.RequiredActivatedType$ +]; +var ResourceChangeDetails = [1, n0, _RCDe, + 0, () => exports.ResourceChangeDetail$ +]; +var ResourceDefinitions = [1, n0, _RDes, + 0, () => exports.ResourceDefinition$ +]; +var ResourceDetails = [1, n0, _RDeso, + 0, () => exports.ResourceDetail$ +]; +var ResourceDriftIgnoredAttributes = [1, n0, _RDIA, + 0, () => exports.ResourceDriftIgnoredAttribute$ +]; +var ResourceIdentifiers = (/* unused pure expression or super */ null && (64 | 0)); +var ResourceIdentifierSummaries = [1, n0, _RIS, + 0, () => exports.ResourceIdentifierSummary$ +]; +var ResourceMappings = [1, n0, _RMe, + 0, () => exports.ResourceMapping$ +]; +var ResourceScanSummaries = [1, n0, _RSS, + 0, () => exports.ResourceScanSummary$ +]; +var ResourcesToImport = [1, n0, _RTI, + 0, () => exports.ResourceToImport$ +]; +var ResourcesToSkip = (/* unused pure expression or super */ null && (64 | 0)); +var ResourceTypeFilters = (/* unused pure expression or super */ null && (64 | 0)); +var ResourceTypes = (/* unused pure expression or super */ null && (64 | 0)); +var RetainResources = (/* unused pure expression or super */ null && (64 | 0)); +var RollbackTriggers = [1, n0, _RTo, + 0, () => exports.RollbackTrigger$ +]; +var ScanFilters = [1, n0, _SF, + 0, () => exports.ScanFilter$ +]; +var ScannedResourceIdentifiers = [1, n0, _SRIca, + 0, () => exports.ScannedResourceIdentifier$ +]; +var ScannedResources = [1, n0, _SRca, + 0, () => exports.ScannedResource$ +]; +var Scope = (/* unused pure expression or super */ null && (64 | 0)); +var StackDefinitions = [1, n0, _SD, + 0, () => exports.StackDefinition$ +]; +var StackEvents = [1, n0, _SE, + 0, () => exports.StackEvent$ +]; +var StackIdList = (/* unused pure expression or super */ null && (64 | 0)); +var StackIds = (/* unused pure expression or super */ null && (64 | 0)); +var StackInstanceFilters = [1, n0, _SIFt, + 0, () => exports.StackInstanceFilter$ +]; +var StackInstanceResourceDriftsSummaries = [1, n0, _SIRDSta, + 0, () => exports.StackInstanceResourceDriftsSummary$ +]; +var StackInstanceSummaries = [1, n0, _SISta, + 0, () => exports.StackInstanceSummary$ +]; +var StackRefactorActions = [1, n0, _SRA, + 0, () => exports.StackRefactorAction$ +]; +var StackRefactorExecutionStatusFilter = (/* unused pure expression or super */ null && (64 | 0)); +var StackRefactorSummaries = [1, n0, _SRS, + 0, () => exports.StackRefactorSummary$ +]; +var StackRefactorTagResources = [1, n0, _SRTR, + 0, () => exports.Tag$ +]; +var StackRefactorUntagResources = (/* unused pure expression or super */ null && (64 | 0)); +var StackResourceDrifts = [1, n0, _SRD, + 0, () => exports.StackResourceDrift$ +]; +var StackResourceDriftStatusFilters = (/* unused pure expression or super */ null && (64 | 0)); +var StackResources = [1, n0, _SRt, + 0, () => exports.StackResource$ +]; +var StackResourceSummaries = [1, n0, _SRSt, + 0, () => exports.StackResourceSummary$ +]; +var Stacks = [1, n0, _St, + 0, () => exports.Stack$ +]; +var StackSetARNList = (/* unused pure expression or super */ null && (64 | 0)); +var StackSetAutoDeploymentTargetSummaries = [1, n0, _SSADTSt, + 0, () => exports.StackSetAutoDeploymentTargetSummary$ +]; +var StackSetOperationResultSummaries = [1, n0, _SSORSt, + 0, () => exports.StackSetOperationResultSummary$ +]; +var StackSetOperationSummaries = [1, n0, _SSOSt, + 0, () => exports.StackSetOperationSummary$ +]; +var StackSetSummaries = [1, n0, _SSSt, + 0, () => exports.StackSetSummary$ +]; +var StackStatusFilter = (/* unused pure expression or super */ null && (64 | 0)); +var StackSummaries = [1, n0, _SSt, + 0, () => exports.StackSummary$ +]; +var StageList = (/* unused pure expression or super */ null && (64 | 0)); +var SupportedMajorVersions = (/* unused pure expression or super */ null && (64 | 1)); +var Tags = [1, n0, _Ta, + 0, () => exports.Tag$ +]; +var TemplateParameters = [1, n0, _TPem, + 0, () => exports.TemplateParameter$ +]; +var TemplateSummaries = [1, n0, _TSem, + 0, () => exports.TemplateSummary$ +]; +var TransformsList = (/* unused pure expression or super */ null && (64 | 0)); +var TypeConfigurationDetailsList = [1, n0, _TCDL, + 0, () => exports.TypeConfigurationDetails$ +]; +var TypeConfigurationIdentifiers = [1, n0, _TCIy, + 0, () => exports.TypeConfigurationIdentifier$ +]; +var TypeSummaries = [1, n0, _TSy, + 0, () => exports.TypeSummary$ +]; +var TypeVersionSummaries = [1, n0, _TVS, + 0, () => exports.TypeVersionSummary$ +]; +var UnprocessedTypeConfigurations = [1, n0, _UTC, + 0, () => exports.TypeConfigurationIdentifier$ +]; +var WarningDetails = [1, n0, _WDa, + 0, () => exports.WarningDetail$ +]; +var WarningProperties = [1, n0, _WPa, + 0, () => exports.WarningProperty$ +]; +var JazzResourceIdentifierProperties = (/* unused pure expression or super */ null && (128 | 0)); +var ResourceIdentifierProperties = (/* unused pure expression or super */ null && (128 | 0)); +exports.ActivateOrganizationsAccess$ = [9, n0, _AOA, + 0, () => exports.ActivateOrganizationsAccessInput$, () => exports.ActivateOrganizationsAccessOutput$ +]; +exports.ActivateType$ = [9, n0, _AT, + 2, () => exports.ActivateTypeInput$, () => exports.ActivateTypeOutput$ +]; +exports.BatchDescribeTypeConfigurations$ = [9, n0, _BDTC, + 0, () => exports.BatchDescribeTypeConfigurationsInput$, () => exports.BatchDescribeTypeConfigurationsOutput$ +]; +exports.CancelUpdateStack$ = [9, n0, _CUS, + 0, () => exports.CancelUpdateStackInput$, () => __Unit +]; +exports.ContinueUpdateRollback$ = [9, n0, _CUR, + 0, () => exports.ContinueUpdateRollbackInput$, () => exports.ContinueUpdateRollbackOutput$ +]; +exports.CreateChangeSet$ = [9, n0, _CCS, + 0, () => exports.CreateChangeSetInput$, () => exports.CreateChangeSetOutput$ +]; +exports.CreateGeneratedTemplate$ = [9, n0, _CGT, + 0, () => exports.CreateGeneratedTemplateInput$, () => exports.CreateGeneratedTemplateOutput$ +]; +exports.CreateStack$ = [9, n0, _CSr, + 0, () => exports.CreateStackInput$, () => exports.CreateStackOutput$ +]; +exports.CreateStackInstances$ = [9, n0, _CSIre, + 0, () => exports.CreateStackInstancesInput$, () => exports.CreateStackInstancesOutput$ +]; +exports.CreateStackRefactor$ = [9, n0, _CSR, + 0, () => exports.CreateStackRefactorInput$, () => exports.CreateStackRefactorOutput$ +]; +exports.CreateStackSet$ = [9, n0, _CSSr, + 0, () => exports.CreateStackSetInput$, () => exports.CreateStackSetOutput$ +]; +exports.DeactivateOrganizationsAccess$ = [9, n0, _DOA, + 0, () => exports.DeactivateOrganizationsAccessInput$, () => exports.DeactivateOrganizationsAccessOutput$ +]; +exports.DeactivateType$ = [9, n0, _DTea, + 2, () => exports.DeactivateTypeInput$, () => exports.DeactivateTypeOutput$ +]; +exports.DeleteChangeSet$ = [9, n0, _DCS, + 0, () => exports.DeleteChangeSetInput$, () => exports.DeleteChangeSetOutput$ +]; +exports.DeleteGeneratedTemplate$ = [9, n0, _DGT, + 0, () => exports.DeleteGeneratedTemplateInput$, () => __Unit +]; +exports.DeleteStack$ = [9, n0, _DSel, + 0, () => exports.DeleteStackInput$, () => __Unit +]; +exports.DeleteStackInstances$ = [9, n0, _DSIel, + 0, () => exports.DeleteStackInstancesInput$, () => exports.DeleteStackInstancesOutput$ +]; +exports.DeleteStackSet$ = [9, n0, _DSS, + 0, () => exports.DeleteStackSetInput$, () => exports.DeleteStackSetOutput$ +]; +exports.DeregisterType$ = [9, n0, _DTer, + 2, () => exports.DeregisterTypeInput$, () => exports.DeregisterTypeOutput$ +]; +exports.DescribeAccountLimits$ = [9, n0, _DAL, + 0, () => exports.DescribeAccountLimitsInput$, () => exports.DescribeAccountLimitsOutput$ +]; +exports.DescribeChangeSet$ = [9, n0, _DCSe, + 0, () => exports.DescribeChangeSetInput$, () => exports.DescribeChangeSetOutput$ +]; +exports.DescribeChangeSetHooks$ = [9, n0, _DCSH, + 0, () => exports.DescribeChangeSetHooksInput$, () => exports.DescribeChangeSetHooksOutput$ +]; +exports.DescribeEvents$ = [9, n0, _DE, + 0, () => exports.DescribeEventsInput$, () => exports.DescribeEventsOutput$ +]; +exports.DescribeGeneratedTemplate$ = [9, n0, _DGTe, + 0, () => exports.DescribeGeneratedTemplateInput$, () => exports.DescribeGeneratedTemplateOutput$ +]; +exports.DescribeOrganizationsAccess$ = [9, n0, _DOAe, + 0, () => exports.DescribeOrganizationsAccessInput$, () => exports.DescribeOrganizationsAccessOutput$ +]; +exports.DescribePublisher$ = [9, n0, _DPe, + 2, () => exports.DescribePublisherInput$, () => exports.DescribePublisherOutput$ +]; +exports.DescribeResourceScan$ = [9, n0, _DRS, + 0, () => exports.DescribeResourceScanInput$, () => exports.DescribeResourceScanOutput$ +]; +exports.DescribeStackDriftDetectionStatus$ = [9, n0, _DSDDS, + 0, () => exports.DescribeStackDriftDetectionStatusInput$, () => exports.DescribeStackDriftDetectionStatusOutput$ +]; +exports.DescribeStackEvents$ = [9, n0, _DSE, + 0, () => exports.DescribeStackEventsInput$, () => exports.DescribeStackEventsOutput$ +]; +exports.DescribeStackInstance$ = [9, n0, _DSIes, + 0, () => exports.DescribeStackInstanceInput$, () => exports.DescribeStackInstanceOutput$ +]; +exports.DescribeStackRefactor$ = [9, n0, _DSRe, + 0, () => exports.DescribeStackRefactorInput$, () => exports.DescribeStackRefactorOutput$ +]; +exports.DescribeStackResource$ = [9, n0, _DSRes, + 0, () => exports.DescribeStackResourceInput$, () => exports.DescribeStackResourceOutput$ +]; +exports.DescribeStackResourceDrifts$ = [9, n0, _DSRD, + 0, () => exports.DescribeStackResourceDriftsInput$, () => exports.DescribeStackResourceDriftsOutput$ +]; +exports.DescribeStackResources$ = [9, n0, _DSResc, + 0, () => exports.DescribeStackResourcesInput$, () => exports.DescribeStackResourcesOutput$ +]; +exports.DescribeStacks$ = [9, n0, _DSes, + 0, () => exports.DescribeStacksInput$, () => exports.DescribeStacksOutput$ +]; +exports.DescribeStackSet$ = [9, n0, _DSSe, + 0, () => exports.DescribeStackSetInput$, () => exports.DescribeStackSetOutput$ +]; +exports.DescribeStackSetOperation$ = [9, n0, _DSSOes, + 0, () => exports.DescribeStackSetOperationInput$, () => exports.DescribeStackSetOperationOutput$ +]; +exports.DescribeType$ = [9, n0, _DTes, + 2, () => exports.DescribeTypeInput$, () => exports.DescribeTypeOutput$ +]; +exports.DescribeTypeRegistration$ = [9, n0, _DTR, + 2, () => exports.DescribeTypeRegistrationInput$, () => exports.DescribeTypeRegistrationOutput$ +]; +exports.DetectStackDrift$ = [9, n0, _DSD, + 0, () => exports.DetectStackDriftInput$, () => exports.DetectStackDriftOutput$ +]; +exports.DetectStackResourceDrift$ = [9, n0, _DSRDe, + 0, () => exports.DetectStackResourceDriftInput$, () => exports.DetectStackResourceDriftOutput$ +]; +exports.DetectStackSetDrift$ = [9, n0, _DSSD, + 0, () => exports.DetectStackSetDriftInput$, () => exports.DetectStackSetDriftOutput$ +]; +exports.EstimateTemplateCost$ = [9, n0, _ETC, + 0, () => exports.EstimateTemplateCostInput$, () => exports.EstimateTemplateCostOutput$ +]; +exports.ExecuteChangeSet$ = [9, n0, _ECS, + 0, () => exports.ExecuteChangeSetInput$, () => exports.ExecuteChangeSetOutput$ +]; +exports.ExecuteStackRefactor$ = [9, n0, _ESRx, + 0, () => exports.ExecuteStackRefactorInput$, () => __Unit +]; +exports.GetGeneratedTemplate$ = [9, n0, _GGT, + 0, () => exports.GetGeneratedTemplateInput$, () => exports.GetGeneratedTemplateOutput$ +]; +exports.GetHookResult$ = [9, n0, _GHR, + 0, () => exports.GetHookResultInput$, () => exports.GetHookResultOutput$ +]; +exports.GetStackPolicy$ = [9, n0, _GSP, + 0, () => exports.GetStackPolicyInput$, () => exports.GetStackPolicyOutput$ +]; +exports.GetTemplate$ = [9, n0, _GT, + 0, () => exports.GetTemplateInput$, () => exports.GetTemplateOutput$ +]; +exports.GetTemplateSummary$ = [9, n0, _GTS, + 0, () => exports.GetTemplateSummaryInput$, () => exports.GetTemplateSummaryOutput$ +]; +exports.ImportStacksToStackSet$ = [9, n0, _ISTSS, + 0, () => exports.ImportStacksToStackSetInput$, () => exports.ImportStacksToStackSetOutput$ +]; +exports.ListChangeSets$ = [9, n0, _LCS, + 0, () => exports.ListChangeSetsInput$, () => exports.ListChangeSetsOutput$ +]; +exports.ListExports$ = [9, n0, _LE, + 0, () => exports.ListExportsInput$, () => exports.ListExportsOutput$ +]; +exports.ListGeneratedTemplates$ = [9, n0, _LGT, + 0, () => exports.ListGeneratedTemplatesInput$, () => exports.ListGeneratedTemplatesOutput$ +]; +exports.ListHookResults$ = [9, n0, _LHR, + 0, () => exports.ListHookResultsInput$, () => exports.ListHookResultsOutput$ +]; +exports.ListImports$ = [9, n0, _LI, + 0, () => exports.ListImportsInput$, () => exports.ListImportsOutput$ +]; +exports.ListResourceScanRelatedResources$ = [9, n0, _LRSRR, + 0, () => exports.ListResourceScanRelatedResourcesInput$, () => exports.ListResourceScanRelatedResourcesOutput$ +]; +exports.ListResourceScanResources$ = [9, n0, _LRSR, + 0, () => exports.ListResourceScanResourcesInput$, () => exports.ListResourceScanResourcesOutput$ +]; +exports.ListResourceScans$ = [9, n0, _LRS, + 0, () => exports.ListResourceScansInput$, () => exports.ListResourceScansOutput$ +]; +exports.ListStackInstanceResourceDrifts$ = [9, n0, _LSIRD, + 0, () => exports.ListStackInstanceResourceDriftsInput$, () => exports.ListStackInstanceResourceDriftsOutput$ +]; +exports.ListStackInstances$ = [9, n0, _LSIi, + 0, () => exports.ListStackInstancesInput$, () => exports.ListStackInstancesOutput$ +]; +exports.ListStackRefactorActions$ = [9, n0, _LSRA, + 0, () => exports.ListStackRefactorActionsInput$, () => exports.ListStackRefactorActionsOutput$ +]; +exports.ListStackRefactors$ = [9, n0, _LSR, + 0, () => exports.ListStackRefactorsInput$, () => exports.ListStackRefactorsOutput$ +]; +exports.ListStackResources$ = [9, n0, _LSRi, + 0, () => exports.ListStackResourcesInput$, () => exports.ListStackResourcesOutput$ +]; +exports.ListStacks$ = [9, n0, _LS, + 0, () => exports.ListStacksInput$, () => exports.ListStacksOutput$ +]; +exports.ListStackSetAutoDeploymentTargets$ = [9, n0, _LSSADT, + 0, () => exports.ListStackSetAutoDeploymentTargetsInput$, () => exports.ListStackSetAutoDeploymentTargetsOutput$ +]; +exports.ListStackSetOperationResults$ = [9, n0, _LSSOR, + 0, () => exports.ListStackSetOperationResultsInput$, () => exports.ListStackSetOperationResultsOutput$ +]; +exports.ListStackSetOperations$ = [9, n0, _LSSOi, + 0, () => exports.ListStackSetOperationsInput$, () => exports.ListStackSetOperationsOutput$ +]; +exports.ListStackSets$ = [9, n0, _LSS, + 0, () => exports.ListStackSetsInput$, () => exports.ListStackSetsOutput$ +]; +exports.ListTypeRegistrations$ = [9, n0, _LTR, + 2, () => exports.ListTypeRegistrationsInput$, () => exports.ListTypeRegistrationsOutput$ +]; +exports.ListTypes$ = [9, n0, _LT, + 2, () => exports.ListTypesInput$, () => exports.ListTypesOutput$ +]; +exports.ListTypeVersions$ = [9, n0, _LTV, + 2, () => exports.ListTypeVersionsInput$, () => exports.ListTypeVersionsOutput$ +]; +exports.PublishType$ = [9, n0, _PTu, + 2, () => exports.PublishTypeInput$, () => exports.PublishTypeOutput$ +]; +exports.RecordHandlerProgress$ = [9, n0, _RHP, + 2, () => exports.RecordHandlerProgressInput$, () => exports.RecordHandlerProgressOutput$ +]; +exports.RegisterPublisher$ = [9, n0, _RPeg, + 2, () => exports.RegisterPublisherInput$, () => exports.RegisterPublisherOutput$ +]; +exports.RegisterType$ = [9, n0, _RTegi, + 2, () => exports.RegisterTypeInput$, () => exports.RegisterTypeOutput$ +]; +exports.RollbackStack$ = [9, n0, _RSo, + 0, () => exports.RollbackStackInput$, () => exports.RollbackStackOutput$ +]; +exports.SetStackPolicy$ = [9, n0, _SSP, + 0, () => exports.SetStackPolicyInput$, () => __Unit +]; +exports.SetTypeConfiguration$ = [9, n0, _STC, + 0, () => exports.SetTypeConfigurationInput$, () => exports.SetTypeConfigurationOutput$ +]; +exports.SetTypeDefaultVersion$ = [9, n0, _STDV, + 2, () => exports.SetTypeDefaultVersionInput$, () => exports.SetTypeDefaultVersionOutput$ +]; +exports.SignalResource$ = [9, n0, _SRi, + 0, () => exports.SignalResourceInput$, () => __Unit +]; +exports.StartResourceScan$ = [9, n0, _SRStar, + 0, () => exports.StartResourceScanInput$, () => exports.StartResourceScanOutput$ +]; +exports.StopStackSetOperation$ = [9, n0, _SSSO, + 0, () => exports.StopStackSetOperationInput$, () => exports.StopStackSetOperationOutput$ +]; +exports.TestType$ = [9, n0, _TTe, + 2, () => exports.TestTypeInput$, () => exports.TestTypeOutput$ +]; +exports.UpdateGeneratedTemplate$ = [9, n0, _UGT, + 0, () => exports.UpdateGeneratedTemplateInput$, () => exports.UpdateGeneratedTemplateOutput$ +]; +exports.UpdateStack$ = [9, n0, _US, + 0, () => exports.UpdateStackInput$, () => exports.UpdateStackOutput$ +]; +exports.UpdateStackInstances$ = [9, n0, _USIp, + 0, () => exports.UpdateStackInstancesInput$, () => exports.UpdateStackInstancesOutput$ +]; +exports.UpdateStackSet$ = [9, n0, _USS, + 0, () => exports.UpdateStackSetInput$, () => exports.UpdateStackSetOutput$ +]; +exports.UpdateTerminationProtection$ = [9, n0, _UTP, + 0, () => exports.UpdateTerminationProtectionInput$, () => exports.UpdateTerminationProtectionOutput$ +]; +exports.ValidateTemplate$ = [9, n0, _VT, + 0, () => exports.ValidateTemplateInput$, () => exports.ValidateTemplateOutput$ +]; + + +/***/ }), + +/***/ 5522: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var protocolHttp = __nccwpck_require__(2356); +var querystringBuilder = __nccwpck_require__(8256); +var http = __nccwpck_require__(8611); +var https = __nccwpck_require__(5692); +var stream = __nccwpck_require__(2203); +var http2 = __nccwpck_require__(5675); + +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; }; -const StackSetOperationResultStatus = { - CANCELLED: "CANCELLED", - FAILED: "FAILED", - PENDING: "PENDING", - RUNNING: "RUNNING", - SUCCEEDED: "SUCCEEDED", + +const timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId), }; -const OperationStatus = { - FAILED: "FAILED", - IN_PROGRESS: "IN_PROGRESS", - PENDING: "PENDING", - SUCCESS: "SUCCESS", + +const DEFER_EVENT_LISTENER_TIME$2 = 1000; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError", + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } + else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); + } + else { + request.on("socket", doWithSocket); + } + }; + if (timeoutInMs < 2000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); }; -const HandlerErrorCode = { - AccessDenied: "AccessDenied", - AlreadyExists: "AlreadyExists", - GeneralServiceException: "GeneralServiceException", - HandlerInternalFailure: "HandlerInternalFailure", - InternalFailure: "InternalFailure", - InvalidCredentials: "InvalidCredentials", - InvalidRequest: "InvalidRequest", - InvalidTypeConfiguration: "InvalidTypeConfiguration", - NetworkFailure: "NetworkFailure", - NonCompliant: "NonCompliant", - NotFound: "NotFound", - NotUpdatable: "NotUpdatable", - ResourceConflict: "ResourceConflict", - ServiceInternalError: "ServiceInternalError", - ServiceLimitExceeded: "ServiceLimitExceeded", - ServiceTimeout: "NotStabilized", - Throttling: "Throttling", - Unknown: "Unknown", - UnsupportedTarget: "UnsupportedTarget", + +const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { + if (timeoutInMs) { + return timing.setTimeout(() => { + let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; + if (throwOnRequestTimeout) { + const error = Object.assign(new Error(msg), { + name: "TimeoutError", + code: "ETIMEDOUT", + }); + req.destroy(error); + reject(error); + } + else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger?.warn?.(msg); + } + }, timeoutInMs); + } + return -1; }; -const ResourceSignalStatus = { - FAILURE: "FAILURE", - SUCCESS: "SUCCESS", + +const DEFER_EVENT_LISTENER_TIME$1 = 3000; +const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; + } + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } + else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); }; -Object.defineProperty(exports, "$Command", ({ - enumerable: true, - get: function () { return smithyClient.Command; } -})); -Object.defineProperty(exports, "__Client", ({ - enumerable: true, - get: function () { return smithyClient.Client; } -})); -exports.AccountFilterType = AccountFilterType; -exports.AccountGateStatus = AccountGateStatus; -exports.ActivateOrganizationsAccessCommand = ActivateOrganizationsAccessCommand; -exports.ActivateTypeCommand = ActivateTypeCommand; -exports.AfterValueFrom = AfterValueFrom; -exports.AlreadyExistsException = AlreadyExistsException$1; -exports.AnnotationSeverityLevel = AnnotationSeverityLevel; -exports.AnnotationStatus = AnnotationStatus; -exports.AttributeChangeType = AttributeChangeType; -exports.BatchDescribeTypeConfigurationsCommand = BatchDescribeTypeConfigurationsCommand; -exports.BeaconStackOperationStatus = BeaconStackOperationStatus; -exports.BeforeValueFrom = BeforeValueFrom; -exports.CFNRegistryException = CFNRegistryException$1; -exports.CallAs = CallAs; -exports.CancelUpdateStackCommand = CancelUpdateStackCommand; -exports.Capability = Capability; -exports.Category = Category; -exports.ChangeAction = ChangeAction; -exports.ChangeSetHooksStatus = ChangeSetHooksStatus; -exports.ChangeSetNotFoundException = ChangeSetNotFoundException$1; -exports.ChangeSetStatus = ChangeSetStatus; -exports.ChangeSetType = ChangeSetType; -exports.ChangeSource = ChangeSource; -exports.ChangeType = ChangeType; -exports.CloudFormation = CloudFormation; -exports.CloudFormationClient = CloudFormationClient; -exports.CloudFormationServiceException = CloudFormationServiceException$1; -exports.ConcurrencyMode = ConcurrencyMode; -exports.ConcurrentResourcesLimitExceededException = ConcurrentResourcesLimitExceededException$1; -exports.ContinueUpdateRollbackCommand = ContinueUpdateRollbackCommand; -exports.CreateChangeSetCommand = CreateChangeSetCommand; -exports.CreateGeneratedTemplateCommand = CreateGeneratedTemplateCommand; -exports.CreateStackCommand = CreateStackCommand; -exports.CreateStackInstancesCommand = CreateStackInstancesCommand; -exports.CreateStackRefactorCommand = CreateStackRefactorCommand; -exports.CreateStackSetCommand = CreateStackSetCommand; -exports.CreatedButModifiedException = CreatedButModifiedException$1; -exports.DeactivateOrganizationsAccessCommand = DeactivateOrganizationsAccessCommand; -exports.DeactivateTypeCommand = DeactivateTypeCommand; -exports.DeleteChangeSetCommand = DeleteChangeSetCommand; -exports.DeleteGeneratedTemplateCommand = DeleteGeneratedTemplateCommand; -exports.DeleteStackCommand = DeleteStackCommand; -exports.DeleteStackInstancesCommand = DeleteStackInstancesCommand; -exports.DeleteStackSetCommand = DeleteStackSetCommand; -exports.DeletionMode = DeletionMode; -exports.DeploymentMode = DeploymentMode; -exports.DeprecatedStatus = DeprecatedStatus; -exports.DeregisterTypeCommand = DeregisterTypeCommand; -exports.DescribeAccountLimitsCommand = DescribeAccountLimitsCommand; -exports.DescribeChangeSetCommand = DescribeChangeSetCommand; -exports.DescribeChangeSetHooksCommand = DescribeChangeSetHooksCommand; -exports.DescribeEventsCommand = DescribeEventsCommand; -exports.DescribeGeneratedTemplateCommand = DescribeGeneratedTemplateCommand; -exports.DescribeOrganizationsAccessCommand = DescribeOrganizationsAccessCommand; -exports.DescribePublisherCommand = DescribePublisherCommand; -exports.DescribeResourceScanCommand = DescribeResourceScanCommand; -exports.DescribeStackDriftDetectionStatusCommand = DescribeStackDriftDetectionStatusCommand; -exports.DescribeStackEventsCommand = DescribeStackEventsCommand; -exports.DescribeStackInstanceCommand = DescribeStackInstanceCommand; -exports.DescribeStackRefactorCommand = DescribeStackRefactorCommand; -exports.DescribeStackResourceCommand = DescribeStackResourceCommand; -exports.DescribeStackResourceDriftsCommand = DescribeStackResourceDriftsCommand; -exports.DescribeStackResourcesCommand = DescribeStackResourcesCommand; -exports.DescribeStackSetCommand = DescribeStackSetCommand; -exports.DescribeStackSetOperationCommand = DescribeStackSetOperationCommand; -exports.DescribeStacksCommand = DescribeStacksCommand; -exports.DescribeTypeCommand = DescribeTypeCommand; -exports.DescribeTypeRegistrationCommand = DescribeTypeRegistrationCommand; -exports.DetailedStatus = DetailedStatus; -exports.DetectStackDriftCommand = DetectStackDriftCommand; -exports.DetectStackResourceDriftCommand = DetectStackResourceDriftCommand; -exports.DetectStackSetDriftCommand = DetectStackSetDriftCommand; -exports.DifferenceType = DifferenceType; -exports.DriftIgnoredReason = DriftIgnoredReason; -exports.EstimateTemplateCostCommand = EstimateTemplateCostCommand; -exports.EvaluationType = EvaluationType; -exports.EventType = EventType; -exports.ExecuteChangeSetCommand = ExecuteChangeSetCommand; -exports.ExecuteStackRefactorCommand = ExecuteStackRefactorCommand; -exports.ExecutionStatus = ExecutionStatus; -exports.GeneratedTemplateDeletionPolicy = GeneratedTemplateDeletionPolicy; -exports.GeneratedTemplateNotFoundException = GeneratedTemplateNotFoundException$1; -exports.GeneratedTemplateResourceStatus = GeneratedTemplateResourceStatus; -exports.GeneratedTemplateStatus = GeneratedTemplateStatus; -exports.GeneratedTemplateUpdateReplacePolicy = GeneratedTemplateUpdateReplacePolicy; -exports.GetGeneratedTemplateCommand = GetGeneratedTemplateCommand; -exports.GetHookResultCommand = GetHookResultCommand; -exports.GetStackPolicyCommand = GetStackPolicyCommand; -exports.GetTemplateCommand = GetTemplateCommand; -exports.GetTemplateSummaryCommand = GetTemplateSummaryCommand; -exports.HandlerErrorCode = HandlerErrorCode; -exports.HookFailureMode = HookFailureMode; -exports.HookInvocationPoint = HookInvocationPoint; -exports.HookResultNotFoundException = HookResultNotFoundException$1; -exports.HookStatus = HookStatus; -exports.HookTargetAction = HookTargetAction; -exports.HookTargetType = HookTargetType; -exports.IdentityProvider = IdentityProvider; -exports.ImportStacksToStackSetCommand = ImportStacksToStackSetCommand; -exports.InsufficientCapabilitiesException = InsufficientCapabilitiesException$1; -exports.InvalidChangeSetStatusException = InvalidChangeSetStatusException$1; -exports.InvalidOperationException = InvalidOperationException$1; -exports.InvalidStateTransitionException = InvalidStateTransitionException$1; -exports.LimitExceededException = LimitExceededException$1; -exports.ListChangeSetsCommand = ListChangeSetsCommand; -exports.ListExportsCommand = ListExportsCommand; -exports.ListGeneratedTemplatesCommand = ListGeneratedTemplatesCommand; -exports.ListHookResultsCommand = ListHookResultsCommand; -exports.ListHookResultsTargetType = ListHookResultsTargetType; -exports.ListImportsCommand = ListImportsCommand; -exports.ListResourceScanRelatedResourcesCommand = ListResourceScanRelatedResourcesCommand; -exports.ListResourceScanResourcesCommand = ListResourceScanResourcesCommand; -exports.ListResourceScansCommand = ListResourceScansCommand; -exports.ListStackInstanceResourceDriftsCommand = ListStackInstanceResourceDriftsCommand; -exports.ListStackInstancesCommand = ListStackInstancesCommand; -exports.ListStackRefactorActionsCommand = ListStackRefactorActionsCommand; -exports.ListStackRefactorsCommand = ListStackRefactorsCommand; -exports.ListStackResourcesCommand = ListStackResourcesCommand; -exports.ListStackSetAutoDeploymentTargetsCommand = ListStackSetAutoDeploymentTargetsCommand; -exports.ListStackSetOperationResultsCommand = ListStackSetOperationResultsCommand; -exports.ListStackSetOperationsCommand = ListStackSetOperationsCommand; -exports.ListStackSetsCommand = ListStackSetsCommand; -exports.ListStacksCommand = ListStacksCommand; -exports.ListTypeRegistrationsCommand = ListTypeRegistrationsCommand; -exports.ListTypeVersionsCommand = ListTypeVersionsCommand; -exports.ListTypesCommand = ListTypesCommand; -exports.NameAlreadyExistsException = NameAlreadyExistsException$1; -exports.OnFailure = OnFailure; -exports.OnStackFailure = OnStackFailure; -exports.OperationIdAlreadyExistsException = OperationIdAlreadyExistsException$1; -exports.OperationInProgressException = OperationInProgressException$1; -exports.OperationNotFoundException = OperationNotFoundException$1; -exports.OperationResultFilterName = OperationResultFilterName; -exports.OperationStatus = OperationStatus; -exports.OperationStatusCheckFailedException = OperationStatusCheckFailedException$1; -exports.OperationType = OperationType; -exports.OrganizationStatus = OrganizationStatus; -exports.PermissionModels = PermissionModels; -exports.PolicyAction = PolicyAction; -exports.ProvisioningType = ProvisioningType; -exports.PublishTypeCommand = PublishTypeCommand; -exports.PublisherStatus = PublisherStatus; -exports.RecordHandlerProgressCommand = RecordHandlerProgressCommand; -exports.RegionConcurrencyType = RegionConcurrencyType; -exports.RegisterPublisherCommand = RegisterPublisherCommand; -exports.RegisterTypeCommand = RegisterTypeCommand; -exports.RegistrationStatus = RegistrationStatus; -exports.RegistryType = RegistryType; -exports.Replacement = Replacement; -exports.RequiresRecreation = RequiresRecreation; -exports.ResourceAttribute = ResourceAttribute; -exports.ResourceScanInProgressException = ResourceScanInProgressException$1; -exports.ResourceScanLimitExceededException = ResourceScanLimitExceededException$1; -exports.ResourceScanNotFoundException = ResourceScanNotFoundException$1; -exports.ResourceScanStatus = ResourceScanStatus; -exports.ResourceSignalStatus = ResourceSignalStatus; -exports.ResourceStatus = ResourceStatus; -exports.RollbackStackCommand = RollbackStackCommand; -exports.ScanType = ScanType; -exports.SetStackPolicyCommand = SetStackPolicyCommand; -exports.SetTypeConfigurationCommand = SetTypeConfigurationCommand; -exports.SetTypeDefaultVersionCommand = SetTypeDefaultVersionCommand; -exports.SignalResourceCommand = SignalResourceCommand; -exports.StackDriftDetectionStatus = StackDriftDetectionStatus; -exports.StackDriftStatus = StackDriftStatus; -exports.StackInstanceDetailedStatus = StackInstanceDetailedStatus; -exports.StackInstanceFilterName = StackInstanceFilterName; -exports.StackInstanceNotFoundException = StackInstanceNotFoundException$1; -exports.StackInstanceStatus = StackInstanceStatus; -exports.StackNotFoundException = StackNotFoundException$1; -exports.StackRefactorActionEntity = StackRefactorActionEntity; -exports.StackRefactorActionType = StackRefactorActionType; -exports.StackRefactorDetection = StackRefactorDetection; -exports.StackRefactorExecutionStatus = StackRefactorExecutionStatus; -exports.StackRefactorNotFoundException = StackRefactorNotFoundException$1; -exports.StackRefactorStatus = StackRefactorStatus; -exports.StackResourceDriftStatus = StackResourceDriftStatus; -exports.StackSetDriftDetectionStatus = StackSetDriftDetectionStatus; -exports.StackSetDriftStatus = StackSetDriftStatus; -exports.StackSetNotEmptyException = StackSetNotEmptyException$1; -exports.StackSetNotFoundException = StackSetNotFoundException$1; -exports.StackSetOperationAction = StackSetOperationAction; -exports.StackSetOperationResultStatus = StackSetOperationResultStatus; -exports.StackSetOperationStatus = StackSetOperationStatus; -exports.StackSetStatus = StackSetStatus; -exports.StackStatus = StackStatus; -exports.StaleRequestException = StaleRequestException$1; -exports.StartResourceScanCommand = StartResourceScanCommand; -exports.StopStackSetOperationCommand = StopStackSetOperationCommand; -exports.TemplateFormat = TemplateFormat; -exports.TemplateStage = TemplateStage; -exports.TestTypeCommand = TestTypeCommand; -exports.ThirdPartyType = ThirdPartyType; -exports.TokenAlreadyExistsException = TokenAlreadyExistsException$1; -exports.TypeConfigurationNotFoundException = TypeConfigurationNotFoundException$1; -exports.TypeNotFoundException = TypeNotFoundException$1; -exports.TypeTestsStatus = TypeTestsStatus; -exports.UpdateGeneratedTemplateCommand = UpdateGeneratedTemplateCommand; -exports.UpdateStackCommand = UpdateStackCommand; -exports.UpdateStackInstancesCommand = UpdateStackInstancesCommand; -exports.UpdateStackSetCommand = UpdateStackSetCommand; -exports.UpdateTerminationProtectionCommand = UpdateTerminationProtectionCommand; -exports.ValidateTemplateCommand = ValidateTemplateCommand; -exports.ValidationStatus = ValidationStatus; -exports.VersionBump = VersionBump; -exports.Visibility = Visibility; -exports.WarningType = WarningType; -exports.paginateDescribeAccountLimits = paginateDescribeAccountLimits; -exports.paginateDescribeChangeSet = paginateDescribeChangeSet; -exports.paginateDescribeEvents = paginateDescribeEvents; -exports.paginateDescribeStackEvents = paginateDescribeStackEvents; -exports.paginateDescribeStackResourceDrifts = paginateDescribeStackResourceDrifts; -exports.paginateDescribeStacks = paginateDescribeStacks; -exports.paginateListChangeSets = paginateListChangeSets; -exports.paginateListExports = paginateListExports; -exports.paginateListGeneratedTemplates = paginateListGeneratedTemplates; -exports.paginateListImports = paginateListImports; -exports.paginateListResourceScanRelatedResources = paginateListResourceScanRelatedResources; -exports.paginateListResourceScanResources = paginateListResourceScanResources; -exports.paginateListResourceScans = paginateListResourceScans; -exports.paginateListStackInstances = paginateListStackInstances; -exports.paginateListStackRefactorActions = paginateListStackRefactorActions; -exports.paginateListStackRefactors = paginateListStackRefactors; -exports.paginateListStackResources = paginateListStackResources; -exports.paginateListStackSetOperationResults = paginateListStackSetOperationResults; -exports.paginateListStackSetOperations = paginateListStackSetOperations; -exports.paginateListStackSets = paginateListStackSets; -exports.paginateListStacks = paginateListStacks; -exports.paginateListTypeRegistrations = paginateListTypeRegistrations; -exports.paginateListTypeVersions = paginateListTypeVersions; -exports.paginateListTypes = paginateListTypes; -exports.waitForChangeSetCreateComplete = waitForChangeSetCreateComplete; -exports.waitForStackCreateComplete = waitForStackCreateComplete; -exports.waitForStackDeleteComplete = waitForStackDeleteComplete; -exports.waitForStackExists = waitForStackExists; -exports.waitForStackImportComplete = waitForStackImportComplete; -exports.waitForStackRefactorCreateComplete = waitForStackRefactorCreateComplete; -exports.waitForStackRefactorExecuteComplete = waitForStackRefactorExecuteComplete; -exports.waitForStackRollbackComplete = waitForStackRollbackComplete; -exports.waitForStackUpdateComplete = waitForStackUpdateComplete; -exports.waitForTypeRegistrationComplete = waitForTypeRegistrationComplete; -exports.waitUntilChangeSetCreateComplete = waitUntilChangeSetCreateComplete; -exports.waitUntilStackCreateComplete = waitUntilStackCreateComplete; -exports.waitUntilStackDeleteComplete = waitUntilStackDeleteComplete; -exports.waitUntilStackExists = waitUntilStackExists; -exports.waitUntilStackImportComplete = waitUntilStackImportComplete; -exports.waitUntilStackRefactorCreateComplete = waitUntilStackRefactorCreateComplete; -exports.waitUntilStackRefactorExecuteComplete = waitUntilStackRefactorExecuteComplete; -exports.waitUntilStackRollbackComplete = waitUntilStackRollbackComplete; -exports.waitUntilStackUpdateComplete = waitUntilStackUpdateComplete; -exports.waitUntilTypeRegistrationComplete = waitUntilTypeRegistrationComplete; +const DEFER_EVENT_LISTENER_TIME = 3000; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); + } + else { + request.setTimeout(timeout, onTimeout); + } + }; + if (0 < timeoutInMs && timeoutInMs < 6000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); +}; + +const MIN_WAIT_TIME = 6_000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }), + ]); + } + if (sendBody) { + writeBody(httpRequest, request.body); + } +} +function writeBody(httpRequest, body) { + if (body instanceof stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + const isBuffer = Buffer.isBuffer(body); + const isString = typeof body === "string"; + if (isBuffer || isString) { + if (isBuffer && body.byteLength === 0) { + httpRequest.end(); + } + else { + httpRequest.end(body); + } + return; + } + const uint8 = body; + if (typeof uint8 === "object" && + uint8.buffer && + typeof uint8.byteOffset === "number" && + typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; + } + httpRequest.end(); +} + +const DEFAULT_REQUEST_TIMEOUT = 0; +class NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15_000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); + } + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgent: (() => { + if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger, + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + const config = this.config; + let writeRequestBodyPromise = undefined; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? https.Agent : http.Agent)({ + keepAlive: false, + maxSockets: Infinity, + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } + else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? https.request : http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } +} +class NodeHttp2ConnectionPool { + sessions = []; + constructor(sessions) { + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); + } + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } + } +} -/***/ }), +class NodeHttp2ConnectionManager { + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); + } + } + config; + sessionCache = new Map(); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } + } + const session = http2.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); + } + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); + } + this.sessionCache.delete(key); + } + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); + } +} -/***/ 7079: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); + } + else { + resolve(options || {}); + } + }); + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [http2.constants.HTTP2_HEADER_PATH]: path, + [http2.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } + } +} -"use strict"; +class Collector extends stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); + } +} -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const tslib_1 = __nccwpck_require__(1860); -const package_json_1 = tslib_1.__importDefault(__nccwpck_require__(9027)); -const core_1 = __nccwpck_require__(8704); -const credential_provider_node_1 = __nccwpck_require__(5861); -const util_user_agent_node_1 = __nccwpck_require__(1656); -const config_resolver_1 = __nccwpck_require__(9316); -const hash_node_1 = __nccwpck_require__(2711); -const middleware_retry_1 = __nccwpck_require__(9618); -const node_config_provider_1 = __nccwpck_require__(5704); -const node_http_handler_1 = __nccwpck_require__(1279); -const util_body_length_node_1 = __nccwpck_require__(3638); -const util_retry_1 = __nccwpck_require__(5518); -const runtimeConfig_shared_1 = __nccwpck_require__(6036); -const smithy_client_1 = __nccwpck_require__(1411); -const util_defaults_mode_node_1 = __nccwpck_require__(5435); -const smithy_client_2 = __nccwpck_require__(1411); -const getRuntimeConfig = (config) => { - (0, smithy_client_2.emitWarningIfUnsupportedVersion)(process.version); - const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config); - const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode); - const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config); - (0, core_1.emitWarningIfUnsupportedVersion)(process.version); - const loaderConfig = { - profile: config?.profile, - logger: clientSharedValues.logger, - }; - return { - ...clientSharedValues, - ...config, - runtime: "node", - defaultsMode, - authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig), - bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength, - credentialDefaultProvider: config?.credentialDefaultProvider ?? credential_provider_node_1.defaultProvider, - defaultUserAgentProvider: config?.defaultUserAgentProvider ?? - (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }), - maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config), - region: config?.region ?? - (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }), - requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider), - retryMode: config?.retryMode ?? - (0, node_config_provider_1.loadConfig)({ - ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS, - default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE, - }, config), - sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"), - streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector, - useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig), - userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig), - }; +const streamCollector = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); }; -exports.getRuntimeConfig = getRuntimeConfig; - - -/***/ }), - -/***/ 6036: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; +} -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getRuntimeConfig = void 0; -const core_1 = __nccwpck_require__(8704); -const protocols_1 = __nccwpck_require__(7288); -const smithy_client_1 = __nccwpck_require__(1411); -const url_parser_1 = __nccwpck_require__(4494); -const util_base64_1 = __nccwpck_require__(8385); -const util_utf8_1 = __nccwpck_require__(1577); -const httpAuthSchemeProvider_1 = __nccwpck_require__(398); -const endpointResolver_1 = __nccwpck_require__(2840); -const getRuntimeConfig = (config) => { - return { - apiVersion: "2010-05-15", - base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64, - base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64, - disableHostPrefix: config?.disableHostPrefix ?? false, - endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver, - extensions: config?.extensions ?? [], - httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultCloudFormationHttpAuthSchemeProvider, - httpAuthSchemes: config?.httpAuthSchemes ?? [ - { - schemeId: "aws.auth#sigv4", - identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"), - signer: new core_1.AwsSdkSigV4Signer(), - }, - ], - logger: config?.logger ?? new smithy_client_1.NoOpLogger(), - protocol: config?.protocol ?? - new protocols_1.AwsQueryProtocol({ - defaultNamespace: "com.amazonaws.cloudformation", - xmlNamespace: "http://cloudformation.amazonaws.com/doc/2010-05-15/", - version: "2010-05-15", - }), - serviceId: config?.serviceId ?? "CloudFormation", - urlParser: config?.urlParser ?? url_parser_1.parseUrl, - utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8, - utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8, - }; -}; -exports.getRuntimeConfig = getRuntimeConfig; +exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; +exports.NodeHttp2Handler = NodeHttp2Handler; +exports.NodeHttpHandler = NodeHttpHandler; +exports.streamCollector = streamCollector; /***/ }), @@ -10260,15 +10679,15 @@ const state = { warningEmitted: false, }; const emitWarningIfUnsupportedVersion = (version) => { - if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { + if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 20) { state.warningEmitted = true; process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will -no longer support Node.js 16.x on January 6, 2025. +no longer support Node.js ${version} in January 2026. To continue receiving updates to AWS services, bug fixes, and security updates please upgrade to a supported Node.js LTS version. -More information can be found at: https://a.co/74kJMmI`); +More information can be found at: https://a.co/c895JFp`); } }; @@ -10468,7 +10887,15 @@ const resolveAwsSdkSigV4Config = (config) => { }); const boundProvider = bindCallerConfig(config, memoizedProvider); if (isUserSupplied && !boundProvider.attributed) { - resolvedCredentials = async (options) => boundProvider(options).then((creds) => client.setCredentialFeature(creds, "CREDENTIALS_CODE", "e")); + const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null; + resolvedCredentials = async (options) => { + const creds = await boundProvider(options); + const attributedCreds = creds; + if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) { + return client.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e"); + } + return attributedCreds; + }; resolvedCredentials.memoized = boundProvider.memoized; resolvedCredentials.configBound = boundProvider.configBound; resolvedCredentials.attributed = true; @@ -10648,9 +11075,18 @@ class ProtocolLib { const msg = exception.Message ?? additions.Message; const error = smithyClient.decorateServiceException(exception, additions); if (msg) { - error.Message = msg; error.message = msg; } + error.Error = { + ...error.Error, + Type: error.Error.Type, + Code: error.Error.Code, + Message: error.Error.message ?? error.Error.Message ?? msg, + }; + const reqId = error.$metadata.requestId; + if (reqId) { + error.RequestId = reqId; + } return error; } return smithyClient.decorateServiceException(exception, additions); @@ -10666,7 +11102,7 @@ class ProtocolLib { }; Object.assign(output, Error); for (const [k, v] of entries) { - Error[k] = v; + Error[k === "message" ? "Message" : k] = v; } delete Error.__type; output.Error = Error; @@ -10683,6 +11119,14 @@ class ProtocolLib { errorData.Code = queryCompatErrorData.Code; } } + findQueryCompatibleError(registry, errorName) { + try { + return registry.getSchema(errorName); + } + catch (e) { + return registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName); + } + } } class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { @@ -10704,15 +11148,23 @@ class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { if (this.awsQueryCompatible) { this.mixin.setQueryCompatError(dataObject, response); } - const errorName = cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata); + const errorName = (() => { + const compatHeader = response.headers["x-amzn-query-error"]; + if (compatHeader && this.awsQueryCompatible) { + return compatHeader.split(";")[0]; + } + return cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; + })(); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { - output[name] = this.deserializer.readValue(member, dataObject[name]); + if (dataObject[name] != null) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } } if (this.awsQueryCompatible) { this.mixin.queryCompatOutput(dataObject, output); @@ -10781,6 +11233,30 @@ class SerdeContextConfig { } } +class UnionSerde { + from; + to; + keys; + constructor(from, to) { + this.from = from; + this.to = to; + this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type")); + } + mark(key) { + this.keys.delete(key); + } + hasUnknown() { + return this.keys.size === 1 && Object.keys(this.to).length === 0; + } + writeUnknown() { + if (this.hasUnknown()) { + const k = this.keys.values().next().value; + const v = this.from[k]; + this.to.$unknown = [k, v]; + } + } +} + function jsonReviver(key, value, context) { if (context?.source) { const numericString = context.source; @@ -10870,38 +11346,68 @@ class JsonShapeDeserializer extends SerdeContextConfig { _read(schema$1, value) { const isObject = value !== null && typeof value === "object"; const ns = schema.NormalizedSchema.of(schema$1); - if (ns.isListSchema() && Array.isArray(value)) { - const listMember = ns.getValueSchema(); - const out = []; - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - if (sparse || item != null) { - out.push(this._read(listMember, item)); + if (isObject) { + if (ns.isStructSchema()) { + const record = value; + const union = ns.isUnionSchema(); + const out = {}; + let nameMap = void 0; + const { jsonName } = this.settings; + if (jsonName) { + nameMap = {}; + } + let unionSerde; + if (union) { + unionSerde = new UnionSerde(record, out); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + let fromKey = memberName; + if (jsonName) { + fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey; + nameMap[fromKey] = memberName; + } + if (union) { + unionSerde.mark(fromKey); + } + if (record[fromKey] != null) { + out[memberName] = this._read(memberSchema, record[fromKey]); + } + } + if (union) { + unionSerde.writeUnknown(); + } + else if (typeof record.__type === "string") { + for (const [k, v] of Object.entries(record)) { + const t = jsonName ? nameMap[k] ?? k : k; + if (!(t in out)) { + out[t] = v; + } + } } + return out; } - return out; - } - else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._read(mapMember, _v); + if (Array.isArray(value) && ns.isListSchema()) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._read(listMember, item)); + } } + return out; } - return out; - } - else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const deserializedValue = this._read(memberSchema, value[fromKey]); - if (deserializedValue != null) { - out[memberName] = deserializedValue; + if (ns.isMapSchema()) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._read(mapMember, _v); + } } + return out; } - return out; } if (ns.isBlobSchema() && typeof value === "string") { return utilBase64.fromBase64(value); @@ -10912,6 +11418,7 @@ class JsonShapeDeserializer extends SerdeContextConfig { if (isJson) { return serde.LazyJsonString.from(value); } + return value; } if (ns.isTimestampSchema() && value != null) { const format = protocols.determineTimestampFormat(ns, this.settings); @@ -10949,6 +11456,7 @@ class JsonShapeDeserializer extends SerdeContextConfig { case "NaN": return NaN; } + return value; } if (ns.isDocumentSchema()) { if (isObject) { @@ -11020,6 +11528,7 @@ class JsonReplacer { class JsonShapeSerializer extends SerdeContextConfig { settings; buffer; + useReplacer = false; rootSchema; constructor(settings) { super(); @@ -11036,9 +11545,13 @@ class JsonShapeSerializer extends SerdeContextConfig { } } flush() { - const { rootSchema } = this; + const { rootSchema, useReplacer } = this; this.rootSchema = undefined; + this.useReplacer = false; if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) { + if (!useReplacer) { + return JSON.stringify(this.buffer); + } const replacer = new JsonReplacer(); return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); } @@ -11047,68 +11560,92 @@ class JsonShapeSerializer extends SerdeContextConfig { _write(schema$1, value, container) { const isObject = value !== null && typeof value === "object"; const ns = schema.NormalizedSchema.of(schema$1); - if (ns.isListSchema() && Array.isArray(value)) { - const listMember = ns.getValueSchema(); - const out = []; - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - if (sparse || item != null) { - out.push(this._write(listMember, item)); + if (isObject) { + if (ns.isStructSchema()) { + const record = value; + const out = {}; + const { jsonName } = this.settings; + let nameMap = void 0; + if (jsonName) { + nameMap = {}; + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const serializableValue = this._write(memberSchema, record[memberName], ns); + if (serializableValue !== undefined) { + let targetKey = memberName; + if (jsonName) { + targetKey = memberSchema.getMergedTraits().jsonName ?? memberName; + nameMap[memberName] = targetKey; + } + out[targetKey] = serializableValue; + } + } + if (ns.isUnionSchema() && Object.keys(out).length === 0) { + const { $unknown } = record; + if (Array.isArray($unknown)) { + const [k, v] = $unknown; + out[k] = this._write(15, v); + } } + else if (typeof record.__type === "string") { + for (const [k, v] of Object.entries(record)) { + const targetKey = jsonName ? nameMap[k] ?? k : k; + if (!(targetKey in out)) { + out[targetKey] = this._write(15, v); + } + } + } + return out; } - return out; - } - else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._write(mapMember, _v); + if (Array.isArray(value) && ns.isListSchema()) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._write(listMember, item)); + } } + return out; } - return out; - } - else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const serializableValue = this._write(memberSchema, value[memberName], ns); - if (serializableValue !== undefined) { - out[targetKey] = serializableValue; + if (ns.isMapSchema()) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._write(mapMember, _v); + } } + return out; } - return out; - } - if (value === null && container?.isStructSchema()) { - return void 0; - } - if ((ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) || - (ns.isDocumentSchema() && value instanceof Uint8Array)) { - if (ns === this.rootSchema) { - return value; + if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) { + if (ns === this.rootSchema) { + return value; + } + return (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); } - return (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); - } - if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) { - const format = protocols.determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - return value.toISOString().replace(".000Z", "Z"); - case 6: - return serde.dateToUtcString(value); - case 7: - return value.getTime() / 1000; - default: - console.warn("Missing timestamp format, using epoch seconds", value); - return value.getTime() / 1000; + if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) { + const format = protocols.determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return value.toISOString().replace(".000Z", "Z"); + case 6: + return serde.dateToUtcString(value); + case 7: + return value.getTime() / 1000; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + return value.getTime() / 1000; + } } - } - if (ns.isNumericSchema() && typeof value === "number") { - if (Math.abs(value) === Infinity || isNaN(value)) { - return String(value); + if (value instanceof serde.NumericValue) { + this.useReplacer = true; } } + if (value === null && container?.isStructSchema()) { + return void 0; + } if (ns.isStringSchema()) { if (typeof value === "undefined" && ns.isIdempotencyToken()) { return serde.generateIdempotencyToken(); @@ -11120,12 +11657,29 @@ class JsonShapeSerializer extends SerdeContextConfig { return serde.LazyJsonString.from(value); } } + return value; + } + if (typeof value === "number" && ns.isNumericSchema()) { + if (Math.abs(value) === Infinity || isNaN(value)) { + return String(value); + } + return value; + } + if (typeof value === "string" && ns.isBlobSchema()) { + if (ns === this.rootSchema) { + return value; + } + return (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); + } + if (typeof value === "bigint") { + this.useReplacer = true; } if (ns.isDocumentSchema()) { if (isObject) { const out = Array.isArray(value) ? [] : {}; for (const [k, v] of Object.entries(value)) { if (v instanceof serde.NumericValue) { + this.useReplacer = true; out[k] = v; } else { @@ -11167,18 +11721,20 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { codec; mixin; awsQueryCompatible; - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) { super({ defaultNamespace, }); this.serviceTarget = serviceTarget; - this.codec = new JsonCodec({ - timestampFormat: { - useTrait: true, - default: 7, - }, - jsonName: false, - }); + this.codec = + jsonCodec ?? + new JsonCodec({ + timestampFormat: { + useTrait: true, + default: 7, + }, + jsonName: false, + }); this.serializer = this.codec.createSerializer(); this.deserializer = this.codec.createDeserializer(); this.awsQueryCompatible = !!awsQueryCompatible; @@ -11209,15 +11765,16 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { this.mixin.setQueryCompatError(dataObject, response); } const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().jsonName ?? name; - output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + if (dataObject[name] != null) { + output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]); + } } if (this.awsQueryCompatible) { this.mixin.queryCompatOutput(dataObject, output); @@ -11230,11 +11787,12 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { } class AwsJson1_0Protocol extends AwsJsonRpcProtocol { - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) { super({ defaultNamespace, serviceTarget, awsQueryCompatible, + jsonCodec, }); } getShapeId() { @@ -11249,11 +11807,12 @@ class AwsJson1_0Protocol extends AwsJsonRpcProtocol { } class AwsJson1_1Protocol extends AwsJsonRpcProtocol { - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) { super({ defaultNamespace, serviceTarget, awsQueryCompatible, + jsonCodec, }); } getShapeId() { @@ -11442,15 +12001,26 @@ class XmlShapeDeserializer extends SerdeContextConfig { return buffer; } if (ns.isStructSchema()) { + const union = ns.isUnionSchema(); + let unionSerde; + if (union) { + unionSerde = new UnionSerde(value, buffer); + } for (const [memberName, memberSchema] of ns.structIterator()) { const memberTraits = memberSchema.getMergedTraits(); const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (union) { + unionSerde.mark(xmlObjectKey); + } if (value[xmlObjectKey] != null) { buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); } } + if (union) { + unionSerde.writeUnknown(); + } return buffer; } if (ns.isDocumentSchema()) { @@ -11554,7 +12124,22 @@ class QueryShapeSerializer extends SerdeContextConfig { } } else if (ns.isDocumentSchema()) { - throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); + if (Array.isArray(value)) { + this.write(64 | 15, value, prefix); + } + else if (value instanceof Date) { + this.write(4, value, prefix); + } + else if (value instanceof Uint8Array) { + this.write(21, value, prefix); + } + else if (value && typeof value === "object") { + this.write(128 | 15, value, prefix); + } + else { + this.writeKey(prefix); + this.writeValue(String(value)); + } } else if (ns.isListSchema()) { if (Array.isArray(value)) { @@ -11572,7 +12157,8 @@ class QueryShapeSerializer extends SerdeContextConfig { if (item == null) { continue; } - const suffix = this.getKey("member", member.getMergedTraits().xmlName); + const traits = member.getMergedTraits(); + const suffix = this.getKey("member", traits.xmlName, traits.ec2QueryName); const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`; this.write(member, item, key); ++i; @@ -11590,9 +12176,11 @@ class QueryShapeSerializer extends SerdeContextConfig { if (v == null) { continue; } - const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName); + const keyTraits = keySchema.getMergedTraits(); + const keySuffix = this.getKey("key", keyTraits.xmlName, keyTraits.ec2QueryName); const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`; - const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName); + const valTraits = memberSchema.getMergedTraits(); + const valueSuffix = this.getKey("value", valTraits.xmlName, valTraits.ec2QueryName); const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`; this.write(keySchema, k, key); this.write(memberSchema, v, valueKey); @@ -11602,13 +12190,24 @@ class QueryShapeSerializer extends SerdeContextConfig { } else if (ns.isStructSchema()) { if (value && typeof value === "object") { + let didWriteMember = false; for (const [memberName, member] of ns.structIterator()) { if (value[memberName] == null && !member.isIdempotencyToken()) { continue; } - const suffix = this.getKey(memberName, member.getMergedTraits().xmlName); + const traits = member.getMergedTraits(); + const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, "struct"); const key = `${prefix}${suffix}`; this.write(member, value[memberName], key); + didWriteMember = true; + } + if (!didWriteMember && ns.isUnionSchema()) { + const { $unknown } = value; + if (Array.isArray($unknown)) { + const [k, v] = $unknown; + const key = `${prefix}${k}`; + this.write(15, v, key); + } } } } @@ -11625,9 +12224,13 @@ class QueryShapeSerializer extends SerdeContextConfig { delete this.buffer; return str; } - getKey(memberName, xmlName) { + getKey(memberName, xmlName, ec2QueryName, keySource) { + const { ec2, capitalizeKeys } = this.settings; + if (ec2 && ec2QueryName) { + return ec2QueryName; + } const key = xmlName ?? memberName; - if (this.settings.capitalizeKeys) { + if (capitalizeKeys && keySource === "struct") { return key[0].toUpperCase() + key.slice(1); } return key; @@ -11735,18 +12338,13 @@ class AwsQueryProtocol extends protocols.RpcProtocol { Code: errorData.Code, Message: message, }; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, (registry, errorName) => { - try { - return registry.getSchema(errorName); - } - catch (e) { - return registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName); - } - }); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError); const ns = schema.NormalizedSchema.of(errorSchema); const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = { + Type: errorData.Error.Type, + Code: errorData.Error.Code, Error: errorData.Error, }; for (const [name, member] of ns.structIterator()) { @@ -11789,6 +12387,7 @@ class AwsEc2QueryProtocol extends AwsQueryProtocol { capitalizeKeys: true, flattenLists: true, serializeEmptyLists: false, + ec2: true, }; Object.assign(this.serializer.settings, ec2Settings); } @@ -11922,6 +12521,22 @@ class XmlShapeSerializer extends SerdeContextConfig { } } } + const { $unknown } = value; + if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) { + const [k, v] = $unknown; + const node = xmlBuilder.XmlNode.of(k); + if (typeof v !== "string") { + if (value instanceof xmlBuilder.XmlNode || value instanceof xmlBuilder.XmlText) { + structXmlNode.addChildNode(value); + } + else { + throw new Error(`@aws-sdk - $unknown union member in XML requires ` + + `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`); + } + } + this.writeSimpleInto(0, v, node, xmlns); + structXmlNode.addChildNode(node); + } if (xmlns) { structXmlNode.addAttribute(xmlnsAttr, xmlns); } @@ -12167,10 +12782,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { request.headers["content-type"] = contentType; } } - if (request.headers["content-type"] === this.getDefaultContentType()) { - if (typeof request.body === "string") { - request.body = '' + request.body; - } + if (typeof request.body === "string" && + request.headers["content-type"] === this.getDefaultContentType() && + !request.body.startsWith("' + request.body; } return request; } @@ -12179,6 +12795,17 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + if (dataObject.Error && typeof dataObject.Error === "object") { + for (const key of Object.keys(dataObject.Error)) { + dataObject[key] = dataObject.Error[key]; + if (key.toLowerCase() === "message") { + dataObject.message = dataObject.Error[key]; + } + } + } + if (dataObject.RequestId && !metadata.requestId) { + metadata.requestId = dataObject.RequestId; + } const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; @@ -12199,6 +12826,14 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { getDefaultContentType() { return "application/xml"; } + hasUnstructuredPayloadBinding(ns) { + for (const [, member] of ns.structIterator()) { + if (member.getMergedTraits().httpPayload) { + return !(member.isStructSchema() || member.isMapSchema() || member.isListSchema()); + } + } + return false; + } } exports.AWSSDKSigV4Signer = AWSSDKSigV4Signer; @@ -12254,15 +12889,15 @@ const state = { warningEmitted: false, }; const emitWarningIfUnsupportedVersion = (version) => { - if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 18) { + if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 20) { state.warningEmitted = true; process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will -no longer support Node.js 16.x on January 6, 2025. +no longer support Node.js ${version} in January 2026. To continue receiving updates to AWS services, bug fixes, and security updates please upgrade to a supported Node.js LTS version. -More information can be found at: https://a.co/74kJMmI`); +More information can be found at: https://a.co/c895JFp`); } }; @@ -12385,9 +13020,18 @@ class ProtocolLib { const msg = exception.Message ?? additions.Message; const error = smithyClient.decorateServiceException(exception, additions); if (msg) { - error.Message = msg; error.message = msg; } + error.Error = { + ...error.Error, + Type: error.Error.Type, + Code: error.Error.Code, + Message: error.Error.message ?? error.Error.Message ?? msg, + }; + const reqId = error.$metadata.requestId; + if (reqId) { + error.RequestId = reqId; + } return error; } return smithyClient.decorateServiceException(exception, additions); @@ -12403,7 +13047,7 @@ class ProtocolLib { }; Object.assign(output, Error); for (const [k, v] of entries) { - Error[k] = v; + Error[k === "message" ? "Message" : k] = v; } delete Error.__type; output.Error = Error; @@ -12420,6 +13064,14 @@ class ProtocolLib { errorData.Code = queryCompatErrorData.Code; } } + findQueryCompatibleError(registry, errorName) { + try { + return registry.getSchema(errorName); + } + catch (e) { + return registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName); + } + } } class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { @@ -12441,15 +13093,23 @@ class AwsSmithyRpcV2CborProtocol extends cbor.SmithyRpcV2CborProtocol { if (this.awsQueryCompatible) { this.mixin.setQueryCompatError(dataObject, response); } - const errorName = cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata); + const errorName = (() => { + const compatHeader = response.headers["x-amzn-query-error"]; + if (compatHeader && this.awsQueryCompatible) { + return compatHeader.split(";")[0]; + } + return cbor.loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; + })(); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorName, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { - output[name] = this.deserializer.readValue(member, dataObject[name]); + if (dataObject[name] != null) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } } if (this.awsQueryCompatible) { this.mixin.queryCompatOutput(dataObject, output); @@ -12518,6 +13178,30 @@ class SerdeContextConfig { } } +class UnionSerde { + from; + to; + keys; + constructor(from, to) { + this.from = from; + this.to = to; + this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type")); + } + mark(key) { + this.keys.delete(key); + } + hasUnknown() { + return this.keys.size === 1 && Object.keys(this.to).length === 0; + } + writeUnknown() { + if (this.hasUnknown()) { + const k = this.keys.values().next().value; + const v = this.from[k]; + this.to.$unknown = [k, v]; + } + } +} + function jsonReviver(key, value, context) { if (context?.source) { const numericString = context.source; @@ -12607,38 +13291,68 @@ class JsonShapeDeserializer extends SerdeContextConfig { _read(schema$1, value) { const isObject = value !== null && typeof value === "object"; const ns = schema.NormalizedSchema.of(schema$1); - if (ns.isListSchema() && Array.isArray(value)) { - const listMember = ns.getValueSchema(); - const out = []; - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - if (sparse || item != null) { - out.push(this._read(listMember, item)); + if (isObject) { + if (ns.isStructSchema()) { + const record = value; + const union = ns.isUnionSchema(); + const out = {}; + let nameMap = void 0; + const { jsonName } = this.settings; + if (jsonName) { + nameMap = {}; + } + let unionSerde; + if (union) { + unionSerde = new UnionSerde(record, out); + } + for (const [memberName, memberSchema] of ns.structIterator()) { + let fromKey = memberName; + if (jsonName) { + fromKey = memberSchema.getMergedTraits().jsonName ?? fromKey; + nameMap[fromKey] = memberName; + } + if (union) { + unionSerde.mark(fromKey); + } + if (record[fromKey] != null) { + out[memberName] = this._read(memberSchema, record[fromKey]); + } + } + if (union) { + unionSerde.writeUnknown(); } + else if (typeof record.__type === "string") { + for (const [k, v] of Object.entries(record)) { + const t = jsonName ? nameMap[k] ?? k : k; + if (!(t in out)) { + out[t] = v; + } + } + } + return out; } - return out; - } - else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._read(mapMember, _v); + if (Array.isArray(value) && ns.isListSchema()) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._read(listMember, item)); + } } + return out; } - return out; - } - else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const fromKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const deserializedValue = this._read(memberSchema, value[fromKey]); - if (deserializedValue != null) { - out[memberName] = deserializedValue; + if (ns.isMapSchema()) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._read(mapMember, _v); + } } + return out; } - return out; } if (ns.isBlobSchema() && typeof value === "string") { return utilBase64.fromBase64(value); @@ -12649,6 +13363,7 @@ class JsonShapeDeserializer extends SerdeContextConfig { if (isJson) { return serde.LazyJsonString.from(value); } + return value; } if (ns.isTimestampSchema() && value != null) { const format = protocols.determineTimestampFormat(ns, this.settings); @@ -12686,6 +13401,7 @@ class JsonShapeDeserializer extends SerdeContextConfig { case "NaN": return NaN; } + return value; } if (ns.isDocumentSchema()) { if (isObject) { @@ -12757,6 +13473,7 @@ class JsonReplacer { class JsonShapeSerializer extends SerdeContextConfig { settings; buffer; + useReplacer = false; rootSchema; constructor(settings) { super(); @@ -12773,9 +13490,13 @@ class JsonShapeSerializer extends SerdeContextConfig { } } flush() { - const { rootSchema } = this; + const { rootSchema, useReplacer } = this; this.rootSchema = undefined; + this.useReplacer = false; if (rootSchema?.isStructSchema() || rootSchema?.isDocumentSchema()) { + if (!useReplacer) { + return JSON.stringify(this.buffer); + } const replacer = new JsonReplacer(); return replacer.replaceInJson(JSON.stringify(this.buffer, replacer.createReplacer(), 0)); } @@ -12784,68 +13505,92 @@ class JsonShapeSerializer extends SerdeContextConfig { _write(schema$1, value, container) { const isObject = value !== null && typeof value === "object"; const ns = schema.NormalizedSchema.of(schema$1); - if (ns.isListSchema() && Array.isArray(value)) { - const listMember = ns.getValueSchema(); - const out = []; - const sparse = !!ns.getMergedTraits().sparse; - for (const item of value) { - if (sparse || item != null) { - out.push(this._write(listMember, item)); + if (isObject) { + if (ns.isStructSchema()) { + const record = value; + const out = {}; + const { jsonName } = this.settings; + let nameMap = void 0; + if (jsonName) { + nameMap = {}; + } + for (const [memberName, memberSchema] of ns.structIterator()) { + const serializableValue = this._write(memberSchema, record[memberName], ns); + if (serializableValue !== undefined) { + let targetKey = memberName; + if (jsonName) { + targetKey = memberSchema.getMergedTraits().jsonName ?? memberName; + nameMap[memberName] = targetKey; + } + out[targetKey] = serializableValue; + } + } + if (ns.isUnionSchema() && Object.keys(out).length === 0) { + const { $unknown } = record; + if (Array.isArray($unknown)) { + const [k, v] = $unknown; + out[k] = this._write(15, v); + } } + else if (typeof record.__type === "string") { + for (const [k, v] of Object.entries(record)) { + const targetKey = jsonName ? nameMap[k] ?? k : k; + if (!(targetKey in out)) { + out[targetKey] = this._write(15, v); + } + } + } + return out; } - return out; - } - else if (ns.isMapSchema() && isObject) { - const mapMember = ns.getValueSchema(); - const out = {}; - const sparse = !!ns.getMergedTraits().sparse; - for (const [_k, _v] of Object.entries(value)) { - if (sparse || _v != null) { - out[_k] = this._write(mapMember, _v); + if (Array.isArray(value) && ns.isListSchema()) { + const listMember = ns.getValueSchema(); + const out = []; + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + if (sparse || item != null) { + out.push(this._write(listMember, item)); + } } + return out; } - return out; - } - else if (ns.isStructSchema() && isObject) { - const out = {}; - for (const [memberName, memberSchema] of ns.structIterator()) { - const targetKey = this.settings.jsonName ? memberSchema.getMergedTraits().jsonName ?? memberName : memberName; - const serializableValue = this._write(memberSchema, value[memberName], ns); - if (serializableValue !== undefined) { - out[targetKey] = serializableValue; + if (ns.isMapSchema()) { + const mapMember = ns.getValueSchema(); + const out = {}; + const sparse = !!ns.getMergedTraits().sparse; + for (const [_k, _v] of Object.entries(value)) { + if (sparse || _v != null) { + out[_k] = this._write(mapMember, _v); + } } + return out; } - return out; - } - if (value === null && container?.isStructSchema()) { - return void 0; - } - if ((ns.isBlobSchema() && (value instanceof Uint8Array || typeof value === "string")) || - (ns.isDocumentSchema() && value instanceof Uint8Array)) { - if (ns === this.rootSchema) { - return value; + if (value instanceof Uint8Array && (ns.isBlobSchema() || ns.isDocumentSchema())) { + if (ns === this.rootSchema) { + return value; + } + return (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); } - return (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); - } - if ((ns.isTimestampSchema() || ns.isDocumentSchema()) && value instanceof Date) { - const format = protocols.determineTimestampFormat(ns, this.settings); - switch (format) { - case 5: - return value.toISOString().replace(".000Z", "Z"); - case 6: - return serde.dateToUtcString(value); - case 7: - return value.getTime() / 1000; - default: - console.warn("Missing timestamp format, using epoch seconds", value); - return value.getTime() / 1000; + if (value instanceof Date && (ns.isTimestampSchema() || ns.isDocumentSchema())) { + const format = protocols.determineTimestampFormat(ns, this.settings); + switch (format) { + case 5: + return value.toISOString().replace(".000Z", "Z"); + case 6: + return serde.dateToUtcString(value); + case 7: + return value.getTime() / 1000; + default: + console.warn("Missing timestamp format, using epoch seconds", value); + return value.getTime() / 1000; + } } - } - if (ns.isNumericSchema() && typeof value === "number") { - if (Math.abs(value) === Infinity || isNaN(value)) { - return String(value); + if (value instanceof serde.NumericValue) { + this.useReplacer = true; } } + if (value === null && container?.isStructSchema()) { + return void 0; + } if (ns.isStringSchema()) { if (typeof value === "undefined" && ns.isIdempotencyToken()) { return serde.generateIdempotencyToken(); @@ -12857,12 +13602,29 @@ class JsonShapeSerializer extends SerdeContextConfig { return serde.LazyJsonString.from(value); } } + return value; + } + if (typeof value === "number" && ns.isNumericSchema()) { + if (Math.abs(value) === Infinity || isNaN(value)) { + return String(value); + } + return value; + } + if (typeof value === "string" && ns.isBlobSchema()) { + if (ns === this.rootSchema) { + return value; + } + return (this.serdeContext?.base64Encoder ?? utilBase64.toBase64)(value); + } + if (typeof value === "bigint") { + this.useReplacer = true; } if (ns.isDocumentSchema()) { if (isObject) { const out = Array.isArray(value) ? [] : {}; for (const [k, v] of Object.entries(value)) { if (v instanceof serde.NumericValue) { + this.useReplacer = true; out[k] = v; } else { @@ -12904,18 +13666,20 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { codec; mixin; awsQueryCompatible; - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) { super({ defaultNamespace, }); this.serviceTarget = serviceTarget; - this.codec = new JsonCodec({ - timestampFormat: { - useTrait: true, - default: 7, - }, - jsonName: false, - }); + this.codec = + jsonCodec ?? + new JsonCodec({ + timestampFormat: { + useTrait: true, + default: 7, + }, + jsonName: false, + }); this.serializer = this.codec.createSerializer(); this.deserializer = this.codec.createDeserializer(); this.awsQueryCompatible = !!awsQueryCompatible; @@ -12946,15 +13710,16 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { this.mixin.setQueryCompatError(dataObject, response); } const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata, this.awsQueryCompatible ? this.mixin.findQueryCompatibleError : undefined); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = {}; for (const [name, member] of ns.structIterator()) { - const target = member.getMergedTraits().jsonName ?? name; - output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); + if (dataObject[name] != null) { + output[name] = this.codec.createDeserializer().readObject(member, dataObject[name]); + } } if (this.awsQueryCompatible) { this.mixin.queryCompatOutput(dataObject, output); @@ -12967,11 +13732,12 @@ class AwsJsonRpcProtocol extends protocols.RpcProtocol { } class AwsJson1_0Protocol extends AwsJsonRpcProtocol { - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) { super({ defaultNamespace, serviceTarget, awsQueryCompatible, + jsonCodec, }); } getShapeId() { @@ -12986,11 +13752,12 @@ class AwsJson1_0Protocol extends AwsJsonRpcProtocol { } class AwsJson1_1Protocol extends AwsJsonRpcProtocol { - constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, }) { + constructor({ defaultNamespace, serviceTarget, awsQueryCompatible, jsonCodec, }) { super({ defaultNamespace, serviceTarget, awsQueryCompatible, + jsonCodec, }); } getShapeId() { @@ -13179,15 +13946,26 @@ class XmlShapeDeserializer extends SerdeContextConfig { return buffer; } if (ns.isStructSchema()) { + const union = ns.isUnionSchema(); + let unionSerde; + if (union) { + unionSerde = new UnionSerde(value, buffer); + } for (const [memberName, memberSchema] of ns.structIterator()) { const memberTraits = memberSchema.getMergedTraits(); const xmlObjectKey = !memberTraits.httpPayload ? memberSchema.getMemberTraits().xmlName ?? memberName : memberTraits.xmlName ?? memberSchema.getName(); + if (union) { + unionSerde.mark(xmlObjectKey); + } if (value[xmlObjectKey] != null) { buffer[memberName] = this.readSchema(memberSchema, value[xmlObjectKey]); } } + if (union) { + unionSerde.writeUnknown(); + } return buffer; } if (ns.isDocumentSchema()) { @@ -13291,7 +14069,22 @@ class QueryShapeSerializer extends SerdeContextConfig { } } else if (ns.isDocumentSchema()) { - throw new Error(`@aws-sdk/core/protocols - QuerySerializer unsupported document type ${ns.getName(true)}`); + if (Array.isArray(value)) { + this.write(64 | 15, value, prefix); + } + else if (value instanceof Date) { + this.write(4, value, prefix); + } + else if (value instanceof Uint8Array) { + this.write(21, value, prefix); + } + else if (value && typeof value === "object") { + this.write(128 | 15, value, prefix); + } + else { + this.writeKey(prefix); + this.writeValue(String(value)); + } } else if (ns.isListSchema()) { if (Array.isArray(value)) { @@ -13309,7 +14102,8 @@ class QueryShapeSerializer extends SerdeContextConfig { if (item == null) { continue; } - const suffix = this.getKey("member", member.getMergedTraits().xmlName); + const traits = member.getMergedTraits(); + const suffix = this.getKey("member", traits.xmlName, traits.ec2QueryName); const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`; this.write(member, item, key); ++i; @@ -13327,9 +14121,11 @@ class QueryShapeSerializer extends SerdeContextConfig { if (v == null) { continue; } - const keySuffix = this.getKey("key", keySchema.getMergedTraits().xmlName); + const keyTraits = keySchema.getMergedTraits(); + const keySuffix = this.getKey("key", keyTraits.xmlName, keyTraits.ec2QueryName); const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`; - const valueSuffix = this.getKey("value", memberSchema.getMergedTraits().xmlName); + const valTraits = memberSchema.getMergedTraits(); + const valueSuffix = this.getKey("value", valTraits.xmlName, valTraits.ec2QueryName); const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`; this.write(keySchema, k, key); this.write(memberSchema, v, valueKey); @@ -13339,13 +14135,24 @@ class QueryShapeSerializer extends SerdeContextConfig { } else if (ns.isStructSchema()) { if (value && typeof value === "object") { + let didWriteMember = false; for (const [memberName, member] of ns.structIterator()) { if (value[memberName] == null && !member.isIdempotencyToken()) { continue; } - const suffix = this.getKey(memberName, member.getMergedTraits().xmlName); + const traits = member.getMergedTraits(); + const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, "struct"); const key = `${prefix}${suffix}`; this.write(member, value[memberName], key); + didWriteMember = true; + } + if (!didWriteMember && ns.isUnionSchema()) { + const { $unknown } = value; + if (Array.isArray($unknown)) { + const [k, v] = $unknown; + const key = `${prefix}${k}`; + this.write(15, v, key); + } } } } @@ -13362,9 +14169,13 @@ class QueryShapeSerializer extends SerdeContextConfig { delete this.buffer; return str; } - getKey(memberName, xmlName) { + getKey(memberName, xmlName, ec2QueryName, keySource) { + const { ec2, capitalizeKeys } = this.settings; + if (ec2 && ec2QueryName) { + return ec2QueryName; + } const key = xmlName ?? memberName; - if (this.settings.capitalizeKeys) { + if (capitalizeKeys && keySource === "struct") { return key[0].toUpperCase() + key.slice(1); } return key; @@ -13472,18 +14283,13 @@ class AwsQueryProtocol extends protocols.RpcProtocol { Code: errorData.Code, Message: message, }; - const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, (registry, errorName) => { - try { - return registry.getSchema(errorName); - } - catch (e) { - return registry.find((schema$1) => schema.NormalizedSchema.of(schema$1).getMergedTraits().awsQueryError?.[0] === errorName); - } - }); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError); const ns = schema.NormalizedSchema.of(errorSchema); const ErrorCtor = schema.TypeRegistry.for(errorSchema[1]).getErrorCtor(errorSchema) ?? Error; const exception = new ErrorCtor(message); const output = { + Type: errorData.Error.Type, + Code: errorData.Error.Code, Error: errorData.Error, }; for (const [name, member] of ns.structIterator()) { @@ -13526,6 +14332,7 @@ class AwsEc2QueryProtocol extends AwsQueryProtocol { capitalizeKeys: true, flattenLists: true, serializeEmptyLists: false, + ec2: true, }; Object.assign(this.serializer.settings, ec2Settings); } @@ -13659,6 +14466,22 @@ class XmlShapeSerializer extends SerdeContextConfig { } } } + const { $unknown } = value; + if ($unknown && ns.isUnionSchema() && Array.isArray($unknown) && Object.keys(value).length === 1) { + const [k, v] = $unknown; + const node = xmlBuilder.XmlNode.of(k); + if (typeof v !== "string") { + if (value instanceof xmlBuilder.XmlNode || value instanceof xmlBuilder.XmlText) { + structXmlNode.addChildNode(value); + } + else { + throw new Error(`@aws-sdk - $unknown union member in XML requires ` + + `value of type string, @aws-sdk/xml-builder::XmlNode or XmlText.`); + } + } + this.writeSimpleInto(0, v, node, xmlns); + structXmlNode.addChildNode(node); + } if (xmlns) { structXmlNode.addAttribute(xmlnsAttr, xmlns); } @@ -13904,10 +14727,11 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { request.headers["content-type"] = contentType; } } - if (request.headers["content-type"] === this.getDefaultContentType()) { - if (typeof request.body === "string") { - request.body = '' + request.body; - } + if (typeof request.body === "string" && + request.headers["content-type"] === this.getDefaultContentType() && + !request.body.startsWith("' + request.body; } return request; } @@ -13916,6 +14740,17 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; + if (dataObject.Error && typeof dataObject.Error === "object") { + for (const key of Object.keys(dataObject.Error)) { + dataObject[key] = dataObject.Error[key]; + if (key.toLowerCase() === "message") { + dataObject.message = dataObject.Error[key]; + } + } + } + if (dataObject.RequestId && !metadata.requestId) { + metadata.requestId = dataObject.RequestId; + } const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, dataObject, metadata); const ns = schema.NormalizedSchema.of(errorSchema); const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; @@ -13936,6 +14771,14 @@ class AwsRestXmlProtocol extends protocols.HttpBindingProtocol { getDefaultContentType() { return "application/xml"; } + hasUnstructuredPayloadBinding(ns) { + for (const [, member] of ns.structIterator()) { + if (member.getMergedTraits().httpPayload) { + return !(member.isStructSchema() || member.isMapSchema() || member.isListSchema()); + } + } + return false; + } } exports.AwsEc2QueryProtocol = AwsEc2QueryProtocol; @@ -14062,15 +14905,21 @@ function memoizeChain(providers, treatAsExpired) { else if (!credentials || treatAsExpired?.(credentials)) { if (credentials) { if (!passiveLock) { - passiveLock = chain(options).then((c) => { + passiveLock = chain(options) + .then((c) => { credentials = c; + }) + .finally(() => { passiveLock = undefined; }); } } else { - activeLock = chain(options).then((c) => { + activeLock = chain(options) + .then((c) => { credentials = c; + }) + .finally(() => { activeLock = undefined; }); return provider(options); @@ -14149,7 +14998,7 @@ const defaultProvider = (init = {}) => memoizeChain([ }, async (awsIdentityProperties) => { init.logger?.debug("@aws-sdk/credential-provider-node - defaultProvider::fromTokenFile"); - const { fromTokenFile } = await __nccwpck_require__.e(/* import() */ 956).then(__nccwpck_require__.t.bind(__nccwpck_require__, 9956, 23)); + const { fromTokenFile } = await Promise.all(/* import() */[__nccwpck_require__.e(346), __nccwpck_require__.e(956)]).then(__nccwpck_require__.t.bind(__nccwpck_require__, 9956, 23)); return fromTokenFile(init)(awsIdentityProperties); }, async () => { @@ -14359,7 +15208,7 @@ exports.recursionDetectionMiddleware = recursionDetectionMiddleware; var core = __nccwpck_require__(402); -var utilEndpoints = __nccwpck_require__(3068); +var utilEndpoints = __nccwpck_require__(2547); var protocolHttp = __nccwpck_require__(2356); var core$1 = __nccwpck_require__(8704); @@ -14552,6 +15401,429 @@ exports.resolveUserAgentConfig = resolveUserAgentConfig; exports.userAgentMiddleware = userAgentMiddleware; +/***/ }), + +/***/ 2547: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var utilEndpoints = __nccwpck_require__(9674); +var urlParser = __nccwpck_require__(4494); + +const isVirtualHostableS3Bucket = (value, allowSubDomains = false) => { + if (allowSubDomains) { + for (const label of value.split(".")) { + if (!isVirtualHostableS3Bucket(label)) { + return false; + } + } + return true; + } + if (!utilEndpoints.isValidHostLabel(value)) { + return false; + } + if (value.length < 3 || value.length > 63) { + return false; + } + if (value !== value.toLowerCase()) { + return false; + } + if (utilEndpoints.isIpAddress(value)) { + return false; + } + return true; +}; + +const ARN_DELIMITER = ":"; +const RESOURCE_DELIMITER = "/"; +const parseArn = (value) => { + const segments = value.split(ARN_DELIMITER); + if (segments.length < 6) + return null; + const [arn, partition, service, region, accountId, ...resourcePath] = segments; + if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") + return null; + const resourceId = resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat(); + return { + partition, + service, + region, + accountId, + resourceId, + }; +}; + +var partitions = [ + { + id: "aws", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-east-1", + name: "aws", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$", + regions: { + "af-south-1": { + description: "Africa (Cape Town)" + }, + "ap-east-1": { + description: "Asia Pacific (Hong Kong)" + }, + "ap-east-2": { + description: "Asia Pacific (Taipei)" + }, + "ap-northeast-1": { + description: "Asia Pacific (Tokyo)" + }, + "ap-northeast-2": { + description: "Asia Pacific (Seoul)" + }, + "ap-northeast-3": { + description: "Asia Pacific (Osaka)" + }, + "ap-south-1": { + description: "Asia Pacific (Mumbai)" + }, + "ap-south-2": { + description: "Asia Pacific (Hyderabad)" + }, + "ap-southeast-1": { + description: "Asia Pacific (Singapore)" + }, + "ap-southeast-2": { + description: "Asia Pacific (Sydney)" + }, + "ap-southeast-3": { + description: "Asia Pacific (Jakarta)" + }, + "ap-southeast-4": { + description: "Asia Pacific (Melbourne)" + }, + "ap-southeast-5": { + description: "Asia Pacific (Malaysia)" + }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, + "ap-southeast-7": { + description: "Asia Pacific (Thailand)" + }, + "aws-global": { + description: "aws global region" + }, + "ca-central-1": { + description: "Canada (Central)" + }, + "ca-west-1": { + description: "Canada West (Calgary)" + }, + "eu-central-1": { + description: "Europe (Frankfurt)" + }, + "eu-central-2": { + description: "Europe (Zurich)" + }, + "eu-north-1": { + description: "Europe (Stockholm)" + }, + "eu-south-1": { + description: "Europe (Milan)" + }, + "eu-south-2": { + description: "Europe (Spain)" + }, + "eu-west-1": { + description: "Europe (Ireland)" + }, + "eu-west-2": { + description: "Europe (London)" + }, + "eu-west-3": { + description: "Europe (Paris)" + }, + "il-central-1": { + description: "Israel (Tel Aviv)" + }, + "me-central-1": { + description: "Middle East (UAE)" + }, + "me-south-1": { + description: "Middle East (Bahrain)" + }, + "mx-central-1": { + description: "Mexico (Central)" + }, + "sa-east-1": { + description: "South America (Sao Paulo)" + }, + "us-east-1": { + description: "US East (N. Virginia)" + }, + "us-east-2": { + description: "US East (Ohio)" + }, + "us-west-1": { + description: "US West (N. California)" + }, + "us-west-2": { + description: "US West (Oregon)" + } + } + }, + { + id: "aws-cn", + outputs: { + dnsSuffix: "amazonaws.com.cn", + dualStackDnsSuffix: "api.amazonwebservices.com.cn", + implicitGlobalRegion: "cn-northwest-1", + name: "aws-cn", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^cn\\-\\w+\\-\\d+$", + regions: { + "aws-cn-global": { + description: "aws-cn global region" + }, + "cn-north-1": { + description: "China (Beijing)" + }, + "cn-northwest-1": { + description: "China (Ningxia)" + } + } + }, + { + id: "aws-eusc", + outputs: { + dnsSuffix: "amazonaws.eu", + dualStackDnsSuffix: "api.amazonwebservices.eu", + implicitGlobalRegion: "eusc-de-east-1", + name: "aws-eusc", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", + regions: { + "eusc-de-east-1": { + description: "AWS European Sovereign Cloud (Germany)" + } + } + }, + { + id: "aws-iso", + outputs: { + dnsSuffix: "c2s.ic.gov", + dualStackDnsSuffix: "api.aws.ic.gov", + implicitGlobalRegion: "us-iso-east-1", + name: "aws-iso", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-iso\\-\\w+\\-\\d+$", + regions: { + "aws-iso-global": { + description: "aws-iso global region" + }, + "us-iso-east-1": { + description: "US ISO East" + }, + "us-iso-west-1": { + description: "US ISO WEST" + } + } + }, + { + id: "aws-iso-b", + outputs: { + dnsSuffix: "sc2s.sgov.gov", + dualStackDnsSuffix: "api.aws.scloud", + implicitGlobalRegion: "us-isob-east-1", + name: "aws-iso-b", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isob\\-\\w+\\-\\d+$", + regions: { + "aws-iso-b-global": { + description: "aws-iso-b global region" + }, + "us-isob-east-1": { + description: "US ISOB East (Ohio)" + }, + "us-isob-west-1": { + description: "US ISOB West" + } + } + }, + { + id: "aws-iso-e", + outputs: { + dnsSuffix: "cloud.adc-e.uk", + dualStackDnsSuffix: "api.cloud-aws.adc-e.uk", + implicitGlobalRegion: "eu-isoe-west-1", + name: "aws-iso-e", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^eu\\-isoe\\-\\w+\\-\\d+$", + regions: { + "aws-iso-e-global": { + description: "aws-iso-e global region" + }, + "eu-isoe-west-1": { + description: "EU ISOE West" + } + } + }, + { + id: "aws-iso-f", + outputs: { + dnsSuffix: "csp.hci.ic.gov", + dualStackDnsSuffix: "api.aws.hci.ic.gov", + implicitGlobalRegion: "us-isof-south-1", + name: "aws-iso-f", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-isof\\-\\w+\\-\\d+$", + regions: { + "aws-iso-f-global": { + description: "aws-iso-f global region" + }, + "us-isof-east-1": { + description: "US ISOF EAST" + }, + "us-isof-south-1": { + description: "US ISOF SOUTH" + } + } + }, + { + id: "aws-us-gov", + outputs: { + dnsSuffix: "amazonaws.com", + dualStackDnsSuffix: "api.aws", + implicitGlobalRegion: "us-gov-west-1", + name: "aws-us-gov", + supportsDualStack: true, + supportsFIPS: true + }, + regionRegex: "^us\\-gov\\-\\w+\\-\\d+$", + regions: { + "aws-us-gov-global": { + description: "aws-us-gov global region" + }, + "us-gov-east-1": { + description: "AWS GovCloud (US-East)" + }, + "us-gov-west-1": { + description: "AWS GovCloud (US-West)" + } + } + } +]; +var version = "1.1"; +var partitionsInfo = { + partitions: partitions, + version: version +}; + +let selectedPartitionsInfo = partitionsInfo; +let selectedUserAgentPrefix = ""; +const partition = (value) => { + const { partitions } = selectedPartitionsInfo; + for (const partition of partitions) { + const { regions, outputs } = partition; + for (const [region, regionData] of Object.entries(regions)) { + if (region === value) { + return { + ...outputs, + ...regionData, + }; + } + } + } + for (const partition of partitions) { + const { regionRegex, outputs } = partition; + if (new RegExp(regionRegex).test(value)) { + return { + ...outputs, + }; + } + } + const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws"); + if (!DEFAULT_PARTITION) { + throw new Error("Provided region was not found in the partition array or regex," + + " and default partition with id 'aws' doesn't exist."); + } + return { + ...DEFAULT_PARTITION.outputs, + }; +}; +const setPartitionInfo = (partitionsInfo, userAgentPrefix = "") => { + selectedPartitionsInfo = partitionsInfo; + selectedUserAgentPrefix = userAgentPrefix; +}; +const useDefaultPartitionInfo = () => { + setPartitionInfo(partitionsInfo, ""); +}; +const getUserAgentPrefix = () => selectedUserAgentPrefix; + +const awsEndpointFunctions = { + isVirtualHostableS3Bucket: isVirtualHostableS3Bucket, + parseArn: parseArn, + partition: partition, +}; +utilEndpoints.customEndpointFunctions.aws = awsEndpointFunctions; + +const resolveDefaultAwsRegionalEndpointsConfig = (input) => { + if (typeof input.endpointProvider !== "function") { + throw new Error("@aws-sdk/util-endpoint - endpointProvider and endpoint missing in config for this client."); + } + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + return toEndpointV1(input.endpointProvider({ + Region: typeof input.region === "function" ? await input.region() : input.region, + UseDualStack: typeof input.useDualstackEndpoint === "function" + ? await input.useDualstackEndpoint() + : input.useDualstackEndpoint, + UseFIPS: typeof input.useFipsEndpoint === "function" ? await input.useFipsEndpoint() : input.useFipsEndpoint, + Endpoint: undefined, + }, { logger: input.logger })); + }; + } + return input; +}; +const toEndpointV1 = (endpoint) => urlParser.parseUrl(endpoint.url); + +Object.defineProperty(exports, "EndpointError", ({ + enumerable: true, + get: function () { return utilEndpoints.EndpointError; } +})); +Object.defineProperty(exports, "isIpAddress", ({ + enumerable: true, + get: function () { return utilEndpoints.isIpAddress; } +})); +Object.defineProperty(exports, "resolveEndpoint", ({ + enumerable: true, + get: function () { return utilEndpoints.resolveEndpoint; } +})); +exports.awsEndpointFunctions = awsEndpointFunctions; +exports.getUserAgentPrefix = getUserAgentPrefix; +exports.partition = partition; +exports.resolveDefaultAwsRegionalEndpointsConfig = resolveDefaultAwsRegionalEndpointsConfig; +exports.setPartitionInfo = setPartitionInfo; +exports.toEndpointV1 = toEndpointV1; +exports.useDefaultPartitionInfo = useDefaultPartitionInfo; + + /***/ }), /***/ 6463: @@ -14560,8 +15832,8 @@ exports.userAgentMiddleware = userAgentMiddleware; "use strict"; -var configResolver = __nccwpck_require__(9316); var stsRegionDefaultResolver = __nccwpck_require__(5779); +var configResolver = __nccwpck_require__(9316); const getAwsRegionExtensionConfiguration = (runtimeConfig) => { return { @@ -14847,7 +16119,7 @@ var partitions = [ regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", regions: { "eusc-de-east-1": { - description: "EU (Germany)" + description: "AWS European Sovereign Cloud (Germany)" } } }, @@ -15072,6 +16344,16 @@ var os = __nccwpck_require__(857); var process = __nccwpck_require__(932); var middlewareUserAgent = __nccwpck_require__(2959); +const getRuntimeUserAgentPair = () => { + const runtimesToCheck = ["deno", "bun", "llrt"]; + for (const runtime of runtimesToCheck) { + if (process.versions[runtime]) { + return [`md/${runtime}`, process.versions[runtime]]; + } + } + return ["md/nodejs", process.versions.node]; +}; + const crtAvailability = { isCrtAvailable: false, }; @@ -15084,13 +16366,14 @@ const isCrtAvailable = () => { }; const createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => { + const runtimeUserAgentPair = getRuntimeUserAgentPair(); return async (config) => { const sections = [ ["aws-sdk-js", clientVersion], ["ua", "2.1"], [`os/${os.platform()}`, os.release()], ["lang/js"], - ["md/nodejs", `${process.versions.node}`], + runtimeUserAgentPair, ]; const crtAvailable = isCrtAvailable(); if (crtAvailable) { @@ -15336,12 +16619,7 @@ class InvokeStoreSingle extends InvokeStoreBase { } run(context, fn) { this.currentContext = context; - try { - return fn(); - } - finally { - this.currentContext = undefined; - } + return fn(); } } class InvokeStoreMulti extends InvokeStoreBase { @@ -15407,7 +16685,7 @@ exports.InvokeStore = void 0; if (globalThis.awslambda?.InvokeStore) { delete globalThis.awslambda.InvokeStore; } - globalThis.awslambda = {}; + globalThis.awslambda = { InvokeStore: undefined }; }, } : undefined; @@ -16826,12 +18104,27 @@ class CborShapeSerializer extends protocols.SerdeContext { newObject[key] = value; } } + const isUnion = ns.isUnionSchema(); + if (isUnion && Array.isArray(sourceObject.$unknown)) { + const [k, v] = sourceObject.$unknown; + newObject[k] = v; + } + else if (typeof sourceObject.__type === "string") { + for (const [k, v] of Object.entries(sourceObject)) { + if (!(k in newObject)) { + newObject[k] = this.serialize(15, v); + } + } + } } else if (ns.isDocumentSchema()) { for (const key of Object.keys(sourceObject)) { newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]); } } + else if (ns.isBigDecimalSchema()) { + return sourceObject; + } return newObject; } return source; @@ -16849,8 +18142,15 @@ class CborShapeDeserializer extends protocols.SerdeContext { } readValue(_schema, value) { const ns = schema.NormalizedSchema.of(_schema); - if (ns.isTimestampSchema() && typeof value === "number") { - return serde._parseEpochTimestamp(value); + if (ns.isTimestampSchema()) { + if (typeof value === "number") { + return serde._parseEpochTimestamp(value); + } + if (typeof value === "object") { + if (value.tag === 1 && "value" in value) { + return serde._parseEpochTimestamp(value.value); + } + } } if (ns.isBlobSchema()) { if (typeof value === "string") { @@ -16866,7 +18166,7 @@ class CborShapeDeserializer extends protocols.SerdeContext { typeof value === "symbol") { return value; } - else if (typeof value === "function" || typeof value === "object") { + else if (typeof value === "object") { if (value === null) { return null; } @@ -16903,13 +18203,34 @@ class CborShapeDeserializer extends protocols.SerdeContext { } } else if (ns.isStructSchema()) { + const isUnion = ns.isUnionSchema(); + let keys; + if (isUnion) { + keys = new Set(Object.keys(value).filter((k) => k !== "__type")); + } for (const [key, memberSchema] of ns.structIterator()) { - const v = this.readValue(memberSchema, value[key]); - if (v != null) { - newObject[key] = v; + if (isUnion) { + keys.delete(key); + } + if (value[key] != null) { + newObject[key] = this.readValue(memberSchema, value[key]); + } + } + if (isUnion && keys?.size === 1 && Object.keys(newObject).length === 0) { + const k = keys.values().next().value; + newObject.$unknown = [k, value[k]]; + } + else if (typeof value.__type === "string") { + for (const [k, v] of Object.entries(value)) { + if (!(k in newObject)) { + newObject[k] = v; + } } } } + else if (value instanceof serde.NumericValue) { + return value; + } return newObject; } else { @@ -16922,8 +18243,8 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol { codec = new CborCodec(); serializer = this.codec.createSerializer(); deserializer = this.codec.createDeserializer(); - constructor({ defaultNamespace }) { - super({ defaultNamespace }); + constructor({ defaultNamespace, errorTypeRegistries, }) { + super({ defaultNamespace, errorTypeRegistries }); } getShapeId() { return "smithy.protocols#rpcv2Cbor"; @@ -16967,15 +18288,17 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - if (errorName.includes("#")) { - [namespace] = errorName.split("#"); - } const errorMetadata = { $metadata: metadata, $fault: response.statusCode <= 500 ? "client" : "server", }; - const registry = schema.TypeRegistry.for(namespace); + let namespace = this.options.defaultNamespace; + if (errorName.includes("#")) { + [namespace] = errorName.split("#"); + } + const registry = this.compositeErrorRegistry; + const nsRegistry = schema.TypeRegistry.for(namespace); + registry.copyFrom(nsRegistry); let errorSchema; try { errorSchema = registry.getSchema(errorName); @@ -16984,10 +18307,11 @@ class SmithyRpcV2CborProtocol extends protocols.RpcProtocol { if (dataObject.Message) { dataObject.message = dataObject.Message; } - const synthetic = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); - const baseExceptionSchema = synthetic.getBaseException(); + const syntheticRegistry = schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace); + registry.copyFrom(syntheticRegistry); + const baseExceptionSchema = registry.getBaseException(); if (baseExceptionSchema) { - const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema); + const ErrorCtor = registry.getErrorCtor(baseExceptionSchema); throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); } throw Object.assign(new Error(errorName), errorMetadata, dataObject); @@ -17066,9 +18390,14 @@ class SerdeContext { class HttpProtocol extends SerdeContext { options; + compositeErrorRegistry; constructor(options) { super(); this.options = options; + this.compositeErrorRegistry = schema.TypeRegistry.for(options.defaultNamespace); + for (const etr of options.errorTypeRegistries ?? []) { + this.compositeErrorRegistry.copyFrom(etr); + } } getRequestType() { return protocolHttp.HttpRequest; @@ -17113,6 +18442,9 @@ class HttpProtocol extends SerdeContext { } } setHostPrefix(request, operationSchema, input) { + if (this.serdeContext?.disableHostPrefix) { + return; + } const inputNs = schema.NormalizedSchema.of(operationSchema.input); const opTraits = schema.translateTraits(operationSchema.traits ?? {}); if (opTraits.endpoint) { @@ -17223,6 +18555,11 @@ class HttpBindingProtocol extends HttpProtocol { const memberTraits = memberNs.getMergedTraits() ?? {}; const inputMemberValue = input[memberName]; if (inputMemberValue == null && !memberNs.isIdempotencyToken()) { + if (memberTraits.httpLabel) { + if (request.path.includes(`{${memberName}+}`) || request.path.includes(`{${memberName}}`)) { + throw new Error(`No value provided for input HTTP label: ${memberName}.`); + } + } continue; } if (memberTraits.httpPayload) { @@ -17345,7 +18682,9 @@ class HttpBindingProtocol extends HttpProtocol { if (bytes.byteLength > 0) { const dataFromBody = await deserializer.read(ns, bytes); for (const member of nonHttpBindingMembers) { - dataObject[member] = dataFromBody[member]; + if (dataFromBody[member] != null) { + dataObject[member] = dataFromBody[member]; + } } } } @@ -18120,6 +19459,9 @@ function translateTraits(indicator) { return traits; } +const anno = { + it: Symbol.for("@smithy/nor-struct-it"), +}; class NormalizedSchema { ref; memberName; @@ -18200,7 +19542,7 @@ class NormalizedSchema { } getSchema() { const sc = this.schema; - if (sc[0] === 0) { + if (Array.isArray(sc) && sc[0] === 0) { return sc[4]; } return sc; @@ -18230,8 +19572,20 @@ class NormalizedSchema { } isStructSchema() { const sc = this.getSchema(); - return (sc[0] === 3 || - sc[0] === -3); + if (typeof sc !== "object") { + return false; + } + const id = sc[0]; + return (id === 3 || + id === -3 || + id === 4); + } + isUnionSchema() { + const sc = this.getSchema(); + if (typeof sc !== "object") { + return false; + } + return sc[0] === 4; } isBlobSchema() { const sc = this.getSchema(); @@ -18269,10 +19623,7 @@ class NormalizedSchema { return !!streaming || this.getSchema() === 42; } isIdempotencyToken() { - const match = (traits) => (traits & 0b0100) === 0b0100 || - !!traits?.idempotencyToken; - const { normalizedTraits, traits, memberTraits } = this; - return match(normalizedTraits) || match(traits) || match(memberTraits); + return !!this.getMergedTraits().idempotencyToken; } getMergedTraits() { return (this.normalizedTraits ?? @@ -18353,9 +19704,19 @@ class NormalizedSchema { throw new Error("@smithy/core/schema - cannot iterate non-struct schema."); } const struct = this.getSchema(); - for (let i = 0; i < struct[4].length; ++i) { - yield [struct[4][i], member([struct[5][i], 0], struct[4][i])]; + const z = struct[4].length; + let it = struct[anno.it]; + if (it && z === it.length) { + yield* it; + return; + } + it = Array(z); + for (let i = 0; i < z; ++i) { + const k = struct[4][i]; + const v = member([struct[5][i], 0], k); + yield (it[i] = [k, v]); } + struct[anno.it] = it; } } function member(memberSchema, memberName) { @@ -18424,10 +19785,24 @@ class TypeRegistry { } return TypeRegistry.registries.get(namespace); } + copyFrom(other) { + const { schemas, exceptions } = this; + for (const [k, v] of other.schemas) { + if (!schemas.has(k)) { + schemas.set(k, v); + } + } + for (const [k, v] of other.exceptions) { + if (!exceptions.has(k)) { + exceptions.set(k, v); + } + } + } register(shapeId, schema) { const qualifiedName = this.normalizeShapeId(shapeId); - const registry = TypeRegistry.for(qualifiedName.split("#")[0]); - registry.schemas.set(qualifiedName, schema); + for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) { + r.schemas.set(qualifiedName, schema); + } } getSchema(shapeId) { const id = this.normalizeShapeId(shapeId); @@ -18438,12 +19813,17 @@ class TypeRegistry { } registerError(es, ctor) { const $error = es; - const registry = TypeRegistry.for($error[1]); - registry.schemas.set($error[1] + "#" + $error[2], $error); - registry.exceptions.set($error, ctor); + const ns = $error[1]; + for (const r of [this, TypeRegistry.for(ns)]) { + r.schemas.set(ns + "#" + $error[2], $error); + r.exceptions.set($error, ctor); + } } getErrorCtor(es) { const $error = es; + if (this.exceptions.has($error)) { + return this.exceptions.get($error); + } const registry = TypeRegistry.for($error[1]); return registry.exceptions.get($error); } @@ -19422,5686 +20802,6805 @@ function readToBase64(blob) { reader.onerror = () => reject(reader.error); reader.readAsDataURL(blob); }); -} +} + +exports.FetchHttpHandler = FetchHttpHandler; +exports.keepAliveSupport = keepAliveSupport; +exports.streamCollector = streamCollector; + + +/***/ }), + +/***/ 2711: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var utilBufferFrom = __nccwpck_require__(4151); +var utilUtf8 = __nccwpck_require__(1577); +var buffer = __nccwpck_require__(181); +var crypto = __nccwpck_require__(6982); + +class Hash { + algorithmIdentifier; + secret; + hash; + constructor(algorithmIdentifier, secret) { + this.algorithmIdentifier = algorithmIdentifier; + this.secret = secret; + this.reset(); + } + update(toHash, encoding) { + this.hash.update(utilUtf8.toUint8Array(castSourceData(toHash, encoding))); + } + digest() { + return Promise.resolve(this.hash.digest()); + } + reset() { + this.hash = this.secret + ? crypto.createHmac(this.algorithmIdentifier, castSourceData(this.secret)) + : crypto.createHash(this.algorithmIdentifier); + } +} +function castSourceData(toCast, encoding) { + if (buffer.Buffer.isBuffer(toCast)) { + return toCast; + } + if (typeof toCast === "string") { + return utilBufferFrom.fromString(toCast, encoding); + } + if (ArrayBuffer.isView(toCast)) { + return utilBufferFrom.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); + } + return utilBufferFrom.fromArrayBuffer(toCast); +} + +exports.Hash = Hash; + + +/***/ }), + +/***/ 6130: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || + Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; + +exports.isArrayBuffer = isArrayBuffer; + + +/***/ }), + +/***/ 7212: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var protocolHttp = __nccwpck_require__(2356); + +const CONTENT_LENGTH_HEADER = "content-length"; +function contentLengthMiddleware(bodyLengthChecker) { + return (next) => async (args) => { + const request = args.request; + if (protocolHttp.HttpRequest.isInstance(request)) { + const { body, headers } = request; + if (body && + Object.keys(headers) + .map((str) => str.toLowerCase()) + .indexOf(CONTENT_LENGTH_HEADER) === -1) { + try { + const length = bodyLengthChecker(body); + request.headers = { + ...request.headers, + [CONTENT_LENGTH_HEADER]: String(length), + }; + } + catch (error) { + } + } + } + return next({ + ...args, + request, + }); + }; +} +const contentLengthMiddlewareOptions = { + step: "build", + tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], + name: "contentLengthMiddleware", + override: true, +}; +const getContentLengthPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + }, +}); + +exports.contentLengthMiddleware = contentLengthMiddleware; +exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions; +exports.getContentLengthPlugin = getContentLengthPlugin; + + +/***/ }), + +/***/ 6041: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointFromConfig = void 0; +const node_config_provider_1 = __nccwpck_require__(5704); +const getEndpointUrlConfig_1 = __nccwpck_require__(8008); +const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))(); +exports.getEndpointFromConfig = getEndpointFromConfig; + + +/***/ }), + +/***/ 8008: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getEndpointUrlConfig = void 0; +const shared_ini_file_loader_1 = __nccwpck_require__(4964); +const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; +const CONFIG_ENDPOINT_URL = "endpoint_url"; +const getEndpointUrlConfig = (serviceId) => ({ + environmentVariableSelector: (env) => { + const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); + const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; + if (serviceEndpointUrl) + return serviceEndpointUrl; + const endpointUrl = env[ENV_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + configFileSelector: (profile, config) => { + if (config && profile.services) { + const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (servicesSection) { + const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); + const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; + if (endpointUrl) + return endpointUrl; + } + } + const endpointUrl = profile[CONFIG_ENDPOINT_URL]; + if (endpointUrl) + return endpointUrl; + return undefined; + }, + default: undefined, +}); +exports.getEndpointUrlConfig = getEndpointUrlConfig; + + +/***/ }), + +/***/ 99: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var getEndpointFromConfig = __nccwpck_require__(6041); +var urlParser = __nccwpck_require__(4494); +var core = __nccwpck_require__(402); +var utilMiddleware = __nccwpck_require__(6324); +var middlewareSerde = __nccwpck_require__(3255); + +const resolveParamsForS3 = async (endpointParams) => { + const bucket = endpointParams?.Bucket || ""; + if (typeof endpointParams.Bucket === "string") { + endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); + } + if (isArnBucketName(bucket)) { + if (endpointParams.ForcePathStyle === true) { + throw new Error("Path-style addressing cannot be used with ARN buckets"); + } + } + else if (!isDnsCompatibleBucketName(bucket) || + (bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:")) || + bucket.toLowerCase() !== bucket || + bucket.length < 3) { + endpointParams.ForcePathStyle = true; + } + if (endpointParams.DisableMultiRegionAccessPoints) { + endpointParams.disableMultiRegionAccessPoints = true; + endpointParams.DisableMRAP = true; + } + return endpointParams; +}; +const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; +const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; +const DOTS_PATTERN = /\.\./; +const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); +const isArnBucketName = (bucketName) => { + const [arn, partition, service, , , bucket] = bucketName.split(":"); + const isArn = arn === "arn" && bucketName.split(":").length >= 6; + const isValidArn = Boolean(isArn && partition && service && bucket); + if (isArn && !isValidArn) { + throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); + } + return isValidArn; +}; + +const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => { + const configProvider = async () => { + let configValue; + if (isClientContextParam) { + const clientContextParams = config.clientContextParams; + const nestedValue = clientContextParams?.[configKey]; + configValue = nestedValue ?? config[configKey] ?? config[canonicalEndpointParamKey]; + } + else { + configValue = config[configKey] ?? config[canonicalEndpointParamKey]; + } + if (typeof configValue === "function") { + return configValue(); + } + return configValue; + }; + if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; + return configValue; + }; + } + if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { + return async () => { + const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; + const configValue = credentials?.accountId ?? credentials?.AccountId; + return configValue; + }; + } + if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { + return async () => { + if (config.isCustomEndpoint === false) { + return undefined; + } + const endpoint = await configProvider(); + if (endpoint && typeof endpoint === "object") { + if ("url" in endpoint) { + return endpoint.url.href; + } + if ("hostname" in endpoint) { + const { protocol, hostname, port, path } = endpoint; + return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + } + } + return endpoint; + }; + } + return configProvider; +}; + +const toEndpointV1 = (endpoint) => { + if (typeof endpoint === "object") { + if ("url" in endpoint) { + return urlParser.parseUrl(endpoint.url); + } + return endpoint; + } + return urlParser.parseUrl(endpoint); +}; + +const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { + if (!clientConfig.isCustomEndpoint) { + let endpointFromConfig; + if (clientConfig.serviceConfiguredEndpoint) { + endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); + } + else { + endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId); + } + if (endpointFromConfig) { + clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); + clientConfig.isCustomEndpoint = true; + } + } + const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); + if (typeof clientConfig.endpointProvider !== "function") { + throw new Error("config.endpointProvider is not set."); + } + const endpoint = clientConfig.endpointProvider(endpointParams, context); + return endpoint; +}; +const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => { + const endpointParams = {}; + const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; + for (const [name, instruction] of Object.entries(instructions)) { + switch (instruction.type) { + case "staticContextParams": + endpointParams[name] = instruction.value; + break; + case "contextParams": + endpointParams[name] = commandInput[instruction.name]; + break; + case "clientContextParams": + case "builtInParams": + endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")(); + break; + case "operationContextParams": + endpointParams[name] = instruction.get(commandInput); + break; + default: + throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); + } + } + if (Object.keys(instructions).length === 0) { + Object.assign(endpointParams, clientConfig); + } + if (String(clientConfig.serviceId).toLowerCase() === "s3") { + await resolveParamsForS3(endpointParams); + } + return endpointParams; +}; + +const endpointMiddleware = ({ config, instructions, }) => { + return (next, context) => async (args) => { + if (config.isCustomEndpoint) { + core.setFeature(context, "ENDPOINT_OVERRIDE", "N"); + } + const endpoint = await getEndpointFromInstructions(args.input, { + getEndpointParameterInstructions() { + return instructions; + }, + }, { ...config }, context); + context.endpointV2 = endpoint; + context.authSchemes = endpoint.properties?.authSchemes; + const authScheme = context.authSchemes?.[0]; + if (authScheme) { + context["signing_region"] = authScheme.signingRegion; + context["signing_service"] = authScheme.signingName; + const smithyContext = utilMiddleware.getSmithyContext(context); + const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; + if (httpAuthOption) { + httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { + signing_region: authScheme.signingRegion, + signingRegion: authScheme.signingRegion, + signing_service: authScheme.signingName, + signingName: authScheme.signingName, + signingRegionSet: authScheme.signingRegionSet, + }, authScheme.properties); + } + } + return next({ + ...args, + }); + }; +}; + +const endpointMiddlewareOptions = { + step: "serialize", + tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], + name: "endpointV2Middleware", + override: true, + relation: "before", + toMiddleware: middlewareSerde.serializerMiddlewareOption.name, +}; +const getEndpointPlugin = (config, instructions) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(endpointMiddleware({ + config, + instructions, + }), endpointMiddlewareOptions); + }, +}); + +const resolveEndpointConfig = (input) => { + const tls = input.tls ?? true; + const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; + const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined; + const isCustomEndpoint = !!endpoint; + const resolvedConfig = Object.assign(input, { + endpoint: customEndpointProvider, + tls, + isCustomEndpoint, + useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), + useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false), + }); + let configuredEndpointPromise = undefined; + resolvedConfig.serviceConfiguredEndpoint = async () => { + if (input.serviceId && !configuredEndpointPromise) { + configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId); + } + return configuredEndpointPromise; + }; + return resolvedConfig; +}; -exports.FetchHttpHandler = FetchHttpHandler; -exports.keepAliveSupport = keepAliveSupport; -exports.streamCollector = streamCollector; +const resolveEndpointRequiredConfig = (input) => { + const { endpoint } = input; + if (endpoint === undefined) { + input.endpoint = async () => { + throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint."); + }; + } + return input; +}; + +exports.endpointMiddleware = endpointMiddleware; +exports.endpointMiddlewareOptions = endpointMiddlewareOptions; +exports.getEndpointFromInstructions = getEndpointFromInstructions; +exports.getEndpointPlugin = getEndpointPlugin; +exports.resolveEndpointConfig = resolveEndpointConfig; +exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig; +exports.resolveParams = resolveParams; +exports.toEndpointV1 = toEndpointV1; /***/ }), -/***/ 2711: +/***/ 9618: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var utilBufferFrom = __nccwpck_require__(4151); -var utilUtf8 = __nccwpck_require__(1577); -var buffer = __nccwpck_require__(181); -var crypto = __nccwpck_require__(6982); +var utilRetry = __nccwpck_require__(5518); +var protocolHttp = __nccwpck_require__(2356); +var serviceErrorClassification = __nccwpck_require__(2058); +var uuid = __nccwpck_require__(266); +var utilMiddleware = __nccwpck_require__(6324); +var smithyClient = __nccwpck_require__(1411); +var isStreamingPayload = __nccwpck_require__(9831); -class Hash { - algorithmIdentifier; - secret; - hash; - constructor(algorithmIdentifier, secret) { - this.algorithmIdentifier = algorithmIdentifier; - this.secret = secret; - this.reset(); +const getDefaultRetryQuota = (initialRetryTokens, options) => { + const MAX_CAPACITY = initialRetryTokens; + const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT; + const retryCost = utilRetry.RETRY_COST; + const timeoutRetryCost = utilRetry.TIMEOUT_RETRY_COST; + let availableCapacity = initialRetryTokens; + const getCapacityAmount = (error) => (error.name === "TimeoutError" ? timeoutRetryCost : retryCost); + const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity; + const retrieveRetryTokens = (error) => { + if (!hasRetryTokens(error)) { + throw new Error("No retry token available"); + } + const capacityAmount = getCapacityAmount(error); + availableCapacity -= capacityAmount; + return capacityAmount; + }; + const releaseRetryTokens = (capacityReleaseAmount) => { + availableCapacity += capacityReleaseAmount ?? noRetryIncrement; + availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); + }; + return Object.freeze({ + hasRetryTokens, + retrieveRetryTokens, + releaseRetryTokens, + }); +}; + +const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + +const defaultRetryDecider = (error) => { + if (!error) { + return false; } - update(toHash, encoding) { - this.hash.update(utilUtf8.toUint8Array(castSourceData(toHash, encoding))); + return serviceErrorClassification.isRetryableByTrait(error) || serviceErrorClassification.isClockSkewError(error) || serviceErrorClassification.isThrottlingError(error) || serviceErrorClassification.isTransientError(error); +}; + +const asSdkError = (error) => { + if (error instanceof Error) + return error; + if (error instanceof Object) + return Object.assign(new Error(), error); + if (typeof error === "string") + return new Error(error); + return new Error(`AWS SDK error wrapper for ${error}`); +}; + +class StandardRetryStrategy { + maxAttemptsProvider; + retryDecider; + delayDecider; + retryQuota; + mode = utilRetry.RETRY_MODES.STANDARD; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + this.retryDecider = options?.retryDecider ?? defaultRetryDecider; + this.delayDecider = options?.delayDecider ?? defaultDelayDecider; + this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS); } - digest() { - return Promise.resolve(this.hash.digest()); + shouldRetry(error, attempts, maxAttempts) { + return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); } - reset() { - this.hash = this.secret - ? crypto.createHmac(this.algorithmIdentifier, castSourceData(this.secret)) - : crypto.createHash(this.algorithmIdentifier); + async getMaxAttempts() { + let maxAttempts; + try { + maxAttempts = await this.maxAttemptsProvider(); + } + catch (error) { + maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS; + } + return maxAttempts; } -} -function castSourceData(toCast, encoding) { - if (buffer.Buffer.isBuffer(toCast)) { - return toCast; + async retry(next, args, options) { + let retryTokenAmount; + let attempts = 0; + let totalDelay = 0; + const maxAttempts = await this.getMaxAttempts(); + const { request } = args; + if (protocolHttp.HttpRequest.isInstance(request)) { + request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + } + while (true) { + try { + if (protocolHttp.HttpRequest.isInstance(request)) { + request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + if (options?.beforeRequest) { + await options.beforeRequest(); + } + const { response, output } = await next(args); + if (options?.afterRequest) { + options.afterRequest(response); + } + this.retryQuota.releaseRetryTokens(retryTokenAmount); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalDelay; + return { response, output }; + } + catch (e) { + const err = asSdkError(e); + attempts++; + if (this.shouldRetry(err, attempts, maxAttempts)) { + retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); + const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.DEFAULT_RETRY_DELAY_BASE, attempts); + const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); + const delay = Math.max(delayFromResponse || 0, delayFromDecider); + totalDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); + continue; + } + if (!err.$metadata) { + err.$metadata = {}; + } + err.$metadata.attempts = attempts; + err.$metadata.totalRetryDelay = totalDelay; + throw err; + } + } } - if (typeof toCast === "string") { - return utilBufferFrom.fromString(toCast, encoding); +} +const getDelayFromRetryAfterHeader = (response) => { + if (!protocolHttp.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return retryAfterSeconds * 1000; + const retryAfterDate = new Date(retryAfter); + return retryAfterDate.getTime() - Date.now(); +}; + +class AdaptiveRetryStrategy extends StandardRetryStrategy { + rateLimiter; + constructor(maxAttemptsProvider, options) { + const { rateLimiter, ...superOptions } = options ?? {}; + super(maxAttemptsProvider, superOptions); + this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter(); + this.mode = utilRetry.RETRY_MODES.ADAPTIVE; } - if (ArrayBuffer.isView(toCast)) { - return utilBufferFrom.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength); + async retry(next, args) { + return super.retry(next, args, { + beforeRequest: async () => { + return this.rateLimiter.getSendToken(); + }, + afterRequest: (response) => { + this.rateLimiter.updateClientSendingRate(response); + }, + }); } - return utilBufferFrom.fromArrayBuffer(toCast); } -exports.Hash = Hash; - - -/***/ }), - -/***/ 6130: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const isArrayBuffer = (arg) => (typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer) || - Object.prototype.toString.call(arg) === "[object ArrayBuffer]"; - -exports.isArrayBuffer = isArrayBuffer; - - -/***/ }), - -/***/ 7212: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - +const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; +const CONFIG_MAX_ATTEMPTS = "max_attempts"; +const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + const value = env[ENV_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + configFileSelector: (profile) => { + const value = profile[CONFIG_MAX_ATTEMPTS]; + if (!value) + return undefined; + const maxAttempt = parseInt(value); + if (Number.isNaN(maxAttempt)) { + throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); + } + return maxAttempt; + }, + default: utilRetry.DEFAULT_MAX_ATTEMPTS, +}; +const resolveRetryConfig = (input) => { + const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input; + const maxAttempts = utilMiddleware.normalizeProvider(_maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS); + return Object.assign(input, { + maxAttempts, + retryStrategy: async () => { + if (retryStrategy) { + return retryStrategy; + } + const retryMode = await utilMiddleware.normalizeProvider(_retryMode)(); + if (retryMode === utilRetry.RETRY_MODES.ADAPTIVE) { + return new utilRetry.AdaptiveRetryStrategy(maxAttempts); + } + return new utilRetry.StandardRetryStrategy(maxAttempts); + }, + }); +}; +const ENV_RETRY_MODE = "AWS_RETRY_MODE"; +const CONFIG_RETRY_MODE = "retry_mode"; +const NODE_RETRY_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => env[ENV_RETRY_MODE], + configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + default: utilRetry.DEFAULT_RETRY_MODE, +}; -var protocolHttp = __nccwpck_require__(2356); +const omitRetryHeadersMiddleware = () => (next) => async (args) => { + const { request } = args; + if (protocolHttp.HttpRequest.isInstance(request)) { + delete request.headers[utilRetry.INVOCATION_ID_HEADER]; + delete request.headers[utilRetry.REQUEST_HEADER]; + } + return next(args); +}; +const omitRetryHeadersMiddlewareOptions = { + name: "omitRetryHeadersMiddleware", + tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], + relation: "before", + toMiddleware: "awsAuthMiddleware", + override: true, +}; +const getOmitRetryHeadersPlugin = (options) => ({ + applyToStack: (clientStack) => { + clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); + }, +}); -const CONTENT_LENGTH_HEADER = "content-length"; -function contentLengthMiddleware(bodyLengthChecker) { - return (next) => async (args) => { - const request = args.request; - if (protocolHttp.HttpRequest.isInstance(request)) { - const { body, headers } = request; - if (body && - Object.keys(headers) - .map((str) => str.toLowerCase()) - .indexOf(CONTENT_LENGTH_HEADER) === -1) { +const retryMiddleware = (options) => (next, context) => async (args) => { + let retryStrategy = await options.retryStrategy(); + const maxAttempts = await options.maxAttempts(); + if (isRetryStrategyV2(retryStrategy)) { + retryStrategy = retryStrategy; + let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); + let lastError = new Error(); + let attempts = 0; + let totalRetryDelay = 0; + const { request } = args; + const isRequest = protocolHttp.HttpRequest.isInstance(request); + if (isRequest) { + request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + } + while (true) { + try { + if (isRequest) { + request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + } + const { response, output } = await next(args); + retryStrategy.recordSuccess(retryToken); + output.$metadata.attempts = attempts + 1; + output.$metadata.totalRetryDelay = totalRetryDelay; + return { response, output }; + } + catch (e) { + const retryErrorInfo = getRetryErrorInfo(e); + lastError = asSdkError(e); + if (isRequest && isStreamingPayload.isStreamingPayload(request)) { + (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); + throw lastError; + } try { - const length = bodyLengthChecker(body); - request.headers = { - ...request.headers, - [CONTENT_LENGTH_HEADER]: String(length), - }; + retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); } - catch (error) { + catch (refreshError) { + if (!lastError.$metadata) { + lastError.$metadata = {}; + } + lastError.$metadata.attempts = attempts + 1; + lastError.$metadata.totalRetryDelay = totalRetryDelay; + throw lastError; } + attempts = retryToken.getRetryCount(); + const delay = retryToken.getRetryDelay(); + totalRetryDelay += delay; + await new Promise((resolve) => setTimeout(resolve, delay)); } } - return next({ - ...args, - request, - }); + } + else { + retryStrategy = retryStrategy; + if (retryStrategy?.mode) + context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]]; + return retryStrategy.retry(next, args); + } +}; +const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && + typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && + typeof retryStrategy.recordSuccess !== "undefined"; +const getRetryErrorInfo = (error) => { + const errorInfo = { + error, + errorType: getRetryErrorType(error), }; -} -const contentLengthMiddlewareOptions = { - step: "build", - tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"], - name: "contentLengthMiddleware", + const retryAfterHint = getRetryAfterHint(error.$response); + if (retryAfterHint) { + errorInfo.retryAfterHint = retryAfterHint; + } + return errorInfo; +}; +const getRetryErrorType = (error) => { + if (serviceErrorClassification.isThrottlingError(error)) + return "THROTTLING"; + if (serviceErrorClassification.isTransientError(error)) + return "TRANSIENT"; + if (serviceErrorClassification.isServerError(error)) + return "SERVER_ERROR"; + return "CLIENT_ERROR"; +}; +const retryMiddlewareOptions = { + name: "retryMiddleware", + tags: ["RETRY"], + step: "finalizeRequest", + priority: "high", override: true, }; -const getContentLengthPlugin = (options) => ({ +const getRetryPlugin = (options) => ({ applyToStack: (clientStack) => { - clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); + clientStack.add(retryMiddleware(options), retryMiddlewareOptions); }, }); +const getRetryAfterHint = (response) => { + if (!protocolHttp.HttpResponse.isInstance(response)) + return; + const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); + if (!retryAfterHeaderName) + return; + const retryAfter = response.headers[retryAfterHeaderName]; + const retryAfterSeconds = Number(retryAfter); + if (!Number.isNaN(retryAfterSeconds)) + return new Date(retryAfterSeconds * 1000); + const retryAfterDate = new Date(retryAfter); + return retryAfterDate; +}; -exports.contentLengthMiddleware = contentLengthMiddleware; -exports.contentLengthMiddlewareOptions = contentLengthMiddlewareOptions; -exports.getContentLengthPlugin = getContentLengthPlugin; +exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; +exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS; +exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE; +exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS; +exports.ENV_RETRY_MODE = ENV_RETRY_MODE; +exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS; +exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS; +exports.StandardRetryStrategy = StandardRetryStrategy; +exports.defaultDelayDecider = defaultDelayDecider; +exports.defaultRetryDecider = defaultRetryDecider; +exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; +exports.getRetryAfterHint = getRetryAfterHint; +exports.getRetryPlugin = getRetryPlugin; +exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; +exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions; +exports.resolveRetryConfig = resolveRetryConfig; +exports.retryMiddleware = retryMiddleware; +exports.retryMiddlewareOptions = retryMiddlewareOptions; /***/ }), -/***/ 6041: +/***/ 9831: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointFromConfig = void 0; -const node_config_provider_1 = __nccwpck_require__(5704); -const getEndpointUrlConfig_1 = __nccwpck_require__(8008); -const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId ?? ""))(); -exports.getEndpointFromConfig = getEndpointFromConfig; +exports.isStreamingPayload = void 0; +const stream_1 = __nccwpck_require__(2203); +const isStreamingPayload = (request) => request?.body instanceof stream_1.Readable || + (typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream); +exports.isStreamingPayload = isStreamingPayload; /***/ }), -/***/ 8008: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 3255: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var protocolHttp = __nccwpck_require__(2356); + +const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { + const { response } = await next(args); + try { + const parsed = await deserializer(response, options); + return { + response, + output: parsed, + }; + } + catch (error) { + Object.defineProperty(error, "$response", { + value: response, + enumerable: false, + writable: false, + configurable: false, + }); + if (!("$metadata" in error)) { + const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; + try { + error.message += "\n " + hint; + } + catch (e) { + if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { + console.warn(hint); + } + else { + context.logger?.warn?.(hint); + } + } + if (typeof error.$responseBodyText !== "undefined") { + if (error.$response) { + error.$response.body = error.$responseBodyText; + } + } + try { + if (protocolHttp.HttpResponse.isInstance(response)) { + const { headers = {} } = response; + const headerEntries = Object.entries(headers); + error.$metadata = { + httpStatusCode: response.statusCode, + requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), + extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), + cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries), + }; + } + } + catch (e) { + } + } + throw error; + } +}; +const findHeader = (pattern, headers) => { + return (headers.find(([k]) => { + return k.match(pattern); + }) || [void 0, void 0])[1]; +}; + +const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { + const endpointConfig = options; + const endpoint = context.endpointV2?.url && endpointConfig.urlParser + ? async () => endpointConfig.urlParser(context.endpointV2.url) + : endpointConfig.endpoint; + if (!endpoint) { + throw new Error("No valid endpoint provider available."); + } + const request = await serializer(args.input, { ...options, endpoint }); + return next({ + ...args, + request, + }); +}; -"use strict"; +const deserializerMiddlewareOption = { + name: "deserializerMiddleware", + step: "deserialize", + tags: ["DESERIALIZER"], + override: true, +}; +const serializerMiddlewareOption = { + name: "serializerMiddleware", + step: "serialize", + tags: ["SERIALIZER"], + override: true, +}; +function getSerdePlugin(config, serializer, deserializer) { + return { + applyToStack: (commandStack) => { + commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); + commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); + }, + }; +} -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getEndpointUrlConfig = void 0; -const shared_ini_file_loader_1 = __nccwpck_require__(4964); -const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL"; -const CONFIG_ENDPOINT_URL = "endpoint_url"; -const getEndpointUrlConfig = (serviceId) => ({ - environmentVariableSelector: (env) => { - const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase()); - const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")]; - if (serviceEndpointUrl) - return serviceEndpointUrl; - const endpointUrl = env[ENV_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - configFileSelector: (profile, config) => { - if (config && profile.services) { - const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (servicesSection) { - const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase()); - const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)]; - if (endpointUrl) - return endpointUrl; - } - } - const endpointUrl = profile[CONFIG_ENDPOINT_URL]; - if (endpointUrl) - return endpointUrl; - return undefined; - }, - default: undefined, -}); -exports.getEndpointUrlConfig = getEndpointUrlConfig; +exports.deserializerMiddleware = deserializerMiddleware; +exports.deserializerMiddlewareOption = deserializerMiddlewareOption; +exports.getSerdePlugin = getSerdePlugin; +exports.serializerMiddleware = serializerMiddleware; +exports.serializerMiddlewareOption = serializerMiddlewareOption; /***/ }), -/***/ 99: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 9208: +/***/ ((__unused_webpack_module, exports) => { "use strict"; -var getEndpointFromConfig = __nccwpck_require__(6041); -var urlParser = __nccwpck_require__(4494); -var core = __nccwpck_require__(402); -var utilMiddleware = __nccwpck_require__(6324); -var middlewareSerde = __nccwpck_require__(3255); - -const resolveParamsForS3 = async (endpointParams) => { - const bucket = endpointParams?.Bucket || ""; - if (typeof endpointParams.Bucket === "string") { - endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?")); +const getAllAliases = (name, aliases) => { + const _aliases = []; + if (name) { + _aliases.push(name); } - if (isArnBucketName(bucket)) { - if (endpointParams.ForcePathStyle === true) { - throw new Error("Path-style addressing cannot be used with ARN buckets"); + if (aliases) { + for (const alias of aliases) { + _aliases.push(alias); } } - else if (!isDnsCompatibleBucketName(bucket) || - (bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:")) || - bucket.toLowerCase() !== bucket || - bucket.length < 3) { - endpointParams.ForcePathStyle = true; - } - if (endpointParams.DisableMultiRegionAccessPoints) { - endpointParams.disableMultiRegionAccessPoints = true; - endpointParams.DisableMRAP = true; - } - return endpointParams; + return _aliases; }; -const DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/; -const IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/; -const DOTS_PATTERN = /\.\./; -const isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName); -const isArnBucketName = (bucketName) => { - const [arn, partition, service, , , bucket] = bucketName.split(":"); - const isArn = arn === "arn" && bucketName.split(":").length >= 6; - const isValidArn = Boolean(isArn && partition && service && bucket); - if (isArn && !isValidArn) { - throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`); - } - return isValidArn; +const getMiddlewareNameWithAliases = (name, aliases) => { + return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; }; - -const createConfigValueProvider = (configKey, canonicalEndpointParamKey, config) => { - const configProvider = async () => { - const configValue = config[configKey] ?? config[canonicalEndpointParamKey]; - if (typeof configValue === "function") { - return configValue(); - } - return configValue; - }; - if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = credentials?.credentialScope ?? credentials?.CredentialScope; - return configValue; +const constructStack = () => { + let absoluteEntries = []; + let relativeEntries = []; + let identifyOnResolve = false; + const entriesNameSet = new Set(); + const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || + priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]); + const removeByName = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const aliases = getAllAliases(entry.name, entry.aliases); + if (aliases.includes(toRemove)) { + isRemoved = true; + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + return false; + } + return true; }; - } - if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") { - return async () => { - const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials; - const configValue = credentials?.accountId ?? credentials?.AccountId; - return configValue; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const removeByReference = (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + if (entry.middleware === toRemove) { + isRemoved = true; + for (const alias of getAllAliases(entry.name, entry.aliases)) { + entriesNameSet.delete(alias); + } + return false; + } + return true; }; - } - if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") { - return async () => { - if (config.isCustomEndpoint === false) { - return undefined; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }; + const cloneTo = (toStack) => { + absoluteEntries.forEach((entry) => { + toStack.add(entry.middleware, { ...entry }); + }); + relativeEntries.forEach((entry) => { + toStack.addRelativeTo(entry.middleware, { ...entry }); + }); + toStack.identifyOnResolve?.(stack.identifyOnResolve()); + return toStack; + }; + const expandRelativeMiddlewareList = (from) => { + const expandedMiddlewareList = []; + from.before.forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); } - const endpoint = await configProvider(); - if (endpoint && typeof endpoint === "object") { - if ("url" in endpoint) { - return endpoint.url.href; + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + expandedMiddlewareList.push(from); + from.after.reverse().forEach((entry) => { + if (entry.before.length === 0 && entry.after.length === 0) { + expandedMiddlewareList.push(entry); + } + else { + expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); + } + }); + return expandedMiddlewareList; + }; + const getMiddlewareList = (debug = false) => { + const normalizedAbsoluteEntries = []; + const normalizedRelativeEntries = []; + const normalizedEntriesNameMap = {}; + absoluteEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedAbsoluteEntries.push(normalizedEntry); + }); + relativeEntries.forEach((entry) => { + const normalizedEntry = { + ...entry, + before: [], + after: [], + }; + for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { + normalizedEntriesNameMap[alias] = normalizedEntry; + } + normalizedRelativeEntries.push(normalizedEntry); + }); + normalizedRelativeEntries.forEach((entry) => { + if (entry.toMiddleware) { + const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; + if (toMiddleware === undefined) { + if (debug) { + return; + } + throw new Error(`${entry.toMiddleware} is not found when adding ` + + `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + + `middleware ${entry.relation} ${entry.toMiddleware}`); } - if ("hostname" in endpoint) { - const { protocol, hostname, port, path } = endpoint; - return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`; + if (entry.relation === "after") { + toMiddleware.after.push(entry); + } + if (entry.relation === "before") { + toMiddleware.before.push(entry); } } - return endpoint; - }; - } - return configProvider; + }); + const mainChain = sort(normalizedAbsoluteEntries) + .map(expandRelativeMiddlewareList) + .reduce((wholeList, expandedMiddlewareList) => { + wholeList.push(...expandedMiddlewareList); + return wholeList; + }, []); + return mainChain; + }; + const stack = { + add: (middleware, options = {}) => { + const { name, override, aliases: _aliases } = options; + const entry = { + step: "initialize", + priority: "normal", + middleware, + ...options, + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = absoluteEntries[toOverrideIndex]; + if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + + `${toOverride.priority} priority in ${toOverride.step} step cannot ` + + `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + + `${entry.priority} priority in ${entry.step} step.`); + } + absoluteEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + absoluteEntries.push(entry); + }, + addRelativeTo: (middleware, options) => { + const { name, override, aliases: _aliases } = options; + const entry = { + middleware, + ...options, + }; + const aliases = getAllAliases(name, _aliases); + if (aliases.length > 0) { + if (aliases.some((alias) => entriesNameSet.has(alias))) { + if (!override) + throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); + for (const alias of aliases) { + const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); + if (toOverrideIndex === -1) { + continue; + } + const toOverride = relativeEntries[toOverrideIndex]; + if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { + throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + + `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + + `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + + `"${entry.toMiddleware}" middleware.`); + } + relativeEntries.splice(toOverrideIndex, 1); + } + } + for (const alias of aliases) { + entriesNameSet.add(alias); + } + } + relativeEntries.push(entry); + }, + clone: () => cloneTo(constructStack()), + use: (plugin) => { + plugin.applyToStack(stack); + }, + remove: (toRemove) => { + if (typeof toRemove === "string") + return removeByName(toRemove); + else + return removeByReference(toRemove); + }, + removeByTag: (toRemove) => { + let isRemoved = false; + const filterCb = (entry) => { + const { tags, name, aliases: _aliases } = entry; + if (tags && tags.includes(toRemove)) { + const aliases = getAllAliases(name, _aliases); + for (const alias of aliases) { + entriesNameSet.delete(alias); + } + isRemoved = true; + return false; + } + return true; + }; + absoluteEntries = absoluteEntries.filter(filterCb); + relativeEntries = relativeEntries.filter(filterCb); + return isRemoved; + }, + concat: (from) => { + const cloned = cloneTo(constructStack()); + cloned.use(from); + cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); + return cloned; + }, + applyToStack: cloneTo, + identify: () => { + return getMiddlewareList(true).map((mw) => { + const step = mw.step ?? + mw.relation + + " " + + mw.toMiddleware; + return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; + }); + }, + identifyOnResolve(toggle) { + if (typeof toggle === "boolean") + identifyOnResolve = toggle; + return identifyOnResolve; + }, + resolve: (handler, context) => { + for (const middleware of getMiddlewareList() + .map((entry) => entry.middleware) + .reverse()) { + handler = middleware(handler, context); + } + if (identifyOnResolve) { + console.log(stack.identify()); + } + return handler; + }, + }; + return stack; }; - -const toEndpointV1 = (endpoint) => { - if (typeof endpoint === "object") { - if ("url" in endpoint) { - return urlParser.parseUrl(endpoint.url); - } - return endpoint; - } - return urlParser.parseUrl(endpoint); +const stepWeights = { + initialize: 5, + serialize: 4, + build: 3, + finalizeRequest: 2, + deserialize: 1, }; - -const getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => { - if (!clientConfig.isCustomEndpoint) { - let endpointFromConfig; - if (clientConfig.serviceConfiguredEndpoint) { - endpointFromConfig = await clientConfig.serviceConfiguredEndpoint(); - } - else { - endpointFromConfig = await getEndpointFromConfig.getEndpointFromConfig(clientConfig.serviceId); - } - if (endpointFromConfig) { - clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig)); - clientConfig.isCustomEndpoint = true; - } - } - const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig); - if (typeof clientConfig.endpointProvider !== "function") { - throw new Error("config.endpointProvider is not set."); - } - const endpoint = clientConfig.endpointProvider(endpointParams, context); - return endpoint; +const priorityWeights = { + high: 3, + normal: 2, + low: 1, }; -const resolveParams = async (commandInput, instructionsSupplier, clientConfig) => { - const endpointParams = {}; - const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {}; - for (const [name, instruction] of Object.entries(instructions)) { - switch (instruction.type) { - case "staticContextParams": - endpointParams[name] = instruction.value; - break; - case "contextParams": - endpointParams[name] = commandInput[instruction.name]; - break; - case "clientContextParams": - case "builtInParams": - endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig)(); - break; - case "operationContextParams": - endpointParams[name] = instruction.get(commandInput); - break; - default: - throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction)); - } - } - if (Object.keys(instructions).length === 0) { - Object.assign(endpointParams, clientConfig); + +exports.constructStack = constructStack; + + +/***/ }), + +/***/ 5704: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var propertyProvider = __nccwpck_require__(8857); +var sharedIniFileLoader = __nccwpck_require__(4964); + +function getSelectorName(functionString) { + try { + const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); + constants.delete("CONFIG"); + constants.delete("CONFIG_PREFIX_SEPARATOR"); + constants.delete("ENV"); + return [...constants].join(", "); } - if (String(clientConfig.serviceId).toLowerCase() === "s3") { - await resolveParamsForS3(endpointParams); + catch (e) { + return functionString; } - return endpointParams; -}; +} -const endpointMiddleware = ({ config, instructions, }) => { - return (next, context) => async (args) => { - if (config.isCustomEndpoint) { - core.setFeature(context, "ENDPOINT_OVERRIDE", "N"); - } - const endpoint = await getEndpointFromInstructions(args.input, { - getEndpointParameterInstructions() { - return instructions; - }, - }, { ...config }, context); - context.endpointV2 = endpoint; - context.authSchemes = endpoint.properties?.authSchemes; - const authScheme = context.authSchemes?.[0]; - if (authScheme) { - context["signing_region"] = authScheme.signingRegion; - context["signing_service"] = authScheme.signingName; - const smithyContext = utilMiddleware.getSmithyContext(context); - const httpAuthOption = smithyContext?.selectedHttpAuthScheme?.httpAuthOption; - if (httpAuthOption) { - httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, { - signing_region: authScheme.signingRegion, - signingRegion: authScheme.signingRegion, - signing_service: authScheme.signingName, - signingName: authScheme.signingName, - signingRegionSet: authScheme.signingRegionSet, - }, authScheme.properties); - } +const fromEnv = (envVarSelector, options) => async () => { + try { + const config = envVarSelector(process.env, options); + if (config === undefined) { + throw new Error(); } - return next({ - ...args, - }); - }; -}; - -const endpointMiddlewareOptions = { - step: "serialize", - tags: ["ENDPOINT_PARAMETERS", "ENDPOINT_V2", "ENDPOINT"], - name: "endpointV2Middleware", - override: true, - relation: "before", - toMiddleware: middlewareSerde.serializerMiddlewareOption.name, + return config; + } + catch (e) { + throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); + } }; -const getEndpointPlugin = (config, instructions) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(endpointMiddleware({ - config, - instructions, - }), endpointMiddlewareOptions); - }, -}); -const resolveEndpointConfig = (input) => { - const tls = input.tls ?? true; - const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input; - const customEndpointProvider = endpoint != null ? async () => toEndpointV1(await utilMiddleware.normalizeProvider(endpoint)()) : undefined; - const isCustomEndpoint = !!endpoint; - const resolvedConfig = Object.assign(input, { - endpoint: customEndpointProvider, - tls, - isCustomEndpoint, - useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false), - useFipsEndpoint: utilMiddleware.normalizeProvider(useFipsEndpoint ?? false), - }); - let configuredEndpointPromise = undefined; - resolvedConfig.serviceConfiguredEndpoint = async () => { - if (input.serviceId && !configuredEndpointPromise) { - configuredEndpointPromise = getEndpointFromConfig.getEndpointFromConfig(input.serviceId); +const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { + const profile = sharedIniFileLoader.getProfileName(init); + const { configFile, credentialsFile } = await sharedIniFileLoader.loadSharedConfigFiles(init); + const profileFromCredentials = credentialsFile[profile] || {}; + const profileFromConfig = configFile[profile] || {}; + const mergedProfile = preferredFile === "config" + ? { ...profileFromCredentials, ...profileFromConfig } + : { ...profileFromConfig, ...profileFromCredentials }; + try { + const cfgFile = preferredFile === "config" ? configFile : credentialsFile; + const configValue = configSelector(mergedProfile, cfgFile); + if (configValue === undefined) { + throw new Error(); } - return configuredEndpointPromise; - }; - return resolvedConfig; + return configValue; + } + catch (e) { + throw new propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); + } }; -const resolveEndpointRequiredConfig = (input) => { - const { endpoint } = input; - if (endpoint === undefined) { - input.endpoint = async () => { - throw new Error("@smithy/middleware-endpoint: (default endpointRuleSet) endpoint is not set - you must configure an endpoint."); - }; - } - return input; +const isFunction = (func) => typeof func === "function"; +const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); + +const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { + const { signingName, logger } = configuration; + const envOptions = { signingName, logger }; + return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); }; -exports.endpointMiddleware = endpointMiddleware; -exports.endpointMiddlewareOptions = endpointMiddlewareOptions; -exports.getEndpointFromInstructions = getEndpointFromInstructions; -exports.getEndpointPlugin = getEndpointPlugin; -exports.resolveEndpointConfig = resolveEndpointConfig; -exports.resolveEndpointRequiredConfig = resolveEndpointRequiredConfig; -exports.resolveParams = resolveParams; -exports.toEndpointV1 = toEndpointV1; +exports.loadConfig = loadConfig; /***/ }), -/***/ 9618: +/***/ 1279: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var utilRetry = __nccwpck_require__(5518); var protocolHttp = __nccwpck_require__(2356); -var serviceErrorClassification = __nccwpck_require__(2058); -var uuid = __nccwpck_require__(266); -var utilMiddleware = __nccwpck_require__(6324); -var smithyClient = __nccwpck_require__(1411); -var isStreamingPayload = __nccwpck_require__(9831); +var querystringBuilder = __nccwpck_require__(8256); +var http = __nccwpck_require__(8611); +var https = __nccwpck_require__(5692); +var stream = __nccwpck_require__(2203); +var http2 = __nccwpck_require__(5675); -const getDefaultRetryQuota = (initialRetryTokens, options) => { - const MAX_CAPACITY = initialRetryTokens; - const noRetryIncrement = utilRetry.NO_RETRY_INCREMENT; - const retryCost = utilRetry.RETRY_COST; - const timeoutRetryCost = utilRetry.TIMEOUT_RETRY_COST; - let availableCapacity = initialRetryTokens; - const getCapacityAmount = (error) => (error.name === "TimeoutError" ? timeoutRetryCost : retryCost); - const hasRetryTokens = (error) => getCapacityAmount(error) <= availableCapacity; - const retrieveRetryTokens = (error) => { - if (!hasRetryTokens(error)) { - throw new Error("No retry token available"); +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; + +const timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId), +}; + +const DEFER_EVENT_LISTENER_TIME$2 = 1000; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError", + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } + else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); + } + else { + request.on("socket", doWithSocket); } - const capacityAmount = getCapacityAmount(error); - availableCapacity -= capacityAmount; - return capacityAmount; - }; - const releaseRetryTokens = (capacityReleaseAmount) => { - availableCapacity += capacityReleaseAmount ?? noRetryIncrement; - availableCapacity = Math.min(availableCapacity, MAX_CAPACITY); }; - return Object.freeze({ - hasRetryTokens, - retrieveRetryTokens, - releaseRetryTokens, - }); + if (timeoutInMs < 2000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); }; -const defaultDelayDecider = (delayBase, attempts) => Math.floor(Math.min(utilRetry.MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); +const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { + if (timeoutInMs) { + return timing.setTimeout(() => { + let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; + if (throwOnRequestTimeout) { + const error = Object.assign(new Error(msg), { + name: "TimeoutError", + code: "ETIMEDOUT", + }); + req.destroy(error); + reject(error); + } + else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger?.warn?.(msg); + } + }, timeoutInMs); + } + return -1; +}; -const defaultRetryDecider = (error) => { - if (!error) { - return false; +const DEFER_EVENT_LISTENER_TIME$1 = 3000; +const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; } - return serviceErrorClassification.isRetryableByTrait(error) || serviceErrorClassification.isClockSkewError(error) || serviceErrorClassification.isThrottlingError(error) || serviceErrorClassification.isTransientError(error); + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } + else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + }); + } + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; + } + return timing.setTimeout(registerListener, deferTimeMs); }; -const asSdkError = (error) => { - if (error instanceof Error) - return error; - if (error instanceof Object) - return Object.assign(new Error(), error); - if (typeof error === "string") - return new Error(error); - return new Error(`AWS SDK error wrapper for ${error}`); +const DEFER_EVENT_LISTENER_TIME = 3000; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); + } + else { + request.setTimeout(timeout, onTimeout); + } + }; + if (0 < timeoutInMs && timeoutInMs < 6000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); }; -class StandardRetryStrategy { - maxAttemptsProvider; - retryDecider; - delayDecider; - retryQuota; - mode = utilRetry.RETRY_MODES.STANDARD; - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - this.retryDecider = options?.retryDecider ?? defaultRetryDecider; - this.delayDecider = options?.delayDecider ?? defaultDelayDecider; - this.retryQuota = options?.retryQuota ?? getDefaultRetryQuota(utilRetry.INITIAL_RETRY_TOKENS); +const MIN_WAIT_TIME = 6_000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }), + ]); } - shouldRetry(error, attempts, maxAttempts) { - return attempts < maxAttempts && this.retryDecider(error) && this.retryQuota.hasRetryTokens(error); + if (sendBody) { + writeBody(httpRequest, request.body); } - async getMaxAttempts() { - let maxAttempts; - try { - maxAttempts = await this.maxAttemptsProvider(); +} +function writeBody(httpRequest, body) { + if (body instanceof stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + if (Buffer.isBuffer(body) || typeof body === "string") { + httpRequest.end(body); + return; } - catch (error) { - maxAttempts = utilRetry.DEFAULT_MAX_ATTEMPTS; + const uint8 = body; + if (typeof uint8 === "object" && + uint8.buffer && + typeof uint8.byteOffset === "number" && + typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; } - return maxAttempts; + httpRequest.end(Buffer.from(body)); + return; } - async retry(next, args, options) { - let retryTokenAmount; - let attempts = 0; - let totalDelay = 0; - const maxAttempts = await this.getMaxAttempts(); - const { request } = args; - if (protocolHttp.HttpRequest.isInstance(request)) { - request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); + httpRequest.end(); +} + +const DEFAULT_REQUEST_TIMEOUT = 0; +class NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; } - while (true) { - try { - if (protocolHttp.HttpRequest.isInstance(request)) { - request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; + return new NodeHttpHandler(instanceOrOptions); + } + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15_000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); } - if (options?.beforeRequest) { - await options.beforeRequest(); + } + } + return socketWarningTimestamp; + } + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); + } + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgent: (() => { + if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger: console, + }; + } + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + } + return new Promise((_resolve, _reject) => { + const config = this.config; + let writeRequestBodyPromise = undefined; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? https.Agent : http.Agent)({ + keepAlive: false, + maxSockets: Infinity, + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } + else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? https.request : http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); } - const { response, output } = await next(args); - if (options?.afterRequest) { - options.afterRequest(response); + else { + reject(err); } - this.retryQuota.releaseRetryTokens(retryTokenAmount); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalDelay; - return { response, output }; - } - catch (e) { - const err = asSdkError(e); - attempts++; - if (this.shouldRetry(err, attempts, maxAttempts)) { - retryTokenAmount = this.retryQuota.retrieveRetryTokens(err); - const delayFromDecider = this.delayDecider(serviceErrorClassification.isThrottlingError(err) ? utilRetry.THROTTLING_RETRY_DELAY_BASE : utilRetry.DEFAULT_RETRY_DELAY_BASE, attempts); - const delayFromResponse = getDelayFromRetryAfterHeader(err.$response); - const delay = Math.max(delayFromResponse || 0, delayFromDecider); - totalDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); - continue; + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); } - if (!err.$metadata) { - err.$metadata = {}; + else { + abortSignal.onabort = onAbort; } - err.$metadata.attempts = attempts; - err.$metadata.totalRetryDelay = totalDelay; - throw err; } - } - } -} -const getDelayFromRetryAfterHeader = (response) => { - if (!protocolHttp.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return retryAfterSeconds * 1000; - const retryAfterDate = new Date(retryAfter); - return retryAfterDate.getTime() - Date.now(); -}; - -class AdaptiveRetryStrategy extends StandardRetryStrategy { - rateLimiter; - constructor(maxAttemptsProvider, options) { - const { rateLimiter, ...superOptions } = options ?? {}; - super(maxAttemptsProvider, superOptions); - this.rateLimiter = rateLimiter ?? new utilRetry.DefaultRateLimiter(); - this.mode = utilRetry.RETRY_MODES.ADAPTIVE; + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); } - async retry(next, args) { - return super.retry(next, args, { - beforeRequest: async () => { - return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { - this.rateLimiter.updateClientSendingRate(response); - }, + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; }); } + httpHandlerConfigs() { + return this.config ?? {}; + } } -const ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; -const CONFIG_MAX_ATTEMPTS = "max_attempts"; -const NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - const value = env[ENV_MAX_ATTEMPTS]; - if (!value) - return undefined; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`); - } - return maxAttempt; - }, - configFileSelector: (profile) => { - const value = profile[CONFIG_MAX_ATTEMPTS]; - if (!value) - return undefined; - const maxAttempt = parseInt(value); - if (Number.isNaN(maxAttempt)) { - throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`); +class NodeHttp2ConnectionPool { + sessions = []; + constructor(sessions) { + this.sessions = sessions ?? []; + } + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); } - return maxAttempt; - }, - default: utilRetry.DEFAULT_MAX_ATTEMPTS, -}; -const resolveRetryConfig = (input) => { - const { retryStrategy, retryMode: _retryMode, maxAttempts: _maxAttempts } = input; - const maxAttempts = utilMiddleware.normalizeProvider(_maxAttempts ?? utilRetry.DEFAULT_MAX_ATTEMPTS); - return Object.assign(input, { - maxAttempts, - retryStrategy: async () => { - if (retryStrategy) { - return retryStrategy; - } - const retryMode = await utilMiddleware.normalizeProvider(_retryMode)(); - if (retryMode === utilRetry.RETRY_MODES.ADAPTIVE) { - return new utilRetry.AdaptiveRetryStrategy(maxAttempts); + } + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } } - return new utilRetry.StandardRetryStrategy(maxAttempts); - }, - }); -}; -const ENV_RETRY_MODE = "AWS_RETRY_MODE"; -const CONFIG_RETRY_MODE = "retry_mode"; -const NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], - default: utilRetry.DEFAULT_RETRY_MODE, -}; - -const omitRetryHeadersMiddleware = () => (next) => async (args) => { - const { request } = args; - if (protocolHttp.HttpRequest.isInstance(request)) { - delete request.headers[utilRetry.INVOCATION_ID_HEADER]; - delete request.headers[utilRetry.REQUEST_HEADER]; + } } - return next(args); -}; -const omitRetryHeadersMiddlewareOptions = { - name: "omitRetryHeadersMiddleware", - tags: ["RETRY", "HEADERS", "OMIT_RETRY_HEADERS"], - relation: "before", - toMiddleware: "awsAuthMiddleware", - override: true, -}; -const getOmitRetryHeadersPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); - }, -}); +} -const retryMiddleware = (options) => (next, context) => async (args) => { - let retryStrategy = await options.retryStrategy(); - const maxAttempts = await options.maxAttempts(); - if (isRetryStrategyV2(retryStrategy)) { - retryStrategy = retryStrategy; - let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]); - let lastError = new Error(); - let attempts = 0; - let totalRetryDelay = 0; - const { request } = args; - const isRequest = protocolHttp.HttpRequest.isInstance(request); - if (isRequest) { - request.headers[utilRetry.INVOCATION_ID_HEADER] = uuid.v4(); +class NodeHttp2ConnectionManager { + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); } - while (true) { - try { - if (isRequest) { - request.headers[utilRetry.REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`; - } - const { response, output } = await next(args); - retryStrategy.recordSuccess(retryToken); - output.$metadata.attempts = attempts + 1; - output.$metadata.totalRetryDelay = totalRetryDelay; - return { response, output }; + } + config; + sessionCache = new Map(); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; } - catch (e) { - const retryErrorInfo = getRetryErrorInfo(e); - lastError = asSdkError(e); - if (isRequest && isStreamingPayload.isStreamingPayload(request)) { - (context.logger instanceof smithyClient.NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request."); - throw lastError; - } - try { - retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo); + } + const session = http2.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); } - catch (refreshError) { - if (!lastError.$metadata) { - lastError.$metadata = {}; - } - lastError.$metadata.attempts = attempts + 1; - lastError.$metadata.totalRetryDelay = totalRetryDelay; - throw lastError; + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; + } + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; + } + if (!existingConnectionPool.contains(session)) { + return; + } + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); + } + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); } - attempts = retryToken.getRetryCount(); - const delay = retryToken.getRetryDelay(); - totalRetryDelay += delay; - await new Promise((resolve) => setTimeout(resolve, delay)); + connectionPool.remove(session); } + this.sessionCache.delete(key); } } - else { - retryStrategy = retryStrategy; - if (retryStrategy?.mode) - context.userAgent = [...(context.userAgent || []), ["cfg/retry-mode", retryStrategy.mode]]; - return retryStrategy.retry(next, args); + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); + } + this.config.maxConcurrency = maxConcurrentStreams; } -}; -const isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && - typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && - typeof retryStrategy.recordSuccess !== "undefined"; -const getRetryErrorInfo = (error) => { - const errorInfo = { - error, - errorType: getRetryErrorType(error), - }; - const retryAfterHint = getRetryAfterHint(error.$response); - if (retryAfterHint) { - errorInfo.retryAfterHint = retryAfterHint; + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; } - return errorInfo; -}; -const getRetryErrorType = (error) => { - if (serviceErrorClassification.isThrottlingError(error)) - return "THROTTLING"; - if (serviceErrorClassification.isTransientError(error)) - return "TRANSIENT"; - if (serviceErrorClassification.isServerError(error)) - return "SERVER_ERROR"; - return "CLIENT_ERROR"; -}; -const retryMiddlewareOptions = { - name: "retryMiddleware", - tags: ["RETRY"], - step: "finalizeRequest", - priority: "high", - override: true, -}; -const getRetryPlugin = (options) => ({ - applyToStack: (clientStack) => { - clientStack.add(retryMiddleware(options), retryMiddlewareOptions); - }, -}); -const getRetryAfterHint = (response) => { - if (!protocolHttp.HttpResponse.isInstance(response)) - return; - const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; - const retryAfter = response.headers[retryAfterHeaderName]; - const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return new Date(retryAfterSeconds * 1000); - const retryAfterDate = new Date(retryAfter); - return retryAfterDate; -}; - -exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; -exports.CONFIG_MAX_ATTEMPTS = CONFIG_MAX_ATTEMPTS; -exports.CONFIG_RETRY_MODE = CONFIG_RETRY_MODE; -exports.ENV_MAX_ATTEMPTS = ENV_MAX_ATTEMPTS; -exports.ENV_RETRY_MODE = ENV_RETRY_MODE; -exports.NODE_MAX_ATTEMPT_CONFIG_OPTIONS = NODE_MAX_ATTEMPT_CONFIG_OPTIONS; -exports.NODE_RETRY_MODE_CONFIG_OPTIONS = NODE_RETRY_MODE_CONFIG_OPTIONS; -exports.StandardRetryStrategy = StandardRetryStrategy; -exports.defaultDelayDecider = defaultDelayDecider; -exports.defaultRetryDecider = defaultRetryDecider; -exports.getOmitRetryHeadersPlugin = getOmitRetryHeadersPlugin; -exports.getRetryAfterHint = getRetryAfterHint; -exports.getRetryPlugin = getRetryPlugin; -exports.omitRetryHeadersMiddleware = omitRetryHeadersMiddleware; -exports.omitRetryHeadersMiddlewareOptions = omitRetryHeadersMiddlewareOptions; -exports.resolveRetryConfig = resolveRetryConfig; -exports.retryMiddleware = retryMiddleware; -exports.retryMiddlewareOptions = retryMiddlewareOptions; - - -/***/ }), - -/***/ 9831: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isStreamingPayload = void 0; -const stream_1 = __nccwpck_require__(2203); -const isStreamingPayload = (request) => request?.body instanceof stream_1.Readable || - (typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream); -exports.isStreamingPayload = isStreamingPayload; - - -/***/ }), - -/***/ 3255: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var protocolHttp = __nccwpck_require__(2356); + getUrlString(request) { + return request.destination.toString(); + } +} -const deserializerMiddleware = (options, deserializer) => (next, context) => async (args) => { - const { response } = await next(args); - try { - const parsed = await deserializer(response, options); - return { - response, - output: parsed, - }; +class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); } - catch (error) { - Object.defineProperty(error, "$response", { - value: response, - enumerable: false, - writable: false, - configurable: false, + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); + } + else { + resolve(options || {}); + } }); - if (!("$metadata" in error)) { - const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`; - try { - error.message += "\n " + hint; + } + destroy() { + this.connectionManager.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); + } + } + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; + } + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); + } + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; } - catch (e) { - if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") { - console.warn(hint); + if (request.fragment) { + path += `#${request.fragment}`; + } + const req = session.request({ + ...request.headers, + [http2.constants.HTTP2_HEADER_PATH]: path, + [http2.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); + } + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); } else { - context.logger?.warn?.(hint); + abortSignal.onabort = onAbort; } } - if (typeof error.$responseBodyText !== "undefined") { - if (error.$response) { - error.$response.body = error.$responseBodyText; + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); } - } - try { - if (protocolHttp.HttpResponse.isInstance(response)) { - const { headers = {} } = response; - const headerEntries = Object.entries(headers); - error.$metadata = { - httpStatusCode: response.statusCode, - requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries), - extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries), - cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries), - }; + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); } - } - catch (e) { - } + }); + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); + } + httpHandlerConfigs() { + return this.config ?? {}; + } + destroySession(session) { + if (!session.destroyed) { + session.destroy(); } - throw error; } -}; -const findHeader = (pattern, headers) => { - return (headers.find(([k]) => { - return k.match(pattern); - }) || [void 0, void 0])[1]; -}; +} -const serializerMiddleware = (options, serializer) => (next, context) => async (args) => { - const endpointConfig = options; - const endpoint = context.endpointV2?.url && endpointConfig.urlParser - ? async () => endpointConfig.urlParser(context.endpointV2.url) - : endpointConfig.endpoint; - if (!endpoint) { - throw new Error("No valid endpoint provider available."); +class Collector extends stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); } - const request = await serializer(args.input, { ...options, endpoint }); - return next({ - ...args, - request, - }); -}; +} -const deserializerMiddlewareOption = { - name: "deserializerMiddleware", - step: "deserialize", - tags: ["DESERIALIZER"], - override: true, -}; -const serializerMiddlewareOption = { - name: "serializerMiddleware", - step: "serialize", - tags: ["SERIALIZER"], - override: true, +const streamCollector = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); + } + return new Promise((resolve, reject) => { + const collector = new Collector(); + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); + resolve(bytes); + }); + }); }; -function getSerdePlugin(config, serializer, deserializer) { - return { - applyToStack: (commandStack) => { - commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); - commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); - }, - }; +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; + } + isDone = done; + } + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; + } + return collected; } -exports.deserializerMiddleware = deserializerMiddleware; -exports.deserializerMiddlewareOption = deserializerMiddlewareOption; -exports.getSerdePlugin = getSerdePlugin; -exports.serializerMiddleware = serializerMiddleware; -exports.serializerMiddlewareOption = serializerMiddlewareOption; +exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; +exports.NodeHttp2Handler = NodeHttp2Handler; +exports.NodeHttpHandler = NodeHttpHandler; +exports.streamCollector = streamCollector; /***/ }), -/***/ 9208: +/***/ 8857: /***/ ((__unused_webpack_module, exports) => { "use strict"; -const getAllAliases = (name, aliases) => { - const _aliases = []; - if (name) { - _aliases.push(name); +class ProviderError extends Error { + name = "ProviderError"; + tryNextLink; + constructor(message, options = true) { + let logger; + let tryNextLink = true; + if (typeof options === "boolean") { + logger = undefined; + tryNextLink = options; + } + else if (options != null && typeof options === "object") { + logger = options.logger; + tryNextLink = options.tryNextLink ?? true; + } + super(message); + this.tryNextLink = tryNextLink; + Object.setPrototypeOf(this, ProviderError.prototype); + logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); } - if (aliases) { - for (const alias of aliases) { - _aliases.push(alias); + static from(error, options = true) { + return Object.assign(new this(error.message, options), error); + } +} + +class CredentialsProviderError extends ProviderError { + name = "CredentialsProviderError"; + constructor(message, options = true) { + super(message, options); + Object.setPrototypeOf(this, CredentialsProviderError.prototype); + } +} + +class TokenProviderError extends ProviderError { + name = "TokenProviderError"; + constructor(message, options = true) { + super(message, options); + Object.setPrototypeOf(this, TokenProviderError.prototype); + } +} + +const chain = (...providers) => async () => { + if (providers.length === 0) { + throw new ProviderError("No providers in chain"); + } + let lastProviderError; + for (const provider of providers) { + try { + const credentials = await provider(); + return credentials; + } + catch (err) { + lastProviderError = err; + if (err?.tryNextLink) { + continue; + } + throw err; } } - return _aliases; -}; -const getMiddlewareNameWithAliases = (name, aliases) => { - return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`; + throw lastProviderError; }; -const constructStack = () => { - let absoluteEntries = []; - let relativeEntries = []; - let identifyOnResolve = false; - const entriesNameSet = new Set(); - const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || - priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]); - const removeByName = (toRemove) => { - let isRemoved = false; - const filterCb = (entry) => { - const aliases = getAllAliases(entry.name, entry.aliases); - if (aliases.includes(toRemove)) { - isRemoved = true; - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - return false; - } - return true; - }; - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }; - const removeByReference = (toRemove) => { - let isRemoved = false; - const filterCb = (entry) => { - if (entry.middleware === toRemove) { - isRemoved = true; - for (const alias of getAllAliases(entry.name, entry.aliases)) { - entriesNameSet.delete(alias); - } - return false; - } - return true; - }; - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }; - const cloneTo = (toStack) => { - absoluteEntries.forEach((entry) => { - toStack.add(entry.middleware, { ...entry }); - }); - relativeEntries.forEach((entry) => { - toStack.addRelativeTo(entry.middleware, { ...entry }); - }); - toStack.identifyOnResolve?.(stack.identifyOnResolve()); - return toStack; - }; - const expandRelativeMiddlewareList = (from) => { - const expandedMiddlewareList = []; - from.before.forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); - } - else { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); - } - }); - expandedMiddlewareList.push(from); - from.after.reverse().forEach((entry) => { - if (entry.before.length === 0 && entry.after.length === 0) { - expandedMiddlewareList.push(entry); - } - else { - expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry)); - } - }); - return expandedMiddlewareList; - }; - const getMiddlewareList = (debug = false) => { - const normalizedAbsoluteEntries = []; - const normalizedRelativeEntries = []; - const normalizedEntriesNameMap = {}; - absoluteEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [], - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedAbsoluteEntries.push(normalizedEntry); - }); - relativeEntries.forEach((entry) => { - const normalizedEntry = { - ...entry, - before: [], - after: [], - }; - for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) { - normalizedEntriesNameMap[alias] = normalizedEntry; - } - normalizedRelativeEntries.push(normalizedEntry); - }); - normalizedRelativeEntries.forEach((entry) => { - if (entry.toMiddleware) { - const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware]; - if (toMiddleware === undefined) { - if (debug) { - return; - } - throw new Error(`${entry.toMiddleware} is not found when adding ` + - `${getMiddlewareNameWithAliases(entry.name, entry.aliases)} ` + - `middleware ${entry.relation} ${entry.toMiddleware}`); - } - if (entry.relation === "after") { - toMiddleware.after.push(entry); - } - if (entry.relation === "before") { - toMiddleware.before.push(entry); - } - } - }); - const mainChain = sort(normalizedAbsoluteEntries) - .map(expandRelativeMiddlewareList) - .reduce((wholeList, expandedMiddlewareList) => { - wholeList.push(...expandedMiddlewareList); - return wholeList; - }, []); - return mainChain; + +const fromStatic = (staticValue) => () => Promise.resolve(staticValue); + +const memoize = (provider, isExpired, requiresRefresh) => { + let resolved; + let pending; + let hasResult; + let isConstant = false; + const coalesceProvider = async () => { + if (!pending) { + pending = provider(); + } + try { + resolved = await pending; + hasResult = true; + isConstant = false; + } + finally { + pending = undefined; + } + return resolved; }; - const stack = { - add: (middleware, options = {}) => { - const { name, override, aliases: _aliases } = options; - const entry = { - step: "initialize", - priority: "normal", - middleware, - ...options, - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = absoluteEntries[toOverrideIndex]; - if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) { - throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ` + - `${toOverride.priority} priority in ${toOverride.step} step cannot ` + - `be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ` + - `${entry.priority} priority in ${entry.step} step.`); - } - absoluteEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - absoluteEntries.push(entry); - }, - addRelativeTo: (middleware, options) => { - const { name, override, aliases: _aliases } = options; - const entry = { - middleware, - ...options, - }; - const aliases = getAllAliases(name, _aliases); - if (aliases.length > 0) { - if (aliases.some((alias) => entriesNameSet.has(alias))) { - if (!override) - throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); - for (const alias of aliases) { - const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias)); - if (toOverrideIndex === -1) { - continue; - } - const toOverride = relativeEntries[toOverrideIndex]; - if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) { - throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ` + - `${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden ` + - `by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} ` + - `"${entry.toMiddleware}" middleware.`); - } - relativeEntries.splice(toOverrideIndex, 1); - } - } - for (const alias of aliases) { - entriesNameSet.add(alias); - } - } - relativeEntries.push(entry); - }, - clone: () => cloneTo(constructStack()), - use: (plugin) => { - plugin.applyToStack(stack); - }, - remove: (toRemove) => { - if (typeof toRemove === "string") - return removeByName(toRemove); - else - return removeByReference(toRemove); - }, - removeByTag: (toRemove) => { - let isRemoved = false; - const filterCb = (entry) => { - const { tags, name, aliases: _aliases } = entry; - if (tags && tags.includes(toRemove)) { - const aliases = getAllAliases(name, _aliases); - for (const alias of aliases) { - entriesNameSet.delete(alias); - } - isRemoved = true; - return false; - } - return true; - }; - absoluteEntries = absoluteEntries.filter(filterCb); - relativeEntries = relativeEntries.filter(filterCb); - return isRemoved; - }, - concat: (from) => { - const cloned = cloneTo(constructStack()); - cloned.use(from); - cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false)); - return cloned; + if (isExpired === undefined) { + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + return resolved; + }; + } + return async (options) => { + if (!hasResult || options?.forceRefresh) { + resolved = await coalesceProvider(); + } + if (isConstant) { + return resolved; + } + if (requiresRefresh && !requiresRefresh(resolved)) { + isConstant = true; + return resolved; + } + if (isExpired(resolved)) { + await coalesceProvider(); + return resolved; + } + return resolved; + }; +}; + +exports.CredentialsProviderError = CredentialsProviderError; +exports.ProviderError = ProviderError; +exports.TokenProviderError = TokenProviderError; +exports.chain = chain; +exports.fromStatic = fromStatic; +exports.memoize = memoize; + + +/***/ }), + +/***/ 2356: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var types = __nccwpck_require__(690); + +const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { + return { + setHttpHandler(handler) { + runtimeConfig.httpHandler = handler; }, - applyToStack: cloneTo, - identify: () => { - return getMiddlewareList(true).map((mw) => { - const step = mw.step ?? - mw.relation + - " " + - mw.toMiddleware; - return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; - }); + httpHandler() { + return runtimeConfig.httpHandler; }, - identifyOnResolve(toggle) { - if (typeof toggle === "boolean") - identifyOnResolve = toggle; - return identifyOnResolve; + updateHttpClientConfig(key, value) { + runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); }, - resolve: (handler, context) => { - for (const middleware of getMiddlewareList() - .map((entry) => entry.middleware) - .reverse()) { - handler = middleware(handler, context); - } - if (identifyOnResolve) { - console.log(stack.identify()); - } - return handler; + httpHandlerConfigs() { + return runtimeConfig.httpHandler.httpHandlerConfigs(); }, }; - return stack; -}; -const stepWeights = { - initialize: 5, - serialize: 4, - build: 3, - finalizeRequest: 2, - deserialize: 1, }; -const priorityWeights = { - high: 3, - normal: 2, - low: 1, +const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { + return { + httpHandler: httpHandlerExtensionConfiguration.httpHandler(), + }; }; -exports.constructStack = constructStack; +class Field { + name; + kind; + values; + constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) { + this.name = name; + this.kind = kind; + this.values = values; + } + add(value) { + this.values.push(value); + } + set(values) { + this.values = values; + } + remove(value) { + this.values = this.values.filter((v) => v !== value); + } + toString() { + return this.values.map((v) => (v.includes(",") || v.includes(" ") ? `"${v}"` : v)).join(", "); + } + get() { + return this.values; + } +} + +class Fields { + entries = {}; + encoding; + constructor({ fields = [], encoding = "utf-8" }) { + fields.forEach(this.setField.bind(this)); + this.encoding = encoding; + } + setField(field) { + this.entries[field.name.toLowerCase()] = field; + } + getField(name) { + return this.entries[name.toLowerCase()]; + } + removeField(name) { + delete this.entries[name.toLowerCase()]; + } + getByType(kind) { + return Object.values(this.entries).filter((field) => field.kind === kind); + } +} + +class HttpRequest { + method; + protocol; + hostname; + port; + path; + query; + headers; + username; + password; + fragment; + body; + constructor(options) { + this.method = options.method || "GET"; + this.hostname = options.hostname || "localhost"; + this.port = options.port; + this.query = options.query || {}; + this.headers = options.headers || {}; + this.body = options.body; + this.protocol = options.protocol + ? options.protocol.slice(-1) !== ":" + ? `${options.protocol}:` + : options.protocol + : "https:"; + this.path = options.path ? (options.path.charAt(0) !== "/" ? `/${options.path}` : options.path) : "/"; + this.username = options.username; + this.password = options.password; + this.fragment = options.fragment; + } + static clone(request) { + const cloned = new HttpRequest({ + ...request, + headers: { ...request.headers }, + }); + if (cloned.query) { + cloned.query = cloneQuery(cloned.query); + } + return cloned; + } + static isInstance(request) { + if (!request) { + return false; + } + const req = request; + return ("method" in req && + "protocol" in req && + "hostname" in req && + "path" in req && + typeof req["query"] === "object" && + typeof req["headers"] === "object"); + } + clone() { + return HttpRequest.clone(this); + } +} +function cloneQuery(query) { + return Object.keys(query).reduce((carry, paramName) => { + const param = query[paramName]; + return { + ...carry, + [paramName]: Array.isArray(param) ? [...param] : param, + }; + }, {}); +} + +class HttpResponse { + statusCode; + reason; + headers; + body; + constructor(options) { + this.statusCode = options.statusCode; + this.reason = options.reason; + this.headers = options.headers || {}; + this.body = options.body; + } + static isInstance(response) { + if (!response) + return false; + const resp = response; + return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + } +} + +function isValidHostname(hostname) { + const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; + return hostPattern.test(hostname); +} + +exports.Field = Field; +exports.Fields = Fields; +exports.HttpRequest = HttpRequest; +exports.HttpResponse = HttpResponse; +exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; +exports.isValidHostname = isValidHostname; +exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; /***/ }), -/***/ 5704: +/***/ 8256: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var propertyProvider = __nccwpck_require__(8857); -var sharedIniFileLoader = __nccwpck_require__(4964); +var utilUriEscape = __nccwpck_require__(146); -function getSelectorName(functionString) { - try { - const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? [])); - constants.delete("CONFIG"); - constants.delete("CONFIG_PREFIX_SEPARATOR"); - constants.delete("ENV"); - return [...constants].join(", "); - } - catch (e) { - return functionString; +function buildQueryString(query) { + const parts = []; + for (let key of Object.keys(query).sort()) { + const value = query[key]; + key = utilUriEscape.escapeUri(key); + if (Array.isArray(value)) { + for (let i = 0, iLen = value.length; i < iLen; i++) { + parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); + } + } + else { + let qsEntry = key; + if (value || typeof value === "string") { + qsEntry += `=${utilUriEscape.escapeUri(value)}`; + } + parts.push(qsEntry); + } } + return parts.join("&"); } -const fromEnv = (envVarSelector, options) => async () => { - try { - const config = envVarSelector(process.env, options); - if (config === undefined) { - throw new Error(); +exports.buildQueryString = buildQueryString; + + +/***/ }), + +/***/ 8822: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +function parseQueryString(querystring) { + const query = {}; + querystring = querystring.replace(/^\?/, ""); + if (querystring) { + for (const pair of querystring.split("&")) { + let [key, value = null] = pair.split("="); + key = decodeURIComponent(key); + if (value) { + value = decodeURIComponent(value); + } + if (!(key in query)) { + query[key] = value; + } + else if (Array.isArray(query[key])) { + query[key].push(value); + } + else { + query[key] = [query[key], value]; + } } - return config; } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger }); + return query; +} + +exports.parseQueryString = parseQueryString; + + +/***/ }), + +/***/ 2058: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const CLOCK_SKEW_ERROR_CODES = [ + "AuthFailure", + "InvalidSignatureException", + "RequestExpired", + "RequestInTheFuture", + "RequestTimeTooSkewed", + "SignatureDoesNotMatch", +]; +const THROTTLING_ERROR_CODES = [ + "BandwidthLimitExceeded", + "EC2ThrottledException", + "LimitExceededException", + "PriorRequestNotComplete", + "ProvisionedThroughputExceededException", + "RequestLimitExceeded", + "RequestThrottled", + "RequestThrottledException", + "SlowDown", + "ThrottledException", + "Throttling", + "ThrottlingException", + "TooManyRequestsException", + "TransactionInProgressException", +]; +const TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; +const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; +const NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; + +const isRetryableByTrait = (error) => error?.$retryable !== undefined; +const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name); +const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected; +const isBrowserNetworkError = (error) => { + const errorMessages = new Set([ + "Failed to fetch", + "NetworkError when attempting to fetch resource", + "The Internet connection appears to be offline", + "Load failed", + "Network request failed", + ]); + const isValid = error && error instanceof TypeError; + if (!isValid) { + return false; } + return errorMessages.has(error.message); }; - -const fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => { - const profile = sharedIniFileLoader.getProfileName(init); - const { configFile, credentialsFile } = await sharedIniFileLoader.loadSharedConfigFiles(init); - const profileFromCredentials = credentialsFile[profile] || {}; - const profileFromConfig = configFile[profile] || {}; - const mergedProfile = preferredFile === "config" - ? { ...profileFromCredentials, ...profileFromConfig } - : { ...profileFromConfig, ...profileFromCredentials }; - try { - const cfgFile = preferredFile === "config" ? configFile : credentialsFile; - const configValue = configSelector(mergedProfile, cfgFile); - if (configValue === undefined) { - throw new Error(); +const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || + THROTTLING_ERROR_CODES.includes(error.name) || + error.$retryable?.throttling == true; +const isTransientError = (error, depth = 0) => isRetryableByTrait(error) || + isClockSkewCorrectedError(error) || + TRANSIENT_ERROR_CODES.includes(error.name) || + NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || + NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || + TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || + isBrowserNetworkError(error) || + (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1)); +const isServerError = (error) => { + if (error.$metadata?.httpStatusCode !== undefined) { + const statusCode = error.$metadata.httpStatusCode; + if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { + return true; } - return configValue; + return false; } - catch (e) { - throw new propertyProvider.CredentialsProviderError(e.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger }); + return false; +}; + +exports.isBrowserNetworkError = isBrowserNetworkError; +exports.isClockSkewCorrectedError = isClockSkewCorrectedError; +exports.isClockSkewError = isClockSkewError; +exports.isRetryableByTrait = isRetryableByTrait; +exports.isServerError = isServerError; +exports.isThrottlingError = isThrottlingError; +exports.isTransientError = isTransientError; + + +/***/ }), + +/***/ 4172: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getHomeDir = void 0; +const os_1 = __nccwpck_require__(857); +const path_1 = __nccwpck_require__(6928); +const homeDirCache = {}; +const getHomeDirCacheKey = () => { + if (process && process.geteuid) { + return `${process.geteuid()}`; } + return "DEFAULT"; +}; +const getHomeDir = () => { + const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; + if (HOME) + return HOME; + if (USERPROFILE) + return USERPROFILE; + if (HOMEPATH) + return `${HOMEDRIVE}${HOMEPATH}`; + const homeDirCacheKey = getHomeDirCacheKey(); + if (!homeDirCache[homeDirCacheKey]) + homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); + return homeDirCache[homeDirCacheKey]; }; +exports.getHomeDir = getHomeDir; -const isFunction = (func) => typeof func === "function"; -const fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue); -const loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => { - const { signingName, logger } = configuration; - const envOptions = { signingName, logger }; - return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue))); +/***/ }), + +/***/ 269: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSSOTokenFilepath = void 0; +const crypto_1 = __nccwpck_require__(6982); +const path_1 = __nccwpck_require__(6928); +const getHomeDir_1 = __nccwpck_require__(4172); +const getSSOTokenFilepath = (id) => { + const hasher = (0, crypto_1.createHash)("sha1"); + const cacheName = hasher.update(id).digest("hex"); + return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); }; +exports.getSSOTokenFilepath = getSSOTokenFilepath; -exports.loadConfig = loadConfig; + +/***/ }), + +/***/ 1326: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; +const promises_1 = __nccwpck_require__(1943); +const getSSOTokenFilepath_1 = __nccwpck_require__(269); +exports.tokenIntercept = {}; +const getSSOTokenFromFile = async (id) => { + if (exports.tokenIntercept[id]) { + return exports.tokenIntercept[id]; + } + const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); + const ssoTokenText = await (0, promises_1.readFile)(ssoTokenFilepath, "utf8"); + return JSON.parse(ssoTokenText); +}; +exports.getSSOTokenFromFile = getSSOTokenFromFile; /***/ }), -/***/ 1279: +/***/ 4964: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var protocolHttp = __nccwpck_require__(2356); -var querystringBuilder = __nccwpck_require__(8256); -var http = __nccwpck_require__(8611); -var https = __nccwpck_require__(5692); -var stream = __nccwpck_require__(2203); -var http2 = __nccwpck_require__(5675); +var getHomeDir = __nccwpck_require__(4172); +var getSSOTokenFilepath = __nccwpck_require__(269); +var getSSOTokenFromFile = __nccwpck_require__(1326); +var path = __nccwpck_require__(6928); +var types = __nccwpck_require__(690); +var readFile = __nccwpck_require__(6684); -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; +const ENV_PROFILE = "AWS_PROFILE"; +const DEFAULT_PROFILE = "default"; +const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; -const getTransformedHeaders = (headers) => { - const transformedHeaders = {}; - for (const name of Object.keys(headers)) { - const headerValues = headers[name]; - transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; +const CONFIG_PREFIX_SEPARATOR = "."; + +const getConfigData = (data) => Object.entries(data) + .filter(([key]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + if (indexOfSeparator === -1) { + return false; } - return transformedHeaders; -}; + return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); +}) + .reduce((acc, [key, value]) => { + const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); + const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; + acc[updatedKey] = value; + return acc; +}, { + ...(data.default && { default: data.default }), +}); -const timing = { - setTimeout: (cb, ms) => setTimeout(cb, ms), - clearTimeout: (timeoutId) => clearTimeout(timeoutId), -}; +const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; +const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); -const DEFER_EVENT_LISTENER_TIME$2 = 1000; -const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { - if (!timeoutInMs) { - return -1; - } - const registerTimeout = (offset) => { - const timeoutId = timing.setTimeout(() => { - request.destroy(); - reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { - name: "TimeoutError", - })); - }, timeoutInMs - offset); - const doWithSocket = (socket) => { - if (socket?.connecting) { - socket.on("connect", () => { - timing.clearTimeout(timeoutId); - }); +const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; +const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); + +const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; +const profileNameBlockList = ["__proto__", "profile __proto__"]; +const parseIni = (iniData) => { + const map = {}; + let currentSection; + let currentSubSection; + for (const iniLine of iniData.split(/\r?\n/)) { + const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); + const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; + if (isSection) { + currentSection = undefined; + currentSubSection = undefined; + const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); + const matches = prefixKeyRegex.exec(sectionName); + if (matches) { + const [, prefix, , name] = matches; + if (Object.values(types.IniSectionType).includes(prefix)) { + currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); + } } else { - timing.clearTimeout(timeoutId); + currentSection = sectionName; + } + if (profileNameBlockList.includes(sectionName)) { + throw new Error(`Found invalid profile name "${sectionName}"`); } - }; - if (request.socket) { - doWithSocket(request.socket); } - else { - request.on("socket", doWithSocket); + else if (currentSection) { + const indexOfEqualsSign = trimmedLine.indexOf("="); + if (![0, -1].includes(indexOfEqualsSign)) { + const [name, value] = [ + trimmedLine.substring(0, indexOfEqualsSign).trim(), + trimmedLine.substring(indexOfEqualsSign + 1).trim(), + ]; + if (value === "") { + currentSubSection = name; + } + else { + if (currentSubSection && iniLine.trimStart() === iniLine) { + currentSubSection = undefined; + } + map[currentSection] = map[currentSection] || {}; + const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; + map[currentSection][key] = value; + } + } } - }; - if (timeoutInMs < 2000) { - registerTimeout(0); - return 0; } - return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); + return map; }; -const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { - if (timeoutInMs) { - return timing.setTimeout(() => { - let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; - if (throwOnRequestTimeout) { - const error = Object.assign(new Error(msg), { - name: "TimeoutError", - code: "ETIMEDOUT", - }); - req.destroy(error); - reject(error); - } - else { - msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; - logger?.warn?.(msg); - } - }, timeoutInMs); +const swallowError$1 = () => ({}); +const loadSharedConfigFiles = async (init = {}) => { + const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; + const homeDir = getHomeDir.getHomeDir(); + const relativeHomeDirPrefix = "~/"; + let resolvedFilepath = filepath; + if (filepath.startsWith(relativeHomeDirPrefix)) { + resolvedFilepath = path.join(homeDir, filepath.slice(2)); } - return -1; -}; - -const DEFER_EVENT_LISTENER_TIME$1 = 3000; -const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { - if (keepAlive !== true) { - return -1; + let resolvedConfigFilepath = configFilepath; + if (configFilepath.startsWith(relativeHomeDirPrefix)) { + resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); } - const registerListener = () => { - if (request.socket) { - request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - } - else { - request.on("socket", (socket) => { - socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); - }); - } + const parsedFiles = await Promise.all([ + readFile.readFile(resolvedConfigFilepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni) + .then(getConfigData) + .catch(swallowError$1), + readFile.readFile(resolvedFilepath, { + ignoreCache: init.ignoreCache, + }) + .then(parseIni) + .catch(swallowError$1), + ]); + return { + configFile: parsedFiles[0], + credentialsFile: parsedFiles[1], }; - if (deferTimeMs === 0) { - registerListener(); - return 0; - } - return timing.setTimeout(registerListener, deferTimeMs); }; -const DEFER_EVENT_LISTENER_TIME = 3000; -const setSocketTimeout = (request, reject, timeoutInMs = 0) => { - const registerTimeout = (offset) => { - const timeout = timeoutInMs - offset; - const onTimeout = () => { - request.destroy(); - reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); - }; - if (request.socket) { - request.socket.setTimeout(timeout, onTimeout); - request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); - } - else { - request.setTimeout(timeout, onTimeout); - } - }; - if (0 < timeoutInMs && timeoutInMs < 6000) { - registerTimeout(0); - return 0; - } - return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); -}; +const getSsoSessionData = (data) => Object.entries(data) + .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) + .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); -const MIN_WAIT_TIME = 6_000; -async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { - const headers = request.headers ?? {}; - const expect = headers.Expect || headers.expect; - let timeoutId = -1; - let sendBody = true; - if (!externalAgent && expect === "100-continue") { - sendBody = await Promise.race([ - new Promise((resolve) => { - timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); - }), - new Promise((resolve) => { - httpRequest.on("continue", () => { - timing.clearTimeout(timeoutId); - resolve(true); - }); - httpRequest.on("response", () => { - timing.clearTimeout(timeoutId); - resolve(false); - }); - httpRequest.on("error", () => { - timing.clearTimeout(timeoutId); - resolve(false); - }); - }), - ]); - } - if (sendBody) { - writeBody(httpRequest, request.body); - } -} -function writeBody(httpRequest, body) { - if (body instanceof stream.Readable) { - body.pipe(httpRequest); - return; - } - if (body) { - if (Buffer.isBuffer(body) || typeof body === "string") { - httpRequest.end(body); - return; - } - const uint8 = body; - if (typeof uint8 === "object" && - uint8.buffer && - typeof uint8.byteOffset === "number" && - typeof uint8.byteLength === "number") { - httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); - return; - } - httpRequest.end(Buffer.from(body)); - return; - } - httpRequest.end(); -} +const swallowError = () => ({}); +const loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath()) + .then(parseIni) + .then(getSsoSessionData) + .catch(swallowError); -const DEFAULT_REQUEST_TIMEOUT = 0; -class NodeHttpHandler { - config; - configProvider; - socketWarningTimestamp = 0; - externalAgent = false; - metadata = { handlerProtocol: "http/1.1" }; - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; - } - return new NodeHttpHandler(instanceOrOptions); - } - static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { - const { sockets, requests, maxSockets } = agent; - if (typeof maxSockets !== "number" || maxSockets === Infinity) { - return socketWarningTimestamp; - } - const interval = 15_000; - if (Date.now() - interval < socketWarningTimestamp) { - return socketWarningTimestamp; - } - if (sockets && requests) { - for (const origin in sockets) { - const socketsInUse = sockets[origin]?.length ?? 0; - const requestsEnqueued = requests[origin]?.length ?? 0; - if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { - logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. -See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html -or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); - return Date.now(); - } - } - } - return socketWarningTimestamp; - } - constructor(options) { - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options() - .then((_options) => { - resolve(this.resolveDefaultConfig(_options)); - }) - .catch(reject); +const mergeConfigFiles = (...files) => { + const merged = {}; + for (const file of files) { + for (const [key, values] of Object.entries(file)) { + if (merged[key] !== undefined) { + Object.assign(merged[key], values); } else { - resolve(this.resolveDefaultConfig(options)); + merged[key] = values; } - }); - } - resolveDefaultConfig(options) { - const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, } = options || {}; - const keepAlive = true; - const maxSockets = 50; - return { - connectionTimeout, - requestTimeout, - socketTimeout, - socketAcquisitionWarningTimeout, - throwOnRequestTimeout, - httpAgent: (() => { - if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { - this.externalAgent = true; - return httpAgent; - } - return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); - })(), - httpsAgent: (() => { - if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { - this.externalAgent = true; - return httpsAgent; - } - return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); - })(), - logger: console, - }; - } - destroy() { - this.config?.httpAgent?.destroy(); - this.config?.httpsAgent?.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; } - return new Promise((_resolve, _reject) => { - const config = this.config; - let writeRequestBodyPromise = undefined; - const timeouts = []; - const resolve = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - timeouts.forEach(timing.clearTimeout); - _reject(arg); - }; - if (abortSignal?.aborted) { - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const isSSL = request.protocol === "https:"; - const headers = request.headers ?? {}; - const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; - let agent = isSSL ? config.httpsAgent : config.httpAgent; - if (expectContinue && !this.externalAgent) { - agent = new (isSSL ? https.Agent : http.Agent)({ - keepAlive: false, - maxSockets: Infinity, - }); - } - timeouts.push(timing.setTimeout(() => { - this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); - }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); - const queryString = querystringBuilder.buildQueryString(request.query || {}); - let auth = undefined; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}`; - } - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - let hostname = request.hostname ?? ""; - if (hostname[0] === "[" && hostname.endsWith("]")) { - hostname = request.hostname.slice(1, -1); - } - else { - hostname = request.hostname; - } - const nodeHttpsOptions = { - headers: request.headers, - host: hostname, - method: request.method, - path, - port: request.port, - agent, - auth, - }; - const requestFunc = isSSL ? https.request : http.request; - const req = requestFunc(nodeHttpsOptions, (res) => { - const httpResponse = new protocolHttp.HttpResponse({ - statusCode: res.statusCode || -1, - reason: res.statusMessage, - headers: getTransformedHeaders(res.headers), - body: res, - }); - resolve({ response: httpResponse }); - }); - req.on("error", (err) => { - if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { - reject(Object.assign(err, { name: "TimeoutError" })); - } - else { - reject(err); - } - }); - if (abortSignal) { - const onAbort = () => { - req.destroy(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - req.once("close", () => signal.removeEventListener("abort", onAbort)); - } - else { - abortSignal.onabort = onAbort; - } - } - const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; - timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); - timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); - timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); - const httpAgent = nodeHttpsOptions.agent; - if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { - timeouts.push(setSocketKeepAlive(req, { - keepAlive: httpAgent.keepAlive, - keepAliveMsecs: httpAgent.keepAliveMsecs, - })); - } - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { - timeouts.forEach(timing.clearTimeout); - return _reject(e); - }); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; } -} + return merged; +}; + +const parseKnownFiles = async (init) => { + const parsedFiles = await loadSharedConfigFiles(init); + return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); +}; + +const externalDataInterceptor = { + getFileRecord() { + return readFile.fileIntercept; + }, + interceptFile(path, contents) { + readFile.fileIntercept[path] = Promise.resolve(contents); + }, + getTokenRecord() { + return getSSOTokenFromFile.tokenIntercept; + }, + interceptToken(id, contents) { + getSSOTokenFromFile.tokenIntercept[id] = contents; + }, +}; + +Object.defineProperty(exports, "getSSOTokenFromFile", ({ + enumerable: true, + get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } +})); +Object.defineProperty(exports, "readFile", ({ + enumerable: true, + get: function () { return readFile.readFile; } +})); +exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; +exports.DEFAULT_PROFILE = DEFAULT_PROFILE; +exports.ENV_PROFILE = ENV_PROFILE; +exports.externalDataInterceptor = externalDataInterceptor; +exports.getProfileName = getProfileName; +exports.loadSharedConfigFiles = loadSharedConfigFiles; +exports.loadSsoSessionData = loadSsoSessionData; +exports.parseKnownFiles = parseKnownFiles; +Object.keys(getHomeDir).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return getHomeDir[k]; } + }); +}); +Object.keys(getSSOTokenFilepath).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return getSSOTokenFilepath[k]; } + }); +}); + + +/***/ }), -class NodeHttp2ConnectionPool { - sessions = []; - constructor(sessions) { - this.sessions = sessions ?? []; - } - poll() { - if (this.sessions.length > 0) { - return this.sessions.shift(); - } +/***/ 6684: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.readFile = exports.fileIntercept = exports.filePromises = void 0; +const promises_1 = __nccwpck_require__(1455); +exports.filePromises = {}; +exports.fileIntercept = {}; +const readFile = (path, options) => { + if (exports.fileIntercept[path] !== undefined) { + return exports.fileIntercept[path]; } - offerLast(session) { - this.sessions.push(session); + if (!exports.filePromises[path] || options?.ignoreCache) { + exports.filePromises[path] = (0, promises_1.readFile)(path, "utf8"); } - contains(session) { - return this.sessions.includes(session); + return exports.filePromises[path]; +}; +exports.readFile = readFile; + + +/***/ }), + +/***/ 5118: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var utilHexEncoding = __nccwpck_require__(6435); +var utilUtf8 = __nccwpck_require__(1577); +var isArrayBuffer = __nccwpck_require__(6130); +var protocolHttp = __nccwpck_require__(2356); +var utilMiddleware = __nccwpck_require__(6324); +var utilUriEscape = __nccwpck_require__(146); + +const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; +const CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; +const AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; +const SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; +const EXPIRES_QUERY_PARAM = "X-Amz-Expires"; +const SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; +const TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; +const REGION_SET_PARAM = "X-Amz-Region-Set"; +const AUTH_HEADER = "authorization"; +const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); +const DATE_HEADER = "date"; +const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; +const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); +const SHA256_HEADER = "x-amz-content-sha256"; +const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); +const HOST_HEADER = "host"; +const ALWAYS_UNSIGNABLE_HEADERS = { + authorization: true, + "cache-control": true, + connection: true, + expect: true, + from: true, + "keep-alive": true, + "max-forwards": true, + pragma: true, + referer: true, + te: true, + trailer: true, + "transfer-encoding": true, + upgrade: true, + "user-agent": true, + "x-amzn-trace-id": true, +}; +const PROXY_HEADER_PATTERN = /^proxy-/; +const SEC_HEADER_PATTERN = /^sec-/; +const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; +const ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; +const ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; +const EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; +const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; +const MAX_CACHE_SIZE = 50; +const KEY_TYPE_IDENTIFIER = "aws4_request"; +const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; + +const signingKeyCache = {}; +const cacheQueue = []; +const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; +const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { + const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); + const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.toHex(credsHash)}:${credentials.sessionToken}`; + if (cacheKey in signingKeyCache) { + return signingKeyCache[cacheKey]; } - remove(session) { - this.sessions = this.sessions.filter((s) => s !== session); + cacheQueue.push(cacheKey); + while (cacheQueue.length > MAX_CACHE_SIZE) { + delete signingKeyCache[cacheQueue.shift()]; } - [Symbol.iterator]() { - return this.sessions[Symbol.iterator](); + let key = `AWS4${credentials.secretAccessKey}`; + for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { + key = await hmac(sha256Constructor, key, signable); } - destroy(connection) { - for (const session of this.sessions) { - if (session === connection) { - if (!session.destroyed) { - session.destroy(); - } + return (signingKeyCache[cacheKey] = key); +}; +const clearCredentialCache = () => { + cacheQueue.length = 0; + Object.keys(signingKeyCache).forEach((cacheKey) => { + delete signingKeyCache[cacheKey]; + }); +}; +const hmac = (ctor, secret, data) => { + const hash = new ctor(secret); + hash.update(utilUtf8.toUint8Array(data)); + return hash.digest(); +}; + +const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { + const canonical = {}; + for (const headerName of Object.keys(headers).sort()) { + if (headers[headerName] == undefined) { + continue; + } + const canonicalHeaderName = headerName.toLowerCase(); + if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || + unsignableHeaders?.has(canonicalHeaderName) || + PROXY_HEADER_PATTERN.test(canonicalHeaderName) || + SEC_HEADER_PATTERN.test(canonicalHeaderName)) { + if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) { + continue; } } + canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); } -} + return canonical; +}; -class NodeHttp2ConnectionManager { - constructor(config) { - this.config = config; - if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { - throw new RangeError("maxConcurrency must be greater than zero."); +const getPayloadHash = async ({ headers, body }, hashConstructor) => { + for (const headerName of Object.keys(headers)) { + if (headerName.toLowerCase() === SHA256_HEADER) { + return headers[headerName]; } } - config; - sessionCache = new Map(); - lease(requestContext, connectionConfiguration) { - const url = this.getUrlString(requestContext); - const existingPool = this.sessionCache.get(url); - if (existingPool) { - const existingSession = existingPool.poll(); - if (existingSession && !this.config.disableConcurrency) { - return existingSession; - } - } - const session = http2.connect(url); - if (this.config.maxConcurrency) { - session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { - if (err) { - throw new Error("Fail to set maxConcurrentStreams to " + - this.config.maxConcurrency + - "when creating new session for " + - requestContext.destination.toString()); - } - }); - } - session.unref(); - const destroySessionCb = () => { - session.destroy(); - this.deleteSession(url, session); - }; - session.on("goaway", destroySessionCb); - session.on("error", destroySessionCb); - session.on("frameError", destroySessionCb); - session.on("close", () => this.deleteSession(url, session)); - if (connectionConfiguration.requestTimeout) { - session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); - } - const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); - connectionPool.offerLast(session); - this.sessionCache.set(url, connectionPool); - return session; + if (body == undefined) { + return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; } - deleteSession(authority, session) { - const existingConnectionPool = this.sessionCache.get(authority); - if (!existingConnectionPool) { - return; + else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) { + const hashCtor = new hashConstructor(); + hashCtor.update(utilUtf8.toUint8Array(body)); + return utilHexEncoding.toHex(await hashCtor.digest()); + } + return UNSIGNED_PAYLOAD; +}; + +class HeaderFormatter { + format(headers) { + const chunks = []; + for (const headerName of Object.keys(headers)) { + const bytes = utilUtf8.fromUtf8(headerName); + chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); } - if (!existingConnectionPool.contains(session)) { - return; + const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); + let position = 0; + for (const chunk of chunks) { + out.set(chunk, position); + position += chunk.byteLength; } - existingConnectionPool.remove(session); - this.sessionCache.set(authority, existingConnectionPool); - } - release(requestContext, session) { - const cacheKey = this.getUrlString(requestContext); - this.sessionCache.get(cacheKey)?.offerLast(session); + return out; } - destroy() { - for (const [key, connectionPool] of this.sessionCache) { - for (const session of connectionPool) { - if (!session.destroyed) { - session.destroy(); + formatHeaderValue(header) { + switch (header.type) { + case "boolean": + return Uint8Array.from([header.value ? 0 : 1]); + case "byte": + return Uint8Array.from([2, header.value]); + case "short": + const shortView = new DataView(new ArrayBuffer(3)); + shortView.setUint8(0, 3); + shortView.setInt16(1, header.value, false); + return new Uint8Array(shortView.buffer); + case "integer": + const intView = new DataView(new ArrayBuffer(5)); + intView.setUint8(0, 4); + intView.setInt32(1, header.value, false); + return new Uint8Array(intView.buffer); + case "long": + const longBytes = new Uint8Array(9); + longBytes[0] = 5; + longBytes.set(header.value.bytes, 1); + return longBytes; + case "binary": + const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); + binView.setUint8(0, 6); + binView.setUint16(1, header.value.byteLength, false); + const binBytes = new Uint8Array(binView.buffer); + binBytes.set(header.value, 3); + return binBytes; + case "string": + const utf8Bytes = utilUtf8.fromUtf8(header.value); + const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); + strView.setUint8(0, 7); + strView.setUint16(1, utf8Bytes.byteLength, false); + const strBytes = new Uint8Array(strView.buffer); + strBytes.set(utf8Bytes, 3); + return strBytes; + case "timestamp": + const tsBytes = new Uint8Array(9); + tsBytes[0] = 8; + tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); + return tsBytes; + case "uuid": + if (!UUID_PATTERN.test(header.value)) { + throw new Error(`Invalid UUID received: ${header.value}`); } - connectionPool.remove(session); - } - this.sessionCache.delete(key); - } - } - setMaxConcurrentStreams(maxConcurrentStreams) { - if (maxConcurrentStreams && maxConcurrentStreams <= 0) { - throw new RangeError("maxConcurrentStreams must be greater than zero."); + const uuidBytes = new Uint8Array(17); + uuidBytes[0] = 9; + uuidBytes.set(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1); + return uuidBytes; } - this.config.maxConcurrency = maxConcurrentStreams; - } - setDisableConcurrentStreams(disableConcurrentStreams) { - this.config.disableConcurrency = disableConcurrentStreams; - } - getUrlString(request) { - return request.destination.toString(); } } - -class NodeHttp2Handler { - config; - configProvider; - metadata = { handlerProtocol: "h2" }; - connectionManager = new NodeHttp2ConnectionManager({}); - static create(instanceOrOptions) { - if (typeof instanceOrOptions?.handle === "function") { - return instanceOrOptions; +const UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; +class Int64 { + bytes; + constructor(bytes) { + this.bytes = bytes; + if (bytes.byteLength !== 8) { + throw new Error("Int64 buffers must be exactly 8 bytes"); } - return new NodeHttp2Handler(instanceOrOptions); - } - constructor(options) { - this.configProvider = new Promise((resolve, reject) => { - if (typeof options === "function") { - options() - .then((opts) => { - resolve(opts || {}); - }) - .catch(reject); - } - else { - resolve(options || {}); - } - }); } - destroy() { - this.connectionManager.destroy(); - } - async handle(request, { abortSignal, requestTimeout } = {}) { - if (!this.config) { - this.config = await this.configProvider; - this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); - if (this.config.maxConcurrentStreams) { - this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); - } + static fromNumber(number) { + if (number > 9_223_372_036_854_775_807 || number < -9223372036854776e3) { + throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); } - const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; - const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; - return new Promise((_resolve, _reject) => { - let fulfilled = false; - let writeRequestBodyPromise = undefined; - const resolve = async (arg) => { - await writeRequestBodyPromise; - _resolve(arg); - }; - const reject = async (arg) => { - await writeRequestBodyPromise; - _reject(arg); - }; - if (abortSignal?.aborted) { - fulfilled = true; - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - reject(abortError); - return; - } - const { hostname, method, port, protocol, query } = request; - let auth = ""; - if (request.username != null || request.password != null) { - const username = request.username ?? ""; - const password = request.password ?? ""; - auth = `${username}:${password}@`; - } - const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; - const requestContext = { destination: new URL(authority) }; - const session = this.connectionManager.lease(requestContext, { - requestTimeout: this.config?.sessionTimeout, - disableConcurrentStreams: disableConcurrentStreams || false, - }); - const rejectWithDestroy = (err) => { - if (disableConcurrentStreams) { - this.destroySession(session); - } - fulfilled = true; - reject(err); - }; - const queryString = querystringBuilder.buildQueryString(query || {}); - let path = request.path; - if (queryString) { - path += `?${queryString}`; - } - if (request.fragment) { - path += `#${request.fragment}`; - } - const req = session.request({ - ...request.headers, - [http2.constants.HTTP2_HEADER_PATH]: path, - [http2.constants.HTTP2_HEADER_METHOD]: method, - }); - session.ref(); - req.on("response", (headers) => { - const httpResponse = new protocolHttp.HttpResponse({ - statusCode: headers[":status"] || -1, - headers: getTransformedHeaders(headers), - body: req, - }); - fulfilled = true; - resolve({ response: httpResponse }); - if (disableConcurrentStreams) { - session.close(); - this.connectionManager.deleteSession(authority, session); - } - }); - if (effectiveRequestTimeout) { - req.setTimeout(effectiveRequestTimeout, () => { - req.close(); - const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); - timeoutError.name = "TimeoutError"; - rejectWithDestroy(timeoutError); - }); - } - if (abortSignal) { - const onAbort = () => { - req.close(); - const abortError = new Error("Request aborted"); - abortError.name = "AbortError"; - rejectWithDestroy(abortError); - }; - if (typeof abortSignal.addEventListener === "function") { - const signal = abortSignal; - signal.addEventListener("abort", onAbort, { once: true }); - req.once("close", () => signal.removeEventListener("abort", onAbort)); - } - else { - abortSignal.onabort = onAbort; - } - } - req.on("frameError", (type, code, id) => { - rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); - }); - req.on("error", rejectWithDestroy); - req.on("aborted", () => { - rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); - }); - req.on("close", () => { - session.unref(); - if (disableConcurrentStreams) { - session.destroy(); - } - if (!fulfilled) { - rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); - } - }); - writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); - }); - } - updateHttpClientConfig(key, value) { - this.config = undefined; - this.configProvider = this.configProvider.then((config) => { - return { - ...config, - [key]: value, - }; - }); - } - httpHandlerConfigs() { - return this.config ?? {}; - } - destroySession(session) { - if (!session.destroyed) { - session.destroy(); + const bytes = new Uint8Array(8); + for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { + bytes[i] = remaining; } + if (number < 0) { + negate(bytes); + } + return new Int64(bytes); } -} - -class Collector extends stream.Writable { - bufferedBytes = []; - _write(chunk, encoding, callback) { - this.bufferedBytes.push(chunk); - callback(); - } -} - -const streamCollector = (stream) => { - if (isReadableStreamInstance(stream)) { - return collectReadableStream(stream); - } - return new Promise((resolve, reject) => { - const collector = new Collector(); - stream.pipe(collector); - stream.on("error", (err) => { - collector.end(); - reject(err); - }); - collector.on("error", reject); - collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); - resolve(bytes); - }); - }); -}; -const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; -async function collectReadableStream(stream) { - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - let length = 0; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - length += value.length; + valueOf() { + const bytes = this.bytes.slice(0); + const negative = bytes[0] & 0b10000000; + if (negative) { + negate(bytes); } - isDone = done; + return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1); } - const collected = new Uint8Array(length); - let offset = 0; - for (const chunk of chunks) { - collected.set(chunk, offset); - offset += chunk.length; + toString() { + return String(this.valueOf()); + } +} +function negate(bytes) { + for (let i = 0; i < 8; i++) { + bytes[i] ^= 0xff; + } + for (let i = 7; i > -1; i--) { + bytes[i]++; + if (bytes[i] !== 0) + break; } - return collected; } -exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; -exports.NodeHttp2Handler = NodeHttp2Handler; -exports.NodeHttpHandler = NodeHttpHandler; -exports.streamCollector = streamCollector; - - -/***/ }), - -/***/ 8857: -/***/ ((__unused_webpack_module, exports) => { +const hasHeader = (soughtHeader, headers) => { + soughtHeader = soughtHeader.toLowerCase(); + for (const headerName of Object.keys(headers)) { + if (soughtHeader === headerName.toLowerCase()) { + return true; + } + } + return false; +}; -"use strict"; +const moveHeadersToQuery = (request, options = {}) => { + const { headers, query = {} } = protocolHttp.HttpRequest.clone(request); + for (const name of Object.keys(headers)) { + const lname = name.toLowerCase(); + if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) || + options.hoistableHeaders?.has(lname)) { + query[name] = headers[name]; + delete headers[name]; + } + } + return { + ...request, + headers, + query, + }; +}; +const prepareRequest = (request) => { + request = protocolHttp.HttpRequest.clone(request); + for (const headerName of Object.keys(request.headers)) { + if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { + delete request.headers[headerName]; + } + } + return request; +}; -class ProviderError extends Error { - name = "ProviderError"; - tryNextLink; - constructor(message, options = true) { - let logger; - let tryNextLink = true; - if (typeof options === "boolean") { - logger = undefined; - tryNextLink = options; +const getCanonicalQuery = ({ query = {} }) => { + const keys = []; + const serialized = {}; + for (const key of Object.keys(query)) { + if (key.toLowerCase() === SIGNATURE_HEADER) { + continue; } - else if (options != null && typeof options === "object") { - logger = options.logger; - tryNextLink = options.tryNextLink ?? true; + const encodedKey = utilUriEscape.escapeUri(key); + keys.push(encodedKey); + const value = query[key]; + if (typeof value === "string") { + serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`; + } + else if (Array.isArray(value)) { + serialized[encodedKey] = value + .slice(0) + .reduce((encoded, value) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value)}`]), []) + .sort() + .join("&"); } - super(message); - this.tryNextLink = tryNextLink; - Object.setPrototypeOf(this, ProviderError.prototype); - logger?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`); - } - static from(error, options = true) { - return Object.assign(new this(error.message, options), error); } -} + return keys + .sort() + .map((key) => serialized[key]) + .filter((serialized) => serialized) + .join("&"); +}; -class CredentialsProviderError extends ProviderError { - name = "CredentialsProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, CredentialsProviderError.prototype); +const iso8601 = (time) => toDate(time) + .toISOString() + .replace(/\.\d{3}Z$/, "Z"); +const toDate = (time) => { + if (typeof time === "number") { + return new Date(time * 1000); } -} + if (typeof time === "string") { + if (Number(time)) { + return new Date(Number(time) * 1000); + } + return new Date(time); + } + return time; +}; -class TokenProviderError extends ProviderError { - name = "TokenProviderError"; - constructor(message, options = true) { - super(message, options); - Object.setPrototypeOf(this, TokenProviderError.prototype); +class SignatureV4Base { + service; + regionProvider; + credentialProvider; + sha256; + uriEscapePath; + applyChecksum; + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { + this.service = service; + this.sha256 = sha256; + this.uriEscapePath = uriEscapePath; + this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; + this.regionProvider = utilMiddleware.normalizeProvider(region); + this.credentialProvider = utilMiddleware.normalizeProvider(credentials); } -} + createCanonicalRequest(request, canonicalHeaders, payloadHash) { + const sortedHeaders = Object.keys(canonicalHeaders).sort(); + return `${request.method} +${this.getCanonicalPath(request)} +${getCanonicalQuery(request)} +${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} -const chain = (...providers) => async () => { - if (providers.length === 0) { - throw new ProviderError("No providers in chain"); +${sortedHeaders.join(";")} +${payloadHash}`; } - let lastProviderError; - for (const provider of providers) { - try { - const credentials = await provider(); - return credentials; - } - catch (err) { - lastProviderError = err; - if (err?.tryNextLink) { - continue; + async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { + const hash = new this.sha256(); + hash.update(utilUtf8.toUint8Array(canonicalRequest)); + const hashedRequest = await hash.digest(); + return `${algorithmIdentifier} +${longDate} +${credentialScope} +${utilHexEncoding.toHex(hashedRequest)}`; + } + getCanonicalPath({ path }) { + if (this.uriEscapePath) { + const normalizedPathSegments = []; + for (const pathSegment of path.split("/")) { + if (pathSegment?.length === 0) + continue; + if (pathSegment === ".") + continue; + if (pathSegment === "..") { + normalizedPathSegments.pop(); + } + else { + normalizedPathSegments.push(pathSegment); + } } - throw err; + const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; + const doubleEncoded = utilUriEscape.escapeUri(normalizedPath); + return doubleEncoded.replace(/%2F/g, "/"); } + return path; } - throw lastProviderError; -}; - -const fromStatic = (staticValue) => () => Promise.resolve(staticValue); - -const memoize = (provider, isExpired, requiresRefresh) => { - let resolved; - let pending; - let hasResult; - let isConstant = false; - const coalesceProvider = async () => { - if (!pending) { - pending = provider(); + validateResolvedCredentials(credentials) { + if (typeof credentials !== "object" || + typeof credentials.accessKeyId !== "string" || + typeof credentials.secretAccessKey !== "string") { + throw new Error("Resolved credential object is not valid"); } - try { - resolved = await pending; - hasResult = true; - isConstant = false; + } + formatDate(now) { + const longDate = iso8601(now).replace(/[\-:]/g, ""); + return { + longDate, + shortDate: longDate.slice(0, 8), + }; + } + getCanonicalHeaderList(headers) { + return Object.keys(headers).sort().join(";"); + } +} + +class SignatureV4 extends SignatureV4Base { + headerFormatter = new HeaderFormatter(); + constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { + super({ + applyChecksum, + credentials, + region, + service, + sha256, + uriEscapePath, + }); + } + async presign(originalRequest, options = {}) { + const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options; + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? (await this.regionProvider()); + const { longDate, shortDate } = this.formatDate(signingDate); + if (expiresIn > MAX_PRESIGNED_TTL) { + return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future"); } - finally { - pending = undefined; + const scope = createScope(shortDate, region, signingService ?? this.service); + const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); + if (credentials.sessionToken) { + request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; } - return resolved; - }; - if (isExpired === undefined) { - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(); - } - return resolved; - }; + request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; + request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; + request.query[AMZ_DATE_QUERY_PARAM] = longDate; + request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); + request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); + return request; } - return async (options) => { - if (!hasResult || options?.forceRefresh) { - resolved = await coalesceProvider(); + async sign(toSign, options) { + if (typeof toSign === "string") { + return this.signString(toSign, options); } - if (isConstant) { - return resolved; + else if (toSign.headers && toSign.payload) { + return this.signEvent(toSign, options); } - if (requiresRefresh && !requiresRefresh(resolved)) { - isConstant = true; - return resolved; + else if (toSign.message) { + return this.signMessage(toSign, options); } - if (isExpired(resolved)) { - await coalesceProvider(); - return resolved; + else { + return this.signRequest(toSign, options); } - return resolved; - }; + } + async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) { + const region = signingRegion ?? (await this.regionProvider()); + const { shortDate, longDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); + const hash = new this.sha256(); + hash.update(headers); + const hashedHeaders = utilHexEncoding.toHex(await hash.digest()); + const stringToSign = [ + EVENT_ALGORITHM_IDENTIFIER, + longDate, + scope, + priorSignature, + hashedHeaders, + hashedPayload, + ].join("\n"); + return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + } + async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) { + const promise = this.signEvent({ + headers: this.headerFormatter.format(signableMessage.message.headers), + payload: signableMessage.message.body, + }, { + signingDate, + signingRegion, + signingService, + priorSignature: signableMessage.priorSignature, + }); + return promise.then((signature) => { + return { message: signableMessage.message, signature }; + }); + } + async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? (await this.regionProvider()); + const { shortDate } = this.formatDate(signingDate); + const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); + hash.update(utilUtf8.toUint8Array(stringToSign)); + return utilHexEncoding.toHex(await hash.digest()); + } + async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) { + const credentials = await this.credentialProvider(); + this.validateResolvedCredentials(credentials); + const region = signingRegion ?? (await this.regionProvider()); + const request = prepareRequest(requestToSign); + const { longDate, shortDate } = this.formatDate(signingDate); + const scope = createScope(shortDate, region, signingService ?? this.service); + request.headers[AMZ_DATE_HEADER] = longDate; + if (credentials.sessionToken) { + request.headers[TOKEN_HEADER] = credentials.sessionToken; + } + const payloadHash = await getPayloadHash(request, this.sha256); + if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { + request.headers[SHA256_HEADER] = payloadHash; + } + const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); + const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); + request.headers[AUTH_HEADER] = + `${ALGORITHM_IDENTIFIER} ` + + `Credential=${credentials.accessKeyId}/${scope}, ` + + `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` + + `Signature=${signature}`; + return request; + } + async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { + const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); + const hash = new this.sha256(await keyPromise); + hash.update(utilUtf8.toUint8Array(stringToSign)); + return utilHexEncoding.toHex(await hash.digest()); + } + getSigningKey(credentials, region, shortDate, service) { + return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + } +} + +const signatureV4aContainer = { + SignatureV4a: null, }; -exports.CredentialsProviderError = CredentialsProviderError; -exports.ProviderError = ProviderError; -exports.TokenProviderError = TokenProviderError; -exports.chain = chain; -exports.fromStatic = fromStatic; -exports.memoize = memoize; +exports.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER; +exports.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A; +exports.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM; +exports.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS; +exports.AMZ_DATE_HEADER = AMZ_DATE_HEADER; +exports.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM; +exports.AUTH_HEADER = AUTH_HEADER; +exports.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM; +exports.DATE_HEADER = DATE_HEADER; +exports.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER; +exports.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM; +exports.GENERATED_HEADERS = GENERATED_HEADERS; +exports.HOST_HEADER = HOST_HEADER; +exports.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER; +exports.MAX_CACHE_SIZE = MAX_CACHE_SIZE; +exports.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL; +exports.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN; +exports.REGION_SET_PARAM = REGION_SET_PARAM; +exports.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN; +exports.SHA256_HEADER = SHA256_HEADER; +exports.SIGNATURE_HEADER = SIGNATURE_HEADER; +exports.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM; +exports.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM; +exports.SignatureV4 = SignatureV4; +exports.SignatureV4Base = SignatureV4Base; +exports.TOKEN_HEADER = TOKEN_HEADER; +exports.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM; +exports.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS; +exports.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD; +exports.clearCredentialCache = clearCredentialCache; +exports.createScope = createScope; +exports.getCanonicalHeaders = getCanonicalHeaders; +exports.getCanonicalQuery = getCanonicalQuery; +exports.getPayloadHash = getPayloadHash; +exports.getSigningKey = getSigningKey; +exports.hasHeader = hasHeader; +exports.moveHeadersToQuery = moveHeadersToQuery; +exports.prepareRequest = prepareRequest; +exports.signatureV4aContainer = signatureV4aContainer; /***/ }), -/***/ 2356: +/***/ 1411: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; +var middlewareStack = __nccwpck_require__(9208); +var protocols = __nccwpck_require__(3422); var types = __nccwpck_require__(690); +var schema = __nccwpck_require__(6890); +var serde = __nccwpck_require__(2430); -const getHttpHandlerExtensionConfiguration = (runtimeConfig) => { - return { - setHttpHandler(handler) { - runtimeConfig.httpHandler = handler; - }, - httpHandler() { - return runtimeConfig.httpHandler; - }, - updateHttpClientConfig(key, value) { - runtimeConfig.httpHandler?.updateHttpClientConfig(key, value); - }, - httpHandlerConfigs() { - return runtimeConfig.httpHandler.httpHandlerConfigs(); - }, - }; -}; -const resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => { - return { - httpHandler: httpHandlerExtensionConfiguration.httpHandler(), - }; -}; - -class Field { - name; - kind; - values; - constructor({ name, kind = types.FieldPosition.HEADER, values = [] }) { - this.name = name; - this.kind = kind; - this.values = values; - } - add(value) { - this.values.push(value); - } - set(values) { - this.values = values; - } - remove(value) { - this.values = this.values.filter((v) => v !== value); +class Client { + config; + middlewareStack = middlewareStack.constructStack(); + initConfig; + handlers; + constructor(config) { + this.config = config; + const { protocol, protocolSettings } = config; + if (protocolSettings) { + if (typeof protocol === "function") { + config.protocol = new protocol(protocolSettings); + } + } } - toString() { - return this.values.map((v) => (v.includes(",") || v.includes(" ") ? `"${v}"` : v)).join(", "); + send(command, optionsOrCb, cb) { + const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined; + const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; + const useHandlerCache = options === undefined && this.config.cacheMiddleware === true; + let handler; + if (useHandlerCache) { + if (!this.handlers) { + this.handlers = new WeakMap(); + } + const handlers = this.handlers; + if (handlers.has(command.constructor)) { + handler = handlers.get(command.constructor); + } + else { + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + handlers.set(command.constructor, handler); + } + } + else { + delete this.handlers; + handler = command.resolveMiddleware(this.middlewareStack, this.config, options); + } + if (callback) { + handler(command) + .then((result) => callback(null, result.output), (err) => callback(err)) + .catch(() => { }); + } + else { + return handler(command).then((result) => result.output); + } } - get() { - return this.values; + destroy() { + this.config?.requestHandler?.destroy?.(); + delete this.handlers; } } -class Fields { - entries = {}; - encoding; - constructor({ fields = [], encoding = "utf-8" }) { - fields.forEach(this.setField.bind(this)); - this.encoding = encoding; +const SENSITIVE_STRING$1 = "***SensitiveInformation***"; +function schemaLogFilter(schema$1, data) { + if (data == null) { + return data; } - setField(field) { - this.entries[field.name.toLowerCase()] = field; + const ns = schema.NormalizedSchema.of(schema$1); + if (ns.getMergedTraits().sensitive) { + return SENSITIVE_STRING$1; } - getField(name) { - return this.entries[name.toLowerCase()]; + if (ns.isListSchema()) { + const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING$1; + } } - removeField(name) { - delete this.entries[name.toLowerCase()]; + else if (ns.isMapSchema()) { + const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; + if (isSensitive) { + return SENSITIVE_STRING$1; + } } - getByType(kind) { - return Object.values(this.entries).filter((field) => field.kind === kind); + else if (ns.isStructSchema() && typeof data === "object") { + const object = data; + const newObject = {}; + for (const [member, memberNs] of ns.structIterator()) { + if (object[member] != null) { + newObject[member] = schemaLogFilter(memberNs, object[member]); + } + } + return newObject; } + return data; } -class HttpRequest { - method; - protocol; - hostname; - port; - path; - query; - headers; - username; - password; - fragment; - body; - constructor(options) { - this.method = options.method || "GET"; - this.hostname = options.hostname || "localhost"; - this.port = options.port; - this.query = options.query || {}; - this.headers = options.headers || {}; - this.body = options.body; - this.protocol = options.protocol - ? options.protocol.slice(-1) !== ":" - ? `${options.protocol}:` - : options.protocol - : "https:"; - this.path = options.path ? (options.path.charAt(0) !== "/" ? `/${options.path}` : options.path) : "/"; - this.username = options.username; - this.password = options.password; - this.fragment = options.fragment; +class Command { + middlewareStack = middlewareStack.constructStack(); + schema; + static classBuilder() { + return new ClassBuilder(); } - static clone(request) { - const cloned = new HttpRequest({ - ...request, - headers: { ...request.headers }, - }); - if (cloned.query) { - cloned.query = cloneQuery(cloned.query); + resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) { + for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { + this.middlewareStack.use(mw); } - return cloned; + const stack = clientStack.concat(this.middlewareStack); + const { logger } = configuration; + const handlerExecutionContext = { + logger, + clientName, + commandName, + inputFilterSensitiveLog, + outputFilterSensitiveLog, + [types.SMITHY_CONTEXT_KEY]: { + commandInstance: this, + ...smithyContext, + }, + ...additionalContext, + }; + const { requestHandler } = configuration; + return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); } - static isInstance(request) { - if (!request) { - return false; - } - const req = request; - return ("method" in req && - "protocol" in req && - "hostname" in req && - "path" in req && - typeof req["query"] === "object" && - typeof req["headers"] === "object"); +} +class ClassBuilder { + _init = () => { }; + _ep = {}; + _middlewareFn = () => []; + _commandName = ""; + _clientName = ""; + _additionalContext = {}; + _smithyContext = {}; + _inputFilterSensitiveLog = undefined; + _outputFilterSensitiveLog = undefined; + _serializer = null; + _deserializer = null; + _operationSchema; + init(cb) { + this._init = cb; } - clone() { - return HttpRequest.clone(this); + ep(endpointParameterInstructions) { + this._ep = endpointParameterInstructions; + return this; } -} -function cloneQuery(query) { - return Object.keys(query).reduce((carry, paramName) => { - const param = query[paramName]; - return { - ...carry, - [paramName]: Array.isArray(param) ? [...param] : param, + m(middlewareSupplier) { + this._middlewareFn = middlewareSupplier; + return this; + } + s(service, operation, smithyContext = {}) { + this._smithyContext = { + service, + operation, + ...smithyContext, }; - }, {}); -} - -class HttpResponse { - statusCode; - reason; - headers; - body; - constructor(options) { - this.statusCode = options.statusCode; - this.reason = options.reason; - this.headers = options.headers || {}; - this.body = options.body; + return this; } - static isInstance(response) { - if (!response) - return false; - const resp = response; - return typeof resp.statusCode === "number" && typeof resp.headers === "object"; + c(additionalContext = {}) { + this._additionalContext = additionalContext; + return this; } -} - -function isValidHostname(hostname) { - const hostPattern = /^[a-z0-9][a-z0-9\.\-]*[a-z0-9]$/; - return hostPattern.test(hostname); -} - -exports.Field = Field; -exports.Fields = Fields; -exports.HttpRequest = HttpRequest; -exports.HttpResponse = HttpResponse; -exports.getHttpHandlerExtensionConfiguration = getHttpHandlerExtensionConfiguration; -exports.isValidHostname = isValidHostname; -exports.resolveHttpHandlerRuntimeConfig = resolveHttpHandlerRuntimeConfig; - - -/***/ }), - -/***/ 8256: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilUriEscape = __nccwpck_require__(146); - -function buildQueryString(query) { - const parts = []; - for (let key of Object.keys(query).sort()) { - const value = query[key]; - key = utilUriEscape.escapeUri(key); - if (Array.isArray(value)) { - for (let i = 0, iLen = value.length; i < iLen; i++) { - parts.push(`${key}=${utilUriEscape.escapeUri(value[i])}`); + n(clientName, commandName) { + this._clientName = clientName; + this._commandName = commandName; + return this; + } + f(inputFilter = (_) => _, outputFilter = (_) => _) { + this._inputFilterSensitiveLog = inputFilter; + this._outputFilterSensitiveLog = outputFilter; + return this; + } + ser(serializer) { + this._serializer = serializer; + return this; + } + de(deserializer) { + this._deserializer = deserializer; + return this; + } + sc(operation) { + this._operationSchema = operation; + this._smithyContext.operationSchema = operation; + return this; + } + build() { + const closure = this; + let CommandRef; + return (CommandRef = class extends Command { + input; + static getEndpointParameterInstructions() { + return closure._ep; } - } - else { - let qsEntry = key; - if (value || typeof value === "string") { - qsEntry += `=${utilUriEscape.escapeUri(value)}`; + constructor(...[input]) { + super(); + this.input = input ?? {}; + closure._init(this); + this.schema = closure._operationSchema; } - parts.push(qsEntry); - } + resolveMiddleware(stack, configuration, options) { + const op = closure._operationSchema; + const input = op?.[4] ?? op?.input; + const output = op?.[5] ?? op?.output; + return this.resolveMiddlewareWithContext(stack, configuration, options, { + CommandCtor: CommandRef, + middlewareFn: closure._middlewareFn, + clientName: closure._clientName, + commandName: closure._commandName, + inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _), + outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _), + smithyContext: closure._smithyContext, + additionalContext: closure._additionalContext, + }); + } + serialize = closure._serializer; + deserialize = closure._deserializer; + }); } - return parts.join("&"); } -exports.buildQueryString = buildQueryString; - - -/***/ }), - -/***/ 8822: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - +const SENSITIVE_STRING = "***SensitiveInformation***"; -function parseQueryString(querystring) { - const query = {}; - querystring = querystring.replace(/^\?/, ""); - if (querystring) { - for (const pair of querystring.split("&")) { - let [key, value = null] = pair.split("="); - key = decodeURIComponent(key); - if (value) { - value = decodeURIComponent(value); - } - if (!(key in query)) { - query[key] = value; +const createAggregatedClient = (commands, Client, options) => { + for (const [command, CommandCtor] of Object.entries(commands)) { + const methodImpl = async function (args, optionsOrCb, cb) { + const command = new CommandCtor(args); + if (typeof optionsOrCb === "function") { + this.send(command, optionsOrCb); } - else if (Array.isArray(query[key])) { - query[key].push(value); + else if (typeof cb === "function") { + if (typeof optionsOrCb !== "object") + throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + this.send(command, optionsOrCb || {}, cb); } else { - query[key] = [query[key], value]; + return this.send(command, optionsOrCb); } + }; + const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); + Client.prototype[methodName] = methodImpl; + } + const { paginators = {}, waiters = {} } = options ?? {}; + for (const [paginatorName, paginatorFn] of Object.entries(paginators)) { + if (Client.prototype[paginatorName] === void 0) { + Client.prototype[paginatorName] = function (commandInput = {}, paginationConfiguration, ...rest) { + return paginatorFn({ + ...paginationConfiguration, + client: this, + }, commandInput, ...rest); + }; } } - return query; -} - -exports.parseQueryString = parseQueryString; - - -/***/ }), - -/***/ 2058: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - - -const CLOCK_SKEW_ERROR_CODES = [ - "AuthFailure", - "InvalidSignatureException", - "RequestExpired", - "RequestInTheFuture", - "RequestTimeTooSkewed", - "SignatureDoesNotMatch", -]; -const THROTTLING_ERROR_CODES = [ - "BandwidthLimitExceeded", - "EC2ThrottledException", - "LimitExceededException", - "PriorRequestNotComplete", - "ProvisionedThroughputExceededException", - "RequestLimitExceeded", - "RequestThrottled", - "RequestThrottledException", - "SlowDown", - "ThrottledException", - "Throttling", - "ThrottlingException", - "TooManyRequestsException", - "TransactionInProgressException", -]; -const TRANSIENT_ERROR_CODES = ["TimeoutError", "RequestTimeout", "RequestTimeoutException"]; -const TRANSIENT_ERROR_STATUS_CODES = [500, 502, 503, 504]; -const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "ECONNREFUSED", "EPIPE", "ETIMEDOUT"]; -const NODEJS_NETWORK_ERROR_CODES = ["EHOSTUNREACH", "ENETUNREACH", "ENOTFOUND"]; - -const isRetryableByTrait = (error) => error?.$retryable !== undefined; -const isClockSkewError = (error) => CLOCK_SKEW_ERROR_CODES.includes(error.name); -const isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected; -const isBrowserNetworkError = (error) => { - const errorMessages = new Set([ - "Failed to fetch", - "NetworkError when attempting to fetch resource", - "The Internet connection appears to be offline", - "Load failed", - "Network request failed", - ]); - const isValid = error && error instanceof TypeError; - if (!isValid) { - return false; + for (const [waiterName, waiterFn] of Object.entries(waiters)) { + if (Client.prototype[waiterName] === void 0) { + Client.prototype[waiterName] = async function (commandInput = {}, waiterConfiguration, ...rest) { + let config = waiterConfiguration; + if (typeof waiterConfiguration === "number") { + config = { + maxWaitTime: waiterConfiguration, + }; + } + return waiterFn({ + ...config, + client: this, + }, commandInput, ...rest); + }; + } } - return errorMessages.has(error.message); }; -const isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || - THROTTLING_ERROR_CODES.includes(error.name) || - error.$retryable?.throttling == true; -const isTransientError = (error, depth = 0) => isRetryableByTrait(error) || - isClockSkewCorrectedError(error) || - TRANSIENT_ERROR_CODES.includes(error.name) || - NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || - NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || - TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || - isBrowserNetworkError(error) || - (error.cause !== undefined && depth <= 10 && isTransientError(error.cause, depth + 1)); -const isServerError = (error) => { - if (error.$metadata?.httpStatusCode !== undefined) { - const statusCode = error.$metadata.httpStatusCode; - if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) { - return true; + +class ServiceException extends Error { + $fault; + $response; + $retryable; + $metadata; + constructor(options) { + super(options.message); + Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); + this.name = options.name; + this.$fault = options.$fault; + this.$metadata = options.$metadata; + } + static isInstance(value) { + if (!value) + return false; + const candidate = value; + return (ServiceException.prototype.isPrototypeOf(candidate) || + (Boolean(candidate.$fault) && + Boolean(candidate.$metadata) && + (candidate.$fault === "client" || candidate.$fault === "server"))); + } + static [Symbol.hasInstance](instance) { + if (!instance) + return false; + const candidate = instance; + if (this === ServiceException) { + return ServiceException.isInstance(instance); + } + if (ServiceException.isInstance(instance)) { + if (candidate.name && this.name) { + return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + } + return this.prototype.isPrototypeOf(instance); } return false; } - return false; +} +const decorateServiceException = (exception, additions = {}) => { + Object.entries(additions) + .filter(([, v]) => v !== undefined) + .forEach(([k, v]) => { + if (exception[k] == undefined || exception[k] === "") { + exception[k] = v; + } + }); + const message = exception.message || exception.Message || "UnknownError"; + exception.message = message; + delete exception.Message; + return exception; }; -exports.isBrowserNetworkError = isBrowserNetworkError; -exports.isClockSkewCorrectedError = isClockSkewCorrectedError; -exports.isClockSkewError = isClockSkewError; -exports.isRetryableByTrait = isRetryableByTrait; -exports.isServerError = isServerError; -exports.isThrottlingError = isThrottlingError; -exports.isTransientError = isTransientError; - - -/***/ }), - -/***/ 4172: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getHomeDir = void 0; -const os_1 = __nccwpck_require__(857); -const path_1 = __nccwpck_require__(6928); -const homeDirCache = {}; -const getHomeDirCacheKey = () => { - if (process && process.geteuid) { - return `${process.geteuid()}`; - } - return "DEFAULT"; +const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { + const $metadata = deserializeMetadata(output); + const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined; + const response = new exceptionCtor({ + name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", + $fault: "client", + $metadata, + }); + throw decorateServiceException(response, parsedBody); }; -const getHomeDir = () => { - const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env; - if (HOME) - return HOME; - if (USERPROFILE) - return USERPROFILE; - if (HOMEPATH) - return `${HOMEDRIVE}${HOMEPATH}`; - const homeDirCacheKey = getHomeDirCacheKey(); - if (!homeDirCache[homeDirCacheKey]) - homeDirCache[homeDirCacheKey] = (0, os_1.homedir)(); - return homeDirCache[homeDirCacheKey]; +const withBaseException = (ExceptionCtor) => { + return ({ output, parsedBody, errorCode }) => { + throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + }; +}; +const deserializeMetadata = (output) => ({ + httpStatusCode: output.statusCode, + requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], + extendedRequestId: output.headers["x-amz-id-2"], + cfId: output.headers["x-amz-cf-id"], +}); + +const loadConfigsForDefaultMode = (mode) => { + switch (mode) { + case "standard": + return { + retryMode: "standard", + connectionTimeout: 3100, + }; + case "in-region": + return { + retryMode: "standard", + connectionTimeout: 1100, + }; + case "cross-region": + return { + retryMode: "standard", + connectionTimeout: 3100, + }; + case "mobile": + return { + retryMode: "standard", + connectionTimeout: 30000, + }; + default: + return {}; + } }; -exports.getHomeDir = getHomeDir; - - -/***/ }), - -/***/ 269: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFilepath = void 0; -const crypto_1 = __nccwpck_require__(6982); -const path_1 = __nccwpck_require__(6928); -const getHomeDir_1 = __nccwpck_require__(4172); -const getSSOTokenFilepath = (id) => { - const hasher = (0, crypto_1.createHash)("sha1"); - const cacheName = hasher.update(id).digest("hex"); - return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`); +let warningEmitted = false; +const emitWarningIfUnsupportedVersion = (version) => { + if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { + warningEmitted = true; + } }; -exports.getSSOTokenFilepath = getSSOTokenFilepath; - - -/***/ }), - -/***/ 1326: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getSSOTokenFromFile = exports.tokenIntercept = void 0; -const promises_1 = __nccwpck_require__(1943); -const getSSOTokenFilepath_1 = __nccwpck_require__(269); -exports.tokenIntercept = {}; -const getSSOTokenFromFile = async (id) => { - if (exports.tokenIntercept[id]) { - return exports.tokenIntercept[id]; +const getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + for (const id in types.AlgorithmId) { + const algorithmId = types.AlgorithmId[id]; + if (runtimeConfig[algorithmId] === undefined) { + continue; + } + checksumAlgorithms.push({ + algorithmId: () => algorithmId, + checksumConstructor: () => runtimeConfig[algorithmId], + }); } - const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id); - const ssoTokenText = await (0, promises_1.readFile)(ssoTokenFilepath, "utf8"); - return JSON.parse(ssoTokenText); + return { + addChecksumAlgorithm(algo) { + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + }, + }; +}; +const resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); + }); + return runtimeConfig; }; -exports.getSSOTokenFromFile = getSSOTokenFromFile; - - -/***/ }), - -/***/ 4964: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -var getHomeDir = __nccwpck_require__(4172); -var getSSOTokenFilepath = __nccwpck_require__(269); -var getSSOTokenFromFile = __nccwpck_require__(1326); -var path = __nccwpck_require__(6928); -var types = __nccwpck_require__(690); -var readFile = __nccwpck_require__(6684); +const getRetryConfiguration = (runtimeConfig) => { + return { + setRetryStrategy(retryStrategy) { + runtimeConfig.retryStrategy = retryStrategy; + }, + retryStrategy() { + return runtimeConfig.retryStrategy; + }, + }; +}; +const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { + const runtimeConfig = {}; + runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); + return runtimeConfig; +}; -const ENV_PROFILE = "AWS_PROFILE"; -const DEFAULT_PROFILE = "default"; -const getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE; +const getDefaultExtensionConfiguration = (runtimeConfig) => { + return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); +}; +const getDefaultClientConfiguration = getDefaultExtensionConfiguration; +const resolveDefaultRuntimeConfig = (config) => { + return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); +}; -const CONFIG_PREFIX_SEPARATOR = "."; +const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; -const getConfigData = (data) => Object.entries(data) - .filter(([key]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - if (indexOfSeparator === -1) { - return false; +const getValueFromTextNode = (obj) => { + const textNodeName = "#text"; + for (const key in obj) { + if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) { + obj[key] = obj[key][textNodeName]; + } + else if (typeof obj[key] === "object" && obj[key] !== null) { + obj[key] = getValueFromTextNode(obj[key]); + } } - return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator)); -}) - .reduce((acc, [key, value]) => { - const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR); - const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key; - acc[updatedKey] = value; - return acc; -}, { - ...(data.default && { default: data.default }), -}); + return obj; +}; -const ENV_CONFIG_PATH = "AWS_CONFIG_FILE"; -const getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config"); +const isSerializableHeaderValue = (value) => { + return value != null; +}; -const ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE"; -const getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials"); +class NoOpLogger { + trace() { } + debug() { } + info() { } + warn() { } + error() { } +} -const prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/; -const profileNameBlockList = ["__proto__", "profile __proto__"]; -const parseIni = (iniData) => { - const map = {}; - let currentSection; - let currentSubSection; - for (const iniLine of iniData.split(/\r?\n/)) { - const trimmedLine = iniLine.split(/(^|\s)[;#]/)[0].trim(); - const isSection = trimmedLine[0] === "[" && trimmedLine[trimmedLine.length - 1] === "]"; - if (isSection) { - currentSection = undefined; - currentSubSection = undefined; - const sectionName = trimmedLine.substring(1, trimmedLine.length - 1); - const matches = prefixKeyRegex.exec(sectionName); - if (matches) { - const [, prefix, , name] = matches; - if (Object.values(types.IniSectionType).includes(prefix)) { - currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR); - } - } - else { - currentSection = sectionName; - } - if (profileNameBlockList.includes(sectionName)) { - throw new Error(`Found invalid profile name "${sectionName}"`); - } +function map(arg0, arg1, arg2) { + let target; + let filter; + let instructions; + if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { + target = {}; + instructions = arg0; + } + else { + target = arg0; + if (typeof arg1 === "function") { + filter = arg1; + instructions = arg2; + return mapWithFilter(target, filter, instructions); } - else if (currentSection) { - const indexOfEqualsSign = trimmedLine.indexOf("="); - if (![0, -1].includes(indexOfEqualsSign)) { - const [name, value] = [ - trimmedLine.substring(0, indexOfEqualsSign).trim(), - trimmedLine.substring(indexOfEqualsSign + 1).trim(), - ]; - if (value === "") { - currentSubSection = name; - } - else { - if (currentSubSection && iniLine.trimStart() === iniLine) { - currentSubSection = undefined; - } - map[currentSection] = map[currentSection] || {}; - const key = currentSubSection ? [currentSubSection, name].join(CONFIG_PREFIX_SEPARATOR) : name; - map[currentSection][key] = value; - } - } + else { + instructions = arg1; } } - return map; -}; - -const swallowError$1 = () => ({}); -const loadSharedConfigFiles = async (init = {}) => { - const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init; - const homeDir = getHomeDir.getHomeDir(); - const relativeHomeDirPrefix = "~/"; - let resolvedFilepath = filepath; - if (filepath.startsWith(relativeHomeDirPrefix)) { - resolvedFilepath = path.join(homeDir, filepath.slice(2)); + for (const key of Object.keys(instructions)) { + if (!Array.isArray(instructions[key])) { + target[key] = instructions[key]; + continue; + } + applyInstruction(target, null, instructions, key); } - let resolvedConfigFilepath = configFilepath; - if (configFilepath.startsWith(relativeHomeDirPrefix)) { - resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2)); + return target; +} +const convertMap = (target) => { + const output = {}; + for (const [k, v] of Object.entries(target || {})) { + output[k] = [, v]; } - const parsedFiles = await Promise.all([ - readFile.readFile(resolvedConfigFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .then(getConfigData) - .catch(swallowError$1), - readFile.readFile(resolvedFilepath, { - ignoreCache: init.ignoreCache, - }) - .then(parseIni) - .catch(swallowError$1), - ]); - return { - configFile: parsedFiles[0], - credentialsFile: parsedFiles[1], - }; + return output; }; - -const getSsoSessionData = (data) => Object.entries(data) - .filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)) - .reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {}); - -const swallowError = () => ({}); -const loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath()) - .then(parseIni) - .then(getSsoSessionData) - .catch(swallowError); - -const mergeConfigFiles = (...files) => { - const merged = {}; - for (const file of files) { - for (const [key, values] of Object.entries(file)) { - if (merged[key] !== undefined) { - Object.assign(merged[key], values); +const take = (source, instructions) => { + const out = {}; + for (const key in instructions) { + applyInstruction(out, source, instructions, key); + } + return out; +}; +const mapWithFilter = (target, filter, instructions) => { + return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { + if (Array.isArray(value)) { + _instructions[key] = value; + } + else { + if (typeof value === "function") { + _instructions[key] = [filter, value()]; } else { - merged[key] = values; + _instructions[key] = [filter, value]; } } + return _instructions; + }, {})); +}; +const applyInstruction = (target, source, instructions, targetKey) => { + if (source !== null) { + let instruction = instructions[targetKey]; + if (typeof instruction === "function") { + instruction = [, instruction]; + } + const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; + if ((typeof filter === "function" && filter(source[sourceKey])) || (typeof filter !== "function" && !!filter)) { + target[targetKey] = valueFn(source[sourceKey]); + } + return; + } + let [filter, value] = instructions[targetKey]; + if (typeof value === "function") { + let _value; + const defaultFilterPassed = filter === undefined && (_value = value()) != null; + const customFilterPassed = (typeof filter === "function" && !!filter(void 0)) || (typeof filter !== "function" && !!filter); + if (defaultFilterPassed) { + target[targetKey] = _value; + } + else if (customFilterPassed) { + target[targetKey] = value(); + } + } + else { + const defaultFilterPassed = filter === undefined && value != null; + const customFilterPassed = (typeof filter === "function" && !!filter(value)) || (typeof filter !== "function" && !!filter); + if (defaultFilterPassed || customFilterPassed) { + target[targetKey] = value; + } } - return merged; }; +const nonNullish = (_) => _ != null; +const pass = (_) => _; -const parseKnownFiles = async (init) => { - const parsedFiles = await loadSharedConfigFiles(init); - return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile); +const serializeFloat = (value) => { + if (value !== value) { + return "NaN"; + } + switch (value) { + case Infinity: + return "Infinity"; + case -Infinity: + return "-Infinity"; + default: + return value; + } }; +const serializeDateTime = (date) => date.toISOString().replace(".000Z", "Z"); -const externalDataInterceptor = { - getFileRecord() { - return readFile.fileIntercept; - }, - interceptFile(path, contents) { - readFile.fileIntercept[path] = Promise.resolve(contents); - }, - getTokenRecord() { - return getSSOTokenFromFile.tokenIntercept; - }, - interceptToken(id, contents) { - getSSOTokenFromFile.tokenIntercept[id] = contents; - }, +const _json = (obj) => { + if (obj == null) { + return {}; + } + if (Array.isArray(obj)) { + return obj.filter((_) => _ != null).map(_json); + } + if (typeof obj === "object") { + const target = {}; + for (const key of Object.keys(obj)) { + if (obj[key] == null) { + continue; + } + target[key] = _json(obj[key]); + } + return target; + } + return obj; }; -Object.defineProperty(exports, "getSSOTokenFromFile", ({ +Object.defineProperty(exports, "collectBody", ({ enumerable: true, - get: function () { return getSSOTokenFromFile.getSSOTokenFromFile; } + get: function () { return protocols.collectBody; } })); -Object.defineProperty(exports, "readFile", ({ +Object.defineProperty(exports, "extendedEncodeURIComponent", ({ enumerable: true, - get: function () { return readFile.readFile; } + get: function () { return protocols.extendedEncodeURIComponent; } })); -exports.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR; -exports.DEFAULT_PROFILE = DEFAULT_PROFILE; -exports.ENV_PROFILE = ENV_PROFILE; -exports.externalDataInterceptor = externalDataInterceptor; -exports.getProfileName = getProfileName; -exports.loadSharedConfigFiles = loadSharedConfigFiles; -exports.loadSsoSessionData = loadSsoSessionData; -exports.parseKnownFiles = parseKnownFiles; -Object.keys(getHomeDir).forEach(function (k) { +Object.defineProperty(exports, "resolvedPath", ({ + enumerable: true, + get: function () { return protocols.resolvedPath; } +})); +exports.Client = Client; +exports.Command = Command; +exports.NoOpLogger = NoOpLogger; +exports.SENSITIVE_STRING = SENSITIVE_STRING; +exports.ServiceException = ServiceException; +exports._json = _json; +exports.convertMap = convertMap; +exports.createAggregatedClient = createAggregatedClient; +exports.decorateServiceException = decorateServiceException; +exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; +exports.getArrayIfSingleItem = getArrayIfSingleItem; +exports.getDefaultClientConfiguration = getDefaultClientConfiguration; +exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration; +exports.getValueFromTextNode = getValueFromTextNode; +exports.isSerializableHeaderValue = isSerializableHeaderValue; +exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode; +exports.map = map; +exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +exports.serializeDateTime = serializeDateTime; +exports.serializeFloat = serializeFloat; +exports.take = take; +exports.throwDefaultError = throwDefaultError; +exports.withBaseException = withBaseException; +Object.keys(serde).forEach(function (k) { if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { enumerable: true, - get: function () { return getHomeDir[k]; } + get: function () { return serde[k]; } }); }); -Object.keys(getSSOTokenFilepath).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getSSOTokenFilepath[k]; } + + +/***/ }), + +/***/ 690: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +exports.HttpAuthLocation = void 0; +(function (HttpAuthLocation) { + HttpAuthLocation["HEADER"] = "header"; + HttpAuthLocation["QUERY"] = "query"; +})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); + +exports.HttpApiKeyAuthLocation = void 0; +(function (HttpApiKeyAuthLocation) { + HttpApiKeyAuthLocation["HEADER"] = "header"; + HttpApiKeyAuthLocation["QUERY"] = "query"; +})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); + +exports.EndpointURLScheme = void 0; +(function (EndpointURLScheme) { + EndpointURLScheme["HTTP"] = "http"; + EndpointURLScheme["HTTPS"] = "https"; +})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); + +exports.AlgorithmId = void 0; +(function (AlgorithmId) { + AlgorithmId["MD5"] = "md5"; + AlgorithmId["CRC32"] = "crc32"; + AlgorithmId["CRC32C"] = "crc32c"; + AlgorithmId["SHA1"] = "sha1"; + AlgorithmId["SHA256"] = "sha256"; +})(exports.AlgorithmId || (exports.AlgorithmId = {})); +const getChecksumConfiguration = (runtimeConfig) => { + const checksumAlgorithms = []; + if (runtimeConfig.sha256 !== undefined) { + checksumAlgorithms.push({ + algorithmId: () => exports.AlgorithmId.SHA256, + checksumConstructor: () => runtimeConfig.sha256, + }); + } + if (runtimeConfig.md5 != undefined) { + checksumAlgorithms.push({ + algorithmId: () => exports.AlgorithmId.MD5, + checksumConstructor: () => runtimeConfig.md5, + }); + } + return { + addChecksumAlgorithm(algo) { + checksumAlgorithms.push(algo); + }, + checksumAlgorithms() { + return checksumAlgorithms; + }, + }; +}; +const resolveChecksumRuntimeConfig = (clientConfig) => { + const runtimeConfig = {}; + clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { + runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); }); -}); + return runtimeConfig; +}; + +const getDefaultClientConfiguration = (runtimeConfig) => { + return getChecksumConfiguration(runtimeConfig); +}; +const resolveDefaultRuntimeConfig = (config) => { + return resolveChecksumRuntimeConfig(config); +}; + +exports.FieldPosition = void 0; +(function (FieldPosition) { + FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; + FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; +})(exports.FieldPosition || (exports.FieldPosition = {})); + +const SMITHY_CONTEXT_KEY = "__smithy_context"; + +exports.IniSectionType = void 0; +(function (IniSectionType) { + IniSectionType["PROFILE"] = "profile"; + IniSectionType["SSO_SESSION"] = "sso-session"; + IniSectionType["SERVICES"] = "services"; +})(exports.IniSectionType || (exports.IniSectionType = {})); + +exports.RequestHandlerProtocol = void 0; +(function (RequestHandlerProtocol) { + RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; + RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; + RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; +})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); + +exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; +exports.getDefaultClientConfiguration = getDefaultClientConfiguration; +exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; /***/ }), -/***/ 6684: +/***/ 4494: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.readFile = exports.fileIntercept = exports.filePromises = void 0; -const promises_1 = __nccwpck_require__(1455); -exports.filePromises = {}; -exports.fileIntercept = {}; -const readFile = (path, options) => { - if (exports.fileIntercept[path] !== undefined) { - return exports.fileIntercept[path]; + +var querystringParser = __nccwpck_require__(8822); + +const parseUrl = (url) => { + if (typeof url === "string") { + return parseUrl(new URL(url)); } - if (!exports.filePromises[path] || options?.ignoreCache) { - exports.filePromises[path] = (0, promises_1.readFile)(path, "utf8"); + const { hostname, pathname, port, protocol, search } = url; + let query; + if (search) { + query = querystringParser.parseQueryString(search); } - return exports.filePromises[path]; + return { + hostname, + port: port ? parseInt(port) : undefined, + protocol, + path: pathname, + query, + }; }; -exports.readFile = readFile; + +exports.parseUrl = parseUrl; /***/ }), -/***/ 5118: +/***/ 2674: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var utilHexEncoding = __nccwpck_require__(6435); -var utilUtf8 = __nccwpck_require__(1577); -var isArrayBuffer = __nccwpck_require__(6130); -var protocolHttp = __nccwpck_require__(2356); -var utilMiddleware = __nccwpck_require__(6324); -var utilUriEscape = __nccwpck_require__(146); - -const ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm"; -const CREDENTIAL_QUERY_PARAM = "X-Amz-Credential"; -const AMZ_DATE_QUERY_PARAM = "X-Amz-Date"; -const SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders"; -const EXPIRES_QUERY_PARAM = "X-Amz-Expires"; -const SIGNATURE_QUERY_PARAM = "X-Amz-Signature"; -const TOKEN_QUERY_PARAM = "X-Amz-Security-Token"; -const REGION_SET_PARAM = "X-Amz-Region-Set"; -const AUTH_HEADER = "authorization"; -const AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase(); -const DATE_HEADER = "date"; -const GENERATED_HEADERS = [AUTH_HEADER, AMZ_DATE_HEADER, DATE_HEADER]; -const SIGNATURE_HEADER = SIGNATURE_QUERY_PARAM.toLowerCase(); -const SHA256_HEADER = "x-amz-content-sha256"; -const TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase(); -const HOST_HEADER = "host"; -const ALWAYS_UNSIGNABLE_HEADERS = { - authorization: true, - "cache-control": true, - connection: true, - expect: true, - from: true, - "keep-alive": true, - "max-forwards": true, - pragma: true, - referer: true, - te: true, - trailer: true, - "transfer-encoding": true, - upgrade: true, - "user-agent": true, - "x-amzn-trace-id": true, -}; -const PROXY_HEADER_PATTERN = /^proxy-/; -const SEC_HEADER_PATTERN = /^sec-/; -const UNSIGNABLE_PATTERNS = [/^proxy-/i, /^sec-/i]; -const ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256"; -const ALGORITHM_IDENTIFIER_V4A = "AWS4-ECDSA-P256-SHA256"; -const EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD"; -const UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD"; -const MAX_CACHE_SIZE = 50; -const KEY_TYPE_IDENTIFIER = "aws4_request"; -const MAX_PRESIGNED_TTL = 60 * 60 * 24 * 7; - -const signingKeyCache = {}; -const cacheQueue = []; -const createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`; -const getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => { - const credsHash = await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId); - const cacheKey = `${shortDate}:${region}:${service}:${utilHexEncoding.toHex(credsHash)}:${credentials.sessionToken}`; - if (cacheKey in signingKeyCache) { - return signingKeyCache[cacheKey]; - } - cacheQueue.push(cacheKey); - while (cacheQueue.length > MAX_CACHE_SIZE) { - delete signingKeyCache[cacheQueue.shift()]; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.fromBase64 = void 0; +const util_buffer_from_1 = __nccwpck_require__(4151); +const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; +const fromBase64 = (input) => { + if ((input.length * 3) % 4 !== 0) { + throw new TypeError(`Incorrect padding on base64 string.`); } - let key = `AWS4${credentials.secretAccessKey}`; - for (const signable of [shortDate, region, service, KEY_TYPE_IDENTIFIER]) { - key = await hmac(sha256Constructor, key, signable); + if (!BASE64_REGEX.exec(input)) { + throw new TypeError(`Invalid base64 string.`); } - return (signingKeyCache[cacheKey] = key); -}; -const clearCredentialCache = () => { - cacheQueue.length = 0; - Object.keys(signingKeyCache).forEach((cacheKey) => { - delete signingKeyCache[cacheKey]; - }); -}; -const hmac = (ctor, secret, data) => { - const hash = new ctor(secret); - hash.update(utilUtf8.toUint8Array(data)); - return hash.digest(); + const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); + return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); }; +exports.fromBase64 = fromBase64; -const getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => { - const canonical = {}; - for (const headerName of Object.keys(headers).sort()) { - if (headers[headerName] == undefined) { - continue; - } - const canonicalHeaderName = headerName.toLowerCase(); - if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || - unsignableHeaders?.has(canonicalHeaderName) || - PROXY_HEADER_PATTERN.test(canonicalHeaderName) || - SEC_HEADER_PATTERN.test(canonicalHeaderName)) { - if (!signableHeaders || (signableHeaders && !signableHeaders.has(canonicalHeaderName))) { - continue; - } - } - canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " "); - } - return canonical; -}; -const getPayloadHash = async ({ headers, body }, hashConstructor) => { - for (const headerName of Object.keys(headers)) { - if (headerName.toLowerCase() === SHA256_HEADER) { - return headers[headerName]; - } - } - if (body == undefined) { - return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855"; - } - else if (typeof body === "string" || ArrayBuffer.isView(body) || isArrayBuffer.isArrayBuffer(body)) { - const hashCtor = new hashConstructor(); - hashCtor.update(utilUtf8.toUint8Array(body)); - return utilHexEncoding.toHex(await hashCtor.digest()); - } - return UNSIGNED_PAYLOAD; -}; +/***/ }), -class HeaderFormatter { - format(headers) { - const chunks = []; - for (const headerName of Object.keys(headers)) { - const bytes = utilUtf8.fromUtf8(headerName); - chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName])); - } - const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0)); - let position = 0; - for (const chunk of chunks) { - out.set(chunk, position); - position += chunk.byteLength; - } - return out; - } - formatHeaderValue(header) { - switch (header.type) { - case "boolean": - return Uint8Array.from([header.value ? 0 : 1]); - case "byte": - return Uint8Array.from([2, header.value]); - case "short": - const shortView = new DataView(new ArrayBuffer(3)); - shortView.setUint8(0, 3); - shortView.setInt16(1, header.value, false); - return new Uint8Array(shortView.buffer); - case "integer": - const intView = new DataView(new ArrayBuffer(5)); - intView.setUint8(0, 4); - intView.setInt32(1, header.value, false); - return new Uint8Array(intView.buffer); - case "long": - const longBytes = new Uint8Array(9); - longBytes[0] = 5; - longBytes.set(header.value.bytes, 1); - return longBytes; - case "binary": - const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength)); - binView.setUint8(0, 6); - binView.setUint16(1, header.value.byteLength, false); - const binBytes = new Uint8Array(binView.buffer); - binBytes.set(header.value, 3); - return binBytes; - case "string": - const utf8Bytes = utilUtf8.fromUtf8(header.value); - const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength)); - strView.setUint8(0, 7); - strView.setUint16(1, utf8Bytes.byteLength, false); - const strBytes = new Uint8Array(strView.buffer); - strBytes.set(utf8Bytes, 3); - return strBytes; - case "timestamp": - const tsBytes = new Uint8Array(9); - tsBytes[0] = 8; - tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1); - return tsBytes; - case "uuid": - if (!UUID_PATTERN.test(header.value)) { - throw new Error(`Invalid UUID received: ${header.value}`); - } - const uuidBytes = new Uint8Array(17); - uuidBytes[0] = 9; - uuidBytes.set(utilHexEncoding.fromHex(header.value.replace(/\-/g, "")), 1); - return uuidBytes; - } - } -} -const UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/; -class Int64 { - bytes; - constructor(bytes) { - this.bytes = bytes; - if (bytes.byteLength !== 8) { - throw new Error("Int64 buffers must be exactly 8 bytes"); - } - } - static fromNumber(number) { - if (number > 9_223_372_036_854_775_807 || number < -9223372036854776e3) { - throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`); - } - const bytes = new Uint8Array(8); - for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) { - bytes[i] = remaining; - } - if (number < 0) { - negate(bytes); - } - return new Int64(bytes); - } - valueOf() { - const bytes = this.bytes.slice(0); - const negative = bytes[0] & 0b10000000; - if (negative) { - negate(bytes); - } - return parseInt(utilHexEncoding.toHex(bytes), 16) * (negative ? -1 : 1); - } - toString() { - return String(this.valueOf()); - } -} -function negate(bytes) { - for (let i = 0; i < 8; i++) { - bytes[i] ^= 0xff; - } - for (let i = 7; i > -1; i--) { - bytes[i]++; - if (bytes[i] !== 0) - break; - } -} +/***/ 8385: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const hasHeader = (soughtHeader, headers) => { - soughtHeader = soughtHeader.toLowerCase(); - for (const headerName of Object.keys(headers)) { - if (soughtHeader === headerName.toLowerCase()) { - return true; - } - } - return false; -}; +"use strict"; -const moveHeadersToQuery = (request, options = {}) => { - const { headers, query = {} } = protocolHttp.HttpRequest.clone(request); - for (const name of Object.keys(headers)) { - const lname = name.toLowerCase(); - if ((lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname)) || - options.hoistableHeaders?.has(lname)) { - query[name] = headers[name]; - delete headers[name]; - } - } - return { - ...request, - headers, - query, - }; -}; -const prepareRequest = (request) => { - request = protocolHttp.HttpRequest.clone(request); - for (const headerName of Object.keys(request.headers)) { - if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) { - delete request.headers[headerName]; - } - } - return request; -}; +var fromBase64 = __nccwpck_require__(2674); +var toBase64 = __nccwpck_require__(4871); -const getCanonicalQuery = ({ query = {} }) => { - const keys = []; - const serialized = {}; - for (const key of Object.keys(query)) { - if (key.toLowerCase() === SIGNATURE_HEADER) { - continue; - } - const encodedKey = utilUriEscape.escapeUri(key); - keys.push(encodedKey); - const value = query[key]; - if (typeof value === "string") { - serialized[encodedKey] = `${encodedKey}=${utilUriEscape.escapeUri(value)}`; - } - else if (Array.isArray(value)) { - serialized[encodedKey] = value - .slice(0) - .reduce((encoded, value) => encoded.concat([`${encodedKey}=${utilUriEscape.escapeUri(value)}`]), []) - .sort() - .join("&"); - } - } - return keys - .sort() - .map((key) => serialized[key]) - .filter((serialized) => serialized) - .join("&"); -}; -const iso8601 = (time) => toDate(time) - .toISOString() - .replace(/\.\d{3}Z$/, "Z"); -const toDate = (time) => { - if (typeof time === "number") { - return new Date(time * 1000); - } - if (typeof time === "string") { - if (Number(time)) { - return new Date(Number(time) * 1000); - } - return new Date(time); - } - return time; -}; -class SignatureV4Base { - service; - regionProvider; - credentialProvider; - sha256; - uriEscapePath; - applyChecksum; - constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { - this.service = service; - this.sha256 = sha256; - this.uriEscapePath = uriEscapePath; - this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true; - this.regionProvider = utilMiddleware.normalizeProvider(region); - this.credentialProvider = utilMiddleware.normalizeProvider(credentials); - } - createCanonicalRequest(request, canonicalHeaders, payloadHash) { - const sortedHeaders = Object.keys(canonicalHeaders).sort(); - return `${request.method} -${this.getCanonicalPath(request)} -${getCanonicalQuery(request)} -${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")} +Object.keys(fromBase64).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return fromBase64[k]; } + }); +}); +Object.keys(toBase64).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return toBase64[k]; } + }); +}); -${sortedHeaders.join(";")} -${payloadHash}`; - } - async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) { - const hash = new this.sha256(); - hash.update(utilUtf8.toUint8Array(canonicalRequest)); - const hashedRequest = await hash.digest(); - return `${algorithmIdentifier} -${longDate} -${credentialScope} -${utilHexEncoding.toHex(hashedRequest)}`; - } - getCanonicalPath({ path }) { - if (this.uriEscapePath) { - const normalizedPathSegments = []; - for (const pathSegment of path.split("/")) { - if (pathSegment?.length === 0) - continue; - if (pathSegment === ".") - continue; - if (pathSegment === "..") { - normalizedPathSegments.pop(); - } - else { - normalizedPathSegments.push(pathSegment); - } - } - const normalizedPath = `${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`; - const doubleEncoded = utilUriEscape.escapeUri(normalizedPath); - return doubleEncoded.replace(/%2F/g, "/"); - } - return path; - } - validateResolvedCredentials(credentials) { - if (typeof credentials !== "object" || - typeof credentials.accessKeyId !== "string" || - typeof credentials.secretAccessKey !== "string") { - throw new Error("Resolved credential object is not valid"); - } - } - formatDate(now) { - const longDate = iso8601(now).replace(/[\-:]/g, ""); - return { - longDate, - shortDate: longDate.slice(0, 8), - }; - } - getCanonicalHeaderList(headers) { - return Object.keys(headers).sort().join(";"); - } -} -class SignatureV4 extends SignatureV4Base { - headerFormatter = new HeaderFormatter(); - constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true, }) { - super({ - applyChecksum, - credentials, - region, - service, - sha256, - uriEscapePath, - }); +/***/ }), + +/***/ 4871: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.toBase64 = void 0; +const util_buffer_from_1 = __nccwpck_require__(4151); +const util_utf8_1 = __nccwpck_require__(1577); +const toBase64 = (_input) => { + let input; + if (typeof _input === "string") { + input = (0, util_utf8_1.fromUtf8)(_input); } - async presign(originalRequest, options = {}) { - const { signingDate = new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService, } = options; - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? (await this.regionProvider()); - const { longDate, shortDate } = this.formatDate(signingDate); - if (expiresIn > MAX_PRESIGNED_TTL) { - return Promise.reject("Signature version 4 presigned URLs" + " must have an expiration date less than one week in" + " the future"); - } - const scope = createScope(shortDate, region, signingService ?? this.service); - const request = moveHeadersToQuery(prepareRequest(originalRequest), { unhoistableHeaders, hoistableHeaders }); - if (credentials.sessionToken) { - request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken; - } - request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER; - request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`; - request.query[AMZ_DATE_QUERY_PARAM] = longDate; - request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10); - const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); - request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders); - request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256))); - return request; + else { + input = _input; + } + if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { + throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); } - async sign(toSign, options) { - if (typeof toSign === "string") { - return this.signString(toSign, options); - } - else if (toSign.headers && toSign.payload) { - return this.signEvent(toSign, options); - } - else if (toSign.message) { - return this.signMessage(toSign, options); + return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); +}; +exports.toBase64 = toBase64; + + +/***/ }), + +/***/ 2098: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; +const calculateBodyLength = (body) => { + if (typeof body === "string") { + if (TEXT_ENCODER) { + return TEXT_ENCODER.encode(body).byteLength; } - else { - return this.signRequest(toSign, options); + let len = body.length; + for (let i = len - 1; i >= 0; i--) { + const code = body.charCodeAt(i); + if (code > 0x7f && code <= 0x7ff) + len++; + else if (code > 0x7ff && code <= 0xffff) + len += 2; + if (code >= 0xdc00 && code <= 0xdfff) + i--; } + return len; } - async signEvent({ headers, payload }, { signingDate = new Date(), priorSignature, signingRegion, signingService }) { - const region = signingRegion ?? (await this.regionProvider()); - const { shortDate, longDate } = this.formatDate(signingDate); - const scope = createScope(shortDate, region, signingService ?? this.service); - const hashedPayload = await getPayloadHash({ headers: {}, body: payload }, this.sha256); - const hash = new this.sha256(); - hash.update(headers); - const hashedHeaders = utilHexEncoding.toHex(await hash.digest()); - const stringToSign = [ - EVENT_ALGORITHM_IDENTIFIER, - longDate, - scope, - priorSignature, - hashedHeaders, - hashedPayload, - ].join("\n"); - return this.signString(stringToSign, { signingDate, signingRegion: region, signingService }); + else if (typeof body.byteLength === "number") { + return body.byteLength; } - async signMessage(signableMessage, { signingDate = new Date(), signingRegion, signingService }) { - const promise = this.signEvent({ - headers: this.headerFormatter.format(signableMessage.message.headers), - payload: signableMessage.message.body, - }, { - signingDate, - signingRegion, - signingService, - priorSignature: signableMessage.priorSignature, - }); - return promise.then((signature) => { - return { message: signableMessage.message, signature }; - }); + else if (typeof body.size === "number") { + return body.size; } - async signString(stringToSign, { signingDate = new Date(), signingRegion, signingService } = {}) { - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? (await this.regionProvider()); - const { shortDate } = this.formatDate(signingDate); - const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService)); - hash.update(utilUtf8.toUint8Array(stringToSign)); - return utilHexEncoding.toHex(await hash.digest()); + throw new Error(`Body Length computation failed for ${body}`); +}; + +exports.calculateBodyLength = calculateBodyLength; + + +/***/ }), + +/***/ 3638: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var node_fs = __nccwpck_require__(3024); + +const calculateBodyLength = (body) => { + if (!body) { + return 0; } - async signRequest(requestToSign, { signingDate = new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService, } = {}) { - const credentials = await this.credentialProvider(); - this.validateResolvedCredentials(credentials); - const region = signingRegion ?? (await this.regionProvider()); - const request = prepareRequest(requestToSign); - const { longDate, shortDate } = this.formatDate(signingDate); - const scope = createScope(shortDate, region, signingService ?? this.service); - request.headers[AMZ_DATE_HEADER] = longDate; - if (credentials.sessionToken) { - request.headers[TOKEN_HEADER] = credentials.sessionToken; + if (typeof body === "string") { + return Buffer.byteLength(body); + } + else if (typeof body.byteLength === "number") { + return body.byteLength; + } + else if (typeof body.size === "number") { + return body.size; + } + else if (typeof body.start === "number" && typeof body.end === "number") { + return body.end + 1 - body.start; + } + else if (body instanceof node_fs.ReadStream) { + if (body.path != null) { + return node_fs.lstatSync(body.path).size; } - const payloadHash = await getPayloadHash(request, this.sha256); - if (!hasHeader(SHA256_HEADER, request.headers) && this.applyChecksum) { - request.headers[SHA256_HEADER] = payloadHash; + else if (typeof body.fd === "number") { + return node_fs.fstatSync(body.fd).size; } - const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders); - const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash)); - request.headers[AUTH_HEADER] = - `${ALGORITHM_IDENTIFIER} ` + - `Credential=${credentials.accessKeyId}/${scope}, ` + - `SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, ` + - `Signature=${signature}`; - return request; } - async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) { - const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER); - const hash = new this.sha256(await keyPromise); - hash.update(utilUtf8.toUint8Array(stringToSign)); - return utilHexEncoding.toHex(await hash.digest()); + throw new Error(`Body Length computation failed for ${body}`); +}; + +exports.calculateBodyLength = calculateBodyLength; + + +/***/ }), + +/***/ 4151: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var isArrayBuffer = __nccwpck_require__(6130); +var buffer = __nccwpck_require__(181); + +const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { + if (!isArrayBuffer.isArrayBuffer(input)) { + throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); } - getSigningKey(credentials, region, shortDate, service) { - return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service); + return buffer.Buffer.from(input, offset, length); +}; +const fromString = (input, encoding) => { + if (typeof input !== "string") { + throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); } -} + return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input); +}; -const signatureV4aContainer = { - SignatureV4a: null, +exports.fromArrayBuffer = fromArrayBuffer; +exports.fromString = fromString; + + +/***/ }), + +/***/ 6716: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + + +const booleanSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + if (obj[key] === "true") + return true; + if (obj[key] === "false") + return false; + throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); }; -exports.ALGORITHM_IDENTIFIER = ALGORITHM_IDENTIFIER; -exports.ALGORITHM_IDENTIFIER_V4A = ALGORITHM_IDENTIFIER_V4A; -exports.ALGORITHM_QUERY_PARAM = ALGORITHM_QUERY_PARAM; -exports.ALWAYS_UNSIGNABLE_HEADERS = ALWAYS_UNSIGNABLE_HEADERS; -exports.AMZ_DATE_HEADER = AMZ_DATE_HEADER; -exports.AMZ_DATE_QUERY_PARAM = AMZ_DATE_QUERY_PARAM; -exports.AUTH_HEADER = AUTH_HEADER; -exports.CREDENTIAL_QUERY_PARAM = CREDENTIAL_QUERY_PARAM; -exports.DATE_HEADER = DATE_HEADER; -exports.EVENT_ALGORITHM_IDENTIFIER = EVENT_ALGORITHM_IDENTIFIER; -exports.EXPIRES_QUERY_PARAM = EXPIRES_QUERY_PARAM; -exports.GENERATED_HEADERS = GENERATED_HEADERS; -exports.HOST_HEADER = HOST_HEADER; -exports.KEY_TYPE_IDENTIFIER = KEY_TYPE_IDENTIFIER; -exports.MAX_CACHE_SIZE = MAX_CACHE_SIZE; -exports.MAX_PRESIGNED_TTL = MAX_PRESIGNED_TTL; -exports.PROXY_HEADER_PATTERN = PROXY_HEADER_PATTERN; -exports.REGION_SET_PARAM = REGION_SET_PARAM; -exports.SEC_HEADER_PATTERN = SEC_HEADER_PATTERN; -exports.SHA256_HEADER = SHA256_HEADER; -exports.SIGNATURE_HEADER = SIGNATURE_HEADER; -exports.SIGNATURE_QUERY_PARAM = SIGNATURE_QUERY_PARAM; -exports.SIGNED_HEADERS_QUERY_PARAM = SIGNED_HEADERS_QUERY_PARAM; -exports.SignatureV4 = SignatureV4; -exports.SignatureV4Base = SignatureV4Base; -exports.TOKEN_HEADER = TOKEN_HEADER; -exports.TOKEN_QUERY_PARAM = TOKEN_QUERY_PARAM; -exports.UNSIGNABLE_PATTERNS = UNSIGNABLE_PATTERNS; -exports.UNSIGNED_PAYLOAD = UNSIGNED_PAYLOAD; -exports.clearCredentialCache = clearCredentialCache; -exports.createScope = createScope; -exports.getCanonicalHeaders = getCanonicalHeaders; -exports.getCanonicalQuery = getCanonicalQuery; -exports.getPayloadHash = getPayloadHash; -exports.getSigningKey = getSigningKey; -exports.hasHeader = hasHeader; -exports.moveHeadersToQuery = moveHeadersToQuery; -exports.prepareRequest = prepareRequest; -exports.signatureV4aContainer = signatureV4aContainer; +const numberSelector = (obj, key, type) => { + if (!(key in obj)) + return undefined; + const numberValue = parseInt(obj[key], 10); + if (Number.isNaN(numberValue)) { + throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); + } + return numberValue; +}; + +exports.SelectorType = void 0; +(function (SelectorType) { + SelectorType["ENV"] = "env"; + SelectorType["CONFIG"] = "shared config entry"; +})(exports.SelectorType || (exports.SelectorType = {})); + +exports.booleanSelector = booleanSelector; +exports.numberSelector = numberSelector; /***/ }), -/***/ 1411: +/***/ 5435: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var middlewareStack = __nccwpck_require__(9208); -var protocols = __nccwpck_require__(3422); -var types = __nccwpck_require__(690); -var schema = __nccwpck_require__(6890); -var serde = __nccwpck_require__(2430); +var configResolver = __nccwpck_require__(9316); +var nodeConfigProvider = __nccwpck_require__(5704); +var propertyProvider = __nccwpck_require__(8857); -class Client { - config; - middlewareStack = middlewareStack.constructStack(); - initConfig; - handlers; - constructor(config) { - this.config = config; +const AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; +const AWS_REGION_ENV = "AWS_REGION"; +const AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; +const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; +const DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; +const IMDS_REGION_PATH = "/latest/meta-data/placement/region"; + +const AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; +const AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; +const NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { + environmentVariableSelector: (env) => { + return env[AWS_DEFAULTS_MODE_ENV]; + }, + configFileSelector: (profile) => { + return profile[AWS_DEFAULTS_MODE_CONFIG]; + }, + default: "legacy", +}; + +const resolveDefaultsModeConfig = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS), } = {}) => propertyProvider.memoize(async () => { + const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; + switch (mode?.toLowerCase()) { + case "auto": + return resolveNodeDefaultsModeAuto(region); + case "in-region": + case "cross-region": + case "mobile": + case "standard": + case "legacy": + return Promise.resolve(mode?.toLocaleLowerCase()); + case undefined: + return Promise.resolve("legacy"); + default: + throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); } - send(command, optionsOrCb, cb) { - const options = typeof optionsOrCb !== "function" ? optionsOrCb : undefined; - const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb; - const useHandlerCache = options === undefined && this.config.cacheMiddleware === true; - let handler; - if (useHandlerCache) { - if (!this.handlers) { - this.handlers = new WeakMap(); - } - const handlers = this.handlers; - if (handlers.has(command.constructor)) { - handler = handlers.get(command.constructor); - } - else { - handler = command.resolveMiddleware(this.middlewareStack, this.config, options); - handlers.set(command.constructor, handler); - } - } - else { - delete this.handlers; - handler = command.resolveMiddleware(this.middlewareStack, this.config, options); +}); +const resolveNodeDefaultsModeAuto = async (clientRegion) => { + if (clientRegion) { + const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; + const inferredRegion = await inferPhysicalRegion(); + if (!inferredRegion) { + return "standard"; } - if (callback) { - handler(command) - .then((result) => callback(null, result.output), (err) => callback(err)) - .catch(() => { }); + if (resolvedRegion === inferredRegion) { + return "in-region"; } else { - return handler(command).then((result) => result.output); + return "cross-region"; } } - destroy() { - this.config?.requestHandler?.destroy?.(); - delete this.handlers; - } -} - -const SENSITIVE_STRING$1 = "***SensitiveInformation***"; -function schemaLogFilter(schema$1, data) { - if (data == null) { - return data; - } - const ns = schema.NormalizedSchema.of(schema$1); - if (ns.getMergedTraits().sensitive) { - return SENSITIVE_STRING$1; + return "standard"; +}; +const inferPhysicalRegion = async () => { + if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { + return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; } - if (ns.isListSchema()) { - const isSensitive = !!ns.getValueSchema().getMergedTraits().sensitive; - if (isSensitive) { - return SENSITIVE_STRING$1; + if (!process.env[ENV_IMDS_DISABLED]) { + try { + const { getInstanceMetadataEndpoint, httpRequest } = await __nccwpck_require__.e(/* import() */ 566).then(__nccwpck_require__.t.bind(__nccwpck_require__, 566, 19)); + const endpoint = await getInstanceMetadataEndpoint(); + return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + } + catch (e) { } } - else if (ns.isMapSchema()) { - const isSensitive = !!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive; - if (isSensitive) { - return SENSITIVE_STRING$1; +}; + +exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; + + +/***/ }), + +/***/ 9674: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var types = __nccwpck_require__(690); + +class EndpointCache { + capacity; + data = new Map(); + parameters = []; + constructor({ size, params }) { + this.capacity = size ?? 50; + if (params) { + this.parameters = params; } } - else if (ns.isStructSchema() && typeof data === "object") { - const object = data; - const newObject = {}; - for (const [member, memberNs] of ns.structIterator()) { - if (object[member] != null) { - newObject[member] = schemaLogFilter(memberNs, object[member]); + get(endpointParams, resolver) { + const key = this.hash(endpointParams); + if (key === false) { + return resolver(); + } + if (!this.data.has(key)) { + if (this.data.size > this.capacity + 10) { + const keys = this.data.keys(); + let i = 0; + while (true) { + const { value, done } = keys.next(); + this.data.delete(value); + if (done || ++i > 10) { + break; + } + } } + this.data.set(key, resolver()); } - return newObject; + return this.data.get(key); } - return data; -} - -class Command { - middlewareStack = middlewareStack.constructStack(); - schema; - static classBuilder() { - return new ClassBuilder(); + size() { + return this.data.size; } - resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor, }) { - for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) { - this.middlewareStack.use(mw); + hash(endpointParams) { + let buffer = ""; + const { parameters } = this; + if (parameters.length === 0) { + return false; } - const stack = clientStack.concat(this.middlewareStack); - const { logger } = configuration; - const handlerExecutionContext = { - logger, - clientName, - commandName, - inputFilterSensitiveLog, - outputFilterSensitiveLog, - [types.SMITHY_CONTEXT_KEY]: { - commandInstance: this, - ...smithyContext, - }, - ...additionalContext, - }; - const { requestHandler } = configuration; - return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext); + for (const param of parameters) { + const val = String(endpointParams[param] ?? ""); + if (val.includes("|;")) { + return false; + } + buffer += val + "|;"; + } + return buffer; } } -class ClassBuilder { - _init = () => { }; - _ep = {}; - _middlewareFn = () => []; - _commandName = ""; - _clientName = ""; - _additionalContext = {}; - _smithyContext = {}; - _inputFilterSensitiveLog = undefined; - _outputFilterSensitiveLog = undefined; - _serializer = null; - _deserializer = null; - _operationSchema; - init(cb) { - this._init = cb; - } - ep(endpointParameterInstructions) { - this._ep = endpointParameterInstructions; - return this; - } - m(middlewareSupplier) { - this._middlewareFn = middlewareSupplier; - return this; - } - s(service, operation, smithyContext = {}) { - this._smithyContext = { - service, - operation, - ...smithyContext, - }; - return this; - } - c(additionalContext = {}) { - this._additionalContext = additionalContext; - return this; - } - n(clientName, commandName) { - this._clientName = clientName; - this._commandName = commandName; - return this; + +const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); +const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith("[") && value.endsWith("]")); + +const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); +const isValidHostLabel = (value, allowSubDomains = false) => { + if (!allowSubDomains) { + return VALID_HOST_LABEL_REGEX.test(value); } - f(inputFilter = (_) => _, outputFilter = (_) => _) { - this._inputFilterSensitiveLog = inputFilter; - this._outputFilterSensitiveLog = outputFilter; - return this; + const labels = value.split("."); + for (const label of labels) { + if (!isValidHostLabel(label)) { + return false; + } } - ser(serializer) { - this._serializer = serializer; - return this; + return true; +}; + +const customEndpointFunctions = {}; + +const debugId = "endpoints"; + +function toDebugString(input) { + if (typeof input !== "object" || input == null) { + return input; } - de(deserializer) { - this._deserializer = deserializer; - return this; + if ("ref" in input) { + return `$${toDebugString(input.ref)}`; } - sc(operation) { - this._operationSchema = operation; - this._smithyContext.operationSchema = operation; - return this; + if ("fn" in input) { + return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; } - build() { - const closure = this; - let CommandRef; - return (CommandRef = class extends Command { - input; - static getEndpointParameterInstructions() { - return closure._ep; - } - constructor(...[input]) { - super(); - this.input = input ?? {}; - closure._init(this); - this.schema = closure._operationSchema; - } - resolveMiddleware(stack, configuration, options) { - const op = closure._operationSchema; - const input = op?.[4] ?? op?.input; - const output = op?.[5] ?? op?.output; - return this.resolveMiddlewareWithContext(stack, configuration, options, { - CommandCtor: CommandRef, - middlewareFn: closure._middlewareFn, - clientName: closure._clientName, - commandName: closure._commandName, - inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _), - outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _), - smithyContext: closure._smithyContext, - additionalContext: closure._additionalContext, - }); - } - serialize = closure._serializer; - deserialize = closure._deserializer; - }); + return JSON.stringify(input, null, 2); +} + +class EndpointError extends Error { + constructor(message) { + super(message); + this.name = "EndpointError"; } } -const SENSITIVE_STRING = "***SensitiveInformation***"; +const booleanEquals = (value1, value2) => value1 === value2; -const createAggregatedClient = (commands, Client) => { - for (const command of Object.keys(commands)) { - const CommandCtor = commands[command]; - const methodImpl = async function (args, optionsOrCb, cb) { - const command = new CommandCtor(args); - if (typeof optionsOrCb === "function") { - this.send(command, optionsOrCb); +const getAttrPathList = (path) => { + const parts = path.split("."); + const pathList = []; + for (const part of parts) { + const squareBracketIndex = part.indexOf("["); + if (squareBracketIndex !== -1) { + if (part.indexOf("]") !== part.length - 1) { + throw new EndpointError(`Path: '${path}' does not end with ']'`); } - else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); - this.send(command, optionsOrCb || {}, cb); + const arrayIndex = part.slice(squareBracketIndex + 1, -1); + if (Number.isNaN(parseInt(arrayIndex))) { + throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); } - else { - return this.send(command, optionsOrCb); + if (squareBracketIndex !== 0) { + pathList.push(part.slice(0, squareBracketIndex)); } - }; - const methodName = (command[0].toLowerCase() + command.slice(1)).replace(/Command$/, ""); - Client.prototype[methodName] = methodImpl; + pathList.push(arrayIndex); + } + else { + pathList.push(part); + } } + return pathList; }; -class ServiceException extends Error { - $fault; - $response; - $retryable; - $metadata; - constructor(options) { - super(options.message); - Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype); - this.name = options.name; - this.$fault = options.$fault; - this.$metadata = options.$metadata; +const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => { + if (typeof acc !== "object") { + throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); } - static isInstance(value) { - if (!value) - return false; - const candidate = value; - return (ServiceException.prototype.isPrototypeOf(candidate) || - (Boolean(candidate.$fault) && - Boolean(candidate.$metadata) && - (candidate.$fault === "client" || candidate.$fault === "server"))); + else if (Array.isArray(acc)) { + return acc[parseInt(index)]; } - static [Symbol.hasInstance](instance) { - if (!instance) - return false; - const candidate = instance; - if (this === ServiceException) { - return ServiceException.isInstance(instance); - } - if (ServiceException.isInstance(instance)) { - if (candidate.name && this.name) { - return this.prototype.isPrototypeOf(instance) || candidate.name === this.name; + return acc[index]; +}, value); + +const isSet = (value) => value != null; + +const not = (value) => !value; + +const DEFAULT_PORTS = { + [types.EndpointURLScheme.HTTP]: 80, + [types.EndpointURLScheme.HTTPS]: 443, +}; +const parseURL = (value) => { + const whatwgURL = (() => { + try { + if (value instanceof URL) { + return value; } - return this.prototype.isPrototypeOf(instance); + if (typeof value === "object" && "hostname" in value) { + const { hostname, port, protocol = "", path = "", query = {} } = value; + const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : ""}${path}`); + url.search = Object.entries(query) + .map(([k, v]) => `${k}=${v}`) + .join("&"); + return url; + } + return new URL(value); } - return false; - } -} -const decorateServiceException = (exception, additions = {}) => { - Object.entries(additions) - .filter(([, v]) => v !== undefined) - .forEach(([k, v]) => { - if (exception[k] == undefined || exception[k] === "") { - exception[k] = v; + catch (error) { + return null; } - }); - const message = exception.message || exception.Message || "UnknownError"; - exception.message = message; - delete exception.Message; - return exception; -}; - -const throwDefaultError = ({ output, parsedBody, exceptionCtor, errorCode }) => { - const $metadata = deserializeMetadata(output); - const statusCode = $metadata.httpStatusCode ? $metadata.httpStatusCode + "" : undefined; - const response = new exceptionCtor({ - name: parsedBody?.code || parsedBody?.Code || errorCode || statusCode || "UnknownError", - $fault: "client", - $metadata, - }); - throw decorateServiceException(response, parsedBody); -}; -const withBaseException = (ExceptionCtor) => { - return ({ output, parsedBody, errorCode }) => { - throwDefaultError({ output, parsedBody, exceptionCtor: ExceptionCtor, errorCode }); + })(); + if (!whatwgURL) { + console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); + return null; + } + const urlString = whatwgURL.href; + const { host, hostname, pathname, protocol, search } = whatwgURL; + if (search) { + return null; + } + const scheme = protocol.slice(0, -1); + if (!Object.values(types.EndpointURLScheme).includes(scheme)) { + return null; + } + const isIp = isIpAddress(hostname); + const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || + (typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`)); + const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; + return { + scheme, + authority, + path: pathname, + normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, + isIp, }; }; -const deserializeMetadata = (output) => ({ - httpStatusCode: output.statusCode, - requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"], - extendedRequestId: output.headers["x-amz-id-2"], - cfId: output.headers["x-amz-cf-id"], -}); -const loadConfigsForDefaultMode = (mode) => { - switch (mode) { - case "standard": - return { - retryMode: "standard", - connectionTimeout: 3100, - }; - case "in-region": - return { - retryMode: "standard", - connectionTimeout: 1100, - }; - case "cross-region": - return { - retryMode: "standard", - connectionTimeout: 3100, - }; - case "mobile": - return { - retryMode: "standard", - connectionTimeout: 30000, - }; - default: - return {}; +const stringEquals = (value1, value2) => value1 === value2; + +const substring = (input, start, stop, reverse) => { + if (start >= stop || input.length < stop) { + return null; } + if (!reverse) { + return input.substring(start, stop); + } + return input.substring(input.length - stop, input.length - start); }; -let warningEmitted = false; -const emitWarningIfUnsupportedVersion = (version) => { - if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) { - warningEmitted = true; - } +const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); + +const endpointFunctions = { + booleanEquals, + getAttr, + isSet, + isValidHostLabel, + not, + parseURL, + stringEquals, + substring, + uriEncode, }; -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - for (const id in types.AlgorithmId) { - const algorithmId = types.AlgorithmId[id]; - if (runtimeConfig[algorithmId] === undefined) { - continue; +const evaluateTemplate = (template, options) => { + const evaluatedTemplateArr = []; + const templateContext = { + ...options.endpointParams, + ...options.referenceRecord, + }; + let currentIndex = 0; + while (currentIndex < template.length) { + const openingBraceIndex = template.indexOf("{", currentIndex); + if (openingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(currentIndex)); + break; } - checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId], - }); + evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); + const closingBraceIndex = template.indexOf("}", openingBraceIndex); + if (closingBraceIndex === -1) { + evaluatedTemplateArr.push(template.slice(openingBraceIndex)); + break; + } + if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { + evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); + currentIndex = closingBraceIndex + 2; + } + const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); + if (parameterName.includes("#")) { + const [refName, attrName] = parameterName.split("#"); + evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); + } + else { + evaluatedTemplateArr.push(templateContext[parameterName]); + } + currentIndex = closingBraceIndex + 1; } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; + return evaluatedTemplateArr.join(""); }; -const getRetryConfiguration = (runtimeConfig) => { - return { - setRetryStrategy(retryStrategy) { - runtimeConfig.retryStrategy = retryStrategy; - }, - retryStrategy() { - return runtimeConfig.retryStrategy; - }, +const getReferenceValue = ({ ref }, options) => { + const referenceRecord = { + ...options.endpointParams, + ...options.referenceRecord, }; -}; -const resolveRetryRuntimeConfig = (retryStrategyConfiguration) => { - const runtimeConfig = {}; - runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy(); - return runtimeConfig; + return referenceRecord[ref]; }; -const getDefaultExtensionConfiguration = (runtimeConfig) => { - return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig)); +const evaluateExpression = (obj, keyName, options) => { + if (typeof obj === "string") { + return evaluateTemplate(obj, options); + } + else if (obj["fn"]) { + return group$2.callFunction(obj, options); + } + else if (obj["ref"]) { + return getReferenceValue(obj, options); + } + throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); }; -const getDefaultClientConfiguration = getDefaultExtensionConfiguration; -const resolveDefaultRuntimeConfig = (config) => { - return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config)); +const callFunction = ({ fn, argv }, options) => { + const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options)); + const fnSegments = fn.split("."); + if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { + return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); + } + return endpointFunctions[fn](...evaluatedArgs); +}; +const group$2 = { + evaluateExpression, + callFunction, }; -const getArrayIfSingleItem = (mayBeArray) => Array.isArray(mayBeArray) ? mayBeArray : [mayBeArray]; +const evaluateCondition = ({ assign, ...fnArgs }, options) => { + if (assign && assign in options.referenceRecord) { + throw new EndpointError(`'${assign}' is already defined in Reference Record.`); + } + const value = callFunction(fnArgs, options); + options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); + return { + result: value === "" ? true : !!value, + ...(assign != null && { toAssign: { name: assign, value } }), + }; +}; -const getValueFromTextNode = (obj) => { - const textNodeName = "#text"; - for (const key in obj) { - if (obj.hasOwnProperty(key) && obj[key][textNodeName] !== undefined) { - obj[key] = obj[key][textNodeName]; +const evaluateConditions = (conditions = [], options) => { + const conditionsReferenceRecord = {}; + for (const condition of conditions) { + const { result, toAssign } = evaluateCondition(condition, { + ...options, + referenceRecord: { + ...options.referenceRecord, + ...conditionsReferenceRecord, + }, + }); + if (!result) { + return { result }; } - else if (typeof obj[key] === "object" && obj[key] !== null) { - obj[key] = getValueFromTextNode(obj[key]); + if (toAssign) { + conditionsReferenceRecord[toAssign.name] = toAssign.value; + options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); } } - return obj; -}; - -const isSerializableHeaderValue = (value) => { - return value != null; + return { result: true, referenceRecord: conditionsReferenceRecord }; }; -class NoOpLogger { - trace() { } - debug() { } - info() { } - warn() { } - error() { } -} +const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ + ...acc, + [headerKey]: headerVal.map((headerValEntry) => { + const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); + if (typeof processedExpr !== "string") { + throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); + } + return processedExpr; + }), +}), {}); -function map(arg0, arg1, arg2) { - let target; - let filter; - let instructions; - if (typeof arg1 === "undefined" && typeof arg2 === "undefined") { - target = {}; - instructions = arg0; +const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ + ...acc, + [propertyKey]: group$1.getEndpointProperty(propertyVal, options), +}), {}); +const getEndpointProperty = (property, options) => { + if (Array.isArray(property)) { + return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); } - else { - target = arg0; - if (typeof arg1 === "function") { - filter = arg1; - instructions = arg2; - return mapWithFilter(target, filter, instructions); - } - else { - instructions = arg1; - } + switch (typeof property) { + case "string": + return evaluateTemplate(property, options); + case "object": + if (property === null) { + throw new EndpointError(`Unexpected endpoint property: ${property}`); + } + return group$1.getEndpointProperties(property, options); + case "boolean": + return property; + default: + throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); } - for (const key of Object.keys(instructions)) { - if (!Array.isArray(instructions[key])) { - target[key] = instructions[key]; - continue; +}; +const group$1 = { + getEndpointProperty, + getEndpointProperties, +}; + +const getEndpointUrl = (endpointUrl, options) => { + const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); + if (typeof expression === "string") { + try { + return new URL(expression); + } + catch (error) { + console.error(`Failed to construct URL with ${expression}`, error); + throw error; } - applyInstruction(target, null, instructions, key); } - return target; -} -const convertMap = (target) => { - const output = {}; - for (const [k, v] of Object.entries(target || {})) { - output[k] = [, v]; + throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); +}; + +const evaluateEndpointRule = (endpointRule, options) => { + const { conditions, endpoint } = endpointRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; } - return output; + const endpointRuleOptions = { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }; + const { url, properties, headers } = endpoint; + options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); + return { + ...(headers != undefined && { + headers: getEndpointHeaders(headers, endpointRuleOptions), + }), + ...(properties != undefined && { + properties: getEndpointProperties(properties, endpointRuleOptions), + }), + url: getEndpointUrl(url, endpointRuleOptions), + }; }; -const take = (source, instructions) => { - const out = {}; - for (const key in instructions) { - applyInstruction(out, source, instructions, key); + +const evaluateErrorRule = (errorRule, options) => { + const { conditions, error } = errorRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; } - return out; + throw new EndpointError(evaluateExpression(error, "Error", { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + })); }; -const mapWithFilter = (target, filter, instructions) => { - return map(target, Object.entries(instructions).reduce((_instructions, [key, value]) => { - if (Array.isArray(value)) { - _instructions[key] = value; - } - else { - if (typeof value === "function") { - _instructions[key] = [filter, value()]; - } - else { - _instructions[key] = [filter, value]; + +const evaluateRules = (rules, options) => { + for (const rule of rules) { + if (rule.type === "endpoint") { + const endpointOrUndefined = evaluateEndpointRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; } } - return _instructions; - }, {})); -}; -const applyInstruction = (target, source, instructions, targetKey) => { - if (source !== null) { - let instruction = instructions[targetKey]; - if (typeof instruction === "function") { - instruction = [, instruction]; - } - const [filter = nonNullish, valueFn = pass, sourceKey = targetKey] = instruction; - if ((typeof filter === "function" && filter(source[sourceKey])) || (typeof filter !== "function" && !!filter)) { - target[targetKey] = valueFn(source[sourceKey]); - } - return; - } - let [filter, value] = instructions[targetKey]; - if (typeof value === "function") { - let _value; - const defaultFilterPassed = filter === undefined && (_value = value()) != null; - const customFilterPassed = (typeof filter === "function" && !!filter(void 0)) || (typeof filter !== "function" && !!filter); - if (defaultFilterPassed) { - target[targetKey] = _value; + else if (rule.type === "error") { + evaluateErrorRule(rule, options); } - else if (customFilterPassed) { - target[targetKey] = value(); + else if (rule.type === "tree") { + const endpointOrUndefined = group.evaluateTreeRule(rule, options); + if (endpointOrUndefined) { + return endpointOrUndefined; + } } - } - else { - const defaultFilterPassed = filter === undefined && value != null; - const customFilterPassed = (typeof filter === "function" && !!filter(value)) || (typeof filter !== "function" && !!filter); - if (defaultFilterPassed || customFilterPassed) { - target[targetKey] = value; + else { + throw new EndpointError(`Unknown endpoint rule: ${rule}`); } } + throw new EndpointError(`Rules evaluation failed`); }; -const nonNullish = (_) => _ != null; -const pass = (_) => _; - -const serializeFloat = (value) => { - if (value !== value) { - return "NaN"; - } - switch (value) { - case Infinity: - return "Infinity"; - case -Infinity: - return "-Infinity"; - default: - return value; +const evaluateTreeRule = (treeRule, options) => { + const { conditions, rules } = treeRule; + const { result, referenceRecord } = evaluateConditions(conditions, options); + if (!result) { + return; } + return group.evaluateRules(rules, { + ...options, + referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + }); +}; +const group = { + evaluateRules, + evaluateTreeRule, }; -const serializeDateTime = (date) => date.toISOString().replace(".000Z", "Z"); -const _json = (obj) => { - if (obj == null) { - return {}; - } - if (Array.isArray(obj)) { - return obj.filter((_) => _ != null).map(_json); +const resolveEndpoint = (ruleSetObject, options) => { + const { endpointParams, logger } = options; + const { parameters, rules } = ruleSetObject; + options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); + const paramsWithDefault = Object.entries(parameters) + .filter(([, v]) => v.default != null) + .map(([k, v]) => [k, v.default]); + if (paramsWithDefault.length > 0) { + for (const [paramKey, paramDefaultValue] of paramsWithDefault) { + endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; + } } - if (typeof obj === "object") { - const target = {}; - for (const key of Object.keys(obj)) { - if (obj[key] == null) { - continue; - } - target[key] = _json(obj[key]); + const requiredParams = Object.entries(parameters) + .filter(([, v]) => v.required) + .map(([k]) => k); + for (const requiredParam of requiredParams) { + if (endpointParams[requiredParam] == null) { + throw new EndpointError(`Missing required parameter: '${requiredParam}'`); } - return target; } - return obj; + const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); + options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); + return endpoint; }; -Object.defineProperty(exports, "collectBody", ({ - enumerable: true, - get: function () { return protocols.collectBody; } -})); -Object.defineProperty(exports, "extendedEncodeURIComponent", ({ - enumerable: true, - get: function () { return protocols.extendedEncodeURIComponent; } -})); -Object.defineProperty(exports, "resolvedPath", ({ - enumerable: true, - get: function () { return protocols.resolvedPath; } -})); -exports.Client = Client; -exports.Command = Command; -exports.NoOpLogger = NoOpLogger; -exports.SENSITIVE_STRING = SENSITIVE_STRING; -exports.ServiceException = ServiceException; -exports._json = _json; -exports.convertMap = convertMap; -exports.createAggregatedClient = createAggregatedClient; -exports.decorateServiceException = decorateServiceException; -exports.emitWarningIfUnsupportedVersion = emitWarningIfUnsupportedVersion; -exports.getArrayIfSingleItem = getArrayIfSingleItem; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.getDefaultExtensionConfiguration = getDefaultExtensionConfiguration; -exports.getValueFromTextNode = getValueFromTextNode; -exports.isSerializableHeaderValue = isSerializableHeaderValue; -exports.loadConfigsForDefaultMode = loadConfigsForDefaultMode; -exports.map = map; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; -exports.serializeDateTime = serializeDateTime; -exports.serializeFloat = serializeFloat; -exports.take = take; -exports.throwDefaultError = throwDefaultError; -exports.withBaseException = withBaseException; -Object.keys(serde).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return serde[k]; } - }); -}); +exports.EndpointCache = EndpointCache; +exports.EndpointError = EndpointError; +exports.customEndpointFunctions = customEndpointFunctions; +exports.isIpAddress = isIpAddress; +exports.isValidHostLabel = isValidHostLabel; +exports.resolveEndpoint = resolveEndpoint; /***/ }), -/***/ 690: +/***/ 6435: /***/ ((__unused_webpack_module, exports) => { "use strict"; -exports.HttpAuthLocation = void 0; -(function (HttpAuthLocation) { - HttpAuthLocation["HEADER"] = "header"; - HttpAuthLocation["QUERY"] = "query"; -})(exports.HttpAuthLocation || (exports.HttpAuthLocation = {})); - -exports.HttpApiKeyAuthLocation = void 0; -(function (HttpApiKeyAuthLocation) { - HttpApiKeyAuthLocation["HEADER"] = "header"; - HttpApiKeyAuthLocation["QUERY"] = "query"; -})(exports.HttpApiKeyAuthLocation || (exports.HttpApiKeyAuthLocation = {})); - -exports.EndpointURLScheme = void 0; -(function (EndpointURLScheme) { - EndpointURLScheme["HTTP"] = "http"; - EndpointURLScheme["HTTPS"] = "https"; -})(exports.EndpointURLScheme || (exports.EndpointURLScheme = {})); - -exports.AlgorithmId = void 0; -(function (AlgorithmId) { - AlgorithmId["MD5"] = "md5"; - AlgorithmId["CRC32"] = "crc32"; - AlgorithmId["CRC32C"] = "crc32c"; - AlgorithmId["SHA1"] = "sha1"; - AlgorithmId["SHA256"] = "sha256"; -})(exports.AlgorithmId || (exports.AlgorithmId = {})); -const getChecksumConfiguration = (runtimeConfig) => { - const checksumAlgorithms = []; - if (runtimeConfig.sha256 !== undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.SHA256, - checksumConstructor: () => runtimeConfig.sha256, - }); +const SHORT_TO_HEX = {}; +const HEX_TO_SHORT = {}; +for (let i = 0; i < 256; i++) { + let encodedByte = i.toString(16).toLowerCase(); + if (encodedByte.length === 1) { + encodedByte = `0${encodedByte}`; } - if (runtimeConfig.md5 != undefined) { - checksumAlgorithms.push({ - algorithmId: () => exports.AlgorithmId.MD5, - checksumConstructor: () => runtimeConfig.md5, - }); + SHORT_TO_HEX[i] = encodedByte; + HEX_TO_SHORT[encodedByte] = i; +} +function fromHex(encoded) { + if (encoded.length % 2 !== 0) { + throw new Error("Hex encoded strings must have an even number length"); } - return { - addChecksumAlgorithm(algo) { - checksumAlgorithms.push(algo); - }, - checksumAlgorithms() { - return checksumAlgorithms; - }, - }; -}; -const resolveChecksumRuntimeConfig = (clientConfig) => { - const runtimeConfig = {}; - clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => { - runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor(); - }); - return runtimeConfig; -}; - -const getDefaultClientConfiguration = (runtimeConfig) => { - return getChecksumConfiguration(runtimeConfig); -}; -const resolveDefaultRuntimeConfig = (config) => { - return resolveChecksumRuntimeConfig(config); -}; - -exports.FieldPosition = void 0; -(function (FieldPosition) { - FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER"; - FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER"; -})(exports.FieldPosition || (exports.FieldPosition = {})); - -const SMITHY_CONTEXT_KEY = "__smithy_context"; - -exports.IniSectionType = void 0; -(function (IniSectionType) { - IniSectionType["PROFILE"] = "profile"; - IniSectionType["SSO_SESSION"] = "sso-session"; - IniSectionType["SERVICES"] = "services"; -})(exports.IniSectionType || (exports.IniSectionType = {})); - -exports.RequestHandlerProtocol = void 0; -(function (RequestHandlerProtocol) { - RequestHandlerProtocol["HTTP_0_9"] = "http/0.9"; - RequestHandlerProtocol["HTTP_1_0"] = "http/1.0"; - RequestHandlerProtocol["TDS_8_0"] = "tds/8.0"; -})(exports.RequestHandlerProtocol || (exports.RequestHandlerProtocol = {})); + const out = new Uint8Array(encoded.length / 2); + for (let i = 0; i < encoded.length; i += 2) { + const encodedByte = encoded.slice(i, i + 2).toLowerCase(); + if (encodedByte in HEX_TO_SHORT) { + out[i / 2] = HEX_TO_SHORT[encodedByte]; + } + else { + throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + } + } + return out; +} +function toHex(bytes) { + let out = ""; + for (let i = 0; i < bytes.byteLength; i++) { + out += SHORT_TO_HEX[bytes[i]]; + } + return out; +} -exports.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY; -exports.getDefaultClientConfiguration = getDefaultClientConfiguration; -exports.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig; +exports.fromHex = fromHex; +exports.toHex = toHex; /***/ }), -/***/ 4494: +/***/ 6324: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var querystringParser = __nccwpck_require__(8822); - -const parseUrl = (url) => { - if (typeof url === "string") { - return parseUrl(new URL(url)); - } - const { hostname, pathname, port, protocol, search } = url; - let query; - if (search) { - query = querystringParser.parseQueryString(search); - } - return { - hostname, - port: port ? parseInt(port) : undefined, - protocol, - path: pathname, - query, - }; -}; - -exports.parseUrl = parseUrl; - - -/***/ }), - -/***/ 2674: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +var types = __nccwpck_require__(690); -"use strict"; +const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.fromBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(4151); -const BASE64_REGEX = /^[A-Za-z0-9+/]*={0,2}$/; -const fromBase64 = (input) => { - if ((input.length * 3) % 4 !== 0) { - throw new TypeError(`Incorrect padding on base64 string.`); - } - if (!BASE64_REGEX.exec(input)) { - throw new TypeError(`Invalid base64 string.`); - } - const buffer = (0, util_buffer_from_1.fromString)(input, "base64"); - return new Uint8Array(buffer.buffer, buffer.byteOffset, buffer.byteLength); +const normalizeProvider = (input) => { + if (typeof input === "function") + return input; + const promisified = Promise.resolve(input); + return () => promisified; }; -exports.fromBase64 = fromBase64; + +exports.getSmithyContext = getSmithyContext; +exports.normalizeProvider = normalizeProvider; /***/ }), -/***/ 8385: +/***/ 5518: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -var fromBase64 = __nccwpck_require__(2674); -var toBase64 = __nccwpck_require__(4871); - - - -Object.keys(fromBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return fromBase64[k]; } - }); -}); -Object.keys(toBase64).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return toBase64[k]; } - }); -}); - - -/***/ }), - -/***/ 4871: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +var serviceErrorClassification = __nccwpck_require__(2058); -"use strict"; +exports.RETRY_MODES = void 0; +(function (RETRY_MODES) { + RETRY_MODES["STANDARD"] = "standard"; + RETRY_MODES["ADAPTIVE"] = "adaptive"; +})(exports.RETRY_MODES || (exports.RETRY_MODES = {})); +const DEFAULT_MAX_ATTEMPTS = 3; +const DEFAULT_RETRY_MODE = exports.RETRY_MODES.STANDARD; -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.toBase64 = void 0; -const util_buffer_from_1 = __nccwpck_require__(4151); -const util_utf8_1 = __nccwpck_require__(1577); -const toBase64 = (_input) => { - let input; - if (typeof _input === "string") { - input = (0, util_utf8_1.fromUtf8)(_input); +class DefaultRateLimiter { + static setTimeoutFn = setTimeout; + beta; + minCapacity; + minFillRate; + scaleConstant; + smooth; + currentCapacity = 0; + enabled = false; + lastMaxRate = 0; + measuredTxRate = 0; + requestCount = 0; + fillRate; + lastThrottleTime; + lastTimestamp = 0; + lastTxRateBucket; + maxCapacity; + timeWindow = 0; + constructor(options) { + this.beta = options?.beta ?? 0.7; + this.minCapacity = options?.minCapacity ?? 1; + this.minFillRate = options?.minFillRate ?? 0.5; + this.scaleConstant = options?.scaleConstant ?? 0.4; + this.smooth = options?.smooth ?? 0.8; + const currentTimeInSeconds = this.getCurrentTimeInSeconds(); + this.lastThrottleTime = currentTimeInSeconds; + this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); + this.fillRate = this.minFillRate; + this.maxCapacity = this.minCapacity; } - else { - input = _input; + getCurrentTimeInSeconds() { + return Date.now() / 1000; + } + async getSendToken() { + return this.acquireTokenBucket(1); + } + async acquireTokenBucket(amount) { + if (!this.enabled) { + return; + } + this.refillTokenBucket(); + if (amount > this.currentCapacity) { + const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000; + await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay)); + } + this.currentCapacity = this.currentCapacity - amount; + } + refillTokenBucket() { + const timestamp = this.getCurrentTimeInSeconds(); + if (!this.lastTimestamp) { + this.lastTimestamp = timestamp; + return; + } + const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; + this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); + this.lastTimestamp = timestamp; + } + updateClientSendingRate(response) { + let calculatedRate; + this.updateMeasuredRate(); + if (serviceErrorClassification.isThrottlingError(response)) { + const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); + this.lastMaxRate = rateToUse; + this.calculateTimeWindow(); + this.lastThrottleTime = this.getCurrentTimeInSeconds(); + calculatedRate = this.cubicThrottle(rateToUse); + this.enableTokenBucket(); + } + else { + this.calculateTimeWindow(); + calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + } + const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); + this.updateTokenBucketRate(newRate); + } + calculateTimeWindow() { + this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3)); + } + cubicThrottle(rateToUse) { + return this.getPrecise(rateToUse * this.beta); + } + cubicSuccess(timestamp) { + return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); + } + enableTokenBucket() { + this.enabled = true; + } + updateTokenBucketRate(newRate) { + this.refillTokenBucket(); + this.fillRate = Math.max(newRate, this.minFillRate); + this.maxCapacity = Math.max(newRate, this.minCapacity); + this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); + } + updateMeasuredRate() { + const t = this.getCurrentTimeInSeconds(); + const timeBucket = Math.floor(t * 2) / 2; + this.requestCount++; + if (timeBucket > this.lastTxRateBucket) { + const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); + this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); + this.requestCount = 0; + this.lastTxRateBucket = timeBucket; + } } - if (typeof input !== "object" || typeof input.byteOffset !== "number" || typeof input.byteLength !== "number") { - throw new Error("@smithy/util-base64: toBase64 encoder function only accepts string | Uint8Array."); + getPrecise(num) { + return parseFloat(num.toFixed(8)); } - return (0, util_buffer_from_1.fromArrayBuffer)(input.buffer, input.byteOffset, input.byteLength).toString("base64"); -}; -exports.toBase64 = toBase64; - - -/***/ }), +} -/***/ 2098: -/***/ ((__unused_webpack_module, exports) => { +const DEFAULT_RETRY_DELAY_BASE = 100; +const MAXIMUM_RETRY_DELAY = 20 * 1000; +const THROTTLING_RETRY_DELAY_BASE = 500; +const INITIAL_RETRY_TOKENS = 500; +const RETRY_COST = 5; +const TIMEOUT_RETRY_COST = 10; +const NO_RETRY_INCREMENT = 1; +const INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; +const REQUEST_HEADER = "amz-sdk-request"; -"use strict"; +const getDefaultRetryBackoffStrategy = () => { + let delayBase = DEFAULT_RETRY_DELAY_BASE; + const computeNextBackoffDelay = (attempts) => { + return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); + }; + const setDelayBase = (delay) => { + delayBase = delay; + }; + return { + computeNextBackoffDelay, + setDelayBase, + }; +}; +const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => { + const getRetryCount = () => retryCount; + const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay); + const getRetryCost = () => retryCost; + return { + getRetryCount, + getRetryDelay, + getRetryCost, + }; +}; -const TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; -const calculateBodyLength = (body) => { - if (typeof body === "string") { - if (TEXT_ENCODER) { - return TEXT_ENCODER.encode(body).byteLength; +class StandardRetryStrategy { + maxAttempts; + mode = exports.RETRY_MODES.STANDARD; + capacity = INITIAL_RETRY_TOKENS; + retryBackoffStrategy = getDefaultRetryBackoffStrategy(); + maxAttemptsProvider; + constructor(maxAttempts) { + this.maxAttempts = maxAttempts; + this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; + } + async acquireInitialRetryToken(retryTokenScope) { + return createDefaultRetryToken({ + retryDelay: DEFAULT_RETRY_DELAY_BASE, + retryCount: 0, + }); + } + async refreshRetryTokenForRetry(token, errorInfo) { + const maxAttempts = await this.getMaxAttempts(); + if (this.shouldRetry(token, errorInfo, maxAttempts)) { + const errorType = errorInfo.errorType; + this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE); + const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); + const retryDelay = errorInfo.retryAfterHint + ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) + : delayFromErrorType; + const capacityCost = this.getCapacityCost(errorType); + this.capacity -= capacityCost; + return createDefaultRetryToken({ + retryDelay, + retryCount: token.getRetryCount() + 1, + retryCost: capacityCost, + }); } - let len = body.length; - for (let i = len - 1; i >= 0; i--) { - const code = body.charCodeAt(i); - if (code > 0x7f && code <= 0x7ff) - len++; - else if (code > 0x7ff && code <= 0xffff) - len += 2; - if (code >= 0xdc00 && code <= 0xdfff) - i--; + throw new Error("No retry token available"); + } + recordSuccess(token) { + this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); + } + getCapacity() { + return this.capacity; + } + async getMaxAttempts() { + try { + return await this.maxAttemptsProvider(); + } + catch (error) { + console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); + return DEFAULT_MAX_ATTEMPTS; } - return len; } - else if (typeof body.byteLength === "number") { - return body.byteLength; + shouldRetry(tokenToRenew, errorInfo, maxAttempts) { + const attempts = tokenToRenew.getRetryCount() + 1; + return (attempts < maxAttempts && + this.capacity >= this.getCapacityCost(errorInfo.errorType) && + this.isRetryableError(errorInfo.errorType)); } - else if (typeof body.size === "number") { - return body.size; + getCapacityCost(errorType) { + return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; } - throw new Error(`Body Length computation failed for ${body}`); -}; - -exports.calculateBodyLength = calculateBodyLength; - - -/***/ }), - -/***/ 3638: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var node_fs = __nccwpck_require__(3024); - -const calculateBodyLength = (body) => { - if (!body) { - return 0; + isRetryableError(errorType) { + return errorType === "THROTTLING" || errorType === "TRANSIENT"; } - if (typeof body === "string") { - return Buffer.byteLength(body); +} + +class AdaptiveRetryStrategy { + maxAttemptsProvider; + rateLimiter; + standardRetryStrategy; + mode = exports.RETRY_MODES.ADAPTIVE; + constructor(maxAttemptsProvider, options) { + this.maxAttemptsProvider = maxAttemptsProvider; + const { rateLimiter } = options ?? {}; + this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); + this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); } - else if (typeof body.byteLength === "number") { - return body.byteLength; + async acquireInitialRetryToken(retryTokenScope) { + await this.rateLimiter.getSendToken(); + return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); } - else if (typeof body.size === "number") { - return body.size; + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + this.rateLimiter.updateClientSendingRate(errorInfo); + return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); } - else if (typeof body.start === "number" && typeof body.end === "number") { - return body.end + 1 - body.start; + recordSuccess(token) { + this.rateLimiter.updateClientSendingRate({}); + this.standardRetryStrategy.recordSuccess(token); } - else if (body instanceof node_fs.ReadStream) { - if (body.path != null) { - return node_fs.lstatSync(body.path).size; +} + +class ConfiguredRetryStrategy extends StandardRetryStrategy { + computeNextBackoffDelay; + constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { + super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); + if (typeof computeNextBackoffDelay === "number") { + this.computeNextBackoffDelay = () => computeNextBackoffDelay; } - else if (typeof body.fd === "number") { - return node_fs.fstatSync(body.fd).size; + else { + this.computeNextBackoffDelay = computeNextBackoffDelay; } } - throw new Error(`Body Length computation failed for ${body}`); -}; + async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { + const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); + return token; + } +} -exports.calculateBodyLength = calculateBodyLength; +exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; +exports.ConfiguredRetryStrategy = ConfiguredRetryStrategy; +exports.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS; +exports.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE; +exports.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE; +exports.DefaultRateLimiter = DefaultRateLimiter; +exports.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS; +exports.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER; +exports.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY; +exports.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT; +exports.REQUEST_HEADER = REQUEST_HEADER; +exports.RETRY_COST = RETRY_COST; +exports.StandardRetryStrategy = StandardRetryStrategy; +exports.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE; +exports.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST; /***/ }), -/***/ 4151: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { +/***/ 1732: +/***/ ((__unused_webpack_module, exports) => { "use strict"; - -var isArrayBuffer = __nccwpck_require__(6130); -var buffer = __nccwpck_require__(181); - -const fromArrayBuffer = (input, offset = 0, length = input.byteLength - offset) => { - if (!isArrayBuffer.isArrayBuffer(input)) { - throw new TypeError(`The "input" argument must be ArrayBuffer. Received type ${typeof input} (${input})`); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ByteArrayCollector = void 0; +class ByteArrayCollector { + allocByteArray; + byteLength = 0; + byteArrays = []; + constructor(allocByteArray) { + this.allocByteArray = allocByteArray; } - return buffer.Buffer.from(input, offset, length); -}; -const fromString = (input, encoding) => { - if (typeof input !== "string") { - throw new TypeError(`The "input" argument must be of type string. Received type ${typeof input} (${input})`); + push(byteArray) { + this.byteArrays.push(byteArray); + this.byteLength += byteArray.byteLength; } - return encoding ? buffer.Buffer.from(input, encoding) : buffer.Buffer.from(input); -}; - -exports.fromArrayBuffer = fromArrayBuffer; -exports.fromString = fromString; + flush() { + if (this.byteArrays.length === 1) { + const bytes = this.byteArrays[0]; + this.reset(); + return bytes; + } + const aggregation = this.allocByteArray(this.byteLength); + let cursor = 0; + for (let i = 0; i < this.byteArrays.length; ++i) { + const bytes = this.byteArrays[i]; + aggregation.set(bytes, cursor); + cursor += bytes.byteLength; + } + this.reset(); + return aggregation; + } + reset() { + this.byteArrays = []; + this.byteLength = 0; + } +} +exports.ByteArrayCollector = ByteArrayCollector; /***/ }), -/***/ 6716: +/***/ 7753: /***/ ((__unused_webpack_module, exports) => { "use strict"; - -const booleanSelector = (obj, key, type) => { - if (!(key in obj)) - return undefined; - if (obj[key] === "true") - return true; - if (obj[key] === "false") - return false; - throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`); -}; - -const numberSelector = (obj, key, type) => { - if (!(key in obj)) - return undefined; - const numberValue = parseInt(obj[key], 10); - if (Number.isNaN(numberValue)) { - throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); - } - return numberValue; -}; - -exports.SelectorType = void 0; -(function (SelectorType) { - SelectorType["ENV"] = "env"; - SelectorType["CONFIG"] = "shared config entry"; -})(exports.SelectorType || (exports.SelectorType = {})); - -exports.booleanSelector = booleanSelector; -exports.numberSelector = numberSelector; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ChecksumStream = void 0; +const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; +class ChecksumStream extends ReadableStreamRef { +} +exports.ChecksumStream = ChecksumStream; /***/ }), -/***/ 5435: +/***/ 1775: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var configResolver = __nccwpck_require__(9316); -var nodeConfigProvider = __nccwpck_require__(5704); -var propertyProvider = __nccwpck_require__(8857); - -const AWS_EXECUTION_ENV = "AWS_EXECUTION_ENV"; -const AWS_REGION_ENV = "AWS_REGION"; -const AWS_DEFAULT_REGION_ENV = "AWS_DEFAULT_REGION"; -const ENV_IMDS_DISABLED = "AWS_EC2_METADATA_DISABLED"; -const DEFAULTS_MODE_OPTIONS = ["in-region", "cross-region", "mobile", "standard", "legacy"]; -const IMDS_REGION_PATH = "/latest/meta-data/placement/region"; - -const AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; -const AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; -const NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { - return env[AWS_DEFAULTS_MODE_ENV]; - }, - configFileSelector: (profile) => { - return profile[AWS_DEFAULTS_MODE_CONFIG]; - }, - default: "legacy", -}; - -const resolveDefaultsModeConfig = ({ region = nodeConfigProvider.loadConfig(configResolver.NODE_REGION_CONFIG_OPTIONS), defaultsMode = nodeConfigProvider.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS), } = {}) => propertyProvider.memoize(async () => { - const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode; - switch (mode?.toLowerCase()) { - case "auto": - return resolveNodeDefaultsModeAuto(region); - case "in-region": - case "cross-region": - case "mobile": - case "standard": - case "legacy": - return Promise.resolve(mode?.toLocaleLowerCase()); - case undefined: - return Promise.resolve("legacy"); - default: - throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`); - } -}); -const resolveNodeDefaultsModeAuto = async (clientRegion) => { - if (clientRegion) { - const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion; - const inferredRegion = await inferPhysicalRegion(); - if (!inferredRegion) { - return "standard"; - } - if (resolvedRegion === inferredRegion) { - return "in-region"; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.ChecksumStream = void 0; +const util_base64_1 = __nccwpck_require__(8385); +const stream_1 = __nccwpck_require__(2203); +class ChecksumStream extends stream_1.Duplex { + expectedChecksum; + checksumSourceLocation; + checksum; + source; + base64Encoder; + constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { + super(); + if (typeof source.pipe === "function") { + this.source = source; } else { - return "cross-region"; + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); } + this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; + this.expectedChecksum = expectedChecksum; + this.checksum = checksum; + this.checksumSourceLocation = checksumSourceLocation; + this.source.pipe(this); } - return "standard"; -}; -const inferPhysicalRegion = async () => { - if (process.env[AWS_EXECUTION_ENV] && (process.env[AWS_REGION_ENV] || process.env[AWS_DEFAULT_REGION_ENV])) { - return process.env[AWS_REGION_ENV] ?? process.env[AWS_DEFAULT_REGION_ENV]; + _read(size) { } + _write(chunk, encoding, callback) { + try { + this.checksum.update(chunk); + this.push(chunk); + } + catch (e) { + return callback(e); + } + return callback(); } - if (!process.env[ENV_IMDS_DISABLED]) { + async _final(callback) { try { - const { getInstanceMetadataEndpoint, httpRequest } = await __nccwpck_require__.e(/* import() */ 566).then(__nccwpck_require__.t.bind(__nccwpck_require__, 566, 19)); - const endpoint = await getInstanceMetadataEndpoint(); - return (await httpRequest({ ...endpoint, path: IMDS_REGION_PATH })).toString(); + const digest = await this.checksum.digest(); + const received = this.base64Encoder(digest); + if (this.expectedChecksum !== received) { + return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + + ` in response header "${this.checksumSourceLocation}".`)); + } } catch (e) { + return callback(e); } + this.push(null); + return callback(); } -}; - -exports.resolveDefaultsModeConfig = resolveDefaultsModeConfig; +} +exports.ChecksumStream = ChecksumStream; /***/ }), -/***/ 9674: +/***/ 4129: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var types = __nccwpck_require__(690); - -class EndpointCache { - capacity; - data = new Map(); - parameters = []; - constructor({ size, params }) { - this.capacity = size ?? 50; - if (params) { - this.parameters = params; - } - } - get(endpointParams, resolver) { - const key = this.hash(endpointParams); - if (key === false) { - return resolver(); - } - if (!this.data.has(key)) { - if (this.data.size > this.capacity + 10) { - const keys = this.data.keys(); - let i = 0; - while (true) { - const { value, done } = keys.next(); - this.data.delete(value); - if (done || ++i > 10) { - break; - } - } - } - this.data.set(key, resolver()); - } - return this.data.get(key); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createChecksumStream = void 0; +const util_base64_1 = __nccwpck_require__(8385); +const stream_type_check_1 = __nccwpck_require__(4414); +const ChecksumStream_browser_1 = __nccwpck_require__(7753); +const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { + if (!(0, stream_type_check_1.isReadableStream)(source)) { + throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); } - size() { - return this.data.size; + const encoder = base64Encoder ?? util_base64_1.toBase64; + if (typeof TransformStream !== "function") { + throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); } - hash(endpointParams) { - let buffer = ""; - const { parameters } = this; - if (parameters.length === 0) { - return false; - } - for (const param of parameters) { - const val = String(endpointParams[param] ?? ""); - if (val.includes("|;")) { - return false; + const transform = new TransformStream({ + start() { }, + async transform(chunk, controller) { + checksum.update(chunk); + controller.enqueue(chunk); + }, + async flush(controller) { + const digest = await checksum.digest(); + const received = encoder(digest); + if (expectedChecksum !== received) { + const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + + ` in response header "${checksumSourceLocation}".`); + controller.error(error); } - buffer += val + "|;"; - } - return buffer; - } -} + else { + controller.terminate(); + } + }, + }); + source.pipeThrough(transform); + const readable = transform.readable; + Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype); + return readable; +}; +exports.createChecksumStream = createChecksumStream; -const IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`); -const isIpAddress = (value) => IP_V4_REGEX.test(value) || (value.startsWith("[") && value.endsWith("]")); -const VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`); -const isValidHostLabel = (value, allowSubDomains = false) => { - if (!allowSubDomains) { - return VALID_HOST_LABEL_REGEX.test(value); - } - const labels = value.split("."); - for (const label of labels) { - if (!isValidHostLabel(label)) { - return false; - } - } - return true; -}; +/***/ }), -const customEndpointFunctions = {}; +/***/ 5639: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const debugId = "endpoints"; +"use strict"; -function toDebugString(input) { - if (typeof input !== "object" || input == null) { - return input; - } - if ("ref" in input) { - return `$${toDebugString(input.ref)}`; - } - if ("fn" in input) { - return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createChecksumStream = createChecksumStream; +const stream_type_check_1 = __nccwpck_require__(4414); +const ChecksumStream_1 = __nccwpck_require__(1775); +const createChecksumStream_browser_1 = __nccwpck_require__(4129); +function createChecksumStream(init) { + if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { + return (0, createChecksumStream_browser_1.createChecksumStream)(init); } - return JSON.stringify(input, null, 2); + return new ChecksumStream_1.ChecksumStream(init); } -class EndpointError extends Error { - constructor(message) { - super(message); - this.name = "EndpointError"; - } -} -const booleanEquals = (value1, value2) => value1 === value2; +/***/ }), -const getAttrPathList = (path) => { - const parts = path.split("."); - const pathList = []; - for (const part of parts) { - const squareBracketIndex = part.indexOf("["); - if (squareBracketIndex !== -1) { - if (part.indexOf("]") !== part.length - 1) { - throw new EndpointError(`Path: '${path}' does not end with ']'`); +/***/ 2005: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createBufferedReadable = createBufferedReadable; +const node_stream_1 = __nccwpck_require__(7075); +const ByteArrayCollector_1 = __nccwpck_require__(1732); +const createBufferedReadableStream_1 = __nccwpck_require__(8213); +const stream_type_check_1 = __nccwpck_require__(4414); +function createBufferedReadable(upstream, size, logger) { + if ((0, stream_type_check_1.isReadableStream)(upstream)) { + return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); + } + const downstream = new node_stream_1.Readable({ read() { } }); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = [ + "", + new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), + new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), + ]; + let mode = -1; + upstream.on("data", (chunk) => { + const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); + if (mode !== chunkMode) { + if (mode >= 0) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); } - const arrayIndex = part.slice(squareBracketIndex + 1, -1); - if (Number.isNaN(parseInt(arrayIndex))) { - throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`); + mode = chunkMode; + } + if (mode === -1) { + downstream.push(chunk); + return; + } + const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); + bytesSeen += chunkSize; + const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + downstream.push(chunk); + } + else { + const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); } - if (squareBracketIndex !== 0) { - pathList.push(part.slice(0, squareBracketIndex)); + if (newSize >= size) { + downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); } - pathList.push(arrayIndex); } - else { - pathList.push(part); + }); + upstream.on("end", () => { + if (mode !== -1) { + const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); + if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { + downstream.push(remainder); + } } - } - return pathList; -}; + downstream.push(null); + }); + return downstream; +} -const getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => { - if (typeof acc !== "object") { - throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`); - } - else if (Array.isArray(acc)) { - return acc[parseInt(index)]; - } - return acc[index]; -}, value); -const isSet = (value) => value != null; +/***/ }), -const not = (value) => !value; +/***/ 8213: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const DEFAULT_PORTS = { - [types.EndpointURLScheme.HTTP]: 80, - [types.EndpointURLScheme.HTTPS]: 443, -}; -const parseURL = (value) => { - const whatwgURL = (() => { - try { - if (value instanceof URL) { - return value; - } - if (typeof value === "object" && "hostname" in value) { - const { hostname, port, protocol = "", path = "", query = {} } = value; - const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : ""}${path}`); - url.search = Object.entries(query) - .map(([k, v]) => `${k}=${v}`) - .join("&"); - return url; +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.createBufferedReadable = void 0; +exports.createBufferedReadableStream = createBufferedReadableStream; +exports.merge = merge; +exports.flush = flush; +exports.sizeOf = sizeOf; +exports.modeOf = modeOf; +const ByteArrayCollector_1 = __nccwpck_require__(1732); +function createBufferedReadableStream(upstream, size, logger) { + const reader = upstream.getReader(); + let streamBufferingLoggedWarning = false; + let bytesSeen = 0; + const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size))]; + let mode = -1; + const pull = async (controller) => { + const { value, done } = await reader.read(); + const chunk = value; + if (done) { + if (mode !== -1) { + const remainder = flush(buffers, mode); + if (sizeOf(remainder) > 0) { + controller.enqueue(remainder); + } } - return new URL(value); + controller.close(); } - catch (error) { - return null; + else { + const chunkMode = modeOf(chunk, false); + if (mode !== chunkMode) { + if (mode >= 0) { + controller.enqueue(flush(buffers, mode)); + } + mode = chunkMode; + } + if (mode === -1) { + controller.enqueue(chunk); + return; + } + const chunkSize = sizeOf(chunk); + bytesSeen += chunkSize; + const bufferSize = sizeOf(buffers[mode]); + if (chunkSize >= size && bufferSize === 0) { + controller.enqueue(chunk); + } + else { + const newSize = merge(buffers, mode, chunk); + if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { + streamBufferingLoggedWarning = true; + logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + } + if (newSize >= size) { + controller.enqueue(flush(buffers, mode)); + } + else { + await pull(controller); + } + } } - })(); - if (!whatwgURL) { - console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`); - return null; + }; + return new ReadableStream({ + pull, + }); +} +exports.createBufferedReadable = createBufferedReadableStream; +function merge(buffers, mode, chunk) { + switch (mode) { + case 0: + buffers[0] += chunk; + return sizeOf(buffers[0]); + case 1: + case 2: + buffers[mode].push(chunk); + return sizeOf(buffers[mode]); } - const urlString = whatwgURL.href; - const { host, hostname, pathname, protocol, search } = whatwgURL; - if (search) { - return null; +} +function flush(buffers, mode) { + switch (mode) { + case 0: + const s = buffers[0]; + buffers[0] = ""; + return s; + case 1: + case 2: + return buffers[mode].flush(); } - const scheme = protocol.slice(0, -1); - if (!Object.values(types.EndpointURLScheme).includes(scheme)) { - return null; + throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); +} +function sizeOf(chunk) { + return chunk?.byteLength ?? chunk?.length ?? 0; +} +function modeOf(chunk, allowBuffer = true) { + if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { + return 2; } - const isIp = isIpAddress(hostname); - const inputContainsDefaultPort = urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || - (typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`)); - const authority = `${host}${inputContainsDefaultPort ? `:${DEFAULT_PORTS[scheme]}` : ``}`; - return { - scheme, - authority, - path: pathname, - normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`, - isIp, - }; -}; - -const stringEquals = (value1, value2) => value1 === value2; - -const substring = (input, start, stop, reverse) => { - if (start >= stop || input.length < stop) { - return null; + if (chunk instanceof Uint8Array) { + return 1; } - if (!reverse) { - return input.substring(start, stop); + if (typeof chunk === "string") { + return 0; } - return input.substring(input.length - stop, input.length - start); -}; + return -1; +} -const uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`); -const endpointFunctions = { - booleanEquals, - getAttr, - isSet, - isValidHostLabel, - not, - parseURL, - stringEquals, - substring, - uriEncode, -}; +/***/ }), -const evaluateTemplate = (template, options) => { - const evaluatedTemplateArr = []; - const templateContext = { - ...options.endpointParams, - ...options.referenceRecord, - }; - let currentIndex = 0; - while (currentIndex < template.length) { - const openingBraceIndex = template.indexOf("{", currentIndex); - if (openingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(currentIndex)); - break; - } - evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex)); - const closingBraceIndex = template.indexOf("}", openingBraceIndex); - if (closingBraceIndex === -1) { - evaluatedTemplateArr.push(template.slice(openingBraceIndex)); - break; - } - if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") { - evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex)); - currentIndex = closingBraceIndex + 2; - } - const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex); - if (parameterName.includes("#")) { - const [refName, attrName] = parameterName.split("#"); - evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName)); - } - else { - evaluatedTemplateArr.push(templateContext[parameterName]); - } - currentIndex = closingBraceIndex + 1; - } - return evaluatedTemplateArr.join(""); -}; +/***/ 3492: +/***/ ((__unused_webpack_module, exports) => { -const getReferenceValue = ({ ref }, options) => { - const referenceRecord = { - ...options.endpointParams, - ...options.referenceRecord, - }; - return referenceRecord[ref]; -}; +"use strict"; -const evaluateExpression = (obj, keyName, options) => { - if (typeof obj === "string") { - return evaluateTemplate(obj, options); - } - else if (obj["fn"]) { - return group$2.callFunction(obj, options); - } - else if (obj["ref"]) { - return getReferenceValue(obj, options); - } - throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`); -}; -const callFunction = ({ fn, argv }, options) => { - const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options)); - const fnSegments = fn.split("."); - if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) { - return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs); - } - return endpointFunctions[fn](...evaluatedArgs); -}; -const group$2 = { - evaluateExpression, - callFunction, +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAwsChunkedEncodingStream = void 0; +const getAwsChunkedEncodingStream = (readableStream, options) => { + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + bodyLengthChecker !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; + const reader = readableStream.getReader(); + return new ReadableStream({ + async pull(controller) { + const { value, done } = await reader.read(); + if (done) { + controller.enqueue(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + controller.enqueue(`${checksumLocationName}:${checksum}\r\n`); + controller.enqueue(`\r\n`); + } + controller.close(); + } + else { + controller.enqueue(`${(bodyLengthChecker(value) || 0).toString(16)}\r\n${value}\r\n`); + } + }, + }); }; +exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; -const evaluateCondition = ({ assign, ...fnArgs }, options) => { - if (assign && assign in options.referenceRecord) { - throw new EndpointError(`'${assign}' is already defined in Reference Record.`); - } - const value = callFunction(fnArgs, options); - options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`); - return { - result: value === "" ? true : !!value, - ...(assign != null && { toAssign: { name: assign, value } }), - }; -}; -const evaluateConditions = (conditions = [], options) => { - const conditionsReferenceRecord = {}; - for (const condition of conditions) { - const { result, toAssign } = evaluateCondition(condition, { - ...options, - referenceRecord: { - ...options.referenceRecord, - ...conditionsReferenceRecord, - }, - }); - if (!result) { - return { result }; - } - if (toAssign) { - conditionsReferenceRecord[toAssign.name] = toAssign.value; - options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`); - } - } - return { result: true, referenceRecord: conditionsReferenceRecord }; -}; +/***/ }), -const getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({ - ...acc, - [headerKey]: headerVal.map((headerValEntry) => { - const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options); - if (typeof processedExpr !== "string") { - throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`); - } - return processedExpr; - }), -}), {}); +/***/ 6522: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -const getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({ - ...acc, - [propertyKey]: group$1.getEndpointProperty(propertyVal, options), -}), {}); -const getEndpointProperty = (property, options) => { - if (Array.isArray(property)) { - return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options)); - } - switch (typeof property) { - case "string": - return evaluateTemplate(property, options); - case "object": - if (property === null) { - throw new EndpointError(`Unexpected endpoint property: ${property}`); - } - return group$1.getEndpointProperties(property, options); - case "boolean": - return property; - default: - throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`); - } -}; -const group$1 = { - getEndpointProperty, - getEndpointProperties, -}; +"use strict"; -const getEndpointUrl = (endpointUrl, options) => { - const expression = evaluateExpression(endpointUrl, "Endpoint URL", options); - if (typeof expression === "string") { - try { - return new URL(expression); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; +const node_stream_1 = __nccwpck_require__(7075); +const getAwsChunkedEncodingStream_browser_1 = __nccwpck_require__(3492); +const stream_type_check_1 = __nccwpck_require__(4414); +function getAwsChunkedEncodingStream(stream, options) { + const readable = stream; + const readableStream = stream; + if ((0, stream_type_check_1.isReadableStream)(readableStream)) { + return (0, getAwsChunkedEncodingStream_browser_1.getAwsChunkedEncodingStream)(readableStream, options); + } + const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; + const checksumRequired = base64Encoder !== undefined && + checksumAlgorithmFn !== undefined && + checksumLocationName !== undefined && + streamHasher !== undefined; + const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : undefined; + const awsChunkedEncodingStream = new node_stream_1.Readable({ + read: () => { }, + }); + readable.on("data", (data) => { + const length = bodyLengthChecker(data) || 0; + if (length === 0) { + return; } - catch (error) { - console.error(`Failed to construct URL with ${expression}`, error); - throw error; + awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); + awsChunkedEncodingStream.push(data); + awsChunkedEncodingStream.push("\r\n"); + }); + readable.on("end", async () => { + awsChunkedEncodingStream.push(`0\r\n`); + if (checksumRequired) { + const checksum = base64Encoder(await digest); + awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); + awsChunkedEncodingStream.push(`\r\n`); } - } - throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`); -}; + awsChunkedEncodingStream.push(null); + }); + return awsChunkedEncodingStream; +} -const evaluateEndpointRule = (endpointRule, options) => { - const { conditions, endpoint } = endpointRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - const endpointRuleOptions = { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord }, - }; - const { url, properties, headers } = endpoint; - options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`); - return { - ...(headers != undefined && { - headers: getEndpointHeaders(headers, endpointRuleOptions), - }), - ...(properties != undefined && { - properties: getEndpointProperties(properties, endpointRuleOptions), - }), - url: getEndpointUrl(url, endpointRuleOptions), - }; -}; -const evaluateErrorRule = (errorRule, options) => { - const { conditions, error } = errorRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; - } - throw new EndpointError(evaluateExpression(error, "Error", { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord }, - })); -}; +/***/ }), -const evaluateRules = (rules, options) => { - for (const rule of rules) { - if (rule.type === "endpoint") { - const endpointOrUndefined = evaluateEndpointRule(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } +/***/ 66: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.headStream = headStream; +async function headStream(stream, bytes) { + let byteLengthCounter = 0; + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + byteLengthCounter += value?.byteLength ?? 0; } - else if (rule.type === "error") { - evaluateErrorRule(rule, options); + if (byteLengthCounter >= bytes) { + break; } - else if (rule.type === "tree") { - const endpointOrUndefined = group.evaluateTreeRule(rule, options); - if (endpointOrUndefined) { - return endpointOrUndefined; - } + isDone = done; + } + reader.releaseLock(); + const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); + let offset = 0; + for (const chunk of chunks) { + if (chunk.byteLength > collected.byteLength - offset) { + collected.set(chunk.subarray(0, collected.byteLength - offset), offset); + break; } else { - throw new EndpointError(`Unknown endpoint rule: ${rule}`); + collected.set(chunk, offset); } + offset += chunk.length; } - throw new EndpointError(`Rules evaluation failed`); -}; -const evaluateTreeRule = (treeRule, options) => { - const { conditions, rules } = treeRule; - const { result, referenceRecord } = evaluateConditions(conditions, options); - if (!result) { - return; + return collected; +} + + +/***/ }), + +/***/ 8412: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.headStream = void 0; +const stream_1 = __nccwpck_require__(2203); +const headStream_browser_1 = __nccwpck_require__(66); +const stream_type_check_1 = __nccwpck_require__(4414); +const headStream = (stream, bytes) => { + if ((0, stream_type_check_1.isReadableStream)(stream)) { + return (0, headStream_browser_1.headStream)(stream, bytes); } - return group.evaluateRules(rules, { - ...options, - referenceRecord: { ...options.referenceRecord, ...referenceRecord }, + return new Promise((resolve, reject) => { + const collector = new Collector(); + collector.limit = bytes; + stream.pipe(collector); + stream.on("error", (err) => { + collector.end(); + reject(err); + }); + collector.on("error", reject); + collector.on("finish", function () { + const bytes = new Uint8Array(Buffer.concat(this.buffers)); + resolve(bytes); + }); }); }; -const group = { - evaluateRules, - evaluateTreeRule, -}; - -const resolveEndpoint = (ruleSetObject, options) => { - const { endpointParams, logger } = options; - const { parameters, rules } = ruleSetObject; - options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`); - const paramsWithDefault = Object.entries(parameters) - .filter(([, v]) => v.default != null) - .map(([k, v]) => [k, v.default]); - if (paramsWithDefault.length > 0) { - for (const [paramKey, paramDefaultValue] of paramsWithDefault) { - endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue; - } - } - const requiredParams = Object.entries(parameters) - .filter(([, v]) => v.required) - .map(([k]) => k); - for (const requiredParam of requiredParams) { - if (endpointParams[requiredParam] == null) { - throw new EndpointError(`Missing required parameter: '${requiredParam}'`); +exports.headStream = headStream; +class Collector extends stream_1.Writable { + buffers = []; + limit = Infinity; + bytesBuffered = 0; + _write(chunk, encoding, callback) { + this.buffers.push(chunk); + this.bytesBuffered += chunk.byteLength ?? 0; + if (this.bytesBuffered >= this.limit) { + const excess = this.bytesBuffered - this.limit; + const tailBuffer = this.buffers[this.buffers.length - 1]; + this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); + this.emit("finish"); } + callback(); } - const endpoint = evaluateRules(rules, { endpointParams, logger, referenceRecord: {} }); - options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`); - return endpoint; -}; - -exports.EndpointCache = EndpointCache; -exports.EndpointError = EndpointError; -exports.customEndpointFunctions = customEndpointFunctions; -exports.isIpAddress = isIpAddress; -exports.isValidHostLabel = isValidHostLabel; -exports.resolveEndpoint = resolveEndpoint; +} /***/ }), -/***/ 6435: -/***/ ((__unused_webpack_module, exports) => { +/***/ 4252: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; -const SHORT_TO_HEX = {}; -const HEX_TO_SHORT = {}; -for (let i = 0; i < 256; i++) { - let encodedByte = i.toString(16).toLowerCase(); - if (encodedByte.length === 1) { - encodedByte = `0${encodedByte}`; +var utilBase64 = __nccwpck_require__(8385); +var utilUtf8 = __nccwpck_require__(1577); +var ChecksumStream = __nccwpck_require__(1775); +var createChecksumStream = __nccwpck_require__(5639); +var createBufferedReadable = __nccwpck_require__(2005); +var getAwsChunkedEncodingStream = __nccwpck_require__(6522); +var headStream = __nccwpck_require__(8412); +var sdkStreamMixin = __nccwpck_require__(7201); +var splitStream = __nccwpck_require__(2108); +var streamTypeCheck = __nccwpck_require__(4414); + +class Uint8ArrayBlobAdapter extends Uint8Array { + static fromString(source, encoding = "utf-8") { + if (typeof source === "string") { + if (encoding === "base64") { + return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); + } + return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source)); + } + throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); } - SHORT_TO_HEX[i] = encodedByte; - HEX_TO_SHORT[encodedByte] = i; -} -function fromHex(encoded) { - if (encoded.length % 2 !== 0) { - throw new Error("Hex encoded strings must have an even number length"); + static mutate(source) { + Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); + return source; } - const out = new Uint8Array(encoded.length / 2); - for (let i = 0; i < encoded.length; i += 2) { - const encodedByte = encoded.slice(i, i + 2).toLowerCase(); - if (encodedByte in HEX_TO_SHORT) { - out[i / 2] = HEX_TO_SHORT[encodedByte]; - } - else { - throw new Error(`Cannot decode unrecognized sequence ${encodedByte} as hexadecimal`); + transformToString(encoding = "utf-8") { + if (encoding === "base64") { + return utilBase64.toBase64(this); } + return utilUtf8.toUtf8(this); } - return out; -} -function toHex(bytes) { - let out = ""; - for (let i = 0; i < bytes.byteLength; i++) { - out += SHORT_TO_HEX[bytes[i]]; - } - return out; } -exports.fromHex = fromHex; -exports.toHex = toHex; +Object.defineProperty(exports, "isBlob", ({ + enumerable: true, + get: function () { return streamTypeCheck.isBlob; } +})); +Object.defineProperty(exports, "isReadableStream", ({ + enumerable: true, + get: function () { return streamTypeCheck.isReadableStream; } +})); +exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; +Object.keys(ChecksumStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return ChecksumStream[k]; } + }); +}); +Object.keys(createChecksumStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return createChecksumStream[k]; } + }); +}); +Object.keys(createBufferedReadable).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return createBufferedReadable[k]; } + }); +}); +Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return getAwsChunkedEncodingStream[k]; } + }); +}); +Object.keys(headStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return headStream[k]; } + }); +}); +Object.keys(sdkStreamMixin).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return sdkStreamMixin[k]; } + }); +}); +Object.keys(splitStream).forEach(function (k) { + if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { + enumerable: true, + get: function () { return splitStream[k]; } + }); +}); /***/ }), -/***/ 6324: +/***/ 2207: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var types = __nccwpck_require__(690); - -const getSmithyContext = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {}); - -const normalizeProvider = (input) => { - if (typeof input === "function") - return input; - const promisified = Promise.resolve(input); - return () => promisified; +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sdkStreamMixin = void 0; +const fetch_http_handler_1 = __nccwpck_require__(7809); +const util_base64_1 = __nccwpck_require__(8385); +const util_hex_encoding_1 = __nccwpck_require__(6435); +const util_utf8_1 = __nccwpck_require__(1577); +const stream_type_check_1 = __nccwpck_require__(4414); +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +const sdkStreamMixin = (stream) => { + if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); + } + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + return await (0, fetch_http_handler_1.streamCollector)(stream); + }; + const blobToWebStream = (blob) => { + if (typeof blob.stream !== "function") { + throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\n" + + "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); + } + return blob.stream(); + }; + return Object.assign(stream, { + transformToByteArray: transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === "base64") { + return (0, util_base64_1.toBase64)(buf); + } + else if (encoding === "hex") { + return (0, util_hex_encoding_1.toHex)(buf); + } + else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { + return (0, util_utf8_1.toUtf8)(buf); + } + else if (typeof TextDecoder === "function") { + return new TextDecoder(encoding).decode(buf); + } + else { + throw new Error("TextDecoder is not available, please make sure polyfill is provided."); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + transformed = true; + if (isBlobInstance(stream)) { + return blobToWebStream(stream); + } + else if ((0, stream_type_check_1.isReadableStream)(stream)) { + return stream; + } + else { + throw new Error(`Cannot transform payload to web stream, got ${stream}`); + } + }, + }); }; - -exports.getSmithyContext = getSmithyContext; -exports.normalizeProvider = normalizeProvider; +exports.sdkStreamMixin = sdkStreamMixin; +const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; /***/ }), -/***/ 5518: +/***/ 7201: /***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { "use strict"; - -var serviceErrorClassification = __nccwpck_require__(2058); - -exports.RETRY_MODES = void 0; -(function (RETRY_MODES) { - RETRY_MODES["STANDARD"] = "standard"; - RETRY_MODES["ADAPTIVE"] = "adaptive"; -})(exports.RETRY_MODES || (exports.RETRY_MODES = {})); -const DEFAULT_MAX_ATTEMPTS = 3; -const DEFAULT_RETRY_MODE = exports.RETRY_MODES.STANDARD; - -class DefaultRateLimiter { - static setTimeoutFn = setTimeout; - beta; - minCapacity; - minFillRate; - scaleConstant; - smooth; - currentCapacity = 0; - enabled = false; - lastMaxRate = 0; - measuredTxRate = 0; - requestCount = 0; - fillRate; - lastThrottleTime; - lastTimestamp = 0; - lastTxRateBucket; - maxCapacity; - timeWindow = 0; - constructor(options) { - this.beta = options?.beta ?? 0.7; - this.minCapacity = options?.minCapacity ?? 1; - this.minFillRate = options?.minFillRate ?? 0.5; - this.scaleConstant = options?.scaleConstant ?? 0.4; - this.smooth = options?.smooth ?? 0.8; - const currentTimeInSeconds = this.getCurrentTimeInSeconds(); - this.lastThrottleTime = currentTimeInSeconds; - this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds()); - this.fillRate = this.minFillRate; - this.maxCapacity = this.minCapacity; - } - getCurrentTimeInSeconds() { - return Date.now() / 1000; - } - async getSendToken() { - return this.acquireTokenBucket(1); - } - async acquireTokenBucket(amount) { - if (!this.enabled) { - return; - } - this.refillTokenBucket(); - if (amount > this.currentCapacity) { - const delay = ((amount - this.currentCapacity) / this.fillRate) * 1000; - await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay)); - } - this.currentCapacity = this.currentCapacity - amount; - } - refillTokenBucket() { - const timestamp = this.getCurrentTimeInSeconds(); - if (!this.lastTimestamp) { - this.lastTimestamp = timestamp; - return; - } - const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate; - this.currentCapacity = Math.min(this.maxCapacity, this.currentCapacity + fillAmount); - this.lastTimestamp = timestamp; - } - updateClientSendingRate(response) { - let calculatedRate; - this.updateMeasuredRate(); - if (serviceErrorClassification.isThrottlingError(response)) { - const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate); - this.lastMaxRate = rateToUse; - this.calculateTimeWindow(); - this.lastThrottleTime = this.getCurrentTimeInSeconds(); - calculatedRate = this.cubicThrottle(rateToUse); - this.enableTokenBucket(); +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.sdkStreamMixin = void 0; +const node_http_handler_1 = __nccwpck_require__(9245); +const util_buffer_from_1 = __nccwpck_require__(4151); +const stream_1 = __nccwpck_require__(2203); +const sdk_stream_mixin_browser_1 = __nccwpck_require__(2207); +const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; +const sdkStreamMixin = (stream) => { + if (!(stream instanceof stream_1.Readable)) { + try { + return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); } - else { - this.calculateTimeWindow(); - calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds()); + catch (e) { + const name = stream?.__proto__?.constructor?.name || stream; + throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); } - const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate); - this.updateTokenBucketRate(newRate); - } - calculateTimeWindow() { - this.timeWindow = this.getPrecise(Math.pow((this.lastMaxRate * (1 - this.beta)) / this.scaleConstant, 1 / 3)); - } - cubicThrottle(rateToUse) { - return this.getPrecise(rateToUse * this.beta); - } - cubicSuccess(timestamp) { - return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate); } - enableTokenBucket() { - this.enabled = true; - } - updateTokenBucketRate(newRate) { - this.refillTokenBucket(); - this.fillRate = Math.max(newRate, this.minFillRate); - this.maxCapacity = Math.max(newRate, this.minCapacity); - this.currentCapacity = Math.min(this.currentCapacity, this.maxCapacity); - } - updateMeasuredRate() { - const t = this.getCurrentTimeInSeconds(); - const timeBucket = Math.floor(t * 2) / 2; - this.requestCount++; - if (timeBucket > this.lastTxRateBucket) { - const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket); - this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth)); - this.requestCount = 0; - this.lastTxRateBucket = timeBucket; + let transformed = false; + const transformToByteArray = async () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); } + transformed = true; + return await (0, node_http_handler_1.streamCollector)(stream); + }; + return Object.assign(stream, { + transformToByteArray, + transformToString: async (encoding) => { + const buf = await transformToByteArray(); + if (encoding === undefined || Buffer.isEncoding(encoding)) { + return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); + } + else { + const decoder = new TextDecoder(encoding); + return decoder.decode(buf); + } + }, + transformToWebStream: () => { + if (transformed) { + throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); + } + if (stream.readableFlowing !== null) { + throw new Error("The stream has been consumed by other callbacks."); + } + if (typeof stream_1.Readable.toWeb !== "function") { + throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); + } + transformed = true; + return stream_1.Readable.toWeb(stream); + }, + }); +}; +exports.sdkStreamMixin = sdkStreamMixin; + + +/***/ }), + +/***/ 7570: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.splitStream = splitStream; +async function splitStream(stream) { + if (typeof stream.stream === "function") { + stream = stream.stream(); } - getPrecise(num) { - return parseFloat(num.toFixed(8)); + const readableStream = stream; + return readableStream.tee(); +} + + +/***/ }), + +/***/ 2108: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.splitStream = splitStream; +const stream_1 = __nccwpck_require__(2203); +const splitStream_browser_1 = __nccwpck_require__(7570); +const stream_type_check_1 = __nccwpck_require__(4414); +async function splitStream(stream) { + if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { + return (0, splitStream_browser_1.splitStream)(stream); } + const stream1 = new stream_1.PassThrough(); + const stream2 = new stream_1.PassThrough(); + stream.pipe(stream1); + stream.pipe(stream2); + return [stream1, stream2]; } -const DEFAULT_RETRY_DELAY_BASE = 100; -const MAXIMUM_RETRY_DELAY = 20 * 1000; -const THROTTLING_RETRY_DELAY_BASE = 500; -const INITIAL_RETRY_TOKENS = 500; -const RETRY_COST = 5; -const TIMEOUT_RETRY_COST = 10; -const NO_RETRY_INCREMENT = 1; -const INVOCATION_ID_HEADER = "amz-sdk-invocation-id"; -const REQUEST_HEADER = "amz-sdk-request"; -const getDefaultRetryBackoffStrategy = () => { - let delayBase = DEFAULT_RETRY_DELAY_BASE; - const computeNextBackoffDelay = (attempts) => { - return Math.floor(Math.min(MAXIMUM_RETRY_DELAY, Math.random() * 2 ** attempts * delayBase)); - }; - const setDelayBase = (delay) => { - delayBase = delay; - }; - return { - computeNextBackoffDelay, - setDelayBase, - }; +/***/ }), + +/***/ 4414: +/***/ ((__unused_webpack_module, exports) => { + +"use strict"; + +Object.defineProperty(exports, "__esModule", ({ value: true })); +exports.isBlob = exports.isReadableStream = void 0; +const isReadableStream = (stream) => typeof ReadableStream === "function" && + (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); +exports.isReadableStream = isReadableStream; +const isBlob = (blob) => { + return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); }; +exports.isBlob = isBlob; -const createDefaultRetryToken = ({ retryDelay, retryCount, retryCost, }) => { - const getRetryCount = () => retryCount; - const getRetryDelay = () => Math.min(MAXIMUM_RETRY_DELAY, retryDelay); - const getRetryCost = () => retryCost; - return { - getRetryCount, - getRetryDelay, - getRetryCost, + +/***/ }), + +/***/ 9245: +/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { + +"use strict"; + + +var protocolHttp = __nccwpck_require__(2356); +var querystringBuilder = __nccwpck_require__(8256); +var http = __nccwpck_require__(8611); +var https = __nccwpck_require__(5692); +var stream = __nccwpck_require__(2203); +var http2 = __nccwpck_require__(5675); + +const NODEJS_TIMEOUT_ERROR_CODES = ["ECONNRESET", "EPIPE", "ETIMEDOUT"]; + +const getTransformedHeaders = (headers) => { + const transformedHeaders = {}; + for (const name of Object.keys(headers)) { + const headerValues = headers[name]; + transformedHeaders[name] = Array.isArray(headerValues) ? headerValues.join(",") : headerValues; + } + return transformedHeaders; +}; + +const timing = { + setTimeout: (cb, ms) => setTimeout(cb, ms), + clearTimeout: (timeoutId) => clearTimeout(timeoutId), +}; + +const DEFER_EVENT_LISTENER_TIME$2 = 1000; +const setConnectionTimeout = (request, reject, timeoutInMs = 0) => { + if (!timeoutInMs) { + return -1; + } + const registerTimeout = (offset) => { + const timeoutId = timing.setTimeout(() => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket did not establish a connection with the server within the configured timeout of ${timeoutInMs} ms.`), { + name: "TimeoutError", + })); + }, timeoutInMs - offset); + const doWithSocket = (socket) => { + if (socket?.connecting) { + socket.on("connect", () => { + timing.clearTimeout(timeoutId); + }); + } + else { + timing.clearTimeout(timeoutId); + } + }; + if (request.socket) { + doWithSocket(request.socket); + } + else { + request.on("socket", doWithSocket); + } }; + if (timeoutInMs < 2000) { + registerTimeout(0); + return 0; + } + return timing.setTimeout(registerTimeout.bind(null, DEFER_EVENT_LISTENER_TIME$2), DEFER_EVENT_LISTENER_TIME$2); }; -class StandardRetryStrategy { - maxAttempts; - mode = exports.RETRY_MODES.STANDARD; - capacity = INITIAL_RETRY_TOKENS; - retryBackoffStrategy = getDefaultRetryBackoffStrategy(); - maxAttemptsProvider; - constructor(maxAttempts) { - this.maxAttempts = maxAttempts; - this.maxAttemptsProvider = typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts; +const setRequestTimeout = (req, reject, timeoutInMs = 0, throwOnRequestTimeout, logger) => { + if (timeoutInMs) { + return timing.setTimeout(() => { + let msg = `@smithy/node-http-handler - [${throwOnRequestTimeout ? "ERROR" : "WARN"}] a request has exceeded the configured ${timeoutInMs} ms requestTimeout.`; + if (throwOnRequestTimeout) { + const error = Object.assign(new Error(msg), { + name: "TimeoutError", + code: "ETIMEDOUT", + }); + req.destroy(error); + reject(error); + } + else { + msg += ` Init client requestHandler with throwOnRequestTimeout=true to turn this into an error.`; + logger?.warn?.(msg); + } + }, timeoutInMs); } - async acquireInitialRetryToken(retryTokenScope) { - return createDefaultRetryToken({ - retryDelay: DEFAULT_RETRY_DELAY_BASE, - retryCount: 0, - }); + return -1; +}; + +const DEFER_EVENT_LISTENER_TIME$1 = 3000; +const setSocketKeepAlive = (request, { keepAlive, keepAliveMsecs }, deferTimeMs = DEFER_EVENT_LISTENER_TIME$1) => { + if (keepAlive !== true) { + return -1; } - async refreshRetryTokenForRetry(token, errorInfo) { - const maxAttempts = await this.getMaxAttempts(); - if (this.shouldRetry(token, errorInfo, maxAttempts)) { - const errorType = errorInfo.errorType; - this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? THROTTLING_RETRY_DELAY_BASE : DEFAULT_RETRY_DELAY_BASE); - const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount()); - const retryDelay = errorInfo.retryAfterHint - ? Math.max(errorInfo.retryAfterHint.getTime() - Date.now() || 0, delayFromErrorType) - : delayFromErrorType; - const capacityCost = this.getCapacityCost(errorType); - this.capacity -= capacityCost; - return createDefaultRetryToken({ - retryDelay, - retryCount: token.getRetryCount() + 1, - retryCost: capacityCost, + const registerListener = () => { + if (request.socket) { + request.socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); + } + else { + request.on("socket", (socket) => { + socket.setKeepAlive(keepAlive, keepAliveMsecs || 0); }); } - throw new Error("No retry token available"); - } - recordSuccess(token) { - this.capacity = Math.max(INITIAL_RETRY_TOKENS, this.capacity + (token.getRetryCost() ?? NO_RETRY_INCREMENT)); - } - getCapacity() { - return this.capacity; + }; + if (deferTimeMs === 0) { + registerListener(); + return 0; } - async getMaxAttempts() { - try { - return await this.maxAttemptsProvider(); + return timing.setTimeout(registerListener, deferTimeMs); +}; + +const DEFER_EVENT_LISTENER_TIME = 3000; +const setSocketTimeout = (request, reject, timeoutInMs = 0) => { + const registerTimeout = (offset) => { + const timeout = timeoutInMs - offset; + const onTimeout = () => { + request.destroy(); + reject(Object.assign(new Error(`@smithy/node-http-handler - the request socket timed out after ${timeoutInMs} ms of inactivity (configured by client requestHandler).`), { name: "TimeoutError" })); + }; + if (request.socket) { + request.socket.setTimeout(timeout, onTimeout); + request.on("close", () => request.socket?.removeListener("timeout", onTimeout)); } - catch (error) { - console.warn(`Max attempts provider could not resolve. Using default of ${DEFAULT_MAX_ATTEMPTS}`); - return DEFAULT_MAX_ATTEMPTS; + else { + request.setTimeout(timeout, onTimeout); } + }; + if (0 < timeoutInMs && timeoutInMs < 6000) { + registerTimeout(0); + return 0; } - shouldRetry(tokenToRenew, errorInfo, maxAttempts) { - const attempts = tokenToRenew.getRetryCount() + 1; - return (attempts < maxAttempts && - this.capacity >= this.getCapacityCost(errorInfo.errorType) && - this.isRetryableError(errorInfo.errorType)); + return timing.setTimeout(registerTimeout.bind(null, timeoutInMs === 0 ? 0 : DEFER_EVENT_LISTENER_TIME), DEFER_EVENT_LISTENER_TIME); +}; + +const MIN_WAIT_TIME = 6_000; +async function writeRequestBody(httpRequest, request, maxContinueTimeoutMs = MIN_WAIT_TIME, externalAgent = false) { + const headers = request.headers ?? {}; + const expect = headers.Expect || headers.expect; + let timeoutId = -1; + let sendBody = true; + if (!externalAgent && expect === "100-continue") { + sendBody = await Promise.race([ + new Promise((resolve) => { + timeoutId = Number(timing.setTimeout(() => resolve(true), Math.max(MIN_WAIT_TIME, maxContinueTimeoutMs))); + }), + new Promise((resolve) => { + httpRequest.on("continue", () => { + timing.clearTimeout(timeoutId); + resolve(true); + }); + httpRequest.on("response", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + httpRequest.on("error", () => { + timing.clearTimeout(timeoutId); + resolve(false); + }); + }), + ]); } - getCapacityCost(errorType) { - return errorType === "TRANSIENT" ? TIMEOUT_RETRY_COST : RETRY_COST; + if (sendBody) { + writeBody(httpRequest, request.body); } - isRetryableError(errorType) { - return errorType === "THROTTLING" || errorType === "TRANSIENT"; +} +function writeBody(httpRequest, body) { + if (body instanceof stream.Readable) { + body.pipe(httpRequest); + return; + } + if (body) { + const isBuffer = Buffer.isBuffer(body); + const isString = typeof body === "string"; + if (isBuffer || isString) { + if (isBuffer && body.byteLength === 0) { + httpRequest.end(); + } + else { + httpRequest.end(body); + } + return; + } + const uint8 = body; + if (typeof uint8 === "object" && + uint8.buffer && + typeof uint8.byteOffset === "number" && + typeof uint8.byteLength === "number") { + httpRequest.end(Buffer.from(uint8.buffer, uint8.byteOffset, uint8.byteLength)); + return; + } + httpRequest.end(Buffer.from(body)); + return; } + httpRequest.end(); } -class AdaptiveRetryStrategy { - maxAttemptsProvider; - rateLimiter; - standardRetryStrategy; - mode = exports.RETRY_MODES.ADAPTIVE; - constructor(maxAttemptsProvider, options) { - this.maxAttemptsProvider = maxAttemptsProvider; - const { rateLimiter } = options ?? {}; - this.rateLimiter = rateLimiter ?? new DefaultRateLimiter(); - this.standardRetryStrategy = new StandardRetryStrategy(maxAttemptsProvider); +const DEFAULT_REQUEST_TIMEOUT = 0; +class NodeHttpHandler { + config; + configProvider; + socketWarningTimestamp = 0; + externalAgent = false; + metadata = { handlerProtocol: "http/1.1" }; + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttpHandler(instanceOrOptions); } - async acquireInitialRetryToken(retryTokenScope) { - await this.rateLimiter.getSendToken(); - return this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope); + static checkSocketUsage(agent, socketWarningTimestamp, logger = console) { + const { sockets, requests, maxSockets } = agent; + if (typeof maxSockets !== "number" || maxSockets === Infinity) { + return socketWarningTimestamp; + } + const interval = 15_000; + if (Date.now() - interval < socketWarningTimestamp) { + return socketWarningTimestamp; + } + if (sockets && requests) { + for (const origin in sockets) { + const socketsInUse = sockets[origin]?.length ?? 0; + const requestsEnqueued = requests[origin]?.length ?? 0; + if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) { + logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued. +See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html +or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`); + return Date.now(); + } + } + } + return socketWarningTimestamp; } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - this.rateLimiter.updateClientSendingRate(errorInfo); - return this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo); + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((_options) => { + resolve(this.resolveDefaultConfig(_options)); + }) + .catch(reject); + } + else { + resolve(this.resolveDefaultConfig(options)); + } + }); } - recordSuccess(token) { - this.rateLimiter.updateClientSendingRate({}); - this.standardRetryStrategy.recordSuccess(token); + resolveDefaultConfig(options) { + const { requestTimeout, connectionTimeout, socketTimeout, socketAcquisitionWarningTimeout, httpAgent, httpsAgent, throwOnRequestTimeout, logger, } = options || {}; + const keepAlive = true; + const maxSockets = 50; + return { + connectionTimeout, + requestTimeout, + socketTimeout, + socketAcquisitionWarningTimeout, + throwOnRequestTimeout, + httpAgent: (() => { + if (httpAgent instanceof http.Agent || typeof httpAgent?.destroy === "function") { + this.externalAgent = true; + return httpAgent; + } + return new http.Agent({ keepAlive, maxSockets, ...httpAgent }); + })(), + httpsAgent: (() => { + if (httpsAgent instanceof https.Agent || typeof httpsAgent?.destroy === "function") { + this.externalAgent = true; + return httpsAgent; + } + return new https.Agent({ keepAlive, maxSockets, ...httpsAgent }); + })(), + logger, + }; } -} - -class ConfiguredRetryStrategy extends StandardRetryStrategy { - computeNextBackoffDelay; - constructor(maxAttempts, computeNextBackoffDelay = DEFAULT_RETRY_DELAY_BASE) { - super(typeof maxAttempts === "function" ? maxAttempts : async () => maxAttempts); - if (typeof computeNextBackoffDelay === "number") { - this.computeNextBackoffDelay = () => computeNextBackoffDelay; - } - else { - this.computeNextBackoffDelay = computeNextBackoffDelay; + destroy() { + this.config?.httpAgent?.destroy(); + this.config?.httpsAgent?.destroy(); + } + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; } + return new Promise((_resolve, _reject) => { + const config = this.config; + let writeRequestBodyPromise = undefined; + const timeouts = []; + const resolve = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + timeouts.forEach(timing.clearTimeout); + _reject(arg); + }; + if (abortSignal?.aborted) { + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; + } + const isSSL = request.protocol === "https:"; + const headers = request.headers ?? {}; + const expectContinue = (headers.Expect ?? headers.expect) === "100-continue"; + let agent = isSSL ? config.httpsAgent : config.httpAgent; + if (expectContinue && !this.externalAgent) { + agent = new (isSSL ? https.Agent : http.Agent)({ + keepAlive: false, + maxSockets: Infinity, + }); + } + timeouts.push(timing.setTimeout(() => { + this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, config.logger); + }, config.socketAcquisitionWarningTimeout ?? (config.requestTimeout ?? 2000) + (config.connectionTimeout ?? 1000))); + const queryString = querystringBuilder.buildQueryString(request.query || {}); + let auth = undefined; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}`; + } + let path = request.path; + if (queryString) { + path += `?${queryString}`; + } + if (request.fragment) { + path += `#${request.fragment}`; + } + let hostname = request.hostname ?? ""; + if (hostname[0] === "[" && hostname.endsWith("]")) { + hostname = request.hostname.slice(1, -1); + } + else { + hostname = request.hostname; + } + const nodeHttpsOptions = { + headers: request.headers, + host: hostname, + method: request.method, + path, + port: request.port, + agent, + auth, + }; + const requestFunc = isSSL ? https.request : http.request; + const req = requestFunc(nodeHttpsOptions, (res) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: res.statusCode || -1, + reason: res.statusMessage, + headers: getTransformedHeaders(res.headers), + body: res, + }); + resolve({ response: httpResponse }); + }); + req.on("error", (err) => { + if (NODEJS_TIMEOUT_ERROR_CODES.includes(err.code)) { + reject(Object.assign(err, { name: "TimeoutError" })); + } + else { + reject(err); + } + }); + if (abortSignal) { + const onAbort = () => { + req.destroy(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); + } + else { + abortSignal.onabort = onAbort; + } + } + const effectiveRequestTimeout = requestTimeout ?? config.requestTimeout; + timeouts.push(setConnectionTimeout(req, reject, config.connectionTimeout)); + timeouts.push(setRequestTimeout(req, reject, effectiveRequestTimeout, config.throwOnRequestTimeout, config.logger ?? console)); + timeouts.push(setSocketTimeout(req, reject, config.socketTimeout)); + const httpAgent = nodeHttpsOptions.agent; + if (typeof httpAgent === "object" && "keepAlive" in httpAgent) { + timeouts.push(setSocketKeepAlive(req, { + keepAlive: httpAgent.keepAlive, + keepAliveMsecs: httpAgent.keepAliveMsecs, + })); + } + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout, this.externalAgent).catch((e) => { + timeouts.forEach(timing.clearTimeout); + return _reject(e); + }); + }); + } + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); } - async refreshRetryTokenForRetry(tokenToRenew, errorInfo) { - const token = await super.refreshRetryTokenForRetry(tokenToRenew, errorInfo); - token.getRetryDelay = () => this.computeNextBackoffDelay(token.getRetryCount()); - return token; + httpHandlerConfigs() { + return this.config ?? {}; } } -exports.AdaptiveRetryStrategy = AdaptiveRetryStrategy; -exports.ConfiguredRetryStrategy = ConfiguredRetryStrategy; -exports.DEFAULT_MAX_ATTEMPTS = DEFAULT_MAX_ATTEMPTS; -exports.DEFAULT_RETRY_DELAY_BASE = DEFAULT_RETRY_DELAY_BASE; -exports.DEFAULT_RETRY_MODE = DEFAULT_RETRY_MODE; -exports.DefaultRateLimiter = DefaultRateLimiter; -exports.INITIAL_RETRY_TOKENS = INITIAL_RETRY_TOKENS; -exports.INVOCATION_ID_HEADER = INVOCATION_ID_HEADER; -exports.MAXIMUM_RETRY_DELAY = MAXIMUM_RETRY_DELAY; -exports.NO_RETRY_INCREMENT = NO_RETRY_INCREMENT; -exports.REQUEST_HEADER = REQUEST_HEADER; -exports.RETRY_COST = RETRY_COST; -exports.StandardRetryStrategy = StandardRetryStrategy; -exports.THROTTLING_RETRY_DELAY_BASE = THROTTLING_RETRY_DELAY_BASE; -exports.TIMEOUT_RETRY_COST = TIMEOUT_RETRY_COST; - - -/***/ }), - -/***/ 1732: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ByteArrayCollector = void 0; -class ByteArrayCollector { - allocByteArray; - byteLength = 0; - byteArrays = []; - constructor(allocByteArray) { - this.allocByteArray = allocByteArray; - } - push(byteArray) { - this.byteArrays.push(byteArray); - this.byteLength += byteArray.byteLength; +class NodeHttp2ConnectionPool { + sessions = []; + constructor(sessions) { + this.sessions = sessions ?? []; } - flush() { - if (this.byteArrays.length === 1) { - const bytes = this.byteArrays[0]; - this.reset(); - return bytes; - } - const aggregation = this.allocByteArray(this.byteLength); - let cursor = 0; - for (let i = 0; i < this.byteArrays.length; ++i) { - const bytes = this.byteArrays[i]; - aggregation.set(bytes, cursor); - cursor += bytes.byteLength; + poll() { + if (this.sessions.length > 0) { + return this.sessions.shift(); } - this.reset(); - return aggregation; } - reset() { - this.byteArrays = []; - this.byteLength = 0; + offerLast(session) { + this.sessions.push(session); + } + contains(session) { + return this.sessions.includes(session); + } + remove(session) { + this.sessions = this.sessions.filter((s) => s !== session); + } + [Symbol.iterator]() { + return this.sessions[Symbol.iterator](); + } + destroy(connection) { + for (const session of this.sessions) { + if (session === connection) { + if (!session.destroyed) { + session.destroy(); + } + } + } } } -exports.ByteArrayCollector = ByteArrayCollector; - - -/***/ }), - -/***/ 7753: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const ReadableStreamRef = typeof ReadableStream === "function" ? ReadableStream : function () { }; -class ChecksumStream extends ReadableStreamRef { -} -exports.ChecksumStream = ChecksumStream; - -/***/ }), - -/***/ 1775: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.ChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(8385); -const stream_1 = __nccwpck_require__(2203); -class ChecksumStream extends stream_1.Duplex { - expectedChecksum; - checksumSourceLocation; - checksum; - source; - base64Encoder; - constructor({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) { - super(); - if (typeof source.pipe === "function") { - this.source = source; +class NodeHttp2ConnectionManager { + constructor(config) { + this.config = config; + if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) { + throw new RangeError("maxConcurrency must be greater than zero."); } - else { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); + } + config; + sessionCache = new Map(); + lease(requestContext, connectionConfiguration) { + const url = this.getUrlString(requestContext); + const existingPool = this.sessionCache.get(url); + if (existingPool) { + const existingSession = existingPool.poll(); + if (existingSession && !this.config.disableConcurrency) { + return existingSession; + } } - this.base64Encoder = base64Encoder ?? util_base64_1.toBase64; - this.expectedChecksum = expectedChecksum; - this.checksum = checksum; - this.checksumSourceLocation = checksumSourceLocation; - this.source.pipe(this); + const session = http2.connect(url); + if (this.config.maxConcurrency) { + session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => { + if (err) { + throw new Error("Fail to set maxConcurrentStreams to " + + this.config.maxConcurrency + + "when creating new session for " + + requestContext.destination.toString()); + } + }); + } + session.unref(); + const destroySessionCb = () => { + session.destroy(); + this.deleteSession(url, session); + }; + session.on("goaway", destroySessionCb); + session.on("error", destroySessionCb); + session.on("frameError", destroySessionCb); + session.on("close", () => this.deleteSession(url, session)); + if (connectionConfiguration.requestTimeout) { + session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb); + } + const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool(); + connectionPool.offerLast(session); + this.sessionCache.set(url, connectionPool); + return session; } - _read(size) { } - _write(chunk, encoding, callback) { - try { - this.checksum.update(chunk); - this.push(chunk); + deleteSession(authority, session) { + const existingConnectionPool = this.sessionCache.get(authority); + if (!existingConnectionPool) { + return; } - catch (e) { - return callback(e); + if (!existingConnectionPool.contains(session)) { + return; } - return callback(); + existingConnectionPool.remove(session); + this.sessionCache.set(authority, existingConnectionPool); } - async _final(callback) { - try { - const digest = await this.checksum.digest(); - const received = this.base64Encoder(digest); - if (this.expectedChecksum !== received) { - return callback(new Error(`Checksum mismatch: expected "${this.expectedChecksum}" but received "${received}"` + - ` in response header "${this.checksumSourceLocation}".`)); + release(requestContext, session) { + const cacheKey = this.getUrlString(requestContext); + this.sessionCache.get(cacheKey)?.offerLast(session); + } + destroy() { + for (const [key, connectionPool] of this.sessionCache) { + for (const session of connectionPool) { + if (!session.destroyed) { + session.destroy(); + } + connectionPool.remove(session); } + this.sessionCache.delete(key); } - catch (e) { - return callback(e); + } + setMaxConcurrentStreams(maxConcurrentStreams) { + if (maxConcurrentStreams && maxConcurrentStreams <= 0) { + throw new RangeError("maxConcurrentStreams must be greater than zero."); } - this.push(null); - return callback(); + this.config.maxConcurrency = maxConcurrentStreams; + } + setDisableConcurrentStreams(disableConcurrentStreams) { + this.config.disableConcurrency = disableConcurrentStreams; + } + getUrlString(request) { + return request.destination.toString(); } } -exports.ChecksumStream = ChecksumStream; - - -/***/ }), - -/***/ 4129: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = void 0; -const util_base64_1 = __nccwpck_require__(8385); -const stream_type_check_1 = __nccwpck_require__(4414); -const ChecksumStream_browser_1 = __nccwpck_require__(7753); -const createChecksumStream = ({ expectedChecksum, checksum, source, checksumSourceLocation, base64Encoder, }) => { - if (!(0, stream_type_check_1.isReadableStream)(source)) { - throw new Error(`@smithy/util-stream: unsupported source type ${source?.constructor?.name ?? source} in ChecksumStream.`); - } - const encoder = base64Encoder ?? util_base64_1.toBase64; - if (typeof TransformStream !== "function") { - throw new Error("@smithy/util-stream: unable to instantiate ChecksumStream because API unavailable: ReadableStream/TransformStream."); +class NodeHttp2Handler { + config; + configProvider; + metadata = { handlerProtocol: "h2" }; + connectionManager = new NodeHttp2ConnectionManager({}); + static create(instanceOrOptions) { + if (typeof instanceOrOptions?.handle === "function") { + return instanceOrOptions; + } + return new NodeHttp2Handler(instanceOrOptions); } - const transform = new TransformStream({ - start() { }, - async transform(chunk, controller) { - checksum.update(chunk); - controller.enqueue(chunk); - }, - async flush(controller) { - const digest = await checksum.digest(); - const received = encoder(digest); - if (expectedChecksum !== received) { - const error = new Error(`Checksum mismatch: expected "${expectedChecksum}" but received "${received}"` + - ` in response header "${checksumSourceLocation}".`); - controller.error(error); + constructor(options) { + this.configProvider = new Promise((resolve, reject) => { + if (typeof options === "function") { + options() + .then((opts) => { + resolve(opts || {}); + }) + .catch(reject); } else { - controller.terminate(); + resolve(options || {}); } - }, - }); - source.pipeThrough(transform); - const readable = transform.readable; - Object.setPrototypeOf(readable, ChecksumStream_browser_1.ChecksumStream.prototype); - return readable; -}; -exports.createChecksumStream = createChecksumStream; - - -/***/ }), - -/***/ 5639: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createChecksumStream = createChecksumStream; -const stream_type_check_1 = __nccwpck_require__(4414); -const ChecksumStream_1 = __nccwpck_require__(1775); -const createChecksumStream_browser_1 = __nccwpck_require__(4129); -function createChecksumStream(init) { - if (typeof ReadableStream === "function" && (0, stream_type_check_1.isReadableStream)(init.source)) { - return (0, createChecksumStream_browser_1.createChecksumStream)(init); + }); } - return new ChecksumStream_1.ChecksumStream(init); -} - - -/***/ }), - -/***/ 2005: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = createBufferedReadable; -const node_stream_1 = __nccwpck_require__(7075); -const ByteArrayCollector_1 = __nccwpck_require__(1732); -const createBufferedReadableStream_1 = __nccwpck_require__(8213); -const stream_type_check_1 = __nccwpck_require__(4414); -function createBufferedReadable(upstream, size, logger) { - if ((0, stream_type_check_1.isReadableStream)(upstream)) { - return (0, createBufferedReadableStream_1.createBufferedReadableStream)(upstream, size, logger); + destroy() { + this.connectionManager.destroy(); } - const downstream = new node_stream_1.Readable({ read() { } }); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = [ - "", - new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size)), - new ByteArrayCollector_1.ByteArrayCollector((size) => Buffer.from(new Uint8Array(size))), - ]; - let mode = -1; - upstream.on("data", (chunk) => { - const chunkMode = (0, createBufferedReadableStream_1.modeOf)(chunk, true); - if (mode !== chunkMode) { - if (mode >= 0) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); - } - mode = chunkMode; - } - if (mode === -1) { - downstream.push(chunk); - return; - } - const chunkSize = (0, createBufferedReadableStream_1.sizeOf)(chunk); - bytesSeen += chunkSize; - const bufferSize = (0, createBufferedReadableStream_1.sizeOf)(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - downstream.push(chunk); - } - else { - const newSize = (0, createBufferedReadableStream_1.merge)(buffers, mode, chunk); - if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { - streamBufferingLoggedWarning = true; - logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); - } - if (newSize >= size) { - downstream.push((0, createBufferedReadableStream_1.flush)(buffers, mode)); + async handle(request, { abortSignal, requestTimeout } = {}) { + if (!this.config) { + this.config = await this.configProvider; + this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false); + if (this.config.maxConcurrentStreams) { + this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams); } } - }); - upstream.on("end", () => { - if (mode !== -1) { - const remainder = (0, createBufferedReadableStream_1.flush)(buffers, mode); - if ((0, createBufferedReadableStream_1.sizeOf)(remainder) > 0) { - downstream.push(remainder); + const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config; + const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout; + return new Promise((_resolve, _reject) => { + let fulfilled = false; + let writeRequestBodyPromise = undefined; + const resolve = async (arg) => { + await writeRequestBodyPromise; + _resolve(arg); + }; + const reject = async (arg) => { + await writeRequestBodyPromise; + _reject(arg); + }; + if (abortSignal?.aborted) { + fulfilled = true; + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + reject(abortError); + return; } - } - downstream.push(null); - }); - return downstream; -} - - -/***/ }), - -/***/ 8213: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.createBufferedReadable = void 0; -exports.createBufferedReadableStream = createBufferedReadableStream; -exports.merge = merge; -exports.flush = flush; -exports.sizeOf = sizeOf; -exports.modeOf = modeOf; -const ByteArrayCollector_1 = __nccwpck_require__(1732); -function createBufferedReadableStream(upstream, size, logger) { - const reader = upstream.getReader(); - let streamBufferingLoggedWarning = false; - let bytesSeen = 0; - const buffers = ["", new ByteArrayCollector_1.ByteArrayCollector((size) => new Uint8Array(size))]; - let mode = -1; - const pull = async (controller) => { - const { value, done } = await reader.read(); - const chunk = value; - if (done) { - if (mode !== -1) { - const remainder = flush(buffers, mode); - if (sizeOf(remainder) > 0) { - controller.enqueue(remainder); - } + const { hostname, method, port, protocol, query } = request; + let auth = ""; + if (request.username != null || request.password != null) { + const username = request.username ?? ""; + const password = request.password ?? ""; + auth = `${username}:${password}@`; } - controller.close(); - } - else { - const chunkMode = modeOf(chunk, false); - if (mode !== chunkMode) { - if (mode >= 0) { - controller.enqueue(flush(buffers, mode)); + const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`; + const requestContext = { destination: new URL(authority) }; + const session = this.connectionManager.lease(requestContext, { + requestTimeout: this.config?.sessionTimeout, + disableConcurrentStreams: disableConcurrentStreams || false, + }); + const rejectWithDestroy = (err) => { + if (disableConcurrentStreams) { + this.destroySession(session); } - mode = chunkMode; - } - if (mode === -1) { - controller.enqueue(chunk); - return; + fulfilled = true; + reject(err); + }; + const queryString = querystringBuilder.buildQueryString(query || {}); + let path = request.path; + if (queryString) { + path += `?${queryString}`; } - const chunkSize = sizeOf(chunk); - bytesSeen += chunkSize; - const bufferSize = sizeOf(buffers[mode]); - if (chunkSize >= size && bufferSize === 0) { - controller.enqueue(chunk); + if (request.fragment) { + path += `#${request.fragment}`; } - else { - const newSize = merge(buffers, mode, chunk); - if (!streamBufferingLoggedWarning && bytesSeen > size * 2) { - streamBufferingLoggedWarning = true; - logger?.warn(`@smithy/util-stream - stream chunk size ${chunkSize} is below threshold of ${size}, automatically buffering.`); + const req = session.request({ + ...request.headers, + [http2.constants.HTTP2_HEADER_PATH]: path, + [http2.constants.HTTP2_HEADER_METHOD]: method, + }); + session.ref(); + req.on("response", (headers) => { + const httpResponse = new protocolHttp.HttpResponse({ + statusCode: headers[":status"] || -1, + headers: getTransformedHeaders(headers), + body: req, + }); + fulfilled = true; + resolve({ response: httpResponse }); + if (disableConcurrentStreams) { + session.close(); + this.connectionManager.deleteSession(authority, session); } - if (newSize >= size) { - controller.enqueue(flush(buffers, mode)); + }); + if (effectiveRequestTimeout) { + req.setTimeout(effectiveRequestTimeout, () => { + req.close(); + const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`); + timeoutError.name = "TimeoutError"; + rejectWithDestroy(timeoutError); + }); + } + if (abortSignal) { + const onAbort = () => { + req.close(); + const abortError = new Error("Request aborted"); + abortError.name = "AbortError"; + rejectWithDestroy(abortError); + }; + if (typeof abortSignal.addEventListener === "function") { + const signal = abortSignal; + signal.addEventListener("abort", onAbort, { once: true }); + req.once("close", () => signal.removeEventListener("abort", onAbort)); } else { - await pull(controller); + abortSignal.onabort = onAbort; } } - } - }; - return new ReadableStream({ - pull, - }); -} -exports.createBufferedReadable = createBufferedReadableStream; -function merge(buffers, mode, chunk) { - switch (mode) { - case 0: - buffers[0] += chunk; - return sizeOf(buffers[0]); - case 1: - case 2: - buffers[mode].push(chunk); - return sizeOf(buffers[mode]); - } -} -function flush(buffers, mode) { - switch (mode) { - case 0: - const s = buffers[0]; - buffers[0] = ""; - return s; - case 1: - case 2: - return buffers[mode].flush(); + req.on("frameError", (type, code, id) => { + rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`)); + }); + req.on("error", rejectWithDestroy); + req.on("aborted", () => { + rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`)); + }); + req.on("close", () => { + session.unref(); + if (disableConcurrentStreams) { + session.destroy(); + } + if (!fulfilled) { + rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response")); + } + }); + writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout); + }); } - throw new Error(`@smithy/util-stream - invalid index ${mode} given to flush()`); -} -function sizeOf(chunk) { - return chunk?.byteLength ?? chunk?.length ?? 0; -} -function modeOf(chunk, allowBuffer = true) { - if (allowBuffer && typeof Buffer !== "undefined" && chunk instanceof Buffer) { - return 2; + updateHttpClientConfig(key, value) { + this.config = undefined; + this.configProvider = this.configProvider.then((config) => { + return { + ...config, + [key]: value, + }; + }); } - if (chunk instanceof Uint8Array) { - return 1; + httpHandlerConfigs() { + return this.config ?? {}; } - if (typeof chunk === "string") { - return 0; + destroySession(session) { + if (!session.destroyed) { + session.destroy(); + } } - return -1; } - -/***/ }), - -/***/ 6522: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.getAwsChunkedEncodingStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const getAwsChunkedEncodingStream = (readableStream, options) => { - const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options; - const checksumRequired = base64Encoder !== undefined && - checksumAlgorithmFn !== undefined && - checksumLocationName !== undefined && - streamHasher !== undefined; - const digest = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : undefined; - const awsChunkedEncodingStream = new stream_1.Readable({ read: () => { } }); - readableStream.on("data", (data) => { - const length = bodyLengthChecker(data) || 0; - awsChunkedEncodingStream.push(`${length.toString(16)}\r\n`); - awsChunkedEncodingStream.push(data); - awsChunkedEncodingStream.push("\r\n"); - }); - readableStream.on("end", async () => { - awsChunkedEncodingStream.push(`0\r\n`); - if (checksumRequired) { - const checksum = base64Encoder(await digest); - awsChunkedEncodingStream.push(`${checksumLocationName}:${checksum}\r\n`); - awsChunkedEncodingStream.push(`\r\n`); - } - awsChunkedEncodingStream.push(null); - }); - return awsChunkedEncodingStream; -}; -exports.getAwsChunkedEncodingStream = getAwsChunkedEncodingStream; - - -/***/ }), - -/***/ 66: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = headStream; -async function headStream(stream, bytes) { - let byteLengthCounter = 0; - const chunks = []; - const reader = stream.getReader(); - let isDone = false; - while (!isDone) { - const { done, value } = await reader.read(); - if (value) { - chunks.push(value); - byteLengthCounter += value?.byteLength ?? 0; - } - if (byteLengthCounter >= bytes) { - break; - } - isDone = done; - } - reader.releaseLock(); - const collected = new Uint8Array(Math.min(bytes, byteLengthCounter)); - let offset = 0; - for (const chunk of chunks) { - if (chunk.byteLength > collected.byteLength - offset) { - collected.set(chunk.subarray(0, collected.byteLength - offset), offset); - break; - } - else { - collected.set(chunk, offset); - } - offset += chunk.length; +class Collector extends stream.Writable { + bufferedBytes = []; + _write(chunk, encoding, callback) { + this.bufferedBytes.push(chunk); + callback(); } - return collected; } - -/***/ }), - -/***/ 8412: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.headStream = void 0; -const stream_1 = __nccwpck_require__(2203); -const headStream_browser_1 = __nccwpck_require__(66); -const stream_type_check_1 = __nccwpck_require__(4414); -const headStream = (stream, bytes) => { - if ((0, stream_type_check_1.isReadableStream)(stream)) { - return (0, headStream_browser_1.headStream)(stream, bytes); +const streamCollector = (stream) => { + if (isReadableStreamInstance(stream)) { + return collectReadableStream(stream); } return new Promise((resolve, reject) => { const collector = new Collector(); - collector.limit = bytes; stream.pipe(collector); stream.on("error", (err) => { collector.end(); @@ -25109,318 +27608,38 @@ const headStream = (stream, bytes) => { }); collector.on("error", reject); collector.on("finish", function () { - const bytes = new Uint8Array(Buffer.concat(this.buffers)); + const bytes = new Uint8Array(Buffer.concat(this.bufferedBytes)); resolve(bytes); }); }); }; -exports.headStream = headStream; -class Collector extends stream_1.Writable { - buffers = []; - limit = Infinity; - bytesBuffered = 0; - _write(chunk, encoding, callback) { - this.buffers.push(chunk); - this.bytesBuffered += chunk.byteLength ?? 0; - if (this.bytesBuffered >= this.limit) { - const excess = this.bytesBuffered - this.limit; - const tailBuffer = this.buffers[this.buffers.length - 1]; - this.buffers[this.buffers.length - 1] = tailBuffer.subarray(0, tailBuffer.byteLength - excess); - this.emit("finish"); - } - callback(); - } -} - - -/***/ }), - -/***/ 4252: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - - -var utilBase64 = __nccwpck_require__(8385); -var utilUtf8 = __nccwpck_require__(1577); -var ChecksumStream = __nccwpck_require__(1775); -var createChecksumStream = __nccwpck_require__(5639); -var createBufferedReadable = __nccwpck_require__(2005); -var getAwsChunkedEncodingStream = __nccwpck_require__(6522); -var headStream = __nccwpck_require__(8412); -var sdkStreamMixin = __nccwpck_require__(7201); -var splitStream = __nccwpck_require__(2108); -var streamTypeCheck = __nccwpck_require__(4414); - -class Uint8ArrayBlobAdapter extends Uint8Array { - static fromString(source, encoding = "utf-8") { - if (typeof source === "string") { - if (encoding === "base64") { - return Uint8ArrayBlobAdapter.mutate(utilBase64.fromBase64(source)); - } - return Uint8ArrayBlobAdapter.mutate(utilUtf8.fromUtf8(source)); - } - throw new Error(`Unsupported conversion from ${typeof source} to Uint8ArrayBlobAdapter.`); - } - static mutate(source) { - Object.setPrototypeOf(source, Uint8ArrayBlobAdapter.prototype); - return source; - } - transformToString(encoding = "utf-8") { - if (encoding === "base64") { - return utilBase64.toBase64(this); - } - return utilUtf8.toUtf8(this); - } -} - -exports.Uint8ArrayBlobAdapter = Uint8ArrayBlobAdapter; -Object.keys(ChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return ChecksumStream[k]; } - }); -}); -Object.keys(createChecksumStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createChecksumStream[k]; } - }); -}); -Object.keys(createBufferedReadable).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return createBufferedReadable[k]; } - }); -}); -Object.keys(getAwsChunkedEncodingStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return getAwsChunkedEncodingStream[k]; } - }); -}); -Object.keys(headStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return headStream[k]; } - }); -}); -Object.keys(sdkStreamMixin).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return sdkStreamMixin[k]; } - }); -}); -Object.keys(splitStream).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return splitStream[k]; } - }); -}); -Object.keys(streamTypeCheck).forEach(function (k) { - if (k !== 'default' && !Object.prototype.hasOwnProperty.call(exports, k)) Object.defineProperty(exports, k, { - enumerable: true, - get: function () { return streamTypeCheck[k]; } - }); -}); - - -/***/ }), - -/***/ 2207: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const fetch_http_handler_1 = __nccwpck_require__(7809); -const util_base64_1 = __nccwpck_require__(8385); -const util_hex_encoding_1 = __nccwpck_require__(6435); -const util_utf8_1 = __nccwpck_require__(1577); -const stream_type_check_1 = __nccwpck_require__(4414); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!isBlobInstance(stream) && !(0, stream_type_check_1.isReadableStream)(stream)) { - const name = stream?.__proto__?.constructor?.name || stream; - throw new Error(`Unexpected stream implementation, expect Blob or ReadableStream, got ${name}`); - } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - return await (0, fetch_http_handler_1.streamCollector)(stream); - }; - const blobToWebStream = (blob) => { - if (typeof blob.stream !== "function") { - throw new Error("Cannot transform payload Blob to web stream. Please make sure the Blob.stream() is polyfilled.\n" + - "If you are using React Native, this API is not yet supported, see: https://react-native.canny.io/feature-requests/p/fetch-streaming-body"); - } - return blob.stream(); - }; - return Object.assign(stream, { - transformToByteArray: transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === "base64") { - return (0, util_base64_1.toBase64)(buf); - } - else if (encoding === "hex") { - return (0, util_hex_encoding_1.toHex)(buf); - } - else if (encoding === undefined || encoding === "utf8" || encoding === "utf-8") { - return (0, util_utf8_1.toUtf8)(buf); - } - else if (typeof TextDecoder === "function") { - return new TextDecoder(encoding).decode(buf); - } - else { - throw new Error("TextDecoder is not available, please make sure polyfill is provided."); - } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - transformed = true; - if (isBlobInstance(stream)) { - return blobToWebStream(stream); - } - else if ((0, stream_type_check_1.isReadableStream)(stream)) { - return stream; - } - else { - throw new Error(`Cannot transform payload to web stream, got ${stream}`); - } - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; -const isBlobInstance = (stream) => typeof Blob === "function" && stream instanceof Blob; - - -/***/ }), - -/***/ 7201: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.sdkStreamMixin = void 0; -const node_http_handler_1 = __nccwpck_require__(1279); -const util_buffer_from_1 = __nccwpck_require__(4151); -const stream_1 = __nccwpck_require__(2203); -const sdk_stream_mixin_browser_1 = __nccwpck_require__(2207); -const ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED = "The stream has already been transformed."; -const sdkStreamMixin = (stream) => { - if (!(stream instanceof stream_1.Readable)) { - try { - return (0, sdk_stream_mixin_browser_1.sdkStreamMixin)(stream); - } - catch (e) { - const name = stream?.__proto__?.constructor?.name || stream; - throw new Error(`Unexpected stream implementation, expect Stream.Readable instance, got ${name}`); - } - } - let transformed = false; - const transformToByteArray = async () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); +const isReadableStreamInstance = (stream) => typeof ReadableStream === "function" && stream instanceof ReadableStream; +async function collectReadableStream(stream) { + const chunks = []; + const reader = stream.getReader(); + let isDone = false; + let length = 0; + while (!isDone) { + const { done, value } = await reader.read(); + if (value) { + chunks.push(value); + length += value.length; } - transformed = true; - return await (0, node_http_handler_1.streamCollector)(stream); - }; - return Object.assign(stream, { - transformToByteArray, - transformToString: async (encoding) => { - const buf = await transformToByteArray(); - if (encoding === undefined || Buffer.isEncoding(encoding)) { - return (0, util_buffer_from_1.fromArrayBuffer)(buf.buffer, buf.byteOffset, buf.byteLength).toString(encoding); - } - else { - const decoder = new TextDecoder(encoding); - return decoder.decode(buf); - } - }, - transformToWebStream: () => { - if (transformed) { - throw new Error(ERR_MSG_STREAM_HAS_BEEN_TRANSFORMED); - } - if (stream.readableFlowing !== null) { - throw new Error("The stream has been consumed by other callbacks."); - } - if (typeof stream_1.Readable.toWeb !== "function") { - throw new Error("Readable.toWeb() is not supported. Please ensure a polyfill is available."); - } - transformed = true; - return stream_1.Readable.toWeb(stream); - }, - }); -}; -exports.sdkStreamMixin = sdkStreamMixin; - - -/***/ }), - -/***/ 7570: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -async function splitStream(stream) { - if (typeof stream.stream === "function") { - stream = stream.stream(); + isDone = done; } - const readableStream = stream; - return readableStream.tee(); -} - - -/***/ }), - -/***/ 2108: -/***/ ((__unused_webpack_module, exports, __nccwpck_require__) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.splitStream = splitStream; -const stream_1 = __nccwpck_require__(2203); -const splitStream_browser_1 = __nccwpck_require__(7570); -const stream_type_check_1 = __nccwpck_require__(4414); -async function splitStream(stream) { - if ((0, stream_type_check_1.isReadableStream)(stream) || (0, stream_type_check_1.isBlob)(stream)) { - return (0, splitStream_browser_1.splitStream)(stream); + const collected = new Uint8Array(length); + let offset = 0; + for (const chunk of chunks) { + collected.set(chunk, offset); + offset += chunk.length; } - const stream1 = new stream_1.PassThrough(); - const stream2 = new stream_1.PassThrough(); - stream.pipe(stream1); - stream.pipe(stream2); - return [stream1, stream2]; + return collected; } - -/***/ }), - -/***/ 4414: -/***/ ((__unused_webpack_module, exports) => { - -"use strict"; - -Object.defineProperty(exports, "__esModule", ({ value: true })); -exports.isBlob = exports.isReadableStream = void 0; -const isReadableStream = (stream) => typeof ReadableStream === "function" && - (stream?.constructor?.name === ReadableStream.name || stream instanceof ReadableStream); -exports.isReadableStream = isReadableStream; -const isBlob = (blob) => { - return typeof Blob === "function" && (blob?.constructor?.name === Blob.name || blob instanceof Blob); -}; -exports.isBlob = isBlob; +exports.DEFAULT_REQUEST_TIMEOUT = DEFAULT_REQUEST_TIMEOUT; +exports.NodeHttp2Handler = NodeHttp2Handler; +exports.NodeHttpHandler = NodeHttpHandler; +exports.streamCollector = streamCollector; /***/ }), @@ -62448,6 +64667,22 @@ module.exports = require("node:net"); /***/ }), +/***/ 8161: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:os"); + +/***/ }), + +/***/ 6760: +/***/ ((module) => { + +"use strict"; +module.exports = require("node:path"); + +/***/ }), + /***/ 643: /***/ ((module) => { @@ -62603,7 +64838,7 @@ module.exports = require("util"); /***/ 591: /***/ ((module) => { -(()=>{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>ft,XMLParser:()=>st,XMLValidator:()=>mt});const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("^["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)f+=t[o];if(f=f.trim(),"/"===f[f.length-1]&&(f=f.substring(0,f.length-1),o--),!r(f)){let e;return e=0===f.trim().length?"Invalid space after '<'.":"Tag '"+f+"' is an invalid name.",x("InvalidTag",e,N(t,o))}const p=c(t,o);if(!1===p)return x("InvalidAttr","Attributes for '"+f+"' have open quote.",N(t,o));let b=p.value;if(o=p.index,"/"===b[b.length-1]){const n=o-b.length;b=b.substring(0,b.length-1);const s=g(b,e);if(!0!==s)return x(s.err.code,s.err.msg,N(t,n+s.err.line));i=!0}else if(d){if(!p.tagClosed)return x("InvalidTag","Closing tag '"+f+"' doesn't have proper closing.",N(t,o));if(b.trim().length>0)return x("InvalidTag","Closing tag '"+f+"' can't have attributes or invalid starting.",N(t,a));if(0===n.length)return x("InvalidTag","Closing tag '"+f+"' has not been opened.",N(t,a));{const e=n.pop();if(f!==e.tagName){let n=N(t,e.tagStartPos);return x("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+f+"'.",N(t,a))}0==n.length&&(s=!0)}}else{const r=g(b,e);if(!0!==r)return x(r.err.code,r.err.msg,N(t,o-b.length+r.err.line));if(!0===s)return x("InvalidXml","Multiple possible root nodes found.",N(t,o));-1!==e.unpairedTags.indexOf(f)||n.push({tagName:f,tagStartPos:a}),i=!0}for(o++;o0)||x("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):x("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const n=e;for(;e5&&"xml"===i)return x("InvalidXml","XML declaration allowed only at the start of the document.",N(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}const d='"',f="'";function c(t,e){let n="",i="",s=!1;for(;e"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const p=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const n=s(t,p),i={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1};let y;y="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class T{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][y]={startIndex:e})}static getMetaDataSymbol(){return y}}function w(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,r=!1,o="";for(;e"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&C(t,"!ENTITY",e)){let i,s;e+=7,[i,s,e]=O(t,e+1),-1===s.indexOf("&")&&(n[i]={regx:RegExp(`&${i};`,"g"),val:s})}else if(s&&C(t,"!ELEMENT",e)){e+=8;const{index:n}=S(t,e+1);e=n}else if(s&&C(t,"!ATTLIST",e))e+=8;else if(s&&C(t,"!NOTATION",e)){e+=9;const{index:n}=A(t,e+1);e=n}else{if(!C(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}const P=(t,e)=>{for(;e{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class k{constructor(t){this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,10))},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>String.fromCodePoint(Number.parseInt(e,16))}},this.addExternalEntities=F,this.parseXml=X,this.parseTextData=L,this.resolveNameSpace=B,this.buildAttributesMap=G,this.isItStopNode=Z,this.replaceEntitiesValue=R,this.readStopNodeData=J,this.saveTextToParentTag=q,this.addChild=Y,this.ignoreAttributesFn=_(this.options.ignoreAttributes)}}function F(t){const e=Object.keys(t);for(let n=0;n0)){o||(t=this.replaceEntitiesValue(t));const i=this.options.tagValueProcessor(e,t,n,s,r);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?H(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function B(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const U=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function G(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const n=s(t,U),i=n.length,r={};for(let t=0;t",r,"Closing Tag is not closed.");let o=t.substring(r+2,e).trim();if(this.options.removeNSPrefix){const t=o.indexOf(":");-1!==t&&(o=o.substr(t+1))}this.options.transformTagName&&(o=this.options.transformTagName(o)),n&&(i=this.saveTextToParentTag(i,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(o&&-1!==this.options.unpairedTags.indexOf(o))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),n=this.tagsNodeStack.pop(),i="",r=e}else if("?"===t[r+1]){let e=z(t,r,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new T(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s,r)}r=e.closeIndex+1}else if("!--"===t.substr(r+1,3)){const e=W(t,"--\x3e",r+4,"Comment is not closed.");if(this.options.commentPropName){const o=t.substring(r+4,e-2);i=this.saveTextToParentTag(i,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:o}])}r=e}else if("!D"===t.substr(r+1,2)){const e=w(t,r);this.docTypeEntities=e.entities,r=e.i}else if("!["===t.substr(r+1,2)){const e=W(t,"]]>",r,"CDATA is not closed.")-2,o=t.substring(r+9,e);i=this.saveTextToParentTag(i,n,s);let a=this.parseTextData(o,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:o}]):n.add(this.options.textNodeName,a),r=e+2}else{let o=z(t,r,this.options.removeNSPrefix),a=o.tagName;const l=o.rawTagName;let u=o.tagExp,h=o.attrExpPresent,d=o.closeIndex;this.options.transformTagName&&(a=this.options.transformTagName(a)),n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,s,!1));const f=n;f&&-1!==this.options.unpairedTags.indexOf(f.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a);const c=r;if(this.isItStopNode(this.options.stopNodes,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),r=o.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))r=o.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);r=n.i,e=n.tagContent}const i=new T(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,s,c)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName&&(a=this.options.transformTagName(a));const t=new T(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),s=s.substr(0,s.lastIndexOf("."))}else{const t=new T(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,c),n=t}i="",r=d}}else i+=t[r];return e.child};function Y(t,e,n,i){this.options.captureMetaData||(i=void 0);const s=this.options.updateTag(e.tagname,n,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,i)):t.addChild(e,i))}const R=function(t){if(this.options.processEntities){for(let e in this.docTypeEntities){const n=this.docTypeEntities[e];t=t.replace(n.regx,n.val)}for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}t=t.replace(this.ampEntity.regex,this.ampEntity.val)}return t};function q(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function Z(t,e,n){const i="*."+n;for(const n in t){const s=t[n];if(i===s||e===s)return!0}return!1}function W(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function z(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1])n=W(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=W(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=W(t,"]]>",n,"StopNode is not closed.")-2;else{const i=z(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex)}}function H(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},V,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&j.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(M);if(i){let s=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",o=i[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:1!==o.length||!i[3].startsWith(`.${r}`)&&i[3][0]!==r?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const s=D.exec(n);if(s){const r=s[1]||"",o=s[2];let a=(i=s[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1)),i):i;const l=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const i=Number(n),s=String(i);if(0===i||-0===i)return i;if(-1!==s.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?i:t;let l=o?a:n;return o?l===s||r+l===s?i:t:l===s||l===r+s?i:t}}return t}var i}(t,n)}return void 0!==t?t:""}const K=T.getMetaDataSymbol();function Q(t,e){return tt(t,e)}function tt(t,e,n){let i;const s={};for(let r=0;r0&&(s[e.textNodeName]=i):void 0!==i&&(s[e.textNodeName]=i),s}function et(t){const e=Object.keys(t);for(let t=0;t0&&(n="\n"),ot(t,e,"",n)}function ot(t,e,n,i){let s="",r=!1;for(let o=0;o`,r=!1;continue}if(l===e.commentPropName){s+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=lt(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=n+`<${l}${o}${t}?>`,r=!0;continue}let h=i;""!==h&&(h+=e.indentBy);const d=i+`<${l}${lt(a[":@"],e)}`,f=ot(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":f&&0!==f.length||!e.suppressEmptyNode?f&&f.endsWith(">")?s+=d+`>${f}${i}`:(s+=d+">",f&&""!==i&&(f.includes("/>")||f.includes("`):s+=d+"/>",r=!0}return s}function at(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function ft(t){this.options=Object.assign({},dt,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=_(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=gt),this.processTextOrObjNode=ct,this.options.format?(this.indentate=pt,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function ct(t,e,n,i){const s=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,n):this.buildObjectNode(s.val,e,s.attrStr,n)}function pt(t){return this.options.indentBy.repeat(t)}function gt(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}ft.prototype.build=function(t){return this.options.preserveOrder?rt(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},ft.prototype.j2x=function(t,e,n){let i="",s="";const r=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(s+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?s+="":"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,r))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(e)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let r="",a="";for(let l=0;l"+t+s}},ft.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"0&&this.options.processEntities)for(let e=0;e{"use strict";var t={d:(e,n)=>{for(var i in n)t.o(n,i)&&!t.o(e,i)&&Object.defineProperty(e,i,{enumerable:!0,get:n[i]})},o:(t,e)=>Object.prototype.hasOwnProperty.call(t,e),r:t=>{"undefined"!=typeof Symbol&&Symbol.toStringTag&&Object.defineProperty(t,Symbol.toStringTag,{value:"Module"}),Object.defineProperty(t,"__esModule",{value:!0})}},e={};t.r(e),t.d(e,{XMLBuilder:()=>dt,XMLParser:()=>it,XMLValidator:()=>gt});const n=":A-Za-z_\\u00C0-\\u00D6\\u00D8-\\u00F6\\u00F8-\\u02FF\\u0370-\\u037D\\u037F-\\u1FFF\\u200C-\\u200D\\u2070-\\u218F\\u2C00-\\u2FEF\\u3001-\\uD7FF\\uF900-\\uFDCF\\uFDF0-\\uFFFD",i=new RegExp("^["+n+"]["+n+"\\-.\\d\\u00B7\\u0300-\\u036F\\u203F-\\u2040]*$");function s(t,e){const n=[];let i=e.exec(t);for(;i;){const s=[];s.startIndex=e.lastIndex-i[0].length;const r=i.length;for(let t=0;t"!==t[o]&&" "!==t[o]&&"\t"!==t[o]&&"\n"!==t[o]&&"\r"!==t[o];o++)p+=t[o];if(p=p.trim(),"/"===p[p.length-1]&&(p=p.substring(0,p.length-1),o--),!r(p)){let e;return e=0===p.trim().length?"Invalid space after '<'.":"Tag '"+p+"' is an invalid name.",m("InvalidTag",e,b(t,o))}const c=f(t,o);if(!1===c)return m("InvalidAttr","Attributes for '"+p+"' have open quote.",b(t,o));let E=c.value;if(o=c.index,"/"===E[E.length-1]){const n=o-E.length;E=E.substring(0,E.length-1);const s=g(E,e);if(!0!==s)return m(s.err.code,s.err.msg,b(t,n+s.err.line));i=!0}else if(d){if(!c.tagClosed)return m("InvalidTag","Closing tag '"+p+"' doesn't have proper closing.",b(t,o));if(E.trim().length>0)return m("InvalidTag","Closing tag '"+p+"' can't have attributes or invalid starting.",b(t,a));if(0===n.length)return m("InvalidTag","Closing tag '"+p+"' has not been opened.",b(t,a));{const e=n.pop();if(p!==e.tagName){let n=b(t,e.tagStartPos);return m("InvalidTag","Expected closing tag '"+e.tagName+"' (opened in line "+n.line+", col "+n.col+") instead of closing tag '"+p+"'.",b(t,a))}0==n.length&&(s=!0)}}else{const r=g(E,e);if(!0!==r)return m(r.err.code,r.err.msg,b(t,o-E.length+r.err.line));if(!0===s)return m("InvalidXml","Multiple possible root nodes found.",b(t,o));-1!==e.unpairedTags.indexOf(p)||n.push({tagName:p,tagStartPos:a}),i=!0}for(o++;o0)||m("InvalidXml","Invalid '"+JSON.stringify(n.map((t=>t.tagName)),null,4).replace(/\r?\n/g,"")+"' found.",{line:1,col:1}):m("InvalidXml","Start tag expected.",1)}function l(t){return" "===t||"\t"===t||"\n"===t||"\r"===t}function u(t,e){const n=e;for(;e5&&"xml"===i)return m("InvalidXml","XML declaration allowed only at the start of the document.",b(t,e));if("?"==t[e]&&">"==t[e+1]){e++;break}}return e}function h(t,e){if(t.length>e+5&&"-"===t[e+1]&&"-"===t[e+2]){for(e+=3;e"===t[e+2]){e+=2;break}}else if(t.length>e+8&&"D"===t[e+1]&&"O"===t[e+2]&&"C"===t[e+3]&&"T"===t[e+4]&&"Y"===t[e+5]&&"P"===t[e+6]&&"E"===t[e+7]){let n=1;for(e+=8;e"===t[e]&&(n--,0===n))break}else if(t.length>e+9&&"["===t[e+1]&&"C"===t[e+2]&&"D"===t[e+3]&&"A"===t[e+4]&&"T"===t[e+5]&&"A"===t[e+6]&&"["===t[e+7])for(e+=8;e"===t[e+2]){e+=2;break}return e}const d='"',p="'";function f(t,e){let n="",i="",s=!1;for(;e"===t[e]&&""===i){s=!0;break}n+=t[e]}return""===i&&{value:n,index:e,tagClosed:s}}const c=new RegExp("(\\s*)([^\\s=]+)(\\s*=)?(\\s*(['\"])(([\\s\\S])*?)\\5)?","g");function g(t,e){const n=s(t,c),i={};for(let t=0;t!1,commentPropName:!1,unpairedTags:[],processEntities:!0,htmlEntities:!1,ignoreDeclaration:!1,ignorePiTags:!1,transformTagName:!1,transformAttributeName:!1,updateTag:function(t,e,n){return t},captureMetaData:!1};function T(t){return"boolean"==typeof t?{enabled:t,maxEntitySize:1e4,maxExpansionDepth:10,maxTotalExpansions:1e3,maxExpandedLength:1e5,allowedTags:null,tagFilter:null}:"object"==typeof t&&null!==t?{enabled:!1!==t.enabled,maxEntitySize:t.maxEntitySize??1e4,maxExpansionDepth:t.maxExpansionDepth??10,maxTotalExpansions:t.maxTotalExpansions??1e3,maxExpandedLength:t.maxExpandedLength??1e5,allowedTags:t.allowedTags??null,tagFilter:t.tagFilter??null}:T(!0)}const w=function(t){const e=Object.assign({},y,t);return e.processEntities=T(e.processEntities),e};let v;v="function"!=typeof Symbol?"@@xmlMetadata":Symbol("XML Node Metadata");class I{constructor(t){this.tagname=t,this.child=[],this[":@"]={}}add(t,e){"__proto__"===t&&(t="#__proto__"),this.child.push({[t]:e})}addChild(t,e){"__proto__"===t.tagname&&(t.tagname="#__proto__"),t[":@"]&&Object.keys(t[":@"]).length>0?this.child.push({[t.tagname]:t.child,":@":t[":@"]}):this.child.push({[t.tagname]:t.child}),void 0!==e&&(this.child[this.child.length-1][v]={startIndex:e})}static getMetaDataSymbol(){return v}}class O{constructor(t){this.suppressValidationErr=!t,this.options=t}readDocType(t,e){const n={};if("O"!==t[e+3]||"C"!==t[e+4]||"T"!==t[e+5]||"Y"!==t[e+6]||"P"!==t[e+7]||"E"!==t[e+8])throw new Error("Invalid Tag instead of DOCTYPE");{e+=9;let i=1,s=!1,r=!1,o="";for(;e"===t[e]){if(r?"-"===t[e-1]&&"-"===t[e-2]&&(r=!1,i--):i--,0===i)break}else"["===t[e]?s=!0:o+=t[e];else{if(s&&A(t,"!ENTITY",e)){let i,s;if(e+=7,[i,s,e]=this.readEntityExp(t,e+1,this.suppressValidationErr),-1===s.indexOf("&")){const t=i.replace(/[.\-+*:]/g,"\\.");n[i]={regx:RegExp(`&${t};`,"g"),val:s}}}else if(s&&A(t,"!ELEMENT",e)){e+=8;const{index:n}=this.readElementExp(t,e+1);e=n}else if(s&&A(t,"!ATTLIST",e))e+=8;else if(s&&A(t,"!NOTATION",e)){e+=9;const{index:n}=this.readNotationExp(t,e+1,this.suppressValidationErr);e=n}else{if(!A(t,"!--",e))throw new Error("Invalid DOCTYPE");r=!0}i++,o=""}if(0!==i)throw new Error("Unclosed DOCTYPE")}return{entities:n,i:e}}readEntityExp(t,e){e=P(t,e);let n="";for(;ethis.options.maxEntitySize)throw new Error(`Entity "${n}" size (${i.length}) exceeds maximum allowed size (${this.options.maxEntitySize})`);return[n,i,--e]}readNotationExp(t,e){e=P(t,e);let n="";for(;e{for(;e{for(const n of t){if("string"==typeof n&&e===n)return!0;if(n instanceof RegExp&&n.test(e))return!0}}:()=>!1}class F{constructor(t){if(this.options=t,this.currentNode=null,this.tagsNodeStack=[],this.docTypeEntities={},this.lastEntities={apos:{regex:/&(apos|#39|#x27);/g,val:"'"},gt:{regex:/&(gt|#62|#x3E);/g,val:">"},lt:{regex:/&(lt|#60|#x3C);/g,val:"<"},quot:{regex:/&(quot|#34|#x22);/g,val:'"'}},this.ampEntity={regex:/&(amp|#38|#x26);/g,val:"&"},this.htmlEntities={space:{regex:/&(nbsp|#160);/g,val:" "},cent:{regex:/&(cent|#162);/g,val:"¢"},pound:{regex:/&(pound|#163);/g,val:"£"},yen:{regex:/&(yen|#165);/g,val:"¥"},euro:{regex:/&(euro|#8364);/g,val:"€"},copyright:{regex:/&(copy|#169);/g,val:"©"},reg:{regex:/&(reg|#174);/g,val:"®"},inr:{regex:/&(inr|#8377);/g,val:"₹"},num_dec:{regex:/&#([0-9]{1,7});/g,val:(t,e)=>K(e,10,"&#")},num_hex:{regex:/&#x([0-9a-fA-F]{1,6});/g,val:(t,e)=>K(e,16,"&#x")}},this.addExternalEntities=j,this.parseXml=B,this.parseTextData=M,this.resolveNameSpace=_,this.buildAttributesMap=U,this.isItStopNode=X,this.replaceEntitiesValue=Y,this.readStopNodeData=q,this.saveTextToParentTag=G,this.addChild=R,this.ignoreAttributesFn=L(this.options.ignoreAttributes),this.entityExpansionCount=0,this.currentExpandedLength=0,this.options.stopNodes&&this.options.stopNodes.length>0){this.stopNodesExact=new Set,this.stopNodesWildcard=new Set;for(let t=0;t0)){o||(t=this.replaceEntitiesValue(t,e,n));const i=this.options.tagValueProcessor(e,t,n,s,r);return null==i?t:typeof i!=typeof t||i!==t?i:this.options.trimValues||t.trim()===t?Z(t,this.options.parseTagValue,this.options.numberParseOptions):t}}function _(t){if(this.options.removeNSPrefix){const e=t.split(":"),n="/"===t.charAt(0)?"/":"";if("xmlns"===e[0])return"";2===e.length&&(t=n+e[1])}return t}const k=new RegExp("([^\\s=]+)\\s*(=\\s*(['\"])([\\s\\S]*?)\\3)?","gm");function U(t,e,n){if(!0!==this.options.ignoreAttributes&&"string"==typeof t){const i=s(t,k),r=i.length,o={};for(let t=0;t",o,"Closing Tag is not closed.");let r=t.substring(o+2,e).trim();if(this.options.removeNSPrefix){const t=r.indexOf(":");-1!==t&&(r=r.substr(t+1))}this.options.transformTagName&&(r=this.options.transformTagName(r)),n&&(i=this.saveTextToParentTag(i,n,s));const a=s.substring(s.lastIndexOf(".")+1);if(r&&-1!==this.options.unpairedTags.indexOf(r))throw new Error(`Unpaired tag can not be used as closing tag: `);let l=0;a&&-1!==this.options.unpairedTags.indexOf(a)?(l=s.lastIndexOf(".",s.lastIndexOf(".")-1),this.tagsNodeStack.pop()):l=s.lastIndexOf("."),s=s.substring(0,l),n=this.tagsNodeStack.pop(),i="",o=e}else if("?"===t[o+1]){let e=W(t,o,!1,"?>");if(!e)throw new Error("Pi Tag is not closed.");if(i=this.saveTextToParentTag(i,n,s),this.options.ignoreDeclaration&&"?xml"===e.tagName||this.options.ignorePiTags);else{const t=new I(e.tagName);t.add(this.options.textNodeName,""),e.tagName!==e.tagExp&&e.attrExpPresent&&(t[":@"]=this.buildAttributesMap(e.tagExp,s,e.tagName)),this.addChild(n,t,s,o)}o=e.closeIndex+1}else if("!--"===t.substr(o+1,3)){const e=z(t,"--\x3e",o+4,"Comment is not closed.");if(this.options.commentPropName){const r=t.substring(o+4,e-2);i=this.saveTextToParentTag(i,n,s),n.add(this.options.commentPropName,[{[this.options.textNodeName]:r}])}o=e}else if("!D"===t.substr(o+1,2)){const e=r.readDocType(t,o);this.docTypeEntities=e.entities,o=e.i}else if("!["===t.substr(o+1,2)){const e=z(t,"]]>",o,"CDATA is not closed.")-2,r=t.substring(o+9,e);i=this.saveTextToParentTag(i,n,s);let a=this.parseTextData(r,n.tagname,s,!0,!1,!0,!0);null==a&&(a=""),this.options.cdataPropName?n.add(this.options.cdataPropName,[{[this.options.textNodeName]:r}]):n.add(this.options.textNodeName,a),o=e+2}else{let r=W(t,o,this.options.removeNSPrefix),a=r.tagName;const l=r.rawTagName;let u=r.tagExp,h=r.attrExpPresent,d=r.closeIndex;if(this.options.transformTagName){const t=this.options.transformTagName(a);u===a&&(u=t),a=t}n&&i&&"!xml"!==n.tagname&&(i=this.saveTextToParentTag(i,n,s,!1));const p=n;p&&-1!==this.options.unpairedTags.indexOf(p.tagname)&&(n=this.tagsNodeStack.pop(),s=s.substring(0,s.lastIndexOf("."))),a!==e.tagname&&(s+=s?"."+a:a);const f=o;if(this.isItStopNode(this.stopNodesExact,this.stopNodesWildcard,s,a)){let e="";if(u.length>0&&u.lastIndexOf("/")===u.length-1)"/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),o=r.closeIndex;else if(-1!==this.options.unpairedTags.indexOf(a))o=r.closeIndex;else{const n=this.readStopNodeData(t,l,d+1);if(!n)throw new Error(`Unexpected end of ${l}`);o=n.i,e=n.tagContent}const i=new I(a);a!==u&&h&&(i[":@"]=this.buildAttributesMap(u,s,a)),e&&(e=this.parseTextData(e,a,s,!0,h,!0,!0)),s=s.substr(0,s.lastIndexOf(".")),i.add(this.options.textNodeName,e),this.addChild(n,i,s,f)}else{if(u.length>0&&u.lastIndexOf("/")===u.length-1){if("/"===a[a.length-1]?(a=a.substr(0,a.length-1),s=s.substr(0,s.length-1),u=a):u=u.substr(0,u.length-1),this.options.transformTagName){const t=this.options.transformTagName(a);u===a&&(u=t),a=t}const t=new I(a);a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,f),s=s.substr(0,s.lastIndexOf("."))}else{const t=new I(a);this.tagsNodeStack.push(n),a!==u&&h&&(t[":@"]=this.buildAttributesMap(u,s,a)),this.addChild(n,t,s,f),n=t}i="",o=d}}else i+=t[o];return e.child};function R(t,e,n,i){this.options.captureMetaData||(i=void 0);const s=this.options.updateTag(e.tagname,n,e[":@"]);!1===s||("string"==typeof s?(e.tagname=s,t.addChild(e,i)):t.addChild(e,i))}const Y=function(t,e,n){if(-1===t.indexOf("&"))return t;const i=this.options.processEntities;if(!i.enabled)return t;if(i.allowedTags&&!i.allowedTags.includes(e))return t;if(i.tagFilter&&!i.tagFilter(e,n))return t;for(let e in this.docTypeEntities){const n=this.docTypeEntities[e],s=t.match(n.regx);if(s){if(this.entityExpansionCount+=s.length,i.maxTotalExpansions&&this.entityExpansionCount>i.maxTotalExpansions)throw new Error(`Entity expansion limit exceeded: ${this.entityExpansionCount} > ${i.maxTotalExpansions}`);const e=t.length;if(t=t.replace(n.regx,n.val),i.maxExpandedLength&&(this.currentExpandedLength+=t.length-e,this.currentExpandedLength>i.maxExpandedLength))throw new Error(`Total expanded content size exceeded: ${this.currentExpandedLength} > ${i.maxExpandedLength}`)}}if(-1===t.indexOf("&"))return t;for(let e in this.lastEntities){const n=this.lastEntities[e];t=t.replace(n.regex,n.val)}if(-1===t.indexOf("&"))return t;if(this.options.htmlEntities)for(let e in this.htmlEntities){const n=this.htmlEntities[e];t=t.replace(n.regex,n.val)}return t.replace(this.ampEntity.regex,this.ampEntity.val)};function G(t,e,n,i){return t&&(void 0===i&&(i=0===e.child.length),void 0!==(t=this.parseTextData(t,e.tagname,n,!1,!!e[":@"]&&0!==Object.keys(e[":@"]).length,i))&&""!==t&&e.add(this.options.textNodeName,t),t=""),t}function X(t,e,n,i){return!(!e||!e.has(i))||!(!t||!t.has(n))}function z(t,e,n,i){const s=t.indexOf(e,n);if(-1===s)throw new Error(i);return s+e.length-1}function W(t,e,n,i=">"){const s=function(t,e,n=">"){let i,s="";for(let r=e;r",n,`${e} is not closed`);if(t.substring(n+2,r).trim()===e&&(s--,0===s))return{tagContent:t.substring(i,n),i:r};n=r}else if("?"===t[n+1])n=z(t,"?>",n+1,"StopNode is not closed.");else if("!--"===t.substr(n+1,3))n=z(t,"--\x3e",n+3,"StopNode is not closed.");else if("!["===t.substr(n+1,2))n=z(t,"]]>",n,"StopNode is not closed.")-2;else{const i=W(t,n,">");i&&((i&&i.tagName)===e&&"/"!==i.tagExp[i.tagExp.length-1]&&s++,n=i.closeIndex)}}function Z(t,e,n){if(e&&"string"==typeof t){const e=t.trim();return"true"===e||"false"!==e&&function(t,e={}){if(e=Object.assign({},V,e),!t||"string"!=typeof t)return t;let n=t.trim();if(void 0!==e.skipLike&&e.skipLike.test(n))return t;if("0"===t)return 0;if(e.hex&&C.test(n))return function(t){if(parseInt)return parseInt(t,16);if(Number.parseInt)return Number.parseInt(t,16);if(window&&window.parseInt)return window.parseInt(t,16);throw new Error("parseInt, Number.parseInt, window.parseInt are not supported")}(n);if(-1!==n.search(/.+[eE].+/))return function(t,e,n){if(!n.eNotation)return t;const i=e.match(D);if(i){let s=i[1]||"";const r=-1===i[3].indexOf("e")?"E":"e",o=i[2],a=s?t[o.length+1]===r:t[o.length]===r;return o.length>1&&a?t:1!==o.length||!i[3].startsWith(`.${r}`)&&i[3][0]!==r?n.leadingZeros&&!a?(e=(i[1]||"")+i[3],Number(e)):t:Number(e)}return t}(t,n,e);{const s=$.exec(n);if(s){const r=s[1]||"",o=s[2];let a=(i=s[3])&&-1!==i.indexOf(".")?("."===(i=i.replace(/0+$/,""))?i="0":"."===i[0]?i="0"+i:"."===i[i.length-1]&&(i=i.substring(0,i.length-1)),i):i;const l=r?"."===t[o.length+1]:"."===t[o.length];if(!e.leadingZeros&&(o.length>1||1===o.length&&!l))return t;{const i=Number(n),s=String(i);if(0===i||-0===i)return i;if(-1!==s.search(/[eE]/))return e.eNotation?i:t;if(-1!==n.indexOf("."))return"0"===s||s===a||s===`${r}${a}`?i:t;let l=o?a:n;return o?l===s||r+l===s?i:t:l===s||l===r+s?i:t}}return t}var i}(t,n)}return void 0!==t?t:""}function K(t,e,n){const i=Number.parseInt(t,e);return i>=0&&i<=1114111?String.fromCodePoint(i):n+t+";"}const Q=I.getMetaDataSymbol();function J(t,e){return H(t,e)}function H(t,e,n){let i;const s={};for(let r=0;r0&&(s[e.textNodeName]=i):void 0!==i&&(s[e.textNodeName]=i),s}function tt(t){const e=Object.keys(t);for(let t=0;t0&&(n="\n"),rt(t,e,"",n)}function rt(t,e,n,i){let s="",r=!1;for(let o=0;o`,r=!1;continue}if(l===e.commentPropName){s+=i+`\x3c!--${a[l][0][e.textNodeName]}--\x3e`,r=!0;continue}if("?"===l[0]){const t=at(a[":@"],e),n="?xml"===l?"":i;let o=a[l][0][e.textNodeName];o=0!==o.length?" "+o:"",s+=n+`<${l}${o}${t}?>`,r=!0;continue}let h=i;""!==h&&(h+=e.indentBy);const d=i+`<${l}${at(a[":@"],e)}`,p=rt(a[l],e,u,h);-1!==e.unpairedTags.indexOf(l)?e.suppressUnpairedNode?s+=d+">":s+=d+"/>":p&&0!==p.length||!e.suppressEmptyNode?p&&p.endsWith(">")?s+=d+`>${p}${i}`:(s+=d+">",p&&""!==i&&(p.includes("/>")||p.includes("`):s+=d+"/>",r=!0}return s}function ot(t){const e=Object.keys(t);for(let n=0;n0&&e.processEntities)for(let n=0;n","g"),val:">"},{regex:new RegExp("<","g"),val:"<"},{regex:new RegExp("'","g"),val:"'"},{regex:new RegExp('"',"g"),val:"""}],processEntities:!0,stopNodes:[],oneListGroup:!1};function dt(t){this.options=Object.assign({},ht,t),!0===this.options.ignoreAttributes||this.options.attributesGroupName?this.isAttribute=function(){return!1}:(this.ignoreAttributesFn=L(this.options.ignoreAttributes),this.attrPrefixLen=this.options.attributeNamePrefix.length,this.isAttribute=ct),this.processTextOrObjNode=pt,this.options.format?(this.indentate=ft,this.tagEndChar=">\n",this.newLine="\n"):(this.indentate=function(){return""},this.tagEndChar=">",this.newLine="")}function pt(t,e,n,i){const s=this.j2x(t,n+1,i.concat(e));return void 0!==t[this.options.textNodeName]&&1===Object.keys(t).length?this.buildTextValNode(t[this.options.textNodeName],e,s.attrStr,n):this.buildObjectNode(s.val,e,s.attrStr,n)}function ft(t){return this.options.indentBy.repeat(t)}function ct(t){return!(!t.startsWith(this.options.attributeNamePrefix)||t===this.options.textNodeName)&&t.substr(this.attrPrefixLen)}dt.prototype.build=function(t){return this.options.preserveOrder?st(t,this.options):(Array.isArray(t)&&this.options.arrayNodeName&&this.options.arrayNodeName.length>1&&(t={[this.options.arrayNodeName]:t}),this.j2x(t,0,[]).val)},dt.prototype.j2x=function(t,e,n){let i="",s="";const r=n.join(".");for(let o in t)if(Object.prototype.hasOwnProperty.call(t,o))if(void 0===t[o])this.isAttribute(o)&&(s+="");else if(null===t[o])this.isAttribute(o)||o===this.options.cdataPropName?s+="":"?"===o[0]?s+=this.indentate(e)+"<"+o+"?"+this.tagEndChar:s+=this.indentate(e)+"<"+o+"/"+this.tagEndChar;else if(t[o]instanceof Date)s+=this.buildTextValNode(t[o],o,"",e);else if("object"!=typeof t[o]){const n=this.isAttribute(o);if(n&&!this.ignoreAttributesFn(n,r))i+=this.buildAttrPairStr(n,""+t[o]);else if(!n)if(o===this.options.textNodeName){let e=this.options.tagValueProcessor(o,""+t[o]);s+=this.replaceEntitiesValue(e)}else s+=this.buildTextValNode(t[o],o,"",e)}else if(Array.isArray(t[o])){const i=t[o].length;let r="",a="";for(let l=0;l"+t+s}},dt.prototype.closeTag=function(t){let e="";return-1!==this.options.unpairedTags.indexOf(t)?this.options.suppressUnpairedNode||(e="/"):e=this.options.suppressEmptyNode?"/":`>`+this.newLine;if(!1!==this.options.commentPropName&&e===this.options.commentPropName)return this.indentate(i)+`\x3c!--${t}--\x3e`+this.newLine;if("?"===e[0])return this.indentate(i)+"<"+e+n+"?"+this.tagEndChar;{let s=this.options.tagValueProcessor(e,t);return s=this.replaceEntitiesValue(s),""===s?this.indentate(i)+"<"+e+n+this.closeTag(e)+this.tagEndChar:this.indentate(i)+"<"+e+n+">"+s+"0&&this.options.processEntities)for(let e=0;e { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-cloudformation","description":"AWS SDK for JavaScript Cloudformation Client for Node.js, Browser and React Native","version":"3.935.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-cloudformation","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"rimraf ./dist-* && rimraf *.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo cloudformation"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"3.935.0","@aws-sdk/credential-provider-node":"3.935.0","@aws-sdk/middleware-host-header":"3.930.0","@aws-sdk/middleware-logger":"3.930.0","@aws-sdk/middleware-recursion-detection":"3.933.0","@aws-sdk/middleware-user-agent":"3.935.0","@aws-sdk/region-config-resolver":"3.930.0","@aws-sdk/types":"3.930.0","@aws-sdk/util-endpoints":"3.930.0","@aws-sdk/util-user-agent-browser":"3.930.0","@aws-sdk/util-user-agent-node":"3.935.0","@smithy/config-resolver":"^4.4.3","@smithy/core":"^3.18.5","@smithy/fetch-http-handler":"^5.3.6","@smithy/hash-node":"^4.2.5","@smithy/invalid-dependency":"^4.2.5","@smithy/middleware-content-length":"^4.2.5","@smithy/middleware-endpoint":"^4.3.12","@smithy/middleware-retry":"^4.4.12","@smithy/middleware-serde":"^4.2.6","@smithy/middleware-stack":"^4.2.5","@smithy/node-config-provider":"^4.3.5","@smithy/node-http-handler":"^4.4.5","@smithy/protocol-http":"^5.3.5","@smithy/smithy-client":"^4.9.8","@smithy/types":"^4.9.0","@smithy/url-parser":"^4.2.5","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.11","@smithy/util-defaults-mode-node":"^4.2.14","@smithy/util-endpoints":"^3.2.5","@smithy/util-middleware":"^4.2.5","@smithy/util-retry":"^4.2.5","@smithy/util-utf8":"^4.2.0","@smithy/util-waiter":"^4.2.5","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node18":"18.2.4","@types/node":"^18.19.69","concurrently":"7.0.0","downlevel-dts":"0.10.1","rimraf":"3.0.2","typescript":"~5.8.3"},"engines":{"node":">=18.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cloudformation","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cloudformation"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-cloudformation","description":"AWS SDK for JavaScript Cloudformation Client for Node.js, Browser and React Native","version":"3.995.0","scripts":{"build":"concurrently \'yarn:build:types\' \'yarn:build:es\' && yarn build:cjs","build:cjs":"node ../../scripts/compilation/inline client-cloudformation","build:es":"tsc -p tsconfig.es.json","build:include:deps":"yarn g:turbo run build -F=\\"$npm_package_name\\"","build:types":"tsc -p tsconfig.types.json","build:types:downlevel":"downlevel-dts dist-types dist-types/ts3.4","clean":"premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo","extract:docs":"api-extractor run --local","generate:client":"node ../../scripts/generate-clients/single-service --solo cloudformation","test:e2e":"yarn g:vitest run -c vitest.config.e2e.mts","test:e2e:watch":"yarn g:vitest watch -c vitest.config.e2e.mts","test:index":"tsc --noEmit ./test/index-types.ts && node ./test/index-objects.spec.mjs"},"main":"./dist-cjs/index.js","types":"./dist-types/index.d.ts","module":"./dist-es/index.js","sideEffects":false,"dependencies":{"@aws-crypto/sha256-browser":"5.2.0","@aws-crypto/sha256-js":"5.2.0","@aws-sdk/core":"^3.973.11","@aws-sdk/credential-provider-node":"^3.972.10","@aws-sdk/middleware-host-header":"^3.972.3","@aws-sdk/middleware-logger":"^3.972.3","@aws-sdk/middleware-recursion-detection":"^3.972.3","@aws-sdk/middleware-user-agent":"^3.972.11","@aws-sdk/region-config-resolver":"^3.972.3","@aws-sdk/types":"^3.973.1","@aws-sdk/util-endpoints":"3.995.0","@aws-sdk/util-user-agent-browser":"^3.972.3","@aws-sdk/util-user-agent-node":"^3.972.10","@smithy/config-resolver":"^4.4.6","@smithy/core":"^3.23.2","@smithy/fetch-http-handler":"^5.3.9","@smithy/hash-node":"^4.2.8","@smithy/invalid-dependency":"^4.2.8","@smithy/middleware-content-length":"^4.2.8","@smithy/middleware-endpoint":"^4.4.16","@smithy/middleware-retry":"^4.4.33","@smithy/middleware-serde":"^4.2.9","@smithy/middleware-stack":"^4.2.8","@smithy/node-config-provider":"^4.3.8","@smithy/node-http-handler":"^4.4.10","@smithy/protocol-http":"^5.3.8","@smithy/smithy-client":"^4.11.5","@smithy/types":"^4.12.0","@smithy/url-parser":"^4.2.8","@smithy/util-base64":"^4.3.0","@smithy/util-body-length-browser":"^4.2.0","@smithy/util-body-length-node":"^4.2.1","@smithy/util-defaults-mode-browser":"^4.3.32","@smithy/util-defaults-mode-node":"^4.2.35","@smithy/util-endpoints":"^3.2.8","@smithy/util-middleware":"^4.2.8","@smithy/util-retry":"^4.2.8","@smithy/util-utf8":"^4.2.0","@smithy/util-waiter":"^4.2.8","tslib":"^2.6.2"},"devDependencies":{"@tsconfig/node20":"20.1.8","@types/node":"^20.14.8","concurrently":"7.0.0","downlevel-dts":"0.10.1","premove":"4.0.0","typescript":"~5.8.3"},"engines":{"node":">=20.0.0"},"typesVersions":{"<4.0":{"dist-types/*":["dist-types/ts3.4/*"]}},"files":["dist-*/**"],"author":{"name":"AWS SDK for JavaScript Team","url":"https://aws.amazon.com/javascript/"},"license":"Apache-2.0","browser":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.browser"},"react-native":{"./dist-es/runtimeConfig":"./dist-es/runtimeConfig.native"},"homepage":"https://github.com/aws/aws-sdk-js-v3/tree/main/clients/client-cloudformation","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-cloudformation"}}'); /***/ }) diff --git a/package-lock.json b/package-lock.json index 7c504aa..8a11ecf 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "license": "MIT", "dependencies": { "@actions/core": "2.0.2", - "@aws-sdk/client-cloudformation": "3.935.0", + "@aws-sdk/client-cloudformation": "3.995.0", "@smithy/node-http-handler": "4.4.5", "https-proxy-agent": "7.0.6", "js-yaml": "^4.1.1", @@ -202,50 +202,66 @@ } }, "node_modules/@aws-sdk/client-cloudformation": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.935.0.tgz", - "integrity": "sha512-6mfYqbIb0hiuX2omcqcntF1obVTKmqb4ONDiAHaOY27azrzgQOUHvqYoru3GkZk2qPXmxcyTWjoyWovSo6xv2A==", + "version": "3.995.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-cloudformation/-/client-cloudformation-3.995.0.tgz", + "integrity": "sha512-5IT/jN5TbVbbsU9dbar20bNuWWs/HUlYhRW8VMglhOGzZMvu9/Qq9AAgcsgNNZ4fMDPH9fw5993T/TgtvP+sBA==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.935.0", - "@aws-sdk/credential-provider-node": "3.935.0", - "@aws-sdk/middleware-host-header": "3.930.0", - "@aws-sdk/middleware-logger": "3.930.0", - "@aws-sdk/middleware-recursion-detection": "3.933.0", - "@aws-sdk/middleware-user-agent": "3.935.0", - "@aws-sdk/region-config-resolver": "3.930.0", - "@aws-sdk/types": "3.930.0", - "@aws-sdk/util-endpoints": "3.930.0", - "@aws-sdk/util-user-agent-browser": "3.930.0", - "@aws-sdk/util-user-agent-node": "3.935.0", - "@smithy/config-resolver": "^4.4.3", - "@smithy/core": "^3.18.5", - "@smithy/fetch-http-handler": "^5.3.6", - "@smithy/hash-node": "^4.2.5", - "@smithy/invalid-dependency": "^4.2.5", - "@smithy/middleware-content-length": "^4.2.5", - "@smithy/middleware-endpoint": "^4.3.12", - "@smithy/middleware-retry": "^4.4.12", - "@smithy/middleware-serde": "^4.2.6", - "@smithy/middleware-stack": "^4.2.5", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/node-http-handler": "^4.4.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", - "@smithy/url-parser": "^4.2.5", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/credential-provider-node": "^3.972.10", + "@aws-sdk/middleware-host-header": "^3.972.3", + "@aws-sdk/middleware-logger": "^3.972.3", + "@aws-sdk/middleware-recursion-detection": "^3.972.3", + "@aws-sdk/middleware-user-agent": "^3.972.11", + "@aws-sdk/region-config-resolver": "^3.972.3", + "@aws-sdk/types": "^3.973.1", + "@aws-sdk/util-endpoints": "3.995.0", + "@aws-sdk/util-user-agent-browser": "^3.972.3", + "@aws-sdk/util-user-agent-node": "^3.972.10", + "@smithy/config-resolver": "^4.4.6", + "@smithy/core": "^3.23.2", + "@smithy/fetch-http-handler": "^5.3.9", + "@smithy/hash-node": "^4.2.8", + "@smithy/invalid-dependency": "^4.2.8", + "@smithy/middleware-content-length": "^4.2.8", + "@smithy/middleware-endpoint": "^4.4.16", + "@smithy/middleware-retry": "^4.4.33", + "@smithy/middleware-serde": "^4.2.9", + "@smithy/middleware-stack": "^4.2.8", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/node-http-handler": "^4.4.10", + "@smithy/protocol-http": "^5.3.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.11", - "@smithy/util-defaults-mode-node": "^4.2.14", - "@smithy/util-endpoints": "^3.2.5", - "@smithy/util-middleware": "^4.2.5", - "@smithy/util-retry": "^4.2.5", + "@smithy/util-defaults-mode-browser": "^4.3.32", + "@smithy/util-defaults-mode-node": "^4.2.35", + "@smithy/util-endpoints": "^3.2.8", + "@smithy/util-middleware": "^4.2.8", + "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", - "@smithy/util-waiter": "^4.2.5", + "@smithy/util-waiter": "^4.2.8", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/client-cloudformation/node_modules/@smithy/node-http-handler": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.10.tgz", + "integrity": "sha512-u4YeUwOWRZaHbWaebvrs3UhwQwj+2VNmcVCwXcYTvPIuVyM7Ex1ftAj+fdbG/P4AkBwLq/+SKn+ydOI4ZJE9PA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/querystring-builder": "^4.2.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -253,109 +269,157 @@ } }, "node_modules/@aws-sdk/client-sso": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.935.0.tgz", - "integrity": "sha512-wnwy1NkH1XqdPKljqZdUxn4Ec2nKq6xhwtKZd6xs/JxKqljtMudcew9UwFrnozSWOrPQcZO7x+neZYfrMif4yg==", + "version": "3.993.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/client-sso/-/client-sso-3.993.0.tgz", + "integrity": "sha512-VLUN+wIeNX24fg12SCbzTUBnBENlL014yMKZvRhPkcn4wHR6LKgNrjsG3fZ03Xs0XoKaGtNFi1VVrq666sGBoQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.935.0", - "@aws-sdk/middleware-host-header": "3.930.0", - "@aws-sdk/middleware-logger": "3.930.0", - "@aws-sdk/middleware-recursion-detection": "3.933.0", - "@aws-sdk/middleware-user-agent": "3.935.0", - "@aws-sdk/region-config-resolver": "3.930.0", - "@aws-sdk/types": "3.930.0", - "@aws-sdk/util-endpoints": "3.930.0", - "@aws-sdk/util-user-agent-browser": "3.930.0", - "@aws-sdk/util-user-agent-node": "3.935.0", - "@smithy/config-resolver": "^4.4.3", - "@smithy/core": "^3.18.5", - "@smithy/fetch-http-handler": "^5.3.6", - "@smithy/hash-node": "^4.2.5", - "@smithy/invalid-dependency": "^4.2.5", - "@smithy/middleware-content-length": "^4.2.5", - "@smithy/middleware-endpoint": "^4.3.12", - "@smithy/middleware-retry": "^4.4.12", - "@smithy/middleware-serde": "^4.2.6", - "@smithy/middleware-stack": "^4.2.5", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/node-http-handler": "^4.4.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", - "@smithy/url-parser": "^4.2.5", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/middleware-host-header": "^3.972.3", + "@aws-sdk/middleware-logger": "^3.972.3", + "@aws-sdk/middleware-recursion-detection": "^3.972.3", + "@aws-sdk/middleware-user-agent": "^3.972.11", + "@aws-sdk/region-config-resolver": "^3.972.3", + "@aws-sdk/types": "^3.973.1", + "@aws-sdk/util-endpoints": "3.993.0", + "@aws-sdk/util-user-agent-browser": "^3.972.3", + "@aws-sdk/util-user-agent-node": "^3.972.9", + "@smithy/config-resolver": "^4.4.6", + "@smithy/core": "^3.23.2", + "@smithy/fetch-http-handler": "^5.3.9", + "@smithy/hash-node": "^4.2.8", + "@smithy/invalid-dependency": "^4.2.8", + "@smithy/middleware-content-length": "^4.2.8", + "@smithy/middleware-endpoint": "^4.4.16", + "@smithy/middleware-retry": "^4.4.33", + "@smithy/middleware-serde": "^4.2.9", + "@smithy/middleware-stack": "^4.2.8", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/node-http-handler": "^4.4.10", + "@smithy/protocol-http": "^5.3.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.11", - "@smithy/util-defaults-mode-node": "^4.2.14", - "@smithy/util-endpoints": "^3.2.5", - "@smithy/util-middleware": "^4.2.5", - "@smithy/util-retry": "^4.2.5", + "@smithy/util-defaults-mode-browser": "^4.3.32", + "@smithy/util-defaults-mode-node": "^4.2.35", + "@smithy/util-endpoints": "^3.2.8", + "@smithy/util-middleware": "^4.2.8", + "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/client-sso/node_modules/@aws-sdk/util-endpoints": { + "version": "3.993.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.993.0.tgz", + "integrity": "sha512-j6vioBeRZ4eHX4SWGvGPpwGg/xSOcK7f1GL0VM+rdf3ZFTIsUEhCFmD78B+5r2PgztcECSzEfvHQX01k8dPQPw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.1", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", + "@smithy/util-endpoints": "^3.2.8", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/client-sso/node_modules/@smithy/node-http-handler": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.10.tgz", + "integrity": "sha512-u4YeUwOWRZaHbWaebvrs3UhwQwj+2VNmcVCwXcYTvPIuVyM7Ex1ftAj+fdbG/P4AkBwLq/+SKn+ydOI4ZJE9PA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/querystring-builder": "^4.2.8", + "@smithy/types": "^4.12.0", + "tslib": "^2.6.2" + }, "engines": { "node": ">=18.0.0" } }, "node_modules/@aws-sdk/core": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.935.0.tgz", - "integrity": "sha512-5R5mTeV3DX91y7eA0J5nvG2c9ukjL9m0diQE9HmMuiZqtEIJJs2sHSX/wlkrosABux/NSVxuv8ndAYu5c5aeoA==", + "version": "3.973.11", + "resolved": "https://registry.npmjs.org/@aws-sdk/core/-/core-3.973.11.tgz", + "integrity": "sha512-wdQ8vrvHkKIV7yNUKXyjPWKCdYEUrZTHJ8Ojd5uJxXp9vqPCkUR1dpi1NtOLcrDgueJH7MUH5lQZxshjFPSbDA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.930.0", - "@aws-sdk/xml-builder": "3.930.0", - "@smithy/core": "^3.18.5", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/property-provider": "^4.2.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/signature-v4": "^5.3.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", + "@aws-sdk/types": "^3.973.1", + "@aws-sdk/xml-builder": "^3.972.5", + "@smithy/core": "^3.23.2", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/property-provider": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/signature-v4": "^5.3.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", - "@smithy/util-middleware": "^4.2.5", + "@smithy/util-middleware": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/credential-provider-env": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.935.0.tgz", - "integrity": "sha512-zHmfNEM2SPimwarSWtWhmjeqDZYFy6Fsktj/sJ60RxphHrVbcolTUmH7v0kdM5TCaScHqQHxhqBEsHY2KJDlPQ==", + "version": "3.972.9", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-env/-/credential-provider-env-3.972.9.tgz", + "integrity": "sha512-ZptrOwQynfupubvcngLkbdIq/aXvl/czdpEG8XJ8mN8Nb19BR0jaK0bR+tfuMU36Ez9q4xv7GGkHFqEEP2hUUQ==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/property-provider": "^4.2.5", - "@smithy/types": "^4.9.0", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/types": "^3.973.1", + "@smithy/property-provider": "^4.2.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/credential-provider-http": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.935.0.tgz", - "integrity": "sha512-7Ndb5A6lI94VrF2KLmWWZKJS2WK4SNGvK/hi9eDDF0qEUBdtPwDKylPjKH820DfRkkCi3L4LpfxU28ndEXQXAQ==", + "version": "3.972.11", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-http/-/credential-provider-http-3.972.11.tgz", + "integrity": "sha512-hECWoOoH386bGr89NQc9vA/abkGf5TJrMREt+lhNcnSNmoBS04fK7vc3LrJBSQAUGGVj0Tz3f4dHB3w5veovig==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/fetch-http-handler": "^5.3.6", - "@smithy/node-http-handler": "^4.4.5", - "@smithy/property-provider": "^4.2.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", - "@smithy/util-stream": "^4.5.6", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/types": "^3.973.1", + "@smithy/fetch-http-handler": "^5.3.9", + "@smithy/node-http-handler": "^4.4.10", + "@smithy/property-provider": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", + "@smithy/util-stream": "^4.5.12", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-http/node_modules/@smithy/node-http-handler": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.10.tgz", + "integrity": "sha512-u4YeUwOWRZaHbWaebvrs3UhwQwj+2VNmcVCwXcYTvPIuVyM7Ex1ftAj+fdbG/P4AkBwLq/+SKn+ydOI4ZJE9PA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/querystring-builder": "^4.2.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -363,319 +427,387 @@ } }, "node_modules/@aws-sdk/credential-provider-ini": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.935.0.tgz", - "integrity": "sha512-AfX3vjYZmtkw6HXFiVOJFvV0Ew9MHp+KrCT58tV4kzL8AnmzU/OZ2lzp/nhbEmaVoBgJMEvqXxOPKyA8T1V2dw==", + "version": "3.972.9", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-ini/-/credential-provider-ini-3.972.9.tgz", + "integrity": "sha512-zr1csEu9n4eDiHMTYJabX1mDGuGLgjgUnNckIivvk43DocJC9/f6DefFrnUPZXE+GHtbW50YuXb+JIxKykU74A==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.935.0", - "@aws-sdk/credential-provider-env": "3.935.0", - "@aws-sdk/credential-provider-http": "3.935.0", - "@aws-sdk/credential-provider-process": "3.935.0", - "@aws-sdk/credential-provider-sso": "3.935.0", - "@aws-sdk/credential-provider-web-identity": "3.935.0", - "@aws-sdk/nested-clients": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/credential-provider-imds": "^4.2.5", - "@smithy/property-provider": "^4.2.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/credential-provider-env": "^3.972.9", + "@aws-sdk/credential-provider-http": "^3.972.11", + "@aws-sdk/credential-provider-login": "^3.972.9", + "@aws-sdk/credential-provider-process": "^3.972.9", + "@aws-sdk/credential-provider-sso": "^3.972.9", + "@aws-sdk/credential-provider-web-identity": "^3.972.9", + "@aws-sdk/nested-clients": "3.993.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/credential-provider-imds": "^4.2.8", + "@smithy/property-provider": "^4.2.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/credential-provider-login": { + "version": "3.972.9", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-login/-/credential-provider-login-3.972.9.tgz", + "integrity": "sha512-m4RIpVgZChv0vWS/HKChg1xLgZPpx8Z+ly9Fv7FwA8SOfuC6I3htcSaBz2Ch4bneRIiBUhwP4ziUo0UZgtJStQ==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/nested-clients": "3.993.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/property-provider": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/credential-provider-node": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.935.0.tgz", - "integrity": "sha512-M7lD8e8/QHivrqiAp8aJpWFEo4MSPN8v9WGf940VcggM+lTFsF2JipvVBBBZ5w4AAU1PO9jCHdH5erx+rUTGZQ==", + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-node/-/credential-provider-node-3.972.10.tgz", + "integrity": "sha512-70nCESlvnzjo4LjJ8By8MYIiBogkYPSXl3WmMZfH9RZcB/Nt9qVWbFpYj6Fk1vLa4Vk8qagFVeXgxdieMxG1QA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/credential-provider-env": "3.935.0", - "@aws-sdk/credential-provider-http": "3.935.0", - "@aws-sdk/credential-provider-ini": "3.935.0", - "@aws-sdk/credential-provider-process": "3.935.0", - "@aws-sdk/credential-provider-sso": "3.935.0", - "@aws-sdk/credential-provider-web-identity": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/credential-provider-imds": "^4.2.5", - "@smithy/property-provider": "^4.2.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/credential-provider-env": "^3.972.9", + "@aws-sdk/credential-provider-http": "^3.972.11", + "@aws-sdk/credential-provider-ini": "^3.972.9", + "@aws-sdk/credential-provider-process": "^3.972.9", + "@aws-sdk/credential-provider-sso": "^3.972.9", + "@aws-sdk/credential-provider-web-identity": "^3.972.9", + "@aws-sdk/types": "^3.973.1", + "@smithy/credential-provider-imds": "^4.2.8", + "@smithy/property-provider": "^4.2.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/credential-provider-process": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.935.0.tgz", - "integrity": "sha512-hEzKOuywiifJuob6sCPD+FVSytGO0ShlPs0tQXcQwIKjfd9o4UJX6UG0fpNfZfPIEcPsqlKM2EkMRSQJTycULA==", + "version": "3.972.9", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-process/-/credential-provider-process-3.972.9.tgz", + "integrity": "sha512-gOWl0Fe2gETj5Bk151+LYKpeGi2lBDLNu+NMNpHRlIrKHdBmVun8/AalwMK8ci4uRfG5a3/+zvZBMpuen1SZ0A==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/property-provider": "^4.2.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/types": "^3.973.1", + "@smithy/property-provider": "^4.2.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/credential-provider-sso": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.935.0.tgz", - "integrity": "sha512-uWHuq+Hwp1uJfjGF3+p6HELte8v/uEfj/oHJ3+1gfprUil3eZR1eRUM6wJfCRhjVzquvAhKv0sVKeejGw5/25w==", + "version": "3.972.9", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-sso/-/credential-provider-sso-3.972.9.tgz", + "integrity": "sha512-ey7S686foGTArvFhi3ifQXmgptKYvLSGE2250BAQceMSXZddz7sUSNERGJT2S7u5KIe/kgugxrt01hntXVln6w==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/client-sso": "3.935.0", - "@aws-sdk/core": "3.935.0", - "@aws-sdk/token-providers": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/property-provider": "^4.2.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/client-sso": "3.993.0", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/token-providers": "3.993.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/property-provider": "^4.2.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/credential-provider-web-identity": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.935.0.tgz", - "integrity": "sha512-Rzw4BxPBEyw5XyXy0NYy2yzgPDnvEaPe5IIq+xNRqMpcwI1Wxnb9eNJQTz2YhULLy/nAD1Xs/6hEMwZl1x/GLQ==", + "version": "3.972.9", + "resolved": "https://registry.npmjs.org/@aws-sdk/credential-provider-web-identity/-/credential-provider-web-identity-3.972.9.tgz", + "integrity": "sha512-8LnfS76nHXoEc9aRRiMMpxZxJeDG0yusdyo3NvPhCgESmBUgpMa4luhGbClW5NoX/qRcGxxM6Z/esqANSNMTow==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.935.0", - "@aws-sdk/nested-clients": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/property-provider": "^4.2.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/nested-clients": "3.993.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/property-provider": "^4.2.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/middleware-host-header": { - "version": "3.930.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.930.0.tgz", - "integrity": "sha512-x30jmm3TLu7b/b+67nMyoV0NlbnCVT5DI57yDrhXAPCtdgM1KtdLWt45UcHpKOm1JsaIkmYRh2WYu7Anx4MG0g==", + "version": "3.972.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-host-header/-/middleware-host-header-3.972.3.tgz", + "integrity": "sha512-aknPTb2M+G3s+0qLCx4Li/qGZH8IIYjugHMv15JTYMe6mgZO8VBpYgeGYsNMGCqCZOcWzuf900jFBG5bopfzmA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.930.0", - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/middleware-logger": { - "version": "3.930.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.930.0.tgz", - "integrity": "sha512-vh4JBWzMCBW8wREvAwoSqB2geKsZwSHTa0nSt0OMOLp2PdTYIZDi0ZiVMmpfnjcx9XbS6aSluLv9sKx4RrG46A==", + "version": "3.972.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-logger/-/middleware-logger-3.972.3.tgz", + "integrity": "sha512-Ftg09xNNRqaz9QNzlfdQWfpqMCJbsQdnZVJP55jfhbKi1+FTWxGuvfPoBhDHIovqWKjqbuiew3HuhxbJ0+OjgA==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.930.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/middleware-recursion-detection": { - "version": "3.933.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.933.0.tgz", - "integrity": "sha512-qgrMlkVKzTCAdNw2A05DC2sPBo0KRQ7wk+lbYSRJnWVzcrceJhnmhoZVV5PFv7JtchK7sHVcfm9lcpiyd+XaCA==", + "version": "3.972.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-recursion-detection/-/middleware-recursion-detection-3.972.3.tgz", + "integrity": "sha512-PY57QhzNuXHnwbJgbWYTrqIDHYSeOlhfYERTAuc16LKZpTZRJUjzBFokp9hF7u1fuGeE3D70ERXzdbMBOqQz7Q==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.930.0", - "@aws/lambda-invoke-store": "^0.2.0", - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", + "@aws-sdk/types": "^3.973.1", + "@aws/lambda-invoke-store": "^0.2.2", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/middleware-user-agent": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.935.0.tgz", - "integrity": "sha512-d1hFok5kfODRLJ0cxdmyX6QO4LB/dOCrI6r/5lJ7xk8FNxV7dBttuIhPJmvNXQIKZ9uxyKl2Kh/OPax414nv9A==", + "version": "3.972.11", + "resolved": "https://registry.npmjs.org/@aws-sdk/middleware-user-agent/-/middleware-user-agent-3.972.11.tgz", + "integrity": "sha512-R8CvPsPHXwzIHCAza+bllY6PrctEk4lYq/SkHJz9NLoBHCcKQrbOcsfXxO6xmipSbUNIbNIUhH0lBsJGgsRdiw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@aws-sdk/util-endpoints": "3.930.0", - "@smithy/core": "^3.18.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/types": "^3.973.1", + "@aws-sdk/util-endpoints": "3.993.0", + "@smithy/core": "^3.23.2", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/middleware-user-agent/node_modules/@aws-sdk/util-endpoints": { + "version": "3.993.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.993.0.tgz", + "integrity": "sha512-j6vioBeRZ4eHX4SWGvGPpwGg/xSOcK7f1GL0VM+rdf3ZFTIsUEhCFmD78B+5r2PgztcECSzEfvHQX01k8dPQPw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.1", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", + "@smithy/util-endpoints": "^3.2.8", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/nested-clients": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.935.0.tgz", - "integrity": "sha512-4PjV6W4ZAjD+4CWoh5iol0MKNPCe7DkcDFkNtzirbNOEv1zbYcVtAzw7Oxry4LbYos2fkQkTHcirHgI6gAdbfQ==", + "version": "3.993.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/nested-clients/-/nested-clients-3.993.0.tgz", + "integrity": "sha512-iOq86f2H67924kQUIPOAvlmMaOAvOLoDOIb66I2YqSUpMYB6ufiuJW3RlREgskxv86S5qKzMnfy/X6CqMjK6XQ==", "license": "Apache-2.0", "dependencies": { "@aws-crypto/sha256-browser": "5.2.0", "@aws-crypto/sha256-js": "5.2.0", - "@aws-sdk/core": "3.935.0", - "@aws-sdk/middleware-host-header": "3.930.0", - "@aws-sdk/middleware-logger": "3.930.0", - "@aws-sdk/middleware-recursion-detection": "3.933.0", - "@aws-sdk/middleware-user-agent": "3.935.0", - "@aws-sdk/region-config-resolver": "3.930.0", - "@aws-sdk/types": "3.930.0", - "@aws-sdk/util-endpoints": "3.930.0", - "@aws-sdk/util-user-agent-browser": "3.930.0", - "@aws-sdk/util-user-agent-node": "3.935.0", - "@smithy/config-resolver": "^4.4.3", - "@smithy/core": "^3.18.5", - "@smithy/fetch-http-handler": "^5.3.6", - "@smithy/hash-node": "^4.2.5", - "@smithy/invalid-dependency": "^4.2.5", - "@smithy/middleware-content-length": "^4.2.5", - "@smithy/middleware-endpoint": "^4.3.12", - "@smithy/middleware-retry": "^4.4.12", - "@smithy/middleware-serde": "^4.2.6", - "@smithy/middleware-stack": "^4.2.5", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/node-http-handler": "^4.4.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", - "@smithy/url-parser": "^4.2.5", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/middleware-host-header": "^3.972.3", + "@aws-sdk/middleware-logger": "^3.972.3", + "@aws-sdk/middleware-recursion-detection": "^3.972.3", + "@aws-sdk/middleware-user-agent": "^3.972.11", + "@aws-sdk/region-config-resolver": "^3.972.3", + "@aws-sdk/types": "^3.973.1", + "@aws-sdk/util-endpoints": "3.993.0", + "@aws-sdk/util-user-agent-browser": "^3.972.3", + "@aws-sdk/util-user-agent-node": "^3.972.9", + "@smithy/config-resolver": "^4.4.6", + "@smithy/core": "^3.23.2", + "@smithy/fetch-http-handler": "^5.3.9", + "@smithy/hash-node": "^4.2.8", + "@smithy/invalid-dependency": "^4.2.8", + "@smithy/middleware-content-length": "^4.2.8", + "@smithy/middleware-endpoint": "^4.4.16", + "@smithy/middleware-retry": "^4.4.33", + "@smithy/middleware-serde": "^4.2.9", + "@smithy/middleware-stack": "^4.2.8", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/node-http-handler": "^4.4.10", + "@smithy/protocol-http": "^5.3.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", "@smithy/util-body-length-node": "^4.2.1", - "@smithy/util-defaults-mode-browser": "^4.3.11", - "@smithy/util-defaults-mode-node": "^4.2.14", - "@smithy/util-endpoints": "^3.2.5", - "@smithy/util-middleware": "^4.2.5", - "@smithy/util-retry": "^4.2.5", + "@smithy/util-defaults-mode-browser": "^4.3.32", + "@smithy/util-defaults-mode-node": "^4.2.35", + "@smithy/util-endpoints": "^3.2.8", + "@smithy/util-middleware": "^4.2.8", + "@smithy/util-retry": "^4.2.8", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/nested-clients/node_modules/@aws-sdk/util-endpoints": { + "version": "3.993.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.993.0.tgz", + "integrity": "sha512-j6vioBeRZ4eHX4SWGvGPpwGg/xSOcK7f1GL0VM+rdf3ZFTIsUEhCFmD78B+5r2PgztcECSzEfvHQX01k8dPQPw==", + "license": "Apache-2.0", + "dependencies": { + "@aws-sdk/types": "^3.973.1", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", + "@smithy/util-endpoints": "^3.2.8", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=20.0.0" + } + }, + "node_modules/@aws-sdk/nested-clients/node_modules/@smithy/node-http-handler": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.10.tgz", + "integrity": "sha512-u4YeUwOWRZaHbWaebvrs3UhwQwj+2VNmcVCwXcYTvPIuVyM7Ex1ftAj+fdbG/P4AkBwLq/+SKn+ydOI4ZJE9PA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/querystring-builder": "^4.2.8", + "@smithy/types": "^4.12.0", + "tslib": "^2.6.2" + }, "engines": { "node": ">=18.0.0" } }, "node_modules/@aws-sdk/region-config-resolver": { - "version": "3.930.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.930.0.tgz", - "integrity": "sha512-KL2JZqH6aYeQssu1g1KuWsReupdfOoxD6f1as2VC+rdwYFUu4LfzMsFfXnBvvQWWqQ7rZHWOw1T+o5gJmg7Dzw==", + "version": "3.972.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/region-config-resolver/-/region-config-resolver-3.972.3.tgz", + "integrity": "sha512-v4J8qYAWfOMcZ4MJUyatntOicTzEMaU7j3OpkRCGGFSL2NgXQ5VbxauIyORA+pxdKZ0qQG2tCQjQjZDlXEC3Ow==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.930.0", - "@smithy/config-resolver": "^4.4.3", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/types": "^4.9.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/config-resolver": "^4.4.6", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/token-providers": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.935.0.tgz", - "integrity": "sha512-3faev6XMzO/rxGtouFBdl/Dxi9e2TCvkhTwD/5W8oN5Flwk9nZm5GIPUeA7AAD5sgt2Kf6TWSOQplVgq1jmCJA==", + "version": "3.993.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/token-providers/-/token-providers-3.993.0.tgz", + "integrity": "sha512-+35g4c+8r7sB9Sjp1KPdM8qxGn6B/shBjJtEUN4e+Edw9UEQlZKIzioOGu3UAbyE0a/s450LdLZr4wbJChtmww==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/core": "3.935.0", - "@aws-sdk/nested-clients": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/property-provider": "^4.2.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/core": "^3.973.11", + "@aws-sdk/nested-clients": "3.993.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/property-provider": "^4.2.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/types": { - "version": "3.930.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.930.0.tgz", - "integrity": "sha512-we/vaAgwlEFW7IeftmCLlLMw+6hFs3DzZPJw7lVHbj/5HJ0bz9gndxEsS2lQoeJ1zhiiLqAqvXxmM43s0MBg0A==", + "version": "3.973.1", + "resolved": "https://registry.npmjs.org/@aws-sdk/types/-/types-3.973.1.tgz", + "integrity": "sha512-DwHBiMNOB468JiX6+i34c+THsKHErYUdNQ3HexeXZvVn4zouLjgaS4FejiGSi2HyBuzuyHg7SuOPmjSvoU9NRg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/util-endpoints": { - "version": "3.930.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.930.0.tgz", - "integrity": "sha512-M2oEKBzzNAYr136RRc6uqw3aWlwCxqTP1Lawps9E1d2abRPvl1p1ztQmmXp1Ak4rv8eByIZ+yQyKQ3zPdRG5dw==", + "version": "3.995.0", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-endpoints/-/util-endpoints-3.995.0.tgz", + "integrity": "sha512-aym/pjB8SLbo9w2nmkrDdAAVKVlf7CM71B9mKhjDbJTzwpSFBPHqJIMdDyj0mLumKC0aIVDr1H6U+59m9GvMFw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.930.0", - "@smithy/types": "^4.9.0", - "@smithy/url-parser": "^4.2.5", - "@smithy/util-endpoints": "^3.2.5", + "@aws-sdk/types": "^3.973.1", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", + "@smithy/util-endpoints": "^3.2.8", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/util-locate-window": { - "version": "3.893.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.893.0.tgz", - "integrity": "sha512-T89pFfgat6c8nMmpI8eKjBcDcgJq36+m9oiXbcUzeU55MP9ZuGgBomGjGnHaEyF36jenW9gmg3NfZDm0AO2XPg==", + "version": "3.965.4", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-locate-window/-/util-locate-window-3.965.4.tgz", + "integrity": "sha512-H1onv5SkgPBK2P6JR2MjGgbOnttoNzSPIRoeZTNPZYyaplwGg50zS3amXvXqF0/qfXpWEC9rLWU564QTB9bSog==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws-sdk/util-user-agent-browser": { - "version": "3.930.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.930.0.tgz", - "integrity": "sha512-q6lCRm6UAe+e1LguM5E4EqM9brQlDem4XDcQ87NzEvlTW6GzmNCO0w1jS0XgCFXQHjDxjdlNFX+5sRbHijwklg==", + "version": "3.972.3", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-browser/-/util-user-agent-browser-3.972.3.tgz", + "integrity": "sha512-JurOwkRUcXD/5MTDBcqdyQ9eVedtAsZgw5rBwktsPTN7QtPiS2Ld1jkJepNgYoCufz1Wcut9iup7GJDoIHp8Fw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/types": "3.930.0", - "@smithy/types": "^4.9.0", + "@aws-sdk/types": "^3.973.1", + "@smithy/types": "^4.12.0", "bowser": "^2.11.0", "tslib": "^2.6.2" } }, "node_modules/@aws-sdk/util-user-agent-node": { - "version": "3.935.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.935.0.tgz", - "integrity": "sha512-KXr3pGQz/BhGMUrXARs081SXVTwJ50ShA22AYwxI02BZsazY8wmkJCNgJGwRdMKfdmMPEe8xpQNawDKPYxvo9A==", + "version": "3.972.10", + "resolved": "https://registry.npmjs.org/@aws-sdk/util-user-agent-node/-/util-user-agent-node-3.972.10.tgz", + "integrity": "sha512-LVXzICPlsheET+sE6tkcS47Q5HkSTrANIlqL1iFxGAY/wRQ236DX/PCAK56qMh9QJoXAfXfoRW0B0Og4R+X7Nw==", "license": "Apache-2.0", "dependencies": { - "@aws-sdk/middleware-user-agent": "3.935.0", - "@aws-sdk/types": "3.930.0", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/types": "^4.9.0", + "@aws-sdk/middleware-user-agent": "^3.972.11", + "@aws-sdk/types": "^3.973.1", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" }, "peerDependencies": { "aws-crt": ">=1.0.0" @@ -687,23 +819,23 @@ } }, "node_modules/@aws-sdk/xml-builder": { - "version": "3.930.0", - "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.930.0.tgz", - "integrity": "sha512-YIfkD17GocxdmlUVc3ia52QhcWuRIUJonbF8A2CYfcWNV3HzvAqpcPeC0bYUhkK+8e8YO1ARnLKZQE0TlwzorA==", + "version": "3.972.5", + "resolved": "https://registry.npmjs.org/@aws-sdk/xml-builder/-/xml-builder-3.972.5.tgz", + "integrity": "sha512-mCae5Ys6Qm1LDu0qdGwx2UQ63ONUe+FHw908fJzLDqFKTDBK4LDZUqKWm4OkTCNFq19bftjsBSESIGLD/s3/rA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", - "fast-xml-parser": "5.2.5", + "@smithy/types": "^4.12.0", + "fast-xml-parser": "5.3.6", "tslib": "^2.6.2" }, "engines": { - "node": ">=18.0.0" + "node": ">=20.0.0" } }, "node_modules/@aws/lambda-invoke-store": { - "version": "0.2.0", - "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.0.tgz", - "integrity": "sha512-D1jAmAZQYMoPiacfgNf7AWhg3DFN3Wq/vQv3WINt9znwjzHp2x+WzdJFxxj7xZL7V1U79As6G8f7PorMYWBKsQ==", + "version": "0.2.3", + "resolved": "https://registry.npmjs.org/@aws/lambda-invoke-store/-/lambda-invoke-store-0.2.3.tgz", + "integrity": "sha512-oLvsaPMTBejkkmHhjf09xTgk71mOqyr/409NKhRIL08If7AhVfUsJhVsx386uJaqNd42v9kWamQ9lFbkoC2dYw==", "license": "Apache-2.0", "engines": { "node": ">=18.0.0" @@ -2175,12 +2307,12 @@ "license": "(Unlicense OR Apache-2.0)" }, "node_modules/@smithy/abort-controller": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.5.tgz", - "integrity": "sha512-j7HwVkBw68YW8UmFRcjZOmssE77Rvk0GWAIN1oFBhsaovQmZWYCIcGa9/pwRB0ExI8Sk9MWNALTjftjHZea7VA==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/abort-controller/-/abort-controller-4.2.8.tgz", + "integrity": "sha512-peuVfkYHAmS5ybKxWcfraK7WBBP0J+rkfUcbHJJKQ4ir3UAUNQI+Y4Vt/PqSzGqgloJ5O1dk7+WzNL8wcCSXbw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2188,16 +2320,16 @@ } }, "node_modules/@smithy/config-resolver": { - "version": "4.4.3", - "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.3.tgz", - "integrity": "sha512-ezHLe1tKLUxDJo2LHtDuEDyWXolw8WGOR92qb4bQdWq/zKenO5BvctZGrVJBK08zjezSk7bmbKFOXIVyChvDLw==", + "version": "4.4.6", + "resolved": "https://registry.npmjs.org/@smithy/config-resolver/-/config-resolver-4.4.6.tgz", + "integrity": "sha512-qJpzYC64kaj3S0fueiu3kXm8xPrR3PcXDPEgnaNMRn0EjNSZFoFjvbUp0YUDsRhN1CB90EnHJtbxWKevnH99UQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.5", - "@smithy/types": "^4.9.0", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/types": "^4.12.0", "@smithy/util-config-provider": "^4.2.0", - "@smithy/util-endpoints": "^3.2.5", - "@smithy/util-middleware": "^4.2.5", + "@smithy/util-endpoints": "^3.2.8", + "@smithy/util-middleware": "^4.2.8", "tslib": "^2.6.2" }, "engines": { @@ -2205,18 +2337,18 @@ } }, "node_modules/@smithy/core": { - "version": "3.18.5", - "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.18.5.tgz", - "integrity": "sha512-6gnIz3h+PEPQGDj8MnRSjDvKBah042jEoPgjFGJ4iJLBE78L4lY/n98x14XyPF4u3lN179Ub/ZKFY5za9GeLQw==", + "version": "3.23.2", + "resolved": "https://registry.npmjs.org/@smithy/core/-/core-3.23.2.tgz", + "integrity": "sha512-HaaH4VbGie4t0+9nY3tNBRSxVTr96wzIqexUa6C2qx3MPePAuz7lIxPxYtt1Wc//SPfJLNoZJzfdt0B6ksj2jA==", "license": "Apache-2.0", "dependencies": { - "@smithy/middleware-serde": "^4.2.6", - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", + "@smithy/middleware-serde": "^4.2.9", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-body-length-browser": "^4.2.0", - "@smithy/util-middleware": "^4.2.5", - "@smithy/util-stream": "^4.5.6", + "@smithy/util-middleware": "^4.2.8", + "@smithy/util-stream": "^4.5.12", "@smithy/util-utf8": "^4.2.0", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" @@ -2226,15 +2358,15 @@ } }, "node_modules/@smithy/credential-provider-imds": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.5.tgz", - "integrity": "sha512-BZwotjoZWn9+36nimwm/OLIcVe+KYRwzMjfhd4QT7QxPm9WY0HiOV8t/Wlh+HVUif0SBVV7ksq8//hPaBC/okQ==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/credential-provider-imds/-/credential-provider-imds-4.2.8.tgz", + "integrity": "sha512-FNT0xHS1c/CPN8upqbMFP83+ul5YgdisfCfkZ86Jh2NSmnqw/AJ6x5pEogVCTVvSm7j9MopRU89bmDelxuDMYw==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.5", - "@smithy/property-provider": "^4.2.5", - "@smithy/types": "^4.9.0", - "@smithy/url-parser": "^4.2.5", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/property-provider": "^4.2.8", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", "tslib": "^2.6.2" }, "engines": { @@ -2242,14 +2374,14 @@ } }, "node_modules/@smithy/fetch-http-handler": { - "version": "5.3.6", - "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.6.tgz", - "integrity": "sha512-3+RG3EA6BBJ/ofZUeTFJA7mHfSYrZtQIrDP9dI8Lf7X6Jbos2jptuLrAAteDiFVrmbEmLSuRG/bUKzfAXk7dhg==", + "version": "5.3.9", + "resolved": "https://registry.npmjs.org/@smithy/fetch-http-handler/-/fetch-http-handler-5.3.9.tgz", + "integrity": "sha512-I4UhmcTYXBrct03rwzQX1Y/iqQlzVQaPxWjCjula++5EmWq9YGBrx6bbGqluGc1f0XEfhSkiY4jhLgbsJUMKRA==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^5.3.5", - "@smithy/querystring-builder": "^4.2.5", - "@smithy/types": "^4.9.0", + "@smithy/protocol-http": "^5.3.8", + "@smithy/querystring-builder": "^4.2.8", + "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "tslib": "^2.6.2" }, @@ -2258,12 +2390,12 @@ } }, "node_modules/@smithy/hash-node": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.5.tgz", - "integrity": "sha512-DpYX914YOfA3UDT9CN1BM787PcHfWRBB43fFGCYrZFUH0Jv+5t8yYl+Pd5PW4+QzoGEDvn5d5QIO4j2HyYZQSA==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/hash-node/-/hash-node-4.2.8.tgz", + "integrity": "sha512-7ZIlPbmaDGxVoxErDZnuFG18WekhbA/g2/i97wGj+wUBeS6pcUeAym8u4BXh/75RXWhgIJhyC11hBzig6MljwA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" @@ -2273,12 +2405,12 @@ } }, "node_modules/@smithy/invalid-dependency": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.5.tgz", - "integrity": "sha512-2L2erASEro1WC5nV+plwIMxrTXpvpfzl4e+Nre6vBVRR2HKeGGcvpJyyL3/PpiSg+cJG2KpTmZmq934Olb6e5A==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/invalid-dependency/-/invalid-dependency-4.2.8.tgz", + "integrity": "sha512-N9iozRybwAQ2dn9Fot9kI6/w9vos2oTXLhtK7ovGqwZjlOcxu6XhPlpLpC+INsxktqHinn5gS2DXDjDF2kG5sQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2298,13 +2430,13 @@ } }, "node_modules/@smithy/middleware-content-length": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.5.tgz", - "integrity": "sha512-Y/RabVa5vbl5FuHYV2vUCwvh/dqzrEY/K2yWPSqvhFUwIY0atLqO4TienjBXakoy4zrKAMCZwg+YEqmH7jaN7A==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-content-length/-/middleware-content-length-4.2.8.tgz", + "integrity": "sha512-RO0jeoaYAB1qBRhfVyq0pMgBoUK34YEJxVxyjOWYZiOKOq2yMZ4MnVXMZCUDenpozHue207+9P5ilTV1zeda0A==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2312,18 +2444,18 @@ } }, "node_modules/@smithy/middleware-endpoint": { - "version": "4.3.12", - "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.3.12.tgz", - "integrity": "sha512-9pAX/H+VQPzNbouhDhkW723igBMLgrI8OtX+++M7iKJgg/zY/Ig3i1e6seCcx22FWhE6Q/S61BRdi2wXBORT+A==", + "version": "4.4.16", + "resolved": "https://registry.npmjs.org/@smithy/middleware-endpoint/-/middleware-endpoint-4.4.16.tgz", + "integrity": "sha512-L5GICFCSsNhbJ5JSKeWFGFy16Q2OhoBizb3X2DrxaJwXSEujVvjG9Jt386dpQn2t7jINglQl0b4K/Su69BdbMA==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.18.5", - "@smithy/middleware-serde": "^4.2.6", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", - "@smithy/url-parser": "^4.2.5", - "@smithy/util-middleware": "^4.2.5", + "@smithy/core": "^3.23.2", + "@smithy/middleware-serde": "^4.2.9", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", + "@smithy/url-parser": "^4.2.8", + "@smithy/util-middleware": "^4.2.8", "tslib": "^2.6.2" }, "engines": { @@ -2331,18 +2463,18 @@ } }, "node_modules/@smithy/middleware-retry": { - "version": "4.4.12", - "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.12.tgz", - "integrity": "sha512-S4kWNKFowYd0lID7/DBqWHOQxmxlsf0jBaos9chQZUWTVOjSW1Ogyh8/ib5tM+agFDJ/TCxuCTvrnlc+9cIBcQ==", + "version": "4.4.33", + "resolved": "https://registry.npmjs.org/@smithy/middleware-retry/-/middleware-retry-4.4.33.tgz", + "integrity": "sha512-jLqZOdJhtIL4lnA9hXnAG6GgnJlo1sD3FqsTxm9wSfjviqgWesY/TMBVnT84yr4O0Vfe0jWoXlfFbzsBVph3WA==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/service-error-classification": "^4.2.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", - "@smithy/util-middleware": "^4.2.5", - "@smithy/util-retry": "^4.2.5", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/service-error-classification": "^4.2.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", + "@smithy/util-middleware": "^4.2.8", + "@smithy/util-retry": "^4.2.8", "@smithy/uuid": "^1.1.0", "tslib": "^2.6.2" }, @@ -2351,13 +2483,13 @@ } }, "node_modules/@smithy/middleware-serde": { - "version": "4.2.6", - "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.6.tgz", - "integrity": "sha512-VkLoE/z7e2g8pirwisLz8XJWedUSY8my/qrp81VmAdyrhi94T+riBfwP+AOEEFR9rFTSonC/5D2eWNmFabHyGQ==", + "version": "4.2.9", + "resolved": "https://registry.npmjs.org/@smithy/middleware-serde/-/middleware-serde-4.2.9.tgz", + "integrity": "sha512-eMNiej0u/snzDvlqRGSN3Vl0ESn3838+nKyVfF2FKNXFbi4SERYT6PR392D39iczngbqqGG0Jl1DlCnp7tBbXQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2365,12 +2497,12 @@ } }, "node_modules/@smithy/middleware-stack": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.5.tgz", - "integrity": "sha512-bYrutc+neOyWxtZdbB2USbQttZN0mXaOyYLIsaTbJhFsfpXyGWUxJpEuO1rJ8IIJm2qH4+xJT0mxUSsEDTYwdQ==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/middleware-stack/-/middleware-stack-4.2.8.tgz", + "integrity": "sha512-w6LCfOviTYQjBctOKSwy6A8FIkQy7ICvglrZFl6Bw4FmcQ1Z420fUtIhxaUZZshRe0VCq4kvDiPiXrPZAe8oRA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2378,14 +2510,14 @@ } }, "node_modules/@smithy/node-config-provider": { - "version": "4.3.5", - "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.5.tgz", - "integrity": "sha512-UTurh1C4qkVCtqggI36DGbLB2Kv8UlcFdMXDcWMbqVY2uRg0XmT9Pb4Vj6oSQ34eizO1fvR0RnFV4Axw4IrrAg==", + "version": "4.3.8", + "resolved": "https://registry.npmjs.org/@smithy/node-config-provider/-/node-config-provider-4.3.8.tgz", + "integrity": "sha512-aFP1ai4lrbVlWjfpAfRSL8KFcnJQYfTl5QxLJXY32vghJrDuFyPZ6LtUL+JEGYiFRG1PfPLHLoxj107ulncLIg==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.5", - "@smithy/shared-ini-file-loader": "^4.4.0", - "@smithy/types": "^4.9.0", + "@smithy/property-provider": "^4.2.8", + "@smithy/shared-ini-file-loader": "^4.4.3", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2409,12 +2541,12 @@ } }, "node_modules/@smithy/property-provider": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.5.tgz", - "integrity": "sha512-8iLN1XSE1rl4MuxvQ+5OSk/Zb5El7NJZ1td6Tn+8dQQHIjp59Lwl6bd0+nzw6SKm2wSSriH2v/I9LPzUic7EOg==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/property-provider/-/property-provider-4.2.8.tgz", + "integrity": "sha512-EtCTbyIveCKeOXDSWSdze3k612yCPq1YbXsbqX3UHhkOSW8zKsM9NOJG5gTIya0vbY2DIaieG8pKo1rITHYL0w==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2422,12 +2554,12 @@ } }, "node_modules/@smithy/protocol-http": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.5.tgz", - "integrity": "sha512-RlaL+sA0LNMp03bf7XPbFmT5gN+w3besXSWMkA8rcmxLSVfiEXElQi4O2IWwPfxzcHkxqrwBFMbngB8yx/RvaQ==", + "version": "5.3.8", + "resolved": "https://registry.npmjs.org/@smithy/protocol-http/-/protocol-http-5.3.8.tgz", + "integrity": "sha512-QNINVDhxpZ5QnP3aviNHQFlRogQZDfYlCkQT+7tJnErPQbDhysondEjhikuANxgMsZrkGeiAxXy4jguEGsDrWQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2435,12 +2567,12 @@ } }, "node_modules/@smithy/querystring-builder": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.5.tgz", - "integrity": "sha512-y98otMI1saoajeik2kLfGyRp11e5U/iJYH/wLCh3aTV/XutbGT9nziKGkgCaMD1ghK7p6htHMm6b6scl9JRUWg==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/querystring-builder/-/querystring-builder-4.2.8.tgz", + "integrity": "sha512-Xr83r31+DrE8CP3MqPgMJl+pQlLLmOfiEUnoyAlGzzJIrEsbKsPy1hqH0qySaQm4oWrCBlUqRt+idEgunKB+iw==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "@smithy/util-uri-escape": "^4.2.0", "tslib": "^2.6.2" }, @@ -2449,12 +2581,12 @@ } }, "node_modules/@smithy/querystring-parser": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.5.tgz", - "integrity": "sha512-031WCTdPYgiQRYNPXznHXof2YM0GwL6SeaSyTH/P72M1Vz73TvCNH2Nq8Iu2IEPq9QP2yx0/nrw5YmSeAi/AjQ==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/querystring-parser/-/querystring-parser-4.2.8.tgz", + "integrity": "sha512-vUurovluVy50CUlazOiXkPq40KGvGWSdmusa3130MwrR1UNnNgKAlj58wlOe61XSHRpUfIIh6cE0zZ8mzKaDPA==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2462,24 +2594,24 @@ } }, "node_modules/@smithy/service-error-classification": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.5.tgz", - "integrity": "sha512-8fEvK+WPE3wUAcDvqDQG1Vk3ANLR8Px979te96m84CbKAjBVf25rPYSzb4xU4hlTyho7VhOGnh5i62D/JVF0JQ==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/service-error-classification/-/service-error-classification-4.2.8.tgz", + "integrity": "sha512-mZ5xddodpJhEt3RkCjbmUQuXUOaPNTkbMGR0bcS8FE0bJDLMZlhmpgrvPNCYglVw5rsYTpSnv19womw9WWXKQQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0" + "@smithy/types": "^4.12.0" }, "engines": { "node": ">=18.0.0" } }, "node_modules/@smithy/shared-ini-file-loader": { - "version": "4.4.0", - "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.0.tgz", - "integrity": "sha512-5WmZ5+kJgJDjwXXIzr1vDTG+RhF9wzSODQBfkrQ2VVkYALKGvZX1lgVSxEkgicSAFnFhPj5rudJV0zoinqS0bA==", + "version": "4.4.3", + "resolved": "https://registry.npmjs.org/@smithy/shared-ini-file-loader/-/shared-ini-file-loader-4.4.3.tgz", + "integrity": "sha512-DfQjxXQnzC5UbCUPeC3Ie8u+rIWZTvuDPAGU/BxzrOGhRvgUanaP68kDZA+jaT3ZI+djOf+4dERGlm9mWfFDrg==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2487,16 +2619,16 @@ } }, "node_modules/@smithy/signature-v4": { - "version": "5.3.5", - "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.5.tgz", - "integrity": "sha512-xSUfMu1FT7ccfSXkoLl/QRQBi2rOvi3tiBZU2Tdy3I6cgvZ6SEi9QNey+lqps/sJRnogIS+lq+B1gxxbra2a/w==", + "version": "5.3.8", + "resolved": "https://registry.npmjs.org/@smithy/signature-v4/-/signature-v4-5.3.8.tgz", + "integrity": "sha512-6A4vdGj7qKNRF16UIcO8HhHjKW27thsxYci+5r/uVRkdcBEkOEiY8OMPuydLX4QHSrJqGHPJzPRwwVTqbLZJhg==", "license": "Apache-2.0", "dependencies": { "@smithy/is-array-buffer": "^4.2.0", - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", "@smithy/util-hex-encoding": "^4.2.0", - "@smithy/util-middleware": "^4.2.5", + "@smithy/util-middleware": "^4.2.8", "@smithy/util-uri-escape": "^4.2.0", "@smithy/util-utf8": "^4.2.0", "tslib": "^2.6.2" @@ -2506,17 +2638,17 @@ } }, "node_modules/@smithy/smithy-client": { - "version": "4.9.8", - "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.9.8.tgz", - "integrity": "sha512-8xgq3LgKDEFoIrLWBho/oYKyWByw9/corz7vuh1upv7ZBm0ZMjGYBhbn6v643WoIqA9UTcx5A5htEp/YatUwMA==", + "version": "4.11.5", + "resolved": "https://registry.npmjs.org/@smithy/smithy-client/-/smithy-client-4.11.5.tgz", + "integrity": "sha512-xixwBRqoeP2IUgcAl3U9dvJXc+qJum4lzo3maaJxifsZxKUYLfVfCXvhT4/jD01sRrHg5zjd1cw2Zmjr4/SuKQ==", "license": "Apache-2.0", "dependencies": { - "@smithy/core": "^3.18.5", - "@smithy/middleware-endpoint": "^4.3.12", - "@smithy/middleware-stack": "^4.2.5", - "@smithy/protocol-http": "^5.3.5", - "@smithy/types": "^4.9.0", - "@smithy/util-stream": "^4.5.6", + "@smithy/core": "^3.23.2", + "@smithy/middleware-endpoint": "^4.4.16", + "@smithy/middleware-stack": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/types": "^4.12.0", + "@smithy/util-stream": "^4.5.12", "tslib": "^2.6.2" }, "engines": { @@ -2524,9 +2656,9 @@ } }, "node_modules/@smithy/types": { - "version": "4.9.0", - "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.9.0.tgz", - "integrity": "sha512-MvUbdnXDTwykR8cB1WZvNNwqoWVaTRA0RLlLmf/cIFNMM2cKWz01X4Ly6SMC4Kks30r8tT3Cty0jmeWfiuyHTA==", + "version": "4.12.0", + "resolved": "https://registry.npmjs.org/@smithy/types/-/types-4.12.0.tgz", + "integrity": "sha512-9YcuJVTOBDjg9LWo23Qp0lTQ3D7fQsQtwle0jVfpbUHy9qBwCEgKuVH4FqFB3VYu0nwdHKiEMA+oXz7oV8X1kw==", "license": "Apache-2.0", "dependencies": { "tslib": "^2.6.2" @@ -2536,13 +2668,13 @@ } }, "node_modules/@smithy/url-parser": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.5.tgz", - "integrity": "sha512-VaxMGsilqFnK1CeBX+LXnSuaMx4sTL/6znSZh2829txWieazdVxr54HmiyTsIbpOTLcf5nYpq9lpzmwRdxj6rQ==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/url-parser/-/url-parser-4.2.8.tgz", + "integrity": "sha512-NQho9U68TGMEU639YkXnVMV3GEFFULmmaWdlu1E9qzyIePOHsoSnagTGSDv1Zi8DCNN6btxOSdgmy5E/hsZwhA==", "license": "Apache-2.0", "dependencies": { - "@smithy/querystring-parser": "^4.2.5", - "@smithy/types": "^4.9.0", + "@smithy/querystring-parser": "^4.2.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2613,14 +2745,14 @@ } }, "node_modules/@smithy/util-defaults-mode-browser": { - "version": "4.3.11", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.11.tgz", - "integrity": "sha512-yHv+r6wSQXEXTPVCIQTNmXVWs7ekBTpMVErjqZoWkYN75HIFN5y9+/+sYOejfAuvxWGvgzgxbTHa/oz61YTbKw==", + "version": "4.3.32", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-browser/-/util-defaults-mode-browser-4.3.32.tgz", + "integrity": "sha512-092sjYfFMQ/iaPH798LY/OJFBcYu0sSK34Oy9vdixhsU36zlZu8OcYjF3TD4e2ARupyK7xaxPXl+T0VIJTEkkg==", "license": "Apache-2.0", "dependencies": { - "@smithy/property-provider": "^4.2.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", + "@smithy/property-provider": "^4.2.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2628,17 +2760,17 @@ } }, "node_modules/@smithy/util-defaults-mode-node": { - "version": "4.2.14", - "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.14.tgz", - "integrity": "sha512-ljZN3iRvaJUgulfvobIuG97q1iUuCMrvXAlkZ4msY+ZuVHQHDIqn7FKZCEj+bx8omz6kF5yQXms/xhzjIO5XiA==", + "version": "4.2.35", + "resolved": "https://registry.npmjs.org/@smithy/util-defaults-mode-node/-/util-defaults-mode-node-4.2.35.tgz", + "integrity": "sha512-miz/ggz87M8VuM29y7jJZMYkn7+IErM5p5UgKIf8OtqVs/h2bXr1Bt3uTsREsI/4nK8a0PQERbAPsVPVNIsG7Q==", "license": "Apache-2.0", "dependencies": { - "@smithy/config-resolver": "^4.4.3", - "@smithy/credential-provider-imds": "^4.2.5", - "@smithy/node-config-provider": "^4.3.5", - "@smithy/property-provider": "^4.2.5", - "@smithy/smithy-client": "^4.9.8", - "@smithy/types": "^4.9.0", + "@smithy/config-resolver": "^4.4.6", + "@smithy/credential-provider-imds": "^4.2.8", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/property-provider": "^4.2.8", + "@smithy/smithy-client": "^4.11.5", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2646,13 +2778,13 @@ } }, "node_modules/@smithy/util-endpoints": { - "version": "3.2.5", - "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.5.tgz", - "integrity": "sha512-3O63AAWu2cSNQZp+ayl9I3NapW1p1rR5mlVHcF6hAB1dPZUQFfRPYtplWX/3xrzWthPGj5FqB12taJJCfH6s8A==", + "version": "3.2.8", + "resolved": "https://registry.npmjs.org/@smithy/util-endpoints/-/util-endpoints-3.2.8.tgz", + "integrity": "sha512-8JaVTn3pBDkhZgHQ8R0epwWt+BqPSLCjdjXXusK1onwJlRuN69fbvSK66aIKKO7SwVFM6x2J2ox5X8pOaWcUEw==", "license": "Apache-2.0", "dependencies": { - "@smithy/node-config-provider": "^4.3.5", - "@smithy/types": "^4.9.0", + "@smithy/node-config-provider": "^4.3.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2672,12 +2804,12 @@ } }, "node_modules/@smithy/util-middleware": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.5.tgz", - "integrity": "sha512-6Y3+rvBF7+PZOc40ybeZMcGln6xJGVeY60E7jy9Mv5iKpMJpHgRE6dKy9ScsVxvfAYuEX4Q9a65DQX90KaQ3bA==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/util-middleware/-/util-middleware-4.2.8.tgz", + "integrity": "sha512-PMqfeJxLcNPMDgvPbbLl/2Vpin+luxqTGPpW3NAQVLbRrFRzTa4rNAASYeIGjRV9Ytuhzny39SpyU04EQreF+A==", "license": "Apache-2.0", "dependencies": { - "@smithy/types": "^4.9.0", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2685,13 +2817,13 @@ } }, "node_modules/@smithy/util-retry": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.5.tgz", - "integrity": "sha512-GBj3+EZBbN4NAqJ/7pAhsXdfzdlznOh8PydUijy6FpNIMnHPSMO2/rP4HKu+UFeikJxShERk528oy7GT79YiJg==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/util-retry/-/util-retry-4.2.8.tgz", + "integrity": "sha512-CfJqwvoRY0kTGe5AkQokpURNCT1u/MkRzMTASWMPPo2hNSnKtF1D45dQl3DE2LKLr4m+PW9mCeBMJr5mCAVThg==", "license": "Apache-2.0", "dependencies": { - "@smithy/service-error-classification": "^4.2.5", - "@smithy/types": "^4.9.0", + "@smithy/service-error-classification": "^4.2.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -2699,14 +2831,14 @@ } }, "node_modules/@smithy/util-stream": { - "version": "4.5.6", - "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.6.tgz", - "integrity": "sha512-qWw/UM59TiaFrPevefOZ8CNBKbYEP6wBAIlLqxn3VAIo9rgnTNc4ASbVrqDmhuwI87usnjhdQrxodzAGFFzbRQ==", + "version": "4.5.12", + "resolved": "https://registry.npmjs.org/@smithy/util-stream/-/util-stream-4.5.12.tgz", + "integrity": "sha512-D8tgkrmhAX/UNeCZbqbEO3uqyghUnEmmoO9YEvRuwxjlkKKUE7FOgCJnqpTlQPe9MApdWPky58mNQQHbnCzoNg==", "license": "Apache-2.0", "dependencies": { - "@smithy/fetch-http-handler": "^5.3.6", - "@smithy/node-http-handler": "^4.4.5", - "@smithy/types": "^4.9.0", + "@smithy/fetch-http-handler": "^5.3.9", + "@smithy/node-http-handler": "^4.4.10", + "@smithy/types": "^4.12.0", "@smithy/util-base64": "^4.3.0", "@smithy/util-buffer-from": "^4.2.0", "@smithy/util-hex-encoding": "^4.2.0", @@ -2717,6 +2849,22 @@ "node": ">=18.0.0" } }, + "node_modules/@smithy/util-stream/node_modules/@smithy/node-http-handler": { + "version": "4.4.10", + "resolved": "https://registry.npmjs.org/@smithy/node-http-handler/-/node-http-handler-4.4.10.tgz", + "integrity": "sha512-u4YeUwOWRZaHbWaebvrs3UhwQwj+2VNmcVCwXcYTvPIuVyM7Ex1ftAj+fdbG/P4AkBwLq/+SKn+ydOI4ZJE9PA==", + "license": "Apache-2.0", + "dependencies": { + "@smithy/abort-controller": "^4.2.8", + "@smithy/protocol-http": "^5.3.8", + "@smithy/querystring-builder": "^4.2.8", + "@smithy/types": "^4.12.0", + "tslib": "^2.6.2" + }, + "engines": { + "node": ">=18.0.0" + } + }, "node_modules/@smithy/util-uri-escape": { "version": "4.2.0", "resolved": "https://registry.npmjs.org/@smithy/util-uri-escape/-/util-uri-escape-4.2.0.tgz", @@ -2743,13 +2891,13 @@ } }, "node_modules/@smithy/util-waiter": { - "version": "4.2.5", - "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.5.tgz", - "integrity": "sha512-Dbun99A3InifQdIrsXZ+QLcC0PGBPAdrl4cj1mTgJvyc9N2zf7QSxg8TBkzsCmGJdE3TLbO9ycwpY0EkWahQ/g==", + "version": "4.2.8", + "resolved": "https://registry.npmjs.org/@smithy/util-waiter/-/util-waiter-4.2.8.tgz", + "integrity": "sha512-n+lahlMWk+aejGuax7DPWtqav8HYnWxQwR+LCG2BgCUmaGcTe9qZCFsmw8TMg9iG75HOwhrJCX9TCJRLH+Yzqg==", "license": "Apache-2.0", "dependencies": { - "@smithy/abort-controller": "^4.2.5", - "@smithy/types": "^4.9.0", + "@smithy/abort-controller": "^4.2.8", + "@smithy/types": "^4.12.0", "tslib": "^2.6.2" }, "engines": { @@ -4028,9 +4176,9 @@ } }, "node_modules/bowser": { - "version": "2.12.1", - "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.12.1.tgz", - "integrity": "sha512-z4rE2Gxh7tvshQ4hluIT7XcFrgLIQaw9X3A+kTTRdovCz5PMukm/0QC/BKSYPj3omF5Qfypn9O/c5kgpmvYUCw==", + "version": "2.14.1", + "resolved": "https://registry.npmjs.org/bowser/-/bowser-2.14.1.tgz", + "integrity": "sha512-tzPjzCxygAKWFOJP011oxFHs57HzIhOEracIgAePE4pqB3LikALKnSzUyU4MGs9/iCEUuHlAJTjTc5M+u7YEGg==", "license": "MIT" }, "node_modules/brace-expansion": { @@ -5554,9 +5702,9 @@ "dev": true }, "node_modules/fast-xml-parser": { - "version": "5.2.5", - "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.2.5.tgz", - "integrity": "sha512-pfX9uG9Ki0yekDHx2SiuRIyFdyAr1kMIMitPvb0YBo8SUfKvia7w7FIyd/l6av85pFYRhZscS75MwMnbvY+hcQ==", + "version": "5.3.6", + "resolved": "https://registry.npmjs.org/fast-xml-parser/-/fast-xml-parser-5.3.6.tgz", + "integrity": "sha512-QNI3sAvSvaOiaMl8FYU4trnEzCwiRr8XMWgAHzlrWpTSj+QaCSvOf1h82OEP1s4hiAXhnbXSyFWCf4ldZzZRVA==", "funding": [ { "type": "github", @@ -5565,7 +5713,7 @@ ], "license": "MIT", "dependencies": { - "strnum": "^2.1.0" + "strnum": "^2.1.2" }, "bin": { "fxparser": "src/cli/cli.js" @@ -9230,9 +9378,9 @@ } }, "node_modules/strnum": { - "version": "2.1.1", - "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.1.tgz", - "integrity": "sha512-7ZvoFTiCnGxBtDqJ//Cu6fWtZtc7Y3x+QOirG15wztbdngGSkht27o2pyGWrVy0b4WAy3jbKmnoK6g5VlVNUUw==", + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/strnum/-/strnum-2.1.2.tgz", + "integrity": "sha512-l63NF9y/cLROq/yqKXSLtcMeeyOfnSQlfMSlzFt/K73oIaD8DGaQWd7Z34X9GPiKqP5rbSh84Hl4bOlLcjiSrQ==", "funding": [ { "type": "github", diff --git a/package.json b/package.json index 521d643..b652e33 100644 --- a/package.json +++ b/package.json @@ -29,7 +29,7 @@ "homepage": "https://github.com/aws-actions/aws-cloudformation-github-deploy#readme", "dependencies": { "@actions/core": "2.0.2", - "@aws-sdk/client-cloudformation": "3.935.0", + "@aws-sdk/client-cloudformation": "3.995.0", "@smithy/node-http-handler": "4.4.5", "https-proxy-agent": "7.0.6", "js-yaml": "^4.1.1",