From c7a2280e363ae4407201011eecfbd6f9f80f46e3 Mon Sep 17 00:00:00 2001 From: GitHub Actions Date: Tue, 9 Sep 2025 03:08:42 +0000 Subject: [PATCH] chore: Update dist --- dist/cleanup/index.js | 2382 ++++++++++++++++++++++++++++++----------- dist/index.js | 2382 ++++++++++++++++++++++++++++++----------- 2 files changed, 3486 insertions(+), 1278 deletions(-) diff --git a/dist/cleanup/index.js b/dist/cleanup/index.js index 8200bac..8b5b180 100644 --- a/dist/cleanup/index.js +++ b/dist/cleanup/index.js @@ -6481,6 +6481,7 @@ __export(index_exports, { AwsQueryProtocol: () => AwsQueryProtocol, AwsRestJsonProtocol: () => AwsRestJsonProtocol, AwsRestXmlProtocol: () => AwsRestXmlProtocol, + AwsSmithyRpcV2CborProtocol: () => AwsSmithyRpcV2CborProtocol, JsonCodec: () => JsonCodec, JsonShapeDeserializer: () => JsonShapeDeserializer, JsonShapeSerializer: () => JsonShapeSerializer, @@ -6500,6 +6501,198 @@ __export(index_exports, { }); module.exports = __toCommonJS(index_exports); +// src/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.ts +var import_cbor = __nccwpck_require__(4645); +var import_schema2 = __nccwpck_require__(6890); + +// src/submodules/protocols/ProtocolLib.ts +var import_schema = __nccwpck_require__(6890); +var import_util_body_length_browser = __nccwpck_require__(2098); +var ProtocolLib = class { + static { + __name(this, "ProtocolLib"); + } + /** + * @param body - to be inspected. + * @param serdeContext - this is a subset type but in practice is the client.config having a property called bodyLengthChecker. + * + * @returns content-length value for the body if possible. + * @throws Error and should be caught and handled if not possible to determine length. + */ + calculateContentLength(body, serdeContext) { + const bodyLengthCalculator = serdeContext?.bodyLengthChecker ?? import_util_body_length_browser.calculateBodyLength; + return String(bodyLengthCalculator(body)); + } + /** + * This is only for REST protocols. + * + * @param defaultContentType - of the protocol. + * @param inputSchema - schema for which to determine content type. + * + * @returns content-type header value or undefined when not applicable. + */ + resolveRestContentType(defaultContentType, inputSchema) { + const members = inputSchema.getMemberSchemas(); + const httpPayloadMember = Object.values(members).find((m) => { + return !!m.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + return mediaType; + } else if (httpPayloadMember.isStringSchema()) { + return "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + return "application/octet-stream"; + } else { + return defaultContentType; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); + const noPrefixHeaders = httpPrefixHeaders === void 0; + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; + }); + if (hasBody) { + return defaultContentType; + } + } + } + /** + * Shared code for finding error schema or throwing an unmodeled base error. + * @returns error schema and error metadata. + * + * @throws ServiceBaseException or generic Error if no error schema could be found. + */ + async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { + let namespace = defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const errorMetadata = { + $metadata: metadata, + $response: response, + $fault: response.statusCode < 500 ? "client" : "server" + }; + const registry = import_schema.TypeRegistry.for(namespace); + try { + const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier); + return { errorSchema, errorMetadata }; + } catch (e) { + if (dataObject.Message) { + dataObject.message = dataObject.Message; + } + const baseExceptionSchema = import_schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); + } + throw Object.assign(new Error(errorName), errorMetadata, dataObject); + } + } + /** + * Reads the x-amzn-query-error header for awsQuery compatibility. + * + * @param output - values that will be assigned to an error object. + * @param response - from which to read awsQueryError headers. + */ + setQueryCompatError(output, response) { + const queryErrorHeader = response.headers?.["x-amzn-query-error"]; + if (output !== void 0 && queryErrorHeader != null) { + const [Code, Type] = queryErrorHeader.split(";"); + const entries = Object.entries(output); + const Error2 = { + Code, + Type + }; + Object.assign(output, Error2); + for (const [k, v] of entries) { + Error2[k] = v; + } + delete Error2.__type; + output.Error = Error2; + } + } + /** + * Assigns Error, Type, Code from the awsQuery error object to the output error object. + * @param queryCompatErrorData - query compat error object. + * @param errorData - canonical error object returned to the caller. + */ + queryCompatOutput(queryCompatErrorData, errorData) { + if (queryCompatErrorData.Error) { + errorData.Error = queryCompatErrorData.Error; + } + if (queryCompatErrorData.Type) { + errorData.Type = queryCompatErrorData.Type; + } + if (queryCompatErrorData.Code) { + errorData.Code = queryCompatErrorData.Code; + } + } +}; + +// src/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.ts +var AwsSmithyRpcV2CborProtocol = class extends import_cbor.SmithyRpcV2CborProtocol { + static { + __name(this, "AwsSmithyRpcV2CborProtocol"); + } + awsQueryCompatible; + mixin = new ProtocolLib(); + constructor({ + defaultNamespace, + awsQueryCompatible + }) { + super({ defaultNamespace }); + this.awsQueryCompatible = !!awsQueryCompatible; + } + /** + * @override + */ + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; + } + return request; + } + /** + * @override + */ + async handleError(operationSchema, context, response, dataObject, metadata) { + if (this.awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); + } + const errorName = (0, import_cbor.loadSmithyRpcV2CborErrorCode)(response, dataObject) ?? "Unknown"; + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorName, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema2.NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } + if (this.awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); + } + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); + } +}; + // src/submodules/protocols/coercing-serializers.ts var _toStr = /* @__PURE__ */ __name((val) => { if (val == null) { @@ -6557,8 +6750,7 @@ var _toNum = /* @__PURE__ */ __name((val) => { // src/submodules/protocols/json/AwsJsonRpcProtocol.ts var import_protocols = __nccwpck_require__(3422); -var import_schema3 = __nccwpck_require__(6890); -var import_util_body_length_browser = __nccwpck_require__(2098); +var import_schema5 = __nccwpck_require__(6890); // src/submodules/protocols/ConfigurableSerdeContext.ts var SerdeContextConfig = class { @@ -6572,7 +6764,7 @@ var SerdeContextConfig = class { }; // src/submodules/protocols/json/JsonShapeDeserializer.ts -var import_schema = __nccwpck_require__(6890); +var import_schema3 = __nccwpck_require__(6890); var import_serde2 = __nccwpck_require__(2430); var import_util_base64 = __nccwpck_require__(8385); @@ -6598,7 +6790,8 @@ __name(jsonReviver, "jsonReviver"); // src/submodules/protocols/common.ts var import_smithy_client = __nccwpck_require__(1411); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); +var import_util_utf8 = __nccwpck_require__(1577); +var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf8.toUtf8)(body)), "collectBodyString"); // src/submodules/protocols/json/parseJsonBody.ts var parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { @@ -6674,7 +6867,7 @@ var JsonShapeDeserializer = class extends SerdeContextConfig { } _read(schema, value) { const isObject = value !== null && typeof value === "object"; - const ns = import_schema.NormalizedSchema.of(schema); + const ns = import_schema3.NormalizedSchema.of(schema); if (ns.isListSchema() && Array.isArray(value)) { const listMember = ns.getValueSchema(); const out = []; @@ -6718,13 +6911,13 @@ var JsonShapeDeserializer = class extends SerdeContextConfig { } if (ns.isTimestampSchema()) { const options = this.settings.timestampFormat; - const format = options.useTrait ? ns.getSchema() === import_schema.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + const format = options.useTrait ? ns.getSchema() === import_schema3.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; switch (format) { - case import_schema.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema3.SCHEMA.TIMESTAMP_DATE_TIME: return (0, import_serde2.parseRfc3339DateTimeWithOffset)(value); - case import_schema.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema3.SCHEMA.TIMESTAMP_HTTP_DATE: return (0, import_serde2.parseRfc7231DateTime)(value); - case import_schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema3.SCHEMA.TIMESTAMP_EPOCH_SECONDS: return (0, import_serde2.parseEpochTimestamp)(value); default: console.warn("Missing timestamp format, parsing value with Date constructor:", value); @@ -6755,7 +6948,7 @@ var JsonShapeDeserializer = class extends SerdeContextConfig { }; // src/submodules/protocols/json/JsonShapeSerializer.ts -var import_schema2 = __nccwpck_require__(6890); +var import_schema4 = __nccwpck_require__(6890); var import_serde4 = __nccwpck_require__(2430); // src/submodules/protocols/json/jsonReplacer.ts @@ -6831,7 +7024,7 @@ var JsonShapeSerializer = class extends SerdeContextConfig { buffer; rootSchema; write(schema, value) { - this.rootSchema = import_schema2.NormalizedSchema.of(schema); + this.rootSchema = import_schema4.NormalizedSchema.of(schema); this.buffer = this._write(this.rootSchema, value); } flush() { @@ -6843,7 +7036,7 @@ var JsonShapeSerializer = class extends SerdeContextConfig { } _write(schema, value, container) { const isObject = value !== null && typeof value === "object"; - const ns = import_schema2.NormalizedSchema.of(schema); + const ns = import_schema4.NormalizedSchema.of(schema); if (ns.isListSchema() && Array.isArray(value)) { const listMember = ns.getValueSchema(); const out = []; @@ -6889,13 +7082,13 @@ var JsonShapeSerializer = class extends SerdeContextConfig { } if (ns.isTimestampSchema() && value instanceof Date) { const options = this.settings.timestampFormat; - const format = options.useTrait ? ns.getSchema() === import_schema2.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + const format = options.useTrait ? ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; switch (format) { - case import_schema2.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema4.SCHEMA.TIMESTAMP_DATE_TIME: return value.toISOString().replace(".000Z", "Z"); - case import_schema2.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE: return (0, import_serde4.dateToUtcString)(value); - case import_schema2.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS: return value.getTime() / 1e3; default: console.warn("Missing timestamp format, using epoch seconds", value); @@ -6953,7 +7146,13 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { deserializer; serviceTarget; codec; - constructor({ defaultNamespace, serviceTarget }) { + mixin = new ProtocolLib(); + awsQueryCompatible; + constructor({ + defaultNamespace, + serviceTarget, + awsQueryCompatible + }) { super({ defaultNamespace }); @@ -6961,12 +7160,13 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { this.codec = new JsonCodec({ timestampFormat: { useTrait: true, - default: import_schema3.SCHEMA.TIMESTAMP_EPOCH_SECONDS + default: import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS }, jsonName: false }); this.serializer = this.codec.createSerializer(); this.deserializer = this.codec.createDeserializer(); + this.awsQueryCompatible = !!awsQueryCompatible; } async serializeRequest(operationSchema, input, context) { const request = await super.serializeRequest(operationSchema, input, context); @@ -6975,13 +7175,16 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { } Object.assign(request.headers, { "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, - "x-amz-target": `${this.serviceTarget}.${import_schema3.NormalizedSchema.of(operationSchema).getName()}` + "x-amz-target": `${this.serviceTarget}.${import_schema5.NormalizedSchema.of(operationSchema).getName()}` }); - if ((0, import_schema3.deref)(operationSchema.input) === "unit" || !request.body) { + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; + } + if ((0, import_schema5.deref)(operationSchema.input) === "unit" || !request.body) { request.body = "{}"; } try { - request.headers["content-length"] = String((0, import_util_body_length_browser.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } return request; @@ -6990,41 +7193,37 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { return this.codec; } async handleError(operationSchema, context, response, dataObject, metadata) { + if (this.awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); + } const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const registry = import_schema3.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorIdentifier); - } catch (e) { - const baseExceptionSchema = import_schema3.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), dataObject); - } - throw new Error(errorName); - } - const ns = import_schema3.NormalizedSchema.of(errorSchema); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema5.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const exception = new errorSchema.ctor(message); - await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; for (const [name, member] of ns.structIterator()) { const target = member.getMergedTraits().jsonName ?? name; output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + if (this.awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); + } + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } }; @@ -7033,10 +7232,15 @@ var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol { static { __name(this, "AwsJson1_0Protocol"); } - constructor({ defaultNamespace, serviceTarget }) { + constructor({ + defaultNamespace, + serviceTarget, + awsQueryCompatible + }) { super({ defaultNamespace, - serviceTarget + serviceTarget, + awsQueryCompatible }); } getShapeId() { @@ -7058,10 +7262,15 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol { static { __name(this, "AwsJson1_1Protocol"); } - constructor({ defaultNamespace, serviceTarget }) { + constructor({ + defaultNamespace, + serviceTarget, + awsQueryCompatible + }) { super({ defaultNamespace, - serviceTarget + serviceTarget, + awsQueryCompatible }); } getShapeId() { @@ -7080,8 +7289,7 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol { // src/submodules/protocols/json/AwsRestJsonProtocol.ts var import_protocols2 = __nccwpck_require__(3422); -var import_schema4 = __nccwpck_require__(6890); -var import_util_body_length_browser2 = __nccwpck_require__(2098); +var import_schema6 = __nccwpck_require__(6890); var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { static { __name(this, "AwsRestJsonProtocol"); @@ -7089,6 +7297,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { serializer; deserializer; codec; + mixin = new ProtocolLib(); constructor({ defaultNamespace }) { super({ defaultNamespace @@ -7096,7 +7305,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { const settings = { timestampFormat: { useTrait: true, - default: import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS + default: import_schema6.SCHEMA.TIMESTAMP_EPOCH_SECONDS }, httpBindings: true, jsonName: true @@ -7117,31 +7326,11 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { } async serializeRequest(operationSchema, input, context) { const request = await super.serializeRequest(operationSchema, input, context); - const inputSchema = import_schema4.NormalizedSchema.of(operationSchema.input); - const members = inputSchema.getMemberSchemas(); + const inputSchema = import_schema6.NormalizedSchema.of(operationSchema.input); if (!request.headers["content-type"]) { - const httpPayloadMember = Object.values(members).find((m) => { - return !!m.getMergedTraits().httpPayload; - }); - if (httpPayloadMember) { - const mediaType = httpPayloadMember.getMergedTraits().mediaType; - if (mediaType) { - request.headers["content-type"] = mediaType; - } else if (httpPayloadMember.isStringSchema()) { - request.headers["content-type"] = "text/plain"; - } else if (httpPayloadMember.isBlobSchema()) { - request.headers["content-type"] = "application/octet-stream"; - } else { - request.headers["content-type"] = this.getDefaultContentType(); - } - } else if (!inputSchema.isUnitSchema()) { - const hasBody = Object.values(members).find((m) => { - const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); - return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; - }); - if (hasBody) { - request.headers["content-type"] = this.getDefaultContentType(); - } + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; } } if (request.headers["content-type"] && !request.body) { @@ -7149,7 +7338,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { } if (request.body) { try { - request.headers["content-length"] = String((0, import_util_body_length_browser2.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } } @@ -7157,24 +7346,14 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const registry = import_schema4.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorIdentifier); - } catch (e) { - const baseExceptionSchema = import_schema4.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), dataObject); - } - throw new Error(errorName); - } - const ns = import_schema4.NormalizedSchema.of(errorSchema); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema6.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const exception = new errorSchema.ctor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); @@ -7183,14 +7362,15 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { const target = member.getMergedTraits().jsonName ?? name; output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } /** * @override @@ -7214,14 +7394,13 @@ var awsExpectUnion = /* @__PURE__ */ __name((value) => { // src/submodules/protocols/query/AwsQueryProtocol.ts var import_protocols5 = __nccwpck_require__(3422); -var import_schema7 = __nccwpck_require__(6890); -var import_util_body_length_browser3 = __nccwpck_require__(2098); +var import_schema9 = __nccwpck_require__(6890); // src/submodules/protocols/xml/XmlShapeDeserializer.ts var import_protocols3 = __nccwpck_require__(3422); -var import_schema5 = __nccwpck_require__(6890); +var import_schema7 = __nccwpck_require__(6890); var import_smithy_client3 = __nccwpck_require__(1411); -var import_util_utf8 = __nccwpck_require__(1577); +var import_util_utf82 = __nccwpck_require__(1577); var import_fast_xml_parser = __nccwpck_require__(591); var XmlShapeDeserializer = class extends SerdeContextConfig { constructor(settings) { @@ -7243,7 +7422,7 @@ var XmlShapeDeserializer = class extends SerdeContextConfig { * @param key - used by AwsQuery to step one additional depth into the object before reading it. */ read(schema, bytes, key) { - const ns = import_schema5.NormalizedSchema.of(schema); + const ns = import_schema7.NormalizedSchema.of(schema); const memberSchemas = ns.getMemberSchemas(); const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { return !!memberNs.getMemberTraits().eventPayload; @@ -7259,12 +7438,12 @@ var XmlShapeDeserializer = class extends SerdeContextConfig { } return output; } - const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)(bytes); + const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8)(bytes); const parsedObject = this.parseXml(xmlString); return this.readSchema(schema, key ? parsedObject[key] : parsedObject); } readSchema(_schema, value) { - const ns = import_schema5.NormalizedSchema.of(_schema); + const ns = import_schema7.NormalizedSchema.of(_schema); const traits = ns.getMergedTraits(); if (ns.isListSchema() && !Array.isArray(value)) { return this.readSchema(ns, [value]); @@ -7371,7 +7550,7 @@ var XmlShapeDeserializer = class extends SerdeContextConfig { // src/submodules/protocols/query/QueryShapeSerializer.ts var import_protocols4 = __nccwpck_require__(3422); -var import_schema6 = __nccwpck_require__(6890); +var import_schema8 = __nccwpck_require__(6890); var import_serde5 = __nccwpck_require__(2430); var import_smithy_client4 = __nccwpck_require__(1411); var import_util_base642 = __nccwpck_require__(8385); @@ -7388,7 +7567,7 @@ var QueryShapeSerializer = class extends SerdeContextConfig { if (this.buffer === void 0) { this.buffer = ""; } - const ns = import_schema6.NormalizedSchema.of(schema); + const ns = import_schema8.NormalizedSchema.of(schema); if (prefix && !prefix.endsWith(".")) { prefix += "."; } @@ -7420,13 +7599,13 @@ var QueryShapeSerializer = class extends SerdeContextConfig { this.writeKey(prefix); const format = (0, import_protocols4.determineTimestampFormat)(ns, this.settings); switch (format) { - case import_schema6.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema8.SCHEMA.TIMESTAMP_DATE_TIME: this.writeValue(value.toISOString().replace(".000Z", "Z")); break; - case import_schema6.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema8.SCHEMA.TIMESTAMP_HTTP_DATE: this.writeValue((0, import_smithy_client4.dateToUtcString)(value)); break; - case import_schema6.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema8.SCHEMA.TIMESTAMP_EPOCH_SECONDS: this.writeValue(String(value.getTime() / 1e3)); break; } @@ -7526,7 +7705,7 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { const settings = { timestampFormat: { useTrait: true, - default: import_schema7.SCHEMA.TIMESTAMP_DATE_TIME + default: import_schema9.SCHEMA.TIMESTAMP_DATE_TIME }, httpBindings: false, xmlNamespace: options.xmlNamespace, @@ -7541,6 +7720,7 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { } serializer; deserializer; + mixin = new ProtocolLib(); getShapeId() { return "aws.protocols#awsQuery"; } @@ -7559,27 +7739,28 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { Object.assign(request.headers, { "content-type": `application/x-www-form-urlencoded` }); - if ((0, import_schema7.deref)(operationSchema.input) === "unit" || !request.body) { + if ((0, import_schema9.deref)(operationSchema.input) === "unit" || !request.body) { request.body = ""; } - request.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request.body; + const action = operationSchema.name.split("#")[1] ?? operationSchema.name; + request.body = `Action=${action}&Version=${this.options.version}` + request.body; if (request.body.endsWith("&")) { request.body = request.body.slice(-1); } try { - request.headers["content-length"] = String((0, import_util_body_length_browser3.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } return request; } async deserializeResponse(operationSchema, context, response) { const deserializer = this.deserializer; - const ns = import_schema7.NormalizedSchema.of(operationSchema.output); + const ns = import_schema9.NormalizedSchema.of(operationSchema.output); const dataObject = {}; if (response.statusCode >= 300) { const bytes2 = await (0, import_protocols5.collectBody)(response.body, context); if (bytes2.byteLength > 0) { - Object.assign(dataObject, await deserializer.read(import_schema7.SCHEMA.DOCUMENT, bytes2)); + Object.assign(dataObject, await deserializer.read(import_schema9.SCHEMA.DOCUMENT, bytes2)); } await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); } @@ -7588,7 +7769,8 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { delete response.headers[header]; response.headers[header.toLowerCase()] = value; } - const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split("#")[1] + "Result" : void 0; + const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name; + const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0; const bytes = await (0, import_protocols5.collectBody)(response.body, context); if (bytes.byteLength > 0) { Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); @@ -7607,46 +7789,35 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const errorDataSource = this.loadQueryError(dataObject); - const registry = import_schema7.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.find( - (schema) => import_schema7.NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName - ); - if (!errorSchema) { - errorSchema = registry.getSchema(errorIdentifier); - } - } catch (e) { - const baseExceptionSchema = import_schema7.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), errorDataSource); - } - throw new Error(errorName); - } - const ns = import_schema7.NormalizedSchema.of(errorSchema); + const errorData = this.loadQueryError(dataObject); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + errorData, + metadata, + (registry, errorName) => registry.find( + (schema) => import_schema9.NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName + ) + ); + const ns = import_schema9.NormalizedSchema.of(errorSchema); const message = this.loadQueryErrorMessage(dataObject); const exception = new errorSchema.ctor(message); const output = {}; for (const [name, member] of ns.structIterator()) { const target = member.getMergedTraits().xmlName ?? name; - const value = errorDataSource[target] ?? dataObject[target]; + const value = errorData[target] ?? dataObject[target]; output[name] = this.deserializer.readSchema(member, value); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } /** * The variations in the error and error message locations are attributed to @@ -7701,8 +7872,7 @@ var AwsEc2QueryProtocol = class extends AwsQueryProtocol { // src/submodules/protocols/xml/AwsRestXmlProtocol.ts var import_protocols6 = __nccwpck_require__(3422); -var import_schema9 = __nccwpck_require__(6890); -var import_util_body_length_browser4 = __nccwpck_require__(2098); +var import_schema11 = __nccwpck_require__(6890); // src/submodules/protocols/xml/parseXmlBody.ts var import_smithy_client5 = __nccwpck_require__(1411); @@ -7763,7 +7933,7 @@ var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { // src/submodules/protocols/xml/XmlShapeSerializer.ts var import_xml_builder = __nccwpck_require__(4274); -var import_schema8 = __nccwpck_require__(6890); +var import_schema10 = __nccwpck_require__(6890); var import_serde6 = __nccwpck_require__(2430); var import_smithy_client6 = __nccwpck_require__(1411); var import_util_base643 = __nccwpck_require__(8385); @@ -7779,7 +7949,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig { byteBuffer; buffer; write(schema, value) { - const ns = import_schema8.NormalizedSchema.of(schema); + const ns = import_schema10.NormalizedSchema.of(schema); if (ns.isStringSchema() && typeof value === "string") { this.stringBuffer = value; } else if (ns.isBlobSchema()) { @@ -7824,9 +7994,6 @@ var XmlShapeSerializer = class extends SerdeContextConfig { } const structXmlNode = import_xml_builder.XmlNode.of(name); const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); - if (xmlns) { - structXmlNode.addAttribute(xmlnsAttr, xmlns); - } for (const [memberName, memberSchema] of ns.structIterator()) { const val = value[memberName]; if (val != null || memberSchema.isIdempotencyToken()) { @@ -7850,6 +8017,9 @@ var XmlShapeSerializer = class extends SerdeContextConfig { } } } + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } return structXmlNode; } writeList(listMember, array, container, parentXmlns) { @@ -7966,22 +8136,22 @@ var XmlShapeSerializer = class extends SerdeContextConfig { if (null === value) { throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); } - const ns = import_schema8.NormalizedSchema.of(_schema); + const ns = import_schema10.NormalizedSchema.of(_schema); let nodeContents = null; if (value && typeof value === "object") { if (ns.isBlobSchema()) { nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base643.toBase64)(value); } else if (ns.isTimestampSchema() && value instanceof Date) { const options = this.settings.timestampFormat; - const format = options.useTrait ? ns.getSchema() === import_schema8.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + const format = options.useTrait ? ns.getSchema() === import_schema10.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; switch (format) { - case import_schema8.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema10.SCHEMA.TIMESTAMP_DATE_TIME: nodeContents = value.toISOString().replace(".000Z", "Z"); break; - case import_schema8.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema10.SCHEMA.TIMESTAMP_HTTP_DATE: nodeContents = (0, import_smithy_client6.dateToUtcString)(value); break; - case import_schema8.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema10.SCHEMA.TIMESTAMP_EPOCH_SECONDS: nodeContents = String(value.getTime() / 1e3); break; default: @@ -8023,7 +8193,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig { } writeSimpleInto(_schema, value, into, parentXmlns) { const nodeContents = this.writeSimple(_schema, value); - const ns = import_schema8.NormalizedSchema.of(_schema); + const ns = import_schema10.NormalizedSchema.of(_schema); const content = new import_xml_builder.XmlText(nodeContents); const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); if (xmlns) { @@ -8070,12 +8240,13 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { codec; serializer; deserializer; + mixin = new ProtocolLib(); constructor(options) { super(options); const settings = { timestampFormat: { useTrait: true, - default: import_schema9.SCHEMA.TIMESTAMP_DATE_TIME + default: import_schema11.SCHEMA.TIMESTAMP_DATE_TIME }, httpBindings: true, xmlNamespace: options.xmlNamespace, @@ -8093,34 +8264,11 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { } async serializeRequest(operationSchema, input, context) { const request = await super.serializeRequest(operationSchema, input, context); - const ns = import_schema9.NormalizedSchema.of(operationSchema.input); - const members = ns.getMemberSchemas(); - request.path = String(request.path).split("/").filter((segment) => { - return segment !== "{Bucket}"; - }).join("/") || "/"; + const inputSchema = import_schema11.NormalizedSchema.of(operationSchema.input); if (!request.headers["content-type"]) { - const httpPayloadMember = Object.values(members).find((m) => { - return !!m.getMergedTraits().httpPayload; - }); - if (httpPayloadMember) { - const mediaType = httpPayloadMember.getMergedTraits().mediaType; - if (mediaType) { - request.headers["content-type"] = mediaType; - } else if (httpPayloadMember.isStringSchema()) { - request.headers["content-type"] = "text/plain"; - } else if (httpPayloadMember.isBlobSchema()) { - request.headers["content-type"] = "application/octet-stream"; - } else { - request.headers["content-type"] = this.getDefaultContentType(); - } - } else if (!ns.isUnitSchema()) { - const hasBody = Object.values(members).find((m) => { - const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); - return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; - }); - if (hasBody) { - request.headers["content-type"] = this.getDefaultContentType(); - } + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; } } if (request.headers["content-type"] === this.getDefaultContentType()) { @@ -8130,7 +8278,7 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { } if (request.body) { try { - request.headers["content-length"] = String((0, import_util_body_length_browser4.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } } @@ -8141,24 +8289,14 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const registry = import_schema9.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorIdentifier); - } catch (e) { - const baseExceptionSchema = import_schema9.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), dataObject); - } - throw new Error(errorName); - } - const ns = import_schema9.NormalizedSchema.of(errorSchema); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema11.NormalizedSchema.of(errorSchema); const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; const exception = new errorSchema.ctor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); @@ -8168,14 +8306,15 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { const value = dataObject.Error?.[target] ?? dataObject[target]; output[name] = this.codec.createDeserializer().readSchema(member, value); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } /** * @override @@ -8188,6 +8327,82 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { 0 && (0); +/***/ }), + +/***/ 5606: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv +}); +module.exports = __toCommonJS(index_exports); + +// src/fromEnv.ts +var import_client = __nccwpck_require__(5152); +var import_property_provider = __nccwpck_require__(1238); +var ENV_KEY = "AWS_ACCESS_KEY_ID"; +var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +var ENV_SESSION = "AWS_SESSION_TOKEN"; +var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; +var fromEnv = /* @__PURE__ */ __name((init) => async () => { + init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + const accountId = process.env[ENV_ACCOUNT_ID]; + if (accessKeyId && secretAccessKey) { + const credentials = { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); + return credentials; + } + throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); +}, "fromEnv"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + /***/ }), /***/ 1509: @@ -8271,7 +8486,9 @@ const fromHttp = (options = {}) => { const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; - const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn; + const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn + ? console.warn + : options.logger.warn.bind(options.logger); if (relative && full) { warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); @@ -8489,7 +8706,7 @@ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileN }, "Ec2InstanceMetadata"), Environment: /* @__PURE__ */ __name(async (options) => { logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); - const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7121))); + const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(5606))); return async () => fromEnv(options)().then(setNamedProvider); }, "Environment") }; @@ -8699,82 +8916,6 @@ var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig -/***/ }), - -/***/ 7121: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, - ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, - ENV_EXPIRATION: () => ENV_EXPIRATION, - ENV_KEY: () => ENV_KEY, - ENV_SECRET: () => ENV_SECRET, - ENV_SESSION: () => ENV_SESSION, - fromEnv: () => fromEnv -}); -module.exports = __toCommonJS(index_exports); - -// src/fromEnv.ts -var import_client = __nccwpck_require__(5152); -var import_property_provider = __nccwpck_require__(1238); -var ENV_KEY = "AWS_ACCESS_KEY_ID"; -var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; -var ENV_SESSION = "AWS_SESSION_TOKEN"; -var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; -var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; -var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; -var fromEnv = /* @__PURE__ */ __name((init) => async () => { - init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); - const accessKeyId = process.env[ENV_KEY]; - const secretAccessKey = process.env[ENV_SECRET]; - const sessionToken = process.env[ENV_SESSION]; - const expiry = process.env[ENV_EXPIRATION]; - const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; - const accountId = process.env[ENV_ACCOUNT_ID]; - if (accessKeyId && secretAccessKey) { - const credentials = { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) }, - ...credentialScope && { credentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); -}, "fromEnv"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - /***/ }), /***/ 5861: @@ -8821,7 +8962,7 @@ __export(index_exports, { module.exports = __toCommonJS(index_exports); // src/defaultProvider.ts -var import_credential_provider_env = __nccwpck_require__(6153); +var import_credential_provider_env = __nccwpck_require__(5606); var import_shared_ini_file_loader = __nccwpck_require__(4964); @@ -8854,7 +8995,7 @@ var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_ const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET]; if (envStaticCredentialsAreSet) { if (!multipleCredentialSourceWarningEmitted) { - const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn; + const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn.bind(init.logger) : console.warn; warnFn( `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: Multiple credential sources detected: @@ -8926,82 +9067,6 @@ var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => creden -/***/ }), - -/***/ 6153: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, - ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, - ENV_EXPIRATION: () => ENV_EXPIRATION, - ENV_KEY: () => ENV_KEY, - ENV_SECRET: () => ENV_SECRET, - ENV_SESSION: () => ENV_SESSION, - fromEnv: () => fromEnv -}); -module.exports = __toCommonJS(index_exports); - -// src/fromEnv.ts -var import_client = __nccwpck_require__(5152); -var import_property_provider = __nccwpck_require__(1238); -var ENV_KEY = "AWS_ACCESS_KEY_ID"; -var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; -var ENV_SESSION = "AWS_SESSION_TOKEN"; -var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; -var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; -var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; -var fromEnv = /* @__PURE__ */ __name((init) => async () => { - init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); - const accessKeyId = process.env[ENV_KEY]; - const secretAccessKey = process.env[ENV_SECRET]; - const sessionToken = process.env[ENV_SESSION]; - const expiry = process.env[ENV_EXPIRATION]; - const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; - const accountId = process.env[ENV_ACCOUNT_ID]; - if (accessKeyId && secretAccessKey) { - const credentials = { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) }, - ...credentialScope && { credentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); -}, "fromEnv"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - /***/ }), /***/ 5360: @@ -12894,6 +12959,9 @@ var partitions_default = { "ap-southeast-5": { description: "Asia Pacific (Malaysia)" }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, "ap-southeast-7": { description: "Asia Pacific (Thailand)" }, @@ -12987,7 +13055,7 @@ var partitions_default = { dualStackDnsSuffix: "api.amazonwebservices.eu", implicitGlobalRegion: "eusc-de-east-1", name: "aws-eusc", - supportsDualStack: false, + supportsDualStack: true, supportsFIPS: true }, regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", @@ -13513,8 +13581,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, @@ -13532,7 +13600,7 @@ __export(src_exports, { resolveEndpointsConfig: () => resolveEndpointsConfig, resolveRegionConfig: () => resolveRegionConfig }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts var import_util_config_provider = __nccwpck_require__(6716); @@ -13540,8 +13608,8 @@ var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; var DEFAULT_USE_DUALSTACK_ENDPOINT = false; var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"), default: false }; @@ -13551,8 +13619,8 @@ var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; var DEFAULT_USE_FIPS_ENDPOINT = false; var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"), default: false }; @@ -13604,11 +13672,11 @@ var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { var REGION_ENV_NAME = "AWS_REGION"; var REGION_INI_NAME = "region"; var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), + default: /* @__PURE__ */ __name(() => { throw new Error("Region is missing"); - } + }, "default") }; var NODE_REGION_CONFIG_FILE_OPTIONS = { preferredFile: "credentials" @@ -13627,20 +13695,20 @@ var resolveRegionConfig = /* @__PURE__ */ __name((input) => { throw new Error("Region is missing"); } return Object.assign(input, { - region: async () => { + region: /* @__PURE__ */ __name(async () => { if (typeof region === "string") { return getRealRegion(region); } const providedRegion = await region(); return getRealRegion(providedRegion); - }, - useFipsEndpoint: async () => { + }, "region"), + useFipsEndpoint: /* @__PURE__ */ __name(async () => { const providedRegion = typeof region === "string" ? region : await region(); if (isFipsRegion(providedRegion)) { return true; } return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - } + }, "useFipsEndpoint") }); }, "resolveRegionConfig"); @@ -13731,8 +13799,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, EXPIRATION_MS: () => EXPIRATION_MS, HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, @@ -13756,7 +13824,7 @@ __export(src_exports, { requestBuilder: () => import_protocols.requestBuilder, setFeature: () => setFeature }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/getSmithyContext.ts var import_types = __nccwpck_require__(690); @@ -13845,7 +13913,7 @@ var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo( httpAuthSchemeMiddleware(config, { httpAuthSchemeParametersProvider, @@ -13853,7 +13921,7 @@ var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { }), httpAuthSchemeEndpointRuleSetMiddlewareOptions ); - } + }, "applyToStack") }), "getHttpAuthSchemeEndpointRuleSetPlugin"); // src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts @@ -13870,7 +13938,7 @@ var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo( httpAuthSchemeMiddleware(config, { httpAuthSchemeParametersProvider, @@ -13878,7 +13946,7 @@ var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { }), httpAuthSchemeMiddlewareOptions ); - } + }, "applyToStack") }), "getHttpAuthSchemePlugin"); // src/middleware-http-signing/httpSigningMiddleware.ts @@ -13922,15 +13990,14 @@ var httpSigningMiddlewareOptions = { toMiddleware: "retryMiddleware" }; var getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); - } + }, "applyToStack") }), "getHttpSigningPlugin"); // src/normalizeProvider.ts var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; + if (typeof input === "function") return input; const promisified = Promise.resolve(input); return () => promisified; }, "normalizeProvider"); @@ -14144,6 +14211,1069 @@ var memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requi +/***/ }), + +/***/ 4645: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/submodules/cbor/index.ts +var index_exports = {}; +__export(index_exports, { + CborCodec: () => CborCodec, + CborShapeDeserializer: () => CborShapeDeserializer, + CborShapeSerializer: () => CborShapeSerializer, + SmithyRpcV2CborProtocol: () => SmithyRpcV2CborProtocol, + buildHttpRpcRequest: () => buildHttpRpcRequest, + cbor: () => cbor, + checkCborResponse: () => checkCborResponse, + dateToTag: () => dateToTag, + loadSmithyRpcV2CborErrorCode: () => loadSmithyRpcV2CborErrorCode, + parseCborBody: () => parseCborBody, + parseCborErrorBody: () => parseCborErrorBody, + tag: () => tag, + tagSymbol: () => tagSymbol +}); +module.exports = __toCommonJS(index_exports); + +// src/submodules/cbor/cbor-decode.ts +var import_serde = __nccwpck_require__(2430); +var import_util_utf8 = __nccwpck_require__(1577); + +// src/submodules/cbor/cbor-types.ts +var majorUint64 = 0; +var majorNegativeInt64 = 1; +var majorUnstructuredByteString = 2; +var majorUtf8String = 3; +var majorList = 4; +var majorMap = 5; +var majorTag = 6; +var majorSpecial = 7; +var specialFalse = 20; +var specialTrue = 21; +var specialNull = 22; +var specialUndefined = 23; +var extendedOneByte = 24; +var extendedFloat16 = 25; +var extendedFloat32 = 26; +var extendedFloat64 = 27; +var minorIndefinite = 31; +function alloc(size) { + return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size); +} +var tagSymbol = Symbol("@smithy/core/cbor::tagSymbol"); +function tag(data2) { + data2[tagSymbol] = true; + return data2; +} + +// src/submodules/cbor/cbor-decode.ts +var USE_TEXT_DECODER = typeof TextDecoder !== "undefined"; +var USE_BUFFER = typeof Buffer !== "undefined"; +var payload = alloc(0); +var dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); +var textDecoder = USE_TEXT_DECODER ? new TextDecoder() : null; +var _offset = 0; +function setPayload(bytes) { + payload = bytes; + dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); +} +function decode(at, to) { + if (at >= to) { + throw new Error("unexpected end of (decode) payload."); + } + const major = (payload[at] & 224) >> 5; + const minor = payload[at] & 31; + switch (major) { + case majorUint64: + case majorNegativeInt64: + case majorTag: + let unsignedInt; + let offset; + if (minor < 24) { + unsignedInt = minor; + offset = 1; + } else { + switch (minor) { + case extendedOneByte: + case extendedFloat16: + case extendedFloat32: + case extendedFloat64: + const countLength = minorValueToArgumentLength[minor]; + const countOffset = countLength + 1; + offset = countOffset; + if (to - at < countOffset) { + throw new Error(`countLength ${countLength} greater than remaining buf len.`); + } + const countIndex = at + 1; + if (countLength === 1) { + unsignedInt = payload[countIndex]; + } else if (countLength === 2) { + unsignedInt = dataView.getUint16(countIndex); + } else if (countLength === 4) { + unsignedInt = dataView.getUint32(countIndex); + } else { + unsignedInt = dataView.getBigUint64(countIndex); + } + break; + default: + throw new Error(`unexpected minor value ${minor}.`); + } + } + if (major === majorUint64) { + _offset = offset; + return castBigInt(unsignedInt); + } else if (major === majorNegativeInt64) { + let negativeInt; + if (typeof unsignedInt === "bigint") { + negativeInt = BigInt(-1) - unsignedInt; + } else { + negativeInt = -1 - unsignedInt; + } + _offset = offset; + return castBigInt(negativeInt); + } else { + if (minor === 2 || minor === 3) { + const length = decodeCount(at + offset, to); + let b = BigInt(0); + const start = at + offset + _offset; + for (let i = start; i < start + length; ++i) { + b = b << BigInt(8) | BigInt(payload[i]); + } + _offset = offset + _offset + length; + return minor === 3 ? -b - BigInt(1) : b; + } else if (minor === 4) { + const decimalFraction = decode(at + offset, to); + const [exponent, mantissa] = decimalFraction; + const normalizer = mantissa < 0 ? -1 : 1; + const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa)); + let numericString; + const sign = mantissa < 0 ? "-" : ""; + numericString = exponent === 0 ? mantissaStr : mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent); + numericString = numericString.replace(/^0+/g, ""); + if (numericString === "") { + numericString = "0"; + } + if (numericString[0] === ".") { + numericString = "0" + numericString; + } + numericString = sign + numericString; + _offset = offset + _offset; + return (0, import_serde.nv)(numericString); + } else { + const value = decode(at + offset, to); + const valueOffset = _offset; + _offset = offset + valueOffset; + return tag({ tag: castBigInt(unsignedInt), value }); + } + } + case majorUtf8String: + case majorMap: + case majorList: + case majorUnstructuredByteString: + if (minor === minorIndefinite) { + switch (major) { + case majorUtf8String: + return decodeUtf8StringIndefinite(at, to); + case majorMap: + return decodeMapIndefinite(at, to); + case majorList: + return decodeListIndefinite(at, to); + case majorUnstructuredByteString: + return decodeUnstructuredByteStringIndefinite(at, to); + } + } else { + switch (major) { + case majorUtf8String: + return decodeUtf8String(at, to); + case majorMap: + return decodeMap(at, to); + case majorList: + return decodeList(at, to); + case majorUnstructuredByteString: + return decodeUnstructuredByteString(at, to); + } + } + default: + return decodeSpecial(at, to); + } +} +function bytesToUtf8(bytes, at, to) { + if (USE_BUFFER && bytes.constructor?.name === "Buffer") { + return bytes.toString("utf-8", at, to); + } + if (textDecoder) { + return textDecoder.decode(bytes.subarray(at, to)); + } + return (0, import_util_utf8.toUtf8)(bytes.subarray(at, to)); +} +function demote(bigInteger) { + const num = Number(bigInteger); + if (num < Number.MIN_SAFE_INTEGER || Number.MAX_SAFE_INTEGER < num) { + console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${bigInteger}) to ${num} with loss of precision.`)); + } + return num; +} +var minorValueToArgumentLength = { + [extendedOneByte]: 1, + [extendedFloat16]: 2, + [extendedFloat32]: 4, + [extendedFloat64]: 8 +}; +function bytesToFloat16(a, b) { + const sign = a >> 7; + const exponent = (a & 124) >> 2; + const fraction = (a & 3) << 8 | b; + const scalar = sign === 0 ? 1 : -1; + let exponentComponent; + let summation; + if (exponent === 0) { + if (fraction === 0) { + return 0; + } else { + exponentComponent = Math.pow(2, 1 - 15); + summation = 0; + } + } else if (exponent === 31) { + if (fraction === 0) { + return scalar * Infinity; + } else { + return NaN; + } + } else { + exponentComponent = Math.pow(2, exponent - 15); + summation = 1; + } + summation += fraction / 1024; + return scalar * (exponentComponent * summation); +} +function decodeCount(at, to) { + const minor = payload[at] & 31; + if (minor < 24) { + _offset = 1; + return minor; + } + if (minor === extendedOneByte || minor === extendedFloat16 || minor === extendedFloat32 || minor === extendedFloat64) { + const countLength = minorValueToArgumentLength[minor]; + _offset = countLength + 1; + if (to - at < _offset) { + throw new Error(`countLength ${countLength} greater than remaining buf len.`); + } + const countIndex = at + 1; + if (countLength === 1) { + return payload[countIndex]; + } else if (countLength === 2) { + return dataView.getUint16(countIndex); + } else if (countLength === 4) { + return dataView.getUint32(countIndex); + } + return demote(dataView.getBigUint64(countIndex)); + } + throw new Error(`unexpected minor value ${minor}.`); +} +function decodeUtf8String(at, to) { + const length = decodeCount(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + throw new Error(`string len ${length} greater than remaining buf len.`); + } + const value = bytesToUtf8(payload, at, at + length); + _offset = offset + length; + return value; +} +function decodeUtf8StringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at; at < to; ) { + if (payload[at] === 255) { + const data2 = alloc(vector.length); + data2.set(vector, 0); + _offset = at - base + 2; + return bytesToUtf8(data2, 0, data2.length); + } + const major = (payload[at] & 224) >> 5; + const minor = payload[at] & 31; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} in indefinite string.`); + } + if (minor === minorIndefinite) { + throw new Error("nested indefinite string."); + } + const bytes = decodeUnstructuredByteString(at, to); + const length = _offset; + at += length; + for (let i = 0; i < bytes.length; ++i) { + vector.push(bytes[i]); + } + } + throw new Error("expected break marker."); +} +function decodeUnstructuredByteString(at, to) { + const length = decodeCount(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + throw new Error(`unstructured byte string len ${length} greater than remaining buf len.`); + } + const value = payload.subarray(at, at + length); + _offset = offset + length; + return value; +} +function decodeUnstructuredByteStringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at; at < to; ) { + if (payload[at] === 255) { + const data2 = alloc(vector.length); + data2.set(vector, 0); + _offset = at - base + 2; + return data2; + } + const major = (payload[at] & 224) >> 5; + const minor = payload[at] & 31; + if (major !== majorUnstructuredByteString) { + throw new Error(`unexpected major type ${major} in indefinite string.`); + } + if (minor === minorIndefinite) { + throw new Error("nested indefinite string."); + } + const bytes = decodeUnstructuredByteString(at, to); + const length = _offset; + at += length; + for (let i = 0; i < bytes.length; ++i) { + vector.push(bytes[i]); + } + } + throw new Error("expected break marker."); +} +function decodeList(at, to) { + const listDataLength = decodeCount(at, to); + const offset = _offset; + at += offset; + const base = at; + const list = Array(listDataLength); + for (let i = 0; i < listDataLength; ++i) { + const item = decode(at, to); + const itemOffset = _offset; + list[i] = item; + at += itemOffset; + } + _offset = offset + (at - base); + return list; +} +function decodeListIndefinite(at, to) { + at += 1; + const list = []; + for (const base = at; at < to; ) { + if (payload[at] === 255) { + _offset = at - base + 2; + return list; + } + const item = decode(at, to); + const n = _offset; + at += n; + list.push(item); + } + throw new Error("expected break marker."); +} +function decodeMap(at, to) { + const mapDataLength = decodeCount(at, to); + const offset = _offset; + at += offset; + const base = at; + const map = {}; + for (let i = 0; i < mapDataLength; ++i) { + if (at >= to) { + throw new Error("unexpected end of map payload."); + } + const major = (payload[at] & 224) >> 5; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} for map key at index ${at}.`); + } + const key = decode(at, to); + at += _offset; + const value = decode(at, to); + at += _offset; + map[key] = value; + } + _offset = offset + (at - base); + return map; +} +function decodeMapIndefinite(at, to) { + at += 1; + const base = at; + const map = {}; + for (; at < to; ) { + if (at >= to) { + throw new Error("unexpected end of map payload."); + } + if (payload[at] === 255) { + _offset = at - base + 2; + return map; + } + const major = (payload[at] & 224) >> 5; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} for map key.`); + } + const key = decode(at, to); + at += _offset; + const value = decode(at, to); + at += _offset; + map[key] = value; + } + throw new Error("expected break marker."); +} +function decodeSpecial(at, to) { + const minor = payload[at] & 31; + switch (minor) { + case specialTrue: + case specialFalse: + _offset = 1; + return minor === specialTrue; + case specialNull: + _offset = 1; + return null; + case specialUndefined: + _offset = 1; + return null; + case extendedFloat16: + if (to - at < 3) { + throw new Error("incomplete float16 at end of buf."); + } + _offset = 3; + return bytesToFloat16(payload[at + 1], payload[at + 2]); + case extendedFloat32: + if (to - at < 5) { + throw new Error("incomplete float32 at end of buf."); + } + _offset = 5; + return dataView.getFloat32(at + 1); + case extendedFloat64: + if (to - at < 9) { + throw new Error("incomplete float64 at end of buf."); + } + _offset = 9; + return dataView.getFloat64(at + 1); + default: + throw new Error(`unexpected minor value ${minor}.`); + } +} +function castBigInt(bigInt) { + if (typeof bigInt === "number") { + return bigInt; + } + const num = Number(bigInt); + if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) { + return num; + } + return bigInt; +} + +// src/submodules/cbor/cbor-encode.ts +var import_serde2 = __nccwpck_require__(2430); +var import_util_utf82 = __nccwpck_require__(1577); +var USE_BUFFER2 = typeof Buffer !== "undefined"; +var initialSize = 2048; +var data = alloc(initialSize); +var dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength); +var cursor = 0; +function ensureSpace(bytes) { + const remaining = data.byteLength - cursor; + if (remaining < bytes) { + if (cursor < 16e6) { + resize(Math.max(data.byteLength * 4, data.byteLength + bytes)); + } else { + resize(data.byteLength + bytes + 16e6); + } + } +} +function toUint8Array() { + const out = alloc(cursor); + out.set(data.subarray(0, cursor), 0); + cursor = 0; + return out; +} +function resize(size) { + const old = data; + data = alloc(size); + if (old) { + if (old.copy) { + old.copy(data, 0, 0, old.byteLength); + } else { + data.set(old, 0); + } + } + dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength); +} +function encodeHeader(major, value) { + if (value < 24) { + data[cursor++] = major << 5 | value; + } else if (value < 1 << 8) { + data[cursor++] = major << 5 | 24; + data[cursor++] = value; + } else if (value < 1 << 16) { + data[cursor++] = major << 5 | extendedFloat16; + dataView2.setUint16(cursor, value); + cursor += 2; + } else if (value < 2 ** 32) { + data[cursor++] = major << 5 | extendedFloat32; + dataView2.setUint32(cursor, value); + cursor += 4; + } else { + data[cursor++] = major << 5 | extendedFloat64; + dataView2.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value)); + cursor += 8; + } +} +function encode(_input) { + const encodeStack = [_input]; + while (encodeStack.length) { + const input = encodeStack.pop(); + ensureSpace(typeof input === "string" ? input.length * 4 : 64); + if (typeof input === "string") { + if (USE_BUFFER2) { + encodeHeader(majorUtf8String, Buffer.byteLength(input)); + cursor += data.write(input, cursor); + } else { + const bytes = (0, import_util_utf82.fromUtf8)(input); + encodeHeader(majorUtf8String, bytes.byteLength); + data.set(bytes, cursor); + cursor += bytes.byteLength; + } + continue; + } else if (typeof input === "number") { + if (Number.isInteger(input)) { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - 1; + if (value < 24) { + data[cursor++] = major << 5 | value; + } else if (value < 256) { + data[cursor++] = major << 5 | 24; + data[cursor++] = value; + } else if (value < 65536) { + data[cursor++] = major << 5 | extendedFloat16; + data[cursor++] = value >> 8; + data[cursor++] = value; + } else if (value < 4294967296) { + data[cursor++] = major << 5 | extendedFloat32; + dataView2.setUint32(cursor, value); + cursor += 4; + } else { + data[cursor++] = major << 5 | extendedFloat64; + dataView2.setBigUint64(cursor, BigInt(value)); + cursor += 8; + } + continue; + } + data[cursor++] = majorSpecial << 5 | extendedFloat64; + dataView2.setFloat64(cursor, input); + cursor += 8; + continue; + } else if (typeof input === "bigint") { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - BigInt(1); + const n = Number(value); + if (n < 24) { + data[cursor++] = major << 5 | n; + } else if (n < 256) { + data[cursor++] = major << 5 | 24; + data[cursor++] = n; + } else if (n < 65536) { + data[cursor++] = major << 5 | extendedFloat16; + data[cursor++] = n >> 8; + data[cursor++] = n & 255; + } else if (n < 4294967296) { + data[cursor++] = major << 5 | extendedFloat32; + dataView2.setUint32(cursor, n); + cursor += 4; + } else if (value < BigInt("18446744073709551616")) { + data[cursor++] = major << 5 | extendedFloat64; + dataView2.setBigUint64(cursor, value); + cursor += 8; + } else { + const binaryBigInt = value.toString(2); + const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8)); + let b = value; + let i = 0; + while (bigIntBytes.byteLength - ++i >= 0) { + bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255)); + b >>= BigInt(8); + } + ensureSpace(bigIntBytes.byteLength * 2); + data[cursor++] = nonNegative ? 194 : 195; + if (USE_BUFFER2) { + encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes)); + } else { + encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength); + } + data.set(bigIntBytes, cursor); + cursor += bigIntBytes.byteLength; + } + continue; + } else if (input === null) { + data[cursor++] = majorSpecial << 5 | specialNull; + continue; + } else if (typeof input === "boolean") { + data[cursor++] = majorSpecial << 5 | (input ? specialTrue : specialFalse); + continue; + } else if (typeof input === "undefined") { + throw new Error("@smithy/core/cbor: client may not serialize undefined value."); + } else if (Array.isArray(input)) { + for (let i = input.length - 1; i >= 0; --i) { + encodeStack.push(input[i]); + } + encodeHeader(majorList, input.length); + continue; + } else if (typeof input.byteLength === "number") { + ensureSpace(input.length * 2); + encodeHeader(majorUnstructuredByteString, input.length); + data.set(input, cursor); + cursor += input.byteLength; + continue; + } else if (typeof input === "object") { + if (input instanceof import_serde2.NumericValue) { + const decimalIndex = input.string.indexOf("."); + const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1; + const mantissa = BigInt(input.string.replace(".", "")); + data[cursor++] = 196; + encodeStack.push(mantissa); + encodeStack.push(exponent); + encodeHeader(majorList, 2); + continue; + } + if (input[tagSymbol]) { + if ("tag" in input && "value" in input) { + encodeStack.push(input.value); + encodeHeader(majorTag, input.tag); + continue; + } else { + throw new Error( + "tag encountered with missing fields, need 'tag' and 'value', found: " + JSON.stringify(input) + ); + } + } + const keys = Object.keys(input); + for (let i = keys.length - 1; i >= 0; --i) { + const key = keys[i]; + encodeStack.push(input[key]); + encodeStack.push(key); + } + encodeHeader(majorMap, keys.length); + continue; + } + throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`); + } +} + +// src/submodules/cbor/cbor.ts +var cbor = { + deserialize(payload2) { + setPayload(payload2); + return decode(0, payload2.length); + }, + serialize(input) { + try { + encode(input); + return toUint8Array(); + } catch (e) { + toUint8Array(); + throw e; + } + }, + /** + * @public + * @param size - byte length to allocate. + * + * This may be used to garbage collect the CBOR + * shared encoding buffer space, + * e.g. resizeEncodingBuffer(0); + * + * This may also be used to pre-allocate more space for + * CBOR encoding, e.g. resizeEncodingBuffer(100_000_000); + */ + resizeEncodingBuffer(size) { + resize(size); + } +}; + +// src/submodules/cbor/parseCborBody.ts +var import_protocols = __nccwpck_require__(3422); +var import_protocol_http = __nccwpck_require__(2356); +var import_util_body_length_browser = __nccwpck_require__(2098); +var parseCborBody = (streamBody, context) => { + return (0, import_protocols.collectBody)(streamBody, context).then(async (bytes) => { + if (bytes.length) { + try { + return cbor.deserialize(bytes); + } catch (e) { + Object.defineProperty(e, "$responseBodyText", { + value: context.utf8Encoder(bytes) + }); + throw e; + } + } + return {}; + }); +}; +var dateToTag = (date) => { + return tag({ + tag: 1, + value: date.getTime() / 1e3 + }); +}; +var parseCborErrorBody = async (errorBody, context) => { + const value = await parseCborBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; +var loadSmithyRpcV2CborErrorCode = (output, data2) => { + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + if (data2["__type"] !== void 0) { + return sanitizeErrorCode(data2["__type"]); + } + const codeKey = Object.keys(data2).find((key) => key.toLowerCase() === "code"); + if (codeKey && data2[codeKey] !== void 0) { + return sanitizeErrorCode(data2[codeKey]); + } +}; +var checkCborResponse = (response) => { + if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") { + throw new Error("Malformed RPCv2 CBOR response, status: " + response.statusCode); + } +}; +var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers: { + // intentional copy. + ...headers + } + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; + try { + contents.headers["content-length"] = String((0, import_util_body_length_browser.calculateBodyLength)(body)); + } catch (e) { + } + } + return new import_protocol_http.HttpRequest(contents); +}; + +// src/submodules/cbor/SmithyRpcV2CborProtocol.ts +var import_protocols2 = __nccwpck_require__(3422); +var import_schema2 = __nccwpck_require__(6890); +var import_util_middleware = __nccwpck_require__(6324); + +// src/submodules/cbor/CborCodec.ts +var import_schema = __nccwpck_require__(6890); +var import_serde3 = __nccwpck_require__(2430); +var import_util_base64 = __nccwpck_require__(8385); +var CborCodec = class { + createSerializer() { + const serializer = new CborShapeSerializer(); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new CborShapeDeserializer(); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } +}; +var CborShapeSerializer = class { + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + write(schema, value) { + this.value = this.serialize(schema, value); + } + /** + * Recursive serializer transform that copies and prepares the user input object + * for CBOR serialization. + */ + serialize(schema, source) { + const ns = import_schema.NormalizedSchema.of(schema); + if (source == null) { + if (ns.isIdempotencyToken()) { + return (0, import_serde3.generateIdempotencyToken)(); + } + return source; + } + if (ns.isBlobSchema()) { + if (typeof source === "string") { + return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(source); + } + return source; + } + if (ns.isTimestampSchema()) { + if (typeof source === "number" || typeof source === "bigint") { + return dateToTag(new Date(Number(source) / 1e3 | 0)); + } + return dateToTag(source); + } + if (typeof source === "function" || typeof source === "object") { + const sourceObject = source; + if (ns.isListSchema() && Array.isArray(sourceObject)) { + const sparse = !!ns.getMergedTraits().sparse; + const newArray = []; + let i = 0; + for (const item of sourceObject) { + const value = this.serialize(ns.getValueSchema(), item); + if (value != null || sparse) { + newArray[i++] = value; + } + } + return newArray; + } + if (sourceObject instanceof Date) { + return dateToTag(sourceObject); + } + const newObject = {}; + if (ns.isMapSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + for (const key of Object.keys(sourceObject)) { + const value = this.serialize(ns.getValueSchema(), sourceObject[key]); + if (value != null || sparse) { + newObject[key] = value; + } + } + } else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + const value = this.serialize(memberSchema, sourceObject[key]); + if (value != null) { + newObject[key] = value; + } + } + } else if (ns.isDocumentSchema()) { + for (const key of Object.keys(sourceObject)) { + newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]); + } + } + return newObject; + } + return source; + } + flush() { + const buffer = cbor.serialize(this.value); + this.value = void 0; + return buffer; + } +}; +var CborShapeDeserializer = class { + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + read(schema, bytes) { + const data2 = cbor.deserialize(bytes); + return this.readValue(schema, data2); + } + /** + * Public because it's called by the protocol implementation to deserialize errors. + * @internal + */ + readValue(_schema, value) { + const ns = import_schema.NormalizedSchema.of(_schema); + if (ns.isTimestampSchema() && typeof value === "number") { + return (0, import_serde3.parseEpochTimestamp)(value); + } + if (ns.isBlobSchema()) { + if (typeof value === "string") { + return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(value); + } + return value; + } + if (typeof value === "undefined" || typeof value === "boolean" || typeof value === "number" || typeof value === "string" || typeof value === "bigint" || typeof value === "symbol") { + return value; + } else if (typeof value === "function" || typeof value === "object") { + if (value === null) { + return null; + } + if ("byteLength" in value) { + return value; + } + if (value instanceof Date) { + return value; + } + if (ns.isDocumentSchema()) { + return value; + } + if (ns.isListSchema()) { + const newArray = []; + const memberSchema = ns.getValueSchema(); + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + const itemValue = this.readValue(memberSchema, item); + if (itemValue != null || sparse) { + newArray.push(itemValue); + } + } + return newArray; + } + const newObject = {}; + if (ns.isMapSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const targetSchema = ns.getValueSchema(); + for (const key of Object.keys(value)) { + const itemValue = this.readValue(targetSchema, value[key]); + if (itemValue != null || sparse) { + newObject[key] = itemValue; + } + } + } else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + newObject[key] = this.readValue(memberSchema, value[key]); + } + } + return newObject; + } else { + return value; + } + } +}; + +// src/submodules/cbor/SmithyRpcV2CborProtocol.ts +var SmithyRpcV2CborProtocol = class extends import_protocols2.RpcProtocol { + constructor({ defaultNamespace }) { + super({ defaultNamespace }); + this.codec = new CborCodec(); + this.serializer = this.codec.createSerializer(); + this.deserializer = this.codec.createDeserializer(); + } + getShapeId() { + return "smithy.protocols#rpcv2Cbor"; + } + getPayloadCodec() { + return this.codec; + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + Object.assign(request.headers, { + "content-type": this.getDefaultContentType(), + "smithy-protocol": "rpc-v2-cbor", + accept: this.getDefaultContentType() + }); + if ((0, import_schema2.deref)(operationSchema.input) === "unit") { + delete request.body; + delete request.headers["content-type"]; + } else { + if (!request.body) { + this.serializer.write(15, {}); + request.body = this.serializer.flush(); + } + try { + request.headers["content-length"] = String(request.body.byteLength); + } catch (e) { + } + } + const { service, operation } = (0, import_util_middleware.getSmithyContext)(context); + const path = `/service/${service}/operation/${operation}`; + if (request.path.endsWith("/")) { + request.path += path.slice(1); + } else { + request.path += path; + } + return request; + } + async deserializeResponse(operationSchema, context, response) { + return super.deserializeResponse(operationSchema, context, response); + } + 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, + $response: response, + $fault: response.statusCode <= 500 ? "client" : "server" + }; + const registry = import_schema2.TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorName); + } catch (e) { + if (dataObject.Message) { + dataObject.message = dataObject.Message; + } + const baseExceptionSchema = import_schema2.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); + } + throw Object.assign(new Error(errorName), errorMetadata, dataObject); + } + const ns = import_schema2.NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); + } + getDefaultContentType() { + return "application/cbor"; + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + /***/ }), /***/ 6579: @@ -14168,11 +15298,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/event-streams/index.ts -var event_streams_exports = {}; -__export(event_streams_exports, { +var index_exports = {}; +__export(index_exports, { EventStreamSerde: () => EventStreamSerde }); -module.exports = __toCommonJS(event_streams_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/event-streams/EventStreamSerde.ts var import_schema = __nccwpck_require__(6890); @@ -14444,8 +15574,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/protocols/index.ts -var protocols_exports = {}; -__export(protocols_exports, { +var index_exports = {}; +__export(index_exports, { FromStringShapeDeserializer: () => FromStringShapeDeserializer, HttpBindingProtocol: () => HttpBindingProtocol, HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer, @@ -14460,7 +15590,7 @@ __export(protocols_exports, { requestBuilder: () => requestBuilder, resolvedPath: () => resolvedPath }); -module.exports = __toCommonJS(protocols_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/protocols/collect-stream-body.ts var import_util_stream = __nccwpck_require__(4252); @@ -14624,6 +15754,11 @@ var HttpProtocol = class { ); } async deserializeHttpMessage(schema, context, response, arg4, arg5) { + void schema; + void context; + void response; + void arg4; + void arg5; return []; } getEventStreamMarshaller() { @@ -15350,8 +16485,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/schema/index.ts -var schema_exports = {}; -__export(schema_exports, { +var index_exports = {}; +__export(index_exports, { ErrorSchema: () => ErrorSchema, ListSchema: () => ListSchema, MapSchema: () => MapSchema, @@ -15373,7 +16508,7 @@ __export(schema_exports, { sim: () => sim, struct: () => struct }); -module.exports = __toCommonJS(schema_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/schema/deref.ts var deref = (schemaRef) => { @@ -16221,8 +17356,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/serde/index.ts -var serde_exports = {}; -__export(serde_exports, { +var index_exports = {}; +__export(index_exports, { LazyJsonString: () => LazyJsonString, NumericValue: () => NumericValue, copyDocumentWithTransform: () => copyDocumentWithTransform, @@ -16263,7 +17398,7 @@ __export(serde_exports, { strictParseLong: () => strictParseLong, strictParseShort: () => strictParseShort }); -module.exports = __toCommonJS(serde_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/serde/copyDocumentWithTransform.ts var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; @@ -16899,8 +18034,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, @@ -16913,7 +18048,7 @@ __export(src_exports, { httpRequest: () => httpRequest, providerConfigFromInit: () => providerConfigFromInit }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/fromContainerMetadata.ts @@ -17096,8 +18231,8 @@ var Endpoint = /* @__PURE__ */ ((Endpoint2) => { var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; var ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[ENV_ENDPOINT_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[CONFIG_ENDPOINT_NAME], "configFileSelector"), default: void 0 }; @@ -17112,8 +18247,8 @@ var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; var ENDPOINT_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[ENV_ENDPOINT_MODE_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[CONFIG_ENDPOINT_MODE_NAME], "configFileSelector"), default: "IPv4" /* IPv4 */ }; @@ -17193,7 +18328,7 @@ var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { let fallbackBlockedFromProcessEnv = false; const configValue = await (0, import_node_config_provider.loadConfig)( { - environmentVariableSelector: (env) => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => { const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; if (envValue === void 0) { @@ -17203,12 +18338,12 @@ var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { ); } return fallbackBlockedFromProcessEnv; - }, - configFileSelector: (profile2) => { + }, "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile2) => { const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; return fallbackBlockedFromProfile; - }, + }, "configFileSelector"), default: false }, { @@ -17219,8 +18354,7 @@ var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { const causes = []; if (init.ec2MetadataV1Disabled) causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); - if (fallbackBlockedFromProfile) - causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProfile) causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); if (fallbackBlockedFromProcessEnv) causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); throw new InstanceMetadataV1FallbackError( @@ -17339,13 +18473,13 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { FetchHttpHandler: () => FetchHttpHandler, keepAliveSupport: () => keepAliveSupport, streamCollector: () => streamCollector }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/fetch-http-handler.ts var import_protocol_http = __nccwpck_require__(2356); @@ -17606,11 +18740,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { Hash: () => Hash }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_util_buffer_from = __nccwpck_require__(4151); var import_util_utf8 = __nccwpck_require__(1577); var import_buffer = __nccwpck_require__(181); @@ -17678,11 +18812,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { isArrayBuffer: () => isArrayBuffer }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); // Annotate the CommonJS export names for ESM import in node: @@ -17715,13 +18849,13 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { contentLengthMiddleware: () => contentLengthMiddleware, contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, getContentLengthPlugin: () => getContentLengthPlugin }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_protocol_http = __nccwpck_require__(2356); var CONTENT_LENGTH_HEADER = "content-length"; function contentLengthMiddleware(bodyLengthChecker) { @@ -17754,9 +18888,9 @@ var contentLengthMiddlewareOptions = { override: true }; var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); - } + }, "applyToStack") }), "getContentLengthPlugin"); // Annotate the CommonJS export names for ESM import in node: @@ -17847,8 +18981,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { endpointMiddleware: () => endpointMiddleware, endpointMiddlewareOptions: () => endpointMiddlewareOptions, getEndpointFromInstructions: () => getEndpointFromInstructions, @@ -17858,7 +18992,7 @@ __export(src_exports, { resolveParams: () => resolveParams, toEndpointV1: () => toEndpointV1 }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/service-customizations/s3.ts var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { @@ -18064,7 +19198,7 @@ var endpointMiddlewareOptions = { toMiddleware: import_middleware_serde.serializerMiddlewareOption.name }; var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo( endpointMiddleware({ config, @@ -18072,7 +19206,7 @@ var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ }), endpointMiddlewareOptions ); - } + }, "applyToStack") }), "getEndpointPlugin"); // src/resolveEndpointConfig.ts @@ -18143,8 +19277,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, @@ -18164,7 +19298,7 @@ __export(src_exports, { retryMiddleware: () => retryMiddleware, retryMiddlewareOptions: () => retryMiddlewareOptions }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/AdaptiveRetryStrategy.ts @@ -18219,12 +19353,9 @@ var defaultRetryDecider = /* @__PURE__ */ __name((error) => { // src/util.ts var asSdkError = /* @__PURE__ */ __name((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); + 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}`); }, "asSdkError"); @@ -18303,15 +19434,12 @@ var StandardRetryStrategy = class { } }; var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; + if (!import_protocol_http.HttpResponse.isInstance(response)) return; const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; + if (!retryAfterHeaderName) return; const retryAfter = response.headers[retryAfterHeaderName]; const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return retryAfterSeconds * 1e3; + if (!Number.isNaN(retryAfterSeconds)) return retryAfterSeconds * 1e3; const retryAfterDate = new Date(retryAfter); return retryAfterDate.getTime() - Date.now(); }, "getDelayFromRetryAfterHeader"); @@ -18329,12 +19457,12 @@ var AdaptiveRetryStrategy = class extends StandardRetryStrategy { } async retry(next, args) { return super.retry(next, args, { - beforeRequest: async () => { + beforeRequest: /* @__PURE__ */ __name(async () => { return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { + }, "beforeRequest"), + afterRequest: /* @__PURE__ */ __name((response) => { this.rateLimiter.updateClientSendingRate(response); - } + }, "afterRequest") }); } }; @@ -18345,26 +19473,24 @@ var import_util_middleware = __nccwpck_require__(6324); var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; var CONFIG_MAX_ATTEMPTS = "max_attempts"; var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => { const value = env[ENV_MAX_ATTEMPTS]; - if (!value) - return void 0; + if (!value) return void 0; 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) => { + }, "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => { const value = profile[CONFIG_MAX_ATTEMPTS]; - if (!value) - return void 0; + if (!value) return void 0; 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; - }, + }, "configFileSelector"), default: import_util_retry.DEFAULT_MAX_ATTEMPTS }; var resolveRetryConfig = /* @__PURE__ */ __name((input) => { @@ -18372,7 +19498,7 @@ var resolveRetryConfig = /* @__PURE__ */ __name((input) => { const maxAttempts = (0, import_util_middleware.normalizeProvider)(_maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); return Object.assign(input, { maxAttempts, - retryStrategy: async () => { + retryStrategy: /* @__PURE__ */ __name(async () => { if (retryStrategy) { return retryStrategy; } @@ -18381,14 +19507,14 @@ var resolveRetryConfig = /* @__PURE__ */ __name((input) => { return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); } return new import_util_retry.StandardRetryStrategy(maxAttempts); - } + }, "retryStrategy") }); }, "resolveRetryConfig"); var ENV_RETRY_MODE = "AWS_RETRY_MODE"; var CONFIG_RETRY_MODE = "retry_mode"; var NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[ENV_RETRY_MODE], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[CONFIG_RETRY_MODE], "configFileSelector"), default: import_util_retry.DEFAULT_RETRY_MODE }; @@ -18411,9 +19537,9 @@ var omitRetryHeadersMiddlewareOptions = { override: true }; var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); - } + }, "applyToStack") }), "getOmitRetryHeadersPlugin"); // src/retryMiddleware.ts @@ -18492,12 +19618,9 @@ var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { return errorInfo; }, "getRetryErrorInfo"); var getRetryErrorType = /* @__PURE__ */ __name((error) => { - if ((0, import_service_error_classification.isThrottlingError)(error)) - return "THROTTLING"; - if ((0, import_service_error_classification.isTransientError)(error)) - return "TRANSIENT"; - if ((0, import_service_error_classification.isServerError)(error)) - return "SERVER_ERROR"; + if ((0, import_service_error_classification.isThrottlingError)(error)) return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) return "SERVER_ERROR"; return "CLIENT_ERROR"; }, "getRetryErrorType"); var retryMiddlewareOptions = { @@ -18508,20 +19631,17 @@ var retryMiddlewareOptions = { override: true }; var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.add(retryMiddleware(options), retryMiddlewareOptions); - } + }, "applyToStack") }), "getRetryPlugin"); var getRetryAfterHint = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; + if (!import_protocol_http.HttpResponse.isInstance(response)) return; const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; + if (!retryAfterHeaderName) return; const retryAfter = response.headers[retryAfterHeaderName]; const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return new Date(retryAfterSeconds * 1e3); + if (!Number.isNaN(retryAfterSeconds)) return new Date(retryAfterSeconds * 1e3); const retryAfterDate = new Date(retryAfter); return retryAfterDate; }, "getRetryAfterHint"); @@ -18571,15 +19691,15 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { deserializerMiddleware: () => deserializerMiddleware, deserializerMiddlewareOption: () => deserializerMiddlewareOption, getSerdePlugin: () => getSerdePlugin, serializerMiddleware: () => serializerMiddleware, serializerMiddlewareOption: () => serializerMiddlewareOption }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/deserializerMiddleware.ts var import_protocol_http = __nccwpck_require__(2356); @@ -18663,10 +19783,10 @@ var serializerMiddlewareOption = { }; function getSerdePlugin(config, serializer, deserializer) { return { - applyToStack: (commandStack) => { + applyToStack: /* @__PURE__ */ __name((commandStack) => { commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); - } + }, "applyToStack") }; } __name(getSerdePlugin, "getSerdePlugin"); @@ -18701,11 +19821,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { constructStack: () => constructStack }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/MiddlewareStack.ts var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { @@ -18848,7 +19968,7 @@ var constructStack = /* @__PURE__ */ __name(() => { return mainChain; }, "getMiddlewareList"); const stack = { - add: (middleware, options = {}) => { + add: /* @__PURE__ */ __name((middleware, options = {}) => { const { name, override, aliases: _aliases } = options; const entry = { step: "initialize", @@ -18859,8 +19979,7 @@ var constructStack = /* @__PURE__ */ __name(() => { 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)}'`); + if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); for (const alias of aliases) { const toOverrideIndex = absoluteEntries.findIndex( (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) @@ -18882,8 +20001,8 @@ var constructStack = /* @__PURE__ */ __name(() => { } } absoluteEntries.push(entry); - }, - addRelativeTo: (middleware, options) => { + }, "add"), + addRelativeTo: /* @__PURE__ */ __name((middleware, options) => { const { name, override, aliases: _aliases } = options; const entry = { middleware, @@ -18892,8 +20011,7 @@ var constructStack = /* @__PURE__ */ __name(() => { 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)}'`); + if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); for (const alias of aliases) { const toOverrideIndex = relativeEntries.findIndex( (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) @@ -18915,18 +20033,16 @@ var constructStack = /* @__PURE__ */ __name(() => { } } relativeEntries.push(entry); - }, - clone: () => cloneTo(constructStack()), - use: (plugin) => { + }, "addRelativeTo"), + clone: /* @__PURE__ */ __name(() => cloneTo(constructStack()), "clone"), + use: /* @__PURE__ */ __name((plugin) => { plugin.applyToStack(stack); - }, - remove: (toRemove) => { - if (typeof toRemove === "string") - return removeByName(toRemove); - else - return removeByReference(toRemove); - }, - removeByTag: (toRemove) => { + }, "use"), + remove: /* @__PURE__ */ __name((toRemove) => { + if (typeof toRemove === "string") return removeByName(toRemove); + else return removeByReference(toRemove); + }, "remove"), + removeByTag: /* @__PURE__ */ __name((toRemove) => { let isRemoved = false; const filterCb = /* @__PURE__ */ __name((entry) => { const { tags, name, aliases: _aliases } = entry; @@ -18943,28 +20059,27 @@ var constructStack = /* @__PURE__ */ __name(() => { absoluteEntries = absoluteEntries.filter(filterCb); relativeEntries = relativeEntries.filter(filterCb); return isRemoved; - }, - concat: (from) => { + }, "removeByTag"), + concat: /* @__PURE__ */ __name((from) => { const cloned = cloneTo(constructStack()); cloned.use(from); cloned.identifyOnResolve( identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false) ); return cloned; - }, + }, "concat"), applyToStack: cloneTo, - identify: () => { + identify: /* @__PURE__ */ __name(() => { return getMiddlewareList(true).map((mw) => { const step = mw.step ?? mw.relation + " " + mw.toMiddleware; return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; }); - }, + }, "identify"), identifyOnResolve(toggle) { - if (typeof toggle === "boolean") - identifyOnResolve = toggle; + if (typeof toggle === "boolean") identifyOnResolve = toggle; return identifyOnResolve; }, - resolve: (handler, context) => { + resolve: /* @__PURE__ */ __name((handler, context) => { for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { handler = middleware(handler, context); } @@ -18972,7 +20087,7 @@ var constructStack = /* @__PURE__ */ __name(() => { console.log(stack.identify()); } return handler; - } + }, "resolve") }; return stack; }, "constructStack"); @@ -19019,11 +20134,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { loadConfig: () => loadConfig }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/configLoader.ts @@ -19943,8 +21058,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { CredentialsProviderError: () => CredentialsProviderError, ProviderError: () => ProviderError, TokenProviderError: () => TokenProviderError, @@ -19952,7 +21067,7 @@ __export(src_exports, { fromStatic: () => fromStatic, memoize: () => memoize }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/ProviderError.ts var ProviderError = class _ProviderError extends Error { @@ -20430,11 +21545,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { parseQueryString: () => parseQueryString }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); function parseQueryString(querystring) { const query = {}; querystring = querystring.replace(/^\?/, ""); @@ -20488,8 +21603,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { isBrowserNetworkError: () => isBrowserNetworkError, isClockSkewCorrectedError: () => isClockSkewCorrectedError, isClockSkewError: () => isClockSkewError, @@ -20498,7 +21613,7 @@ __export(src_exports, { isThrottlingError: () => isThrottlingError, isTransientError: () => isTransientError }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/constants.ts var CLOCK_SKEW_ERROR_CODES = [ @@ -20672,8 +21787,8 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, DEFAULT_PROFILE: () => DEFAULT_PROFILE, ENV_PROFILE: () => ENV_PROFILE, @@ -20682,8 +21797,8 @@ __export(src_exports, { loadSsoSessionData: () => loadSsoSessionData, parseKnownFiles: () => parseKnownFiles }); -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(4172), module.exports); +module.exports = __toCommonJS(index_exports); +__reExport(index_exports, __nccwpck_require__(4172), module.exports); // src/getProfileName.ts var ENV_PROFILE = "AWS_PROFILE"; @@ -20691,8 +21806,8 @@ var DEFAULT_PROFILE = "default"; var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); // src/index.ts -__reExport(src_exports, __nccwpck_require__(269), module.exports); -__reExport(src_exports, __nccwpck_require__(1326), module.exports); +__reExport(index_exports, __nccwpck_require__(269), module.exports); +__reExport(index_exports, __nccwpck_require__(1326), module.exports); // src/loadSharedConfigFiles.ts @@ -21544,8 +22659,8 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { Client: () => Client, Command: () => Command, NoOpLogger: () => NoOpLogger, @@ -21573,7 +22688,7 @@ __export(src_exports, { throwDefaultError: () => throwDefaultError, withBaseException: () => withBaseException }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/client.ts var import_middleware_stack = __nccwpck_require__(9208); @@ -21721,10 +22836,10 @@ var Command = class { }; var ClassBuilder = class { constructor() { - this._init = () => { - }; + this._init = /* @__PURE__ */ __name(() => { + }, "_init"); this._ep = {}; - this._middlewareFn = () => []; + this._middlewareFn = /* @__PURE__ */ __name(() => [], "_middlewareFn"); this._commandName = ""; this._clientName = ""; this._additionalContext = {}; @@ -21879,8 +22994,7 @@ var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { if (typeof optionsOrCb === "function") { this.send(command2, optionsOrCb); } else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + if (typeof optionsOrCb !== "object") throw new Error(`Expected http options but got ${typeof optionsOrCb}`); this.send(command2, optionsOrCb || {}, cb); } else { return this.send(command2, optionsOrCb); @@ -21907,8 +23021,7 @@ var ServiceException = class _ServiceException extends Error { * Checks if a value is an instance of ServiceException (duck typed) */ static isInstance(value) { - if (!value) - return false; + if (!value) return false; const candidate = value; return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); } @@ -21916,8 +23029,7 @@ var ServiceException = class _ServiceException extends Error { * Custom instanceof check to support the operator for ServiceException base class */ static [Symbol.hasInstance](instance) { - if (!instance) - return false; + if (!instance) return false; const candidate = instance; if (this === _ServiceException) { return _ServiceException.isInstance(instance); @@ -22015,8 +23127,8 @@ var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { continue; } checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId] + algorithmId: /* @__PURE__ */ __name(() => algorithmId, "algorithmId"), + checksumConstructor: /* @__PURE__ */ __name(() => runtimeConfig[algorithmId], "checksumConstructor") }); } return { @@ -22236,7 +23348,7 @@ var _json = /* @__PURE__ */ __name((obj) => { }, "_json"); // src/index.ts -__reExport(src_exports, __nccwpck_require__(2430), module.exports); +__reExport(index_exports, __nccwpck_require__(2430), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -22408,11 +23520,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { parseUrl: () => parseUrl }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_querystring_parser = __nccwpck_require__(8822); var parseUrl = /* @__PURE__ */ __name((url) => { if (typeof url === "string") { @@ -22482,10 +23594,10 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(2674), module.exports); -__reExport(src_exports, __nccwpck_require__(4871), module.exports); +var index_exports = {}; +module.exports = __toCommonJS(index_exports); +__reExport(index_exports, __nccwpck_require__(2674), module.exports); +__reExport(index_exports, __nccwpck_require__(4871), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -22544,11 +23656,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { calculateBodyLength: () => calculateBodyLength }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/calculateBodyLength.ts var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; @@ -22560,12 +23672,9 @@ var calculateBodyLength = /* @__PURE__ */ __name((body) => { let len = body.length; for (let i = len - 1; i >= 0; i--) { const code = body.charCodeAt(i); - if (code > 127 && code <= 2047) - len++; - else if (code > 2047 && code <= 65535) - len += 2; - if (code >= 56320 && code <= 57343) - i--; + if (code > 127 && code <= 2047) len++; + else if (code > 2047 && code <= 65535) len += 2; + if (code >= 56320 && code <= 57343) i--; } return len; } else if (typeof body.byteLength === "number") { @@ -22606,11 +23715,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { calculateBodyLength: () => calculateBodyLength }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/calculateBodyLength.ts var import_fs = __nccwpck_require__(9896); @@ -22664,12 +23773,12 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { fromArrayBuffer: () => fromArrayBuffer, fromString: () => fromString }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_is_array_buffer = __nccwpck_require__(6130); var import_buffer = __nccwpck_require__(181); var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { @@ -22715,29 +23824,25 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { SelectorType: () => SelectorType, booleanSelector: () => booleanSelector, numberSelector: () => numberSelector }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/booleanSelector.ts var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; - if (obj[key] === "true") - return true; - if (obj[key] === "false") - return false; + if (!(key in obj)) return void 0; + 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]}.`); }, "booleanSelector"); // src/numberSelector.ts var numberSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; + if (!(key in obj)) return void 0; const numberValue = parseInt(obj[key], 10); if (Number.isNaN(numberValue)) { throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); @@ -22792,11 +23897,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { resolveDefaultsModeConfig: () => resolveDefaultsModeConfig }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/resolveDefaultsModeConfig.ts var import_config_resolver = __nccwpck_require__(9316); @@ -22815,12 +23920,12 @@ var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => { return env[AWS_DEFAULTS_MODE_ENV]; - }, - configFileSelector: (profile) => { + }, "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => { return profile[AWS_DEFAULTS_MODE_CONFIG]; - }, + }, "configFileSelector"), default: "legacy" }; @@ -22906,8 +24011,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { EndpointCache: () => EndpointCache, EndpointError: () => EndpointError, customEndpointFunctions: () => customEndpointFunctions, @@ -22915,7 +24020,7 @@ __export(src_exports, { isValidHostLabel: () => isValidHostLabel, resolveEndpoint: () => resolveEndpoint }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/cache/EndpointCache.ts var EndpointCache = class { @@ -23450,12 +24555,12 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { fromHex: () => fromHex, toHex: () => toHex }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var SHORT_TO_HEX = {}; var HEX_TO_SHORT = {}; for (let i = 0; i < 256; i++) { @@ -23521,12 +24626,12 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { getSmithyContext: () => getSmithyContext, normalizeProvider: () => normalizeProvider }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/getSmithyContext.ts var import_types = __nccwpck_require__(690); @@ -23534,8 +24639,7 @@ var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types. // src/normalizeProvider.ts var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; + if (typeof input === "function") return input; const promisified = Promise.resolve(input); return () => promisified; }, "normalizeProvider"); @@ -23570,8 +24674,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, @@ -23589,7 +24693,7 @@ __export(src_exports, { THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/config.ts var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { @@ -24417,11 +25521,11 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/blob/transforms.ts var import_util_base64 = __nccwpck_require__(8385); @@ -24476,14 +25580,14 @@ var Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { }; // src/index.ts -__reExport(src_exports, __nccwpck_require__(1775), module.exports); -__reExport(src_exports, __nccwpck_require__(5639), module.exports); -__reExport(src_exports, __nccwpck_require__(2005), module.exports); -__reExport(src_exports, __nccwpck_require__(6522), module.exports); -__reExport(src_exports, __nccwpck_require__(8412), module.exports); -__reExport(src_exports, __nccwpck_require__(7201), module.exports); -__reExport(src_exports, __nccwpck_require__(2108), module.exports); -__reExport(src_exports, __nccwpck_require__(4414), module.exports); +__reExport(index_exports, __nccwpck_require__(1775), module.exports); +__reExport(index_exports, __nccwpck_require__(5639), module.exports); +__reExport(index_exports, __nccwpck_require__(2005), module.exports); +__reExport(index_exports, __nccwpck_require__(6522), module.exports); +__reExport(index_exports, __nccwpck_require__(8412), module.exports); +__reExport(index_exports, __nccwpck_require__(7201), module.exports); +__reExport(index_exports, __nccwpck_require__(2108), module.exports); +__reExport(index_exports, __nccwpck_require__(4414), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -24766,13 +25870,13 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { fromUtf8: () => fromUtf8, toUint8Array: () => toUint8Array, toUtf8: () => toUtf8 }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/fromUtf8.ts var import_util_buffer_from = __nccwpck_require__(4151); @@ -50659,7 +51763,7 @@ module.exports = parseParams /***/ ((module) => { "use strict"; -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.873.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.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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.883.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.883.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.876.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.883.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.879.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.883.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.9.2","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.21","@smithy/middleware-retry":"^4.1.22","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.5.2","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.29","@smithy/util-defaults-mode-node":"^4.0.29","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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"}}'); /***/ }), @@ -50667,7 +51771,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","descrip /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.873.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"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.873.0","@aws-sdk/credential-provider-node":"3.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.883.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"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.883.0","@aws-sdk/credential-provider-node":"3.883.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.876.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.883.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.879.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.883.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.9.2","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.21","@smithy/middleware-retry":"^4.1.22","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.5.2","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.29","@smithy/util-defaults-mode-node":"^4.0.29","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); /***/ }), @@ -50675,7 +51779,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","descrip /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.873.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"},"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.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.883.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"},"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.883.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.876.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.883.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.879.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.883.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.9.2","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.21","@smithy/middleware-retry":"^4.1.22","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.5.2","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.29","@smithy/util-defaults-mode-node":"^4.0.29","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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/index.js b/dist/index.js index 07d6b92..929c958 100644 --- a/dist/index.js +++ b/dist/index.js @@ -7224,6 +7224,7 @@ __export(index_exports, { AwsQueryProtocol: () => AwsQueryProtocol, AwsRestJsonProtocol: () => AwsRestJsonProtocol, AwsRestXmlProtocol: () => AwsRestXmlProtocol, + AwsSmithyRpcV2CborProtocol: () => AwsSmithyRpcV2CborProtocol, JsonCodec: () => JsonCodec, JsonShapeDeserializer: () => JsonShapeDeserializer, JsonShapeSerializer: () => JsonShapeSerializer, @@ -7243,6 +7244,198 @@ __export(index_exports, { }); module.exports = __toCommonJS(index_exports); +// src/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.ts +var import_cbor = __nccwpck_require__(4645); +var import_schema2 = __nccwpck_require__(6890); + +// src/submodules/protocols/ProtocolLib.ts +var import_schema = __nccwpck_require__(6890); +var import_util_body_length_browser = __nccwpck_require__(2098); +var ProtocolLib = class { + static { + __name(this, "ProtocolLib"); + } + /** + * @param body - to be inspected. + * @param serdeContext - this is a subset type but in practice is the client.config having a property called bodyLengthChecker. + * + * @returns content-length value for the body if possible. + * @throws Error and should be caught and handled if not possible to determine length. + */ + calculateContentLength(body, serdeContext) { + const bodyLengthCalculator = serdeContext?.bodyLengthChecker ?? import_util_body_length_browser.calculateBodyLength; + return String(bodyLengthCalculator(body)); + } + /** + * This is only for REST protocols. + * + * @param defaultContentType - of the protocol. + * @param inputSchema - schema for which to determine content type. + * + * @returns content-type header value or undefined when not applicable. + */ + resolveRestContentType(defaultContentType, inputSchema) { + const members = inputSchema.getMemberSchemas(); + const httpPayloadMember = Object.values(members).find((m) => { + return !!m.getMergedTraits().httpPayload; + }); + if (httpPayloadMember) { + const mediaType = httpPayloadMember.getMergedTraits().mediaType; + if (mediaType) { + return mediaType; + } else if (httpPayloadMember.isStringSchema()) { + return "text/plain"; + } else if (httpPayloadMember.isBlobSchema()) { + return "application/octet-stream"; + } else { + return defaultContentType; + } + } else if (!inputSchema.isUnitSchema()) { + const hasBody = Object.values(members).find((m) => { + const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); + const noPrefixHeaders = httpPrefixHeaders === void 0; + return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && noPrefixHeaders; + }); + if (hasBody) { + return defaultContentType; + } + } + } + /** + * Shared code for finding error schema or throwing an unmodeled base error. + * @returns error schema and error metadata. + * + * @throws ServiceBaseException or generic Error if no error schema could be found. + */ + async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) { + let namespace = defaultNamespace; + let errorName = errorIdentifier; + if (errorIdentifier.includes("#")) { + [namespace, errorName] = errorIdentifier.split("#"); + } + const errorMetadata = { + $metadata: metadata, + $response: response, + $fault: response.statusCode < 500 ? "client" : "server" + }; + const registry = import_schema.TypeRegistry.for(namespace); + try { + const errorSchema = getErrorSchema?.(registry, errorName) ?? registry.getSchema(errorIdentifier); + return { errorSchema, errorMetadata }; + } catch (e) { + if (dataObject.Message) { + dataObject.message = dataObject.Message; + } + const baseExceptionSchema = import_schema.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); + } + throw Object.assign(new Error(errorName), errorMetadata, dataObject); + } + } + /** + * Reads the x-amzn-query-error header for awsQuery compatibility. + * + * @param output - values that will be assigned to an error object. + * @param response - from which to read awsQueryError headers. + */ + setQueryCompatError(output, response) { + const queryErrorHeader = response.headers?.["x-amzn-query-error"]; + if (output !== void 0 && queryErrorHeader != null) { + const [Code, Type] = queryErrorHeader.split(";"); + const entries = Object.entries(output); + const Error2 = { + Code, + Type + }; + Object.assign(output, Error2); + for (const [k, v] of entries) { + Error2[k] = v; + } + delete Error2.__type; + output.Error = Error2; + } + } + /** + * Assigns Error, Type, Code from the awsQuery error object to the output error object. + * @param queryCompatErrorData - query compat error object. + * @param errorData - canonical error object returned to the caller. + */ + queryCompatOutput(queryCompatErrorData, errorData) { + if (queryCompatErrorData.Error) { + errorData.Error = queryCompatErrorData.Error; + } + if (queryCompatErrorData.Type) { + errorData.Type = queryCompatErrorData.Type; + } + if (queryCompatErrorData.Code) { + errorData.Code = queryCompatErrorData.Code; + } + } +}; + +// src/submodules/protocols/cbor/AwsSmithyRpcV2CborProtocol.ts +var AwsSmithyRpcV2CborProtocol = class extends import_cbor.SmithyRpcV2CborProtocol { + static { + __name(this, "AwsSmithyRpcV2CborProtocol"); + } + awsQueryCompatible; + mixin = new ProtocolLib(); + constructor({ + defaultNamespace, + awsQueryCompatible + }) { + super({ defaultNamespace }); + this.awsQueryCompatible = !!awsQueryCompatible; + } + /** + * @override + */ + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; + } + return request; + } + /** + * @override + */ + async handleError(operationSchema, context, response, dataObject, metadata) { + if (this.awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); + } + const errorName = (0, import_cbor.loadSmithyRpcV2CborErrorCode)(response, dataObject) ?? "Unknown"; + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorName, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema2.NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } + if (this.awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); + } + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); + } +}; + // src/submodules/protocols/coercing-serializers.ts var _toStr = /* @__PURE__ */ __name((val) => { if (val == null) { @@ -7300,8 +7493,7 @@ var _toNum = /* @__PURE__ */ __name((val) => { // src/submodules/protocols/json/AwsJsonRpcProtocol.ts var import_protocols = __nccwpck_require__(3422); -var import_schema3 = __nccwpck_require__(6890); -var import_util_body_length_browser = __nccwpck_require__(2098); +var import_schema5 = __nccwpck_require__(6890); // src/submodules/protocols/ConfigurableSerdeContext.ts var SerdeContextConfig = class { @@ -7315,7 +7507,7 @@ var SerdeContextConfig = class { }; // src/submodules/protocols/json/JsonShapeDeserializer.ts -var import_schema = __nccwpck_require__(6890); +var import_schema3 = __nccwpck_require__(6890); var import_serde2 = __nccwpck_require__(2430); var import_util_base64 = __nccwpck_require__(8385); @@ -7341,7 +7533,8 @@ __name(jsonReviver, "jsonReviver"); // src/submodules/protocols/common.ts var import_smithy_client = __nccwpck_require__(1411); -var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => context.utf8Encoder(body)), "collectBodyString"); +var import_util_utf8 = __nccwpck_require__(1577); +var collectBodyString = /* @__PURE__ */ __name((streamBody, context) => (0, import_smithy_client.collectBody)(streamBody, context).then((body) => (context?.utf8Encoder ?? import_util_utf8.toUtf8)(body)), "collectBodyString"); // src/submodules/protocols/json/parseJsonBody.ts var parseJsonBody = /* @__PURE__ */ __name((streamBody, context) => collectBodyString(streamBody, context).then((encoded) => { @@ -7417,7 +7610,7 @@ var JsonShapeDeserializer = class extends SerdeContextConfig { } _read(schema, value) { const isObject = value !== null && typeof value === "object"; - const ns = import_schema.NormalizedSchema.of(schema); + const ns = import_schema3.NormalizedSchema.of(schema); if (ns.isListSchema() && Array.isArray(value)) { const listMember = ns.getValueSchema(); const out = []; @@ -7461,13 +7654,13 @@ var JsonShapeDeserializer = class extends SerdeContextConfig { } if (ns.isTimestampSchema()) { const options = this.settings.timestampFormat; - const format = options.useTrait ? ns.getSchema() === import_schema.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + const format = options.useTrait ? ns.getSchema() === import_schema3.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; switch (format) { - case import_schema.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema3.SCHEMA.TIMESTAMP_DATE_TIME: return (0, import_serde2.parseRfc3339DateTimeWithOffset)(value); - case import_schema.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema3.SCHEMA.TIMESTAMP_HTTP_DATE: return (0, import_serde2.parseRfc7231DateTime)(value); - case import_schema.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema3.SCHEMA.TIMESTAMP_EPOCH_SECONDS: return (0, import_serde2.parseEpochTimestamp)(value); default: console.warn("Missing timestamp format, parsing value with Date constructor:", value); @@ -7498,7 +7691,7 @@ var JsonShapeDeserializer = class extends SerdeContextConfig { }; // src/submodules/protocols/json/JsonShapeSerializer.ts -var import_schema2 = __nccwpck_require__(6890); +var import_schema4 = __nccwpck_require__(6890); var import_serde4 = __nccwpck_require__(2430); // src/submodules/protocols/json/jsonReplacer.ts @@ -7574,7 +7767,7 @@ var JsonShapeSerializer = class extends SerdeContextConfig { buffer; rootSchema; write(schema, value) { - this.rootSchema = import_schema2.NormalizedSchema.of(schema); + this.rootSchema = import_schema4.NormalizedSchema.of(schema); this.buffer = this._write(this.rootSchema, value); } flush() { @@ -7586,7 +7779,7 @@ var JsonShapeSerializer = class extends SerdeContextConfig { } _write(schema, value, container) { const isObject = value !== null && typeof value === "object"; - const ns = import_schema2.NormalizedSchema.of(schema); + const ns = import_schema4.NormalizedSchema.of(schema); if (ns.isListSchema() && Array.isArray(value)) { const listMember = ns.getValueSchema(); const out = []; @@ -7632,13 +7825,13 @@ var JsonShapeSerializer = class extends SerdeContextConfig { } if (ns.isTimestampSchema() && value instanceof Date) { const options = this.settings.timestampFormat; - const format = options.useTrait ? ns.getSchema() === import_schema2.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + const format = options.useTrait ? ns.getSchema() === import_schema4.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; switch (format) { - case import_schema2.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema4.SCHEMA.TIMESTAMP_DATE_TIME: return value.toISOString().replace(".000Z", "Z"); - case import_schema2.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema4.SCHEMA.TIMESTAMP_HTTP_DATE: return (0, import_serde4.dateToUtcString)(value); - case import_schema2.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS: return value.getTime() / 1e3; default: console.warn("Missing timestamp format, using epoch seconds", value); @@ -7696,7 +7889,13 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { deserializer; serviceTarget; codec; - constructor({ defaultNamespace, serviceTarget }) { + mixin = new ProtocolLib(); + awsQueryCompatible; + constructor({ + defaultNamespace, + serviceTarget, + awsQueryCompatible + }) { super({ defaultNamespace }); @@ -7704,12 +7903,13 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { this.codec = new JsonCodec({ timestampFormat: { useTrait: true, - default: import_schema3.SCHEMA.TIMESTAMP_EPOCH_SECONDS + default: import_schema5.SCHEMA.TIMESTAMP_EPOCH_SECONDS }, jsonName: false }); this.serializer = this.codec.createSerializer(); this.deserializer = this.codec.createDeserializer(); + this.awsQueryCompatible = !!awsQueryCompatible; } async serializeRequest(operationSchema, input, context) { const request = await super.serializeRequest(operationSchema, input, context); @@ -7718,13 +7918,16 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { } Object.assign(request.headers, { "content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`, - "x-amz-target": `${this.serviceTarget}.${import_schema3.NormalizedSchema.of(operationSchema).getName()}` + "x-amz-target": `${this.serviceTarget}.${import_schema5.NormalizedSchema.of(operationSchema).getName()}` }); - if ((0, import_schema3.deref)(operationSchema.input) === "unit" || !request.body) { + if (this.awsQueryCompatible) { + request.headers["x-amzn-query-mode"] = "true"; + } + if ((0, import_schema5.deref)(operationSchema.input) === "unit" || !request.body) { request.body = "{}"; } try { - request.headers["content-length"] = String((0, import_util_body_length_browser.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } return request; @@ -7733,41 +7936,37 @@ var AwsJsonRpcProtocol = class extends import_protocols.RpcProtocol { return this.codec; } async handleError(operationSchema, context, response, dataObject, metadata) { + if (this.awsQueryCompatible) { + this.mixin.setQueryCompatError(dataObject, response); + } const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const registry = import_schema3.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorIdentifier); - } catch (e) { - const baseExceptionSchema = import_schema3.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), dataObject); - } - throw new Error(errorName); - } - const ns = import_schema3.NormalizedSchema.of(errorSchema); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema5.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const exception = new errorSchema.ctor(message); - await this.deserializeHttpMessage(errorSchema, context, response, dataObject); const output = {}; for (const [name, member] of ns.structIterator()) { const target = member.getMergedTraits().jsonName ?? name; output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + if (this.awsQueryCompatible) { + this.mixin.queryCompatOutput(dataObject, output); + } + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } }; @@ -7776,10 +7975,15 @@ var AwsJson1_0Protocol = class extends AwsJsonRpcProtocol { static { __name(this, "AwsJson1_0Protocol"); } - constructor({ defaultNamespace, serviceTarget }) { + constructor({ + defaultNamespace, + serviceTarget, + awsQueryCompatible + }) { super({ defaultNamespace, - serviceTarget + serviceTarget, + awsQueryCompatible }); } getShapeId() { @@ -7801,10 +8005,15 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol { static { __name(this, "AwsJson1_1Protocol"); } - constructor({ defaultNamespace, serviceTarget }) { + constructor({ + defaultNamespace, + serviceTarget, + awsQueryCompatible + }) { super({ defaultNamespace, - serviceTarget + serviceTarget, + awsQueryCompatible }); } getShapeId() { @@ -7823,8 +8032,7 @@ var AwsJson1_1Protocol = class extends AwsJsonRpcProtocol { // src/submodules/protocols/json/AwsRestJsonProtocol.ts var import_protocols2 = __nccwpck_require__(3422); -var import_schema4 = __nccwpck_require__(6890); -var import_util_body_length_browser2 = __nccwpck_require__(2098); +var import_schema6 = __nccwpck_require__(6890); var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { static { __name(this, "AwsRestJsonProtocol"); @@ -7832,6 +8040,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { serializer; deserializer; codec; + mixin = new ProtocolLib(); constructor({ defaultNamespace }) { super({ defaultNamespace @@ -7839,7 +8048,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { const settings = { timestampFormat: { useTrait: true, - default: import_schema4.SCHEMA.TIMESTAMP_EPOCH_SECONDS + default: import_schema6.SCHEMA.TIMESTAMP_EPOCH_SECONDS }, httpBindings: true, jsonName: true @@ -7860,31 +8069,11 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { } async serializeRequest(operationSchema, input, context) { const request = await super.serializeRequest(operationSchema, input, context); - const inputSchema = import_schema4.NormalizedSchema.of(operationSchema.input); - const members = inputSchema.getMemberSchemas(); + const inputSchema = import_schema6.NormalizedSchema.of(operationSchema.input); if (!request.headers["content-type"]) { - const httpPayloadMember = Object.values(members).find((m) => { - return !!m.getMergedTraits().httpPayload; - }); - if (httpPayloadMember) { - const mediaType = httpPayloadMember.getMergedTraits().mediaType; - if (mediaType) { - request.headers["content-type"] = mediaType; - } else if (httpPayloadMember.isStringSchema()) { - request.headers["content-type"] = "text/plain"; - } else if (httpPayloadMember.isBlobSchema()) { - request.headers["content-type"] = "application/octet-stream"; - } else { - request.headers["content-type"] = this.getDefaultContentType(); - } - } else if (!inputSchema.isUnitSchema()) { - const hasBody = Object.values(members).find((m) => { - const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); - return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; - }); - if (hasBody) { - request.headers["content-type"] = this.getDefaultContentType(); - } + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; } } if (request.headers["content-type"] && !request.body) { @@ -7892,7 +8081,7 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { } if (request.body) { try { - request.headers["content-length"] = String((0, import_util_body_length_browser2.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } } @@ -7900,24 +8089,14 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = loadRestJsonErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const registry = import_schema4.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorIdentifier); - } catch (e) { - const baseExceptionSchema = import_schema4.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), dataObject); - } - throw new Error(errorName); - } - const ns = import_schema4.NormalizedSchema.of(errorSchema); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema6.NormalizedSchema.of(errorSchema); const message = dataObject.message ?? dataObject.Message ?? "Unknown"; const exception = new errorSchema.ctor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); @@ -7926,14 +8105,15 @@ var AwsRestJsonProtocol = class extends import_protocols2.HttpBindingProtocol { const target = member.getMergedTraits().jsonName ?? name; output[name] = this.codec.createDeserializer().readObject(member, dataObject[target]); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } /** * @override @@ -7957,14 +8137,13 @@ var awsExpectUnion = /* @__PURE__ */ __name((value) => { // src/submodules/protocols/query/AwsQueryProtocol.ts var import_protocols5 = __nccwpck_require__(3422); -var import_schema7 = __nccwpck_require__(6890); -var import_util_body_length_browser3 = __nccwpck_require__(2098); +var import_schema9 = __nccwpck_require__(6890); // src/submodules/protocols/xml/XmlShapeDeserializer.ts var import_protocols3 = __nccwpck_require__(3422); -var import_schema5 = __nccwpck_require__(6890); +var import_schema7 = __nccwpck_require__(6890); var import_smithy_client3 = __nccwpck_require__(1411); -var import_util_utf8 = __nccwpck_require__(1577); +var import_util_utf82 = __nccwpck_require__(1577); var import_fast_xml_parser = __nccwpck_require__(591); var XmlShapeDeserializer = class extends SerdeContextConfig { constructor(settings) { @@ -7986,7 +8165,7 @@ var XmlShapeDeserializer = class extends SerdeContextConfig { * @param key - used by AwsQuery to step one additional depth into the object before reading it. */ read(schema, bytes, key) { - const ns = import_schema5.NormalizedSchema.of(schema); + const ns = import_schema7.NormalizedSchema.of(schema); const memberSchemas = ns.getMemberSchemas(); const isEventPayload = ns.isStructSchema() && ns.isMemberSchema() && !!Object.values(memberSchemas).find((memberNs) => { return !!memberNs.getMemberTraits().eventPayload; @@ -8002,12 +8181,12 @@ var XmlShapeDeserializer = class extends SerdeContextConfig { } return output; } - const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf8.toUtf8)(bytes); + const xmlString = (this.serdeContext?.utf8Encoder ?? import_util_utf82.toUtf8)(bytes); const parsedObject = this.parseXml(xmlString); return this.readSchema(schema, key ? parsedObject[key] : parsedObject); } readSchema(_schema, value) { - const ns = import_schema5.NormalizedSchema.of(_schema); + const ns = import_schema7.NormalizedSchema.of(_schema); const traits = ns.getMergedTraits(); if (ns.isListSchema() && !Array.isArray(value)) { return this.readSchema(ns, [value]); @@ -8114,7 +8293,7 @@ var XmlShapeDeserializer = class extends SerdeContextConfig { // src/submodules/protocols/query/QueryShapeSerializer.ts var import_protocols4 = __nccwpck_require__(3422); -var import_schema6 = __nccwpck_require__(6890); +var import_schema8 = __nccwpck_require__(6890); var import_serde5 = __nccwpck_require__(2430); var import_smithy_client4 = __nccwpck_require__(1411); var import_util_base642 = __nccwpck_require__(8385); @@ -8131,7 +8310,7 @@ var QueryShapeSerializer = class extends SerdeContextConfig { if (this.buffer === void 0) { this.buffer = ""; } - const ns = import_schema6.NormalizedSchema.of(schema); + const ns = import_schema8.NormalizedSchema.of(schema); if (prefix && !prefix.endsWith(".")) { prefix += "."; } @@ -8163,13 +8342,13 @@ var QueryShapeSerializer = class extends SerdeContextConfig { this.writeKey(prefix); const format = (0, import_protocols4.determineTimestampFormat)(ns, this.settings); switch (format) { - case import_schema6.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema8.SCHEMA.TIMESTAMP_DATE_TIME: this.writeValue(value.toISOString().replace(".000Z", "Z")); break; - case import_schema6.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema8.SCHEMA.TIMESTAMP_HTTP_DATE: this.writeValue((0, import_smithy_client4.dateToUtcString)(value)); break; - case import_schema6.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema8.SCHEMA.TIMESTAMP_EPOCH_SECONDS: this.writeValue(String(value.getTime() / 1e3)); break; } @@ -8269,7 +8448,7 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { const settings = { timestampFormat: { useTrait: true, - default: import_schema7.SCHEMA.TIMESTAMP_DATE_TIME + default: import_schema9.SCHEMA.TIMESTAMP_DATE_TIME }, httpBindings: false, xmlNamespace: options.xmlNamespace, @@ -8284,6 +8463,7 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { } serializer; deserializer; + mixin = new ProtocolLib(); getShapeId() { return "aws.protocols#awsQuery"; } @@ -8302,27 +8482,28 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { Object.assign(request.headers, { "content-type": `application/x-www-form-urlencoded` }); - if ((0, import_schema7.deref)(operationSchema.input) === "unit" || !request.body) { + if ((0, import_schema9.deref)(operationSchema.input) === "unit" || !request.body) { request.body = ""; } - request.body = `Action=${operationSchema.name.split("#")[1]}&Version=${this.options.version}` + request.body; + const action = operationSchema.name.split("#")[1] ?? operationSchema.name; + request.body = `Action=${action}&Version=${this.options.version}` + request.body; if (request.body.endsWith("&")) { request.body = request.body.slice(-1); } try { - request.headers["content-length"] = String((0, import_util_body_length_browser3.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } return request; } async deserializeResponse(operationSchema, context, response) { const deserializer = this.deserializer; - const ns = import_schema7.NormalizedSchema.of(operationSchema.output); + const ns = import_schema9.NormalizedSchema.of(operationSchema.output); const dataObject = {}; if (response.statusCode >= 300) { const bytes2 = await (0, import_protocols5.collectBody)(response.body, context); if (bytes2.byteLength > 0) { - Object.assign(dataObject, await deserializer.read(import_schema7.SCHEMA.DOCUMENT, bytes2)); + Object.assign(dataObject, await deserializer.read(import_schema9.SCHEMA.DOCUMENT, bytes2)); } await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response)); } @@ -8331,7 +8512,8 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { delete response.headers[header]; response.headers[header.toLowerCase()] = value; } - const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? operationSchema.name.split("#")[1] + "Result" : void 0; + const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name; + const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0; const bytes = await (0, import_protocols5.collectBody)(response.body, context); if (bytes.byteLength > 0) { Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey)); @@ -8350,46 +8532,35 @@ var AwsQueryProtocol = class extends import_protocols5.RpcProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const errorDataSource = this.loadQueryError(dataObject); - const registry = import_schema7.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.find( - (schema) => import_schema7.NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName - ); - if (!errorSchema) { - errorSchema = registry.getSchema(errorIdentifier); - } - } catch (e) { - const baseExceptionSchema = import_schema7.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), errorDataSource); - } - throw new Error(errorName); - } - const ns = import_schema7.NormalizedSchema.of(errorSchema); + const errorData = this.loadQueryError(dataObject); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + errorData, + metadata, + (registry, errorName) => registry.find( + (schema) => import_schema9.NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName + ) + ); + const ns = import_schema9.NormalizedSchema.of(errorSchema); const message = this.loadQueryErrorMessage(dataObject); const exception = new errorSchema.ctor(message); const output = {}; for (const [name, member] of ns.structIterator()) { const target = member.getMergedTraits().xmlName ?? name; - const value = errorDataSource[target] ?? dataObject[target]; + const value = errorData[target] ?? dataObject[target]; output[name] = this.deserializer.readSchema(member, value); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } /** * The variations in the error and error message locations are attributed to @@ -8444,8 +8615,7 @@ var AwsEc2QueryProtocol = class extends AwsQueryProtocol { // src/submodules/protocols/xml/AwsRestXmlProtocol.ts var import_protocols6 = __nccwpck_require__(3422); -var import_schema9 = __nccwpck_require__(6890); -var import_util_body_length_browser4 = __nccwpck_require__(2098); +var import_schema11 = __nccwpck_require__(6890); // src/submodules/protocols/xml/parseXmlBody.ts var import_smithy_client5 = __nccwpck_require__(1411); @@ -8506,7 +8676,7 @@ var loadRestXmlErrorCode = /* @__PURE__ */ __name((output, data) => { // src/submodules/protocols/xml/XmlShapeSerializer.ts var import_xml_builder = __nccwpck_require__(4274); -var import_schema8 = __nccwpck_require__(6890); +var import_schema10 = __nccwpck_require__(6890); var import_serde6 = __nccwpck_require__(2430); var import_smithy_client6 = __nccwpck_require__(1411); var import_util_base643 = __nccwpck_require__(8385); @@ -8522,7 +8692,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig { byteBuffer; buffer; write(schema, value) { - const ns = import_schema8.NormalizedSchema.of(schema); + const ns = import_schema10.NormalizedSchema.of(schema); if (ns.isStringSchema() && typeof value === "string") { this.stringBuffer = value; } else if (ns.isBlobSchema()) { @@ -8567,9 +8737,6 @@ var XmlShapeSerializer = class extends SerdeContextConfig { } const structXmlNode = import_xml_builder.XmlNode.of(name); const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); - if (xmlns) { - structXmlNode.addAttribute(xmlnsAttr, xmlns); - } for (const [memberName, memberSchema] of ns.structIterator()) { const val = value[memberName]; if (val != null || memberSchema.isIdempotencyToken()) { @@ -8593,6 +8760,9 @@ var XmlShapeSerializer = class extends SerdeContextConfig { } } } + if (xmlns) { + structXmlNode.addAttribute(xmlnsAttr, xmlns); + } return structXmlNode; } writeList(listMember, array, container, parentXmlns) { @@ -8709,22 +8879,22 @@ var XmlShapeSerializer = class extends SerdeContextConfig { if (null === value) { throw new Error("@aws-sdk/core/protocols - (XML serializer) cannot write null value."); } - const ns = import_schema8.NormalizedSchema.of(_schema); + const ns = import_schema10.NormalizedSchema.of(_schema); let nodeContents = null; if (value && typeof value === "object") { if (ns.isBlobSchema()) { nodeContents = (this.serdeContext?.base64Encoder ?? import_util_base643.toBase64)(value); } else if (ns.isTimestampSchema() && value instanceof Date) { const options = this.settings.timestampFormat; - const format = options.useTrait ? ns.getSchema() === import_schema8.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; + const format = options.useTrait ? ns.getSchema() === import_schema10.SCHEMA.TIMESTAMP_DEFAULT ? options.default : ns.getSchema() ?? options.default : options.default; switch (format) { - case import_schema8.SCHEMA.TIMESTAMP_DATE_TIME: + case import_schema10.SCHEMA.TIMESTAMP_DATE_TIME: nodeContents = value.toISOString().replace(".000Z", "Z"); break; - case import_schema8.SCHEMA.TIMESTAMP_HTTP_DATE: + case import_schema10.SCHEMA.TIMESTAMP_HTTP_DATE: nodeContents = (0, import_smithy_client6.dateToUtcString)(value); break; - case import_schema8.SCHEMA.TIMESTAMP_EPOCH_SECONDS: + case import_schema10.SCHEMA.TIMESTAMP_EPOCH_SECONDS: nodeContents = String(value.getTime() / 1e3); break; default: @@ -8766,7 +8936,7 @@ var XmlShapeSerializer = class extends SerdeContextConfig { } writeSimpleInto(_schema, value, into, parentXmlns) { const nodeContents = this.writeSimple(_schema, value); - const ns = import_schema8.NormalizedSchema.of(_schema); + const ns = import_schema10.NormalizedSchema.of(_schema); const content = new import_xml_builder.XmlText(nodeContents); const [xmlnsAttr, xmlns] = this.getXmlnsAttribute(ns, parentXmlns); if (xmlns) { @@ -8813,12 +8983,13 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { codec; serializer; deserializer; + mixin = new ProtocolLib(); constructor(options) { super(options); const settings = { timestampFormat: { useTrait: true, - default: import_schema9.SCHEMA.TIMESTAMP_DATE_TIME + default: import_schema11.SCHEMA.TIMESTAMP_DATE_TIME }, httpBindings: true, xmlNamespace: options.xmlNamespace, @@ -8836,34 +9007,11 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { } async serializeRequest(operationSchema, input, context) { const request = await super.serializeRequest(operationSchema, input, context); - const ns = import_schema9.NormalizedSchema.of(operationSchema.input); - const members = ns.getMemberSchemas(); - request.path = String(request.path).split("/").filter((segment) => { - return segment !== "{Bucket}"; - }).join("/") || "/"; + const inputSchema = import_schema11.NormalizedSchema.of(operationSchema.input); if (!request.headers["content-type"]) { - const httpPayloadMember = Object.values(members).find((m) => { - return !!m.getMergedTraits().httpPayload; - }); - if (httpPayloadMember) { - const mediaType = httpPayloadMember.getMergedTraits().mediaType; - if (mediaType) { - request.headers["content-type"] = mediaType; - } else if (httpPayloadMember.isStringSchema()) { - request.headers["content-type"] = "text/plain"; - } else if (httpPayloadMember.isBlobSchema()) { - request.headers["content-type"] = "application/octet-stream"; - } else { - request.headers["content-type"] = this.getDefaultContentType(); - } - } else if (!ns.isUnitSchema()) { - const hasBody = Object.values(members).find((m) => { - const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits(); - return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0; - }); - if (hasBody) { - request.headers["content-type"] = this.getDefaultContentType(); - } + const contentType = this.mixin.resolveRestContentType(this.getDefaultContentType(), inputSchema); + if (contentType) { + request.headers["content-type"] = contentType; } } if (request.headers["content-type"] === this.getDefaultContentType()) { @@ -8873,7 +9021,7 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { } if (request.body) { try { - request.headers["content-length"] = String((0, import_util_body_length_browser4.calculateBodyLength)(request.body)); + request.headers["content-length"] = this.mixin.calculateContentLength(request.body, this.serdeContext); } catch (e) { } } @@ -8884,24 +9032,14 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { } async handleError(operationSchema, context, response, dataObject, metadata) { const errorIdentifier = loadRestXmlErrorCode(response, dataObject) ?? "Unknown"; - let namespace = this.options.defaultNamespace; - let errorName = errorIdentifier; - if (errorIdentifier.includes("#")) { - [namespace, errorName] = errorIdentifier.split("#"); - } - const registry = import_schema9.TypeRegistry.for(namespace); - let errorSchema; - try { - errorSchema = registry.getSchema(errorIdentifier); - } catch (e) { - const baseExceptionSchema = import_schema9.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); - if (baseExceptionSchema) { - const ErrorCtor = baseExceptionSchema.ctor; - throw Object.assign(new ErrorCtor(errorName), dataObject); - } - throw new Error(errorName); - } - const ns = import_schema9.NormalizedSchema.of(errorSchema); + const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException( + errorIdentifier, + this.options.defaultNamespace, + response, + dataObject, + metadata + ); + const ns = import_schema11.NormalizedSchema.of(errorSchema); const message = dataObject.Error?.message ?? dataObject.Error?.Message ?? dataObject.message ?? dataObject.Message ?? "Unknown"; const exception = new errorSchema.ctor(message); await this.deserializeHttpMessage(errorSchema, context, response, dataObject); @@ -8911,14 +9049,15 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { const value = dataObject.Error?.[target] ?? dataObject[target]; output[name] = this.codec.createDeserializer().readSchema(member, value); } - Object.assign(exception, { - $metadata: metadata, - $response: response, - $fault: ns.getMergedTraits().error, - message, - ...output - }); - throw exception; + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); } /** * @override @@ -8931,6 +9070,82 @@ var AwsRestXmlProtocol = class extends import_protocols6.HttpBindingProtocol { 0 && (0); +/***/ }), + +/***/ 5606: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +"use strict"; + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/index.ts +var index_exports = {}; +__export(index_exports, { + ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, + ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, + ENV_EXPIRATION: () => ENV_EXPIRATION, + ENV_KEY: () => ENV_KEY, + ENV_SECRET: () => ENV_SECRET, + ENV_SESSION: () => ENV_SESSION, + fromEnv: () => fromEnv +}); +module.exports = __toCommonJS(index_exports); + +// src/fromEnv.ts +var import_client = __nccwpck_require__(5152); +var import_property_provider = __nccwpck_require__(1238); +var ENV_KEY = "AWS_ACCESS_KEY_ID"; +var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; +var ENV_SESSION = "AWS_SESSION_TOKEN"; +var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; +var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; +var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; +var fromEnv = /* @__PURE__ */ __name((init) => async () => { + init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); + const accessKeyId = process.env[ENV_KEY]; + const secretAccessKey = process.env[ENV_SECRET]; + const sessionToken = process.env[ENV_SESSION]; + const expiry = process.env[ENV_EXPIRATION]; + const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; + const accountId = process.env[ENV_ACCOUNT_ID]; + if (accessKeyId && secretAccessKey) { + const credentials = { + accessKeyId, + secretAccessKey, + ...sessionToken && { sessionToken }, + ...expiry && { expiration: new Date(expiry) }, + ...credentialScope && { credentialScope }, + ...accountId && { accountId } + }; + (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); + return credentials; + } + throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); +}, "fromEnv"); +// Annotate the CommonJS export names for ESM import in node: + +0 && (0); + + + /***/ }), /***/ 1509: @@ -9014,7 +9229,9 @@ const fromHttp = (options = {}) => { const full = options.awsContainerCredentialsFullUri ?? process.env[AWS_CONTAINER_CREDENTIALS_FULL_URI]; const token = options.awsContainerAuthorizationToken ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN]; const tokenFile = options.awsContainerAuthorizationTokenFile ?? process.env[AWS_CONTAINER_AUTHORIZATION_TOKEN_FILE]; - const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger ? console.warn : options.logger.warn; + const warn = options.logger?.constructor?.name === "NoOpLogger" || !options.logger?.warn + ? console.warn + : options.logger.warn.bind(options.logger); if (relative && full) { warn("@aws-sdk/credential-provider-http: " + "you have set both awsContainerCredentialsRelativeUri and awsContainerCredentialsFullUri."); @@ -9232,7 +9449,7 @@ var resolveCredentialSource = /* @__PURE__ */ __name((credentialSource, profileN }, "Ec2InstanceMetadata"), Environment: /* @__PURE__ */ __name(async (options) => { logger?.debug("@aws-sdk/credential-provider-ini - credential_source is Environment"); - const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(7121))); + const { fromEnv } = await Promise.resolve().then(() => __toESM(__nccwpck_require__(5606))); return async () => fromEnv(options)().then(setNamedProvider); }, "Environment") }; @@ -9442,82 +9659,6 @@ var fromIni = /* @__PURE__ */ __name((_init = {}) => async ({ callerClientConfig -/***/ }), - -/***/ 7121: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, - ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, - ENV_EXPIRATION: () => ENV_EXPIRATION, - ENV_KEY: () => ENV_KEY, - ENV_SECRET: () => ENV_SECRET, - ENV_SESSION: () => ENV_SESSION, - fromEnv: () => fromEnv -}); -module.exports = __toCommonJS(index_exports); - -// src/fromEnv.ts -var import_client = __nccwpck_require__(5152); -var import_property_provider = __nccwpck_require__(1238); -var ENV_KEY = "AWS_ACCESS_KEY_ID"; -var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; -var ENV_SESSION = "AWS_SESSION_TOKEN"; -var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; -var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; -var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; -var fromEnv = /* @__PURE__ */ __name((init) => async () => { - init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); - const accessKeyId = process.env[ENV_KEY]; - const secretAccessKey = process.env[ENV_SECRET]; - const sessionToken = process.env[ENV_SESSION]; - const expiry = process.env[ENV_EXPIRATION]; - const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; - const accountId = process.env[ENV_ACCOUNT_ID]; - if (accessKeyId && secretAccessKey) { - const credentials = { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) }, - ...credentialScope && { credentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); -}, "fromEnv"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - /***/ }), /***/ 5861: @@ -9564,7 +9705,7 @@ __export(index_exports, { module.exports = __toCommonJS(index_exports); // src/defaultProvider.ts -var import_credential_provider_env = __nccwpck_require__(6153); +var import_credential_provider_env = __nccwpck_require__(5606); var import_shared_ini_file_loader = __nccwpck_require__(4964); @@ -9597,7 +9738,7 @@ var defaultProvider = /* @__PURE__ */ __name((init = {}) => (0, import_property_ const envStaticCredentialsAreSet = process.env[import_credential_provider_env.ENV_KEY] && process.env[import_credential_provider_env.ENV_SECRET]; if (envStaticCredentialsAreSet) { if (!multipleCredentialSourceWarningEmitted) { - const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn : console.warn; + const warnFn = init.logger?.warn && init.logger?.constructor?.name !== "NoOpLogger" ? init.logger.warn.bind(init.logger) : console.warn; warnFn( `@aws-sdk/credential-provider-node - defaultProvider::fromEnv WARNING: Multiple credential sources detected: @@ -9669,82 +9810,6 @@ var credentialsTreatedAsExpired = /* @__PURE__ */ __name((credentials) => creden -/***/ }), - -/***/ 6153: -/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { - -"use strict"; - -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __name = (target, value) => __defProp(target, "name", { value, configurable: true }); -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// src/index.ts -var index_exports = {}; -__export(index_exports, { - ENV_ACCOUNT_ID: () => ENV_ACCOUNT_ID, - ENV_CREDENTIAL_SCOPE: () => ENV_CREDENTIAL_SCOPE, - ENV_EXPIRATION: () => ENV_EXPIRATION, - ENV_KEY: () => ENV_KEY, - ENV_SECRET: () => ENV_SECRET, - ENV_SESSION: () => ENV_SESSION, - fromEnv: () => fromEnv -}); -module.exports = __toCommonJS(index_exports); - -// src/fromEnv.ts -var import_client = __nccwpck_require__(5152); -var import_property_provider = __nccwpck_require__(1238); -var ENV_KEY = "AWS_ACCESS_KEY_ID"; -var ENV_SECRET = "AWS_SECRET_ACCESS_KEY"; -var ENV_SESSION = "AWS_SESSION_TOKEN"; -var ENV_EXPIRATION = "AWS_CREDENTIAL_EXPIRATION"; -var ENV_CREDENTIAL_SCOPE = "AWS_CREDENTIAL_SCOPE"; -var ENV_ACCOUNT_ID = "AWS_ACCOUNT_ID"; -var fromEnv = /* @__PURE__ */ __name((init) => async () => { - init?.logger?.debug("@aws-sdk/credential-provider-env - fromEnv"); - const accessKeyId = process.env[ENV_KEY]; - const secretAccessKey = process.env[ENV_SECRET]; - const sessionToken = process.env[ENV_SESSION]; - const expiry = process.env[ENV_EXPIRATION]; - const credentialScope = process.env[ENV_CREDENTIAL_SCOPE]; - const accountId = process.env[ENV_ACCOUNT_ID]; - if (accessKeyId && secretAccessKey) { - const credentials = { - accessKeyId, - secretAccessKey, - ...sessionToken && { sessionToken }, - ...expiry && { expiration: new Date(expiry) }, - ...credentialScope && { credentialScope }, - ...accountId && { accountId } - }; - (0, import_client.setCredentialFeature)(credentials, "CREDENTIALS_ENV_VARS", "g"); - return credentials; - } - throw new import_property_provider.CredentialsProviderError("Unable to find environment variable credentials.", { logger: init?.logger }); -}, "fromEnv"); -// Annotate the CommonJS export names for ESM import in node: - -0 && (0); - - - /***/ }), /***/ 5360: @@ -13637,6 +13702,9 @@ var partitions_default = { "ap-southeast-5": { description: "Asia Pacific (Malaysia)" }, + "ap-southeast-6": { + description: "Asia Pacific (New Zealand)" + }, "ap-southeast-7": { description: "Asia Pacific (Thailand)" }, @@ -13730,7 +13798,7 @@ var partitions_default = { dualStackDnsSuffix: "api.amazonwebservices.eu", implicitGlobalRegion: "eusc-de-east-1", name: "aws-eusc", - supportsDualStack: false, + supportsDualStack: true, supportsFIPS: true }, regionRegex: "^eusc\\-(de)\\-\\w+\\-\\d+$", @@ -14256,8 +14324,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT, CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT, DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT, @@ -14275,7 +14343,7 @@ __export(src_exports, { resolveEndpointsConfig: () => resolveEndpointsConfig, resolveRegionConfig: () => resolveRegionConfig }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/endpointsConfig/NodeUseDualstackEndpointConfigOptions.ts var import_util_config_provider = __nccwpck_require__(6716); @@ -14283,8 +14351,8 @@ var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT"; var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint"; var DEFAULT_USE_DUALSTACK_ENDPOINT = false; var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_DUALSTACK_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"), default: false }; @@ -14294,8 +14362,8 @@ var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT"; var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint"; var DEFAULT_USE_FIPS_ENDPOINT = false; var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), - configFileSelector: (profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), + environmentVariableSelector: /* @__PURE__ */ __name((env) => (0, import_util_config_provider.booleanSelector)(env, ENV_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.ENV), "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => (0, import_util_config_provider.booleanSelector)(profile, CONFIG_USE_FIPS_ENDPOINT, import_util_config_provider.SelectorType.CONFIG), "configFileSelector"), default: false }; @@ -14347,11 +14415,11 @@ var resolveEndpointsConfig = /* @__PURE__ */ __name((input) => { var REGION_ENV_NAME = "AWS_REGION"; var REGION_INI_NAME = "region"; var NODE_REGION_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[REGION_ENV_NAME], - configFileSelector: (profile) => profile[REGION_INI_NAME], - default: () => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[REGION_ENV_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[REGION_INI_NAME], "configFileSelector"), + default: /* @__PURE__ */ __name(() => { throw new Error("Region is missing"); - } + }, "default") }; var NODE_REGION_CONFIG_FILE_OPTIONS = { preferredFile: "credentials" @@ -14370,20 +14438,20 @@ var resolveRegionConfig = /* @__PURE__ */ __name((input) => { throw new Error("Region is missing"); } return Object.assign(input, { - region: async () => { + region: /* @__PURE__ */ __name(async () => { if (typeof region === "string") { return getRealRegion(region); } const providedRegion = await region(); return getRealRegion(providedRegion); - }, - useFipsEndpoint: async () => { + }, "region"), + useFipsEndpoint: /* @__PURE__ */ __name(async () => { const providedRegion = typeof region === "string" ? region : await region(); if (isFipsRegion(providedRegion)) { return true; } return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint(); - } + }, "useFipsEndpoint") }); }, "resolveRegionConfig"); @@ -14474,8 +14542,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { DefaultIdentityProviderConfig: () => DefaultIdentityProviderConfig, EXPIRATION_MS: () => EXPIRATION_MS, HttpApiKeyAuthSigner: () => HttpApiKeyAuthSigner, @@ -14499,7 +14567,7 @@ __export(src_exports, { requestBuilder: () => import_protocols.requestBuilder, setFeature: () => setFeature }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/getSmithyContext.ts var import_types = __nccwpck_require__(690); @@ -14588,7 +14656,7 @@ var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo( httpAuthSchemeMiddleware(config, { httpAuthSchemeParametersProvider, @@ -14596,7 +14664,7 @@ var getHttpAuthSchemeEndpointRuleSetPlugin = /* @__PURE__ */ __name((config, { }), httpAuthSchemeEndpointRuleSetMiddlewareOptions ); - } + }, "applyToStack") }), "getHttpAuthSchemeEndpointRuleSetPlugin"); // src/middleware-http-auth-scheme/getHttpAuthSchemePlugin.ts @@ -14613,7 +14681,7 @@ var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo( httpAuthSchemeMiddleware(config, { httpAuthSchemeParametersProvider, @@ -14621,7 +14689,7 @@ var getHttpAuthSchemePlugin = /* @__PURE__ */ __name((config, { }), httpAuthSchemeMiddlewareOptions ); - } + }, "applyToStack") }), "getHttpAuthSchemePlugin"); // src/middleware-http-signing/httpSigningMiddleware.ts @@ -14665,15 +14733,14 @@ var httpSigningMiddlewareOptions = { toMiddleware: "retryMiddleware" }; var getHttpSigningPlugin = /* @__PURE__ */ __name((config) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions); - } + }, "applyToStack") }), "getHttpSigningPlugin"); // src/normalizeProvider.ts var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; + if (typeof input === "function") return input; const promisified = Promise.resolve(input); return () => promisified; }, "normalizeProvider"); @@ -14887,6 +14954,1069 @@ var memoizeIdentityProvider = /* @__PURE__ */ __name((provider, isExpired, requi +/***/ }), + +/***/ 4645: +/***/ ((module, __unused_webpack_exports, __nccwpck_require__) => { + +var __defProp = Object.defineProperty; +var __getOwnPropDesc = Object.getOwnPropertyDescriptor; +var __getOwnPropNames = Object.getOwnPropertyNames; +var __hasOwnProp = Object.prototype.hasOwnProperty; +var __export = (target, all) => { + for (var name in all) + __defProp(target, name, { get: all[name], enumerable: true }); +}; +var __copyProps = (to, from, except, desc) => { + if (from && typeof from === "object" || typeof from === "function") { + for (let key of __getOwnPropNames(from)) + if (!__hasOwnProp.call(to, key) && key !== except) + __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); + } + return to; +}; +var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); + +// src/submodules/cbor/index.ts +var index_exports = {}; +__export(index_exports, { + CborCodec: () => CborCodec, + CborShapeDeserializer: () => CborShapeDeserializer, + CborShapeSerializer: () => CborShapeSerializer, + SmithyRpcV2CborProtocol: () => SmithyRpcV2CborProtocol, + buildHttpRpcRequest: () => buildHttpRpcRequest, + cbor: () => cbor, + checkCborResponse: () => checkCborResponse, + dateToTag: () => dateToTag, + loadSmithyRpcV2CborErrorCode: () => loadSmithyRpcV2CborErrorCode, + parseCborBody: () => parseCborBody, + parseCborErrorBody: () => parseCborErrorBody, + tag: () => tag, + tagSymbol: () => tagSymbol +}); +module.exports = __toCommonJS(index_exports); + +// src/submodules/cbor/cbor-decode.ts +var import_serde = __nccwpck_require__(2430); +var import_util_utf8 = __nccwpck_require__(1577); + +// src/submodules/cbor/cbor-types.ts +var majorUint64 = 0; +var majorNegativeInt64 = 1; +var majorUnstructuredByteString = 2; +var majorUtf8String = 3; +var majorList = 4; +var majorMap = 5; +var majorTag = 6; +var majorSpecial = 7; +var specialFalse = 20; +var specialTrue = 21; +var specialNull = 22; +var specialUndefined = 23; +var extendedOneByte = 24; +var extendedFloat16 = 25; +var extendedFloat32 = 26; +var extendedFloat64 = 27; +var minorIndefinite = 31; +function alloc(size) { + return typeof Buffer !== "undefined" ? Buffer.alloc(size) : new Uint8Array(size); +} +var tagSymbol = Symbol("@smithy/core/cbor::tagSymbol"); +function tag(data2) { + data2[tagSymbol] = true; + return data2; +} + +// src/submodules/cbor/cbor-decode.ts +var USE_TEXT_DECODER = typeof TextDecoder !== "undefined"; +var USE_BUFFER = typeof Buffer !== "undefined"; +var payload = alloc(0); +var dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); +var textDecoder = USE_TEXT_DECODER ? new TextDecoder() : null; +var _offset = 0; +function setPayload(bytes) { + payload = bytes; + dataView = new DataView(payload.buffer, payload.byteOffset, payload.byteLength); +} +function decode(at, to) { + if (at >= to) { + throw new Error("unexpected end of (decode) payload."); + } + const major = (payload[at] & 224) >> 5; + const minor = payload[at] & 31; + switch (major) { + case majorUint64: + case majorNegativeInt64: + case majorTag: + let unsignedInt; + let offset; + if (minor < 24) { + unsignedInt = minor; + offset = 1; + } else { + switch (minor) { + case extendedOneByte: + case extendedFloat16: + case extendedFloat32: + case extendedFloat64: + const countLength = minorValueToArgumentLength[minor]; + const countOffset = countLength + 1; + offset = countOffset; + if (to - at < countOffset) { + throw new Error(`countLength ${countLength} greater than remaining buf len.`); + } + const countIndex = at + 1; + if (countLength === 1) { + unsignedInt = payload[countIndex]; + } else if (countLength === 2) { + unsignedInt = dataView.getUint16(countIndex); + } else if (countLength === 4) { + unsignedInt = dataView.getUint32(countIndex); + } else { + unsignedInt = dataView.getBigUint64(countIndex); + } + break; + default: + throw new Error(`unexpected minor value ${minor}.`); + } + } + if (major === majorUint64) { + _offset = offset; + return castBigInt(unsignedInt); + } else if (major === majorNegativeInt64) { + let negativeInt; + if (typeof unsignedInt === "bigint") { + negativeInt = BigInt(-1) - unsignedInt; + } else { + negativeInt = -1 - unsignedInt; + } + _offset = offset; + return castBigInt(negativeInt); + } else { + if (minor === 2 || minor === 3) { + const length = decodeCount(at + offset, to); + let b = BigInt(0); + const start = at + offset + _offset; + for (let i = start; i < start + length; ++i) { + b = b << BigInt(8) | BigInt(payload[i]); + } + _offset = offset + _offset + length; + return minor === 3 ? -b - BigInt(1) : b; + } else if (minor === 4) { + const decimalFraction = decode(at + offset, to); + const [exponent, mantissa] = decimalFraction; + const normalizer = mantissa < 0 ? -1 : 1; + const mantissaStr = "0".repeat(Math.abs(exponent) + 1) + String(BigInt(normalizer) * BigInt(mantissa)); + let numericString; + const sign = mantissa < 0 ? "-" : ""; + numericString = exponent === 0 ? mantissaStr : mantissaStr.slice(0, mantissaStr.length + exponent) + "." + mantissaStr.slice(exponent); + numericString = numericString.replace(/^0+/g, ""); + if (numericString === "") { + numericString = "0"; + } + if (numericString[0] === ".") { + numericString = "0" + numericString; + } + numericString = sign + numericString; + _offset = offset + _offset; + return (0, import_serde.nv)(numericString); + } else { + const value = decode(at + offset, to); + const valueOffset = _offset; + _offset = offset + valueOffset; + return tag({ tag: castBigInt(unsignedInt), value }); + } + } + case majorUtf8String: + case majorMap: + case majorList: + case majorUnstructuredByteString: + if (minor === minorIndefinite) { + switch (major) { + case majorUtf8String: + return decodeUtf8StringIndefinite(at, to); + case majorMap: + return decodeMapIndefinite(at, to); + case majorList: + return decodeListIndefinite(at, to); + case majorUnstructuredByteString: + return decodeUnstructuredByteStringIndefinite(at, to); + } + } else { + switch (major) { + case majorUtf8String: + return decodeUtf8String(at, to); + case majorMap: + return decodeMap(at, to); + case majorList: + return decodeList(at, to); + case majorUnstructuredByteString: + return decodeUnstructuredByteString(at, to); + } + } + default: + return decodeSpecial(at, to); + } +} +function bytesToUtf8(bytes, at, to) { + if (USE_BUFFER && bytes.constructor?.name === "Buffer") { + return bytes.toString("utf-8", at, to); + } + if (textDecoder) { + return textDecoder.decode(bytes.subarray(at, to)); + } + return (0, import_util_utf8.toUtf8)(bytes.subarray(at, to)); +} +function demote(bigInteger) { + const num = Number(bigInteger); + if (num < Number.MIN_SAFE_INTEGER || Number.MAX_SAFE_INTEGER < num) { + console.warn(new Error(`@smithy/core/cbor - truncating BigInt(${bigInteger}) to ${num} with loss of precision.`)); + } + return num; +} +var minorValueToArgumentLength = { + [extendedOneByte]: 1, + [extendedFloat16]: 2, + [extendedFloat32]: 4, + [extendedFloat64]: 8 +}; +function bytesToFloat16(a, b) { + const sign = a >> 7; + const exponent = (a & 124) >> 2; + const fraction = (a & 3) << 8 | b; + const scalar = sign === 0 ? 1 : -1; + let exponentComponent; + let summation; + if (exponent === 0) { + if (fraction === 0) { + return 0; + } else { + exponentComponent = Math.pow(2, 1 - 15); + summation = 0; + } + } else if (exponent === 31) { + if (fraction === 0) { + return scalar * Infinity; + } else { + return NaN; + } + } else { + exponentComponent = Math.pow(2, exponent - 15); + summation = 1; + } + summation += fraction / 1024; + return scalar * (exponentComponent * summation); +} +function decodeCount(at, to) { + const minor = payload[at] & 31; + if (minor < 24) { + _offset = 1; + return minor; + } + if (minor === extendedOneByte || minor === extendedFloat16 || minor === extendedFloat32 || minor === extendedFloat64) { + const countLength = minorValueToArgumentLength[minor]; + _offset = countLength + 1; + if (to - at < _offset) { + throw new Error(`countLength ${countLength} greater than remaining buf len.`); + } + const countIndex = at + 1; + if (countLength === 1) { + return payload[countIndex]; + } else if (countLength === 2) { + return dataView.getUint16(countIndex); + } else if (countLength === 4) { + return dataView.getUint32(countIndex); + } + return demote(dataView.getBigUint64(countIndex)); + } + throw new Error(`unexpected minor value ${minor}.`); +} +function decodeUtf8String(at, to) { + const length = decodeCount(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + throw new Error(`string len ${length} greater than remaining buf len.`); + } + const value = bytesToUtf8(payload, at, at + length); + _offset = offset + length; + return value; +} +function decodeUtf8StringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at; at < to; ) { + if (payload[at] === 255) { + const data2 = alloc(vector.length); + data2.set(vector, 0); + _offset = at - base + 2; + return bytesToUtf8(data2, 0, data2.length); + } + const major = (payload[at] & 224) >> 5; + const minor = payload[at] & 31; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} in indefinite string.`); + } + if (minor === minorIndefinite) { + throw new Error("nested indefinite string."); + } + const bytes = decodeUnstructuredByteString(at, to); + const length = _offset; + at += length; + for (let i = 0; i < bytes.length; ++i) { + vector.push(bytes[i]); + } + } + throw new Error("expected break marker."); +} +function decodeUnstructuredByteString(at, to) { + const length = decodeCount(at, to); + const offset = _offset; + at += offset; + if (to - at < length) { + throw new Error(`unstructured byte string len ${length} greater than remaining buf len.`); + } + const value = payload.subarray(at, at + length); + _offset = offset + length; + return value; +} +function decodeUnstructuredByteStringIndefinite(at, to) { + at += 1; + const vector = []; + for (const base = at; at < to; ) { + if (payload[at] === 255) { + const data2 = alloc(vector.length); + data2.set(vector, 0); + _offset = at - base + 2; + return data2; + } + const major = (payload[at] & 224) >> 5; + const minor = payload[at] & 31; + if (major !== majorUnstructuredByteString) { + throw new Error(`unexpected major type ${major} in indefinite string.`); + } + if (minor === minorIndefinite) { + throw new Error("nested indefinite string."); + } + const bytes = decodeUnstructuredByteString(at, to); + const length = _offset; + at += length; + for (let i = 0; i < bytes.length; ++i) { + vector.push(bytes[i]); + } + } + throw new Error("expected break marker."); +} +function decodeList(at, to) { + const listDataLength = decodeCount(at, to); + const offset = _offset; + at += offset; + const base = at; + const list = Array(listDataLength); + for (let i = 0; i < listDataLength; ++i) { + const item = decode(at, to); + const itemOffset = _offset; + list[i] = item; + at += itemOffset; + } + _offset = offset + (at - base); + return list; +} +function decodeListIndefinite(at, to) { + at += 1; + const list = []; + for (const base = at; at < to; ) { + if (payload[at] === 255) { + _offset = at - base + 2; + return list; + } + const item = decode(at, to); + const n = _offset; + at += n; + list.push(item); + } + throw new Error("expected break marker."); +} +function decodeMap(at, to) { + const mapDataLength = decodeCount(at, to); + const offset = _offset; + at += offset; + const base = at; + const map = {}; + for (let i = 0; i < mapDataLength; ++i) { + if (at >= to) { + throw new Error("unexpected end of map payload."); + } + const major = (payload[at] & 224) >> 5; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} for map key at index ${at}.`); + } + const key = decode(at, to); + at += _offset; + const value = decode(at, to); + at += _offset; + map[key] = value; + } + _offset = offset + (at - base); + return map; +} +function decodeMapIndefinite(at, to) { + at += 1; + const base = at; + const map = {}; + for (; at < to; ) { + if (at >= to) { + throw new Error("unexpected end of map payload."); + } + if (payload[at] === 255) { + _offset = at - base + 2; + return map; + } + const major = (payload[at] & 224) >> 5; + if (major !== majorUtf8String) { + throw new Error(`unexpected major type ${major} for map key.`); + } + const key = decode(at, to); + at += _offset; + const value = decode(at, to); + at += _offset; + map[key] = value; + } + throw new Error("expected break marker."); +} +function decodeSpecial(at, to) { + const minor = payload[at] & 31; + switch (minor) { + case specialTrue: + case specialFalse: + _offset = 1; + return minor === specialTrue; + case specialNull: + _offset = 1; + return null; + case specialUndefined: + _offset = 1; + return null; + case extendedFloat16: + if (to - at < 3) { + throw new Error("incomplete float16 at end of buf."); + } + _offset = 3; + return bytesToFloat16(payload[at + 1], payload[at + 2]); + case extendedFloat32: + if (to - at < 5) { + throw new Error("incomplete float32 at end of buf."); + } + _offset = 5; + return dataView.getFloat32(at + 1); + case extendedFloat64: + if (to - at < 9) { + throw new Error("incomplete float64 at end of buf."); + } + _offset = 9; + return dataView.getFloat64(at + 1); + default: + throw new Error(`unexpected minor value ${minor}.`); + } +} +function castBigInt(bigInt) { + if (typeof bigInt === "number") { + return bigInt; + } + const num = Number(bigInt); + if (Number.MIN_SAFE_INTEGER <= num && num <= Number.MAX_SAFE_INTEGER) { + return num; + } + return bigInt; +} + +// src/submodules/cbor/cbor-encode.ts +var import_serde2 = __nccwpck_require__(2430); +var import_util_utf82 = __nccwpck_require__(1577); +var USE_BUFFER2 = typeof Buffer !== "undefined"; +var initialSize = 2048; +var data = alloc(initialSize); +var dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength); +var cursor = 0; +function ensureSpace(bytes) { + const remaining = data.byteLength - cursor; + if (remaining < bytes) { + if (cursor < 16e6) { + resize(Math.max(data.byteLength * 4, data.byteLength + bytes)); + } else { + resize(data.byteLength + bytes + 16e6); + } + } +} +function toUint8Array() { + const out = alloc(cursor); + out.set(data.subarray(0, cursor), 0); + cursor = 0; + return out; +} +function resize(size) { + const old = data; + data = alloc(size); + if (old) { + if (old.copy) { + old.copy(data, 0, 0, old.byteLength); + } else { + data.set(old, 0); + } + } + dataView2 = new DataView(data.buffer, data.byteOffset, data.byteLength); +} +function encodeHeader(major, value) { + if (value < 24) { + data[cursor++] = major << 5 | value; + } else if (value < 1 << 8) { + data[cursor++] = major << 5 | 24; + data[cursor++] = value; + } else if (value < 1 << 16) { + data[cursor++] = major << 5 | extendedFloat16; + dataView2.setUint16(cursor, value); + cursor += 2; + } else if (value < 2 ** 32) { + data[cursor++] = major << 5 | extendedFloat32; + dataView2.setUint32(cursor, value); + cursor += 4; + } else { + data[cursor++] = major << 5 | extendedFloat64; + dataView2.setBigUint64(cursor, typeof value === "bigint" ? value : BigInt(value)); + cursor += 8; + } +} +function encode(_input) { + const encodeStack = [_input]; + while (encodeStack.length) { + const input = encodeStack.pop(); + ensureSpace(typeof input === "string" ? input.length * 4 : 64); + if (typeof input === "string") { + if (USE_BUFFER2) { + encodeHeader(majorUtf8String, Buffer.byteLength(input)); + cursor += data.write(input, cursor); + } else { + const bytes = (0, import_util_utf82.fromUtf8)(input); + encodeHeader(majorUtf8String, bytes.byteLength); + data.set(bytes, cursor); + cursor += bytes.byteLength; + } + continue; + } else if (typeof input === "number") { + if (Number.isInteger(input)) { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - 1; + if (value < 24) { + data[cursor++] = major << 5 | value; + } else if (value < 256) { + data[cursor++] = major << 5 | 24; + data[cursor++] = value; + } else if (value < 65536) { + data[cursor++] = major << 5 | extendedFloat16; + data[cursor++] = value >> 8; + data[cursor++] = value; + } else if (value < 4294967296) { + data[cursor++] = major << 5 | extendedFloat32; + dataView2.setUint32(cursor, value); + cursor += 4; + } else { + data[cursor++] = major << 5 | extendedFloat64; + dataView2.setBigUint64(cursor, BigInt(value)); + cursor += 8; + } + continue; + } + data[cursor++] = majorSpecial << 5 | extendedFloat64; + dataView2.setFloat64(cursor, input); + cursor += 8; + continue; + } else if (typeof input === "bigint") { + const nonNegative = input >= 0; + const major = nonNegative ? majorUint64 : majorNegativeInt64; + const value = nonNegative ? input : -input - BigInt(1); + const n = Number(value); + if (n < 24) { + data[cursor++] = major << 5 | n; + } else if (n < 256) { + data[cursor++] = major << 5 | 24; + data[cursor++] = n; + } else if (n < 65536) { + data[cursor++] = major << 5 | extendedFloat16; + data[cursor++] = n >> 8; + data[cursor++] = n & 255; + } else if (n < 4294967296) { + data[cursor++] = major << 5 | extendedFloat32; + dataView2.setUint32(cursor, n); + cursor += 4; + } else if (value < BigInt("18446744073709551616")) { + data[cursor++] = major << 5 | extendedFloat64; + dataView2.setBigUint64(cursor, value); + cursor += 8; + } else { + const binaryBigInt = value.toString(2); + const bigIntBytes = new Uint8Array(Math.ceil(binaryBigInt.length / 8)); + let b = value; + let i = 0; + while (bigIntBytes.byteLength - ++i >= 0) { + bigIntBytes[bigIntBytes.byteLength - i] = Number(b & BigInt(255)); + b >>= BigInt(8); + } + ensureSpace(bigIntBytes.byteLength * 2); + data[cursor++] = nonNegative ? 194 : 195; + if (USE_BUFFER2) { + encodeHeader(majorUnstructuredByteString, Buffer.byteLength(bigIntBytes)); + } else { + encodeHeader(majorUnstructuredByteString, bigIntBytes.byteLength); + } + data.set(bigIntBytes, cursor); + cursor += bigIntBytes.byteLength; + } + continue; + } else if (input === null) { + data[cursor++] = majorSpecial << 5 | specialNull; + continue; + } else if (typeof input === "boolean") { + data[cursor++] = majorSpecial << 5 | (input ? specialTrue : specialFalse); + continue; + } else if (typeof input === "undefined") { + throw new Error("@smithy/core/cbor: client may not serialize undefined value."); + } else if (Array.isArray(input)) { + for (let i = input.length - 1; i >= 0; --i) { + encodeStack.push(input[i]); + } + encodeHeader(majorList, input.length); + continue; + } else if (typeof input.byteLength === "number") { + ensureSpace(input.length * 2); + encodeHeader(majorUnstructuredByteString, input.length); + data.set(input, cursor); + cursor += input.byteLength; + continue; + } else if (typeof input === "object") { + if (input instanceof import_serde2.NumericValue) { + const decimalIndex = input.string.indexOf("."); + const exponent = decimalIndex === -1 ? 0 : decimalIndex - input.string.length + 1; + const mantissa = BigInt(input.string.replace(".", "")); + data[cursor++] = 196; + encodeStack.push(mantissa); + encodeStack.push(exponent); + encodeHeader(majorList, 2); + continue; + } + if (input[tagSymbol]) { + if ("tag" in input && "value" in input) { + encodeStack.push(input.value); + encodeHeader(majorTag, input.tag); + continue; + } else { + throw new Error( + "tag encountered with missing fields, need 'tag' and 'value', found: " + JSON.stringify(input) + ); + } + } + const keys = Object.keys(input); + for (let i = keys.length - 1; i >= 0; --i) { + const key = keys[i]; + encodeStack.push(input[key]); + encodeStack.push(key); + } + encodeHeader(majorMap, keys.length); + continue; + } + throw new Error(`data type ${input?.constructor?.name ?? typeof input} not compatible for encoding.`); + } +} + +// src/submodules/cbor/cbor.ts +var cbor = { + deserialize(payload2) { + setPayload(payload2); + return decode(0, payload2.length); + }, + serialize(input) { + try { + encode(input); + return toUint8Array(); + } catch (e) { + toUint8Array(); + throw e; + } + }, + /** + * @public + * @param size - byte length to allocate. + * + * This may be used to garbage collect the CBOR + * shared encoding buffer space, + * e.g. resizeEncodingBuffer(0); + * + * This may also be used to pre-allocate more space for + * CBOR encoding, e.g. resizeEncodingBuffer(100_000_000); + */ + resizeEncodingBuffer(size) { + resize(size); + } +}; + +// src/submodules/cbor/parseCborBody.ts +var import_protocols = __nccwpck_require__(3422); +var import_protocol_http = __nccwpck_require__(2356); +var import_util_body_length_browser = __nccwpck_require__(2098); +var parseCborBody = (streamBody, context) => { + return (0, import_protocols.collectBody)(streamBody, context).then(async (bytes) => { + if (bytes.length) { + try { + return cbor.deserialize(bytes); + } catch (e) { + Object.defineProperty(e, "$responseBodyText", { + value: context.utf8Encoder(bytes) + }); + throw e; + } + } + return {}; + }); +}; +var dateToTag = (date) => { + return tag({ + tag: 1, + value: date.getTime() / 1e3 + }); +}; +var parseCborErrorBody = async (errorBody, context) => { + const value = await parseCborBody(errorBody, context); + value.message = value.message ?? value.Message; + return value; +}; +var loadSmithyRpcV2CborErrorCode = (output, data2) => { + const sanitizeErrorCode = (rawValue) => { + let cleanValue = rawValue; + if (typeof cleanValue === "number") { + cleanValue = cleanValue.toString(); + } + if (cleanValue.indexOf(",") >= 0) { + cleanValue = cleanValue.split(",")[0]; + } + if (cleanValue.indexOf(":") >= 0) { + cleanValue = cleanValue.split(":")[0]; + } + if (cleanValue.indexOf("#") >= 0) { + cleanValue = cleanValue.split("#")[1]; + } + return cleanValue; + }; + if (data2["__type"] !== void 0) { + return sanitizeErrorCode(data2["__type"]); + } + const codeKey = Object.keys(data2).find((key) => key.toLowerCase() === "code"); + if (codeKey && data2[codeKey] !== void 0) { + return sanitizeErrorCode(data2[codeKey]); + } +}; +var checkCborResponse = (response) => { + if (String(response.headers["smithy-protocol"]).toLowerCase() !== "rpc-v2-cbor") { + throw new Error("Malformed RPCv2 CBOR response, status: " + response.statusCode); + } +}; +var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => { + const { hostname, protocol = "https", port, path: basePath } = await context.endpoint(); + const contents = { + protocol, + hostname, + port, + method: "POST", + path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path, + headers: { + // intentional copy. + ...headers + } + }; + if (resolvedHostname !== void 0) { + contents.hostname = resolvedHostname; + } + if (body !== void 0) { + contents.body = body; + try { + contents.headers["content-length"] = String((0, import_util_body_length_browser.calculateBodyLength)(body)); + } catch (e) { + } + } + return new import_protocol_http.HttpRequest(contents); +}; + +// src/submodules/cbor/SmithyRpcV2CborProtocol.ts +var import_protocols2 = __nccwpck_require__(3422); +var import_schema2 = __nccwpck_require__(6890); +var import_util_middleware = __nccwpck_require__(6324); + +// src/submodules/cbor/CborCodec.ts +var import_schema = __nccwpck_require__(6890); +var import_serde3 = __nccwpck_require__(2430); +var import_util_base64 = __nccwpck_require__(8385); +var CborCodec = class { + createSerializer() { + const serializer = new CborShapeSerializer(); + serializer.setSerdeContext(this.serdeContext); + return serializer; + } + createDeserializer() { + const deserializer = new CborShapeDeserializer(); + deserializer.setSerdeContext(this.serdeContext); + return deserializer; + } + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } +}; +var CborShapeSerializer = class { + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + write(schema, value) { + this.value = this.serialize(schema, value); + } + /** + * Recursive serializer transform that copies and prepares the user input object + * for CBOR serialization. + */ + serialize(schema, source) { + const ns = import_schema.NormalizedSchema.of(schema); + if (source == null) { + if (ns.isIdempotencyToken()) { + return (0, import_serde3.generateIdempotencyToken)(); + } + return source; + } + if (ns.isBlobSchema()) { + if (typeof source === "string") { + return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(source); + } + return source; + } + if (ns.isTimestampSchema()) { + if (typeof source === "number" || typeof source === "bigint") { + return dateToTag(new Date(Number(source) / 1e3 | 0)); + } + return dateToTag(source); + } + if (typeof source === "function" || typeof source === "object") { + const sourceObject = source; + if (ns.isListSchema() && Array.isArray(sourceObject)) { + const sparse = !!ns.getMergedTraits().sparse; + const newArray = []; + let i = 0; + for (const item of sourceObject) { + const value = this.serialize(ns.getValueSchema(), item); + if (value != null || sparse) { + newArray[i++] = value; + } + } + return newArray; + } + if (sourceObject instanceof Date) { + return dateToTag(sourceObject); + } + const newObject = {}; + if (ns.isMapSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + for (const key of Object.keys(sourceObject)) { + const value = this.serialize(ns.getValueSchema(), sourceObject[key]); + if (value != null || sparse) { + newObject[key] = value; + } + } + } else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + const value = this.serialize(memberSchema, sourceObject[key]); + if (value != null) { + newObject[key] = value; + } + } + } else if (ns.isDocumentSchema()) { + for (const key of Object.keys(sourceObject)) { + newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]); + } + } + return newObject; + } + return source; + } + flush() { + const buffer = cbor.serialize(this.value); + this.value = void 0; + return buffer; + } +}; +var CborShapeDeserializer = class { + setSerdeContext(serdeContext) { + this.serdeContext = serdeContext; + } + read(schema, bytes) { + const data2 = cbor.deserialize(bytes); + return this.readValue(schema, data2); + } + /** + * Public because it's called by the protocol implementation to deserialize errors. + * @internal + */ + readValue(_schema, value) { + const ns = import_schema.NormalizedSchema.of(_schema); + if (ns.isTimestampSchema() && typeof value === "number") { + return (0, import_serde3.parseEpochTimestamp)(value); + } + if (ns.isBlobSchema()) { + if (typeof value === "string") { + return (this.serdeContext?.base64Decoder ?? import_util_base64.fromBase64)(value); + } + return value; + } + if (typeof value === "undefined" || typeof value === "boolean" || typeof value === "number" || typeof value === "string" || typeof value === "bigint" || typeof value === "symbol") { + return value; + } else if (typeof value === "function" || typeof value === "object") { + if (value === null) { + return null; + } + if ("byteLength" in value) { + return value; + } + if (value instanceof Date) { + return value; + } + if (ns.isDocumentSchema()) { + return value; + } + if (ns.isListSchema()) { + const newArray = []; + const memberSchema = ns.getValueSchema(); + const sparse = !!ns.getMergedTraits().sparse; + for (const item of value) { + const itemValue = this.readValue(memberSchema, item); + if (itemValue != null || sparse) { + newArray.push(itemValue); + } + } + return newArray; + } + const newObject = {}; + if (ns.isMapSchema()) { + const sparse = !!ns.getMergedTraits().sparse; + const targetSchema = ns.getValueSchema(); + for (const key of Object.keys(value)) { + const itemValue = this.readValue(targetSchema, value[key]); + if (itemValue != null || sparse) { + newObject[key] = itemValue; + } + } + } else if (ns.isStructSchema()) { + for (const [key, memberSchema] of ns.structIterator()) { + newObject[key] = this.readValue(memberSchema, value[key]); + } + } + return newObject; + } else { + return value; + } + } +}; + +// src/submodules/cbor/SmithyRpcV2CborProtocol.ts +var SmithyRpcV2CborProtocol = class extends import_protocols2.RpcProtocol { + constructor({ defaultNamespace }) { + super({ defaultNamespace }); + this.codec = new CborCodec(); + this.serializer = this.codec.createSerializer(); + this.deserializer = this.codec.createDeserializer(); + } + getShapeId() { + return "smithy.protocols#rpcv2Cbor"; + } + getPayloadCodec() { + return this.codec; + } + async serializeRequest(operationSchema, input, context) { + const request = await super.serializeRequest(operationSchema, input, context); + Object.assign(request.headers, { + "content-type": this.getDefaultContentType(), + "smithy-protocol": "rpc-v2-cbor", + accept: this.getDefaultContentType() + }); + if ((0, import_schema2.deref)(operationSchema.input) === "unit") { + delete request.body; + delete request.headers["content-type"]; + } else { + if (!request.body) { + this.serializer.write(15, {}); + request.body = this.serializer.flush(); + } + try { + request.headers["content-length"] = String(request.body.byteLength); + } catch (e) { + } + } + const { service, operation } = (0, import_util_middleware.getSmithyContext)(context); + const path = `/service/${service}/operation/${operation}`; + if (request.path.endsWith("/")) { + request.path += path.slice(1); + } else { + request.path += path; + } + return request; + } + async deserializeResponse(operationSchema, context, response) { + return super.deserializeResponse(operationSchema, context, response); + } + 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, + $response: response, + $fault: response.statusCode <= 500 ? "client" : "server" + }; + const registry = import_schema2.TypeRegistry.for(namespace); + let errorSchema; + try { + errorSchema = registry.getSchema(errorName); + } catch (e) { + if (dataObject.Message) { + dataObject.message = dataObject.Message; + } + const baseExceptionSchema = import_schema2.TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace).getBaseException(); + if (baseExceptionSchema) { + const ErrorCtor = baseExceptionSchema.ctor; + throw Object.assign(new ErrorCtor({ name: errorName }), errorMetadata, dataObject); + } + throw Object.assign(new Error(errorName), errorMetadata, dataObject); + } + const ns = import_schema2.NormalizedSchema.of(errorSchema); + const message = dataObject.message ?? dataObject.Message ?? "Unknown"; + const exception = new errorSchema.ctor(message); + const output = {}; + for (const [name, member] of ns.structIterator()) { + output[name] = this.deserializer.readValue(member, dataObject[name]); + } + throw Object.assign( + exception, + errorMetadata, + { + $fault: ns.getMergedTraits().error, + message + }, + output + ); + } + getDefaultContentType() { + return "application/cbor"; + } +}; +// Annotate the CommonJS export names for ESM import in node: +0 && (0); + + /***/ }), /***/ 6579: @@ -14911,11 +16041,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/event-streams/index.ts -var event_streams_exports = {}; -__export(event_streams_exports, { +var index_exports = {}; +__export(index_exports, { EventStreamSerde: () => EventStreamSerde }); -module.exports = __toCommonJS(event_streams_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/event-streams/EventStreamSerde.ts var import_schema = __nccwpck_require__(6890); @@ -15187,8 +16317,8 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/protocols/index.ts -var protocols_exports = {}; -__export(protocols_exports, { +var index_exports = {}; +__export(index_exports, { FromStringShapeDeserializer: () => FromStringShapeDeserializer, HttpBindingProtocol: () => HttpBindingProtocol, HttpInterceptingShapeDeserializer: () => HttpInterceptingShapeDeserializer, @@ -15203,7 +16333,7 @@ __export(protocols_exports, { requestBuilder: () => requestBuilder, resolvedPath: () => resolvedPath }); -module.exports = __toCommonJS(protocols_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/protocols/collect-stream-body.ts var import_util_stream = __nccwpck_require__(4252); @@ -15367,6 +16497,11 @@ var HttpProtocol = class { ); } async deserializeHttpMessage(schema, context, response, arg4, arg5) { + void schema; + void context; + void response; + void arg4; + void arg5; return []; } getEventStreamMarshaller() { @@ -16093,8 +17228,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/schema/index.ts -var schema_exports = {}; -__export(schema_exports, { +var index_exports = {}; +__export(index_exports, { ErrorSchema: () => ErrorSchema, ListSchema: () => ListSchema, MapSchema: () => MapSchema, @@ -16116,7 +17251,7 @@ __export(schema_exports, { sim: () => sim, struct: () => struct }); -module.exports = __toCommonJS(schema_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/schema/deref.ts var deref = (schemaRef) => { @@ -16964,8 +18099,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/submodules/serde/index.ts -var serde_exports = {}; -__export(serde_exports, { +var index_exports = {}; +__export(index_exports, { LazyJsonString: () => LazyJsonString, NumericValue: () => NumericValue, copyDocumentWithTransform: () => copyDocumentWithTransform, @@ -17006,7 +18141,7 @@ __export(serde_exports, { strictParseLong: () => strictParseLong, strictParseShort: () => strictParseShort }); -module.exports = __toCommonJS(serde_exports); +module.exports = __toCommonJS(index_exports); // src/submodules/serde/copyDocumentWithTransform.ts var copyDocumentWithTransform = (source, schemaRef, transform = (_) => _) => source; @@ -17642,8 +18777,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { DEFAULT_MAX_RETRIES: () => DEFAULT_MAX_RETRIES, DEFAULT_TIMEOUT: () => DEFAULT_TIMEOUT, ENV_CMDS_AUTH_TOKEN: () => ENV_CMDS_AUTH_TOKEN, @@ -17656,7 +18791,7 @@ __export(src_exports, { httpRequest: () => httpRequest, providerConfigFromInit: () => providerConfigFromInit }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/fromContainerMetadata.ts @@ -17839,8 +18974,8 @@ var Endpoint = /* @__PURE__ */ ((Endpoint2) => { var ENV_ENDPOINT_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT"; var CONFIG_ENDPOINT_NAME = "ec2_metadata_service_endpoint"; var ENDPOINT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_NAME], + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[ENV_ENDPOINT_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[CONFIG_ENDPOINT_NAME], "configFileSelector"), default: void 0 }; @@ -17855,8 +18990,8 @@ var EndpointMode = /* @__PURE__ */ ((EndpointMode2) => { var ENV_ENDPOINT_MODE_NAME = "AWS_EC2_METADATA_SERVICE_ENDPOINT_MODE"; var CONFIG_ENDPOINT_MODE_NAME = "ec2_metadata_service_endpoint_mode"; var ENDPOINT_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_ENDPOINT_MODE_NAME], - configFileSelector: (profile) => profile[CONFIG_ENDPOINT_MODE_NAME], + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[ENV_ENDPOINT_MODE_NAME], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[CONFIG_ENDPOINT_MODE_NAME], "configFileSelector"), default: "IPv4" /* IPv4 */ }; @@ -17936,7 +19071,7 @@ var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { let fallbackBlockedFromProcessEnv = false; const configValue = await (0, import_node_config_provider.loadConfig)( { - environmentVariableSelector: (env) => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => { const envValue = env[AWS_EC2_METADATA_V1_DISABLED]; fallbackBlockedFromProcessEnv = !!envValue && envValue !== "false"; if (envValue === void 0) { @@ -17946,12 +19081,12 @@ var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { ); } return fallbackBlockedFromProcessEnv; - }, - configFileSelector: (profile2) => { + }, "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile2) => { const profileValue = profile2[PROFILE_AWS_EC2_METADATA_V1_DISABLED]; fallbackBlockedFromProfile = !!profileValue && profileValue !== "false"; return fallbackBlockedFromProfile; - }, + }, "configFileSelector"), default: false }, { @@ -17962,8 +19097,7 @@ var getInstanceMetadataProvider = /* @__PURE__ */ __name((init = {}) => { const causes = []; if (init.ec2MetadataV1Disabled) causes.push("credential provider initialization (runtime option ec2MetadataV1Disabled)"); - if (fallbackBlockedFromProfile) - causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); + if (fallbackBlockedFromProfile) causes.push(`config file profile (${PROFILE_AWS_EC2_METADATA_V1_DISABLED})`); if (fallbackBlockedFromProcessEnv) causes.push(`process environment variable (${AWS_EC2_METADATA_V1_DISABLED})`); throw new InstanceMetadataV1FallbackError( @@ -18082,13 +19216,13 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { FetchHttpHandler: () => FetchHttpHandler, keepAliveSupport: () => keepAliveSupport, streamCollector: () => streamCollector }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/fetch-http-handler.ts var import_protocol_http = __nccwpck_require__(2356); @@ -18349,11 +19483,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { Hash: () => Hash }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_util_buffer_from = __nccwpck_require__(4151); var import_util_utf8 = __nccwpck_require__(1577); var import_buffer = __nccwpck_require__(181); @@ -18421,11 +19555,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { isArrayBuffer: () => isArrayBuffer }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var isArrayBuffer = /* @__PURE__ */ __name((arg) => typeof ArrayBuffer === "function" && arg instanceof ArrayBuffer || Object.prototype.toString.call(arg) === "[object ArrayBuffer]", "isArrayBuffer"); // Annotate the CommonJS export names for ESM import in node: @@ -18458,13 +19592,13 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { contentLengthMiddleware: () => contentLengthMiddleware, contentLengthMiddlewareOptions: () => contentLengthMiddlewareOptions, getContentLengthPlugin: () => getContentLengthPlugin }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_protocol_http = __nccwpck_require__(2356); var CONTENT_LENGTH_HEADER = "content-length"; function contentLengthMiddleware(bodyLengthChecker) { @@ -18497,9 +19631,9 @@ var contentLengthMiddlewareOptions = { override: true }; var getContentLengthPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions); - } + }, "applyToStack") }), "getContentLengthPlugin"); // Annotate the CommonJS export names for ESM import in node: @@ -18590,8 +19724,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { endpointMiddleware: () => endpointMiddleware, endpointMiddlewareOptions: () => endpointMiddlewareOptions, getEndpointFromInstructions: () => getEndpointFromInstructions, @@ -18601,7 +19735,7 @@ __export(src_exports, { resolveParams: () => resolveParams, toEndpointV1: () => toEndpointV1 }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/service-customizations/s3.ts var resolveParamsForS3 = /* @__PURE__ */ __name(async (endpointParams) => { @@ -18807,7 +19941,7 @@ var endpointMiddlewareOptions = { toMiddleware: import_middleware_serde.serializerMiddlewareOption.name }; var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo( endpointMiddleware({ config, @@ -18815,7 +19949,7 @@ var getEndpointPlugin = /* @__PURE__ */ __name((config, instructions) => ({ }), endpointMiddlewareOptions ); - } + }, "applyToStack") }), "getEndpointPlugin"); // src/resolveEndpointConfig.ts @@ -18886,8 +20020,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, CONFIG_MAX_ATTEMPTS: () => CONFIG_MAX_ATTEMPTS, CONFIG_RETRY_MODE: () => CONFIG_RETRY_MODE, @@ -18907,7 +20041,7 @@ __export(src_exports, { retryMiddleware: () => retryMiddleware, retryMiddlewareOptions: () => retryMiddlewareOptions }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/AdaptiveRetryStrategy.ts @@ -18962,12 +20096,9 @@ var defaultRetryDecider = /* @__PURE__ */ __name((error) => { // src/util.ts var asSdkError = /* @__PURE__ */ __name((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); + 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}`); }, "asSdkError"); @@ -19046,15 +20177,12 @@ var StandardRetryStrategy = class { } }; var getDelayFromRetryAfterHeader = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; + if (!import_protocol_http.HttpResponse.isInstance(response)) return; const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; + if (!retryAfterHeaderName) return; const retryAfter = response.headers[retryAfterHeaderName]; const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return retryAfterSeconds * 1e3; + if (!Number.isNaN(retryAfterSeconds)) return retryAfterSeconds * 1e3; const retryAfterDate = new Date(retryAfter); return retryAfterDate.getTime() - Date.now(); }, "getDelayFromRetryAfterHeader"); @@ -19072,12 +20200,12 @@ var AdaptiveRetryStrategy = class extends StandardRetryStrategy { } async retry(next, args) { return super.retry(next, args, { - beforeRequest: async () => { + beforeRequest: /* @__PURE__ */ __name(async () => { return this.rateLimiter.getSendToken(); - }, - afterRequest: (response) => { + }, "beforeRequest"), + afterRequest: /* @__PURE__ */ __name((response) => { this.rateLimiter.updateClientSendingRate(response); - } + }, "afterRequest") }); } }; @@ -19088,26 +20216,24 @@ var import_util_middleware = __nccwpck_require__(6324); var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS"; var CONFIG_MAX_ATTEMPTS = "max_attempts"; var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => { const value = env[ENV_MAX_ATTEMPTS]; - if (!value) - return void 0; + if (!value) return void 0; 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) => { + }, "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => { const value = profile[CONFIG_MAX_ATTEMPTS]; - if (!value) - return void 0; + if (!value) return void 0; 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; - }, + }, "configFileSelector"), default: import_util_retry.DEFAULT_MAX_ATTEMPTS }; var resolveRetryConfig = /* @__PURE__ */ __name((input) => { @@ -19115,7 +20241,7 @@ var resolveRetryConfig = /* @__PURE__ */ __name((input) => { const maxAttempts = (0, import_util_middleware.normalizeProvider)(_maxAttempts ?? import_util_retry.DEFAULT_MAX_ATTEMPTS); return Object.assign(input, { maxAttempts, - retryStrategy: async () => { + retryStrategy: /* @__PURE__ */ __name(async () => { if (retryStrategy) { return retryStrategy; } @@ -19124,14 +20250,14 @@ var resolveRetryConfig = /* @__PURE__ */ __name((input) => { return new import_util_retry.AdaptiveRetryStrategy(maxAttempts); } return new import_util_retry.StandardRetryStrategy(maxAttempts); - } + }, "retryStrategy") }); }, "resolveRetryConfig"); var ENV_RETRY_MODE = "AWS_RETRY_MODE"; var CONFIG_RETRY_MODE = "retry_mode"; var NODE_RETRY_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => env[ENV_RETRY_MODE], - configFileSelector: (profile) => profile[CONFIG_RETRY_MODE], + environmentVariableSelector: /* @__PURE__ */ __name((env) => env[ENV_RETRY_MODE], "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => profile[CONFIG_RETRY_MODE], "configFileSelector"), default: import_util_retry.DEFAULT_RETRY_MODE }; @@ -19154,9 +20280,9 @@ var omitRetryHeadersMiddlewareOptions = { override: true }; var getOmitRetryHeadersPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.addRelativeTo(omitRetryHeadersMiddleware(), omitRetryHeadersMiddlewareOptions); - } + }, "applyToStack") }), "getOmitRetryHeadersPlugin"); // src/retryMiddleware.ts @@ -19235,12 +20361,9 @@ var getRetryErrorInfo = /* @__PURE__ */ __name((error) => { return errorInfo; }, "getRetryErrorInfo"); var getRetryErrorType = /* @__PURE__ */ __name((error) => { - if ((0, import_service_error_classification.isThrottlingError)(error)) - return "THROTTLING"; - if ((0, import_service_error_classification.isTransientError)(error)) - return "TRANSIENT"; - if ((0, import_service_error_classification.isServerError)(error)) - return "SERVER_ERROR"; + if ((0, import_service_error_classification.isThrottlingError)(error)) return "THROTTLING"; + if ((0, import_service_error_classification.isTransientError)(error)) return "TRANSIENT"; + if ((0, import_service_error_classification.isServerError)(error)) return "SERVER_ERROR"; return "CLIENT_ERROR"; }, "getRetryErrorType"); var retryMiddlewareOptions = { @@ -19251,20 +20374,17 @@ var retryMiddlewareOptions = { override: true }; var getRetryPlugin = /* @__PURE__ */ __name((options) => ({ - applyToStack: (clientStack) => { + applyToStack: /* @__PURE__ */ __name((clientStack) => { clientStack.add(retryMiddleware(options), retryMiddlewareOptions); - } + }, "applyToStack") }), "getRetryPlugin"); var getRetryAfterHint = /* @__PURE__ */ __name((response) => { - if (!import_protocol_http.HttpResponse.isInstance(response)) - return; + if (!import_protocol_http.HttpResponse.isInstance(response)) return; const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after"); - if (!retryAfterHeaderName) - return; + if (!retryAfterHeaderName) return; const retryAfter = response.headers[retryAfterHeaderName]; const retryAfterSeconds = Number(retryAfter); - if (!Number.isNaN(retryAfterSeconds)) - return new Date(retryAfterSeconds * 1e3); + if (!Number.isNaN(retryAfterSeconds)) return new Date(retryAfterSeconds * 1e3); const retryAfterDate = new Date(retryAfter); return retryAfterDate; }, "getRetryAfterHint"); @@ -19314,15 +20434,15 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { deserializerMiddleware: () => deserializerMiddleware, deserializerMiddlewareOption: () => deserializerMiddlewareOption, getSerdePlugin: () => getSerdePlugin, serializerMiddleware: () => serializerMiddleware, serializerMiddlewareOption: () => serializerMiddlewareOption }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/deserializerMiddleware.ts var import_protocol_http = __nccwpck_require__(2356); @@ -19406,10 +20526,10 @@ var serializerMiddlewareOption = { }; function getSerdePlugin(config, serializer, deserializer) { return { - applyToStack: (commandStack) => { + applyToStack: /* @__PURE__ */ __name((commandStack) => { commandStack.add(deserializerMiddleware(config, deserializer), deserializerMiddlewareOption); commandStack.add(serializerMiddleware(config, serializer), serializerMiddlewareOption); - } + }, "applyToStack") }; } __name(getSerdePlugin, "getSerdePlugin"); @@ -19444,11 +20564,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { constructStack: () => constructStack }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/MiddlewareStack.ts var getAllAliases = /* @__PURE__ */ __name((name, aliases) => { @@ -19591,7 +20711,7 @@ var constructStack = /* @__PURE__ */ __name(() => { return mainChain; }, "getMiddlewareList"); const stack = { - add: (middleware, options = {}) => { + add: /* @__PURE__ */ __name((middleware, options = {}) => { const { name, override, aliases: _aliases } = options; const entry = { step: "initialize", @@ -19602,8 +20722,7 @@ var constructStack = /* @__PURE__ */ __name(() => { 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)}'`); + if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); for (const alias of aliases) { const toOverrideIndex = absoluteEntries.findIndex( (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) @@ -19625,8 +20744,8 @@ var constructStack = /* @__PURE__ */ __name(() => { } } absoluteEntries.push(entry); - }, - addRelativeTo: (middleware, options) => { + }, "add"), + addRelativeTo: /* @__PURE__ */ __name((middleware, options) => { const { name, override, aliases: _aliases } = options; const entry = { middleware, @@ -19635,8 +20754,7 @@ var constructStack = /* @__PURE__ */ __name(() => { 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)}'`); + if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`); for (const alias of aliases) { const toOverrideIndex = relativeEntries.findIndex( (entry2) => entry2.name === alias || entry2.aliases?.some((a) => a === alias) @@ -19658,18 +20776,16 @@ var constructStack = /* @__PURE__ */ __name(() => { } } relativeEntries.push(entry); - }, - clone: () => cloneTo(constructStack()), - use: (plugin) => { + }, "addRelativeTo"), + clone: /* @__PURE__ */ __name(() => cloneTo(constructStack()), "clone"), + use: /* @__PURE__ */ __name((plugin) => { plugin.applyToStack(stack); - }, - remove: (toRemove) => { - if (typeof toRemove === "string") - return removeByName(toRemove); - else - return removeByReference(toRemove); - }, - removeByTag: (toRemove) => { + }, "use"), + remove: /* @__PURE__ */ __name((toRemove) => { + if (typeof toRemove === "string") return removeByName(toRemove); + else return removeByReference(toRemove); + }, "remove"), + removeByTag: /* @__PURE__ */ __name((toRemove) => { let isRemoved = false; const filterCb = /* @__PURE__ */ __name((entry) => { const { tags, name, aliases: _aliases } = entry; @@ -19686,28 +20802,27 @@ var constructStack = /* @__PURE__ */ __name(() => { absoluteEntries = absoluteEntries.filter(filterCb); relativeEntries = relativeEntries.filter(filterCb); return isRemoved; - }, - concat: (from) => { + }, "removeByTag"), + concat: /* @__PURE__ */ __name((from) => { const cloned = cloneTo(constructStack()); cloned.use(from); cloned.identifyOnResolve( identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false) ); return cloned; - }, + }, "concat"), applyToStack: cloneTo, - identify: () => { + identify: /* @__PURE__ */ __name(() => { return getMiddlewareList(true).map((mw) => { const step = mw.step ?? mw.relation + " " + mw.toMiddleware; return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step; }); - }, + }, "identify"), identifyOnResolve(toggle) { - if (typeof toggle === "boolean") - identifyOnResolve = toggle; + if (typeof toggle === "boolean") identifyOnResolve = toggle; return identifyOnResolve; }, - resolve: (handler, context) => { + resolve: /* @__PURE__ */ __name((handler, context) => { for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) { handler = middleware(handler, context); } @@ -19715,7 +20830,7 @@ var constructStack = /* @__PURE__ */ __name(() => { console.log(stack.identify()); } return handler; - } + }, "resolve") }; return stack; }, "constructStack"); @@ -19762,11 +20877,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { loadConfig: () => loadConfig }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/configLoader.ts @@ -20686,8 +21801,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { CredentialsProviderError: () => CredentialsProviderError, ProviderError: () => ProviderError, TokenProviderError: () => TokenProviderError, @@ -20695,7 +21810,7 @@ __export(src_exports, { fromStatic: () => fromStatic, memoize: () => memoize }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/ProviderError.ts var ProviderError = class _ProviderError extends Error { @@ -21173,11 +22288,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { parseQueryString: () => parseQueryString }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); function parseQueryString(querystring) { const query = {}; querystring = querystring.replace(/^\?/, ""); @@ -21231,8 +22346,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { isBrowserNetworkError: () => isBrowserNetworkError, isClockSkewCorrectedError: () => isClockSkewCorrectedError, isClockSkewError: () => isClockSkewError, @@ -21241,7 +22356,7 @@ __export(src_exports, { isThrottlingError: () => isThrottlingError, isTransientError: () => isTransientError }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/constants.ts var CLOCK_SKEW_ERROR_CODES = [ @@ -21415,8 +22530,8 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR, DEFAULT_PROFILE: () => DEFAULT_PROFILE, ENV_PROFILE: () => ENV_PROFILE, @@ -21425,8 +22540,8 @@ __export(src_exports, { loadSsoSessionData: () => loadSsoSessionData, parseKnownFiles: () => parseKnownFiles }); -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(4172), module.exports); +module.exports = __toCommonJS(index_exports); +__reExport(index_exports, __nccwpck_require__(4172), module.exports); // src/getProfileName.ts var ENV_PROFILE = "AWS_PROFILE"; @@ -21434,8 +22549,8 @@ var DEFAULT_PROFILE = "default"; var getProfileName = /* @__PURE__ */ __name((init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE, "getProfileName"); // src/index.ts -__reExport(src_exports, __nccwpck_require__(269), module.exports); -__reExport(src_exports, __nccwpck_require__(1326), module.exports); +__reExport(index_exports, __nccwpck_require__(269), module.exports); +__reExport(index_exports, __nccwpck_require__(1326), module.exports); // src/loadSharedConfigFiles.ts @@ -22287,8 +23402,8 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { Client: () => Client, Command: () => Command, NoOpLogger: () => NoOpLogger, @@ -22316,7 +23431,7 @@ __export(src_exports, { throwDefaultError: () => throwDefaultError, withBaseException: () => withBaseException }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/client.ts var import_middleware_stack = __nccwpck_require__(9208); @@ -22464,10 +23579,10 @@ var Command = class { }; var ClassBuilder = class { constructor() { - this._init = () => { - }; + this._init = /* @__PURE__ */ __name(() => { + }, "_init"); this._ep = {}; - this._middlewareFn = () => []; + this._middlewareFn = /* @__PURE__ */ __name(() => [], "_middlewareFn"); this._commandName = ""; this._clientName = ""; this._additionalContext = {}; @@ -22622,8 +23737,7 @@ var createAggregatedClient = /* @__PURE__ */ __name((commands, Client2) => { if (typeof optionsOrCb === "function") { this.send(command2, optionsOrCb); } else if (typeof cb === "function") { - if (typeof optionsOrCb !== "object") - throw new Error(`Expected http options but got ${typeof optionsOrCb}`); + if (typeof optionsOrCb !== "object") throw new Error(`Expected http options but got ${typeof optionsOrCb}`); this.send(command2, optionsOrCb || {}, cb); } else { return this.send(command2, optionsOrCb); @@ -22650,8 +23764,7 @@ var ServiceException = class _ServiceException extends Error { * Checks if a value is an instance of ServiceException (duck typed) */ static isInstance(value) { - if (!value) - return false; + if (!value) return false; const candidate = value; return _ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server"); } @@ -22659,8 +23772,7 @@ var ServiceException = class _ServiceException extends Error { * Custom instanceof check to support the operator for ServiceException base class */ static [Symbol.hasInstance](instance) { - if (!instance) - return false; + if (!instance) return false; const candidate = instance; if (this === _ServiceException) { return _ServiceException.isInstance(instance); @@ -22758,8 +23870,8 @@ var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => { continue; } checksumAlgorithms.push({ - algorithmId: () => algorithmId, - checksumConstructor: () => runtimeConfig[algorithmId] + algorithmId: /* @__PURE__ */ __name(() => algorithmId, "algorithmId"), + checksumConstructor: /* @__PURE__ */ __name(() => runtimeConfig[algorithmId], "checksumConstructor") }); } return { @@ -22979,7 +24091,7 @@ var _json = /* @__PURE__ */ __name((obj) => { }, "_json"); // src/index.ts -__reExport(src_exports, __nccwpck_require__(2430), module.exports); +__reExport(index_exports, __nccwpck_require__(2430), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -23151,11 +24263,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { parseUrl: () => parseUrl }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_querystring_parser = __nccwpck_require__(8822); var parseUrl = /* @__PURE__ */ __name((url) => { if (typeof url === "string") { @@ -23225,10 +24337,10 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -module.exports = __toCommonJS(src_exports); -__reExport(src_exports, __nccwpck_require__(2674), module.exports); -__reExport(src_exports, __nccwpck_require__(4871), module.exports); +var index_exports = {}; +module.exports = __toCommonJS(index_exports); +__reExport(index_exports, __nccwpck_require__(2674), module.exports); +__reExport(index_exports, __nccwpck_require__(4871), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -23287,11 +24399,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { calculateBodyLength: () => calculateBodyLength }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/calculateBodyLength.ts var TEXT_ENCODER = typeof TextEncoder == "function" ? new TextEncoder() : null; @@ -23303,12 +24415,9 @@ var calculateBodyLength = /* @__PURE__ */ __name((body) => { let len = body.length; for (let i = len - 1; i >= 0; i--) { const code = body.charCodeAt(i); - if (code > 127 && code <= 2047) - len++; - else if (code > 2047 && code <= 65535) - len += 2; - if (code >= 56320 && code <= 57343) - i--; + if (code > 127 && code <= 2047) len++; + else if (code > 2047 && code <= 65535) len += 2; + if (code >= 56320 && code <= 57343) i--; } return len; } else if (typeof body.byteLength === "number") { @@ -23349,11 +24458,11 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { calculateBodyLength: () => calculateBodyLength }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/calculateBodyLength.ts var import_fs = __nccwpck_require__(9896); @@ -23407,12 +24516,12 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { fromArrayBuffer: () => fromArrayBuffer, fromString: () => fromString }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var import_is_array_buffer = __nccwpck_require__(6130); var import_buffer = __nccwpck_require__(181); var fromArrayBuffer = /* @__PURE__ */ __name((input, offset = 0, length = input.byteLength - offset) => { @@ -23458,29 +24567,25 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { SelectorType: () => SelectorType, booleanSelector: () => booleanSelector, numberSelector: () => numberSelector }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/booleanSelector.ts var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; - if (obj[key] === "true") - return true; - if (obj[key] === "false") - return false; + if (!(key in obj)) return void 0; + 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]}.`); }, "booleanSelector"); // src/numberSelector.ts var numberSelector = /* @__PURE__ */ __name((obj, key, type) => { - if (!(key in obj)) - return void 0; + if (!(key in obj)) return void 0; const numberValue = parseInt(obj[key], 10); if (Number.isNaN(numberValue)) { throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`); @@ -23535,11 +24640,11 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { resolveDefaultsModeConfig: () => resolveDefaultsModeConfig }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/resolveDefaultsModeConfig.ts var import_config_resolver = __nccwpck_require__(9316); @@ -23558,12 +24663,12 @@ var IMDS_REGION_PATH = "/latest/meta-data/placement/region"; var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE"; var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode"; var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = { - environmentVariableSelector: (env) => { + environmentVariableSelector: /* @__PURE__ */ __name((env) => { return env[AWS_DEFAULTS_MODE_ENV]; - }, - configFileSelector: (profile) => { + }, "environmentVariableSelector"), + configFileSelector: /* @__PURE__ */ __name((profile) => { return profile[AWS_DEFAULTS_MODE_CONFIG]; - }, + }, "configFileSelector"), default: "legacy" }; @@ -23649,8 +24754,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { EndpointCache: () => EndpointCache, EndpointError: () => EndpointError, customEndpointFunctions: () => customEndpointFunctions, @@ -23658,7 +24763,7 @@ __export(src_exports, { isValidHostLabel: () => isValidHostLabel, resolveEndpoint: () => resolveEndpoint }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/cache/EndpointCache.ts var EndpointCache = class { @@ -24193,12 +25298,12 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { fromHex: () => fromHex, toHex: () => toHex }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); var SHORT_TO_HEX = {}; var HEX_TO_SHORT = {}; for (let i = 0; i < 256; i++) { @@ -24264,12 +25369,12 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { getSmithyContext: () => getSmithyContext, normalizeProvider: () => normalizeProvider }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/getSmithyContext.ts var import_types = __nccwpck_require__(690); @@ -24277,8 +25382,7 @@ var getSmithyContext = /* @__PURE__ */ __name((context) => context[import_types. // src/normalizeProvider.ts var normalizeProvider = /* @__PURE__ */ __name((input) => { - if (typeof input === "function") - return input; + if (typeof input === "function") return input; const promisified = Promise.resolve(input); return () => promisified; }, "normalizeProvider"); @@ -24313,8 +25417,8 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { AdaptiveRetryStrategy: () => AdaptiveRetryStrategy, ConfiguredRetryStrategy: () => ConfiguredRetryStrategy, DEFAULT_MAX_ATTEMPTS: () => DEFAULT_MAX_ATTEMPTS, @@ -24332,7 +25436,7 @@ __export(src_exports, { THROTTLING_RETRY_DELAY_BASE: () => THROTTLING_RETRY_DELAY_BASE, TIMEOUT_RETRY_COST: () => TIMEOUT_RETRY_COST }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/config.ts var RETRY_MODES = /* @__PURE__ */ ((RETRY_MODES2) => { @@ -25160,11 +26264,11 @@ var __reExport = (target, mod, secondTarget) => (__copyProps(target, mod, "defau var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { Uint8ArrayBlobAdapter: () => Uint8ArrayBlobAdapter }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/blob/transforms.ts var import_util_base64 = __nccwpck_require__(8385); @@ -25219,14 +26323,14 @@ var Uint8ArrayBlobAdapter = class _Uint8ArrayBlobAdapter extends Uint8Array { }; // src/index.ts -__reExport(src_exports, __nccwpck_require__(1775), module.exports); -__reExport(src_exports, __nccwpck_require__(5639), module.exports); -__reExport(src_exports, __nccwpck_require__(2005), module.exports); -__reExport(src_exports, __nccwpck_require__(6522), module.exports); -__reExport(src_exports, __nccwpck_require__(8412), module.exports); -__reExport(src_exports, __nccwpck_require__(7201), module.exports); -__reExport(src_exports, __nccwpck_require__(2108), module.exports); -__reExport(src_exports, __nccwpck_require__(4414), module.exports); +__reExport(index_exports, __nccwpck_require__(1775), module.exports); +__reExport(index_exports, __nccwpck_require__(5639), module.exports); +__reExport(index_exports, __nccwpck_require__(2005), module.exports); +__reExport(index_exports, __nccwpck_require__(6522), module.exports); +__reExport(index_exports, __nccwpck_require__(8412), module.exports); +__reExport(index_exports, __nccwpck_require__(7201), module.exports); +__reExport(index_exports, __nccwpck_require__(2108), module.exports); +__reExport(index_exports, __nccwpck_require__(4414), module.exports); // Annotate the CommonJS export names for ESM import in node: 0 && (0); @@ -25509,13 +26613,13 @@ var __copyProps = (to, from, except, desc) => { var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // src/index.ts -var src_exports = {}; -__export(src_exports, { +var index_exports = {}; +__export(index_exports, { fromUtf8: () => fromUtf8, toUint8Array: () => toUint8Array, toUtf8: () => toUtf8 }); -module.exports = __toCommonJS(src_exports); +module.exports = __toCommonJS(index_exports); // src/fromUtf8.ts var import_util_buffer_from = __nccwpck_require__(4151); @@ -52819,7 +53923,7 @@ module.exports = parseParams /***/ ((module) => { "use strict"; -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.873.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.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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.883.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.883.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.876.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.883.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.879.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.883.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.9.2","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.21","@smithy/middleware-retry":"^4.1.22","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.5.2","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.29","@smithy/util-defaults-mode-node":"^4.0.29","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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"}}'); /***/ }), @@ -52827,7 +53931,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sso","descrip /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.873.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"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.873.0","@aws-sdk/credential-provider-node":"3.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","description":"AWS SDK for JavaScript Sts Client for Node.js, Browser and React Native","version":"3.883.0","scripts":{"build":"concurrently \'yarn:build:cjs\' \'yarn:build:es\' \'yarn:build:types\'","build:cjs":"node ../../scripts/compilation/inline client-sts","build:es":"tsc -p tsconfig.es.json","build:include:deps":"lerna run --scope $npm_package_name --include-dependencies build","build:types":"rimraf ./dist-types tsconfig.types.tsbuildinfo && 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 sts","test":"yarn g:vitest run","test:watch":"yarn g:vitest watch"},"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.883.0","@aws-sdk/credential-provider-node":"3.883.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.876.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.883.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.879.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.883.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.9.2","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.21","@smithy/middleware-retry":"^4.1.22","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.5.2","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.29","@smithy/util-defaults-mode-node":"^4.0.29","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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-sts","repository":{"type":"git","url":"https://github.com/aws/aws-sdk-js-v3.git","directory":"clients/client-sts"}}'); /***/ }), @@ -52835,7 +53939,7 @@ module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/client-sts","descrip /***/ ((module) => { "use strict"; -module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.873.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"},"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.873.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.873.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.873.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.873.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.873.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.8.0","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.18","@smithy/middleware-retry":"^4.1.19","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.4.10","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.26","@smithy/util-defaults-mode-node":"^4.0.26","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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"}}}'); +module.exports = /*#__PURE__*/JSON.parse('{"name":"@aws-sdk/nested-clients","version":"3.883.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"},"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.883.0","@aws-sdk/middleware-host-header":"3.873.0","@aws-sdk/middleware-logger":"3.876.0","@aws-sdk/middleware-recursion-detection":"3.873.0","@aws-sdk/middleware-user-agent":"3.883.0","@aws-sdk/region-config-resolver":"3.873.0","@aws-sdk/types":"3.862.0","@aws-sdk/util-endpoints":"3.879.0","@aws-sdk/util-user-agent-browser":"3.873.0","@aws-sdk/util-user-agent-node":"3.883.0","@smithy/config-resolver":"^4.1.5","@smithy/core":"^3.9.2","@smithy/fetch-http-handler":"^5.1.1","@smithy/hash-node":"^4.0.5","@smithy/invalid-dependency":"^4.0.5","@smithy/middleware-content-length":"^4.0.5","@smithy/middleware-endpoint":"^4.1.21","@smithy/middleware-retry":"^4.1.22","@smithy/middleware-serde":"^4.0.9","@smithy/middleware-stack":"^4.0.5","@smithy/node-config-provider":"^4.1.4","@smithy/node-http-handler":"^4.1.1","@smithy/protocol-http":"^5.1.3","@smithy/smithy-client":"^4.5.2","@smithy/types":"^4.3.2","@smithy/url-parser":"^4.0.5","@smithy/util-base64":"^4.0.0","@smithy/util-body-length-browser":"^4.0.0","@smithy/util-body-length-node":"^4.0.0","@smithy/util-defaults-mode-browser":"^4.0.29","@smithy/util-defaults-mode-node":"^4.0.29","@smithy/util-endpoints":"^3.0.7","@smithy/util-middleware":"^4.0.5","@smithy/util-retry":"^4.0.7","@smithy/util-utf8":"^4.0.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"}}}'); /***/ })