mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-11-30 19:54:26 +01:00
chore: Update dist
This commit is contained in:
1 parent
6e755816a0
commit
150cf7fc73
2 files changed
+160
-83
No files matched your search
+7
-7
@@ -433,8 +433,8 @@ Apache License
|
|||||||
The following npm packages may be included in this product:
|
The following npm packages may be included in this product:
|
||||||
|
|
||||||
- @aws-sdk/signature-v4-multi-region@3.996.46
|
- @aws-sdk/signature-v4-multi-region@3.996.46
|
||||||
- @smithy/core@3.33.3
|
- @smithy/core@3.35.0
|
||||||
- @smithy/types@4.18.0
|
- @smithy/types@4.19.0
|
||||||
|
|
||||||
These packages each contain the following license:
|
These packages each contain the following license:
|
||||||
|
|
||||||
@@ -832,7 +832,7 @@ SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|||||||
|
|
||||||
The following npm package may be included in this product:
|
The following npm package may be included in this product:
|
||||||
|
|
||||||
- @aws-sdk/core@3.978.0
|
- @aws-sdk/core@3.978.1
|
||||||
|
|
||||||
This package contains the following license:
|
This package contains the following license:
|
||||||
|
|
||||||
@@ -1042,16 +1042,16 @@ Apache License
|
|||||||
|
|
||||||
The following npm packages may be included in this product:
|
The following npm packages may be included in this product:
|
||||||
|
|
||||||
- @aws-sdk/credential-provider-env@3.972.71
|
- @aws-sdk/credential-provider-env@3.972.72
|
||||||
- @aws-sdk/credential-provider-ini@3.973.16
|
- @aws-sdk/credential-provider-ini@3.973.16
|
||||||
- @aws-sdk/credential-provider-node@3.972.83
|
- @aws-sdk/credential-provider-node@3.972.83
|
||||||
- @aws-sdk/token-providers@3.1129.0
|
- @aws-sdk/token-providers@3.1129.0
|
||||||
- @aws-sdk/types@3.974.5
|
- @aws-sdk/types@3.974.6
|
||||||
- @aws-sdk/xml-builder@3.972.40
|
- @aws-sdk/xml-builder@3.972.41
|
||||||
- @smithy/credential-provider-imds@4.5.2
|
- @smithy/credential-provider-imds@4.5.2
|
||||||
- @smithy/fetch-http-handler@5.7.2
|
- @smithy/fetch-http-handler@5.7.2
|
||||||
- @smithy/node-http-handler@4.12.1
|
- @smithy/node-http-handler@4.12.1
|
||||||
- @smithy/signature-v4@5.6.12
|
- @smithy/signature-v4@5.7.4
|
||||||
|
|
||||||
These packages each contain the following license:
|
These packages each contain the following license:
|
||||||
|
|
||||||
|
|||||||
+153
-76
@@ -20488,12 +20488,12 @@ var init_TypeRegistry = __esm({
|
|||||||
this.namespace = namespace;
|
this.namespace = namespace;
|
||||||
this.schemas = schemas;
|
this.schemas = schemas;
|
||||||
this.exceptions = exceptions;
|
this.exceptions = exceptions;
|
||||||
|
if (!_TypeRegistry.registries.has(namespace)) {
|
||||||
|
_TypeRegistry.registries.set(namespace, this);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
static for(namespace) {
|
static for(namespace) {
|
||||||
if (!_TypeRegistry.registries.has(namespace)) {
|
return _TypeRegistry.registries.get(namespace) ?? new _TypeRegistry(namespace);
|
||||||
_TypeRegistry.registries.set(namespace, new _TypeRegistry(namespace));
|
|
||||||
}
|
|
||||||
return _TypeRegistry.registries.get(namespace);
|
|
||||||
}
|
}
|
||||||
copyFrom(other) {
|
copyFrom(other) {
|
||||||
const { schemas, exceptions } = this;
|
const { schemas, exceptions } = this;
|
||||||
@@ -20511,9 +20511,11 @@ var init_TypeRegistry = __esm({
|
|||||||
register(shapeId, schema) {
|
register(shapeId, schema) {
|
||||||
const qualifiedName = this.normalizeShapeId(shapeId);
|
const qualifiedName = this.normalizeShapeId(shapeId);
|
||||||
for (const r5 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
for (const r5 of [this, _TypeRegistry.for(qualifiedName.split("#")[0])]) {
|
||||||
|
if (!r5.schemas.has(qualifiedName)) {
|
||||||
r5.schemas.set(qualifiedName, schema);
|
r5.schemas.set(qualifiedName, schema);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
getSchema(shapeId) {
|
getSchema(shapeId) {
|
||||||
const id = this.normalizeShapeId(shapeId);
|
const id = this.normalizeShapeId(shapeId);
|
||||||
if (!this.schemas.has(id)) {
|
if (!this.schemas.has(id)) {
|
||||||
@@ -20536,11 +20538,14 @@ var init_TypeRegistry = __esm({
|
|||||||
registerError(es, ctor) {
|
registerError(es, ctor) {
|
||||||
const $error = es;
|
const $error = es;
|
||||||
const ns = $error[1];
|
const ns = $error[1];
|
||||||
|
const qualifiedName = ns + "#" + $error[2];
|
||||||
for (const r5 of [this, _TypeRegistry.for(ns)]) {
|
for (const r5 of [this, _TypeRegistry.for(ns)]) {
|
||||||
r5.schemas.set(ns + "#" + $error[2], $error);
|
if (!r5.schemas.has(qualifiedName) && !r5.exceptions.has($error)) {
|
||||||
|
r5.schemas.set(qualifiedName, $error);
|
||||||
r5.exceptions.set($error, ctor);
|
r5.exceptions.set($error, ctor);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
}
|
||||||
getErrorCtor(es) {
|
getErrorCtor(es) {
|
||||||
const $error = es;
|
const $error = es;
|
||||||
if (this.exceptions.has($error)) {
|
if (this.exceptions.has($error)) {
|
||||||
@@ -20691,20 +20696,27 @@ var init_command = __esm({
|
|||||||
}
|
}
|
||||||
const stack = clientStack.concat(this.middlewareStack);
|
const stack = clientStack.concat(this.middlewareStack);
|
||||||
const { logger: logger2 } = configuration;
|
const { logger: logger2 } = configuration;
|
||||||
|
const additionalSmithyContext = additionalContext[import_types2.SMITHY_CONTEXT_KEY];
|
||||||
const handlerExecutionContext = {
|
const handlerExecutionContext = {
|
||||||
logger: logger2,
|
logger: logger2,
|
||||||
clientName,
|
clientName,
|
||||||
commandName,
|
commandName,
|
||||||
inputFilterSensitiveLog,
|
inputFilterSensitiveLog,
|
||||||
outputFilterSensitiveLog,
|
outputFilterSensitiveLog,
|
||||||
|
...additionalContext,
|
||||||
[import_types2.SMITHY_CONTEXT_KEY]: {
|
[import_types2.SMITHY_CONTEXT_KEY]: {
|
||||||
|
...additionalSmithyContext,
|
||||||
commandInstance: this,
|
commandInstance: this,
|
||||||
...smithyContext
|
...smithyContext,
|
||||||
},
|
...options?.metricsRecorder === void 0 ? {} : { metricsRecorder: options.metricsRecorder }
|
||||||
...additionalContext
|
}
|
||||||
};
|
};
|
||||||
const { requestHandler } = configuration;
|
const { requestHandler } = configuration;
|
||||||
let requestOptions = options ?? {};
|
let requestOptions = options ?? {};
|
||||||
|
if (requestOptions.metricsRecorder) {
|
||||||
|
requestOptions = { ...requestOptions };
|
||||||
|
delete requestOptions.metricsRecorder;
|
||||||
|
}
|
||||||
if (smithyContext.eventStream) {
|
if (smithyContext.eventStream) {
|
||||||
requestOptions = {
|
requestOptions = {
|
||||||
isEventStream: true,
|
isEventStream: true,
|
||||||
@@ -20901,10 +20913,25 @@ var init_exceptions = __esm({
|
|||||||
return _ServiceException.isInstance(instance);
|
return _ServiceException.isInstance(instance);
|
||||||
}
|
}
|
||||||
if (_ServiceException.isInstance(instance)) {
|
if (_ServiceException.isInstance(instance)) {
|
||||||
if (candidate.name && this.name) {
|
if (this.prototype.isPrototypeOf(instance)) {
|
||||||
return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
|
return true;
|
||||||
}
|
}
|
||||||
return this.prototype.isPrototypeOf(instance);
|
const targetName = this.name;
|
||||||
|
if (!targetName || !candidate.name) {
|
||||||
|
return false;
|
||||||
|
}
|
||||||
|
if (candidate.name === targetName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
let proto = Object.getPrototypeOf(candidate);
|
||||||
|
while (proto && proto !== Object.prototype) {
|
||||||
|
const ctorName = proto.constructor?.name;
|
||||||
|
if (ctorName && ctorName !== "Error" && ctorName === targetName) {
|
||||||
|
return true;
|
||||||
|
}
|
||||||
|
proto = Object.getPrototypeOf(proto);
|
||||||
|
}
|
||||||
|
return false;
|
||||||
}
|
}
|
||||||
return false;
|
return false;
|
||||||
}
|
}
|
||||||
@@ -25302,6 +25329,8 @@ var init_getAwsChunkedEncodingStream_browser = __esm({
|
|||||||
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
||||||
const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
const checksumRequired = base64Encoder !== void 0 && bodyLengthChecker !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
||||||
const digest2 = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
|
const digest2 = checksumRequired ? streamHasher(checksumAlgorithmFn, readableStream) : void 0;
|
||||||
|
Promise.resolve(digest2).catch(() => {
|
||||||
|
});
|
||||||
const reader = readableStream.getReader();
|
const reader = readableStream.getReader();
|
||||||
return new ReadableStream({
|
return new ReadableStream({
|
||||||
async pull(controller) {
|
async pull(controller) {
|
||||||
@@ -25338,8 +25367,11 @@ function getAwsChunkedEncodingStream2(stream, options) {
|
|||||||
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
const { base64Encoder, bodyLengthChecker, checksumAlgorithmFn, checksumLocationName, streamHasher } = options;
|
||||||
const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
const checksumRequired = base64Encoder !== void 0 && checksumAlgorithmFn !== void 0 && checksumLocationName !== void 0 && streamHasher !== void 0;
|
||||||
const digest2 = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
|
const digest2 = checksumRequired ? streamHasher(checksumAlgorithmFn, readable) : void 0;
|
||||||
|
Promise.resolve(digest2).catch(() => {
|
||||||
|
});
|
||||||
const awsChunkedEncodingStream = new import_node_stream4.Readable({
|
const awsChunkedEncodingStream = new import_node_stream4.Readable({
|
||||||
read: () => {
|
read() {
|
||||||
|
readable.resume();
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
readable.on("data", (data2) => {
|
readable.on("data", (data2) => {
|
||||||
@@ -25350,9 +25382,16 @@ function getAwsChunkedEncodingStream2(stream, options) {
|
|||||||
awsChunkedEncodingStream.push(`${length.toString(16)}\r
|
awsChunkedEncodingStream.push(`${length.toString(16)}\r
|
||||||
`);
|
`);
|
||||||
awsChunkedEncodingStream.push(data2);
|
awsChunkedEncodingStream.push(data2);
|
||||||
awsChunkedEncodingStream.push("\r\n");
|
if (!awsChunkedEncodingStream.push("\r\n")) {
|
||||||
|
readable.pause();
|
||||||
|
}
|
||||||
});
|
});
|
||||||
|
readable.on("error", (err) => {
|
||||||
|
awsChunkedEncodingStream.destroy(err);
|
||||||
|
});
|
||||||
|
readable.pause();
|
||||||
readable.on("end", async () => {
|
readable.on("end", async () => {
|
||||||
|
try {
|
||||||
awsChunkedEncodingStream.push(`0\r
|
awsChunkedEncodingStream.push(`0\r
|
||||||
`);
|
`);
|
||||||
if (checksumRequired) {
|
if (checksumRequired) {
|
||||||
@@ -25363,6 +25402,9 @@ function getAwsChunkedEncodingStream2(stream, options) {
|
|||||||
`);
|
`);
|
||||||
}
|
}
|
||||||
awsChunkedEncodingStream.push(null);
|
awsChunkedEncodingStream.push(null);
|
||||||
|
} catch (err) {
|
||||||
|
awsChunkedEncodingStream.destroy(err);
|
||||||
|
}
|
||||||
});
|
});
|
||||||
return awsChunkedEncodingStream;
|
return awsChunkedEncodingStream;
|
||||||
}
|
}
|
||||||
@@ -27620,7 +27662,7 @@ var init_HttpProtocol = __esm({
|
|||||||
constructor(options) {
|
constructor(options) {
|
||||||
super();
|
super();
|
||||||
this.options = options;
|
this.options = options;
|
||||||
this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
|
this.compositeErrorRegistry = new TypeRegistry(options.defaultNamespace);
|
||||||
for (const etr of options.errorTypeRegistries ?? []) {
|
for (const etr of options.errorTypeRegistries ?? []) {
|
||||||
this.compositeErrorRegistry.copyFrom(etr);
|
this.compositeErrorRegistry.copyFrom(etr);
|
||||||
}
|
}
|
||||||
@@ -27714,6 +27756,44 @@ var init_HttpProtocol = __esm({
|
|||||||
cfId: output.headers["x-amz-cf-id"]
|
cfId: output.headers["x-amz-cf-id"]
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
|
resolveError(name, namespaces, registries) {
|
||||||
|
const defaultErrorSchema = [-3, "", "Error", 0, [], [], 0];
|
||||||
|
let schema;
|
||||||
|
for (const registry of registries) {
|
||||||
|
for (const ns of namespaces) {
|
||||||
|
try {
|
||||||
|
if (ns === "*") {
|
||||||
|
schema = registry.getSchema(name);
|
||||||
|
} else {
|
||||||
|
schema = registry.getSchema(ns + "#" + name);
|
||||||
|
}
|
||||||
|
const errorCtor = registry.getErrorCtor(schema);
|
||||||
|
if (errorCtor) {
|
||||||
|
return [schema, errorCtor, "modeled"];
|
||||||
|
} else {
|
||||||
|
const syntheticErrorSchema = registry.getBaseException();
|
||||||
|
if (syntheticErrorSchema) {
|
||||||
|
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
||||||
|
if (syntheticErrorCtor) {
|
||||||
|
return [schema, syntheticErrorCtor, "synthetic"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
} catch (ignored) {
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
for (const registry of registries) {
|
||||||
|
const syntheticErrorSchema = registry.getBaseException();
|
||||||
|
if (syntheticErrorSchema) {
|
||||||
|
const syntheticErrorCtor = registry.getErrorCtor(syntheticErrorSchema);
|
||||||
|
if (syntheticErrorCtor) {
|
||||||
|
return [syntheticErrorSchema, syntheticErrorCtor, "synthetic"];
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return [defaultErrorSchema, Error, "native"];
|
||||||
|
}
|
||||||
async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
|
async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
|
||||||
const eventStreamSerde = await this.loadEventStreamCapability();
|
const eventStreamSerde = await this.loadEventStreamCapability();
|
||||||
return eventStreamSerde.serializeEventStream({
|
return eventStreamSerde.serializeEventStream({
|
||||||
@@ -27742,13 +27822,6 @@ var init_HttpProtocol = __esm({
|
|||||||
compositeErrorRegistry: this.compositeErrorRegistry
|
compositeErrorRegistry: this.compositeErrorRegistry
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
resolveEventStreamMarshaller(importedProvider) {
|
|
||||||
const context = this.serdeContext;
|
|
||||||
if (context.eventStreamMarshaller) {
|
|
||||||
return context.eventStreamMarshaller;
|
|
||||||
}
|
|
||||||
return importedProvider(this.serdeContext);
|
|
||||||
}
|
|
||||||
getDefaultContentType() {
|
getDefaultContentType() {
|
||||||
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
||||||
}
|
}
|
||||||
@@ -27767,6 +27840,13 @@ var init_HttpProtocol = __esm({
|
|||||||
}
|
}
|
||||||
return context.eventStreamMarshaller;
|
return context.eventStreamMarshaller;
|
||||||
}
|
}
|
||||||
|
resolveEventStreamMarshaller(importedProvider) {
|
||||||
|
const context = this.serdeContext;
|
||||||
|
if (context.eventStreamMarshaller) {
|
||||||
|
return context.eventStreamMarshaller;
|
||||||
|
}
|
||||||
|
return importedProvider(this.serdeContext);
|
||||||
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -28825,7 +28905,7 @@ var init_service_error_classification = __esm({
|
|||||||
return errorMessages.has(error3.message);
|
return errorMessages.has(error3.message);
|
||||||
};
|
};
|
||||||
isThrottlingError = (error3) => error3.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error3.name) || error3.$retryable?.throttling == true;
|
isThrottlingError = (error3) => error3.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error3.name) || error3.$retryable?.throttling == true;
|
||||||
isTransientError = (error3, depth = 0) => isRetryableByTrait(error3) || isClockSkewCorrectedError(error3) || error3.name === "InvalidSignatureException" && error3.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error3.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error3?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error3?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error3.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error3) || isNodeJsHttp2TransientError(error3) || error3.cause !== void 0 && depth <= 10 && isTransientError(error3.cause, depth + 1);
|
isTransientError = (error3, depth = 0) => error3?.name !== "AbortError" && (isRetryableByTrait(error3) || isClockSkewCorrectedError(error3) || error3.name === "InvalidSignatureException" && error3.message?.includes("Signature expired") || TRANSIENT_ERROR_CODES.includes(error3.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error3?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error3?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error3.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error3) || isNodeJsHttp2TransientError(error3) || error3.cause !== void 0 && depth <= 10 && isTransientError(error3.cause, depth + 1));
|
||||||
isServerError = (error3) => {
|
isServerError = (error3) => {
|
||||||
if (error3.$metadata?.httpStatusCode !== void 0) {
|
if (error3.$metadata?.httpStatusCode !== void 0) {
|
||||||
const statusCode = error3.$metadata.httpStatusCode;
|
const statusCode = error3.$metadata.httpStatusCode;
|
||||||
@@ -32602,13 +32682,15 @@ var init_resolveAwsSdkSigV4AConfig = __esm({
|
|||||||
// node_modules/@smithy/signature-v4/dist-cjs/index.js
|
// node_modules/@smithy/signature-v4/dist-cjs/index.js
|
||||||
var require_dist_cjs2 = __commonJS({
|
var require_dist_cjs2 = __commonJS({
|
||||||
"node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
|
"node_modules/@smithy/signature-v4/dist-cjs/index.js"(exports2) {
|
||||||
var { fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
|
var { hasOwn: hasOwn2, fromUtf8: fromUtf83, fromHex: fromHex2, toHex: toHex2, toUint8Array: toUint8Array2, isArrayBuffer: isArrayBuffer2 } = (init_serde(), __toCommonJS(serde_exports));
|
||||||
var { normalizeProvider: normalizeProvider3 } = (init_client2(), __toCommonJS(client_exports));
|
var { normalizeProvider: normalizeProvider3 } = (init_client2(), __toCommonJS(client_exports));
|
||||||
var { escapeUri: escapeUri2, HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
var { escapeUri: escapeUri2, HttpRequest: HttpRequest2 } = (init_protocols(), __toCommonJS(protocols_exports));
|
||||||
var HeaderFormatter = class {
|
var HeaderFormatter = class {
|
||||||
format(headers) {
|
format(headers) {
|
||||||
const chunks = [];
|
const chunks = [];
|
||||||
for (const headerName of Object.keys(headers)) {
|
for (const headerName in headers) {
|
||||||
|
if (!hasOwn2(headers, headerName))
|
||||||
|
continue;
|
||||||
const bytes = fromUtf83(headerName);
|
const bytes = fromUtf83(headerName);
|
||||||
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
||||||
}
|
}
|
||||||
@@ -32623,27 +32705,27 @@ var require_dist_cjs2 = __commonJS({
|
|||||||
formatHeaderValue(header) {
|
formatHeaderValue(header) {
|
||||||
switch (header.type) {
|
switch (header.type) {
|
||||||
case "boolean":
|
case "boolean":
|
||||||
return Uint8Array.from([header.value ? HEADER_VALUE_TYPE2.boolTrue : HEADER_VALUE_TYPE2.boolFalse]);
|
return Uint8Array.from([header.value ? 0 : 1]);
|
||||||
case "byte":
|
case "byte":
|
||||||
return Uint8Array.from([HEADER_VALUE_TYPE2.byte, header.value]);
|
return Uint8Array.from([2, header.value]);
|
||||||
case "short":
|
case "short":
|
||||||
const shortView = new DataView(new ArrayBuffer(3));
|
const shortView = new DataView(new ArrayBuffer(3));
|
||||||
shortView.setUint8(0, HEADER_VALUE_TYPE2.short);
|
shortView.setUint8(0, 3);
|
||||||
shortView.setInt16(1, header.value, false);
|
shortView.setInt16(1, header.value, false);
|
||||||
return new Uint8Array(shortView.buffer);
|
return new Uint8Array(shortView.buffer);
|
||||||
case "integer":
|
case "integer":
|
||||||
const intView = new DataView(new ArrayBuffer(5));
|
const intView = new DataView(new ArrayBuffer(5));
|
||||||
intView.setUint8(0, HEADER_VALUE_TYPE2.integer);
|
intView.setUint8(0, 4);
|
||||||
intView.setInt32(1, header.value, false);
|
intView.setInt32(1, header.value, false);
|
||||||
return new Uint8Array(intView.buffer);
|
return new Uint8Array(intView.buffer);
|
||||||
case "long":
|
case "long":
|
||||||
const longBytes = new Uint8Array(9);
|
const longBytes = new Uint8Array(9);
|
||||||
longBytes[0] = HEADER_VALUE_TYPE2.long;
|
longBytes[0] = 5;
|
||||||
longBytes.set(header.value.bytes, 1);
|
longBytes.set(header.value.bytes, 1);
|
||||||
return longBytes;
|
return longBytes;
|
||||||
case "binary":
|
case "binary":
|
||||||
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
||||||
binView.setUint8(0, HEADER_VALUE_TYPE2.byteArray);
|
binView.setUint8(0, 6);
|
||||||
binView.setUint16(1, header.value.byteLength, false);
|
binView.setUint16(1, header.value.byteLength, false);
|
||||||
const binBytes = new Uint8Array(binView.buffer);
|
const binBytes = new Uint8Array(binView.buffer);
|
||||||
binBytes.set(header.value, 3);
|
binBytes.set(header.value, 3);
|
||||||
@@ -32651,14 +32733,14 @@ var require_dist_cjs2 = __commonJS({
|
|||||||
case "string":
|
case "string":
|
||||||
const utf8Bytes = fromUtf83(header.value);
|
const utf8Bytes = fromUtf83(header.value);
|
||||||
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
||||||
strView.setUint8(0, HEADER_VALUE_TYPE2.string);
|
strView.setUint8(0, 7);
|
||||||
strView.setUint16(1, utf8Bytes.byteLength, false);
|
strView.setUint16(1, utf8Bytes.byteLength, false);
|
||||||
const strBytes = new Uint8Array(strView.buffer);
|
const strBytes = new Uint8Array(strView.buffer);
|
||||||
strBytes.set(utf8Bytes, 3);
|
strBytes.set(utf8Bytes, 3);
|
||||||
return strBytes;
|
return strBytes;
|
||||||
case "timestamp":
|
case "timestamp":
|
||||||
const tsBytes = new Uint8Array(9);
|
const tsBytes = new Uint8Array(9);
|
||||||
tsBytes[0] = HEADER_VALUE_TYPE2.timestamp;
|
tsBytes[0] = 8;
|
||||||
tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1);
|
tsBytes.set(Int642.fromNumber(header.value.valueOf()).bytes, 1);
|
||||||
return tsBytes;
|
return tsBytes;
|
||||||
case "uuid":
|
case "uuid":
|
||||||
@@ -32666,7 +32748,7 @@ var require_dist_cjs2 = __commonJS({
|
|||||||
throw new Error(`Invalid UUID received: ${header.value}`);
|
throw new Error(`Invalid UUID received: ${header.value}`);
|
||||||
}
|
}
|
||||||
const uuidBytes = new Uint8Array(17);
|
const uuidBytes = new Uint8Array(17);
|
||||||
uuidBytes[0] = HEADER_VALUE_TYPE2.uuid;
|
uuidBytes[0] = 9;
|
||||||
uuidBytes.set(fromHex2(header.value.replace(/-/g, "")), 1);
|
uuidBytes.set(fromHex2(header.value.replace(/-/g, "")), 1);
|
||||||
return uuidBytes;
|
return uuidBytes;
|
||||||
}
|
}
|
||||||
@@ -32775,7 +32857,9 @@ var require_dist_cjs2 = __commonJS({
|
|||||||
var getCanonicalQuery = ({ query = {} }) => {
|
var getCanonicalQuery = ({ query = {} }) => {
|
||||||
const keys = [];
|
const keys = [];
|
||||||
const serialized = {};
|
const serialized = {};
|
||||||
for (const key of Object.keys(query)) {
|
for (const key in query) {
|
||||||
|
if (!hasOwn2(query, key))
|
||||||
|
continue;
|
||||||
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
if (key.toLowerCase() === SIGNATURE_HEADER) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -32915,12 +32999,14 @@ ${toHex2(hashedRequest)}`;
|
|||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
|
canonical[canonicalHeaderName] = headers[headerName].replace(/[\r\n]/g, " ").replace(/[ \t]+/g, " ").replace(/^ | $/g, "");
|
||||||
}
|
}
|
||||||
return canonical;
|
return canonical;
|
||||||
};
|
};
|
||||||
var getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
var getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
||||||
for (const headerName of Object.keys(headers)) {
|
for (const headerName in headers) {
|
||||||
|
if (!hasOwn2(headers, headerName))
|
||||||
|
continue;
|
||||||
if (headerName.toLowerCase() === SHA256_HEADER) {
|
if (headerName.toLowerCase() === SHA256_HEADER) {
|
||||||
return headers[headerName];
|
return headers[headerName];
|
||||||
}
|
}
|
||||||
@@ -32936,7 +33022,9 @@ ${toHex2(hashedRequest)}`;
|
|||||||
};
|
};
|
||||||
var hasHeader = (soughtHeader, headers) => {
|
var hasHeader = (soughtHeader, headers) => {
|
||||||
soughtHeader = soughtHeader.toLowerCase();
|
soughtHeader = soughtHeader.toLowerCase();
|
||||||
for (const headerName of Object.keys(headers)) {
|
for (const headerName in headers) {
|
||||||
|
if (!hasOwn2(headers, headerName))
|
||||||
|
continue;
|
||||||
if (soughtHeader === headerName.toLowerCase()) {
|
if (soughtHeader === headerName.toLowerCase()) {
|
||||||
return true;
|
return true;
|
||||||
}
|
}
|
||||||
@@ -32945,7 +33033,9 @@ ${toHex2(hashedRequest)}`;
|
|||||||
};
|
};
|
||||||
var moveHeadersToQuery = (request, options = {}) => {
|
var moveHeadersToQuery = (request, options = {}) => {
|
||||||
const { headers, query = {} } = HttpRequest2.clone(request);
|
const { headers, query = {} } = HttpRequest2.clone(request);
|
||||||
for (const name of Object.keys(headers)) {
|
for (const name in headers) {
|
||||||
|
if (!hasOwn2(headers, name))
|
||||||
|
continue;
|
||||||
const lname = name.toLowerCase();
|
const lname = name.toLowerCase();
|
||||||
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
|
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
|
||||||
query[name] = headers[name];
|
query[name] = headers[name];
|
||||||
@@ -32960,7 +33050,9 @@ ${toHex2(hashedRequest)}`;
|
|||||||
};
|
};
|
||||||
var prepareRequest = (request) => {
|
var prepareRequest = (request) => {
|
||||||
request = HttpRequest2.clone(request);
|
request = HttpRequest2.clone(request);
|
||||||
for (const headerName of Object.keys(request.headers)) {
|
for (const headerName in request.headers) {
|
||||||
|
if (!hasOwn2(request.headers, headerName))
|
||||||
|
continue;
|
||||||
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) {
|
||||||
delete request.headers[headerName];
|
delete request.headers[headerName];
|
||||||
}
|
}
|
||||||
@@ -35071,7 +35163,6 @@ var init_cbor_types = __esm({
|
|||||||
var loadSmithyRpcV2CborErrorCode;
|
var loadSmithyRpcV2CborErrorCode;
|
||||||
var init_parseCborBody = __esm({
|
var init_parseCborBody = __esm({
|
||||||
"node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"() {
|
"node_modules/@smithy/core/dist-es/submodules/cbor/parseCborBody.js"() {
|
||||||
init_transport();
|
|
||||||
loadSmithyRpcV2CborErrorCode = (output, data2) => {
|
loadSmithyRpcV2CborErrorCode = (output, data2) => {
|
||||||
const sanitizeErrorCode2 = (rawValue) => {
|
const sanitizeErrorCode2 = (rawValue) => {
|
||||||
let cleanValue = rawValue;
|
let cleanValue = rawValue;
|
||||||
@@ -35084,26 +35175,11 @@ var init_parseCborBody = __esm({
|
|||||||
if (cleanValue.indexOf(":") >= 0) {
|
if (cleanValue.indexOf(":") >= 0) {
|
||||||
cleanValue = cleanValue.split(":")[0];
|
cleanValue = cleanValue.split(":")[0];
|
||||||
}
|
}
|
||||||
if (cleanValue.indexOf("#") >= 0) {
|
|
||||||
cleanValue = cleanValue.split("#")[1];
|
|
||||||
}
|
|
||||||
return cleanValue;
|
return cleanValue;
|
||||||
};
|
};
|
||||||
if (data2["__type"] !== void 0) {
|
if (data2["__type"] !== void 0) {
|
||||||
return sanitizeErrorCode2(data2["__type"]);
|
return sanitizeErrorCode2(data2["__type"]);
|
||||||
}
|
}
|
||||||
let codeKey;
|
|
||||||
for (const key in data2) {
|
|
||||||
if (!hasOwn(data2, key))
|
|
||||||
continue;
|
|
||||||
if (key.toLowerCase() === "code") {
|
|
||||||
codeKey = key;
|
|
||||||
break;
|
|
||||||
}
|
|
||||||
}
|
|
||||||
if (codeKey && data2[codeKey] !== void 0) {
|
|
||||||
return sanitizeErrorCode2(data2[codeKey]);
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
@@ -36417,36 +36493,37 @@ var init_SmithyRpcV2CborProtocol = __esm({
|
|||||||
return super.deserializeResponse(operationSchema, context, response);
|
return super.deserializeResponse(operationSchema, context, response);
|
||||||
}
|
}
|
||||||
async handleError(operationSchema, context, response, dataObject, metadata) {
|
async handleError(operationSchema, context, response, dataObject, metadata) {
|
||||||
const errorName = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
const errorIdentifier = loadSmithyRpcV2CborErrorCode(response, dataObject) ?? "Unknown";
|
||||||
|
const preferredNamespaces = ["*"];
|
||||||
|
const { defaultNamespace } = this.options;
|
||||||
|
preferredNamespaces.unshift(defaultNamespace);
|
||||||
|
const [namespace, errorShapeName] = (() => {
|
||||||
|
if (errorIdentifier.includes("#")) {
|
||||||
|
return errorIdentifier.split("#");
|
||||||
|
}
|
||||||
|
return [void 0, errorIdentifier];
|
||||||
|
})();
|
||||||
|
if (namespace) {
|
||||||
|
preferredNamespaces.unshift(namespace);
|
||||||
|
}
|
||||||
const errorMetadata = {
|
const errorMetadata = {
|
||||||
$metadata: metadata,
|
$metadata: metadata,
|
||||||
$fault: response.statusCode <= 500 ? "client" : "server"
|
$fault: response.statusCode < 500 ? "client" : "server"
|
||||||
};
|
};
|
||||||
let namespace = this.options.defaultNamespace;
|
const preferredRegistries = [this.compositeErrorRegistry];
|
||||||
if (errorName.includes("#")) {
|
if (namespace) {
|
||||||
[namespace] = errorName.split("#");
|
preferredRegistries.push(TypeRegistry.for(namespace));
|
||||||
}
|
}
|
||||||
const registry = this.compositeErrorRegistry;
|
preferredRegistries.push(TypeRegistry.for(defaultNamespace));
|
||||||
const nsRegistry = TypeRegistry.for(namespace);
|
const [errorSchema, ErrorCtor, errorMode] = this.resolveError(errorShapeName, preferredNamespaces, preferredRegistries);
|
||||||
registry.copyFrom(nsRegistry);
|
if (errorMode === "native" || errorMode === "synthetic") {
|
||||||
let errorSchema;
|
|
||||||
try {
|
|
||||||
errorSchema = registry.getSchema(errorName);
|
|
||||||
} catch (ignored) {
|
|
||||||
if (dataObject.Message) {
|
if (dataObject.Message) {
|
||||||
dataObject.message = dataObject.Message;
|
dataObject.message = dataObject.Message;
|
||||||
}
|
}
|
||||||
const syntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + namespace);
|
const error3 = errorMode === "synthetic" ? new ErrorCtor({ name: errorShapeName }) : new Error(errorShapeName);
|
||||||
registry.copyFrom(syntheticRegistry);
|
throw Object.assign(error3, errorMetadata, dataObject);
|
||||||
const baseExceptionSchema = registry.getBaseException();
|
|
||||||
if (baseExceptionSchema) {
|
|
||||||
const ErrorCtor2 = registry.getErrorCtor(baseExceptionSchema);
|
|
||||||
throw Object.assign(new ErrorCtor2({ name: errorName }), errorMetadata, dataObject);
|
|
||||||
}
|
|
||||||
throw Object.assign(new Error(errorName), errorMetadata, dataObject);
|
|
||||||
}
|
}
|
||||||
const ns = NormalizedSchema.of(errorSchema);
|
const ns = NormalizedSchema.of(errorSchema);
|
||||||
const ErrorCtor = registry.getErrorCtor(errorSchema);
|
|
||||||
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
const message = dataObject.message ?? dataObject.Message ?? "Unknown";
|
||||||
const exception = new ErrorCtor({});
|
const exception = new ErrorCtor({});
|
||||||
const output = {};
|
const output = {};
|
||||||
|
|||||||
Reference in new issue
Block a user