mirror of
https://github.com/aws-actions/configure-aws-credentials.git
synced 2026-09-05 06:25:08 +09:00
chore: Update dist
This commit is contained in:
+21
-21
@@ -647,10 +647,10 @@ The following npm packages may be included in this product:
|
|||||||
- @aws-sdk/util-user-agent-browser@3.972.9
|
- @aws-sdk/util-user-agent-browser@3.972.9
|
||||||
- @aws-sdk/util-user-agent-node@3.973.15
|
- @aws-sdk/util-user-agent-node@3.973.15
|
||||||
- @smithy/middleware-retry@4.5.1
|
- @smithy/middleware-retry@4.5.1
|
||||||
- @smithy/querystring-builder@4.2.13
|
- @smithy/querystring-builder@4.2.14
|
||||||
- @smithy/querystring-parser@4.2.13
|
- @smithy/querystring-parser@4.2.14
|
||||||
- @smithy/service-error-classification@4.2.13
|
- @smithy/service-error-classification@4.2.13
|
||||||
- @smithy/url-parser@4.2.13
|
- @smithy/url-parser@4.2.14
|
||||||
- @smithy/util-defaults-mode-browser@4.3.45
|
- @smithy/util-defaults-mode-browser@4.3.45
|
||||||
- @smithy/util-defaults-mode-node@4.2.50
|
- @smithy/util-defaults-mode-node@4.2.50
|
||||||
|
|
||||||
@@ -865,11 +865,11 @@ The following npm packages may be included in this product:
|
|||||||
- @aws-sdk/middleware-host-header@3.972.9
|
- @aws-sdk/middleware-host-header@3.972.9
|
||||||
- @aws-sdk/middleware-recursion-detection@3.972.10
|
- @aws-sdk/middleware-recursion-detection@3.972.10
|
||||||
- @aws-sdk/middleware-user-agent@3.972.29
|
- @aws-sdk/middleware-user-agent@3.972.29
|
||||||
- @smithy/core@3.23.14
|
- @smithy/core@3.23.16
|
||||||
- @smithy/invalid-dependency@4.2.13
|
- @smithy/invalid-dependency@4.2.13
|
||||||
- @smithy/middleware-serde@4.2.17
|
- @smithy/middleware-serde@4.2.19
|
||||||
- @smithy/protocol-http@5.3.13
|
- @smithy/protocol-http@5.3.14
|
||||||
- @smithy/smithy-client@4.12.9
|
- @smithy/smithy-client@4.12.12
|
||||||
- @smithy/types@4.14.1
|
- @smithy/types@4.14.1
|
||||||
|
|
||||||
These packages each contain the following license:
|
These packages each contain the following license:
|
||||||
@@ -1268,7 +1268,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.973.27
|
- @aws-sdk/core@3.974.2
|
||||||
|
|
||||||
This package contains the following license:
|
This package contains the following license:
|
||||||
|
|
||||||
@@ -1688,35 +1688,35 @@ 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.25
|
- @aws-sdk/credential-provider-env@3.972.28
|
||||||
- @aws-sdk/credential-provider-ini@3.972.29
|
- @aws-sdk/credential-provider-ini@3.972.29
|
||||||
- @aws-sdk/credential-provider-node@3.972.30
|
- @aws-sdk/credential-provider-node@3.972.30
|
||||||
- @aws-sdk/region-config-resolver@3.972.11
|
- @aws-sdk/region-config-resolver@3.972.11
|
||||||
- @aws-sdk/token-providers@3.1026.0
|
- @aws-sdk/token-providers@3.1026.0
|
||||||
- @aws-sdk/types@3.973.7
|
- @aws-sdk/types@3.973.8
|
||||||
- @aws-sdk/util-endpoints@3.996.6
|
- @aws-sdk/util-endpoints@3.996.6
|
||||||
- @aws-sdk/util-locate-window@3.965.5
|
- @aws-sdk/util-locate-window@3.965.5
|
||||||
- @aws-sdk/xml-builder@3.972.17
|
- @aws-sdk/xml-builder@3.972.18
|
||||||
- @smithy/config-resolver@4.4.15
|
- @smithy/config-resolver@4.4.15
|
||||||
- @smithy/credential-provider-imds@4.2.13
|
- @smithy/credential-provider-imds@4.2.13
|
||||||
- @smithy/fetch-http-handler@5.3.16
|
- @smithy/fetch-http-handler@5.3.17
|
||||||
- @smithy/hash-node@4.2.13
|
- @smithy/hash-node@4.2.13
|
||||||
- @smithy/is-array-buffer@2.2.0
|
- @smithy/is-array-buffer@2.2.0
|
||||||
- @smithy/is-array-buffer@4.2.2
|
- @smithy/is-array-buffer@4.2.2
|
||||||
- @smithy/middleware-content-length@4.2.13
|
- @smithy/middleware-content-length@4.2.13
|
||||||
- @smithy/middleware-endpoint@4.4.29
|
- @smithy/middleware-endpoint@4.4.31
|
||||||
- @smithy/middleware-stack@4.2.13
|
- @smithy/middleware-stack@4.2.14
|
||||||
- @smithy/node-http-handler@4.5.2
|
- @smithy/node-http-handler@4.6.0
|
||||||
- @smithy/property-provider@4.2.14
|
- @smithy/property-provider@4.2.14
|
||||||
- @smithy/shared-ini-file-loader@4.4.8
|
- @smithy/shared-ini-file-loader@4.4.9
|
||||||
- @smithy/signature-v4@5.3.13
|
- @smithy/signature-v4@5.3.14
|
||||||
- @smithy/util-base64@4.3.2
|
- @smithy/util-base64@4.3.2
|
||||||
- @smithy/util-body-length-browser@4.2.2
|
- @smithy/util-body-length-browser@4.2.2
|
||||||
- @smithy/util-body-length-node@4.2.3
|
- @smithy/util-body-length-node@4.2.3
|
||||||
- @smithy/util-buffer-from@2.2.0
|
- @smithy/util-buffer-from@2.2.0
|
||||||
- @smithy/util-buffer-from@4.2.2
|
- @smithy/util-buffer-from@4.2.2
|
||||||
- @smithy/util-hex-encoding@4.2.2
|
- @smithy/util-hex-encoding@4.2.2
|
||||||
- @smithy/util-stream@4.5.22
|
- @smithy/util-stream@4.5.24
|
||||||
- @smithy/util-uri-escape@4.2.2
|
- @smithy/util-uri-escape@4.2.2
|
||||||
- @smithy/util-utf8@2.3.0
|
- @smithy/util-utf8@2.3.0
|
||||||
- @smithy/util-utf8@4.2.2
|
- @smithy/util-utf8@4.2.2
|
||||||
@@ -2143,7 +2143,7 @@ Apache License
|
|||||||
The following npm packages may be included in this product:
|
The following npm packages may be included in this product:
|
||||||
|
|
||||||
- @aws-sdk/middleware-logger@3.972.9
|
- @aws-sdk/middleware-logger@3.972.9
|
||||||
- @smithy/node-config-provider@4.3.13
|
- @smithy/node-config-provider@4.3.14
|
||||||
- @smithy/util-config-provider@4.2.2
|
- @smithy/util-config-provider@4.2.2
|
||||||
|
|
||||||
These packages each contain the following license:
|
These packages each contain the following license:
|
||||||
@@ -2355,7 +2355,7 @@ Apache License
|
|||||||
The following npm packages may be included in this product:
|
The following npm packages may be included in this product:
|
||||||
|
|
||||||
- @smithy/util-endpoints@3.4.0
|
- @smithy/util-endpoints@3.4.0
|
||||||
- @smithy/util-middleware@4.2.13
|
- @smithy/util-middleware@4.2.14
|
||||||
- @smithy/util-retry@4.3.1
|
- @smithy/util-retry@4.3.1
|
||||||
|
|
||||||
These packages each contain the following license:
|
These packages each contain the following license:
|
||||||
@@ -2893,7 +2893,7 @@ SOFTWARE.
|
|||||||
|
|
||||||
The following npm package may be included in this product:
|
The following npm package may be included in this product:
|
||||||
|
|
||||||
- fast-xml-builder@1.1.4
|
- fast-xml-builder@1.1.5
|
||||||
|
|
||||||
This package contains the following license:
|
This package contains the following license:
|
||||||
|
|
||||||
|
|||||||
+340
-182
@@ -23511,57 +23511,117 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
};
|
};
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
var ids = new Uint16Array(1);
|
||||||
|
var ClientHttp2SessionRef = class {
|
||||||
|
id = ids[0]++;
|
||||||
|
total = 0;
|
||||||
|
max = 0;
|
||||||
|
session;
|
||||||
|
refs = 0;
|
||||||
|
constructor(session) {
|
||||||
|
session.unref();
|
||||||
|
this.session = session;
|
||||||
|
}
|
||||||
|
retain() {
|
||||||
|
if (this.session.destroyed) {
|
||||||
|
throw new Error("@smithy/node-http-handler - cannot acquire reference to destroyed session.");
|
||||||
|
}
|
||||||
|
this.refs += 1;
|
||||||
|
this.total += 1;
|
||||||
|
this.max = Math.max(this.refs, this.max);
|
||||||
|
this.session.ref();
|
||||||
|
}
|
||||||
|
free() {
|
||||||
|
if (this.session.destroyed) {
|
||||||
|
return;
|
||||||
|
}
|
||||||
|
this.refs -= 1;
|
||||||
|
if (this.refs === 0) {
|
||||||
|
this.session.unref();
|
||||||
|
}
|
||||||
|
if (this.refs < 0) {
|
||||||
|
throw new Error("@smithy/node-http-handler - ClientHttp2Session refcount at zero, cannot decrement.");
|
||||||
|
}
|
||||||
|
}
|
||||||
|
deref() {
|
||||||
|
return this.session;
|
||||||
|
}
|
||||||
|
destroy() {
|
||||||
|
this.refs = 0;
|
||||||
|
if (!this.session.destroyed) {
|
||||||
|
this.session.destroy();
|
||||||
|
}
|
||||||
|
}
|
||||||
|
useCount() {
|
||||||
|
return this.refs;
|
||||||
|
}
|
||||||
|
};
|
||||||
var NodeHttp2ConnectionPool = class {
|
var NodeHttp2ConnectionPool = class {
|
||||||
sessions = [];
|
sessions = [];
|
||||||
|
maxConcurrency = 0;
|
||||||
constructor(sessions) {
|
constructor(sessions) {
|
||||||
this.sessions = sessions ?? [];
|
this.sessions = (sessions ?? []).map((session) => new ClientHttp2SessionRef(session));
|
||||||
}
|
}
|
||||||
poll() {
|
poll() {
|
||||||
if (this.sessions.length > 0) {
|
let cleanup = false;
|
||||||
return this.sessions.shift();
|
for (const session of this.sessions) {
|
||||||
|
if (session.deref().destroyed) {
|
||||||
|
cleanup = true;
|
||||||
|
continue;
|
||||||
|
}
|
||||||
|
if (!this.maxConcurrency || session.useCount() < this.maxConcurrency) {
|
||||||
|
return session;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
offerLast(session) {
|
if (cleanup) {
|
||||||
this.sessions.push(session);
|
for (const session of this.sessions) {
|
||||||
|
if (session.deref().destroyed) {
|
||||||
|
this.remove(session);
|
||||||
}
|
}
|
||||||
contains(session) {
|
|
||||||
return this.sessions.includes(session);
|
|
||||||
}
|
}
|
||||||
remove(session) {
|
}
|
||||||
this.sessions = this.sessions.filter((s5) => s5 !== session);
|
}
|
||||||
|
offerLast(ref) {
|
||||||
|
this.sessions.push(ref);
|
||||||
|
}
|
||||||
|
remove(ref) {
|
||||||
|
const ix = this.sessions.indexOf(ref);
|
||||||
|
if (ix > -1) {
|
||||||
|
this.sessions.splice(ix, 1);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
[Symbol.iterator]() {
|
[Symbol.iterator]() {
|
||||||
return this.sessions[Symbol.iterator]();
|
return this.sessions[Symbol.iterator]();
|
||||||
}
|
}
|
||||||
destroy(connection) {
|
setMaxConcurrency(maxConcurrency) {
|
||||||
for (const session of this.sessions) {
|
this.maxConcurrency = maxConcurrency;
|
||||||
if (session === connection) {
|
|
||||||
if (!session.destroyed) {
|
|
||||||
session.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
}
|
}
|
||||||
|
destroy(ref) {
|
||||||
|
this.remove(ref);
|
||||||
|
ref.destroy();
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var NodeHttp2ConnectionManager = class {
|
var NodeHttp2ConnectionManager = class {
|
||||||
|
config;
|
||||||
|
connectionPools = /* @__PURE__ */ new Map();
|
||||||
constructor(config) {
|
constructor(config) {
|
||||||
this.config = config;
|
this.config = config;
|
||||||
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
|
if (this.config.maxConcurrency && this.config.maxConcurrency <= 0) {
|
||||||
throw new RangeError("maxConcurrency must be greater than zero.");
|
throw new RangeError("maxConcurrency must be greater than zero.");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
config;
|
|
||||||
sessionCache = /* @__PURE__ */ new Map();
|
|
||||||
lease(requestContext, connectionConfiguration) {
|
lease(requestContext, connectionConfiguration) {
|
||||||
const url = this.getUrlString(requestContext);
|
const url = this.getUrlString(requestContext);
|
||||||
const existingPool = this.sessionCache.get(url);
|
const pool = this.getPool(url);
|
||||||
if (existingPool) {
|
if (!this.config.disableConcurrency && !connectionConfiguration.isEventStream) {
|
||||||
const existingSession = existingPool.poll();
|
const available = pool.poll();
|
||||||
if (existingSession && !this.config.disableConcurrency) {
|
if (available) {
|
||||||
return existingSession;
|
available.retain();
|
||||||
|
return available;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const session = http22.connect(url);
|
const ref = new ClientHttp2SessionRef(http22.connect(url));
|
||||||
|
const session = ref.deref();
|
||||||
if (this.config.maxConcurrency) {
|
if (this.config.maxConcurrency) {
|
||||||
session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
|
session.settings({ maxConcurrentStreams: this.config.maxConcurrency }, (err) => {
|
||||||
if (err) {
|
if (err) {
|
||||||
@@ -23569,47 +23629,48 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
session.unref();
|
|
||||||
const destroySessionCb = () => {
|
const destroySessionCb = () => {
|
||||||
session.destroy();
|
session.destroy();
|
||||||
this.deleteSession(url, session);
|
this.removeFromPool(url, ref);
|
||||||
};
|
};
|
||||||
session.on("goaway", destroySessionCb);
|
session.on("goaway", destroySessionCb);
|
||||||
session.on("error", destroySessionCb);
|
session.on("error", destroySessionCb);
|
||||||
session.on("frameError", destroySessionCb);
|
session.on("frameError", destroySessionCb);
|
||||||
session.on("close", () => this.deleteSession(url, session));
|
session.on("close", () => this.removeFromPool(url, ref));
|
||||||
if (connectionConfiguration.requestTimeout) {
|
if (connectionConfiguration.requestTimeout) {
|
||||||
session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
|
session.setTimeout(connectionConfiguration.requestTimeout, destroySessionCb);
|
||||||
}
|
}
|
||||||
const connectionPool = this.sessionCache.get(url) || new NodeHttp2ConnectionPool();
|
pool.offerLast(ref);
|
||||||
connectionPool.offerLast(session);
|
ref.retain();
|
||||||
this.sessionCache.set(url, connectionPool);
|
return ref;
|
||||||
return session;
|
|
||||||
}
|
}
|
||||||
deleteSession(authority, session) {
|
release(_requestContext, ref) {
|
||||||
const existingConnectionPool = this.sessionCache.get(authority);
|
ref.free();
|
||||||
if (!existingConnectionPool) {
|
|
||||||
return;
|
|
||||||
}
|
}
|
||||||
if (!existingConnectionPool.contains(session)) {
|
createIsolatedSession(requestContext, connectionConfiguration) {
|
||||||
return;
|
const url = this.getUrlString(requestContext);
|
||||||
|
const ref = new ClientHttp2SessionRef(http22.connect(url));
|
||||||
|
const session = ref.deref();
|
||||||
|
session.settings({ maxConcurrentStreams: 1 });
|
||||||
|
const destroySession = () => {
|
||||||
|
session.destroy();
|
||||||
|
};
|
||||||
|
session.on("goaway", destroySession);
|
||||||
|
session.on("error", destroySession);
|
||||||
|
session.on("frameError", destroySession);
|
||||||
|
session.on("close", destroySession);
|
||||||
|
if (connectionConfiguration.requestTimeout) {
|
||||||
|
session.setTimeout(connectionConfiguration.requestTimeout, destroySession);
|
||||||
}
|
}
|
||||||
existingConnectionPool.remove(session);
|
ref.retain();
|
||||||
this.sessionCache.set(authority, existingConnectionPool);
|
return ref;
|
||||||
}
|
|
||||||
release(requestContext, session) {
|
|
||||||
const cacheKey = this.getUrlString(requestContext);
|
|
||||||
this.sessionCache.get(cacheKey)?.offerLast(session);
|
|
||||||
}
|
}
|
||||||
destroy() {
|
destroy() {
|
||||||
for (const [key, connectionPool] of this.sessionCache) {
|
for (const [url, connectionPool] of this.connectionPools) {
|
||||||
for (const session of connectionPool) {
|
for (const session of [...connectionPool]) {
|
||||||
if (!session.destroyed) {
|
|
||||||
session.destroy();
|
session.destroy();
|
||||||
}
|
}
|
||||||
connectionPool.remove(session);
|
this.connectionPools.delete(url);
|
||||||
}
|
|
||||||
this.sessionCache.delete(key);
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
setMaxConcurrentStreams(maxConcurrentStreams) {
|
setMaxConcurrentStreams(maxConcurrentStreams) {
|
||||||
@@ -23617,10 +23678,42 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
throw new RangeError("maxConcurrentStreams must be greater than zero.");
|
throw new RangeError("maxConcurrentStreams must be greater than zero.");
|
||||||
}
|
}
|
||||||
this.config.maxConcurrency = maxConcurrentStreams;
|
this.config.maxConcurrency = maxConcurrentStreams;
|
||||||
|
for (const pool of this.connectionPools.values()) {
|
||||||
|
pool.setMaxConcurrency(maxConcurrentStreams);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
setDisableConcurrentStreams(disableConcurrentStreams) {
|
setDisableConcurrentStreams(disableConcurrentStreams) {
|
||||||
this.config.disableConcurrency = disableConcurrentStreams;
|
this.config.disableConcurrency = disableConcurrentStreams;
|
||||||
}
|
}
|
||||||
|
debug() {
|
||||||
|
const pools = {};
|
||||||
|
for (const [url, pool] of this.connectionPools) {
|
||||||
|
const sessions = [];
|
||||||
|
for (const ref of pool) {
|
||||||
|
sessions.push({
|
||||||
|
id: ref.id,
|
||||||
|
active: ref.useCount(),
|
||||||
|
maxConcurrent: ref.max,
|
||||||
|
totalRequests: ref.total
|
||||||
|
});
|
||||||
|
}
|
||||||
|
pools[url] = { sessions };
|
||||||
|
}
|
||||||
|
return pools;
|
||||||
|
}
|
||||||
|
removeFromPool(authority, ref) {
|
||||||
|
this.connectionPools.get(authority)?.remove(ref);
|
||||||
|
}
|
||||||
|
getPool(url) {
|
||||||
|
if (!this.connectionPools.has(url)) {
|
||||||
|
const pool = new NodeHttp2ConnectionPool();
|
||||||
|
if (this.config.maxConcurrency) {
|
||||||
|
pool.setMaxConcurrency(this.config.maxConcurrency);
|
||||||
|
}
|
||||||
|
this.connectionPools.set(url, pool);
|
||||||
|
}
|
||||||
|
return this.connectionPools.get(url);
|
||||||
|
}
|
||||||
getUrlString(request) {
|
getUrlString(request) {
|
||||||
return request.destination.toString();
|
return request.destination.toString();
|
||||||
}
|
}
|
||||||
@@ -23650,15 +23743,17 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
destroy() {
|
destroy() {
|
||||||
this.connectionManager.destroy();
|
this.connectionManager.destroy();
|
||||||
}
|
}
|
||||||
async handle(request, { abortSignal, requestTimeout } = {}) {
|
async handle(request, { abortSignal, requestTimeout, isEventStream } = {}) {
|
||||||
if (!this.config) {
|
if (!this.config) {
|
||||||
this.config = await this.configProvider;
|
this.config = await this.configProvider;
|
||||||
this.connectionManager.setDisableConcurrentStreams(this.config.disableConcurrentStreams || false);
|
const { disableConcurrentStreams: disableConcurrentStreams2, maxConcurrentStreams } = this.config;
|
||||||
if (this.config.maxConcurrentStreams) {
|
this.connectionManager.setDisableConcurrentStreams(disableConcurrentStreams2 ?? false);
|
||||||
this.connectionManager.setMaxConcurrentStreams(this.config.maxConcurrentStreams);
|
if (maxConcurrentStreams) {
|
||||||
|
this.connectionManager.setMaxConcurrentStreams(maxConcurrentStreams);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
|
const { requestTimeout: configRequestTimeout, disableConcurrentStreams } = this.config;
|
||||||
|
const useIsolatedSession = disableConcurrentStreams || isEventStream;
|
||||||
const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
|
const effectiveRequestTimeout = requestTimeout ?? configRequestTimeout;
|
||||||
return new Promise((_resolve, _reject) => {
|
return new Promise((_resolve, _reject) => {
|
||||||
let fulfilled = false;
|
let fulfilled = false;
|
||||||
@@ -23686,18 +23781,20 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
}
|
}
|
||||||
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
|
const authority = `${protocol}//${auth}${hostname}${port ? `:${port}` : ""}`;
|
||||||
const requestContext = { destination: new URL(authority) };
|
const requestContext = { destination: new URL(authority) };
|
||||||
const session = this.connectionManager.lease(requestContext, {
|
const connectConfig = {
|
||||||
requestTimeout: this.config?.sessionTimeout,
|
requestTimeout: this.config?.sessionTimeout,
|
||||||
disableConcurrentStreams: disableConcurrentStreams || false
|
isEventStream
|
||||||
});
|
};
|
||||||
|
const ref = useIsolatedSession ? this.connectionManager.createIsolatedSession(requestContext, connectConfig) : this.connectionManager.lease(requestContext, connectConfig);
|
||||||
|
const session = ref.deref();
|
||||||
const rejectWithDestroy = (err) => {
|
const rejectWithDestroy = (err) => {
|
||||||
if (disableConcurrentStreams) {
|
if (useIsolatedSession) {
|
||||||
this.destroySession(session);
|
ref.destroy();
|
||||||
}
|
}
|
||||||
fulfilled = true;
|
fulfilled = true;
|
||||||
reject(err);
|
reject(err);
|
||||||
};
|
};
|
||||||
const queryString = querystringBuilder.buildQueryString(query || {});
|
const queryString = querystringBuilder.buildQueryString(query ?? {});
|
||||||
let path3 = request.path;
|
let path3 = request.path;
|
||||||
if (queryString) {
|
if (queryString) {
|
||||||
path3 += `?${queryString}`;
|
path3 += `?${queryString}`;
|
||||||
@@ -23705,28 +23802,14 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
if (request.fragment) {
|
if (request.fragment) {
|
||||||
path3 += `#${request.fragment}`;
|
path3 += `#${request.fragment}`;
|
||||||
}
|
}
|
||||||
const req = session.request({
|
const clientHttp2Stream = session.request({
|
||||||
...request.headers,
|
...request.headers,
|
||||||
[http22.constants.HTTP2_HEADER_PATH]: path3,
|
[http22.constants.HTTP2_HEADER_PATH]: path3,
|
||||||
[http22.constants.HTTP2_HEADER_METHOD]: method
|
[http22.constants.HTTP2_HEADER_METHOD]: method
|
||||||
});
|
});
|
||||||
session.ref();
|
|
||||||
req.on("response", (headers) => {
|
|
||||||
const httpResponse = new protocolHttp.HttpResponse({
|
|
||||||
statusCode: headers[":status"] || -1,
|
|
||||||
headers: getTransformedHeaders(headers),
|
|
||||||
body: req
|
|
||||||
});
|
|
||||||
fulfilled = true;
|
|
||||||
resolve({ response: httpResponse });
|
|
||||||
if (disableConcurrentStreams) {
|
|
||||||
session.close();
|
|
||||||
this.connectionManager.deleteSession(authority, session);
|
|
||||||
}
|
|
||||||
});
|
|
||||||
if (effectiveRequestTimeout) {
|
if (effectiveRequestTimeout) {
|
||||||
req.setTimeout(effectiveRequestTimeout, () => {
|
clientHttp2Stream.setTimeout(effectiveRequestTimeout, () => {
|
||||||
req.close();
|
clientHttp2Stream.close();
|
||||||
const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
|
const timeoutError = new Error(`Stream timed out because of no activity for ${effectiveRequestTimeout} ms`);
|
||||||
timeoutError.name = "TimeoutError";
|
timeoutError.name = "TimeoutError";
|
||||||
rejectWithDestroy(timeoutError);
|
rejectWithDestroy(timeoutError);
|
||||||
@@ -23734,35 +23817,48 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
}
|
}
|
||||||
if (abortSignal) {
|
if (abortSignal) {
|
||||||
const onAbort = () => {
|
const onAbort = () => {
|
||||||
req.close();
|
clientHttp2Stream.close();
|
||||||
const abortError = buildAbortError(abortSignal);
|
const abortError = buildAbortError(abortSignal);
|
||||||
rejectWithDestroy(abortError);
|
rejectWithDestroy(abortError);
|
||||||
};
|
};
|
||||||
if (typeof abortSignal.addEventListener === "function") {
|
if (typeof abortSignal.addEventListener === "function") {
|
||||||
const signal = abortSignal;
|
const signal = abortSignal;
|
||||||
signal.addEventListener("abort", onAbort, { once: true });
|
signal.addEventListener("abort", onAbort, { once: true });
|
||||||
req.once("close", () => signal.removeEventListener("abort", onAbort));
|
clientHttp2Stream.once("close", () => signal.removeEventListener("abort", onAbort));
|
||||||
} else {
|
} else {
|
||||||
abortSignal.onabort = onAbort;
|
abortSignal.onabort = onAbort;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
req.on("frameError", (type, code, id) => {
|
clientHttp2Stream.on("frameError", (type, code, id) => {
|
||||||
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
|
rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
|
||||||
});
|
});
|
||||||
req.on("error", rejectWithDestroy);
|
clientHttp2Stream.on("error", rejectWithDestroy);
|
||||||
req.on("aborted", () => {
|
clientHttp2Stream.on("aborted", () => {
|
||||||
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${req.rstCode}.`));
|
rejectWithDestroy(new Error(`HTTP/2 stream is abnormally aborted in mid-communication with result code ${clientHttp2Stream.rstCode}.`));
|
||||||
});
|
});
|
||||||
req.on("close", () => {
|
clientHttp2Stream.on("response", (headers) => {
|
||||||
session.unref();
|
const httpResponse = new protocolHttp.HttpResponse({
|
||||||
if (disableConcurrentStreams) {
|
statusCode: headers[":status"] ?? -1,
|
||||||
session.destroy();
|
headers: getTransformedHeaders(headers),
|
||||||
|
body: clientHttp2Stream
|
||||||
|
});
|
||||||
|
fulfilled = true;
|
||||||
|
resolve({ response: httpResponse });
|
||||||
|
if (useIsolatedSession) {
|
||||||
|
session.close();
|
||||||
|
}
|
||||||
|
});
|
||||||
|
clientHttp2Stream.on("close", () => {
|
||||||
|
if (useIsolatedSession) {
|
||||||
|
ref.destroy();
|
||||||
|
} else {
|
||||||
|
this.connectionManager.release(requestContext, ref);
|
||||||
}
|
}
|
||||||
if (!fulfilled) {
|
if (!fulfilled) {
|
||||||
rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
|
rejectWithDestroy(new Error("Unexpected error: http2 request did not get a response"));
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
writeRequestBodyPromise = writeRequestBody(req, request, effectiveRequestTimeout);
|
writeRequestBodyPromise = writeRequestBody(clientHttp2Stream, request, effectiveRequestTimeout);
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
updateHttpClientConfig(key, value) {
|
updateHttpClientConfig(key, value) {
|
||||||
@@ -23777,11 +23873,6 @@ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler conf
|
|||||||
httpHandlerConfigs() {
|
httpHandlerConfigs() {
|
||||||
return this.config ?? {};
|
return this.config ?? {};
|
||||||
}
|
}
|
||||||
destroySession(session) {
|
|
||||||
if (!session.destroyed) {
|
|
||||||
session.destroy();
|
|
||||||
}
|
|
||||||
}
|
|
||||||
};
|
};
|
||||||
var Collector = class extends node_stream.Writable {
|
var Collector = class extends node_stream.Writable {
|
||||||
bufferedBytes = [];
|
bufferedBytes = [];
|
||||||
@@ -24551,8 +24642,8 @@ var init_toEndpointV1 = __esm({
|
|||||||
const v1Endpoint = (0, import_url_parser.parseUrl)(endpoint.url);
|
const v1Endpoint = (0, import_url_parser.parseUrl)(endpoint.url);
|
||||||
if (endpoint.headers) {
|
if (endpoint.headers) {
|
||||||
v1Endpoint.headers = {};
|
v1Endpoint.headers = {};
|
||||||
for (const [name, values] of Object.entries(endpoint.headers)) {
|
for (const name in endpoint.headers) {
|
||||||
v1Endpoint.headers[name.toLowerCase()] = values.join(", ");
|
v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return v1Endpoint;
|
return v1Endpoint;
|
||||||
@@ -25215,7 +25306,12 @@ var init_TypeRegistry = __esm({
|
|||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
find(predicate) {
|
find(predicate) {
|
||||||
return [...this.schemas.values()].find(predicate);
|
for (const schema of this.schemas.values()) {
|
||||||
|
if (predicate(schema)) {
|
||||||
|
return schema;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return void 0;
|
||||||
}
|
}
|
||||||
clear() {
|
clear() {
|
||||||
this.schemas.clear();
|
this.schemas.clear();
|
||||||
@@ -25430,7 +25526,12 @@ var init_parse_utils = __esm({
|
|||||||
return void 0;
|
return void 0;
|
||||||
}
|
}
|
||||||
const asObject = expectObject(value);
|
const asObject = expectObject(value);
|
||||||
const setKeys = Object.entries(asObject).filter(([, v5]) => v5 != null).map(([k5]) => k5);
|
const setKeys = [];
|
||||||
|
for (const k5 in asObject) {
|
||||||
|
if (asObject[k5] != null) {
|
||||||
|
setKeys.push(k5);
|
||||||
|
}
|
||||||
|
}
|
||||||
if (setKeys.length === 0) {
|
if (setKeys.length === 0) {
|
||||||
throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
|
throw new TypeError(`Unions must have exactly one non-null member. None were found.`);
|
||||||
}
|
}
|
||||||
@@ -26658,9 +26759,13 @@ var init_EventStreamSerde = __esm({
|
|||||||
body: event.body
|
body: event.body
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
const unionMember = Object.keys(event).find((key) => {
|
let unionMember = "";
|
||||||
return key !== "__type";
|
for (const key in event) {
|
||||||
}) ?? "";
|
if (key !== "__type") {
|
||||||
|
unionMember = key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
|
const { additionalHeaders, body, eventType, explicitPayloadContentType } = this.writeEventBody(unionMember, unionSchema, event);
|
||||||
const headers = {
|
const headers = {
|
||||||
":event-type": { type: "string", value: eventType },
|
":event-type": { type: "string", value: eventType },
|
||||||
@@ -26681,9 +26786,13 @@ var init_EventStreamSerde = __esm({
|
|||||||
const memberSchemas = unionSchema.getMemberSchemas();
|
const memberSchemas = unionSchema.getMemberSchemas();
|
||||||
const initialResponseMarker = /* @__PURE__ */ Symbol("initialResponseMarker");
|
const initialResponseMarker = /* @__PURE__ */ Symbol("initialResponseMarker");
|
||||||
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
const asyncIterable = marshaller.deserialize(response.body, async (event) => {
|
||||||
const unionMember = Object.keys(event).find((key) => {
|
let unionMember = "";
|
||||||
return key !== "__type";
|
for (const key in event) {
|
||||||
}) ?? "";
|
if (key !== "__type") {
|
||||||
|
unionMember = key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
const body = event[unionMember].body;
|
const body = event[unionMember].body;
|
||||||
if (unionMember === "initial-response") {
|
if (unionMember === "initial-response") {
|
||||||
const dataObject = await this.deserializer.read(responseSchema, body);
|
const dataObject = await this.deserializer.read(responseSchema, body);
|
||||||
@@ -26752,8 +26861,8 @@ var init_EventStreamSerde = __esm({
|
|||||||
if (!responseSchema) {
|
if (!responseSchema) {
|
||||||
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
throw new Error("@smithy::core/protocols - initial-response event encountered in event stream but no response schema given.");
|
||||||
}
|
}
|
||||||
for (const [key, value] of Object.entries(firstEvent.value)) {
|
for (const key in firstEvent.value) {
|
||||||
initialResponseContainer[key] = value;
|
initialResponseContainer[key] = firstEvent.value[key];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return {
|
return {
|
||||||
@@ -26906,8 +27015,8 @@ var init_HttpProtocol = __esm({
|
|||||||
request.query[k5] = v5;
|
request.query[k5] = v5;
|
||||||
}
|
}
|
||||||
if (endpoint.headers) {
|
if (endpoint.headers) {
|
||||||
for (const [name, values] of Object.entries(endpoint.headers)) {
|
for (const name in endpoint.headers) {
|
||||||
request.headers[name] = values.join(", ");
|
request.headers[name] = endpoint.headers[name].join(", ");
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return request;
|
return request;
|
||||||
@@ -26920,8 +27029,8 @@ var init_HttpProtocol = __esm({
|
|||||||
...endpoint.query
|
...endpoint.query
|
||||||
};
|
};
|
||||||
if (endpoint.headers) {
|
if (endpoint.headers) {
|
||||||
for (const [name, value] of Object.entries(endpoint.headers)) {
|
for (const name in endpoint.headers) {
|
||||||
request.headers[name] = value;
|
request.headers[name] = endpoint.headers[name];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
return request;
|
return request;
|
||||||
@@ -26936,8 +27045,10 @@ var init_HttpProtocol = __esm({
|
|||||||
if (opTraits.endpoint) {
|
if (opTraits.endpoint) {
|
||||||
let hostPrefix = opTraits.endpoint?.[0];
|
let hostPrefix = opTraits.endpoint?.[0];
|
||||||
if (typeof hostPrefix === "string") {
|
if (typeof hostPrefix === "string") {
|
||||||
const hostLabelInputs = [...inputNs.structIterator()].filter(([, member2]) => member2.getMergedTraits().hostLabel);
|
for (const [name, member2] of inputNs.structIterator()) {
|
||||||
for (const [name] of hostLabelInputs) {
|
if (!member2.getMergedTraits().hostLabel) {
|
||||||
|
continue;
|
||||||
|
}
|
||||||
const replacement = input[name];
|
const replacement = input[name];
|
||||||
if (typeof replacement !== "string") {
|
if (typeof replacement !== "string") {
|
||||||
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
||||||
@@ -27050,7 +27161,9 @@ var init_HttpBindingProtocol = __esm({
|
|||||||
request.path += path3;
|
request.path += path3;
|
||||||
}
|
}
|
||||||
const traitSearchParams = new URLSearchParams(search ?? "");
|
const traitSearchParams = new URLSearchParams(search ?? "");
|
||||||
Object.assign(query, Object.fromEntries(traitSearchParams));
|
for (const [key, value] of traitSearchParams) {
|
||||||
|
query[key] = value;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
for (const [memberName, memberNs] of ns.structIterator()) {
|
for (const [memberName, memberNs] of ns.structIterator()) {
|
||||||
@@ -27094,7 +27207,8 @@ var init_HttpBindingProtocol = __esm({
|
|||||||
serializer.write(memberNs, inputMemberValue);
|
serializer.write(memberNs, inputMemberValue);
|
||||||
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
headers[memberTraits.httpHeader.toLowerCase()] = String(serializer.flush());
|
||||||
} else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
} else if (typeof memberTraits.httpPrefixHeaders === "string") {
|
||||||
for (const [key, val] of Object.entries(inputMemberValue)) {
|
for (const key in inputMemberValue) {
|
||||||
|
const val = inputMemberValue[key];
|
||||||
const amalgam = memberTraits.httpPrefixHeaders + key;
|
const amalgam = memberTraits.httpPrefixHeaders + key;
|
||||||
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
serializer.write([memberNs.getValueSchema(), { httpHeader: amalgam }], val);
|
||||||
headers[amalgam.toLowerCase()] = serializer.flush();
|
headers[amalgam.toLowerCase()] = serializer.flush();
|
||||||
@@ -27136,8 +27250,9 @@ var init_HttpBindingProtocol = __esm({
|
|||||||
const serializer = this.serializer;
|
const serializer = this.serializer;
|
||||||
const traits = ns.getMergedTraits();
|
const traits = ns.getMergedTraits();
|
||||||
if (traits.httpQueryParams) {
|
if (traits.httpQueryParams) {
|
||||||
for (const [key, val] of Object.entries(data3)) {
|
for (const key in data3) {
|
||||||
if (!(key in query)) {
|
if (!(key in query)) {
|
||||||
|
const val = data3[key];
|
||||||
const valueSchema = ns.getValueSchema();
|
const valueSchema = ns.getValueSchema();
|
||||||
Object.assign(valueSchema.getMergedTraits(), {
|
Object.assign(valueSchema.getMergedTraits(), {
|
||||||
...traits,
|
...traits,
|
||||||
@@ -27255,8 +27370,9 @@ var init_HttpBindingProtocol = __esm({
|
|||||||
}
|
}
|
||||||
} else if (memberTraits.httpPrefixHeaders !== void 0) {
|
} else if (memberTraits.httpPrefixHeaders !== void 0) {
|
||||||
dataObject[memberName] = {};
|
dataObject[memberName] = {};
|
||||||
for (const [header, value] of Object.entries(response.headers)) {
|
for (const header in response.headers) {
|
||||||
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
if (header.startsWith(memberTraits.httpPrefixHeaders)) {
|
||||||
|
const value = response.headers[header];
|
||||||
const valueSchema = memberSchema.getValueSchema();
|
const valueSchema = memberSchema.getValueSchema();
|
||||||
valueSchema.getMergedTraits().httpHeader = header;
|
valueSchema.getMergedTraits().httpHeader = header;
|
||||||
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
dataObject[memberName][header.slice(memberTraits.httpPrefixHeaders.length)] = await deserializer.read(valueSchema, value);
|
||||||
@@ -27808,7 +27924,8 @@ var init_DefaultIdentityProviderConfig = __esm({
|
|||||||
DefaultIdentityProviderConfig = class {
|
DefaultIdentityProviderConfig = class {
|
||||||
authSchemes = /* @__PURE__ */ new Map();
|
authSchemes = /* @__PURE__ */ new Map();
|
||||||
constructor(config) {
|
constructor(config) {
|
||||||
for (const [key, value] of Object.entries(config)) {
|
for (const key in config) {
|
||||||
|
const value = config[key];
|
||||||
if (value !== void 0) {
|
if (value !== void 0) {
|
||||||
this.authSchemes.set(key, value);
|
this.authSchemes.set(key, value);
|
||||||
}
|
}
|
||||||
@@ -31065,7 +31182,14 @@ var require_dist_cjs34 = __commonJS({
|
|||||||
...additionalContext
|
...additionalContext
|
||||||
};
|
};
|
||||||
const { requestHandler } = configuration;
|
const { requestHandler } = configuration;
|
||||||
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
let requestOptions = options ?? {};
|
||||||
|
if (smithyContext.eventStream) {
|
||||||
|
requestOptions = {
|
||||||
|
isEventStream: true,
|
||||||
|
...requestOptions
|
||||||
|
};
|
||||||
|
}
|
||||||
|
return stack.resolve((request) => requestHandler.handle(request.request, requestOptions), handlerExecutionContext);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
var ClassBuilder = class {
|
var ClassBuilder = class {
|
||||||
@@ -32592,7 +32716,7 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
|
|||||||
return this.signRequest(toSign, options);
|
return this.signRequest(toSign, options);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
async signEvent({ headers, payload: payload2 }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) {
|
async signEvent({ headers, payload: payload2 }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService, eventStreamCredentials }) {
|
||||||
const region = signingRegion ?? await this.regionProvider();
|
const region = signingRegion ?? await this.regionProvider();
|
||||||
const { shortDate, longDate } = this.formatDate(signingDate);
|
const { shortDate, longDate } = this.formatDate(signingDate);
|
||||||
const scope = createScope(shortDate, region, signingService ?? this.service);
|
const scope = createScope(shortDate, region, signingService ?? this.service);
|
||||||
@@ -32608,9 +32732,14 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
|
|||||||
hashedHeaders,
|
hashedHeaders,
|
||||||
hashedPayload
|
hashedPayload
|
||||||
].join("\n");
|
].join("\n");
|
||||||
return this.signString(stringToSign, { signingDate, signingRegion: region, signingService });
|
return this.signString(stringToSign, {
|
||||||
|
signingDate,
|
||||||
|
signingRegion: region,
|
||||||
|
signingService,
|
||||||
|
eventStreamCredentials
|
||||||
|
});
|
||||||
}
|
}
|
||||||
async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) {
|
async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService, eventStreamCredentials }) {
|
||||||
const promise = this.signEvent({
|
const promise = this.signEvent({
|
||||||
headers: this.headerFormatter.format(signableMessage.message.headers),
|
headers: this.headerFormatter.format(signableMessage.message.headers),
|
||||||
payload: signableMessage.message.body
|
payload: signableMessage.message.body
|
||||||
@@ -32618,14 +32747,15 @@ ${utilHexEncoding.toHex(hashedRequest)}`;
|
|||||||
signingDate,
|
signingDate,
|
||||||
signingRegion,
|
signingRegion,
|
||||||
signingService,
|
signingService,
|
||||||
priorSignature: signableMessage.priorSignature
|
priorSignature: signableMessage.priorSignature,
|
||||||
|
eventStreamCredentials
|
||||||
});
|
});
|
||||||
return promise.then((signature) => {
|
return promise.then((signature) => {
|
||||||
return { message: signableMessage.message, signature };
|
return { message: signableMessage.message, signature };
|
||||||
});
|
});
|
||||||
}
|
}
|
||||||
async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) {
|
async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService, eventStreamCredentials } = {}) {
|
||||||
const credentials = await this.credentialProvider();
|
const credentials = eventStreamCredentials ?? await this.credentialProvider();
|
||||||
this.validateResolvedCredentials(credentials);
|
this.validateResolvedCredentials(credentials);
|
||||||
const region = signingRegion ?? await this.regionProvider();
|
const region = signingRegion ?? await this.regionProvider();
|
||||||
const { shortDate } = this.formatDate(signingDate);
|
const { shortDate } = this.formatDate(signingDate);
|
||||||
@@ -34919,7 +35049,7 @@ var init_parseCborBody = __esm({
|
|||||||
});
|
});
|
||||||
};
|
};
|
||||||
loadSmithyRpcV2CborErrorCode = (output, data3) => {
|
loadSmithyRpcV2CborErrorCode = (output, data3) => {
|
||||||
const sanitizeErrorCode = (rawValue) => {
|
const sanitizeErrorCode2 = (rawValue) => {
|
||||||
let cleanValue = rawValue;
|
let cleanValue = rawValue;
|
||||||
if (typeof cleanValue === "number") {
|
if (typeof cleanValue === "number") {
|
||||||
cleanValue = cleanValue.toString();
|
cleanValue = cleanValue.toString();
|
||||||
@@ -34936,11 +35066,17 @@ var init_parseCborBody = __esm({
|
|||||||
return cleanValue;
|
return cleanValue;
|
||||||
};
|
};
|
||||||
if (data3["__type"] !== void 0) {
|
if (data3["__type"] !== void 0) {
|
||||||
return sanitizeErrorCode(data3["__type"]);
|
return sanitizeErrorCode2(data3["__type"]);
|
||||||
|
}
|
||||||
|
let codeKey;
|
||||||
|
for (const key in data3) {
|
||||||
|
if (key.toLowerCase() === "code") {
|
||||||
|
codeKey = key;
|
||||||
|
break;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
const codeKey = Object.keys(data3).find((key) => key.toLowerCase() === "code");
|
|
||||||
if (codeKey && data3[codeKey] !== void 0) {
|
if (codeKey && data3[codeKey] !== void 0) {
|
||||||
return sanitizeErrorCode(data3[codeKey]);
|
return sanitizeErrorCode2(data3[codeKey]);
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
@@ -35014,7 +35150,7 @@ var init_CborCodec = __esm({
|
|||||||
const newObject = {};
|
const newObject = {};
|
||||||
if (ns.isMapSchema()) {
|
if (ns.isMapSchema()) {
|
||||||
const sparse = !!ns.getMergedTraits().sparse;
|
const sparse = !!ns.getMergedTraits().sparse;
|
||||||
for (const key of Object.keys(sourceObject)) {
|
for (const key in sourceObject) {
|
||||||
const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
const value = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
||||||
if (value != null || sparse) {
|
if (value != null || sparse) {
|
||||||
newObject[key] = value;
|
newObject[key] = value;
|
||||||
@@ -35032,14 +35168,14 @@ var init_CborCodec = __esm({
|
|||||||
const [k5, v5] = sourceObject.$unknown;
|
const [k5, v5] = sourceObject.$unknown;
|
||||||
newObject[k5] = v5;
|
newObject[k5] = v5;
|
||||||
} else if (typeof sourceObject.__type === "string") {
|
} else if (typeof sourceObject.__type === "string") {
|
||||||
for (const [k5, v5] of Object.entries(sourceObject)) {
|
for (const k5 in sourceObject) {
|
||||||
if (!(k5 in newObject)) {
|
if (!(k5 in newObject)) {
|
||||||
newObject[k5] = this.serialize(15, v5);
|
newObject[k5] = this.serialize(15, sourceObject[k5]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
} else if (ns.isDocumentSchema()) {
|
} else if (ns.isDocumentSchema()) {
|
||||||
for (const key of Object.keys(sourceObject)) {
|
for (const key in sourceObject) {
|
||||||
newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
newObject[key] = this.serialize(ns.getValueSchema(), sourceObject[key]);
|
||||||
}
|
}
|
||||||
} else if (ns.isBigDecimalSchema()) {
|
} else if (ns.isBigDecimalSchema()) {
|
||||||
@@ -35105,7 +35241,7 @@ var init_CborCodec = __esm({
|
|||||||
const newObject = {};
|
const newObject = {};
|
||||||
if (ns.isMapSchema()) {
|
if (ns.isMapSchema()) {
|
||||||
const targetSchema = ns.getValueSchema();
|
const targetSchema = ns.getValueSchema();
|
||||||
for (const key of Object.keys(value)) {
|
for (const key in value) {
|
||||||
const itemValue = this.readValue(targetSchema, value[key]);
|
const itemValue = this.readValue(targetSchema, value[key]);
|
||||||
newObject[key] = itemValue;
|
newObject[key] = itemValue;
|
||||||
}
|
}
|
||||||
@@ -35113,7 +35249,12 @@ var init_CborCodec = __esm({
|
|||||||
const isUnion = ns.isUnionSchema();
|
const isUnion = ns.isUnionSchema();
|
||||||
let keys;
|
let keys;
|
||||||
if (isUnion) {
|
if (isUnion) {
|
||||||
keys = new Set(Object.keys(value).filter((k5) => k5 !== "__type"));
|
keys = /* @__PURE__ */ new Set();
|
||||||
|
for (const k5 in value) {
|
||||||
|
if (k5 !== "__type") {
|
||||||
|
keys.add(k5);
|
||||||
|
}
|
||||||
|
}
|
||||||
}
|
}
|
||||||
for (const [key, memberSchema] of ns.structIterator()) {
|
for (const [key, memberSchema] of ns.structIterator()) {
|
||||||
if (isUnion) {
|
if (isUnion) {
|
||||||
@@ -35123,13 +35264,20 @@ var init_CborCodec = __esm({
|
|||||||
newObject[key] = this.readValue(memberSchema, value[key]);
|
newObject[key] = this.readValue(memberSchema, value[key]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (isUnion && keys?.size === 1 && Object.keys(newObject).length === 0) {
|
if (isUnion && keys?.size === 1) {
|
||||||
|
let newObjectEmpty = true;
|
||||||
|
for (const _ in newObject) {
|
||||||
|
newObjectEmpty = false;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
if (newObjectEmpty) {
|
||||||
const k5 = keys.values().next().value;
|
const k5 = keys.values().next().value;
|
||||||
newObject.$unknown = [k5, value[k5]];
|
newObject.$unknown = [k5, value[k5]];
|
||||||
|
}
|
||||||
} else if (typeof value.__type === "string") {
|
} else if (typeof value.__type === "string") {
|
||||||
for (const [k5, v5] of Object.entries(value)) {
|
for (const k5 in value) {
|
||||||
if (!(k5 in newObject)) {
|
if (!(k5 in newObject)) {
|
||||||
newObject[k5] = v5;
|
newObject[k5] = value[k5];
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -35345,12 +35493,11 @@ var init_ProtocolLib = __esm({
|
|||||||
if (msg) {
|
if (msg) {
|
||||||
error2.message = msg;
|
error2.message = msg;
|
||||||
}
|
}
|
||||||
error2.Error = {
|
const errorObj = error2.Error ?? {};
|
||||||
...error2.Error,
|
errorObj.Type = error2.Error?.Type;
|
||||||
Type: error2.Error?.Type,
|
errorObj.Code = error2.Error?.Code;
|
||||||
Code: error2.Error?.Code,
|
errorObj.Message = error2.Error?.message ?? error2.Error?.Message ?? msg;
|
||||||
Message: error2.Error?.message ?? error2.Error?.Message ?? msg
|
error2.Error = errorObj;
|
||||||
};
|
|
||||||
const reqId = error2.$metadata.requestId;
|
const reqId = error2.$metadata.requestId;
|
||||||
if (reqId) {
|
if (reqId) {
|
||||||
error2.RequestId = reqId;
|
error2.RequestId = reqId;
|
||||||
@@ -35363,14 +35510,16 @@ var init_ProtocolLib = __esm({
|
|||||||
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
|
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
|
||||||
if (output !== void 0 && queryErrorHeader != null) {
|
if (output !== void 0 && queryErrorHeader != null) {
|
||||||
const [Code, Type] = queryErrorHeader.split(";");
|
const [Code, Type] = queryErrorHeader.split(";");
|
||||||
const entries = Object.entries(output);
|
const keys = Object.keys(output);
|
||||||
const Error2 = {
|
const Error2 = {
|
||||||
Code,
|
Code,
|
||||||
Type
|
Type
|
||||||
};
|
};
|
||||||
Object.assign(output, Error2);
|
output.Code = Code;
|
||||||
for (const [k5, v5] of entries) {
|
output.Type = Type;
|
||||||
Error2[k5 === "message" ? "Message" : k5] = v5;
|
for (let i5 = 0; i5 < keys.length; i5++) {
|
||||||
|
const k5 = keys[i5];
|
||||||
|
Error2[k5 === "message" ? "Message" : k5] = output[k5];
|
||||||
}
|
}
|
||||||
delete Error2.__type;
|
delete Error2.__type;
|
||||||
output.Error = Error2;
|
output.Error = Error2;
|
||||||
@@ -35539,7 +35688,10 @@ var init_UnionSerde = __esm({
|
|||||||
constructor(from, to) {
|
constructor(from, to) {
|
||||||
this.from = from;
|
this.from = from;
|
||||||
this.to = to;
|
this.to = to;
|
||||||
this.keys = new Set(Object.keys(this.from).filter((k5) => k5 !== "__type"));
|
const keys = Object.keys(this.from);
|
||||||
|
const set = new Set(keys);
|
||||||
|
set.delete("__type");
|
||||||
|
this.keys = set;
|
||||||
}
|
}
|
||||||
mark(key) {
|
mark(key) {
|
||||||
this.keys.delete(key);
|
this.keys.delete(key);
|
||||||
@@ -35592,7 +35744,7 @@ var init_common = __esm({
|
|||||||
});
|
});
|
||||||
|
|
||||||
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js
|
// node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js
|
||||||
var parseJsonBody, parseJsonErrorBody, loadRestJsonErrorCode;
|
var parseJsonBody, parseJsonErrorBody, findKey, sanitizeErrorCode, loadRestJsonErrorCode;
|
||||||
var init_parseJsonBody = __esm({
|
var init_parseJsonBody = __esm({
|
||||||
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
|
"node_modules/@aws-sdk/core/dist-es/submodules/protocols/json/parseJsonBody.js"() {
|
||||||
init_common();
|
init_common();
|
||||||
@@ -35616,9 +35768,8 @@ var init_parseJsonBody = __esm({
|
|||||||
value.message = value.message ?? value.Message;
|
value.message = value.message ?? value.Message;
|
||||||
return value;
|
return value;
|
||||||
};
|
};
|
||||||
loadRestJsonErrorCode = (output, data3) => {
|
findKey = (object, key) => Object.keys(object).find((k5) => k5.toLowerCase() === key.toLowerCase());
|
||||||
const findKey = (object, key) => Object.keys(object).find((k5) => k5.toLowerCase() === key.toLowerCase());
|
sanitizeErrorCode = (rawValue) => {
|
||||||
const sanitizeErrorCode = (rawValue) => {
|
|
||||||
let cleanValue = rawValue;
|
let cleanValue = rawValue;
|
||||||
if (typeof cleanValue === "number") {
|
if (typeof cleanValue === "number") {
|
||||||
cleanValue = cleanValue.toString();
|
cleanValue = cleanValue.toString();
|
||||||
@@ -35634,6 +35785,7 @@ var init_parseJsonBody = __esm({
|
|||||||
}
|
}
|
||||||
return cleanValue;
|
return cleanValue;
|
||||||
};
|
};
|
||||||
|
loadRestJsonErrorCode = (output, data3) => {
|
||||||
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
const headerKey = findKey(output.headers, "x-amzn-errortype");
|
||||||
if (headerKey !== void 0) {
|
if (headerKey !== void 0) {
|
||||||
return sanitizeErrorCode(output.headers[headerKey]);
|
return sanitizeErrorCode(output.headers[headerKey]);
|
||||||
@@ -35708,7 +35860,8 @@ var init_JsonShapeDeserializer = __esm({
|
|||||||
if (union) {
|
if (union) {
|
||||||
unionSerde.writeUnknown();
|
unionSerde.writeUnknown();
|
||||||
} else if (typeof record.__type === "string") {
|
} else if (typeof record.__type === "string") {
|
||||||
for (const [k5, v5] of Object.entries(record)) {
|
for (const k5 in record) {
|
||||||
|
const v5 = record[k5];
|
||||||
const t5 = jsonName ? nameMap[k5] ?? k5 : k5;
|
const t5 = jsonName ? nameMap[k5] ?? k5 : k5;
|
||||||
if (!(t5 in out)) {
|
if (!(t5 in out)) {
|
||||||
out[t5] = v5;
|
out[t5] = v5;
|
||||||
@@ -35728,8 +35881,8 @@ var init_JsonShapeDeserializer = __esm({
|
|||||||
if (ns.isMapSchema()) {
|
if (ns.isMapSchema()) {
|
||||||
const mapMember = ns.getValueSchema();
|
const mapMember = ns.getValueSchema();
|
||||||
const out = {};
|
const out = {};
|
||||||
for (const [_k, _v] of Object.entries(value)) {
|
for (const _k in value) {
|
||||||
out[_k] = this._read(mapMember, _v);
|
out[_k] = this._read(mapMember, value[_k]);
|
||||||
}
|
}
|
||||||
return out;
|
return out;
|
||||||
}
|
}
|
||||||
@@ -35786,7 +35939,8 @@ var init_JsonShapeDeserializer = __esm({
|
|||||||
if (ns.isDocumentSchema()) {
|
if (ns.isDocumentSchema()) {
|
||||||
if (isObject) {
|
if (isObject) {
|
||||||
const out = Array.isArray(value) ? [] : {};
|
const out = Array.isArray(value) ? [] : {};
|
||||||
for (const [k5, v5] of Object.entries(value)) {
|
for (const k5 in value) {
|
||||||
|
const v5 = value[k5];
|
||||||
if (v5 instanceof NumericValue) {
|
if (v5 instanceof NumericValue) {
|
||||||
out[k5] = v5;
|
out[k5] = v5;
|
||||||
} else {
|
} else {
|
||||||
@@ -35880,12 +36034,6 @@ var init_JsonShapeSerializer = __esm({
|
|||||||
this.rootSchema = NormalizedSchema.of(schema);
|
this.rootSchema = NormalizedSchema.of(schema);
|
||||||
this.buffer = this._write(this.rootSchema, value);
|
this.buffer = this._write(this.rootSchema, value);
|
||||||
}
|
}
|
||||||
writeDiscriminatedDocument(schema, value) {
|
|
||||||
this.write(schema, value);
|
|
||||||
if (typeof this.buffer === "object") {
|
|
||||||
this.buffer.__type = NormalizedSchema.of(schema).getName(true);
|
|
||||||
}
|
|
||||||
}
|
|
||||||
flush() {
|
flush() {
|
||||||
const { rootSchema, useReplacer } = this;
|
const { rootSchema, useReplacer } = this;
|
||||||
this.rootSchema = void 0;
|
this.rootSchema = void 0;
|
||||||
@@ -35899,6 +36047,12 @@ var init_JsonShapeSerializer = __esm({
|
|||||||
}
|
}
|
||||||
return this.buffer;
|
return this.buffer;
|
||||||
}
|
}
|
||||||
|
writeDiscriminatedDocument(schema, value) {
|
||||||
|
this.write(schema, value);
|
||||||
|
if (typeof this.buffer === "object") {
|
||||||
|
this.buffer.__type = NormalizedSchema.of(schema).getName(true);
|
||||||
|
}
|
||||||
|
}
|
||||||
_write(schema, value, container) {
|
_write(schema, value, container) {
|
||||||
const isObject = value !== null && typeof value === "object";
|
const isObject = value !== null && typeof value === "object";
|
||||||
const ns = NormalizedSchema.of(schema);
|
const ns = NormalizedSchema.of(schema);
|
||||||
@@ -35911,6 +36065,7 @@ var init_JsonShapeSerializer = __esm({
|
|||||||
if (jsonName) {
|
if (jsonName) {
|
||||||
nameMap = {};
|
nameMap = {};
|
||||||
}
|
}
|
||||||
|
let outCount = 0;
|
||||||
for (const [memberName, memberSchema] of ns.structIterator()) {
|
for (const [memberName, memberSchema] of ns.structIterator()) {
|
||||||
const serializableValue = this._write(memberSchema, record[memberName], ns);
|
const serializableValue = this._write(memberSchema, record[memberName], ns);
|
||||||
if (serializableValue !== void 0) {
|
if (serializableValue !== void 0) {
|
||||||
@@ -35920,16 +36075,18 @@ var init_JsonShapeSerializer = __esm({
|
|||||||
nameMap[memberName] = targetKey;
|
nameMap[memberName] = targetKey;
|
||||||
}
|
}
|
||||||
out[targetKey] = serializableValue;
|
out[targetKey] = serializableValue;
|
||||||
|
outCount++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (ns.isUnionSchema() && Object.keys(out).length === 0) {
|
if (ns.isUnionSchema() && outCount === 0) {
|
||||||
const { $unknown } = record;
|
const { $unknown } = record;
|
||||||
if (Array.isArray($unknown)) {
|
if (Array.isArray($unknown)) {
|
||||||
const [k5, v5] = $unknown;
|
const [k5, v5] = $unknown;
|
||||||
out[k5] = this._write(15, v5);
|
out[k5] = this._write(15, v5);
|
||||||
}
|
}
|
||||||
} else if (typeof record.__type === "string") {
|
} else if (typeof record.__type === "string") {
|
||||||
for (const [k5, v5] of Object.entries(record)) {
|
for (const k5 in record) {
|
||||||
|
const v5 = record[k5];
|
||||||
const targetKey = jsonName ? nameMap[k5] ?? k5 : k5;
|
const targetKey = jsonName ? nameMap[k5] ?? k5 : k5;
|
||||||
if (!(targetKey in out)) {
|
if (!(targetKey in out)) {
|
||||||
out[targetKey] = this._write(15, v5);
|
out[targetKey] = this._write(15, v5);
|
||||||
@@ -35953,7 +36110,8 @@ var init_JsonShapeSerializer = __esm({
|
|||||||
const mapMember = ns.getValueSchema();
|
const mapMember = ns.getValueSchema();
|
||||||
const out = {};
|
const out = {};
|
||||||
const sparse = !!ns.getMergedTraits().sparse;
|
const sparse = !!ns.getMergedTraits().sparse;
|
||||||
for (const [_k, _v] of Object.entries(value)) {
|
for (const _k in value) {
|
||||||
|
const _v = value[_k];
|
||||||
if (sparse || _v != null) {
|
if (sparse || _v != null) {
|
||||||
out[_k] = this._write(mapMember, _v);
|
out[_k] = this._write(mapMember, _v);
|
||||||
}
|
}
|
||||||
@@ -36018,7 +36176,8 @@ var init_JsonShapeSerializer = __esm({
|
|||||||
if (ns.isDocumentSchema()) {
|
if (ns.isDocumentSchema()) {
|
||||||
if (isObject) {
|
if (isObject) {
|
||||||
const out = Array.isArray(value) ? [] : {};
|
const out = Array.isArray(value) ? [] : {};
|
||||||
for (const [k5, v5] of Object.entries(value)) {
|
for (const k5 in value) {
|
||||||
|
const v5 = value[k5];
|
||||||
if (v5 instanceof NumericValue) {
|
if (v5 instanceof NumericValue) {
|
||||||
this.useReplacer = true;
|
this.useReplacer = true;
|
||||||
out[k5] = v5;
|
out[k5] = v5;
|
||||||
@@ -36103,10 +36262,8 @@ var init_AwsJsonRpcProtocol = __esm({
|
|||||||
if (!request.path.endsWith("/")) {
|
if (!request.path.endsWith("/")) {
|
||||||
request.path += "/";
|
request.path += "/";
|
||||||
}
|
}
|
||||||
Object.assign(request.headers, {
|
request.headers["content-type"] = `application/x-amz-json-${this.getJsonRpcVersion()}`;
|
||||||
"content-type": `application/x-amz-json-${this.getJsonRpcVersion()}`,
|
request.headers["x-amz-target"] = `${this.serviceTarget}.${operationSchema.name}`;
|
||||||
"x-amz-target": `${this.serviceTarget}.${operationSchema.name}`
|
|
||||||
});
|
|
||||||
if (this.awsQueryCompatible) {
|
if (this.awsQueryCompatible) {
|
||||||
request.headers["x-amzn-query-mode"] = "true";
|
request.headers["x-amzn-query-mode"] = "true";
|
||||||
}
|
}
|
||||||
@@ -36130,9 +36287,10 @@ var init_AwsJsonRpcProtocol = __esm({
|
|||||||
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
const ErrorCtor = this.compositeErrorRegistry.getErrorCtor(errorSchema) ?? Error;
|
||||||
const exception = new ErrorCtor(message);
|
const exception = new ErrorCtor(message);
|
||||||
const output = {};
|
const output = {};
|
||||||
|
const errorDeserializer = this.codec.createDeserializer();
|
||||||
for (const [name, member2] of ns.structIterator()) {
|
for (const [name, member2] of ns.structIterator()) {
|
||||||
if (dataObject[name] != null) {
|
if (dataObject[name] != null) {
|
||||||
output[name] = this.codec.createDeserializer().readObject(member2, dataObject[name]);
|
output[name] = errorDeserializer.readObject(member2, dataObject[name]);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
if (this.awsQueryCompatible) {
|
if (this.awsQueryCompatible) {
|
||||||
@@ -36278,9 +36436,10 @@ var init_AwsRestJsonProtocol = __esm({
|
|||||||
const exception = new ErrorCtor(message);
|
const exception = new ErrorCtor(message);
|
||||||
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
||||||
const output = {};
|
const output = {};
|
||||||
|
const errorDeserializer = this.codec.createDeserializer();
|
||||||
for (const [name, member2] of ns.structIterator()) {
|
for (const [name, member2] of ns.structIterator()) {
|
||||||
const target = member2.getMergedTraits().jsonName ?? name;
|
const target = member2.getMergedTraits().jsonName ?? name;
|
||||||
output[name] = this.codec.createDeserializer().readObject(member2, dataObject[target]);
|
output[name] = errorDeserializer.readObject(member2, dataObject[target]);
|
||||||
}
|
}
|
||||||
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
||||||
$fault: ns.getMergedTraits().error,
|
$fault: ns.getMergedTraits().error,
|
||||||
@@ -38025,7 +38184,8 @@ var init_QueryShapeSerializer = __esm({
|
|||||||
const memberSchema = ns.getValueSchema();
|
const memberSchema = ns.getValueSchema();
|
||||||
const flat = ns.getMergedTraits().xmlFlattened;
|
const flat = ns.getMergedTraits().xmlFlattened;
|
||||||
let i5 = 1;
|
let i5 = 1;
|
||||||
for (const [k5, v5] of Object.entries(value)) {
|
for (const k5 in value) {
|
||||||
|
const v5 = value[k5];
|
||||||
if (v5 == null) {
|
if (v5 == null) {
|
||||||
continue;
|
continue;
|
||||||
}
|
}
|
||||||
@@ -38147,9 +38307,7 @@ var init_AwsQueryProtocol = __esm({
|
|||||||
if (!request.path.endsWith("/")) {
|
if (!request.path.endsWith("/")) {
|
||||||
request.path += "/";
|
request.path += "/";
|
||||||
}
|
}
|
||||||
Object.assign(request.headers, {
|
request.headers["content-type"] = "application/x-www-form-urlencoded";
|
||||||
"content-type": `application/x-www-form-urlencoded`
|
|
||||||
});
|
|
||||||
if (deref(operationSchema.input) === "unit" || !request.body) {
|
if (deref(operationSchema.input) === "unit" || !request.body) {
|
||||||
request.body = "";
|
request.body = "";
|
||||||
}
|
}
|
||||||
@@ -38182,11 +38340,8 @@ var init_AwsQueryProtocol = __esm({
|
|||||||
if (bytes.byteLength > 0) {
|
if (bytes.byteLength > 0) {
|
||||||
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
||||||
}
|
}
|
||||||
const output = {
|
dataObject.$metadata = this.deserializeMetadata(response);
|
||||||
$metadata: this.deserializeMetadata(response),
|
return dataObject;
|
||||||
...dataObject
|
|
||||||
};
|
|
||||||
return output;
|
|
||||||
}
|
}
|
||||||
useNestedResult() {
|
useNestedResult() {
|
||||||
return true;
|
return true;
|
||||||
@@ -38508,7 +38663,8 @@ var init_XmlShapeSerializer = __esm({
|
|||||||
entry.addChildNode(valueNode);
|
entry.addChildNode(valueNode);
|
||||||
};
|
};
|
||||||
if (flat) {
|
if (flat) {
|
||||||
for (const [key, val] of Object.entries(map2)) {
|
for (const key in map2) {
|
||||||
|
const val = map2[key];
|
||||||
if (sparse || val != null) {
|
if (sparse || val != null) {
|
||||||
const entry = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
|
const entry = import_xml_builder3.XmlNode.of(mapTraits.xmlName ?? mapMember.getMemberName());
|
||||||
addKeyValue(entry, key, val);
|
addKeyValue(entry, key, val);
|
||||||
@@ -38524,7 +38680,8 @@ var init_XmlShapeSerializer = __esm({
|
|||||||
}
|
}
|
||||||
container.addChildNode(mapNode);
|
container.addChildNode(mapNode);
|
||||||
}
|
}
|
||||||
for (const [key, val] of Object.entries(map2)) {
|
for (const key in map2) {
|
||||||
|
const val = map2[key];
|
||||||
if (sparse || val != null) {
|
if (sparse || val != null) {
|
||||||
const entry = import_xml_builder3.XmlNode.of("entry");
|
const entry = import_xml_builder3.XmlNode.of("entry");
|
||||||
addKeyValue(entry, key, val);
|
addKeyValue(entry, key, val);
|
||||||
@@ -38708,10 +38865,11 @@ var init_AwsRestXmlProtocol = __esm({
|
|||||||
const exception = new ErrorCtor(message);
|
const exception = new ErrorCtor(message);
|
||||||
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
await this.deserializeHttpMessage(errorSchema, context, response, dataObject);
|
||||||
const output = {};
|
const output = {};
|
||||||
|
const errorDeserializer = this.codec.createDeserializer();
|
||||||
for (const [name, member2] of ns.structIterator()) {
|
for (const [name, member2] of ns.structIterator()) {
|
||||||
const target = member2.getMergedTraits().xmlName ?? name;
|
const target = member2.getMergedTraits().xmlName ?? name;
|
||||||
const value = dataObject.Error?.[target] ?? dataObject[target];
|
const value = dataObject.Error?.[target] ?? dataObject[target];
|
||||||
output[name] = this.codec.createDeserializer().readSchema(member2, value);
|
output[name] = errorDeserializer.readSchema(member2, value);
|
||||||
}
|
}
|
||||||
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
||||||
$fault: ns.getMergedTraits().error,
|
$fault: ns.getMergedTraits().error,
|
||||||
|
|||||||
Reference in New Issue
Block a user