@jr2804/livesync-cli 0.25.82-cli → 1.0.0-cli.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/AwsRestJsonProtocol-BPmCQzXa.cjs +391 -0
- package/dist/CredentialsProviderError-DQ_v7TCm.cjs +45 -0
- package/dist/XmlShapeDeserializer-B1_gcW92.cjs +2097 -0
- package/dist/bundle.cjs +152019 -0
- package/dist/chain-D9g13I5f.cjs +21 -0
- package/dist/common-B3KclSP_.cjs +375 -0
- package/dist/configLoader-Cur07c2S.cjs +149 -0
- package/dist/date-utils-Dr5LXq4_.cjs +338 -0
- package/dist/dist-es-BU2b9jKG.cjs +274 -0
- package/dist/dist-es-CaaxKLO9.cjs +52 -0
- package/dist/dist-es-D7nIauPC.cjs +60 -0
- package/dist/dist-es-DhxfSNMj.cjs +128 -0
- package/dist/dist-es-FcX9AtZC.cjs +433 -0
- package/dist/dist-es-vq3O1QUl.cjs +331 -0
- package/dist/esbuild.config.cjs +24 -0
- package/dist/event-streams-DmrxQXpO.cjs +195 -0
- package/dist/extensions-DkDzTVCO.cjs +4823 -0
- package/dist/externalDataInterceptor-D7DaIG7M.cjs +24 -0
- package/dist/getSSOTokenFromFile-D0KPH2qZ.cjs +36 -0
- package/dist/httpRequest-C7Ex2WeE.cjs +59 -0
- package/dist/index.cjs +32679 -37133
- package/dist/loadSharedConfigFiles-CqEQHuLW.cjs +117 -0
- package/dist/loadSso-Dn78jIWR.cjs +639 -0
- package/dist/package-BC7A0_n0.cjs +158 -0
- package/dist/parseKnownFiles-DLeTaAhg.cjs +21 -0
- package/dist/readFile-B3ey_wDD.cjs +46 -0
- package/dist/sdk-stream-mixin-YBLWtp6l.cjs +146 -0
- package/dist/serde-DtADB-gG.cjs +597 -0
- package/dist/setCredentialFeature-qcUbSyqa.cjs +13 -0
- package/dist/signin-DHnd2WFx.cjs +715 -0
- package/dist/sso-oidc-B4fkm2gn.cjs +901 -0
- package/dist/stream-collector-jwXXBEUn.cjs +584 -0
- package/dist/sts-C9aqjeec.cjs +1531 -0
- package/package.json +2 -4
|
@@ -0,0 +1,4823 @@
|
|
|
1
|
+
const require_stream_collector = require("./stream-collector-jwXXBEUn.cjs");
|
|
2
|
+
const require_httpRequest = require("./httpRequest-C7Ex2WeE.cjs");
|
|
3
|
+
const require_setCredentialFeature = require("./setCredentialFeature-qcUbSyqa.cjs");
|
|
4
|
+
const require_date_utils = require("./date-utils-Dr5LXq4_.cjs");
|
|
5
|
+
const require_serde = require("./serde-DtADB-gG.cjs");
|
|
6
|
+
const require_configLoader = require("./configLoader-Cur07c2S.cjs");
|
|
7
|
+
let node_fs = require("node:fs");
|
|
8
|
+
let node_fs_promises = require("node:fs/promises");
|
|
9
|
+
let node_path = require("node:path");
|
|
10
|
+
let node_os = require("node:os");
|
|
11
|
+
let stream = require("stream");
|
|
12
|
+
let buffer = require("buffer");
|
|
13
|
+
let crypto$1 = require("crypto");
|
|
14
|
+
crypto$1 = require_stream_collector.__toESM(crypto$1);
|
|
15
|
+
let node_process = require("node:process");
|
|
16
|
+
//#region ../../../node_modules/@smithy/protocol-http/dist-es/extensions/httpExtensionConfiguration.js
|
|
17
|
+
var getHttpHandlerExtensionConfiguration = (runtimeConfig) => {
|
|
18
|
+
return {
|
|
19
|
+
setHttpHandler(handler) {
|
|
20
|
+
runtimeConfig.httpHandler = handler;
|
|
21
|
+
},
|
|
22
|
+
httpHandler() {
|
|
23
|
+
return runtimeConfig.httpHandler;
|
|
24
|
+
},
|
|
25
|
+
updateHttpClientConfig(key, value) {
|
|
26
|
+
runtimeConfig.httpHandler?.updateHttpClientConfig(key, value);
|
|
27
|
+
},
|
|
28
|
+
httpHandlerConfigs() {
|
|
29
|
+
return runtimeConfig.httpHandler.httpHandlerConfigs();
|
|
30
|
+
}
|
|
31
|
+
};
|
|
32
|
+
};
|
|
33
|
+
var resolveHttpHandlerRuntimeConfig = (httpHandlerExtensionConfiguration) => {
|
|
34
|
+
return { httpHandler: httpHandlerExtensionConfiguration.httpHandler() };
|
|
35
|
+
};
|
|
36
|
+
//#endregion
|
|
37
|
+
//#region ../../../node_modules/@smithy/types/dist-es/endpoint.js
|
|
38
|
+
var EndpointURLScheme;
|
|
39
|
+
(function(EndpointURLScheme) {
|
|
40
|
+
EndpointURLScheme["HTTP"] = "http";
|
|
41
|
+
EndpointURLScheme["HTTPS"] = "https";
|
|
42
|
+
})(EndpointURLScheme || (EndpointURLScheme = {}));
|
|
43
|
+
//#endregion
|
|
44
|
+
//#region ../../../node_modules/@smithy/types/dist-es/extensions/checksum.js
|
|
45
|
+
var AlgorithmId;
|
|
46
|
+
(function(AlgorithmId) {
|
|
47
|
+
AlgorithmId["MD5"] = "md5";
|
|
48
|
+
AlgorithmId["CRC32"] = "crc32";
|
|
49
|
+
AlgorithmId["CRC32C"] = "crc32c";
|
|
50
|
+
AlgorithmId["SHA1"] = "sha1";
|
|
51
|
+
AlgorithmId["SHA256"] = "sha256";
|
|
52
|
+
})(AlgorithmId || (AlgorithmId = {}));
|
|
53
|
+
//#endregion
|
|
54
|
+
//#region ../../../node_modules/@smithy/types/dist-es/middleware.js
|
|
55
|
+
var SMITHY_CONTEXT_KEY = "__smithy_context";
|
|
56
|
+
//#endregion
|
|
57
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/client/emitWarningIfUnsupportedVersion.js
|
|
58
|
+
var state = { warningEmitted: false };
|
|
59
|
+
var emitWarningIfUnsupportedVersion$1 = (version) => {
|
|
60
|
+
if (version && !state.warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 20) {
|
|
61
|
+
state.warningEmitted = true;
|
|
62
|
+
process.emitWarning(`NodeDeprecationWarning: The AWS SDK for JavaScript (v3) will
|
|
63
|
+
no longer support Node.js ${version} in January 2026.
|
|
64
|
+
|
|
65
|
+
To continue receiving updates to AWS services, bug fixes, and security
|
|
66
|
+
updates please upgrade to a supported Node.js LTS version.
|
|
67
|
+
|
|
68
|
+
More information can be found at: https://a.co/c895JFp`);
|
|
69
|
+
}
|
|
70
|
+
};
|
|
71
|
+
//#endregion
|
|
72
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/client/setFeature.js
|
|
73
|
+
function setFeature$1(context, feature, value) {
|
|
74
|
+
if (!context.__aws_sdk_context) context.__aws_sdk_context = { features: {} };
|
|
75
|
+
else if (!context.__aws_sdk_context.features) context.__aws_sdk_context.features = {};
|
|
76
|
+
context.__aws_sdk_context.features[feature] = value;
|
|
77
|
+
}
|
|
78
|
+
//#endregion
|
|
79
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getDateHeader.js
|
|
80
|
+
var getDateHeader = (response) => require_stream_collector.HttpResponse.isInstance(response) ? response.headers?.date ?? response.headers?.Date : void 0;
|
|
81
|
+
//#endregion
|
|
82
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getSkewCorrectedDate.js
|
|
83
|
+
var getSkewCorrectedDate = (systemClockOffset) => new Date(Date.now() + systemClockOffset);
|
|
84
|
+
//#endregion
|
|
85
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/isClockSkewed.js
|
|
86
|
+
var isClockSkewed = (clockTime, systemClockOffset) => Math.abs(getSkewCorrectedDate(systemClockOffset).getTime() - clockTime) >= 3e5;
|
|
87
|
+
//#endregion
|
|
88
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getUpdatedSystemClockOffset.js
|
|
89
|
+
var getUpdatedSystemClockOffset = (clockTime, currentSystemClockOffset) => {
|
|
90
|
+
const clockTimeInMs = Date.parse(clockTime);
|
|
91
|
+
if (isClockSkewed(clockTimeInMs, currentSystemClockOffset)) return clockTimeInMs - Date.now();
|
|
92
|
+
return currentSystemClockOffset;
|
|
93
|
+
};
|
|
94
|
+
//#endregion
|
|
95
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/AwsSdkSigV4Signer.js
|
|
96
|
+
var throwSigningPropertyError = (name, property) => {
|
|
97
|
+
if (!property) throw new Error(`Property \`${name}\` is not resolved for AWS SDK SigV4Auth`);
|
|
98
|
+
return property;
|
|
99
|
+
};
|
|
100
|
+
var validateSigningProperties = async (signingProperties) => {
|
|
101
|
+
const context = throwSigningPropertyError("context", signingProperties.context);
|
|
102
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
103
|
+
const authScheme = context.endpointV2?.properties?.authSchemes?.[0];
|
|
104
|
+
return {
|
|
105
|
+
config,
|
|
106
|
+
signer: await throwSigningPropertyError("signer", config.signer)(authScheme),
|
|
107
|
+
signingRegion: signingProperties?.signingRegion,
|
|
108
|
+
signingRegionSet: signingProperties?.signingRegionSet,
|
|
109
|
+
signingName: signingProperties?.signingName
|
|
110
|
+
};
|
|
111
|
+
};
|
|
112
|
+
var AwsSdkSigV4Signer = class {
|
|
113
|
+
async sign(httpRequest, identity, signingProperties) {
|
|
114
|
+
if (!require_httpRequest.HttpRequest.isInstance(httpRequest)) throw new Error("The request is not an instance of `HttpRequest` and cannot be signed");
|
|
115
|
+
const validatedProps = await validateSigningProperties(signingProperties);
|
|
116
|
+
const { config, signer } = validatedProps;
|
|
117
|
+
let { signingRegion, signingName } = validatedProps;
|
|
118
|
+
const handlerExecutionContext = signingProperties.context;
|
|
119
|
+
if (handlerExecutionContext?.authSchemes?.length ?? false) {
|
|
120
|
+
const [first, second] = handlerExecutionContext.authSchemes;
|
|
121
|
+
if (first?.name === "sigv4a" && second?.name === "sigv4") {
|
|
122
|
+
signingRegion = second?.signingRegion ?? signingRegion;
|
|
123
|
+
signingName = second?.signingName ?? signingName;
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
return await signer.sign(httpRequest, {
|
|
127
|
+
signingDate: getSkewCorrectedDate(config.systemClockOffset),
|
|
128
|
+
signingRegion,
|
|
129
|
+
signingService: signingName
|
|
130
|
+
});
|
|
131
|
+
}
|
|
132
|
+
errorHandler(signingProperties) {
|
|
133
|
+
return (error) => {
|
|
134
|
+
const serverTime = error.ServerTime ?? getDateHeader(error.$response);
|
|
135
|
+
if (serverTime) {
|
|
136
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
137
|
+
const initialSystemClockOffset = config.systemClockOffset;
|
|
138
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(serverTime, config.systemClockOffset);
|
|
139
|
+
if (config.systemClockOffset !== initialSystemClockOffset && error.$metadata) error.$metadata.clockSkewCorrected = true;
|
|
140
|
+
}
|
|
141
|
+
throw error;
|
|
142
|
+
};
|
|
143
|
+
}
|
|
144
|
+
successHandler(httpResponse, signingProperties) {
|
|
145
|
+
const dateHeader = getDateHeader(httpResponse);
|
|
146
|
+
if (dateHeader) {
|
|
147
|
+
const config = throwSigningPropertyError("config", signingProperties.config);
|
|
148
|
+
config.systemClockOffset = getUpdatedSystemClockOffset(dateHeader, config.systemClockOffset);
|
|
149
|
+
}
|
|
150
|
+
}
|
|
151
|
+
};
|
|
152
|
+
//#endregion
|
|
153
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getArrayForCommaSeparatedString.js
|
|
154
|
+
var getArrayForCommaSeparatedString = (str) => typeof str === "string" && str.length > 0 ? str.split(",").map((item) => item.trim()) : [];
|
|
155
|
+
//#endregion
|
|
156
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/utils/getBearerTokenEnvKey.js
|
|
157
|
+
var getBearerTokenEnvKey = (signingName) => `AWS_BEARER_TOKEN_${signingName.replace(/[\s-]/g, "_").toUpperCase()}`;
|
|
158
|
+
//#endregion
|
|
159
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/NODE_AUTH_SCHEME_PREFERENCE_OPTIONS.js
|
|
160
|
+
var NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY = "AWS_AUTH_SCHEME_PREFERENCE";
|
|
161
|
+
var NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY = "auth_scheme_preference";
|
|
162
|
+
var NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = {
|
|
163
|
+
environmentVariableSelector: (env, options) => {
|
|
164
|
+
if (options?.signingName) {
|
|
165
|
+
if (getBearerTokenEnvKey(options.signingName) in env) return ["httpBearerAuth"];
|
|
166
|
+
}
|
|
167
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY in env)) return void 0;
|
|
168
|
+
return getArrayForCommaSeparatedString(env[NODE_AUTH_SCHEME_PREFERENCE_ENV_KEY]);
|
|
169
|
+
},
|
|
170
|
+
configFileSelector: (profile) => {
|
|
171
|
+
if (!(NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY in profile)) return void 0;
|
|
172
|
+
return getArrayForCommaSeparatedString(profile[NODE_AUTH_SCHEME_PREFERENCE_CONFIG_KEY]);
|
|
173
|
+
},
|
|
174
|
+
default: []
|
|
175
|
+
};
|
|
176
|
+
//#endregion
|
|
177
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/transport/getSmithyContext.js
|
|
178
|
+
var getSmithyContext$1 = (context) => context["__smithy_context"] || (context["__smithy_context"] = {});
|
|
179
|
+
//#endregion
|
|
180
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/transport/httpRequest.js
|
|
181
|
+
var HttpRequest = class HttpRequest {
|
|
182
|
+
method;
|
|
183
|
+
protocol;
|
|
184
|
+
hostname;
|
|
185
|
+
port;
|
|
186
|
+
path;
|
|
187
|
+
query;
|
|
188
|
+
headers;
|
|
189
|
+
username;
|
|
190
|
+
password;
|
|
191
|
+
fragment;
|
|
192
|
+
body;
|
|
193
|
+
constructor(options) {
|
|
194
|
+
this.method = options.method || "GET";
|
|
195
|
+
this.hostname = options.hostname || "localhost";
|
|
196
|
+
this.port = options.port;
|
|
197
|
+
this.query = options.query || {};
|
|
198
|
+
this.headers = options.headers || {};
|
|
199
|
+
this.body = options.body;
|
|
200
|
+
this.protocol = options.protocol ? options.protocol.slice(-1) !== ":" ? `${options.protocol}:` : options.protocol : "https:";
|
|
201
|
+
this.path = options.path ? options.path.charAt(0) !== "/" ? `/${options.path}` : options.path : "/";
|
|
202
|
+
this.username = options.username;
|
|
203
|
+
this.password = options.password;
|
|
204
|
+
this.fragment = options.fragment;
|
|
205
|
+
}
|
|
206
|
+
static clone(request) {
|
|
207
|
+
const cloned = new HttpRequest({
|
|
208
|
+
...request,
|
|
209
|
+
headers: { ...request.headers }
|
|
210
|
+
});
|
|
211
|
+
if (cloned.query) cloned.query = cloneQuery(cloned.query);
|
|
212
|
+
return cloned;
|
|
213
|
+
}
|
|
214
|
+
static isInstance(request) {
|
|
215
|
+
if (!request) return false;
|
|
216
|
+
const req = request;
|
|
217
|
+
return "method" in req && "protocol" in req && "hostname" in req && "path" in req && typeof req["query"] === "object" && typeof req["headers"] === "object";
|
|
218
|
+
}
|
|
219
|
+
clone() {
|
|
220
|
+
return HttpRequest.clone(this);
|
|
221
|
+
}
|
|
222
|
+
};
|
|
223
|
+
function cloneQuery(query) {
|
|
224
|
+
return Object.keys(query).reduce((carry, paramName) => {
|
|
225
|
+
const param = query[paramName];
|
|
226
|
+
return {
|
|
227
|
+
...carry,
|
|
228
|
+
[paramName]: Array.isArray(param) ? [...param] : param
|
|
229
|
+
};
|
|
230
|
+
}, {});
|
|
231
|
+
}
|
|
232
|
+
//#endregion
|
|
233
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/transport/httpResponse.js
|
|
234
|
+
var HttpResponse = class {
|
|
235
|
+
statusCode;
|
|
236
|
+
reason;
|
|
237
|
+
headers;
|
|
238
|
+
body;
|
|
239
|
+
constructor(options) {
|
|
240
|
+
this.statusCode = options.statusCode;
|
|
241
|
+
this.reason = options.reason;
|
|
242
|
+
this.headers = options.headers || {};
|
|
243
|
+
this.body = options.body;
|
|
244
|
+
}
|
|
245
|
+
static isInstance(response) {
|
|
246
|
+
if (!response) return false;
|
|
247
|
+
const resp = response;
|
|
248
|
+
return typeof resp.statusCode === "number" && typeof resp.headers === "object";
|
|
249
|
+
}
|
|
250
|
+
};
|
|
251
|
+
//#endregion
|
|
252
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/transport/parseQueryString.js
|
|
253
|
+
function parseQueryString(querystring) {
|
|
254
|
+
const query = {};
|
|
255
|
+
querystring = querystring.replace(/^\?/, "");
|
|
256
|
+
if (querystring) for (const pair of querystring.split("&")) {
|
|
257
|
+
let [key, value = null] = pair.split("=");
|
|
258
|
+
key = decodeURIComponent(key);
|
|
259
|
+
if (value) value = decodeURIComponent(value);
|
|
260
|
+
if (!(key in query)) query[key] = value;
|
|
261
|
+
else if (Array.isArray(query[key])) query[key].push(value);
|
|
262
|
+
else query[key] = [query[key], value];
|
|
263
|
+
}
|
|
264
|
+
return query;
|
|
265
|
+
}
|
|
266
|
+
//#endregion
|
|
267
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/transport/parseUrl.js
|
|
268
|
+
var parseUrl = (url) => {
|
|
269
|
+
if (typeof url === "string") return parseUrl(new URL(url));
|
|
270
|
+
const { hostname, pathname, port, protocol, search } = url;
|
|
271
|
+
let query;
|
|
272
|
+
if (search) query = parseQueryString(search);
|
|
273
|
+
return {
|
|
274
|
+
hostname,
|
|
275
|
+
port: port ? parseInt(port) : void 0,
|
|
276
|
+
protocol,
|
|
277
|
+
path: pathname,
|
|
278
|
+
query
|
|
279
|
+
};
|
|
280
|
+
};
|
|
281
|
+
//#endregion
|
|
282
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/transport/toEndpointV1.js
|
|
283
|
+
var toEndpointV1$1 = (endpoint) => {
|
|
284
|
+
if (typeof endpoint === "object") {
|
|
285
|
+
if ("url" in endpoint) {
|
|
286
|
+
const v1Endpoint = parseUrl(endpoint.url);
|
|
287
|
+
if (endpoint.headers) {
|
|
288
|
+
v1Endpoint.headers = {};
|
|
289
|
+
for (const name in endpoint.headers) v1Endpoint.headers[name.toLowerCase()] = endpoint.headers[name].join(", ");
|
|
290
|
+
}
|
|
291
|
+
return v1Endpoint;
|
|
292
|
+
}
|
|
293
|
+
return endpoint;
|
|
294
|
+
}
|
|
295
|
+
return parseUrl(endpoint);
|
|
296
|
+
};
|
|
297
|
+
//#endregion
|
|
298
|
+
//#region ../../../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/resolveAuthOptions.js
|
|
299
|
+
var resolveAuthOptions = (candidateAuthOptions, authSchemePreference) => {
|
|
300
|
+
if (!authSchemePreference || authSchemePreference.length === 0) return candidateAuthOptions;
|
|
301
|
+
const preferredAuthOptions = [];
|
|
302
|
+
for (const preferredSchemeName of authSchemePreference) for (const candidateAuthOption of candidateAuthOptions) if (candidateAuthOption.schemeId.split("#")[1] === preferredSchemeName) preferredAuthOptions.push(candidateAuthOption);
|
|
303
|
+
for (const candidateAuthOption of candidateAuthOptions) if (!preferredAuthOptions.find(({ schemeId }) => schemeId === candidateAuthOption.schemeId)) preferredAuthOptions.push(candidateAuthOption);
|
|
304
|
+
return preferredAuthOptions;
|
|
305
|
+
};
|
|
306
|
+
//#endregion
|
|
307
|
+
//#region ../../../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js
|
|
308
|
+
function convertHttpAuthSchemesToMap(httpAuthSchemes) {
|
|
309
|
+
const map = /* @__PURE__ */ new Map();
|
|
310
|
+
for (const scheme of httpAuthSchemes) map.set(scheme.schemeId, scheme);
|
|
311
|
+
return map;
|
|
312
|
+
}
|
|
313
|
+
var httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
|
|
314
|
+
const resolvedOptions = resolveAuthOptions(config.httpAuthSchemeProvider(await mwOptions.httpAuthSchemeParametersProvider(config, context, args.input)), config.authSchemePreference ? await config.authSchemePreference() : []);
|
|
315
|
+
const authSchemes = convertHttpAuthSchemesToMap(config.httpAuthSchemes);
|
|
316
|
+
const smithyContext = getSmithyContext$1(context);
|
|
317
|
+
const failureReasons = [];
|
|
318
|
+
for (const option of resolvedOptions) {
|
|
319
|
+
const scheme = authSchemes.get(option.schemeId);
|
|
320
|
+
if (!scheme) {
|
|
321
|
+
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` was not enabled for this service.`);
|
|
322
|
+
continue;
|
|
323
|
+
}
|
|
324
|
+
const identityProvider = scheme.identityProvider(await mwOptions.identityProviderConfigProvider(config));
|
|
325
|
+
if (!identityProvider) {
|
|
326
|
+
failureReasons.push(`HttpAuthScheme \`${option.schemeId}\` did not have an IdentityProvider configured.`);
|
|
327
|
+
continue;
|
|
328
|
+
}
|
|
329
|
+
const { identityProperties = {}, signingProperties = {} } = option.propertiesExtractor?.(config, context) || {};
|
|
330
|
+
option.identityProperties = Object.assign(option.identityProperties || {}, identityProperties);
|
|
331
|
+
option.signingProperties = Object.assign(option.signingProperties || {}, signingProperties);
|
|
332
|
+
smithyContext.selectedHttpAuthScheme = {
|
|
333
|
+
httpAuthOption: option,
|
|
334
|
+
identity: await identityProvider(option.identityProperties),
|
|
335
|
+
signer: scheme.signer
|
|
336
|
+
};
|
|
337
|
+
break;
|
|
338
|
+
}
|
|
339
|
+
if (!smithyContext.selectedHttpAuthScheme) throw new Error(failureReasons.join("\n"));
|
|
340
|
+
return next(args);
|
|
341
|
+
};
|
|
342
|
+
//#endregion
|
|
343
|
+
//#region ../../../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-auth-scheme/getHttpAuthSchemeEndpointRuleSetPlugin.js
|
|
344
|
+
var httpAuthSchemeEndpointRuleSetMiddlewareOptions = {
|
|
345
|
+
step: "serialize",
|
|
346
|
+
tags: ["HTTP_AUTH_SCHEME"],
|
|
347
|
+
name: "httpAuthSchemeMiddleware",
|
|
348
|
+
override: true,
|
|
349
|
+
relation: "before",
|
|
350
|
+
toMiddleware: "endpointV2Middleware"
|
|
351
|
+
};
|
|
352
|
+
var getHttpAuthSchemeEndpointRuleSetPlugin = (config, { httpAuthSchemeParametersProvider, identityProviderConfigProvider }) => ({ applyToStack: (clientStack) => {
|
|
353
|
+
clientStack.addRelativeTo(httpAuthSchemeMiddleware(config, {
|
|
354
|
+
httpAuthSchemeParametersProvider,
|
|
355
|
+
identityProviderConfigProvider
|
|
356
|
+
}), httpAuthSchemeEndpointRuleSetMiddlewareOptions);
|
|
357
|
+
} });
|
|
358
|
+
//#endregion
|
|
359
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/deref.js
|
|
360
|
+
var deref = (schemaRef) => {
|
|
361
|
+
if (typeof schemaRef === "function") return schemaRef();
|
|
362
|
+
return schemaRef;
|
|
363
|
+
};
|
|
364
|
+
//#endregion
|
|
365
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/operation.js
|
|
366
|
+
var operation = (namespace, name, traits, input, output) => ({
|
|
367
|
+
name,
|
|
368
|
+
namespace,
|
|
369
|
+
traits,
|
|
370
|
+
input,
|
|
371
|
+
output
|
|
372
|
+
});
|
|
373
|
+
//#endregion
|
|
374
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaDeserializationMiddleware.js
|
|
375
|
+
var schemaDeserializationMiddleware = (config) => (next, context) => async (args) => {
|
|
376
|
+
const { response } = await next(args);
|
|
377
|
+
const { operationSchema } = getSmithyContext$1(context);
|
|
378
|
+
const [, ns, n, t, i, o] = operationSchema ?? [];
|
|
379
|
+
try {
|
|
380
|
+
return {
|
|
381
|
+
response,
|
|
382
|
+
output: await config.protocol.deserializeResponse(operation(ns, n, t, i, o), {
|
|
383
|
+
...config,
|
|
384
|
+
...context
|
|
385
|
+
}, response)
|
|
386
|
+
};
|
|
387
|
+
} catch (error) {
|
|
388
|
+
Object.defineProperty(error, "$response", {
|
|
389
|
+
value: response,
|
|
390
|
+
enumerable: false,
|
|
391
|
+
writable: false,
|
|
392
|
+
configurable: false
|
|
393
|
+
});
|
|
394
|
+
if (!("$metadata" in error)) {
|
|
395
|
+
const hint = `Deserialization error: to see the raw response, inspect the hidden field {error}.$response on this object.`;
|
|
396
|
+
try {
|
|
397
|
+
error.message += "\n " + hint;
|
|
398
|
+
} catch (e) {
|
|
399
|
+
if (!context.logger || context.logger?.constructor?.name === "NoOpLogger") console.warn(hint);
|
|
400
|
+
else context.logger?.warn?.(hint);
|
|
401
|
+
}
|
|
402
|
+
if (typeof error.$responseBodyText !== "undefined") {
|
|
403
|
+
if (error.$response) error.$response.body = error.$responseBodyText;
|
|
404
|
+
}
|
|
405
|
+
try {
|
|
406
|
+
if (HttpResponse.isInstance(response)) {
|
|
407
|
+
const { headers = {}, statusCode } = response;
|
|
408
|
+
const headerEntries = Object.entries(headers);
|
|
409
|
+
error.$metadata = {
|
|
410
|
+
httpStatusCode: statusCode,
|
|
411
|
+
requestId: findHeader(/^x-[\w-]+-request-?id$/, headerEntries),
|
|
412
|
+
extendedRequestId: findHeader(/^x-[\w-]+-id-2$/, headerEntries),
|
|
413
|
+
cfId: findHeader(/^x-[\w-]+-cf-id$/, headerEntries)
|
|
414
|
+
};
|
|
415
|
+
}
|
|
416
|
+
} catch (e) {}
|
|
417
|
+
}
|
|
418
|
+
throw error;
|
|
419
|
+
}
|
|
420
|
+
};
|
|
421
|
+
var findHeader = (pattern, headers) => {
|
|
422
|
+
return (headers.find(([k]) => {
|
|
423
|
+
return k.match(pattern);
|
|
424
|
+
}) || [void 0, void 0])[1];
|
|
425
|
+
};
|
|
426
|
+
//#endregion
|
|
427
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/schemaSerializationMiddleware.js
|
|
428
|
+
var schemaSerializationMiddleware = (config) => (next, context) => async (args) => {
|
|
429
|
+
const { operationSchema } = getSmithyContext$1(context);
|
|
430
|
+
const [, ns, n, t, i, o] = operationSchema ?? [];
|
|
431
|
+
const endpoint = context.endpointV2 ? async () => toEndpointV1$1(context.endpointV2) : config.endpoint;
|
|
432
|
+
const request = await config.protocol.serializeRequest(operation(ns, n, t, i, o), args.input, {
|
|
433
|
+
...config,
|
|
434
|
+
...context,
|
|
435
|
+
endpoint
|
|
436
|
+
});
|
|
437
|
+
return next({
|
|
438
|
+
...args,
|
|
439
|
+
request
|
|
440
|
+
});
|
|
441
|
+
};
|
|
442
|
+
//#endregion
|
|
443
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/middleware/getSchemaSerdePlugin.js
|
|
444
|
+
var deserializerMiddlewareOption = {
|
|
445
|
+
name: "deserializerMiddleware",
|
|
446
|
+
step: "deserialize",
|
|
447
|
+
tags: ["DESERIALIZER"],
|
|
448
|
+
override: true
|
|
449
|
+
};
|
|
450
|
+
var serializerMiddlewareOption$1 = {
|
|
451
|
+
name: "serializerMiddleware",
|
|
452
|
+
step: "serialize",
|
|
453
|
+
tags: ["SERIALIZER"],
|
|
454
|
+
override: true
|
|
455
|
+
};
|
|
456
|
+
function getSchemaSerdePlugin(config) {
|
|
457
|
+
return { applyToStack: (commandStack) => {
|
|
458
|
+
commandStack.add(schemaSerializationMiddleware(config), serializerMiddlewareOption$1);
|
|
459
|
+
commandStack.add(schemaDeserializationMiddleware(config), deserializerMiddlewareOption);
|
|
460
|
+
config.protocol.setSerdeContext(config);
|
|
461
|
+
} };
|
|
462
|
+
}
|
|
463
|
+
//#endregion
|
|
464
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/translateTraits.js
|
|
465
|
+
var traitsCache = [];
|
|
466
|
+
function translateTraits(indicator) {
|
|
467
|
+
if (typeof indicator === "object") return indicator;
|
|
468
|
+
indicator = indicator | 0;
|
|
469
|
+
if (traitsCache[indicator]) return traitsCache[indicator];
|
|
470
|
+
const traits = {};
|
|
471
|
+
let i = 0;
|
|
472
|
+
for (const trait of [
|
|
473
|
+
"httpLabel",
|
|
474
|
+
"idempotent",
|
|
475
|
+
"idempotencyToken",
|
|
476
|
+
"sensitive",
|
|
477
|
+
"httpPayload",
|
|
478
|
+
"httpResponseCode",
|
|
479
|
+
"httpQueryParams"
|
|
480
|
+
]) if ((indicator >> i++ & 1) === 1) traits[trait] = 1;
|
|
481
|
+
return traitsCache[indicator] = traits;
|
|
482
|
+
}
|
|
483
|
+
//#endregion
|
|
484
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/schemas/NormalizedSchema.js
|
|
485
|
+
var anno = {
|
|
486
|
+
it: Symbol.for("@smithy/nor-struct-it"),
|
|
487
|
+
ns: Symbol.for("@smithy/ns")
|
|
488
|
+
};
|
|
489
|
+
var simpleSchemaCacheN = [];
|
|
490
|
+
var simpleSchemaCacheS = {};
|
|
491
|
+
var NormalizedSchema = class NormalizedSchema {
|
|
492
|
+
ref;
|
|
493
|
+
memberName;
|
|
494
|
+
static symbol = Symbol.for("@smithy/nor");
|
|
495
|
+
symbol = NormalizedSchema.symbol;
|
|
496
|
+
name;
|
|
497
|
+
schema;
|
|
498
|
+
_isMemberSchema;
|
|
499
|
+
traits;
|
|
500
|
+
memberTraits;
|
|
501
|
+
normalizedTraits;
|
|
502
|
+
constructor(ref, memberName) {
|
|
503
|
+
this.ref = ref;
|
|
504
|
+
this.memberName = memberName;
|
|
505
|
+
const traitStack = [];
|
|
506
|
+
let _ref = ref;
|
|
507
|
+
let schema = ref;
|
|
508
|
+
this._isMemberSchema = false;
|
|
509
|
+
while (isMemberSchema(_ref)) {
|
|
510
|
+
traitStack.push(_ref[1]);
|
|
511
|
+
_ref = _ref[0];
|
|
512
|
+
schema = deref(_ref);
|
|
513
|
+
this._isMemberSchema = true;
|
|
514
|
+
}
|
|
515
|
+
if (traitStack.length > 0) {
|
|
516
|
+
this.memberTraits = {};
|
|
517
|
+
for (let i = traitStack.length - 1; i >= 0; --i) {
|
|
518
|
+
const traitSet = traitStack[i];
|
|
519
|
+
Object.assign(this.memberTraits, translateTraits(traitSet));
|
|
520
|
+
}
|
|
521
|
+
} else this.memberTraits = 0;
|
|
522
|
+
if (schema instanceof NormalizedSchema) {
|
|
523
|
+
const computedMemberTraits = this.memberTraits;
|
|
524
|
+
Object.assign(this, schema);
|
|
525
|
+
this.memberTraits = Object.assign({}, computedMemberTraits, schema.getMemberTraits(), this.getMemberTraits());
|
|
526
|
+
this.normalizedTraits = void 0;
|
|
527
|
+
this.memberName = memberName ?? schema.memberName;
|
|
528
|
+
return;
|
|
529
|
+
}
|
|
530
|
+
this.schema = deref(schema);
|
|
531
|
+
if (isStaticSchema(this.schema)) {
|
|
532
|
+
this.name = `${this.schema[1]}#${this.schema[2]}`;
|
|
533
|
+
this.traits = this.schema[3];
|
|
534
|
+
} else {
|
|
535
|
+
this.name = this.memberName ?? String(schema);
|
|
536
|
+
this.traits = 0;
|
|
537
|
+
}
|
|
538
|
+
if (this._isMemberSchema && !memberName) throw new Error(`@smithy/core/schema - NormalizedSchema member init ${this.getName(true)} missing member name.`);
|
|
539
|
+
}
|
|
540
|
+
static [Symbol.hasInstance](lhs) {
|
|
541
|
+
const isPrototype = this.prototype.isPrototypeOf(lhs);
|
|
542
|
+
if (!isPrototype && typeof lhs === "object" && lhs !== null) return lhs.symbol === this.symbol;
|
|
543
|
+
return isPrototype;
|
|
544
|
+
}
|
|
545
|
+
static of(ref) {
|
|
546
|
+
const keyAble = typeof ref === "function" || typeof ref === "object" && ref !== null;
|
|
547
|
+
if (typeof ref === "number") {
|
|
548
|
+
if (simpleSchemaCacheN[ref]) return simpleSchemaCacheN[ref];
|
|
549
|
+
} else if (typeof ref === "string") {
|
|
550
|
+
if (simpleSchemaCacheS[ref]) return simpleSchemaCacheS[ref];
|
|
551
|
+
} else if (keyAble) {
|
|
552
|
+
if (ref[anno.ns]) return ref[anno.ns];
|
|
553
|
+
}
|
|
554
|
+
const sc = deref(ref);
|
|
555
|
+
if (sc instanceof NormalizedSchema) return sc;
|
|
556
|
+
if (isMemberSchema(sc)) {
|
|
557
|
+
const [ns, traits] = sc;
|
|
558
|
+
if (ns instanceof NormalizedSchema) {
|
|
559
|
+
Object.assign(ns.getMergedTraits(), translateTraits(traits));
|
|
560
|
+
return ns;
|
|
561
|
+
}
|
|
562
|
+
throw new Error(`@smithy/core/schema - may not init unwrapped member schema=${JSON.stringify(ref, null, 2)}.`);
|
|
563
|
+
}
|
|
564
|
+
const ns = new NormalizedSchema(sc);
|
|
565
|
+
if (keyAble) return ref[anno.ns] = ns;
|
|
566
|
+
if (typeof sc === "string") return simpleSchemaCacheS[sc] = ns;
|
|
567
|
+
if (typeof sc === "number") return simpleSchemaCacheN[sc] = ns;
|
|
568
|
+
return ns;
|
|
569
|
+
}
|
|
570
|
+
getSchema() {
|
|
571
|
+
const sc = this.schema;
|
|
572
|
+
if (Array.isArray(sc) && sc[0] === 0) return sc[4];
|
|
573
|
+
return sc;
|
|
574
|
+
}
|
|
575
|
+
getName(withNamespace = false) {
|
|
576
|
+
const { name } = this;
|
|
577
|
+
return !withNamespace && name && name.includes("#") ? name.split("#")[1] : name || void 0;
|
|
578
|
+
}
|
|
579
|
+
getMemberName() {
|
|
580
|
+
return this.memberName;
|
|
581
|
+
}
|
|
582
|
+
isMemberSchema() {
|
|
583
|
+
return this._isMemberSchema;
|
|
584
|
+
}
|
|
585
|
+
isListSchema() {
|
|
586
|
+
const sc = this.getSchema();
|
|
587
|
+
return typeof sc === "number" ? sc >= 64 && sc < 128 : sc[0] === 1;
|
|
588
|
+
}
|
|
589
|
+
isMapSchema() {
|
|
590
|
+
const sc = this.getSchema();
|
|
591
|
+
return typeof sc === "number" ? sc >= 128 && sc <= 255 : sc[0] === 2;
|
|
592
|
+
}
|
|
593
|
+
isStructSchema() {
|
|
594
|
+
const sc = this.getSchema();
|
|
595
|
+
if (typeof sc !== "object") return false;
|
|
596
|
+
const id = sc[0];
|
|
597
|
+
return id === 3 || id === -3 || id === 4;
|
|
598
|
+
}
|
|
599
|
+
isUnionSchema() {
|
|
600
|
+
const sc = this.getSchema();
|
|
601
|
+
if (typeof sc !== "object") return false;
|
|
602
|
+
return sc[0] === 4;
|
|
603
|
+
}
|
|
604
|
+
isBlobSchema() {
|
|
605
|
+
const sc = this.getSchema();
|
|
606
|
+
return sc === 21 || sc === 42;
|
|
607
|
+
}
|
|
608
|
+
isTimestampSchema() {
|
|
609
|
+
const sc = this.getSchema();
|
|
610
|
+
return typeof sc === "number" && sc >= 4 && sc <= 7;
|
|
611
|
+
}
|
|
612
|
+
isUnitSchema() {
|
|
613
|
+
return this.getSchema() === "unit";
|
|
614
|
+
}
|
|
615
|
+
isDocumentSchema() {
|
|
616
|
+
return this.getSchema() === 15;
|
|
617
|
+
}
|
|
618
|
+
isStringSchema() {
|
|
619
|
+
return this.getSchema() === 0;
|
|
620
|
+
}
|
|
621
|
+
isBooleanSchema() {
|
|
622
|
+
return this.getSchema() === 2;
|
|
623
|
+
}
|
|
624
|
+
isNumericSchema() {
|
|
625
|
+
return this.getSchema() === 1;
|
|
626
|
+
}
|
|
627
|
+
isBigIntegerSchema() {
|
|
628
|
+
return this.getSchema() === 17;
|
|
629
|
+
}
|
|
630
|
+
isBigDecimalSchema() {
|
|
631
|
+
return this.getSchema() === 19;
|
|
632
|
+
}
|
|
633
|
+
isStreaming() {
|
|
634
|
+
const { streaming } = this.getMergedTraits();
|
|
635
|
+
return !!streaming || this.getSchema() === 42;
|
|
636
|
+
}
|
|
637
|
+
isIdempotencyToken() {
|
|
638
|
+
return !!this.getMergedTraits().idempotencyToken;
|
|
639
|
+
}
|
|
640
|
+
getMergedTraits() {
|
|
641
|
+
return this.normalizedTraits ?? (this.normalizedTraits = {
|
|
642
|
+
...this.getOwnTraits(),
|
|
643
|
+
...this.getMemberTraits()
|
|
644
|
+
});
|
|
645
|
+
}
|
|
646
|
+
getMemberTraits() {
|
|
647
|
+
return translateTraits(this.memberTraits);
|
|
648
|
+
}
|
|
649
|
+
getOwnTraits() {
|
|
650
|
+
return translateTraits(this.traits);
|
|
651
|
+
}
|
|
652
|
+
getKeySchema() {
|
|
653
|
+
const [isDoc, isMap] = [this.isDocumentSchema(), this.isMapSchema()];
|
|
654
|
+
if (!isDoc && !isMap) throw new Error(`@smithy/core/schema - cannot get key for non-map: ${this.getName(true)}`);
|
|
655
|
+
const schema = this.getSchema();
|
|
656
|
+
return member([isDoc ? 15 : schema[4] ?? 0, 0], "key");
|
|
657
|
+
}
|
|
658
|
+
getValueSchema() {
|
|
659
|
+
const sc = this.getSchema();
|
|
660
|
+
const [isDoc, isMap, isList] = [
|
|
661
|
+
this.isDocumentSchema(),
|
|
662
|
+
this.isMapSchema(),
|
|
663
|
+
this.isListSchema()
|
|
664
|
+
];
|
|
665
|
+
const memberSchema = typeof sc === "number" ? 63 & sc : sc && typeof sc === "object" && (isMap || isList) ? sc[3 + sc[0]] : isDoc ? 15 : void 0;
|
|
666
|
+
if (memberSchema != null) return member([memberSchema, 0], isMap ? "value" : "member");
|
|
667
|
+
throw new Error(`@smithy/core/schema - ${this.getName(true)} has no value member.`);
|
|
668
|
+
}
|
|
669
|
+
getMemberSchema(memberName) {
|
|
670
|
+
const struct = this.getSchema();
|
|
671
|
+
if (this.isStructSchema() && struct[4].includes(memberName)) {
|
|
672
|
+
const i = struct[4].indexOf(memberName);
|
|
673
|
+
const memberSchema = struct[5][i];
|
|
674
|
+
return member(isMemberSchema(memberSchema) ? memberSchema : [memberSchema, 0], memberName);
|
|
675
|
+
}
|
|
676
|
+
if (this.isDocumentSchema()) return member([15, 0], memberName);
|
|
677
|
+
throw new Error(`@smithy/core/schema - ${this.getName(true)} has no member=${memberName}.`);
|
|
678
|
+
}
|
|
679
|
+
getMemberSchemas() {
|
|
680
|
+
const buffer = {};
|
|
681
|
+
try {
|
|
682
|
+
for (const [k, v] of this.structIterator()) buffer[k] = v;
|
|
683
|
+
} catch (ignored) {}
|
|
684
|
+
return buffer;
|
|
685
|
+
}
|
|
686
|
+
getEventStreamMember() {
|
|
687
|
+
if (this.isStructSchema()) {
|
|
688
|
+
for (const [memberName, memberSchema] of this.structIterator()) if (memberSchema.isStreaming() && memberSchema.isStructSchema()) return memberName;
|
|
689
|
+
}
|
|
690
|
+
return "";
|
|
691
|
+
}
|
|
692
|
+
*structIterator() {
|
|
693
|
+
if (this.isUnitSchema()) return;
|
|
694
|
+
if (!this.isStructSchema()) throw new Error("@smithy/core/schema - cannot iterate non-struct schema.");
|
|
695
|
+
const struct = this.getSchema();
|
|
696
|
+
const z = struct[4].length;
|
|
697
|
+
let it = struct[anno.it];
|
|
698
|
+
if (it && z === it.length) {
|
|
699
|
+
yield* it;
|
|
700
|
+
return;
|
|
701
|
+
}
|
|
702
|
+
it = Array(z);
|
|
703
|
+
for (let i = 0; i < z; ++i) {
|
|
704
|
+
const k = struct[4][i];
|
|
705
|
+
const v = member([struct[5][i], 0], k);
|
|
706
|
+
yield it[i] = [k, v];
|
|
707
|
+
}
|
|
708
|
+
struct[anno.it] = it;
|
|
709
|
+
}
|
|
710
|
+
};
|
|
711
|
+
function member(memberSchema, memberName) {
|
|
712
|
+
if (memberSchema instanceof NormalizedSchema) return Object.assign(memberSchema, {
|
|
713
|
+
memberName,
|
|
714
|
+
_isMemberSchema: true
|
|
715
|
+
});
|
|
716
|
+
return new NormalizedSchema(memberSchema, memberName);
|
|
717
|
+
}
|
|
718
|
+
var isMemberSchema = (sc) => Array.isArray(sc) && sc.length === 2;
|
|
719
|
+
var isStaticSchema = (sc) => Array.isArray(sc) && sc.length >= 5;
|
|
720
|
+
//#endregion
|
|
721
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/schema/TypeRegistry.js
|
|
722
|
+
var TypeRegistry = class TypeRegistry {
|
|
723
|
+
namespace;
|
|
724
|
+
schemas;
|
|
725
|
+
exceptions;
|
|
726
|
+
static registries = /* @__PURE__ */ new Map();
|
|
727
|
+
constructor(namespace, schemas = /* @__PURE__ */ new Map(), exceptions = /* @__PURE__ */ new Map()) {
|
|
728
|
+
this.namespace = namespace;
|
|
729
|
+
this.schemas = schemas;
|
|
730
|
+
this.exceptions = exceptions;
|
|
731
|
+
}
|
|
732
|
+
static for(namespace) {
|
|
733
|
+
if (!TypeRegistry.registries.has(namespace)) TypeRegistry.registries.set(namespace, new TypeRegistry(namespace));
|
|
734
|
+
return TypeRegistry.registries.get(namespace);
|
|
735
|
+
}
|
|
736
|
+
copyFrom(other) {
|
|
737
|
+
const { schemas, exceptions } = this;
|
|
738
|
+
for (const [k, v] of other.schemas) if (!schemas.has(k)) schemas.set(k, v);
|
|
739
|
+
for (const [k, v] of other.exceptions) if (!exceptions.has(k)) exceptions.set(k, v);
|
|
740
|
+
}
|
|
741
|
+
register(shapeId, schema) {
|
|
742
|
+
const qualifiedName = this.normalizeShapeId(shapeId);
|
|
743
|
+
for (const r of [this, TypeRegistry.for(qualifiedName.split("#")[0])]) r.schemas.set(qualifiedName, schema);
|
|
744
|
+
}
|
|
745
|
+
getSchema(shapeId) {
|
|
746
|
+
const id = this.normalizeShapeId(shapeId);
|
|
747
|
+
if (!this.schemas.has(id)) {
|
|
748
|
+
if (!shapeId.includes("#")) {
|
|
749
|
+
const suffix = "#" + shapeId;
|
|
750
|
+
const candidates = [];
|
|
751
|
+
for (const [shapeId, schema] of this.schemas.entries()) if (shapeId.endsWith(suffix)) candidates.push(schema);
|
|
752
|
+
if (candidates.length === 1) return candidates[0];
|
|
753
|
+
}
|
|
754
|
+
throw new Error(`@smithy/core/schema - schema not found for ${id}`);
|
|
755
|
+
}
|
|
756
|
+
return this.schemas.get(id);
|
|
757
|
+
}
|
|
758
|
+
registerError(es, ctor) {
|
|
759
|
+
const $error = es;
|
|
760
|
+
const ns = $error[1];
|
|
761
|
+
for (const r of [this, TypeRegistry.for(ns)]) {
|
|
762
|
+
r.schemas.set(ns + "#" + $error[2], $error);
|
|
763
|
+
r.exceptions.set($error, ctor);
|
|
764
|
+
}
|
|
765
|
+
}
|
|
766
|
+
getErrorCtor(es) {
|
|
767
|
+
const $error = es;
|
|
768
|
+
if (this.exceptions.has($error)) return this.exceptions.get($error);
|
|
769
|
+
return TypeRegistry.for($error[1]).exceptions.get($error);
|
|
770
|
+
}
|
|
771
|
+
getBaseException() {
|
|
772
|
+
for (const exceptionKey of this.exceptions.keys()) if (Array.isArray(exceptionKey)) {
|
|
773
|
+
const [, ns, name] = exceptionKey;
|
|
774
|
+
const id = ns + "#" + name;
|
|
775
|
+
if (id.startsWith("smithy.ts.sdk.synthetic.") && id.endsWith("ServiceException")) return exceptionKey;
|
|
776
|
+
}
|
|
777
|
+
}
|
|
778
|
+
find(predicate) {
|
|
779
|
+
for (const schema of this.schemas.values()) if (predicate(schema)) return schema;
|
|
780
|
+
}
|
|
781
|
+
clear() {
|
|
782
|
+
this.schemas.clear();
|
|
783
|
+
this.exceptions.clear();
|
|
784
|
+
}
|
|
785
|
+
normalizeShapeId(shapeId) {
|
|
786
|
+
if (shapeId.includes("#")) return shapeId;
|
|
787
|
+
return this.namespace + "#" + shapeId;
|
|
788
|
+
}
|
|
789
|
+
};
|
|
790
|
+
//#endregion
|
|
791
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/collect-stream-body.js
|
|
792
|
+
var collectBody = async (streamBody = new Uint8Array(), context) => {
|
|
793
|
+
if (streamBody instanceof Uint8Array) return require_serde.Uint8ArrayBlobAdapter.mutate(streamBody);
|
|
794
|
+
if (!streamBody) return require_serde.Uint8ArrayBlobAdapter.mutate(new Uint8Array());
|
|
795
|
+
const fromContext = context.streamCollector(streamBody);
|
|
796
|
+
return require_serde.Uint8ArrayBlobAdapter.mutate(await fromContext);
|
|
797
|
+
};
|
|
798
|
+
//#endregion
|
|
799
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/extended-encode-uri-component.js
|
|
800
|
+
function extendedEncodeURIComponent(str) {
|
|
801
|
+
return encodeURIComponent(str).replace(/[!'()*]/g, function(c) {
|
|
802
|
+
return "%" + c.charCodeAt(0).toString(16).toUpperCase();
|
|
803
|
+
});
|
|
804
|
+
}
|
|
805
|
+
//#endregion
|
|
806
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/SerdeContext.js
|
|
807
|
+
var SerdeContext = class {
|
|
808
|
+
serdeContext;
|
|
809
|
+
setSerdeContext(serdeContext) {
|
|
810
|
+
this.serdeContext = serdeContext;
|
|
811
|
+
}
|
|
812
|
+
};
|
|
813
|
+
//#endregion
|
|
814
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/HttpProtocol.js
|
|
815
|
+
var HttpProtocol = class extends SerdeContext {
|
|
816
|
+
options;
|
|
817
|
+
compositeErrorRegistry;
|
|
818
|
+
constructor(options) {
|
|
819
|
+
super();
|
|
820
|
+
this.options = options;
|
|
821
|
+
this.compositeErrorRegistry = TypeRegistry.for(options.defaultNamespace);
|
|
822
|
+
for (const etr of options.errorTypeRegistries ?? []) this.compositeErrorRegistry.copyFrom(etr);
|
|
823
|
+
}
|
|
824
|
+
getRequestType() {
|
|
825
|
+
return HttpRequest;
|
|
826
|
+
}
|
|
827
|
+
getResponseType() {
|
|
828
|
+
return HttpResponse;
|
|
829
|
+
}
|
|
830
|
+
setSerdeContext(serdeContext) {
|
|
831
|
+
this.serdeContext = serdeContext;
|
|
832
|
+
this.serializer.setSerdeContext(serdeContext);
|
|
833
|
+
this.deserializer.setSerdeContext(serdeContext);
|
|
834
|
+
if (this.getPayloadCodec()) this.getPayloadCodec().setSerdeContext(serdeContext);
|
|
835
|
+
}
|
|
836
|
+
updateServiceEndpoint(request, endpoint) {
|
|
837
|
+
if ("url" in endpoint) {
|
|
838
|
+
request.protocol = endpoint.url.protocol;
|
|
839
|
+
request.hostname = endpoint.url.hostname;
|
|
840
|
+
request.port = endpoint.url.port ? Number(endpoint.url.port) : void 0;
|
|
841
|
+
request.path = endpoint.url.pathname;
|
|
842
|
+
request.fragment = endpoint.url.hash || void 0;
|
|
843
|
+
request.username = endpoint.url.username || void 0;
|
|
844
|
+
request.password = endpoint.url.password || void 0;
|
|
845
|
+
if (!request.query) request.query = {};
|
|
846
|
+
for (const [k, v] of endpoint.url.searchParams.entries()) request.query[k] = v;
|
|
847
|
+
if (endpoint.headers) for (const name in endpoint.headers) request.headers[name] = endpoint.headers[name].join(", ");
|
|
848
|
+
return request;
|
|
849
|
+
} else {
|
|
850
|
+
request.protocol = endpoint.protocol;
|
|
851
|
+
request.hostname = endpoint.hostname;
|
|
852
|
+
request.port = endpoint.port ? Number(endpoint.port) : void 0;
|
|
853
|
+
request.path = endpoint.path;
|
|
854
|
+
request.query = { ...endpoint.query };
|
|
855
|
+
if (endpoint.headers) for (const name in endpoint.headers) request.headers[name] = endpoint.headers[name];
|
|
856
|
+
return request;
|
|
857
|
+
}
|
|
858
|
+
}
|
|
859
|
+
setHostPrefix(request, operationSchema, input) {
|
|
860
|
+
if (this.serdeContext?.disableHostPrefix) return;
|
|
861
|
+
const inputNs = NormalizedSchema.of(operationSchema.input);
|
|
862
|
+
const opTraits = translateTraits(operationSchema.traits ?? {});
|
|
863
|
+
if (opTraits.endpoint) {
|
|
864
|
+
let hostPrefix = opTraits.endpoint?.[0];
|
|
865
|
+
if (typeof hostPrefix === "string") {
|
|
866
|
+
for (const [name, member] of inputNs.structIterator()) {
|
|
867
|
+
if (!member.getMergedTraits().hostLabel) continue;
|
|
868
|
+
const replacement = input[name];
|
|
869
|
+
if (typeof replacement !== "string") throw new Error(`@smithy/core/schema - ${name} in input must be a string as hostLabel.`);
|
|
870
|
+
hostPrefix = hostPrefix.replace(`{${name}}`, replacement);
|
|
871
|
+
}
|
|
872
|
+
request.hostname = hostPrefix + request.hostname;
|
|
873
|
+
}
|
|
874
|
+
}
|
|
875
|
+
}
|
|
876
|
+
deserializeMetadata(output) {
|
|
877
|
+
return {
|
|
878
|
+
httpStatusCode: output.statusCode,
|
|
879
|
+
requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
|
|
880
|
+
extendedRequestId: output.headers["x-amz-id-2"],
|
|
881
|
+
cfId: output.headers["x-amz-cf-id"]
|
|
882
|
+
};
|
|
883
|
+
}
|
|
884
|
+
async serializeEventStream({ eventStream, requestSchema, initialRequest }) {
|
|
885
|
+
return (await this.loadEventStreamCapability()).serializeEventStream({
|
|
886
|
+
eventStream,
|
|
887
|
+
requestSchema,
|
|
888
|
+
initialRequest
|
|
889
|
+
});
|
|
890
|
+
}
|
|
891
|
+
async deserializeEventStream({ response, responseSchema, initialResponseContainer }) {
|
|
892
|
+
return (await this.loadEventStreamCapability()).deserializeEventStream({
|
|
893
|
+
response,
|
|
894
|
+
responseSchema,
|
|
895
|
+
initialResponseContainer
|
|
896
|
+
});
|
|
897
|
+
}
|
|
898
|
+
async loadEventStreamCapability() {
|
|
899
|
+
const { EventStreamSerde } = await Promise.resolve().then(() => require("./event-streams-DmrxQXpO.cjs"));
|
|
900
|
+
return new EventStreamSerde({
|
|
901
|
+
marshaller: this.getEventStreamMarshaller(),
|
|
902
|
+
serializer: this.serializer,
|
|
903
|
+
deserializer: this.deserializer,
|
|
904
|
+
serdeContext: this.serdeContext,
|
|
905
|
+
defaultContentType: this.getDefaultContentType()
|
|
906
|
+
});
|
|
907
|
+
}
|
|
908
|
+
getDefaultContentType() {
|
|
909
|
+
throw new Error(`@smithy/core/protocols - ${this.constructor.name} getDefaultContentType() implementation missing.`);
|
|
910
|
+
}
|
|
911
|
+
async deserializeHttpMessage(schema, context, response, arg4, arg5) {
|
|
912
|
+
return [];
|
|
913
|
+
}
|
|
914
|
+
getEventStreamMarshaller() {
|
|
915
|
+
const context = this.serdeContext;
|
|
916
|
+
if (!context.eventStreamMarshaller) throw new Error("@smithy/core - HttpProtocol: eventStreamMarshaller missing in serdeContext.");
|
|
917
|
+
return context.eventStreamMarshaller;
|
|
918
|
+
}
|
|
919
|
+
};
|
|
920
|
+
//#endregion
|
|
921
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/determineTimestampFormat.js
|
|
922
|
+
function determineTimestampFormat(ns, settings) {
|
|
923
|
+
if (settings.timestampFormat.useTrait) {
|
|
924
|
+
if (ns.isTimestampSchema() && (ns.getSchema() === 5 || ns.getSchema() === 6 || ns.getSchema() === 7)) return ns.getSchema();
|
|
925
|
+
}
|
|
926
|
+
const { httpLabel, httpPrefixHeaders, httpHeader, httpQuery } = ns.getMergedTraits();
|
|
927
|
+
return (settings.httpBindings ? typeof httpPrefixHeaders === "string" || Boolean(httpHeader) ? 6 : Boolean(httpQuery) || Boolean(httpLabel) ? 5 : void 0 : void 0) ?? settings.timestampFormat.default;
|
|
928
|
+
}
|
|
929
|
+
//#endregion
|
|
930
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/serde/FromStringShapeDeserializer.js
|
|
931
|
+
var FromStringShapeDeserializer = class extends SerdeContext {
|
|
932
|
+
settings;
|
|
933
|
+
constructor(settings) {
|
|
934
|
+
super();
|
|
935
|
+
this.settings = settings;
|
|
936
|
+
}
|
|
937
|
+
read(_schema, data) {
|
|
938
|
+
const ns = NormalizedSchema.of(_schema);
|
|
939
|
+
if (ns.isListSchema()) return require_serde.splitHeader(data).map((item) => this.read(ns.getValueSchema(), item));
|
|
940
|
+
if (ns.isBlobSchema()) return (this.serdeContext?.base64Decoder ?? require_serde.fromBase64)(data);
|
|
941
|
+
if (ns.isTimestampSchema()) switch (determineTimestampFormat(ns, this.settings)) {
|
|
942
|
+
case 5: return require_serde._parseRfc3339DateTimeWithOffset(data);
|
|
943
|
+
case 6: return require_serde._parseRfc7231DateTime(data);
|
|
944
|
+
case 7: return require_serde._parseEpochTimestamp(data);
|
|
945
|
+
default:
|
|
946
|
+
console.warn("Missing timestamp format, parsing value with Date constructor:", data);
|
|
947
|
+
return new Date(data);
|
|
948
|
+
}
|
|
949
|
+
if (ns.isStringSchema()) {
|
|
950
|
+
const mediaType = ns.getMergedTraits().mediaType;
|
|
951
|
+
let intermediateValue = data;
|
|
952
|
+
if (mediaType) {
|
|
953
|
+
if (ns.getMergedTraits().httpHeader) intermediateValue = this.base64ToUtf8(intermediateValue);
|
|
954
|
+
if (mediaType === "application/json" || mediaType.endsWith("+json")) intermediateValue = require_serde.LazyJsonString.from(intermediateValue);
|
|
955
|
+
return intermediateValue;
|
|
956
|
+
}
|
|
957
|
+
}
|
|
958
|
+
if (ns.isNumericSchema()) return Number(data);
|
|
959
|
+
if (ns.isBigIntegerSchema()) return BigInt(data);
|
|
960
|
+
if (ns.isBigDecimalSchema()) return new require_serde.NumericValue(data, "bigDecimal");
|
|
961
|
+
if (ns.isBooleanSchema()) return String(data).toLowerCase() === "true";
|
|
962
|
+
return data;
|
|
963
|
+
}
|
|
964
|
+
base64ToUtf8(base64String) {
|
|
965
|
+
return (this.serdeContext?.utf8Encoder ?? require_date_utils.toUtf8)((this.serdeContext?.base64Decoder ?? require_serde.fromBase64)(base64String));
|
|
966
|
+
}
|
|
967
|
+
};
|
|
968
|
+
//#endregion
|
|
969
|
+
//#region ../../../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/httpSigningMiddleware.js
|
|
970
|
+
var defaultErrorHandler = (signingProperties) => (error) => {
|
|
971
|
+
throw error;
|
|
972
|
+
};
|
|
973
|
+
var defaultSuccessHandler = (httpResponse, signingProperties) => {};
|
|
974
|
+
var httpSigningMiddleware = (config) => (next, context) => async (args) => {
|
|
975
|
+
if (!HttpRequest.isInstance(args.request)) return next(args);
|
|
976
|
+
const scheme = getSmithyContext$1(context).selectedHttpAuthScheme;
|
|
977
|
+
if (!scheme) throw new Error(`No HttpAuthScheme was selected: unable to sign request`);
|
|
978
|
+
const { httpAuthOption: { signingProperties = {} }, identity, signer } = scheme;
|
|
979
|
+
const output = await next({
|
|
980
|
+
...args,
|
|
981
|
+
request: await signer.sign(args.request, identity, signingProperties)
|
|
982
|
+
}).catch((signer.errorHandler || defaultErrorHandler)(signingProperties));
|
|
983
|
+
(signer.successHandler || defaultSuccessHandler)(output.response, signingProperties);
|
|
984
|
+
return output;
|
|
985
|
+
};
|
|
986
|
+
//#endregion
|
|
987
|
+
//#region ../../../node_modules/@smithy/core/dist-es/legacy-root-exports/middleware-http-signing/getHttpSigningMiddleware.js
|
|
988
|
+
var httpSigningMiddlewareOptions = {
|
|
989
|
+
step: "finalizeRequest",
|
|
990
|
+
tags: ["HTTP_SIGNING"],
|
|
991
|
+
name: "httpSigningMiddleware",
|
|
992
|
+
aliases: [
|
|
993
|
+
"apiKeyMiddleware",
|
|
994
|
+
"tokenMiddleware",
|
|
995
|
+
"awsAuthMiddleware"
|
|
996
|
+
],
|
|
997
|
+
override: true,
|
|
998
|
+
relation: "after",
|
|
999
|
+
toMiddleware: "retryMiddleware"
|
|
1000
|
+
};
|
|
1001
|
+
var getHttpSigningPlugin = (config) => ({ applyToStack: (clientStack) => {
|
|
1002
|
+
clientStack.addRelativeTo(httpSigningMiddleware(config), httpSigningMiddlewareOptions);
|
|
1003
|
+
} });
|
|
1004
|
+
//#endregion
|
|
1005
|
+
//#region ../../../node_modules/@smithy/core/dist-es/normalizeProvider.js
|
|
1006
|
+
var normalizeProvider$1 = (input) => {
|
|
1007
|
+
if (typeof input === "function") return input;
|
|
1008
|
+
const promisified = Promise.resolve(input);
|
|
1009
|
+
return () => promisified;
|
|
1010
|
+
};
|
|
1011
|
+
//#endregion
|
|
1012
|
+
//#region ../../../node_modules/@smithy/core/dist-es/setFeature.js
|
|
1013
|
+
function setFeature(context, feature, value) {
|
|
1014
|
+
if (!context.__smithy_context) context.__smithy_context = { features: {} };
|
|
1015
|
+
else if (!context.__smithy_context.features) context.__smithy_context.features = {};
|
|
1016
|
+
context.__smithy_context.features[feature] = value;
|
|
1017
|
+
}
|
|
1018
|
+
//#endregion
|
|
1019
|
+
//#region ../../../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/DefaultIdentityProviderConfig.js
|
|
1020
|
+
var DefaultIdentityProviderConfig = class {
|
|
1021
|
+
authSchemes = /* @__PURE__ */ new Map();
|
|
1022
|
+
constructor(config) {
|
|
1023
|
+
for (const key in config) {
|
|
1024
|
+
const value = config[key];
|
|
1025
|
+
if (value !== void 0) this.authSchemes.set(key, value);
|
|
1026
|
+
}
|
|
1027
|
+
}
|
|
1028
|
+
getIdentityProvider(schemeId) {
|
|
1029
|
+
return this.authSchemes.get(schemeId);
|
|
1030
|
+
}
|
|
1031
|
+
};
|
|
1032
|
+
//#endregion
|
|
1033
|
+
//#region ../../../node_modules/@smithy/core/dist-es/legacy-root-exports/util-identity-and-auth/memoizeIdentityProvider.js
|
|
1034
|
+
var createIsIdentityExpiredFunction = (expirationMs) => function isIdentityExpired(identity) {
|
|
1035
|
+
return doesIdentityRequireRefresh(identity) && identity.expiration.getTime() - Date.now() < expirationMs;
|
|
1036
|
+
};
|
|
1037
|
+
var isIdentityExpired = createIsIdentityExpiredFunction(3e5);
|
|
1038
|
+
var doesIdentityRequireRefresh = (identity) => identity.expiration !== void 0;
|
|
1039
|
+
var memoizeIdentityProvider = (provider, isExpired, requiresRefresh) => {
|
|
1040
|
+
if (provider === void 0) return;
|
|
1041
|
+
const normalizedProvider = typeof provider !== "function" ? async () => Promise.resolve(provider) : provider;
|
|
1042
|
+
let resolved;
|
|
1043
|
+
let pending;
|
|
1044
|
+
let hasResult;
|
|
1045
|
+
let isConstant = false;
|
|
1046
|
+
const coalesceProvider = async (options) => {
|
|
1047
|
+
if (!pending) pending = normalizedProvider(options);
|
|
1048
|
+
try {
|
|
1049
|
+
resolved = await pending;
|
|
1050
|
+
hasResult = true;
|
|
1051
|
+
isConstant = false;
|
|
1052
|
+
} finally {
|
|
1053
|
+
pending = void 0;
|
|
1054
|
+
}
|
|
1055
|
+
return resolved;
|
|
1056
|
+
};
|
|
1057
|
+
if (isExpired === void 0) return async (options) => {
|
|
1058
|
+
if (!hasResult || options?.forceRefresh) resolved = await coalesceProvider(options);
|
|
1059
|
+
return resolved;
|
|
1060
|
+
};
|
|
1061
|
+
return async (options) => {
|
|
1062
|
+
if (!hasResult || options?.forceRefresh) resolved = await coalesceProvider(options);
|
|
1063
|
+
if (isConstant) return resolved;
|
|
1064
|
+
if (!requiresRefresh(resolved)) {
|
|
1065
|
+
isConstant = true;
|
|
1066
|
+
return resolved;
|
|
1067
|
+
}
|
|
1068
|
+
if (isExpired(resolved)) {
|
|
1069
|
+
await coalesceProvider(options);
|
|
1070
|
+
return resolved;
|
|
1071
|
+
}
|
|
1072
|
+
return resolved;
|
|
1073
|
+
};
|
|
1074
|
+
};
|
|
1075
|
+
//#endregion
|
|
1076
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/constants.js
|
|
1077
|
+
var ALGORITHM_QUERY_PARAM = "X-Amz-Algorithm";
|
|
1078
|
+
var CREDENTIAL_QUERY_PARAM = "X-Amz-Credential";
|
|
1079
|
+
var AMZ_DATE_QUERY_PARAM = "X-Amz-Date";
|
|
1080
|
+
var SIGNED_HEADERS_QUERY_PARAM = "X-Amz-SignedHeaders";
|
|
1081
|
+
var EXPIRES_QUERY_PARAM = "X-Amz-Expires";
|
|
1082
|
+
var SIGNATURE_QUERY_PARAM = "X-Amz-Signature";
|
|
1083
|
+
var TOKEN_QUERY_PARAM = "X-Amz-Security-Token";
|
|
1084
|
+
var AUTH_HEADER = "authorization";
|
|
1085
|
+
var AMZ_DATE_HEADER = AMZ_DATE_QUERY_PARAM.toLowerCase();
|
|
1086
|
+
var GENERATED_HEADERS = [
|
|
1087
|
+
AUTH_HEADER,
|
|
1088
|
+
AMZ_DATE_HEADER,
|
|
1089
|
+
"date"
|
|
1090
|
+
];
|
|
1091
|
+
SIGNATURE_QUERY_PARAM.toLowerCase();
|
|
1092
|
+
var SHA256_HEADER = "x-amz-content-sha256";
|
|
1093
|
+
var TOKEN_HEADER = TOKEN_QUERY_PARAM.toLowerCase();
|
|
1094
|
+
var ALWAYS_UNSIGNABLE_HEADERS = {
|
|
1095
|
+
authorization: true,
|
|
1096
|
+
"cache-control": true,
|
|
1097
|
+
connection: true,
|
|
1098
|
+
expect: true,
|
|
1099
|
+
from: true,
|
|
1100
|
+
"keep-alive": true,
|
|
1101
|
+
"max-forwards": true,
|
|
1102
|
+
pragma: true,
|
|
1103
|
+
referer: true,
|
|
1104
|
+
te: true,
|
|
1105
|
+
trailer: true,
|
|
1106
|
+
"transfer-encoding": true,
|
|
1107
|
+
upgrade: true,
|
|
1108
|
+
"user-agent": true,
|
|
1109
|
+
"x-amzn-trace-id": true
|
|
1110
|
+
};
|
|
1111
|
+
var PROXY_HEADER_PATTERN = /^proxy-/;
|
|
1112
|
+
var SEC_HEADER_PATTERN = /^sec-/;
|
|
1113
|
+
var ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256";
|
|
1114
|
+
var EVENT_ALGORITHM_IDENTIFIER = "AWS4-HMAC-SHA256-PAYLOAD";
|
|
1115
|
+
var UNSIGNED_PAYLOAD = "UNSIGNED-PAYLOAD";
|
|
1116
|
+
var KEY_TYPE_IDENTIFIER = "aws4_request";
|
|
1117
|
+
//#endregion
|
|
1118
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/credentialDerivation.js
|
|
1119
|
+
var signingKeyCache = {};
|
|
1120
|
+
var cacheQueue = [];
|
|
1121
|
+
var createScope = (shortDate, region, service) => `${shortDate}/${region}/${service}/${KEY_TYPE_IDENTIFIER}`;
|
|
1122
|
+
var getSigningKey = async (sha256Constructor, credentials, shortDate, region, service) => {
|
|
1123
|
+
const cacheKey = `${shortDate}:${region}:${service}:${require_stream_collector.toHex(await hmac(sha256Constructor, credentials.secretAccessKey, credentials.accessKeyId))}:${credentials.sessionToken}`;
|
|
1124
|
+
if (cacheKey in signingKeyCache) return signingKeyCache[cacheKey];
|
|
1125
|
+
cacheQueue.push(cacheKey);
|
|
1126
|
+
while (cacheQueue.length > 50) delete signingKeyCache[cacheQueue.shift()];
|
|
1127
|
+
let key = `AWS4${credentials.secretAccessKey}`;
|
|
1128
|
+
for (const signable of [
|
|
1129
|
+
shortDate,
|
|
1130
|
+
region,
|
|
1131
|
+
service,
|
|
1132
|
+
KEY_TYPE_IDENTIFIER
|
|
1133
|
+
]) key = await hmac(sha256Constructor, key, signable);
|
|
1134
|
+
return signingKeyCache[cacheKey] = key;
|
|
1135
|
+
};
|
|
1136
|
+
var hmac = (ctor, secret, data) => {
|
|
1137
|
+
const hash = new ctor(secret);
|
|
1138
|
+
hash.update(require_serde.toUint8Array(data));
|
|
1139
|
+
return hash.digest();
|
|
1140
|
+
};
|
|
1141
|
+
//#endregion
|
|
1142
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalHeaders.js
|
|
1143
|
+
var getCanonicalHeaders = ({ headers }, unsignableHeaders, signableHeaders) => {
|
|
1144
|
+
const canonical = {};
|
|
1145
|
+
for (const headerName of Object.keys(headers).sort()) {
|
|
1146
|
+
if (headers[headerName] == void 0) continue;
|
|
1147
|
+
const canonicalHeaderName = headerName.toLowerCase();
|
|
1148
|
+
if (canonicalHeaderName in ALWAYS_UNSIGNABLE_HEADERS || unsignableHeaders?.has(canonicalHeaderName) || PROXY_HEADER_PATTERN.test(canonicalHeaderName) || SEC_HEADER_PATTERN.test(canonicalHeaderName)) {
|
|
1149
|
+
if (!signableHeaders || signableHeaders && !signableHeaders.has(canonicalHeaderName)) continue;
|
|
1150
|
+
}
|
|
1151
|
+
canonical[canonicalHeaderName] = headers[headerName].trim().replace(/\s+/g, " ");
|
|
1152
|
+
}
|
|
1153
|
+
return canonical;
|
|
1154
|
+
};
|
|
1155
|
+
//#endregion
|
|
1156
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/getPayloadHash.js
|
|
1157
|
+
var getPayloadHash = async ({ headers, body }, hashConstructor) => {
|
|
1158
|
+
for (const headerName of Object.keys(headers)) if (headerName.toLowerCase() === "x-amz-content-sha256") return headers[headerName];
|
|
1159
|
+
if (body == void 0) return "e3b0c44298fc1c149afbf4c8996fb92427ae41e4649b934ca495991b7852b855";
|
|
1160
|
+
else if (typeof body === "string" || ArrayBuffer.isView(body) || require_date_utils.isArrayBuffer(body)) {
|
|
1161
|
+
const hashCtor = new hashConstructor();
|
|
1162
|
+
hashCtor.update(require_serde.toUint8Array(body));
|
|
1163
|
+
return require_stream_collector.toHex(await hashCtor.digest());
|
|
1164
|
+
}
|
|
1165
|
+
return UNSIGNED_PAYLOAD;
|
|
1166
|
+
};
|
|
1167
|
+
//#endregion
|
|
1168
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/HeaderFormatter.js
|
|
1169
|
+
var HeaderFormatter = class {
|
|
1170
|
+
format(headers) {
|
|
1171
|
+
const chunks = [];
|
|
1172
|
+
for (const headerName of Object.keys(headers)) {
|
|
1173
|
+
const bytes = require_date_utils.fromUtf8(headerName);
|
|
1174
|
+
chunks.push(Uint8Array.from([bytes.byteLength]), bytes, this.formatHeaderValue(headers[headerName]));
|
|
1175
|
+
}
|
|
1176
|
+
const out = new Uint8Array(chunks.reduce((carry, bytes) => carry + bytes.byteLength, 0));
|
|
1177
|
+
let position = 0;
|
|
1178
|
+
for (const chunk of chunks) {
|
|
1179
|
+
out.set(chunk, position);
|
|
1180
|
+
position += chunk.byteLength;
|
|
1181
|
+
}
|
|
1182
|
+
return out;
|
|
1183
|
+
}
|
|
1184
|
+
formatHeaderValue(header) {
|
|
1185
|
+
switch (header.type) {
|
|
1186
|
+
case "boolean": return Uint8Array.from([header.value ? 0 : 1]);
|
|
1187
|
+
case "byte": return Uint8Array.from([2, header.value]);
|
|
1188
|
+
case "short":
|
|
1189
|
+
const shortView = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(3));
|
|
1190
|
+
shortView.setUint8(0, 3);
|
|
1191
|
+
shortView.setInt16(1, header.value, false);
|
|
1192
|
+
return new Uint8Array(shortView.buffer);
|
|
1193
|
+
case "integer":
|
|
1194
|
+
const intView = /* @__PURE__ */ new DataView(/* @__PURE__ */ new ArrayBuffer(5));
|
|
1195
|
+
intView.setUint8(0, 4);
|
|
1196
|
+
intView.setInt32(1, header.value, false);
|
|
1197
|
+
return new Uint8Array(intView.buffer);
|
|
1198
|
+
case "long":
|
|
1199
|
+
const longBytes = new Uint8Array(9);
|
|
1200
|
+
longBytes[0] = 5;
|
|
1201
|
+
longBytes.set(header.value.bytes, 1);
|
|
1202
|
+
return longBytes;
|
|
1203
|
+
case "binary":
|
|
1204
|
+
const binView = new DataView(new ArrayBuffer(3 + header.value.byteLength));
|
|
1205
|
+
binView.setUint8(0, 6);
|
|
1206
|
+
binView.setUint16(1, header.value.byteLength, false);
|
|
1207
|
+
const binBytes = new Uint8Array(binView.buffer);
|
|
1208
|
+
binBytes.set(header.value, 3);
|
|
1209
|
+
return binBytes;
|
|
1210
|
+
case "string":
|
|
1211
|
+
const utf8Bytes = require_date_utils.fromUtf8(header.value);
|
|
1212
|
+
const strView = new DataView(new ArrayBuffer(3 + utf8Bytes.byteLength));
|
|
1213
|
+
strView.setUint8(0, 7);
|
|
1214
|
+
strView.setUint16(1, utf8Bytes.byteLength, false);
|
|
1215
|
+
const strBytes = new Uint8Array(strView.buffer);
|
|
1216
|
+
strBytes.set(utf8Bytes, 3);
|
|
1217
|
+
return strBytes;
|
|
1218
|
+
case "timestamp":
|
|
1219
|
+
const tsBytes = new Uint8Array(9);
|
|
1220
|
+
tsBytes[0] = 8;
|
|
1221
|
+
tsBytes.set(Int64.fromNumber(header.value.valueOf()).bytes, 1);
|
|
1222
|
+
return tsBytes;
|
|
1223
|
+
case "uuid":
|
|
1224
|
+
if (!UUID_PATTERN.test(header.value)) throw new Error(`Invalid UUID received: ${header.value}`);
|
|
1225
|
+
const uuidBytes = new Uint8Array(17);
|
|
1226
|
+
uuidBytes[0] = 9;
|
|
1227
|
+
uuidBytes.set(require_stream_collector.fromHex(header.value.replace(/\-/g, "")), 1);
|
|
1228
|
+
return uuidBytes;
|
|
1229
|
+
}
|
|
1230
|
+
}
|
|
1231
|
+
};
|
|
1232
|
+
var HEADER_VALUE_TYPE;
|
|
1233
|
+
(function(HEADER_VALUE_TYPE) {
|
|
1234
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolTrue"] = 0] = "boolTrue";
|
|
1235
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["boolFalse"] = 1] = "boolFalse";
|
|
1236
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byte"] = 2] = "byte";
|
|
1237
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["short"] = 3] = "short";
|
|
1238
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["integer"] = 4] = "integer";
|
|
1239
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["long"] = 5] = "long";
|
|
1240
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["byteArray"] = 6] = "byteArray";
|
|
1241
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["string"] = 7] = "string";
|
|
1242
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["timestamp"] = 8] = "timestamp";
|
|
1243
|
+
HEADER_VALUE_TYPE[HEADER_VALUE_TYPE["uuid"] = 9] = "uuid";
|
|
1244
|
+
})(HEADER_VALUE_TYPE || (HEADER_VALUE_TYPE = {}));
|
|
1245
|
+
var UUID_PATTERN = /^[a-f0-9]{8}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{4}-[a-f0-9]{12}$/;
|
|
1246
|
+
var Int64 = class Int64 {
|
|
1247
|
+
bytes;
|
|
1248
|
+
constructor(bytes) {
|
|
1249
|
+
this.bytes = bytes;
|
|
1250
|
+
if (bytes.byteLength !== 8) throw new Error("Int64 buffers must be exactly 8 bytes");
|
|
1251
|
+
}
|
|
1252
|
+
static fromNumber(number) {
|
|
1253
|
+
if (number > 0x8000000000000000 || number < -0x8000000000000000) throw new Error(`${number} is too large (or, if negative, too small) to represent as an Int64`);
|
|
1254
|
+
const bytes = new Uint8Array(8);
|
|
1255
|
+
for (let i = 7, remaining = Math.abs(Math.round(number)); i > -1 && remaining > 0; i--, remaining /= 256) bytes[i] = remaining;
|
|
1256
|
+
if (number < 0) negate(bytes);
|
|
1257
|
+
return new Int64(bytes);
|
|
1258
|
+
}
|
|
1259
|
+
valueOf() {
|
|
1260
|
+
const bytes = this.bytes.slice(0);
|
|
1261
|
+
const negative = bytes[0] & 128;
|
|
1262
|
+
if (negative) negate(bytes);
|
|
1263
|
+
return parseInt(require_stream_collector.toHex(bytes), 16) * (negative ? -1 : 1);
|
|
1264
|
+
}
|
|
1265
|
+
toString() {
|
|
1266
|
+
return String(this.valueOf());
|
|
1267
|
+
}
|
|
1268
|
+
};
|
|
1269
|
+
function negate(bytes) {
|
|
1270
|
+
for (let i = 0; i < 8; i++) bytes[i] ^= 255;
|
|
1271
|
+
for (let i = 7; i > -1; i--) {
|
|
1272
|
+
bytes[i]++;
|
|
1273
|
+
if (bytes[i] !== 0) break;
|
|
1274
|
+
}
|
|
1275
|
+
}
|
|
1276
|
+
//#endregion
|
|
1277
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/headerUtil.js
|
|
1278
|
+
var hasHeader = (soughtHeader, headers) => {
|
|
1279
|
+
soughtHeader = soughtHeader.toLowerCase();
|
|
1280
|
+
for (const headerName of Object.keys(headers)) if (soughtHeader === headerName.toLowerCase()) return true;
|
|
1281
|
+
return false;
|
|
1282
|
+
};
|
|
1283
|
+
//#endregion
|
|
1284
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/moveHeadersToQuery.js
|
|
1285
|
+
var moveHeadersToQuery = (request, options = {}) => {
|
|
1286
|
+
const { headers, query = {} } = require_httpRequest.HttpRequest.clone(request);
|
|
1287
|
+
for (const name of Object.keys(headers)) {
|
|
1288
|
+
const lname = name.toLowerCase();
|
|
1289
|
+
if (lname.slice(0, 6) === "x-amz-" && !options.unhoistableHeaders?.has(lname) || options.hoistableHeaders?.has(lname)) {
|
|
1290
|
+
query[name] = headers[name];
|
|
1291
|
+
delete headers[name];
|
|
1292
|
+
}
|
|
1293
|
+
}
|
|
1294
|
+
return {
|
|
1295
|
+
...request,
|
|
1296
|
+
headers,
|
|
1297
|
+
query
|
|
1298
|
+
};
|
|
1299
|
+
};
|
|
1300
|
+
//#endregion
|
|
1301
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/prepareRequest.js
|
|
1302
|
+
var prepareRequest = (request) => {
|
|
1303
|
+
request = require_httpRequest.HttpRequest.clone(request);
|
|
1304
|
+
for (const headerName of Object.keys(request.headers)) if (GENERATED_HEADERS.indexOf(headerName.toLowerCase()) > -1) delete request.headers[headerName];
|
|
1305
|
+
return request;
|
|
1306
|
+
};
|
|
1307
|
+
//#endregion
|
|
1308
|
+
//#region ../../../node_modules/@smithy/util-middleware/dist-es/getSmithyContext.js
|
|
1309
|
+
var getSmithyContext = (context) => context["__smithy_context"] || (context["__smithy_context"] = {});
|
|
1310
|
+
//#endregion
|
|
1311
|
+
//#region ../../../node_modules/@smithy/util-middleware/dist-es/normalizeProvider.js
|
|
1312
|
+
var normalizeProvider = (input) => {
|
|
1313
|
+
if (typeof input === "function") return input;
|
|
1314
|
+
const promisified = Promise.resolve(input);
|
|
1315
|
+
return () => promisified;
|
|
1316
|
+
};
|
|
1317
|
+
//#endregion
|
|
1318
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/getCanonicalQuery.js
|
|
1319
|
+
var getCanonicalQuery = ({ query = {} }) => {
|
|
1320
|
+
const keys = [];
|
|
1321
|
+
const serialized = {};
|
|
1322
|
+
for (const key of Object.keys(query)) {
|
|
1323
|
+
if (key.toLowerCase() === "x-amz-signature") continue;
|
|
1324
|
+
const encodedKey = require_stream_collector.escapeUri(key);
|
|
1325
|
+
keys.push(encodedKey);
|
|
1326
|
+
const value = query[key];
|
|
1327
|
+
if (typeof value === "string") serialized[encodedKey] = `${encodedKey}=${require_stream_collector.escapeUri(value)}`;
|
|
1328
|
+
else if (Array.isArray(value)) serialized[encodedKey] = value.slice(0).reduce((encoded, value) => encoded.concat([`${encodedKey}=${require_stream_collector.escapeUri(value)}`]), []).sort().join("&");
|
|
1329
|
+
}
|
|
1330
|
+
return keys.sort().map((key) => serialized[key]).filter((serialized) => serialized).join("&");
|
|
1331
|
+
};
|
|
1332
|
+
//#endregion
|
|
1333
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/utilDate.js
|
|
1334
|
+
var iso8601 = (time) => toDate(time).toISOString().replace(/\.\d{3}Z$/, "Z");
|
|
1335
|
+
var toDate = (time) => {
|
|
1336
|
+
if (typeof time === "number") return /* @__PURE__ */ new Date(time * 1e3);
|
|
1337
|
+
if (typeof time === "string") {
|
|
1338
|
+
if (Number(time)) return /* @__PURE__ */ new Date(Number(time) * 1e3);
|
|
1339
|
+
return new Date(time);
|
|
1340
|
+
}
|
|
1341
|
+
return time;
|
|
1342
|
+
};
|
|
1343
|
+
//#endregion
|
|
1344
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4Base.js
|
|
1345
|
+
var SignatureV4Base = class {
|
|
1346
|
+
service;
|
|
1347
|
+
regionProvider;
|
|
1348
|
+
credentialProvider;
|
|
1349
|
+
sha256;
|
|
1350
|
+
uriEscapePath;
|
|
1351
|
+
applyChecksum;
|
|
1352
|
+
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
|
|
1353
|
+
this.service = service;
|
|
1354
|
+
this.sha256 = sha256;
|
|
1355
|
+
this.uriEscapePath = uriEscapePath;
|
|
1356
|
+
this.applyChecksum = typeof applyChecksum === "boolean" ? applyChecksum : true;
|
|
1357
|
+
this.regionProvider = normalizeProvider(region);
|
|
1358
|
+
this.credentialProvider = normalizeProvider(credentials);
|
|
1359
|
+
}
|
|
1360
|
+
createCanonicalRequest(request, canonicalHeaders, payloadHash) {
|
|
1361
|
+
const sortedHeaders = Object.keys(canonicalHeaders).sort();
|
|
1362
|
+
return `${request.method}
|
|
1363
|
+
${this.getCanonicalPath(request)}
|
|
1364
|
+
${getCanonicalQuery(request)}
|
|
1365
|
+
${sortedHeaders.map((name) => `${name}:${canonicalHeaders[name]}`).join("\n")}
|
|
1366
|
+
|
|
1367
|
+
${sortedHeaders.join(";")}
|
|
1368
|
+
${payloadHash}`;
|
|
1369
|
+
}
|
|
1370
|
+
async createStringToSign(longDate, credentialScope, canonicalRequest, algorithmIdentifier) {
|
|
1371
|
+
const hash = new this.sha256();
|
|
1372
|
+
hash.update(require_serde.toUint8Array(canonicalRequest));
|
|
1373
|
+
return `${algorithmIdentifier}
|
|
1374
|
+
${longDate}
|
|
1375
|
+
${credentialScope}
|
|
1376
|
+
${require_stream_collector.toHex(await hash.digest())}`;
|
|
1377
|
+
}
|
|
1378
|
+
getCanonicalPath({ path }) {
|
|
1379
|
+
if (this.uriEscapePath) {
|
|
1380
|
+
const normalizedPathSegments = [];
|
|
1381
|
+
for (const pathSegment of path.split("/")) {
|
|
1382
|
+
if (pathSegment?.length === 0) continue;
|
|
1383
|
+
if (pathSegment === ".") continue;
|
|
1384
|
+
if (pathSegment === "..") normalizedPathSegments.pop();
|
|
1385
|
+
else normalizedPathSegments.push(pathSegment);
|
|
1386
|
+
}
|
|
1387
|
+
return require_stream_collector.escapeUri(`${path?.startsWith("/") ? "/" : ""}${normalizedPathSegments.join("/")}${normalizedPathSegments.length > 0 && path?.endsWith("/") ? "/" : ""}`).replace(/%2F/g, "/");
|
|
1388
|
+
}
|
|
1389
|
+
return path;
|
|
1390
|
+
}
|
|
1391
|
+
validateResolvedCredentials(credentials) {
|
|
1392
|
+
if (typeof credentials !== "object" || typeof credentials.accessKeyId !== "string" || typeof credentials.secretAccessKey !== "string") throw new Error("Resolved credential object is not valid");
|
|
1393
|
+
}
|
|
1394
|
+
formatDate(now) {
|
|
1395
|
+
const longDate = iso8601(now).replace(/[\-:]/g, "");
|
|
1396
|
+
return {
|
|
1397
|
+
longDate,
|
|
1398
|
+
shortDate: longDate.slice(0, 8)
|
|
1399
|
+
};
|
|
1400
|
+
}
|
|
1401
|
+
getCanonicalHeaderList(headers) {
|
|
1402
|
+
return Object.keys(headers).sort().join(";");
|
|
1403
|
+
}
|
|
1404
|
+
};
|
|
1405
|
+
//#endregion
|
|
1406
|
+
//#region ../../../node_modules/@smithy/signature-v4/dist-es/SignatureV4.js
|
|
1407
|
+
var SignatureV4 = class extends SignatureV4Base {
|
|
1408
|
+
headerFormatter = new HeaderFormatter();
|
|
1409
|
+
constructor({ applyChecksum, credentials, region, service, sha256, uriEscapePath = true }) {
|
|
1410
|
+
super({
|
|
1411
|
+
applyChecksum,
|
|
1412
|
+
credentials,
|
|
1413
|
+
region,
|
|
1414
|
+
service,
|
|
1415
|
+
sha256,
|
|
1416
|
+
uriEscapePath
|
|
1417
|
+
});
|
|
1418
|
+
}
|
|
1419
|
+
async presign(originalRequest, options = {}) {
|
|
1420
|
+
const { signingDate = /* @__PURE__ */ new Date(), expiresIn = 3600, unsignableHeaders, unhoistableHeaders, signableHeaders, hoistableHeaders, signingRegion, signingService } = options;
|
|
1421
|
+
const credentials = await this.credentialProvider();
|
|
1422
|
+
this.validateResolvedCredentials(credentials);
|
|
1423
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
1424
|
+
const { longDate, shortDate } = this.formatDate(signingDate);
|
|
1425
|
+
if (expiresIn > 604800) return Promise.reject("Signature version 4 presigned URLs must have an expiration date less than one week in the future");
|
|
1426
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
1427
|
+
const request = moveHeadersToQuery(prepareRequest(originalRequest), {
|
|
1428
|
+
unhoistableHeaders,
|
|
1429
|
+
hoistableHeaders
|
|
1430
|
+
});
|
|
1431
|
+
if (credentials.sessionToken) request.query[TOKEN_QUERY_PARAM] = credentials.sessionToken;
|
|
1432
|
+
request.query[ALGORITHM_QUERY_PARAM] = ALGORITHM_IDENTIFIER;
|
|
1433
|
+
request.query[CREDENTIAL_QUERY_PARAM] = `${credentials.accessKeyId}/${scope}`;
|
|
1434
|
+
request.query[AMZ_DATE_QUERY_PARAM] = longDate;
|
|
1435
|
+
request.query[EXPIRES_QUERY_PARAM] = expiresIn.toString(10);
|
|
1436
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
1437
|
+
request.query[SIGNED_HEADERS_QUERY_PARAM] = this.getCanonicalHeaderList(canonicalHeaders);
|
|
1438
|
+
request.query[SIGNATURE_QUERY_PARAM] = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, await getPayloadHash(originalRequest, this.sha256)));
|
|
1439
|
+
return request;
|
|
1440
|
+
}
|
|
1441
|
+
async sign(toSign, options) {
|
|
1442
|
+
if (typeof toSign === "string") return this.signString(toSign, options);
|
|
1443
|
+
else if (toSign.headers && toSign.payload) return this.signEvent(toSign, options);
|
|
1444
|
+
else if (toSign.message) return this.signMessage(toSign, options);
|
|
1445
|
+
else return this.signRequest(toSign, options);
|
|
1446
|
+
}
|
|
1447
|
+
async signEvent({ headers, payload }, { signingDate = /* @__PURE__ */ new Date(), priorSignature, signingRegion, signingService }) {
|
|
1448
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
1449
|
+
const { shortDate, longDate } = this.formatDate(signingDate);
|
|
1450
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
1451
|
+
const hashedPayload = await getPayloadHash({
|
|
1452
|
+
headers: {},
|
|
1453
|
+
body: payload
|
|
1454
|
+
}, this.sha256);
|
|
1455
|
+
const hash = new this.sha256();
|
|
1456
|
+
hash.update(headers);
|
|
1457
|
+
const stringToSign = [
|
|
1458
|
+
EVENT_ALGORITHM_IDENTIFIER,
|
|
1459
|
+
longDate,
|
|
1460
|
+
scope,
|
|
1461
|
+
priorSignature,
|
|
1462
|
+
require_stream_collector.toHex(await hash.digest()),
|
|
1463
|
+
hashedPayload
|
|
1464
|
+
].join("\n");
|
|
1465
|
+
return this.signString(stringToSign, {
|
|
1466
|
+
signingDate,
|
|
1467
|
+
signingRegion: region,
|
|
1468
|
+
signingService
|
|
1469
|
+
});
|
|
1470
|
+
}
|
|
1471
|
+
async signMessage(signableMessage, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService }) {
|
|
1472
|
+
return this.signEvent({
|
|
1473
|
+
headers: this.headerFormatter.format(signableMessage.message.headers),
|
|
1474
|
+
payload: signableMessage.message.body
|
|
1475
|
+
}, {
|
|
1476
|
+
signingDate,
|
|
1477
|
+
signingRegion,
|
|
1478
|
+
signingService,
|
|
1479
|
+
priorSignature: signableMessage.priorSignature
|
|
1480
|
+
}).then((signature) => {
|
|
1481
|
+
return {
|
|
1482
|
+
message: signableMessage.message,
|
|
1483
|
+
signature
|
|
1484
|
+
};
|
|
1485
|
+
});
|
|
1486
|
+
}
|
|
1487
|
+
async signString(stringToSign, { signingDate = /* @__PURE__ */ new Date(), signingRegion, signingService } = {}) {
|
|
1488
|
+
const credentials = await this.credentialProvider();
|
|
1489
|
+
this.validateResolvedCredentials(credentials);
|
|
1490
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
1491
|
+
const { shortDate } = this.formatDate(signingDate);
|
|
1492
|
+
const hash = new this.sha256(await this.getSigningKey(credentials, region, shortDate, signingService));
|
|
1493
|
+
hash.update(require_serde.toUint8Array(stringToSign));
|
|
1494
|
+
return require_stream_collector.toHex(await hash.digest());
|
|
1495
|
+
}
|
|
1496
|
+
async signRequest(requestToSign, { signingDate = /* @__PURE__ */ new Date(), signableHeaders, unsignableHeaders, signingRegion, signingService } = {}) {
|
|
1497
|
+
const credentials = await this.credentialProvider();
|
|
1498
|
+
this.validateResolvedCredentials(credentials);
|
|
1499
|
+
const region = signingRegion ?? await this.regionProvider();
|
|
1500
|
+
const request = prepareRequest(requestToSign);
|
|
1501
|
+
const { longDate, shortDate } = this.formatDate(signingDate);
|
|
1502
|
+
const scope = createScope(shortDate, region, signingService ?? this.service);
|
|
1503
|
+
request.headers[AMZ_DATE_HEADER] = longDate;
|
|
1504
|
+
if (credentials.sessionToken) request.headers[TOKEN_HEADER] = credentials.sessionToken;
|
|
1505
|
+
const payloadHash = await getPayloadHash(request, this.sha256);
|
|
1506
|
+
if (!hasHeader("x-amz-content-sha256", request.headers) && this.applyChecksum) request.headers[SHA256_HEADER] = payloadHash;
|
|
1507
|
+
const canonicalHeaders = getCanonicalHeaders(request, unsignableHeaders, signableHeaders);
|
|
1508
|
+
const signature = await this.getSignature(longDate, scope, this.getSigningKey(credentials, region, shortDate, signingService), this.createCanonicalRequest(request, canonicalHeaders, payloadHash));
|
|
1509
|
+
request.headers[AUTH_HEADER] = `${ALGORITHM_IDENTIFIER} Credential=${credentials.accessKeyId}/${scope}, SignedHeaders=${this.getCanonicalHeaderList(canonicalHeaders)}, Signature=${signature}`;
|
|
1510
|
+
return request;
|
|
1511
|
+
}
|
|
1512
|
+
async getSignature(longDate, credentialScope, keyPromise, canonicalRequest) {
|
|
1513
|
+
const stringToSign = await this.createStringToSign(longDate, credentialScope, canonicalRequest, ALGORITHM_IDENTIFIER);
|
|
1514
|
+
const hash = new this.sha256(await keyPromise);
|
|
1515
|
+
hash.update(require_serde.toUint8Array(stringToSign));
|
|
1516
|
+
return require_stream_collector.toHex(await hash.digest());
|
|
1517
|
+
}
|
|
1518
|
+
getSigningKey(credentials, region, shortDate, service) {
|
|
1519
|
+
return getSigningKey(this.sha256, credentials, shortDate, region, service || this.service);
|
|
1520
|
+
}
|
|
1521
|
+
};
|
|
1522
|
+
//#endregion
|
|
1523
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/httpAuthSchemes/aws_sdk/resolveAwsSdkSigV4Config.js
|
|
1524
|
+
var resolveAwsSdkSigV4Config = (config) => {
|
|
1525
|
+
let inputCredentials = config.credentials;
|
|
1526
|
+
let isUserSupplied = !!config.credentials;
|
|
1527
|
+
let resolvedCredentials = void 0;
|
|
1528
|
+
Object.defineProperty(config, "credentials", {
|
|
1529
|
+
set(credentials) {
|
|
1530
|
+
if (credentials && credentials !== inputCredentials && credentials !== resolvedCredentials) isUserSupplied = true;
|
|
1531
|
+
inputCredentials = credentials;
|
|
1532
|
+
const boundProvider = bindCallerConfig(config, normalizeCredentialProvider(config, {
|
|
1533
|
+
credentials: inputCredentials,
|
|
1534
|
+
credentialDefaultProvider: config.credentialDefaultProvider
|
|
1535
|
+
}));
|
|
1536
|
+
if (isUserSupplied && !boundProvider.attributed) {
|
|
1537
|
+
const isCredentialObject = typeof inputCredentials === "object" && inputCredentials !== null;
|
|
1538
|
+
resolvedCredentials = async (options) => {
|
|
1539
|
+
const attributedCreds = await boundProvider(options);
|
|
1540
|
+
if (isCredentialObject && (!attributedCreds.$source || Object.keys(attributedCreds.$source).length === 0)) return require_setCredentialFeature.setCredentialFeature(attributedCreds, "CREDENTIALS_CODE", "e");
|
|
1541
|
+
return attributedCreds;
|
|
1542
|
+
};
|
|
1543
|
+
resolvedCredentials.memoized = boundProvider.memoized;
|
|
1544
|
+
resolvedCredentials.configBound = boundProvider.configBound;
|
|
1545
|
+
resolvedCredentials.attributed = true;
|
|
1546
|
+
} else resolvedCredentials = boundProvider;
|
|
1547
|
+
},
|
|
1548
|
+
get() {
|
|
1549
|
+
return resolvedCredentials;
|
|
1550
|
+
},
|
|
1551
|
+
enumerable: true,
|
|
1552
|
+
configurable: true
|
|
1553
|
+
});
|
|
1554
|
+
config.credentials = inputCredentials;
|
|
1555
|
+
const { signingEscapePath = true, systemClockOffset = config.systemClockOffset || 0, sha256 } = config;
|
|
1556
|
+
let signer;
|
|
1557
|
+
if (config.signer) signer = normalizeProvider$1(config.signer);
|
|
1558
|
+
else if (config.regionInfoProvider) signer = () => normalizeProvider$1(config.region)().then(async (region) => [await config.regionInfoProvider(region, {
|
|
1559
|
+
useFipsEndpoint: await config.useFipsEndpoint(),
|
|
1560
|
+
useDualstackEndpoint: await config.useDualstackEndpoint()
|
|
1561
|
+
}) || {}, region]).then(([regionInfo, region]) => {
|
|
1562
|
+
const { signingRegion, signingService } = regionInfo;
|
|
1563
|
+
config.signingRegion = config.signingRegion || signingRegion || region;
|
|
1564
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
|
1565
|
+
const params = {
|
|
1566
|
+
...config,
|
|
1567
|
+
credentials: config.credentials,
|
|
1568
|
+
region: config.signingRegion,
|
|
1569
|
+
service: config.signingName,
|
|
1570
|
+
sha256,
|
|
1571
|
+
uriEscapePath: signingEscapePath
|
|
1572
|
+
};
|
|
1573
|
+
return new (config.signerConstructor || SignatureV4)(params);
|
|
1574
|
+
});
|
|
1575
|
+
else signer = async (authScheme) => {
|
|
1576
|
+
authScheme = Object.assign({}, {
|
|
1577
|
+
name: "sigv4",
|
|
1578
|
+
signingName: config.signingName || config.defaultSigningName,
|
|
1579
|
+
signingRegion: await normalizeProvider$1(config.region)(),
|
|
1580
|
+
properties: {}
|
|
1581
|
+
}, authScheme);
|
|
1582
|
+
const signingRegion = authScheme.signingRegion;
|
|
1583
|
+
const signingService = authScheme.signingName;
|
|
1584
|
+
config.signingRegion = config.signingRegion || signingRegion;
|
|
1585
|
+
config.signingName = config.signingName || signingService || config.serviceId;
|
|
1586
|
+
const params = {
|
|
1587
|
+
...config,
|
|
1588
|
+
credentials: config.credentials,
|
|
1589
|
+
region: config.signingRegion,
|
|
1590
|
+
service: config.signingName,
|
|
1591
|
+
sha256,
|
|
1592
|
+
uriEscapePath: signingEscapePath
|
|
1593
|
+
};
|
|
1594
|
+
return new (config.signerConstructor || SignatureV4)(params);
|
|
1595
|
+
};
|
|
1596
|
+
return Object.assign(config, {
|
|
1597
|
+
systemClockOffset,
|
|
1598
|
+
signingEscapePath,
|
|
1599
|
+
signer
|
|
1600
|
+
});
|
|
1601
|
+
};
|
|
1602
|
+
function normalizeCredentialProvider(config, { credentials, credentialDefaultProvider }) {
|
|
1603
|
+
let credentialsProvider;
|
|
1604
|
+
if (credentials) if (!credentials?.memoized) credentialsProvider = memoizeIdentityProvider(credentials, isIdentityExpired, doesIdentityRequireRefresh);
|
|
1605
|
+
else credentialsProvider = credentials;
|
|
1606
|
+
else if (credentialDefaultProvider) credentialsProvider = normalizeProvider$1(credentialDefaultProvider(Object.assign({}, config, { parentClientConfig: config })));
|
|
1607
|
+
else credentialsProvider = async () => {
|
|
1608
|
+
throw new Error("@aws-sdk/core::resolveAwsSdkSigV4Config - `credentials` not provided and no credentialDefaultProvider was configured.");
|
|
1609
|
+
};
|
|
1610
|
+
credentialsProvider.memoized = true;
|
|
1611
|
+
return credentialsProvider;
|
|
1612
|
+
}
|
|
1613
|
+
function bindCallerConfig(config, credentialsProvider) {
|
|
1614
|
+
if (credentialsProvider.configBound) return credentialsProvider;
|
|
1615
|
+
const fn = async (options) => credentialsProvider({
|
|
1616
|
+
...options,
|
|
1617
|
+
callerClientConfig: config
|
|
1618
|
+
});
|
|
1619
|
+
fn.memoized = credentialsProvider.memoized;
|
|
1620
|
+
fn.configBound = true;
|
|
1621
|
+
return fn;
|
|
1622
|
+
}
|
|
1623
|
+
//#endregion
|
|
1624
|
+
//#region ../../../node_modules/@smithy/middleware-stack/dist-es/MiddlewareStack.js
|
|
1625
|
+
var getAllAliases = (name, aliases) => {
|
|
1626
|
+
const _aliases = [];
|
|
1627
|
+
if (name) _aliases.push(name);
|
|
1628
|
+
if (aliases) for (const alias of aliases) _aliases.push(alias);
|
|
1629
|
+
return _aliases;
|
|
1630
|
+
};
|
|
1631
|
+
var getMiddlewareNameWithAliases = (name, aliases) => {
|
|
1632
|
+
return `${name || "anonymous"}${aliases && aliases.length > 0 ? ` (a.k.a. ${aliases.join(",")})` : ""}`;
|
|
1633
|
+
};
|
|
1634
|
+
var constructStack = () => {
|
|
1635
|
+
let absoluteEntries = [];
|
|
1636
|
+
let relativeEntries = [];
|
|
1637
|
+
let identifyOnResolve = false;
|
|
1638
|
+
const entriesNameSet = /* @__PURE__ */ new Set();
|
|
1639
|
+
const sort = (entries) => entries.sort((a, b) => stepWeights[b.step] - stepWeights[a.step] || priorityWeights[b.priority || "normal"] - priorityWeights[a.priority || "normal"]);
|
|
1640
|
+
const removeByName = (toRemove) => {
|
|
1641
|
+
let isRemoved = false;
|
|
1642
|
+
const filterCb = (entry) => {
|
|
1643
|
+
const aliases = getAllAliases(entry.name, entry.aliases);
|
|
1644
|
+
if (aliases.includes(toRemove)) {
|
|
1645
|
+
isRemoved = true;
|
|
1646
|
+
for (const alias of aliases) entriesNameSet.delete(alias);
|
|
1647
|
+
return false;
|
|
1648
|
+
}
|
|
1649
|
+
return true;
|
|
1650
|
+
};
|
|
1651
|
+
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
1652
|
+
relativeEntries = relativeEntries.filter(filterCb);
|
|
1653
|
+
return isRemoved;
|
|
1654
|
+
};
|
|
1655
|
+
const removeByReference = (toRemove) => {
|
|
1656
|
+
let isRemoved = false;
|
|
1657
|
+
const filterCb = (entry) => {
|
|
1658
|
+
if (entry.middleware === toRemove) {
|
|
1659
|
+
isRemoved = true;
|
|
1660
|
+
for (const alias of getAllAliases(entry.name, entry.aliases)) entriesNameSet.delete(alias);
|
|
1661
|
+
return false;
|
|
1662
|
+
}
|
|
1663
|
+
return true;
|
|
1664
|
+
};
|
|
1665
|
+
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
1666
|
+
relativeEntries = relativeEntries.filter(filterCb);
|
|
1667
|
+
return isRemoved;
|
|
1668
|
+
};
|
|
1669
|
+
const cloneTo = (toStack) => {
|
|
1670
|
+
absoluteEntries.forEach((entry) => {
|
|
1671
|
+
toStack.add(entry.middleware, { ...entry });
|
|
1672
|
+
});
|
|
1673
|
+
relativeEntries.forEach((entry) => {
|
|
1674
|
+
toStack.addRelativeTo(entry.middleware, { ...entry });
|
|
1675
|
+
});
|
|
1676
|
+
toStack.identifyOnResolve?.(stack.identifyOnResolve());
|
|
1677
|
+
return toStack;
|
|
1678
|
+
};
|
|
1679
|
+
const expandRelativeMiddlewareList = (from) => {
|
|
1680
|
+
const expandedMiddlewareList = [];
|
|
1681
|
+
from.before.forEach((entry) => {
|
|
1682
|
+
if (entry.before.length === 0 && entry.after.length === 0) expandedMiddlewareList.push(entry);
|
|
1683
|
+
else expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
|
|
1684
|
+
});
|
|
1685
|
+
expandedMiddlewareList.push(from);
|
|
1686
|
+
from.after.reverse().forEach((entry) => {
|
|
1687
|
+
if (entry.before.length === 0 && entry.after.length === 0) expandedMiddlewareList.push(entry);
|
|
1688
|
+
else expandedMiddlewareList.push(...expandRelativeMiddlewareList(entry));
|
|
1689
|
+
});
|
|
1690
|
+
return expandedMiddlewareList;
|
|
1691
|
+
};
|
|
1692
|
+
const getMiddlewareList = (debug = false) => {
|
|
1693
|
+
const normalizedAbsoluteEntries = [];
|
|
1694
|
+
const normalizedRelativeEntries = [];
|
|
1695
|
+
const normalizedEntriesNameMap = {};
|
|
1696
|
+
absoluteEntries.forEach((entry) => {
|
|
1697
|
+
const normalizedEntry = {
|
|
1698
|
+
...entry,
|
|
1699
|
+
before: [],
|
|
1700
|
+
after: []
|
|
1701
|
+
};
|
|
1702
|
+
for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) normalizedEntriesNameMap[alias] = normalizedEntry;
|
|
1703
|
+
normalizedAbsoluteEntries.push(normalizedEntry);
|
|
1704
|
+
});
|
|
1705
|
+
relativeEntries.forEach((entry) => {
|
|
1706
|
+
const normalizedEntry = {
|
|
1707
|
+
...entry,
|
|
1708
|
+
before: [],
|
|
1709
|
+
after: []
|
|
1710
|
+
};
|
|
1711
|
+
for (const alias of getAllAliases(normalizedEntry.name, normalizedEntry.aliases)) normalizedEntriesNameMap[alias] = normalizedEntry;
|
|
1712
|
+
normalizedRelativeEntries.push(normalizedEntry);
|
|
1713
|
+
});
|
|
1714
|
+
normalizedRelativeEntries.forEach((entry) => {
|
|
1715
|
+
if (entry.toMiddleware) {
|
|
1716
|
+
const toMiddleware = normalizedEntriesNameMap[entry.toMiddleware];
|
|
1717
|
+
if (toMiddleware === void 0) {
|
|
1718
|
+
if (debug) return;
|
|
1719
|
+
throw new Error(`${entry.toMiddleware} is not found when adding ${getMiddlewareNameWithAliases(entry.name, entry.aliases)} middleware ${entry.relation} ${entry.toMiddleware}`);
|
|
1720
|
+
}
|
|
1721
|
+
if (entry.relation === "after") toMiddleware.after.push(entry);
|
|
1722
|
+
if (entry.relation === "before") toMiddleware.before.push(entry);
|
|
1723
|
+
}
|
|
1724
|
+
});
|
|
1725
|
+
return sort(normalizedAbsoluteEntries).map(expandRelativeMiddlewareList).reduce((wholeList, expandedMiddlewareList) => {
|
|
1726
|
+
wholeList.push(...expandedMiddlewareList);
|
|
1727
|
+
return wholeList;
|
|
1728
|
+
}, []);
|
|
1729
|
+
};
|
|
1730
|
+
const stack = {
|
|
1731
|
+
add: (middleware, options = {}) => {
|
|
1732
|
+
const { name, override, aliases: _aliases } = options;
|
|
1733
|
+
const entry = {
|
|
1734
|
+
step: "initialize",
|
|
1735
|
+
priority: "normal",
|
|
1736
|
+
middleware,
|
|
1737
|
+
...options
|
|
1738
|
+
};
|
|
1739
|
+
const aliases = getAllAliases(name, _aliases);
|
|
1740
|
+
if (aliases.length > 0) {
|
|
1741
|
+
if (aliases.some((alias) => entriesNameSet.has(alias))) {
|
|
1742
|
+
if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
|
|
1743
|
+
for (const alias of aliases) {
|
|
1744
|
+
const toOverrideIndex = absoluteEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));
|
|
1745
|
+
if (toOverrideIndex === -1) continue;
|
|
1746
|
+
const toOverride = absoluteEntries[toOverrideIndex];
|
|
1747
|
+
if (toOverride.step !== entry.step || entry.priority !== toOverride.priority) throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware with ${toOverride.priority} priority in ${toOverride.step} step cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware with ${entry.priority} priority in ${entry.step} step.`);
|
|
1748
|
+
absoluteEntries.splice(toOverrideIndex, 1);
|
|
1749
|
+
}
|
|
1750
|
+
}
|
|
1751
|
+
for (const alias of aliases) entriesNameSet.add(alias);
|
|
1752
|
+
}
|
|
1753
|
+
absoluteEntries.push(entry);
|
|
1754
|
+
},
|
|
1755
|
+
addRelativeTo: (middleware, options) => {
|
|
1756
|
+
const { name, override, aliases: _aliases } = options;
|
|
1757
|
+
const entry = {
|
|
1758
|
+
middleware,
|
|
1759
|
+
...options
|
|
1760
|
+
};
|
|
1761
|
+
const aliases = getAllAliases(name, _aliases);
|
|
1762
|
+
if (aliases.length > 0) {
|
|
1763
|
+
if (aliases.some((alias) => entriesNameSet.has(alias))) {
|
|
1764
|
+
if (!override) throw new Error(`Duplicate middleware name '${getMiddlewareNameWithAliases(name, _aliases)}'`);
|
|
1765
|
+
for (const alias of aliases) {
|
|
1766
|
+
const toOverrideIndex = relativeEntries.findIndex((entry) => entry.name === alias || entry.aliases?.some((a) => a === alias));
|
|
1767
|
+
if (toOverrideIndex === -1) continue;
|
|
1768
|
+
const toOverride = relativeEntries[toOverrideIndex];
|
|
1769
|
+
if (toOverride.toMiddleware !== entry.toMiddleware || toOverride.relation !== entry.relation) throw new Error(`"${getMiddlewareNameWithAliases(toOverride.name, toOverride.aliases)}" middleware ${toOverride.relation} "${toOverride.toMiddleware}" middleware cannot be overridden by "${getMiddlewareNameWithAliases(name, _aliases)}" middleware ${entry.relation} "${entry.toMiddleware}" middleware.`);
|
|
1770
|
+
relativeEntries.splice(toOverrideIndex, 1);
|
|
1771
|
+
}
|
|
1772
|
+
}
|
|
1773
|
+
for (const alias of aliases) entriesNameSet.add(alias);
|
|
1774
|
+
}
|
|
1775
|
+
relativeEntries.push(entry);
|
|
1776
|
+
},
|
|
1777
|
+
clone: () => cloneTo(constructStack()),
|
|
1778
|
+
use: (plugin) => {
|
|
1779
|
+
plugin.applyToStack(stack);
|
|
1780
|
+
},
|
|
1781
|
+
remove: (toRemove) => {
|
|
1782
|
+
if (typeof toRemove === "string") return removeByName(toRemove);
|
|
1783
|
+
else return removeByReference(toRemove);
|
|
1784
|
+
},
|
|
1785
|
+
removeByTag: (toRemove) => {
|
|
1786
|
+
let isRemoved = false;
|
|
1787
|
+
const filterCb = (entry) => {
|
|
1788
|
+
const { tags, name, aliases: _aliases } = entry;
|
|
1789
|
+
if (tags && tags.includes(toRemove)) {
|
|
1790
|
+
const aliases = getAllAliases(name, _aliases);
|
|
1791
|
+
for (const alias of aliases) entriesNameSet.delete(alias);
|
|
1792
|
+
isRemoved = true;
|
|
1793
|
+
return false;
|
|
1794
|
+
}
|
|
1795
|
+
return true;
|
|
1796
|
+
};
|
|
1797
|
+
absoluteEntries = absoluteEntries.filter(filterCb);
|
|
1798
|
+
relativeEntries = relativeEntries.filter(filterCb);
|
|
1799
|
+
return isRemoved;
|
|
1800
|
+
},
|
|
1801
|
+
concat: (from) => {
|
|
1802
|
+
const cloned = cloneTo(constructStack());
|
|
1803
|
+
cloned.use(from);
|
|
1804
|
+
cloned.identifyOnResolve(identifyOnResolve || cloned.identifyOnResolve() || (from.identifyOnResolve?.() ?? false));
|
|
1805
|
+
return cloned;
|
|
1806
|
+
},
|
|
1807
|
+
applyToStack: cloneTo,
|
|
1808
|
+
identify: () => {
|
|
1809
|
+
return getMiddlewareList(true).map((mw) => {
|
|
1810
|
+
const step = mw.step ?? mw.relation + " " + mw.toMiddleware;
|
|
1811
|
+
return getMiddlewareNameWithAliases(mw.name, mw.aliases) + " - " + step;
|
|
1812
|
+
});
|
|
1813
|
+
},
|
|
1814
|
+
identifyOnResolve(toggle) {
|
|
1815
|
+
if (typeof toggle === "boolean") identifyOnResolve = toggle;
|
|
1816
|
+
return identifyOnResolve;
|
|
1817
|
+
},
|
|
1818
|
+
resolve: (handler, context) => {
|
|
1819
|
+
for (const middleware of getMiddlewareList().map((entry) => entry.middleware).reverse()) handler = middleware(handler, context);
|
|
1820
|
+
if (identifyOnResolve) console.log(stack.identify());
|
|
1821
|
+
return handler;
|
|
1822
|
+
}
|
|
1823
|
+
};
|
|
1824
|
+
return stack;
|
|
1825
|
+
};
|
|
1826
|
+
var stepWeights = {
|
|
1827
|
+
initialize: 5,
|
|
1828
|
+
serialize: 4,
|
|
1829
|
+
build: 3,
|
|
1830
|
+
finalizeRequest: 2,
|
|
1831
|
+
deserialize: 1
|
|
1832
|
+
};
|
|
1833
|
+
var priorityWeights = {
|
|
1834
|
+
high: 3,
|
|
1835
|
+
normal: 2,
|
|
1836
|
+
low: 1
|
|
1837
|
+
};
|
|
1838
|
+
//#endregion
|
|
1839
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/client.js
|
|
1840
|
+
var Client = class {
|
|
1841
|
+
config;
|
|
1842
|
+
middlewareStack = constructStack();
|
|
1843
|
+
initConfig;
|
|
1844
|
+
handlers;
|
|
1845
|
+
constructor(config) {
|
|
1846
|
+
this.config = config;
|
|
1847
|
+
const { protocol, protocolSettings } = config;
|
|
1848
|
+
if (protocolSettings) {
|
|
1849
|
+
if (typeof protocol === "function") config.protocol = new protocol(protocolSettings);
|
|
1850
|
+
}
|
|
1851
|
+
}
|
|
1852
|
+
send(command, optionsOrCb, cb) {
|
|
1853
|
+
const options = typeof optionsOrCb !== "function" ? optionsOrCb : void 0;
|
|
1854
|
+
const callback = typeof optionsOrCb === "function" ? optionsOrCb : cb;
|
|
1855
|
+
const useHandlerCache = options === void 0 && this.config.cacheMiddleware === true;
|
|
1856
|
+
let handler;
|
|
1857
|
+
if (useHandlerCache) {
|
|
1858
|
+
if (!this.handlers) this.handlers = /* @__PURE__ */ new WeakMap();
|
|
1859
|
+
const handlers = this.handlers;
|
|
1860
|
+
if (handlers.has(command.constructor)) handler = handlers.get(command.constructor);
|
|
1861
|
+
else {
|
|
1862
|
+
handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
|
|
1863
|
+
handlers.set(command.constructor, handler);
|
|
1864
|
+
}
|
|
1865
|
+
} else {
|
|
1866
|
+
delete this.handlers;
|
|
1867
|
+
handler = command.resolveMiddleware(this.middlewareStack, this.config, options);
|
|
1868
|
+
}
|
|
1869
|
+
if (callback) handler(command).then((result) => callback(null, result.output), (err) => callback(err)).catch(() => {});
|
|
1870
|
+
else return handler(command).then((result) => result.output);
|
|
1871
|
+
}
|
|
1872
|
+
destroy() {
|
|
1873
|
+
this.config?.requestHandler?.destroy?.();
|
|
1874
|
+
delete this.handlers;
|
|
1875
|
+
}
|
|
1876
|
+
};
|
|
1877
|
+
//#endregion
|
|
1878
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/schemaLogFilter.js
|
|
1879
|
+
var SENSITIVE_STRING = "***SensitiveInformation***";
|
|
1880
|
+
function schemaLogFilter(schema, data) {
|
|
1881
|
+
if (data == null) return data;
|
|
1882
|
+
const ns = NormalizedSchema.of(schema);
|
|
1883
|
+
if (ns.getMergedTraits().sensitive) return SENSITIVE_STRING;
|
|
1884
|
+
if (ns.isListSchema()) {
|
|
1885
|
+
if (!!ns.getValueSchema().getMergedTraits().sensitive) return SENSITIVE_STRING;
|
|
1886
|
+
} else if (ns.isMapSchema()) {
|
|
1887
|
+
if (!!ns.getKeySchema().getMergedTraits().sensitive || !!ns.getValueSchema().getMergedTraits().sensitive) return SENSITIVE_STRING;
|
|
1888
|
+
} else if (ns.isStructSchema() && typeof data === "object") {
|
|
1889
|
+
const object = data;
|
|
1890
|
+
const newObject = {};
|
|
1891
|
+
for (const [member, memberNs] of ns.structIterator()) if (object[member] != null) newObject[member] = schemaLogFilter(memberNs, object[member]);
|
|
1892
|
+
return newObject;
|
|
1893
|
+
}
|
|
1894
|
+
return data;
|
|
1895
|
+
}
|
|
1896
|
+
//#endregion
|
|
1897
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/command.js
|
|
1898
|
+
var Command = class {
|
|
1899
|
+
middlewareStack = constructStack();
|
|
1900
|
+
schema;
|
|
1901
|
+
static classBuilder() {
|
|
1902
|
+
return new ClassBuilder();
|
|
1903
|
+
}
|
|
1904
|
+
resolveMiddlewareWithContext(clientStack, configuration, options, { middlewareFn, clientName, commandName, inputFilterSensitiveLog, outputFilterSensitiveLog, smithyContext, additionalContext, CommandCtor }) {
|
|
1905
|
+
for (const mw of middlewareFn.bind(this)(CommandCtor, clientStack, configuration, options)) this.middlewareStack.use(mw);
|
|
1906
|
+
const stack = clientStack.concat(this.middlewareStack);
|
|
1907
|
+
const { logger } = configuration;
|
|
1908
|
+
const handlerExecutionContext = {
|
|
1909
|
+
logger,
|
|
1910
|
+
clientName,
|
|
1911
|
+
commandName,
|
|
1912
|
+
inputFilterSensitiveLog,
|
|
1913
|
+
outputFilterSensitiveLog,
|
|
1914
|
+
[SMITHY_CONTEXT_KEY]: {
|
|
1915
|
+
commandInstance: this,
|
|
1916
|
+
...smithyContext
|
|
1917
|
+
},
|
|
1918
|
+
...additionalContext
|
|
1919
|
+
};
|
|
1920
|
+
const { requestHandler } = configuration;
|
|
1921
|
+
return stack.resolve((request) => requestHandler.handle(request.request, options || {}), handlerExecutionContext);
|
|
1922
|
+
}
|
|
1923
|
+
};
|
|
1924
|
+
var ClassBuilder = class {
|
|
1925
|
+
_init = () => {};
|
|
1926
|
+
_ep = {};
|
|
1927
|
+
_middlewareFn = () => [];
|
|
1928
|
+
_commandName = "";
|
|
1929
|
+
_clientName = "";
|
|
1930
|
+
_additionalContext = {};
|
|
1931
|
+
_smithyContext = {};
|
|
1932
|
+
_inputFilterSensitiveLog = void 0;
|
|
1933
|
+
_outputFilterSensitiveLog = void 0;
|
|
1934
|
+
_serializer = null;
|
|
1935
|
+
_deserializer = null;
|
|
1936
|
+
_operationSchema;
|
|
1937
|
+
init(cb) {
|
|
1938
|
+
this._init = cb;
|
|
1939
|
+
}
|
|
1940
|
+
ep(endpointParameterInstructions) {
|
|
1941
|
+
this._ep = endpointParameterInstructions;
|
|
1942
|
+
return this;
|
|
1943
|
+
}
|
|
1944
|
+
m(middlewareSupplier) {
|
|
1945
|
+
this._middlewareFn = middlewareSupplier;
|
|
1946
|
+
return this;
|
|
1947
|
+
}
|
|
1948
|
+
s(service, operation, smithyContext = {}) {
|
|
1949
|
+
this._smithyContext = {
|
|
1950
|
+
service,
|
|
1951
|
+
operation,
|
|
1952
|
+
...smithyContext
|
|
1953
|
+
};
|
|
1954
|
+
return this;
|
|
1955
|
+
}
|
|
1956
|
+
c(additionalContext = {}) {
|
|
1957
|
+
this._additionalContext = additionalContext;
|
|
1958
|
+
return this;
|
|
1959
|
+
}
|
|
1960
|
+
n(clientName, commandName) {
|
|
1961
|
+
this._clientName = clientName;
|
|
1962
|
+
this._commandName = commandName;
|
|
1963
|
+
return this;
|
|
1964
|
+
}
|
|
1965
|
+
f(inputFilter = (_) => _, outputFilter = (_) => _) {
|
|
1966
|
+
this._inputFilterSensitiveLog = inputFilter;
|
|
1967
|
+
this._outputFilterSensitiveLog = outputFilter;
|
|
1968
|
+
return this;
|
|
1969
|
+
}
|
|
1970
|
+
ser(serializer) {
|
|
1971
|
+
this._serializer = serializer;
|
|
1972
|
+
return this;
|
|
1973
|
+
}
|
|
1974
|
+
de(deserializer) {
|
|
1975
|
+
this._deserializer = deserializer;
|
|
1976
|
+
return this;
|
|
1977
|
+
}
|
|
1978
|
+
sc(operation) {
|
|
1979
|
+
this._operationSchema = operation;
|
|
1980
|
+
this._smithyContext.operationSchema = operation;
|
|
1981
|
+
return this;
|
|
1982
|
+
}
|
|
1983
|
+
build() {
|
|
1984
|
+
const closure = this;
|
|
1985
|
+
let CommandRef;
|
|
1986
|
+
return CommandRef = class extends Command {
|
|
1987
|
+
input;
|
|
1988
|
+
static getEndpointParameterInstructions() {
|
|
1989
|
+
return closure._ep;
|
|
1990
|
+
}
|
|
1991
|
+
constructor(...[input]) {
|
|
1992
|
+
super();
|
|
1993
|
+
this.input = input ?? {};
|
|
1994
|
+
closure._init(this);
|
|
1995
|
+
this.schema = closure._operationSchema;
|
|
1996
|
+
}
|
|
1997
|
+
resolveMiddleware(stack, configuration, options) {
|
|
1998
|
+
const op = closure._operationSchema;
|
|
1999
|
+
const input = op?.[4] ?? op?.input;
|
|
2000
|
+
const output = op?.[5] ?? op?.output;
|
|
2001
|
+
return this.resolveMiddlewareWithContext(stack, configuration, options, {
|
|
2002
|
+
CommandCtor: CommandRef,
|
|
2003
|
+
middlewareFn: closure._middlewareFn,
|
|
2004
|
+
clientName: closure._clientName,
|
|
2005
|
+
commandName: closure._commandName,
|
|
2006
|
+
inputFilterSensitiveLog: closure._inputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, input) : (_) => _),
|
|
2007
|
+
outputFilterSensitiveLog: closure._outputFilterSensitiveLog ?? (op ? schemaLogFilter.bind(null, output) : (_) => _),
|
|
2008
|
+
smithyContext: closure._smithyContext,
|
|
2009
|
+
additionalContext: closure._additionalContext
|
|
2010
|
+
});
|
|
2011
|
+
}
|
|
2012
|
+
serialize = closure._serializer;
|
|
2013
|
+
deserialize = closure._deserializer;
|
|
2014
|
+
};
|
|
2015
|
+
}
|
|
2016
|
+
};
|
|
2017
|
+
//#endregion
|
|
2018
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/exceptions.js
|
|
2019
|
+
var ServiceException = class ServiceException extends Error {
|
|
2020
|
+
$fault;
|
|
2021
|
+
$response;
|
|
2022
|
+
$retryable;
|
|
2023
|
+
$metadata;
|
|
2024
|
+
constructor(options) {
|
|
2025
|
+
super(options.message);
|
|
2026
|
+
Object.setPrototypeOf(this, Object.getPrototypeOf(this).constructor.prototype);
|
|
2027
|
+
this.name = options.name;
|
|
2028
|
+
this.$fault = options.$fault;
|
|
2029
|
+
this.$metadata = options.$metadata;
|
|
2030
|
+
}
|
|
2031
|
+
static isInstance(value) {
|
|
2032
|
+
if (!value) return false;
|
|
2033
|
+
const candidate = value;
|
|
2034
|
+
return ServiceException.prototype.isPrototypeOf(candidate) || Boolean(candidate.$fault) && Boolean(candidate.$metadata) && (candidate.$fault === "client" || candidate.$fault === "server");
|
|
2035
|
+
}
|
|
2036
|
+
static [Symbol.hasInstance](instance) {
|
|
2037
|
+
if (!instance) return false;
|
|
2038
|
+
const candidate = instance;
|
|
2039
|
+
if (this === ServiceException) return ServiceException.isInstance(instance);
|
|
2040
|
+
if (ServiceException.isInstance(instance)) {
|
|
2041
|
+
if (candidate.name && this.name) return this.prototype.isPrototypeOf(instance) || candidate.name === this.name;
|
|
2042
|
+
return this.prototype.isPrototypeOf(instance);
|
|
2043
|
+
}
|
|
2044
|
+
return false;
|
|
2045
|
+
}
|
|
2046
|
+
};
|
|
2047
|
+
var decorateServiceException = (exception, additions = {}) => {
|
|
2048
|
+
Object.entries(additions).filter(([, v]) => v !== void 0).forEach(([k, v]) => {
|
|
2049
|
+
if (exception[k] == void 0 || exception[k] === "") exception[k] = v;
|
|
2050
|
+
});
|
|
2051
|
+
exception.message = exception.message || exception.Message || "UnknownError";
|
|
2052
|
+
delete exception.Message;
|
|
2053
|
+
return exception;
|
|
2054
|
+
};
|
|
2055
|
+
//#endregion
|
|
2056
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/defaults-mode.js
|
|
2057
|
+
var loadConfigsForDefaultMode = (mode) => {
|
|
2058
|
+
switch (mode) {
|
|
2059
|
+
case "standard": return {
|
|
2060
|
+
retryMode: "standard",
|
|
2061
|
+
connectionTimeout: 3100
|
|
2062
|
+
};
|
|
2063
|
+
case "in-region": return {
|
|
2064
|
+
retryMode: "standard",
|
|
2065
|
+
connectionTimeout: 1100
|
|
2066
|
+
};
|
|
2067
|
+
case "cross-region": return {
|
|
2068
|
+
retryMode: "standard",
|
|
2069
|
+
connectionTimeout: 3100
|
|
2070
|
+
};
|
|
2071
|
+
case "mobile": return {
|
|
2072
|
+
retryMode: "standard",
|
|
2073
|
+
connectionTimeout: 3e4
|
|
2074
|
+
};
|
|
2075
|
+
default: return {};
|
|
2076
|
+
}
|
|
2077
|
+
};
|
|
2078
|
+
//#endregion
|
|
2079
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/emitWarningIfUnsupportedVersion.js
|
|
2080
|
+
var warningEmitted = false;
|
|
2081
|
+
var emitWarningIfUnsupportedVersion = (version) => {
|
|
2082
|
+
if (version && !warningEmitted && parseInt(version.substring(1, version.indexOf("."))) < 16) warningEmitted = true;
|
|
2083
|
+
};
|
|
2084
|
+
//#endregion
|
|
2085
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/extensions/checksum.js
|
|
2086
|
+
var knownAlgorithms = Object.values(AlgorithmId);
|
|
2087
|
+
var getChecksumConfiguration = (runtimeConfig) => {
|
|
2088
|
+
const checksumAlgorithms = [];
|
|
2089
|
+
for (const id in AlgorithmId) {
|
|
2090
|
+
const algorithmId = AlgorithmId[id];
|
|
2091
|
+
if (runtimeConfig[algorithmId] === void 0) continue;
|
|
2092
|
+
checksumAlgorithms.push({
|
|
2093
|
+
algorithmId: () => algorithmId,
|
|
2094
|
+
checksumConstructor: () => runtimeConfig[algorithmId]
|
|
2095
|
+
});
|
|
2096
|
+
}
|
|
2097
|
+
for (const [id, ChecksumCtor] of Object.entries(runtimeConfig.checksumAlgorithms ?? {})) checksumAlgorithms.push({
|
|
2098
|
+
algorithmId: () => id,
|
|
2099
|
+
checksumConstructor: () => ChecksumCtor
|
|
2100
|
+
});
|
|
2101
|
+
return {
|
|
2102
|
+
addChecksumAlgorithm(algo) {
|
|
2103
|
+
runtimeConfig.checksumAlgorithms = runtimeConfig.checksumAlgorithms ?? {};
|
|
2104
|
+
const id = algo.algorithmId();
|
|
2105
|
+
const ctor = algo.checksumConstructor();
|
|
2106
|
+
if (knownAlgorithms.includes(id)) runtimeConfig.checksumAlgorithms[id.toUpperCase()] = ctor;
|
|
2107
|
+
else runtimeConfig.checksumAlgorithms[id] = ctor;
|
|
2108
|
+
checksumAlgorithms.push(algo);
|
|
2109
|
+
},
|
|
2110
|
+
checksumAlgorithms() {
|
|
2111
|
+
return checksumAlgorithms;
|
|
2112
|
+
}
|
|
2113
|
+
};
|
|
2114
|
+
};
|
|
2115
|
+
var resolveChecksumRuntimeConfig = (clientConfig) => {
|
|
2116
|
+
const runtimeConfig = {};
|
|
2117
|
+
clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
|
|
2118
|
+
const id = checksumAlgorithm.algorithmId();
|
|
2119
|
+
if (knownAlgorithms.includes(id)) runtimeConfig[id] = checksumAlgorithm.checksumConstructor();
|
|
2120
|
+
});
|
|
2121
|
+
return runtimeConfig;
|
|
2122
|
+
};
|
|
2123
|
+
//#endregion
|
|
2124
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/extensions/retry.js
|
|
2125
|
+
var getRetryConfiguration = (runtimeConfig) => {
|
|
2126
|
+
return {
|
|
2127
|
+
setRetryStrategy(retryStrategy) {
|
|
2128
|
+
runtimeConfig.retryStrategy = retryStrategy;
|
|
2129
|
+
},
|
|
2130
|
+
retryStrategy() {
|
|
2131
|
+
return runtimeConfig.retryStrategy;
|
|
2132
|
+
}
|
|
2133
|
+
};
|
|
2134
|
+
};
|
|
2135
|
+
var resolveRetryRuntimeConfig = (retryStrategyConfiguration) => {
|
|
2136
|
+
const runtimeConfig = {};
|
|
2137
|
+
runtimeConfig.retryStrategy = retryStrategyConfiguration.retryStrategy();
|
|
2138
|
+
return runtimeConfig;
|
|
2139
|
+
};
|
|
2140
|
+
//#endregion
|
|
2141
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/extensions/defaultExtensionConfiguration.js
|
|
2142
|
+
var getDefaultExtensionConfiguration = (runtimeConfig) => {
|
|
2143
|
+
return Object.assign(getChecksumConfiguration(runtimeConfig), getRetryConfiguration(runtimeConfig));
|
|
2144
|
+
};
|
|
2145
|
+
var resolveDefaultRuntimeConfig = (config) => {
|
|
2146
|
+
return Object.assign(resolveChecksumRuntimeConfig(config), resolveRetryRuntimeConfig(config));
|
|
2147
|
+
};
|
|
2148
|
+
//#endregion
|
|
2149
|
+
//#region ../../../node_modules/@smithy/smithy-client/dist-es/NoOpLogger.js
|
|
2150
|
+
var NoOpLogger = class {
|
|
2151
|
+
trace() {}
|
|
2152
|
+
debug() {}
|
|
2153
|
+
info() {}
|
|
2154
|
+
warn() {}
|
|
2155
|
+
error() {}
|
|
2156
|
+
};
|
|
2157
|
+
//#endregion
|
|
2158
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ProtocolLib.js
|
|
2159
|
+
var ProtocolLib = class {
|
|
2160
|
+
queryCompat;
|
|
2161
|
+
errorRegistry;
|
|
2162
|
+
constructor(queryCompat = false) {
|
|
2163
|
+
this.queryCompat = queryCompat;
|
|
2164
|
+
}
|
|
2165
|
+
resolveRestContentType(defaultContentType, inputSchema) {
|
|
2166
|
+
const members = inputSchema.getMemberSchemas();
|
|
2167
|
+
const httpPayloadMember = Object.values(members).find((m) => {
|
|
2168
|
+
return !!m.getMergedTraits().httpPayload;
|
|
2169
|
+
});
|
|
2170
|
+
if (httpPayloadMember) {
|
|
2171
|
+
const mediaType = httpPayloadMember.getMergedTraits().mediaType;
|
|
2172
|
+
if (mediaType) return mediaType;
|
|
2173
|
+
else if (httpPayloadMember.isStringSchema()) return "text/plain";
|
|
2174
|
+
else if (httpPayloadMember.isBlobSchema()) return "application/octet-stream";
|
|
2175
|
+
else return defaultContentType;
|
|
2176
|
+
} else if (!inputSchema.isUnitSchema()) {
|
|
2177
|
+
if (Object.values(members).find((m) => {
|
|
2178
|
+
const { httpQuery, httpQueryParams, httpHeader, httpLabel, httpPrefixHeaders } = m.getMergedTraits();
|
|
2179
|
+
return !httpQuery && !httpQueryParams && !httpHeader && !httpLabel && httpPrefixHeaders === void 0;
|
|
2180
|
+
})) return defaultContentType;
|
|
2181
|
+
}
|
|
2182
|
+
}
|
|
2183
|
+
async getErrorSchemaOrThrowBaseException(errorIdentifier, defaultNamespace, response, dataObject, metadata, getErrorSchema) {
|
|
2184
|
+
let errorName = errorIdentifier;
|
|
2185
|
+
if (errorIdentifier.includes("#")) [, errorName] = errorIdentifier.split("#");
|
|
2186
|
+
const errorMetadata = {
|
|
2187
|
+
$metadata: metadata,
|
|
2188
|
+
$fault: response.statusCode < 500 ? "client" : "server"
|
|
2189
|
+
};
|
|
2190
|
+
if (!this.errorRegistry) throw new Error("@aws-sdk/core/protocols - error handler not initialized.");
|
|
2191
|
+
try {
|
|
2192
|
+
return {
|
|
2193
|
+
errorSchema: getErrorSchema?.(this.errorRegistry, errorName) ?? this.errorRegistry.getSchema(errorIdentifier),
|
|
2194
|
+
errorMetadata
|
|
2195
|
+
};
|
|
2196
|
+
} catch (e) {
|
|
2197
|
+
dataObject.message = dataObject.message ?? dataObject.Message ?? "UnknownError";
|
|
2198
|
+
const synthetic = this.errorRegistry;
|
|
2199
|
+
const baseExceptionSchema = synthetic.getBaseException();
|
|
2200
|
+
if (baseExceptionSchema) {
|
|
2201
|
+
const ErrorCtor = synthetic.getErrorCtor(baseExceptionSchema) ?? Error;
|
|
2202
|
+
throw this.decorateServiceException(Object.assign(new ErrorCtor({ name: errorName }), errorMetadata), dataObject);
|
|
2203
|
+
}
|
|
2204
|
+
const d = dataObject;
|
|
2205
|
+
const message = d?.message ?? d?.Message ?? d?.Error?.Message ?? d?.Error?.message;
|
|
2206
|
+
throw this.decorateServiceException(Object.assign(new Error(message), { name: errorName }, errorMetadata), dataObject);
|
|
2207
|
+
}
|
|
2208
|
+
}
|
|
2209
|
+
compose(composite, errorIdentifier, defaultNamespace) {
|
|
2210
|
+
let namespace = defaultNamespace;
|
|
2211
|
+
if (errorIdentifier.includes("#")) [namespace] = errorIdentifier.split("#");
|
|
2212
|
+
const staticRegistry = TypeRegistry.for(namespace);
|
|
2213
|
+
const defaultSyntheticRegistry = TypeRegistry.for("smithy.ts.sdk.synthetic." + defaultNamespace);
|
|
2214
|
+
composite.copyFrom(staticRegistry);
|
|
2215
|
+
composite.copyFrom(defaultSyntheticRegistry);
|
|
2216
|
+
this.errorRegistry = composite;
|
|
2217
|
+
}
|
|
2218
|
+
decorateServiceException(exception, additions = {}) {
|
|
2219
|
+
if (this.queryCompat) {
|
|
2220
|
+
const msg = exception.Message ?? additions.Message;
|
|
2221
|
+
const error = decorateServiceException(exception, additions);
|
|
2222
|
+
if (msg) error.message = msg;
|
|
2223
|
+
error.Error = {
|
|
2224
|
+
...error.Error,
|
|
2225
|
+
Type: error.Error?.Type,
|
|
2226
|
+
Code: error.Error?.Code,
|
|
2227
|
+
Message: error.Error?.message ?? error.Error?.Message ?? msg
|
|
2228
|
+
};
|
|
2229
|
+
const reqId = error.$metadata.requestId;
|
|
2230
|
+
if (reqId) error.RequestId = reqId;
|
|
2231
|
+
return error;
|
|
2232
|
+
}
|
|
2233
|
+
return decorateServiceException(exception, additions);
|
|
2234
|
+
}
|
|
2235
|
+
setQueryCompatError(output, response) {
|
|
2236
|
+
const queryErrorHeader = response.headers?.["x-amzn-query-error"];
|
|
2237
|
+
if (output !== void 0 && queryErrorHeader != null) {
|
|
2238
|
+
const [Code, Type] = queryErrorHeader.split(";");
|
|
2239
|
+
const entries = Object.entries(output);
|
|
2240
|
+
const Error = {
|
|
2241
|
+
Code,
|
|
2242
|
+
Type
|
|
2243
|
+
};
|
|
2244
|
+
Object.assign(output, Error);
|
|
2245
|
+
for (const [k, v] of entries) Error[k === "message" ? "Message" : k] = v;
|
|
2246
|
+
delete Error.__type;
|
|
2247
|
+
output.Error = Error;
|
|
2248
|
+
}
|
|
2249
|
+
}
|
|
2250
|
+
queryCompatOutput(queryCompatErrorData, errorData) {
|
|
2251
|
+
if (queryCompatErrorData.Error) errorData.Error = queryCompatErrorData.Error;
|
|
2252
|
+
if (queryCompatErrorData.Type) errorData.Type = queryCompatErrorData.Type;
|
|
2253
|
+
if (queryCompatErrorData.Code) errorData.Code = queryCompatErrorData.Code;
|
|
2254
|
+
}
|
|
2255
|
+
findQueryCompatibleError(registry, errorName) {
|
|
2256
|
+
try {
|
|
2257
|
+
return registry.getSchema(errorName);
|
|
2258
|
+
} catch (e) {
|
|
2259
|
+
return registry.find((schema) => NormalizedSchema.of(schema).getMergedTraits().awsQueryError?.[0] === errorName);
|
|
2260
|
+
}
|
|
2261
|
+
}
|
|
2262
|
+
};
|
|
2263
|
+
//#endregion
|
|
2264
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/ConfigurableSerdeContext.js
|
|
2265
|
+
var SerdeContextConfig = class {
|
|
2266
|
+
serdeContext;
|
|
2267
|
+
setSerdeContext(serdeContext) {
|
|
2268
|
+
this.serdeContext = serdeContext;
|
|
2269
|
+
}
|
|
2270
|
+
};
|
|
2271
|
+
//#endregion
|
|
2272
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/UnionSerde.js
|
|
2273
|
+
var UnionSerde = class {
|
|
2274
|
+
from;
|
|
2275
|
+
to;
|
|
2276
|
+
keys;
|
|
2277
|
+
constructor(from, to) {
|
|
2278
|
+
this.from = from;
|
|
2279
|
+
this.to = to;
|
|
2280
|
+
this.keys = new Set(Object.keys(this.from).filter((k) => k !== "__type"));
|
|
2281
|
+
}
|
|
2282
|
+
mark(key) {
|
|
2283
|
+
this.keys.delete(key);
|
|
2284
|
+
}
|
|
2285
|
+
hasUnknown() {
|
|
2286
|
+
return this.keys.size === 1 && Object.keys(this.to).length === 0;
|
|
2287
|
+
}
|
|
2288
|
+
writeUnknown() {
|
|
2289
|
+
if (this.hasUnknown()) {
|
|
2290
|
+
const k = this.keys.values().next().value;
|
|
2291
|
+
const v = this.from[k];
|
|
2292
|
+
this.to.$unknown = [k, v];
|
|
2293
|
+
}
|
|
2294
|
+
}
|
|
2295
|
+
};
|
|
2296
|
+
//#endregion
|
|
2297
|
+
//#region ../../../node_modules/@aws-sdk/middleware-host-header/dist-es/index.js
|
|
2298
|
+
function resolveHostHeaderConfig(input) {
|
|
2299
|
+
return input;
|
|
2300
|
+
}
|
|
2301
|
+
var hostHeaderMiddleware = (options) => (next) => async (args) => {
|
|
2302
|
+
if (!require_httpRequest.HttpRequest.isInstance(args.request)) return next(args);
|
|
2303
|
+
const { request } = args;
|
|
2304
|
+
const { handlerProtocol = "" } = options.requestHandler.metadata || {};
|
|
2305
|
+
if (handlerProtocol.indexOf("h2") >= 0 && !request.headers[":authority"]) {
|
|
2306
|
+
delete request.headers["host"];
|
|
2307
|
+
request.headers[":authority"] = request.hostname + (request.port ? ":" + request.port : "");
|
|
2308
|
+
} else if (!request.headers["host"]) {
|
|
2309
|
+
let host = request.hostname;
|
|
2310
|
+
if (request.port != null) host += `:${request.port}`;
|
|
2311
|
+
request.headers["host"] = host;
|
|
2312
|
+
}
|
|
2313
|
+
return next(args);
|
|
2314
|
+
};
|
|
2315
|
+
var hostHeaderMiddlewareOptions = {
|
|
2316
|
+
name: "hostHeaderMiddleware",
|
|
2317
|
+
step: "build",
|
|
2318
|
+
priority: "low",
|
|
2319
|
+
tags: ["HOST"],
|
|
2320
|
+
override: true
|
|
2321
|
+
};
|
|
2322
|
+
var getHostHeaderPlugin = (options) => ({ applyToStack: (clientStack) => {
|
|
2323
|
+
clientStack.add(hostHeaderMiddleware(options), hostHeaderMiddlewareOptions);
|
|
2324
|
+
} });
|
|
2325
|
+
//#endregion
|
|
2326
|
+
//#region ../../../node_modules/@aws-sdk/middleware-logger/dist-es/loggerMiddleware.js
|
|
2327
|
+
var loggerMiddleware = () => (next, context) => async (args) => {
|
|
2328
|
+
try {
|
|
2329
|
+
const response = await next(args);
|
|
2330
|
+
const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
|
|
2331
|
+
const { overrideInputFilterSensitiveLog, overrideOutputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
2332
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
|
|
2333
|
+
const outputFilterSensitiveLog = overrideOutputFilterSensitiveLog ?? context.outputFilterSensitiveLog;
|
|
2334
|
+
const { $metadata, ...outputWithoutMetadata } = response.output;
|
|
2335
|
+
logger?.info?.({
|
|
2336
|
+
clientName,
|
|
2337
|
+
commandName,
|
|
2338
|
+
input: inputFilterSensitiveLog(args.input),
|
|
2339
|
+
output: outputFilterSensitiveLog(outputWithoutMetadata),
|
|
2340
|
+
metadata: $metadata
|
|
2341
|
+
});
|
|
2342
|
+
return response;
|
|
2343
|
+
} catch (error) {
|
|
2344
|
+
const { clientName, commandName, logger, dynamoDbDocumentClientOptions = {} } = context;
|
|
2345
|
+
const { overrideInputFilterSensitiveLog } = dynamoDbDocumentClientOptions;
|
|
2346
|
+
const inputFilterSensitiveLog = overrideInputFilterSensitiveLog ?? context.inputFilterSensitiveLog;
|
|
2347
|
+
logger?.error?.({
|
|
2348
|
+
clientName,
|
|
2349
|
+
commandName,
|
|
2350
|
+
input: inputFilterSensitiveLog(args.input),
|
|
2351
|
+
error,
|
|
2352
|
+
metadata: error.$metadata
|
|
2353
|
+
});
|
|
2354
|
+
throw error;
|
|
2355
|
+
}
|
|
2356
|
+
};
|
|
2357
|
+
var loggerMiddlewareOptions = {
|
|
2358
|
+
name: "loggerMiddleware",
|
|
2359
|
+
tags: ["LOGGER"],
|
|
2360
|
+
step: "initialize",
|
|
2361
|
+
override: true
|
|
2362
|
+
};
|
|
2363
|
+
var getLoggerPlugin = (options) => ({ applyToStack: (clientStack) => {
|
|
2364
|
+
clientStack.add(loggerMiddleware(), loggerMiddlewareOptions);
|
|
2365
|
+
} });
|
|
2366
|
+
//#endregion
|
|
2367
|
+
//#region ../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/configuration.js
|
|
2368
|
+
var recursionDetectionMiddlewareOptions = {
|
|
2369
|
+
step: "build",
|
|
2370
|
+
tags: ["RECURSION_DETECTION"],
|
|
2371
|
+
name: "recursionDetectionMiddleware",
|
|
2372
|
+
override: true,
|
|
2373
|
+
priority: "low"
|
|
2374
|
+
};
|
|
2375
|
+
//#endregion
|
|
2376
|
+
//#region ../../../node_modules/@aws/lambda-invoke-store/dist-es/invoke-store.js
|
|
2377
|
+
var PROTECTED_KEYS = {
|
|
2378
|
+
REQUEST_ID: Symbol.for("_AWS_LAMBDA_REQUEST_ID"),
|
|
2379
|
+
X_RAY_TRACE_ID: Symbol.for("_AWS_LAMBDA_X_RAY_TRACE_ID"),
|
|
2380
|
+
TENANT_ID: Symbol.for("_AWS_LAMBDA_TENANT_ID")
|
|
2381
|
+
};
|
|
2382
|
+
var NO_GLOBAL_AWS_LAMBDA = ["true", "1"].includes(process.env?.AWS_LAMBDA_NODEJS_NO_GLOBAL_AWSLAMBDA ?? "");
|
|
2383
|
+
if (!NO_GLOBAL_AWS_LAMBDA) globalThis.awslambda = globalThis.awslambda || {};
|
|
2384
|
+
var InvokeStoreBase = class {
|
|
2385
|
+
static PROTECTED_KEYS = PROTECTED_KEYS;
|
|
2386
|
+
isProtectedKey(key) {
|
|
2387
|
+
return Object.values(PROTECTED_KEYS).includes(key);
|
|
2388
|
+
}
|
|
2389
|
+
getRequestId() {
|
|
2390
|
+
return this.get(PROTECTED_KEYS.REQUEST_ID) ?? "-";
|
|
2391
|
+
}
|
|
2392
|
+
getXRayTraceId() {
|
|
2393
|
+
return this.get(PROTECTED_KEYS.X_RAY_TRACE_ID);
|
|
2394
|
+
}
|
|
2395
|
+
getTenantId() {
|
|
2396
|
+
return this.get(PROTECTED_KEYS.TENANT_ID);
|
|
2397
|
+
}
|
|
2398
|
+
};
|
|
2399
|
+
var InvokeStoreSingle = class extends InvokeStoreBase {
|
|
2400
|
+
currentContext;
|
|
2401
|
+
getContext() {
|
|
2402
|
+
return this.currentContext;
|
|
2403
|
+
}
|
|
2404
|
+
hasContext() {
|
|
2405
|
+
return this.currentContext !== void 0;
|
|
2406
|
+
}
|
|
2407
|
+
get(key) {
|
|
2408
|
+
return this.currentContext?.[key];
|
|
2409
|
+
}
|
|
2410
|
+
set(key, value) {
|
|
2411
|
+
if (this.isProtectedKey(key)) throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
|
|
2412
|
+
this.currentContext = this.currentContext || {};
|
|
2413
|
+
this.currentContext[key] = value;
|
|
2414
|
+
}
|
|
2415
|
+
run(context, fn) {
|
|
2416
|
+
this.currentContext = context;
|
|
2417
|
+
return fn();
|
|
2418
|
+
}
|
|
2419
|
+
};
|
|
2420
|
+
var InvokeStoreMulti = class InvokeStoreMulti extends InvokeStoreBase {
|
|
2421
|
+
als;
|
|
2422
|
+
static async create() {
|
|
2423
|
+
const instance = new InvokeStoreMulti();
|
|
2424
|
+
instance.als = new (await (import("node:async_hooks"))).AsyncLocalStorage();
|
|
2425
|
+
return instance;
|
|
2426
|
+
}
|
|
2427
|
+
getContext() {
|
|
2428
|
+
return this.als.getStore();
|
|
2429
|
+
}
|
|
2430
|
+
hasContext() {
|
|
2431
|
+
return this.als.getStore() !== void 0;
|
|
2432
|
+
}
|
|
2433
|
+
get(key) {
|
|
2434
|
+
return this.als.getStore()?.[key];
|
|
2435
|
+
}
|
|
2436
|
+
set(key, value) {
|
|
2437
|
+
if (this.isProtectedKey(key)) throw new Error(`Cannot modify protected Lambda context field: ${String(key)}`);
|
|
2438
|
+
const store = this.als.getStore();
|
|
2439
|
+
if (!store) throw new Error("No context available");
|
|
2440
|
+
store[key] = value;
|
|
2441
|
+
}
|
|
2442
|
+
run(context, fn) {
|
|
2443
|
+
return this.als.run(context, fn);
|
|
2444
|
+
}
|
|
2445
|
+
};
|
|
2446
|
+
var InvokeStore;
|
|
2447
|
+
(function(InvokeStore) {
|
|
2448
|
+
let instance = null;
|
|
2449
|
+
async function getInstanceAsync(forceInvokeStoreMulti) {
|
|
2450
|
+
if (!instance) instance = (async () => {
|
|
2451
|
+
const newInstance = forceInvokeStoreMulti === true || "AWS_LAMBDA_MAX_CONCURRENCY" in process.env ? await InvokeStoreMulti.create() : new InvokeStoreSingle();
|
|
2452
|
+
if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda?.InvokeStore) return globalThis.awslambda.InvokeStore;
|
|
2453
|
+
else if (!NO_GLOBAL_AWS_LAMBDA && globalThis.awslambda) {
|
|
2454
|
+
globalThis.awslambda.InvokeStore = newInstance;
|
|
2455
|
+
return newInstance;
|
|
2456
|
+
} else return newInstance;
|
|
2457
|
+
})();
|
|
2458
|
+
return instance;
|
|
2459
|
+
}
|
|
2460
|
+
InvokeStore.getInstanceAsync = getInstanceAsync;
|
|
2461
|
+
InvokeStore._testing = process.env.AWS_LAMBDA_BENCHMARK_MODE === "1" ? { reset: () => {
|
|
2462
|
+
instance = null;
|
|
2463
|
+
if (globalThis.awslambda?.InvokeStore) delete globalThis.awslambda.InvokeStore;
|
|
2464
|
+
globalThis.awslambda = { InvokeStore: void 0 };
|
|
2465
|
+
} } : void 0;
|
|
2466
|
+
})(InvokeStore || (InvokeStore = {}));
|
|
2467
|
+
//#endregion
|
|
2468
|
+
//#region ../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/recursionDetectionMiddleware.js
|
|
2469
|
+
var TRACE_ID_HEADER_NAME = "X-Amzn-Trace-Id";
|
|
2470
|
+
var ENV_LAMBDA_FUNCTION_NAME = "AWS_LAMBDA_FUNCTION_NAME";
|
|
2471
|
+
var ENV_TRACE_ID = "_X_AMZN_TRACE_ID";
|
|
2472
|
+
var recursionDetectionMiddleware = () => (next) => async (args) => {
|
|
2473
|
+
const { request } = args;
|
|
2474
|
+
if (!require_httpRequest.HttpRequest.isInstance(request)) return next(args);
|
|
2475
|
+
const traceIdHeader = Object.keys(request.headers ?? {}).find((h) => h.toLowerCase() === TRACE_ID_HEADER_NAME.toLowerCase()) ?? TRACE_ID_HEADER_NAME;
|
|
2476
|
+
if (request.headers.hasOwnProperty(traceIdHeader)) return next(args);
|
|
2477
|
+
const functionName = process.env[ENV_LAMBDA_FUNCTION_NAME];
|
|
2478
|
+
const traceIdFromEnv = process.env[ENV_TRACE_ID];
|
|
2479
|
+
const traceId = (await InvokeStore.getInstanceAsync())?.getXRayTraceId() ?? traceIdFromEnv;
|
|
2480
|
+
const nonEmptyString = (str) => typeof str === "string" && str.length > 0;
|
|
2481
|
+
if (nonEmptyString(functionName) && nonEmptyString(traceId)) request.headers[TRACE_ID_HEADER_NAME] = traceId;
|
|
2482
|
+
return next({
|
|
2483
|
+
...args,
|
|
2484
|
+
request
|
|
2485
|
+
});
|
|
2486
|
+
};
|
|
2487
|
+
//#endregion
|
|
2488
|
+
//#region ../../../node_modules/@aws-sdk/middleware-recursion-detection/dist-es/getRecursionDetectionPlugin.js
|
|
2489
|
+
var getRecursionDetectionPlugin = (options) => ({ applyToStack: (clientStack) => {
|
|
2490
|
+
clientStack.add(recursionDetectionMiddleware(), recursionDetectionMiddlewareOptions);
|
|
2491
|
+
} });
|
|
2492
|
+
//#endregion
|
|
2493
|
+
//#region ../../../node_modules/@smithy/util-config-provider/dist-es/booleanSelector.js
|
|
2494
|
+
var booleanSelector = (obj, key, type) => {
|
|
2495
|
+
if (!(key in obj)) return void 0;
|
|
2496
|
+
if (obj[key] === "true") return true;
|
|
2497
|
+
if (obj[key] === "false") return false;
|
|
2498
|
+
throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
|
|
2499
|
+
};
|
|
2500
|
+
//#endregion
|
|
2501
|
+
//#region ../../../node_modules/@smithy/util-config-provider/dist-es/types.js
|
|
2502
|
+
var SelectorType;
|
|
2503
|
+
(function(SelectorType) {
|
|
2504
|
+
SelectorType["ENV"] = "env";
|
|
2505
|
+
SelectorType["CONFIG"] = "shared config entry";
|
|
2506
|
+
})(SelectorType || (SelectorType = {}));
|
|
2507
|
+
function isValidUserAgentAppId(appId) {
|
|
2508
|
+
if (appId === void 0) return true;
|
|
2509
|
+
return typeof appId === "string" && appId.length <= 50;
|
|
2510
|
+
}
|
|
2511
|
+
function resolveUserAgentConfig(input) {
|
|
2512
|
+
const normalizedAppIdProvider = normalizeProvider$1(input.userAgentAppId ?? void 0);
|
|
2513
|
+
const { customUserAgent } = input;
|
|
2514
|
+
return Object.assign(input, {
|
|
2515
|
+
customUserAgent: typeof customUserAgent === "string" ? [[customUserAgent]] : customUserAgent,
|
|
2516
|
+
userAgentAppId: async () => {
|
|
2517
|
+
const appId = await normalizedAppIdProvider();
|
|
2518
|
+
if (!isValidUserAgentAppId(appId)) {
|
|
2519
|
+
const logger = input.logger?.constructor?.name === "NoOpLogger" || !input.logger ? console : input.logger;
|
|
2520
|
+
if (typeof appId !== "string") logger?.warn("userAgentAppId must be a string or undefined.");
|
|
2521
|
+
else if (appId.length > 50) logger?.warn("The provided userAgentAppId exceeds the maximum length of 50 characters.");
|
|
2522
|
+
}
|
|
2523
|
+
return appId;
|
|
2524
|
+
}
|
|
2525
|
+
});
|
|
2526
|
+
}
|
|
2527
|
+
//#endregion
|
|
2528
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/cache/EndpointCache.js
|
|
2529
|
+
var EndpointCache = class {
|
|
2530
|
+
capacity;
|
|
2531
|
+
data = /* @__PURE__ */ new Map();
|
|
2532
|
+
parameters = [];
|
|
2533
|
+
constructor({ size, params }) {
|
|
2534
|
+
this.capacity = size ?? 50;
|
|
2535
|
+
if (params) this.parameters = params;
|
|
2536
|
+
}
|
|
2537
|
+
get(endpointParams, resolver) {
|
|
2538
|
+
const key = this.hash(endpointParams);
|
|
2539
|
+
if (key === false) return resolver();
|
|
2540
|
+
if (!this.data.has(key)) {
|
|
2541
|
+
if (this.data.size > this.capacity + 10) {
|
|
2542
|
+
const keys = this.data.keys();
|
|
2543
|
+
let i = 0;
|
|
2544
|
+
while (true) {
|
|
2545
|
+
const { value, done } = keys.next();
|
|
2546
|
+
this.data.delete(value);
|
|
2547
|
+
if (done || ++i > 10) break;
|
|
2548
|
+
}
|
|
2549
|
+
}
|
|
2550
|
+
this.data.set(key, resolver());
|
|
2551
|
+
}
|
|
2552
|
+
return this.data.get(key);
|
|
2553
|
+
}
|
|
2554
|
+
size() {
|
|
2555
|
+
return this.data.size;
|
|
2556
|
+
}
|
|
2557
|
+
hash(endpointParams) {
|
|
2558
|
+
let buffer = "";
|
|
2559
|
+
const { parameters } = this;
|
|
2560
|
+
if (parameters.length === 0) return false;
|
|
2561
|
+
for (const param of parameters) {
|
|
2562
|
+
const val = String(endpointParams[param] ?? "");
|
|
2563
|
+
if (val.includes("|;")) return false;
|
|
2564
|
+
buffer += val + "|;";
|
|
2565
|
+
}
|
|
2566
|
+
return buffer;
|
|
2567
|
+
}
|
|
2568
|
+
};
|
|
2569
|
+
//#endregion
|
|
2570
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/isIpAddress.js
|
|
2571
|
+
var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
|
|
2572
|
+
var isIpAddress = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]");
|
|
2573
|
+
//#endregion
|
|
2574
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/isValidHostLabel.js
|
|
2575
|
+
var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
|
|
2576
|
+
var isValidHostLabel = (value, allowSubDomains = false) => {
|
|
2577
|
+
if (!allowSubDomains) return VALID_HOST_LABEL_REGEX.test(value);
|
|
2578
|
+
const labels = value.split(".");
|
|
2579
|
+
for (const label of labels) if (!isValidHostLabel(label)) return false;
|
|
2580
|
+
return true;
|
|
2581
|
+
};
|
|
2582
|
+
//#endregion
|
|
2583
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/customEndpointFunctions.js
|
|
2584
|
+
var customEndpointFunctions = {};
|
|
2585
|
+
//#endregion
|
|
2586
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/debug/debugId.js
|
|
2587
|
+
var debugId = "endpoints";
|
|
2588
|
+
//#endregion
|
|
2589
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/debug/toDebugString.js
|
|
2590
|
+
function toDebugString(input) {
|
|
2591
|
+
if (typeof input !== "object" || input == null) return input;
|
|
2592
|
+
if ("ref" in input) return `$${toDebugString(input.ref)}`;
|
|
2593
|
+
if ("fn" in input) return `${input.fn}(${(input.argv || []).map(toDebugString).join(", ")})`;
|
|
2594
|
+
return JSON.stringify(input, null, 2);
|
|
2595
|
+
}
|
|
2596
|
+
//#endregion
|
|
2597
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/types/EndpointError.js
|
|
2598
|
+
var EndpointError = class extends Error {
|
|
2599
|
+
constructor(message) {
|
|
2600
|
+
super(message);
|
|
2601
|
+
this.name = "EndpointError";
|
|
2602
|
+
}
|
|
2603
|
+
};
|
|
2604
|
+
//#endregion
|
|
2605
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/booleanEquals.js
|
|
2606
|
+
var booleanEquals = (value1, value2) => value1 === value2;
|
|
2607
|
+
//#endregion
|
|
2608
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttrPathList.js
|
|
2609
|
+
var getAttrPathList = (path) => {
|
|
2610
|
+
const parts = path.split(".");
|
|
2611
|
+
const pathList = [];
|
|
2612
|
+
for (const part of parts) {
|
|
2613
|
+
const squareBracketIndex = part.indexOf("[");
|
|
2614
|
+
if (squareBracketIndex !== -1) {
|
|
2615
|
+
if (part.indexOf("]") !== part.length - 1) throw new EndpointError(`Path: '${path}' does not end with ']'`);
|
|
2616
|
+
const arrayIndex = part.slice(squareBracketIndex + 1, -1);
|
|
2617
|
+
if (Number.isNaN(parseInt(arrayIndex))) throw new EndpointError(`Invalid array index: '${arrayIndex}' in path: '${path}'`);
|
|
2618
|
+
if (squareBracketIndex !== 0) pathList.push(part.slice(0, squareBracketIndex));
|
|
2619
|
+
pathList.push(arrayIndex);
|
|
2620
|
+
} else pathList.push(part);
|
|
2621
|
+
}
|
|
2622
|
+
return pathList;
|
|
2623
|
+
};
|
|
2624
|
+
//#endregion
|
|
2625
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/getAttr.js
|
|
2626
|
+
var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
|
|
2627
|
+
if (typeof acc !== "object") throw new EndpointError(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
|
|
2628
|
+
else if (Array.isArray(acc)) return acc[parseInt(index)];
|
|
2629
|
+
return acc[index];
|
|
2630
|
+
}, value);
|
|
2631
|
+
//#endregion
|
|
2632
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/isSet.js
|
|
2633
|
+
var isSet = (value) => value != null;
|
|
2634
|
+
//#endregion
|
|
2635
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/not.js
|
|
2636
|
+
var not = (value) => !value;
|
|
2637
|
+
//#endregion
|
|
2638
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/parseURL.js
|
|
2639
|
+
var DEFAULT_PORTS = {
|
|
2640
|
+
[EndpointURLScheme.HTTP]: 80,
|
|
2641
|
+
[EndpointURLScheme.HTTPS]: 443
|
|
2642
|
+
};
|
|
2643
|
+
var parseURL = (value) => {
|
|
2644
|
+
const whatwgURL = (() => {
|
|
2645
|
+
try {
|
|
2646
|
+
if (value instanceof URL) return value;
|
|
2647
|
+
if (typeof value === "object" && "hostname" in value) {
|
|
2648
|
+
const { hostname, port, protocol = "", path = "", query = {} } = value;
|
|
2649
|
+
const url = new URL(`${protocol}//${hostname}${port ? `:${port}` : ""}${path}`);
|
|
2650
|
+
url.search = Object.entries(query).map(([k, v]) => `${k}=${v}`).join("&");
|
|
2651
|
+
return url;
|
|
2652
|
+
}
|
|
2653
|
+
return new URL(value);
|
|
2654
|
+
} catch (error) {
|
|
2655
|
+
return null;
|
|
2656
|
+
}
|
|
2657
|
+
})();
|
|
2658
|
+
if (!whatwgURL) {
|
|
2659
|
+
console.error(`Unable to parse ${JSON.stringify(value)} as a whatwg URL.`);
|
|
2660
|
+
return null;
|
|
2661
|
+
}
|
|
2662
|
+
const urlString = whatwgURL.href;
|
|
2663
|
+
const { host, hostname, pathname, protocol, search } = whatwgURL;
|
|
2664
|
+
if (search) return null;
|
|
2665
|
+
const scheme = protocol.slice(0, -1);
|
|
2666
|
+
if (!Object.values(EndpointURLScheme).includes(scheme)) return null;
|
|
2667
|
+
const isIp = isIpAddress(hostname);
|
|
2668
|
+
return {
|
|
2669
|
+
scheme,
|
|
2670
|
+
authority: `${host}${urlString.includes(`${host}:${DEFAULT_PORTS[scheme]}`) || typeof value === "string" && value.includes(`${host}:${DEFAULT_PORTS[scheme]}`) ? `:${DEFAULT_PORTS[scheme]}` : ``}`,
|
|
2671
|
+
path: pathname,
|
|
2672
|
+
normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
|
|
2673
|
+
isIp
|
|
2674
|
+
};
|
|
2675
|
+
};
|
|
2676
|
+
//#endregion
|
|
2677
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/stringEquals.js
|
|
2678
|
+
var stringEquals = (value1, value2) => value1 === value2;
|
|
2679
|
+
//#endregion
|
|
2680
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/substring.js
|
|
2681
|
+
var substring = (input, start, stop, reverse) => {
|
|
2682
|
+
if (start >= stop || input.length < stop || /[^\u0000-\u007f]/.test(input)) return null;
|
|
2683
|
+
if (!reverse) return input.substring(start, stop);
|
|
2684
|
+
return input.substring(input.length - stop, input.length - start);
|
|
2685
|
+
};
|
|
2686
|
+
//#endregion
|
|
2687
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/lib/uriEncode.js
|
|
2688
|
+
var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c) => `%${c.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
2689
|
+
//#endregion
|
|
2690
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/endpointFunctions.js
|
|
2691
|
+
var endpointFunctions = {
|
|
2692
|
+
booleanEquals,
|
|
2693
|
+
getAttr,
|
|
2694
|
+
isSet,
|
|
2695
|
+
isValidHostLabel,
|
|
2696
|
+
not,
|
|
2697
|
+
parseURL,
|
|
2698
|
+
stringEquals,
|
|
2699
|
+
substring,
|
|
2700
|
+
uriEncode
|
|
2701
|
+
};
|
|
2702
|
+
//#endregion
|
|
2703
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateTemplate.js
|
|
2704
|
+
var evaluateTemplate = (template, options) => {
|
|
2705
|
+
const evaluatedTemplateArr = [];
|
|
2706
|
+
const templateContext = {
|
|
2707
|
+
...options.endpointParams,
|
|
2708
|
+
...options.referenceRecord
|
|
2709
|
+
};
|
|
2710
|
+
let currentIndex = 0;
|
|
2711
|
+
while (currentIndex < template.length) {
|
|
2712
|
+
const openingBraceIndex = template.indexOf("{", currentIndex);
|
|
2713
|
+
if (openingBraceIndex === -1) {
|
|
2714
|
+
evaluatedTemplateArr.push(template.slice(currentIndex));
|
|
2715
|
+
break;
|
|
2716
|
+
}
|
|
2717
|
+
evaluatedTemplateArr.push(template.slice(currentIndex, openingBraceIndex));
|
|
2718
|
+
const closingBraceIndex = template.indexOf("}", openingBraceIndex);
|
|
2719
|
+
if (closingBraceIndex === -1) {
|
|
2720
|
+
evaluatedTemplateArr.push(template.slice(openingBraceIndex));
|
|
2721
|
+
break;
|
|
2722
|
+
}
|
|
2723
|
+
if (template[openingBraceIndex + 1] === "{" && template[closingBraceIndex + 1] === "}") {
|
|
2724
|
+
evaluatedTemplateArr.push(template.slice(openingBraceIndex + 1, closingBraceIndex));
|
|
2725
|
+
currentIndex = closingBraceIndex + 2;
|
|
2726
|
+
}
|
|
2727
|
+
const parameterName = template.substring(openingBraceIndex + 1, closingBraceIndex);
|
|
2728
|
+
if (parameterName.includes("#")) {
|
|
2729
|
+
const [refName, attrName] = parameterName.split("#");
|
|
2730
|
+
evaluatedTemplateArr.push(getAttr(templateContext[refName], attrName));
|
|
2731
|
+
} else evaluatedTemplateArr.push(templateContext[parameterName]);
|
|
2732
|
+
currentIndex = closingBraceIndex + 1;
|
|
2733
|
+
}
|
|
2734
|
+
return evaluatedTemplateArr.join("");
|
|
2735
|
+
};
|
|
2736
|
+
//#endregion
|
|
2737
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/getReferenceValue.js
|
|
2738
|
+
var getReferenceValue = ({ ref }, options) => {
|
|
2739
|
+
return {
|
|
2740
|
+
...options.endpointParams,
|
|
2741
|
+
...options.referenceRecord
|
|
2742
|
+
}[ref];
|
|
2743
|
+
};
|
|
2744
|
+
//#endregion
|
|
2745
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateExpression.js
|
|
2746
|
+
var evaluateExpression = (obj, keyName, options) => {
|
|
2747
|
+
if (typeof obj === "string") return evaluateTemplate(obj, options);
|
|
2748
|
+
else if (obj["fn"]) return group$2.callFunction(obj, options);
|
|
2749
|
+
else if (obj["ref"]) return getReferenceValue(obj, options);
|
|
2750
|
+
throw new EndpointError(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
|
|
2751
|
+
};
|
|
2752
|
+
var callFunction = ({ fn, argv }, options) => {
|
|
2753
|
+
const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options));
|
|
2754
|
+
const fnSegments = fn.split(".");
|
|
2755
|
+
if (fnSegments[0] in customEndpointFunctions && fnSegments[1] != null) return customEndpointFunctions[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
|
|
2756
|
+
return endpointFunctions[fn](...evaluatedArgs);
|
|
2757
|
+
};
|
|
2758
|
+
var group$2 = {
|
|
2759
|
+
evaluateExpression,
|
|
2760
|
+
callFunction
|
|
2761
|
+
};
|
|
2762
|
+
//#endregion
|
|
2763
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateCondition.js
|
|
2764
|
+
var evaluateCondition = ({ assign, ...fnArgs }, options) => {
|
|
2765
|
+
if (assign && assign in options.referenceRecord) throw new EndpointError(`'${assign}' is already defined in Reference Record.`);
|
|
2766
|
+
const value = callFunction(fnArgs, options);
|
|
2767
|
+
options.logger?.debug?.(`${debugId} evaluateCondition: ${toDebugString(fnArgs)} = ${toDebugString(value)}`);
|
|
2768
|
+
return {
|
|
2769
|
+
result: value === "" ? true : !!value,
|
|
2770
|
+
...assign != null && { toAssign: {
|
|
2771
|
+
name: assign,
|
|
2772
|
+
value
|
|
2773
|
+
} }
|
|
2774
|
+
};
|
|
2775
|
+
};
|
|
2776
|
+
//#endregion
|
|
2777
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateConditions.js
|
|
2778
|
+
var evaluateConditions = (conditions = [], options) => {
|
|
2779
|
+
const conditionsReferenceRecord = {};
|
|
2780
|
+
for (const condition of conditions) {
|
|
2781
|
+
const { result, toAssign } = evaluateCondition(condition, {
|
|
2782
|
+
...options,
|
|
2783
|
+
referenceRecord: {
|
|
2784
|
+
...options.referenceRecord,
|
|
2785
|
+
...conditionsReferenceRecord
|
|
2786
|
+
}
|
|
2787
|
+
});
|
|
2788
|
+
if (!result) return { result };
|
|
2789
|
+
if (toAssign) {
|
|
2790
|
+
conditionsReferenceRecord[toAssign.name] = toAssign.value;
|
|
2791
|
+
options.logger?.debug?.(`${debugId} assign: ${toAssign.name} := ${toDebugString(toAssign.value)}`);
|
|
2792
|
+
}
|
|
2793
|
+
}
|
|
2794
|
+
return {
|
|
2795
|
+
result: true,
|
|
2796
|
+
referenceRecord: conditionsReferenceRecord
|
|
2797
|
+
};
|
|
2798
|
+
};
|
|
2799
|
+
//#endregion
|
|
2800
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointHeaders.js
|
|
2801
|
+
var getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({
|
|
2802
|
+
...acc,
|
|
2803
|
+
[headerKey]: headerVal.map((headerValEntry) => {
|
|
2804
|
+
const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
|
|
2805
|
+
if (typeof processedExpr !== "string") throw new EndpointError(`Header '${headerKey}' value '${processedExpr}' is not a string`);
|
|
2806
|
+
return processedExpr;
|
|
2807
|
+
})
|
|
2808
|
+
}), {});
|
|
2809
|
+
//#endregion
|
|
2810
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointProperties.js
|
|
2811
|
+
var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({
|
|
2812
|
+
...acc,
|
|
2813
|
+
[propertyKey]: group$1.getEndpointProperty(propertyVal, options)
|
|
2814
|
+
}), {});
|
|
2815
|
+
var getEndpointProperty = (property, options) => {
|
|
2816
|
+
if (Array.isArray(property)) return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
|
|
2817
|
+
switch (typeof property) {
|
|
2818
|
+
case "string": return evaluateTemplate(property, options);
|
|
2819
|
+
case "object":
|
|
2820
|
+
if (property === null) throw new EndpointError(`Unexpected endpoint property: ${property}`);
|
|
2821
|
+
return group$1.getEndpointProperties(property, options);
|
|
2822
|
+
case "boolean": return property;
|
|
2823
|
+
default: throw new EndpointError(`Unexpected endpoint property type: ${typeof property}`);
|
|
2824
|
+
}
|
|
2825
|
+
};
|
|
2826
|
+
var group$1 = {
|
|
2827
|
+
getEndpointProperty,
|
|
2828
|
+
getEndpointProperties
|
|
2829
|
+
};
|
|
2830
|
+
//#endregion
|
|
2831
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/getEndpointUrl.js
|
|
2832
|
+
var getEndpointUrl = (endpointUrl, options) => {
|
|
2833
|
+
const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
|
|
2834
|
+
if (typeof expression === "string") try {
|
|
2835
|
+
return new URL(expression);
|
|
2836
|
+
} catch (error) {
|
|
2837
|
+
console.error(`Failed to construct URL with ${expression}`, error);
|
|
2838
|
+
throw error;
|
|
2839
|
+
}
|
|
2840
|
+
throw new EndpointError(`Endpoint URL must be a string, got ${typeof expression}`);
|
|
2841
|
+
};
|
|
2842
|
+
//#endregion
|
|
2843
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateEndpointRule.js
|
|
2844
|
+
var evaluateEndpointRule = (endpointRule, options) => {
|
|
2845
|
+
const { conditions, endpoint } = endpointRule;
|
|
2846
|
+
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
2847
|
+
if (!result) return;
|
|
2848
|
+
const endpointRuleOptions = {
|
|
2849
|
+
...options,
|
|
2850
|
+
referenceRecord: {
|
|
2851
|
+
...options.referenceRecord,
|
|
2852
|
+
...referenceRecord
|
|
2853
|
+
}
|
|
2854
|
+
};
|
|
2855
|
+
const { url, properties, headers } = endpoint;
|
|
2856
|
+
options.logger?.debug?.(`${debugId} Resolving endpoint from template: ${toDebugString(endpoint)}`);
|
|
2857
|
+
return {
|
|
2858
|
+
...headers != void 0 && { headers: getEndpointHeaders(headers, endpointRuleOptions) },
|
|
2859
|
+
...properties != void 0 && { properties: getEndpointProperties(properties, endpointRuleOptions) },
|
|
2860
|
+
url: getEndpointUrl(url, endpointRuleOptions)
|
|
2861
|
+
};
|
|
2862
|
+
};
|
|
2863
|
+
//#endregion
|
|
2864
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateErrorRule.js
|
|
2865
|
+
var evaluateErrorRule = (errorRule, options) => {
|
|
2866
|
+
const { conditions, error } = errorRule;
|
|
2867
|
+
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
2868
|
+
if (!result) return;
|
|
2869
|
+
throw new EndpointError(evaluateExpression(error, "Error", {
|
|
2870
|
+
...options,
|
|
2871
|
+
referenceRecord: {
|
|
2872
|
+
...options.referenceRecord,
|
|
2873
|
+
...referenceRecord
|
|
2874
|
+
}
|
|
2875
|
+
}));
|
|
2876
|
+
};
|
|
2877
|
+
//#endregion
|
|
2878
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/utils/evaluateRules.js
|
|
2879
|
+
var evaluateRules = (rules, options) => {
|
|
2880
|
+
for (const rule of rules) if (rule.type === "endpoint") {
|
|
2881
|
+
const endpointOrUndefined = evaluateEndpointRule(rule, options);
|
|
2882
|
+
if (endpointOrUndefined) return endpointOrUndefined;
|
|
2883
|
+
} else if (rule.type === "error") evaluateErrorRule(rule, options);
|
|
2884
|
+
else if (rule.type === "tree") {
|
|
2885
|
+
const endpointOrUndefined = group.evaluateTreeRule(rule, options);
|
|
2886
|
+
if (endpointOrUndefined) return endpointOrUndefined;
|
|
2887
|
+
} else throw new EndpointError(`Unknown endpoint rule: ${rule}`);
|
|
2888
|
+
throw new EndpointError(`Rules evaluation failed`);
|
|
2889
|
+
};
|
|
2890
|
+
var evaluateTreeRule = (treeRule, options) => {
|
|
2891
|
+
const { conditions, rules } = treeRule;
|
|
2892
|
+
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
2893
|
+
if (!result) return;
|
|
2894
|
+
return group.evaluateRules(rules, {
|
|
2895
|
+
...options,
|
|
2896
|
+
referenceRecord: {
|
|
2897
|
+
...options.referenceRecord,
|
|
2898
|
+
...referenceRecord
|
|
2899
|
+
}
|
|
2900
|
+
});
|
|
2901
|
+
};
|
|
2902
|
+
var group = {
|
|
2903
|
+
evaluateRules,
|
|
2904
|
+
evaluateTreeRule
|
|
2905
|
+
};
|
|
2906
|
+
//#endregion
|
|
2907
|
+
//#region ../../../node_modules/@smithy/util-endpoints/dist-es/resolveEndpoint.js
|
|
2908
|
+
var resolveEndpoint = (ruleSetObject, options) => {
|
|
2909
|
+
const { endpointParams, logger } = options;
|
|
2910
|
+
const { parameters, rules } = ruleSetObject;
|
|
2911
|
+
options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
|
|
2912
|
+
const paramsWithDefault = Object.entries(parameters).filter(([, v]) => v.default != null).map(([k, v]) => [k, v.default]);
|
|
2913
|
+
if (paramsWithDefault.length > 0) for (const [paramKey, paramDefaultValue] of paramsWithDefault) endpointParams[paramKey] = endpointParams[paramKey] ?? paramDefaultValue;
|
|
2914
|
+
const requiredParams = Object.entries(parameters).filter(([, v]) => v.required).map(([k]) => k);
|
|
2915
|
+
for (const requiredParam of requiredParams) if (endpointParams[requiredParam] == null) throw new EndpointError(`Missing required parameter: '${requiredParam}'`);
|
|
2916
|
+
const endpoint = evaluateRules(rules, {
|
|
2917
|
+
endpointParams,
|
|
2918
|
+
logger,
|
|
2919
|
+
referenceRecord: {}
|
|
2920
|
+
});
|
|
2921
|
+
options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
|
|
2922
|
+
return endpoint;
|
|
2923
|
+
};
|
|
2924
|
+
//#endregion
|
|
2925
|
+
//#region ../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/isVirtualHostableS3Bucket.js
|
|
2926
|
+
var isVirtualHostableS3Bucket = (value, allowSubDomains = false) => {
|
|
2927
|
+
if (allowSubDomains) {
|
|
2928
|
+
for (const label of value.split(".")) if (!isVirtualHostableS3Bucket(label)) return false;
|
|
2929
|
+
return true;
|
|
2930
|
+
}
|
|
2931
|
+
if (!isValidHostLabel(value)) return false;
|
|
2932
|
+
if (value.length < 3 || value.length > 63) return false;
|
|
2933
|
+
if (value !== value.toLowerCase()) return false;
|
|
2934
|
+
if (isIpAddress(value)) return false;
|
|
2935
|
+
return true;
|
|
2936
|
+
};
|
|
2937
|
+
//#endregion
|
|
2938
|
+
//#region ../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/parseArn.js
|
|
2939
|
+
var ARN_DELIMITER = ":";
|
|
2940
|
+
var RESOURCE_DELIMITER = "/";
|
|
2941
|
+
var parseArn = (value) => {
|
|
2942
|
+
const segments = value.split(ARN_DELIMITER);
|
|
2943
|
+
if (segments.length < 6) return null;
|
|
2944
|
+
const [arn, partition, service, region, accountId, ...resourcePath] = segments;
|
|
2945
|
+
if (arn !== "arn" || partition === "" || service === "" || resourcePath.join(ARN_DELIMITER) === "") return null;
|
|
2946
|
+
return {
|
|
2947
|
+
partition,
|
|
2948
|
+
service,
|
|
2949
|
+
region,
|
|
2950
|
+
accountId,
|
|
2951
|
+
resourceId: resourcePath.map((resource) => resource.split(RESOURCE_DELIMITER)).flat()
|
|
2952
|
+
};
|
|
2953
|
+
};
|
|
2954
|
+
//#endregion
|
|
2955
|
+
//#region ../../../node_modules/@aws-sdk/util-endpoints/dist-es/lib/aws/partition.js
|
|
2956
|
+
var selectedPartitionsInfo = {
|
|
2957
|
+
partitions: [
|
|
2958
|
+
{
|
|
2959
|
+
"id": "aws",
|
|
2960
|
+
"outputs": {
|
|
2961
|
+
"dnsSuffix": "amazonaws.com",
|
|
2962
|
+
"dualStackDnsSuffix": "api.aws",
|
|
2963
|
+
"implicitGlobalRegion": "us-east-1",
|
|
2964
|
+
"name": "aws",
|
|
2965
|
+
"supportsDualStack": true,
|
|
2966
|
+
"supportsFIPS": true
|
|
2967
|
+
},
|
|
2968
|
+
"regionRegex": "^(us|eu|ap|sa|ca|me|af|il|mx)\\-\\w+\\-\\d+$",
|
|
2969
|
+
"regions": {
|
|
2970
|
+
"af-south-1": { "description": "Africa (Cape Town)" },
|
|
2971
|
+
"ap-east-1": { "description": "Asia Pacific (Hong Kong)" },
|
|
2972
|
+
"ap-east-2": { "description": "Asia Pacific (Taipei)" },
|
|
2973
|
+
"ap-northeast-1": { "description": "Asia Pacific (Tokyo)" },
|
|
2974
|
+
"ap-northeast-2": { "description": "Asia Pacific (Seoul)" },
|
|
2975
|
+
"ap-northeast-3": { "description": "Asia Pacific (Osaka)" },
|
|
2976
|
+
"ap-south-1": { "description": "Asia Pacific (Mumbai)" },
|
|
2977
|
+
"ap-south-2": { "description": "Asia Pacific (Hyderabad)" },
|
|
2978
|
+
"ap-southeast-1": { "description": "Asia Pacific (Singapore)" },
|
|
2979
|
+
"ap-southeast-2": { "description": "Asia Pacific (Sydney)" },
|
|
2980
|
+
"ap-southeast-3": { "description": "Asia Pacific (Jakarta)" },
|
|
2981
|
+
"ap-southeast-4": { "description": "Asia Pacific (Melbourne)" },
|
|
2982
|
+
"ap-southeast-5": { "description": "Asia Pacific (Malaysia)" },
|
|
2983
|
+
"ap-southeast-6": { "description": "Asia Pacific (New Zealand)" },
|
|
2984
|
+
"ap-southeast-7": { "description": "Asia Pacific (Thailand)" },
|
|
2985
|
+
"aws-global": { "description": "aws global region" },
|
|
2986
|
+
"ca-central-1": { "description": "Canada (Central)" },
|
|
2987
|
+
"ca-west-1": { "description": "Canada West (Calgary)" },
|
|
2988
|
+
"eu-central-1": { "description": "Europe (Frankfurt)" },
|
|
2989
|
+
"eu-central-2": { "description": "Europe (Zurich)" },
|
|
2990
|
+
"eu-north-1": { "description": "Europe (Stockholm)" },
|
|
2991
|
+
"eu-south-1": { "description": "Europe (Milan)" },
|
|
2992
|
+
"eu-south-2": { "description": "Europe (Spain)" },
|
|
2993
|
+
"eu-west-1": { "description": "Europe (Ireland)" },
|
|
2994
|
+
"eu-west-2": { "description": "Europe (London)" },
|
|
2995
|
+
"eu-west-3": { "description": "Europe (Paris)" },
|
|
2996
|
+
"il-central-1": { "description": "Israel (Tel Aviv)" },
|
|
2997
|
+
"me-central-1": { "description": "Middle East (UAE)" },
|
|
2998
|
+
"me-south-1": { "description": "Middle East (Bahrain)" },
|
|
2999
|
+
"mx-central-1": { "description": "Mexico (Central)" },
|
|
3000
|
+
"sa-east-1": { "description": "South America (Sao Paulo)" },
|
|
3001
|
+
"us-east-1": { "description": "US East (N. Virginia)" },
|
|
3002
|
+
"us-east-2": { "description": "US East (Ohio)" },
|
|
3003
|
+
"us-west-1": { "description": "US West (N. California)" },
|
|
3004
|
+
"us-west-2": { "description": "US West (Oregon)" }
|
|
3005
|
+
}
|
|
3006
|
+
},
|
|
3007
|
+
{
|
|
3008
|
+
"id": "aws-cn",
|
|
3009
|
+
"outputs": {
|
|
3010
|
+
"dnsSuffix": "amazonaws.com.cn",
|
|
3011
|
+
"dualStackDnsSuffix": "api.amazonwebservices.com.cn",
|
|
3012
|
+
"implicitGlobalRegion": "cn-northwest-1",
|
|
3013
|
+
"name": "aws-cn",
|
|
3014
|
+
"supportsDualStack": true,
|
|
3015
|
+
"supportsFIPS": true
|
|
3016
|
+
},
|
|
3017
|
+
"regionRegex": "^cn\\-\\w+\\-\\d+$",
|
|
3018
|
+
"regions": {
|
|
3019
|
+
"aws-cn-global": { "description": "aws-cn global region" },
|
|
3020
|
+
"cn-north-1": { "description": "China (Beijing)" },
|
|
3021
|
+
"cn-northwest-1": { "description": "China (Ningxia)" }
|
|
3022
|
+
}
|
|
3023
|
+
},
|
|
3024
|
+
{
|
|
3025
|
+
"id": "aws-eusc",
|
|
3026
|
+
"outputs": {
|
|
3027
|
+
"dnsSuffix": "amazonaws.eu",
|
|
3028
|
+
"dualStackDnsSuffix": "api.amazonwebservices.eu",
|
|
3029
|
+
"implicitGlobalRegion": "eusc-de-east-1",
|
|
3030
|
+
"name": "aws-eusc",
|
|
3031
|
+
"supportsDualStack": true,
|
|
3032
|
+
"supportsFIPS": true
|
|
3033
|
+
},
|
|
3034
|
+
"regionRegex": "^eusc\\-(de)\\-\\w+\\-\\d+$",
|
|
3035
|
+
"regions": { "eusc-de-east-1": { "description": "AWS European Sovereign Cloud (Germany)" } }
|
|
3036
|
+
},
|
|
3037
|
+
{
|
|
3038
|
+
"id": "aws-iso",
|
|
3039
|
+
"outputs": {
|
|
3040
|
+
"dnsSuffix": "c2s.ic.gov",
|
|
3041
|
+
"dualStackDnsSuffix": "api.aws.ic.gov",
|
|
3042
|
+
"implicitGlobalRegion": "us-iso-east-1",
|
|
3043
|
+
"name": "aws-iso",
|
|
3044
|
+
"supportsDualStack": true,
|
|
3045
|
+
"supportsFIPS": true
|
|
3046
|
+
},
|
|
3047
|
+
"regionRegex": "^us\\-iso\\-\\w+\\-\\d+$",
|
|
3048
|
+
"regions": {
|
|
3049
|
+
"aws-iso-global": { "description": "aws-iso global region" },
|
|
3050
|
+
"us-iso-east-1": { "description": "US ISO East" },
|
|
3051
|
+
"us-iso-west-1": { "description": "US ISO WEST" }
|
|
3052
|
+
}
|
|
3053
|
+
},
|
|
3054
|
+
{
|
|
3055
|
+
"id": "aws-iso-b",
|
|
3056
|
+
"outputs": {
|
|
3057
|
+
"dnsSuffix": "sc2s.sgov.gov",
|
|
3058
|
+
"dualStackDnsSuffix": "api.aws.scloud",
|
|
3059
|
+
"implicitGlobalRegion": "us-isob-east-1",
|
|
3060
|
+
"name": "aws-iso-b",
|
|
3061
|
+
"supportsDualStack": true,
|
|
3062
|
+
"supportsFIPS": true
|
|
3063
|
+
},
|
|
3064
|
+
"regionRegex": "^us\\-isob\\-\\w+\\-\\d+$",
|
|
3065
|
+
"regions": {
|
|
3066
|
+
"aws-iso-b-global": { "description": "aws-iso-b global region" },
|
|
3067
|
+
"us-isob-east-1": { "description": "US ISOB East (Ohio)" },
|
|
3068
|
+
"us-isob-west-1": { "description": "US ISOB West" }
|
|
3069
|
+
}
|
|
3070
|
+
},
|
|
3071
|
+
{
|
|
3072
|
+
"id": "aws-iso-e",
|
|
3073
|
+
"outputs": {
|
|
3074
|
+
"dnsSuffix": "cloud.adc-e.uk",
|
|
3075
|
+
"dualStackDnsSuffix": "api.cloud-aws.adc-e.uk",
|
|
3076
|
+
"implicitGlobalRegion": "eu-isoe-west-1",
|
|
3077
|
+
"name": "aws-iso-e",
|
|
3078
|
+
"supportsDualStack": true,
|
|
3079
|
+
"supportsFIPS": true
|
|
3080
|
+
},
|
|
3081
|
+
"regionRegex": "^eu\\-isoe\\-\\w+\\-\\d+$",
|
|
3082
|
+
"regions": {
|
|
3083
|
+
"aws-iso-e-global": { "description": "aws-iso-e global region" },
|
|
3084
|
+
"eu-isoe-west-1": { "description": "EU ISOE West" }
|
|
3085
|
+
}
|
|
3086
|
+
},
|
|
3087
|
+
{
|
|
3088
|
+
"id": "aws-iso-f",
|
|
3089
|
+
"outputs": {
|
|
3090
|
+
"dnsSuffix": "csp.hci.ic.gov",
|
|
3091
|
+
"dualStackDnsSuffix": "api.aws.hci.ic.gov",
|
|
3092
|
+
"implicitGlobalRegion": "us-isof-south-1",
|
|
3093
|
+
"name": "aws-iso-f",
|
|
3094
|
+
"supportsDualStack": true,
|
|
3095
|
+
"supportsFIPS": true
|
|
3096
|
+
},
|
|
3097
|
+
"regionRegex": "^us\\-isof\\-\\w+\\-\\d+$",
|
|
3098
|
+
"regions": {
|
|
3099
|
+
"aws-iso-f-global": { "description": "aws-iso-f global region" },
|
|
3100
|
+
"us-isof-east-1": { "description": "US ISOF EAST" },
|
|
3101
|
+
"us-isof-south-1": { "description": "US ISOF SOUTH" }
|
|
3102
|
+
}
|
|
3103
|
+
},
|
|
3104
|
+
{
|
|
3105
|
+
"id": "aws-us-gov",
|
|
3106
|
+
"outputs": {
|
|
3107
|
+
"dnsSuffix": "amazonaws.com",
|
|
3108
|
+
"dualStackDnsSuffix": "api.aws",
|
|
3109
|
+
"implicitGlobalRegion": "us-gov-west-1",
|
|
3110
|
+
"name": "aws-us-gov",
|
|
3111
|
+
"supportsDualStack": true,
|
|
3112
|
+
"supportsFIPS": true
|
|
3113
|
+
},
|
|
3114
|
+
"regionRegex": "^us\\-gov\\-\\w+\\-\\d+$",
|
|
3115
|
+
"regions": {
|
|
3116
|
+
"aws-us-gov-global": { "description": "aws-us-gov global region" },
|
|
3117
|
+
"us-gov-east-1": { "description": "AWS GovCloud (US-East)" },
|
|
3118
|
+
"us-gov-west-1": { "description": "AWS GovCloud (US-West)" }
|
|
3119
|
+
}
|
|
3120
|
+
}
|
|
3121
|
+
],
|
|
3122
|
+
version: "1.1"
|
|
3123
|
+
};
|
|
3124
|
+
var selectedUserAgentPrefix = "";
|
|
3125
|
+
var partition = (value) => {
|
|
3126
|
+
const { partitions } = selectedPartitionsInfo;
|
|
3127
|
+
for (const partition of partitions) {
|
|
3128
|
+
const { regions, outputs } = partition;
|
|
3129
|
+
for (const [region, regionData] of Object.entries(regions)) if (region === value) return {
|
|
3130
|
+
...outputs,
|
|
3131
|
+
...regionData
|
|
3132
|
+
};
|
|
3133
|
+
}
|
|
3134
|
+
for (const partition of partitions) {
|
|
3135
|
+
const { regionRegex, outputs } = partition;
|
|
3136
|
+
if (new RegExp(regionRegex).test(value)) return { ...outputs };
|
|
3137
|
+
}
|
|
3138
|
+
const DEFAULT_PARTITION = partitions.find((partition) => partition.id === "aws");
|
|
3139
|
+
if (!DEFAULT_PARTITION) throw new Error("Provided region was not found in the partition array or regex, and default partition with id 'aws' doesn't exist.");
|
|
3140
|
+
return { ...DEFAULT_PARTITION.outputs };
|
|
3141
|
+
};
|
|
3142
|
+
var getUserAgentPrefix = () => selectedUserAgentPrefix;
|
|
3143
|
+
//#endregion
|
|
3144
|
+
//#region ../../../node_modules/@aws-sdk/util-endpoints/dist-es/aws.js
|
|
3145
|
+
var awsEndpointFunctions = {
|
|
3146
|
+
isVirtualHostableS3Bucket,
|
|
3147
|
+
parseArn,
|
|
3148
|
+
partition
|
|
3149
|
+
};
|
|
3150
|
+
customEndpointFunctions.aws = awsEndpointFunctions;
|
|
3151
|
+
//#endregion
|
|
3152
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/constants.js
|
|
3153
|
+
var THROTTLING_ERROR_CODES$1 = [
|
|
3154
|
+
"BandwidthLimitExceeded",
|
|
3155
|
+
"EC2ThrottledException",
|
|
3156
|
+
"LimitExceededException",
|
|
3157
|
+
"PriorRequestNotComplete",
|
|
3158
|
+
"ProvisionedThroughputExceededException",
|
|
3159
|
+
"RequestLimitExceeded",
|
|
3160
|
+
"RequestThrottled",
|
|
3161
|
+
"RequestThrottledException",
|
|
3162
|
+
"SlowDown",
|
|
3163
|
+
"ThrottledException",
|
|
3164
|
+
"Throttling",
|
|
3165
|
+
"ThrottlingException",
|
|
3166
|
+
"TooManyRequestsException",
|
|
3167
|
+
"TransactionInProgressException"
|
|
3168
|
+
];
|
|
3169
|
+
//#endregion
|
|
3170
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/service-error-classification/service-error-classification.js
|
|
3171
|
+
var isThrottlingError$1 = (error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES$1.includes(error.name) || error.$retryable?.throttling == true;
|
|
3172
|
+
//#endregion
|
|
3173
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/constants.js
|
|
3174
|
+
var MAXIMUM_RETRY_DELAY = 20 * 1e3;
|
|
3175
|
+
var INVOCATION_ID_HEADER = "amz-sdk-invocation-id";
|
|
3176
|
+
var REQUEST_HEADER = "amz-sdk-request";
|
|
3177
|
+
//#endregion
|
|
3178
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRateLimiter.js
|
|
3179
|
+
var DefaultRateLimiter = class DefaultRateLimiter {
|
|
3180
|
+
static setTimeoutFn = (fn, delay) => setTimeout(fn, delay);
|
|
3181
|
+
beta;
|
|
3182
|
+
minCapacity;
|
|
3183
|
+
minFillRate;
|
|
3184
|
+
scaleConstant;
|
|
3185
|
+
smooth;
|
|
3186
|
+
enabled = false;
|
|
3187
|
+
availableTokens = 0;
|
|
3188
|
+
lastMaxRate = 0;
|
|
3189
|
+
measuredTxRate = 0;
|
|
3190
|
+
requestCount = 0;
|
|
3191
|
+
fillRate;
|
|
3192
|
+
lastThrottleTime;
|
|
3193
|
+
lastTimestamp = 0;
|
|
3194
|
+
lastTxRateBucket;
|
|
3195
|
+
maxCapacity;
|
|
3196
|
+
timeWindow = 0;
|
|
3197
|
+
constructor(options) {
|
|
3198
|
+
this.beta = options?.beta ?? .7;
|
|
3199
|
+
this.minCapacity = options?.minCapacity ?? 1;
|
|
3200
|
+
this.minFillRate = options?.minFillRate ?? .5;
|
|
3201
|
+
this.scaleConstant = options?.scaleConstant ?? .4;
|
|
3202
|
+
this.smooth = options?.smooth ?? .8;
|
|
3203
|
+
this.lastThrottleTime = this.getCurrentTimeInSeconds();
|
|
3204
|
+
this.lastTxRateBucket = Math.floor(this.getCurrentTimeInSeconds());
|
|
3205
|
+
this.fillRate = this.minFillRate;
|
|
3206
|
+
this.maxCapacity = this.minCapacity;
|
|
3207
|
+
}
|
|
3208
|
+
async getSendToken() {
|
|
3209
|
+
return this.acquireTokenBucket(1);
|
|
3210
|
+
}
|
|
3211
|
+
updateClientSendingRate(response) {
|
|
3212
|
+
let calculatedRate;
|
|
3213
|
+
this.updateMeasuredRate();
|
|
3214
|
+
const retryErrorInfo = response;
|
|
3215
|
+
if (retryErrorInfo?.errorType === "THROTTLING" || isThrottlingError$1(retryErrorInfo?.error ?? response)) {
|
|
3216
|
+
const rateToUse = !this.enabled ? this.measuredTxRate : Math.min(this.measuredTxRate, this.fillRate);
|
|
3217
|
+
this.lastMaxRate = rateToUse;
|
|
3218
|
+
this.calculateTimeWindow();
|
|
3219
|
+
this.lastThrottleTime = this.getCurrentTimeInSeconds();
|
|
3220
|
+
calculatedRate = this.cubicThrottle(rateToUse);
|
|
3221
|
+
this.enableTokenBucket();
|
|
3222
|
+
} else {
|
|
3223
|
+
this.calculateTimeWindow();
|
|
3224
|
+
calculatedRate = this.cubicSuccess(this.getCurrentTimeInSeconds());
|
|
3225
|
+
}
|
|
3226
|
+
const newRate = Math.min(calculatedRate, 2 * this.measuredTxRate);
|
|
3227
|
+
this.updateTokenBucketRate(newRate);
|
|
3228
|
+
}
|
|
3229
|
+
getCurrentTimeInSeconds() {
|
|
3230
|
+
return Date.now() / 1e3;
|
|
3231
|
+
}
|
|
3232
|
+
async acquireTokenBucket(amount) {
|
|
3233
|
+
if (!this.enabled) return;
|
|
3234
|
+
this.refillTokenBucket();
|
|
3235
|
+
while (amount > this.availableTokens) {
|
|
3236
|
+
const delay = (amount - this.availableTokens) / this.fillRate * 1e3;
|
|
3237
|
+
await new Promise((resolve) => DefaultRateLimiter.setTimeoutFn(resolve, delay));
|
|
3238
|
+
this.refillTokenBucket();
|
|
3239
|
+
}
|
|
3240
|
+
this.availableTokens = this.availableTokens - amount;
|
|
3241
|
+
}
|
|
3242
|
+
refillTokenBucket() {
|
|
3243
|
+
const timestamp = this.getCurrentTimeInSeconds();
|
|
3244
|
+
if (!this.lastTimestamp) {
|
|
3245
|
+
this.lastTimestamp = timestamp;
|
|
3246
|
+
return;
|
|
3247
|
+
}
|
|
3248
|
+
const fillAmount = (timestamp - this.lastTimestamp) * this.fillRate;
|
|
3249
|
+
this.availableTokens = Math.min(this.maxCapacity, this.availableTokens + fillAmount);
|
|
3250
|
+
this.lastTimestamp = timestamp;
|
|
3251
|
+
}
|
|
3252
|
+
calculateTimeWindow() {
|
|
3253
|
+
this.timeWindow = this.getPrecise(Math.pow(this.lastMaxRate * (1 - this.beta) / this.scaleConstant, 1 / 3));
|
|
3254
|
+
}
|
|
3255
|
+
cubicThrottle(rateToUse) {
|
|
3256
|
+
return this.getPrecise(rateToUse * this.beta);
|
|
3257
|
+
}
|
|
3258
|
+
cubicSuccess(timestamp) {
|
|
3259
|
+
return this.getPrecise(this.scaleConstant * Math.pow(timestamp - this.lastThrottleTime - this.timeWindow, 3) + this.lastMaxRate);
|
|
3260
|
+
}
|
|
3261
|
+
enableTokenBucket() {
|
|
3262
|
+
this.enabled = true;
|
|
3263
|
+
}
|
|
3264
|
+
updateTokenBucketRate(newRate) {
|
|
3265
|
+
this.refillTokenBucket();
|
|
3266
|
+
this.fillRate = Math.max(newRate, this.minFillRate);
|
|
3267
|
+
this.maxCapacity = Math.max(newRate, this.minCapacity);
|
|
3268
|
+
this.availableTokens = Math.min(this.availableTokens, this.maxCapacity);
|
|
3269
|
+
}
|
|
3270
|
+
updateMeasuredRate() {
|
|
3271
|
+
const t = this.getCurrentTimeInSeconds();
|
|
3272
|
+
const timeBucket = Math.floor(t * 2) / 2;
|
|
3273
|
+
this.requestCount++;
|
|
3274
|
+
if (timeBucket > this.lastTxRateBucket) {
|
|
3275
|
+
const currentRate = this.requestCount / (timeBucket - this.lastTxRateBucket);
|
|
3276
|
+
this.measuredTxRate = this.getPrecise(currentRate * this.smooth + this.measuredTxRate * (1 - this.smooth));
|
|
3277
|
+
this.requestCount = 0;
|
|
3278
|
+
this.lastTxRateBucket = timeBucket;
|
|
3279
|
+
}
|
|
3280
|
+
}
|
|
3281
|
+
getPrecise(num) {
|
|
3282
|
+
return parseFloat(num.toFixed(8));
|
|
3283
|
+
}
|
|
3284
|
+
};
|
|
3285
|
+
//#endregion
|
|
3286
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/retries-2026-config.js
|
|
3287
|
+
var Retry = class Retry {
|
|
3288
|
+
static v2026 = typeof process !== "undefined" && process.env?.SMITHY_NEW_RETRIES_2026 === "true";
|
|
3289
|
+
static delay() {
|
|
3290
|
+
return Retry.v2026 ? 50 : 100;
|
|
3291
|
+
}
|
|
3292
|
+
static throttlingDelay() {
|
|
3293
|
+
return Retry.v2026 ? 1e3 : 500;
|
|
3294
|
+
}
|
|
3295
|
+
static cost() {
|
|
3296
|
+
return Retry.v2026 ? 14 : 5;
|
|
3297
|
+
}
|
|
3298
|
+
static throttlingCost() {
|
|
3299
|
+
return Retry.v2026 ? 5 : 10;
|
|
3300
|
+
}
|
|
3301
|
+
static modifiedCostType() {
|
|
3302
|
+
return Retry.v2026 ? "THROTTLING" : "TRANSIENT";
|
|
3303
|
+
}
|
|
3304
|
+
};
|
|
3305
|
+
//#endregion
|
|
3306
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryBackoffStrategy.js
|
|
3307
|
+
var DefaultRetryBackoffStrategy = class {
|
|
3308
|
+
x = Retry.delay();
|
|
3309
|
+
computeNextBackoffDelay(i) {
|
|
3310
|
+
const t_i = Math.random() * Math.min(this.x * 2 ** i, MAXIMUM_RETRY_DELAY);
|
|
3311
|
+
return Math.floor(t_i);
|
|
3312
|
+
}
|
|
3313
|
+
setDelayBase(delay) {
|
|
3314
|
+
this.x = delay;
|
|
3315
|
+
}
|
|
3316
|
+
};
|
|
3317
|
+
//#endregion
|
|
3318
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/DefaultRetryToken.js
|
|
3319
|
+
var DefaultRetryToken = class {
|
|
3320
|
+
delay;
|
|
3321
|
+
count;
|
|
3322
|
+
cost;
|
|
3323
|
+
longPoll;
|
|
3324
|
+
$retryLog = { acquisitionDelay: 0 };
|
|
3325
|
+
constructor(delay, count, cost, longPoll) {
|
|
3326
|
+
this.delay = delay;
|
|
3327
|
+
this.count = count;
|
|
3328
|
+
this.cost = cost;
|
|
3329
|
+
this.longPoll = longPoll;
|
|
3330
|
+
}
|
|
3331
|
+
getRetryCount() {
|
|
3332
|
+
return this.count;
|
|
3333
|
+
}
|
|
3334
|
+
getRetryDelay() {
|
|
3335
|
+
return Math.min(MAXIMUM_RETRY_DELAY, this.delay);
|
|
3336
|
+
}
|
|
3337
|
+
getRetryCost() {
|
|
3338
|
+
return this.cost;
|
|
3339
|
+
}
|
|
3340
|
+
isLongPoll() {
|
|
3341
|
+
return this.longPoll;
|
|
3342
|
+
}
|
|
3343
|
+
};
|
|
3344
|
+
//#endregion
|
|
3345
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/config.js
|
|
3346
|
+
var RETRY_MODES;
|
|
3347
|
+
(function(RETRY_MODES) {
|
|
3348
|
+
RETRY_MODES["STANDARD"] = "standard";
|
|
3349
|
+
RETRY_MODES["ADAPTIVE"] = "adaptive";
|
|
3350
|
+
})(RETRY_MODES || (RETRY_MODES = {}));
|
|
3351
|
+
var DEFAULT_RETRY_MODE = RETRY_MODES.STANDARD;
|
|
3352
|
+
//#endregion
|
|
3353
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/StandardRetryStrategy.js
|
|
3354
|
+
var refusal = {
|
|
3355
|
+
incompatible: 1,
|
|
3356
|
+
attempts: 2,
|
|
3357
|
+
capacity: 3
|
|
3358
|
+
};
|
|
3359
|
+
var StandardRetryStrategy = class {
|
|
3360
|
+
mode = RETRY_MODES.STANDARD;
|
|
3361
|
+
retryBackoffStrategy;
|
|
3362
|
+
capacity = 500;
|
|
3363
|
+
maxAttemptsProvider;
|
|
3364
|
+
baseDelay;
|
|
3365
|
+
constructor(arg1) {
|
|
3366
|
+
if (typeof arg1 === "number") this.maxAttemptsProvider = async () => arg1;
|
|
3367
|
+
else if (typeof arg1 === "function") this.maxAttemptsProvider = arg1;
|
|
3368
|
+
else if (arg1 && typeof arg1 === "object") {
|
|
3369
|
+
this.maxAttemptsProvider = async () => arg1.maxAttempts;
|
|
3370
|
+
this.baseDelay = arg1.baseDelay;
|
|
3371
|
+
this.retryBackoffStrategy = arg1.backoff;
|
|
3372
|
+
}
|
|
3373
|
+
this.maxAttemptsProvider ??= async () => 3;
|
|
3374
|
+
this.baseDelay ??= Retry.delay();
|
|
3375
|
+
this.retryBackoffStrategy ??= new DefaultRetryBackoffStrategy();
|
|
3376
|
+
}
|
|
3377
|
+
async acquireInitialRetryToken(retryTokenScope) {
|
|
3378
|
+
return new DefaultRetryToken(Retry.delay(), 0, void 0, Retry.v2026 && retryTokenScope.includes(":longpoll"));
|
|
3379
|
+
}
|
|
3380
|
+
async refreshRetryTokenForRetry(token, errorInfo) {
|
|
3381
|
+
const maxAttempts = await this.getMaxAttempts();
|
|
3382
|
+
const retryCode = this.retryCode(token, errorInfo, maxAttempts);
|
|
3383
|
+
const shouldRetry = retryCode === 0;
|
|
3384
|
+
const isLongPoll = token.isLongPoll?.();
|
|
3385
|
+
if (shouldRetry || isLongPoll) {
|
|
3386
|
+
const errorType = errorInfo.errorType;
|
|
3387
|
+
this.retryBackoffStrategy.setDelayBase(errorType === "THROTTLING" ? Retry.throttlingDelay() : this.baseDelay);
|
|
3388
|
+
const delayFromErrorType = this.retryBackoffStrategy.computeNextBackoffDelay(token.getRetryCount());
|
|
3389
|
+
let retryDelay = delayFromErrorType;
|
|
3390
|
+
if (errorInfo.retryAfterHint instanceof Date) retryDelay = Math.max(delayFromErrorType, Math.min(errorInfo.retryAfterHint.getTime() - Date.now(), delayFromErrorType + 5e3));
|
|
3391
|
+
if (!shouldRetry) {
|
|
3392
|
+
const longPollBackoff = Retry.v2026 && retryCode === refusal.capacity && isLongPoll ? retryDelay : 0;
|
|
3393
|
+
if (longPollBackoff > 0) await new Promise((r) => setTimeout(r, longPollBackoff));
|
|
3394
|
+
} else {
|
|
3395
|
+
const capacityCost = this.getCapacityCost(errorType);
|
|
3396
|
+
this.capacity -= capacityCost;
|
|
3397
|
+
const nextToken = new DefaultRetryToken(0, token.getRetryCount() + 1, capacityCost, token.isLongPoll?.() ?? false);
|
|
3398
|
+
await new Promise((r) => setTimeout(r, retryDelay));
|
|
3399
|
+
nextToken.$retryLog.acquisitionDelay = retryDelay;
|
|
3400
|
+
return nextToken;
|
|
3401
|
+
}
|
|
3402
|
+
}
|
|
3403
|
+
throw new Error("No retry token available");
|
|
3404
|
+
}
|
|
3405
|
+
recordSuccess(token) {
|
|
3406
|
+
this.capacity = Math.min(500, this.capacity + (token.getRetryCost() ?? 1));
|
|
3407
|
+
}
|
|
3408
|
+
getCapacity() {
|
|
3409
|
+
return this.capacity;
|
|
3410
|
+
}
|
|
3411
|
+
async maxAttempts() {
|
|
3412
|
+
return this.maxAttemptsProvider();
|
|
3413
|
+
}
|
|
3414
|
+
async getMaxAttempts() {
|
|
3415
|
+
try {
|
|
3416
|
+
return await this.maxAttemptsProvider();
|
|
3417
|
+
} catch (error) {
|
|
3418
|
+
console.warn(`Max attempts provider could not resolve. Using default of 3`);
|
|
3419
|
+
return 3;
|
|
3420
|
+
}
|
|
3421
|
+
}
|
|
3422
|
+
retryCode(tokenToRenew, errorInfo, maxAttempts) {
|
|
3423
|
+
const attempts = tokenToRenew.getRetryCount() + 1;
|
|
3424
|
+
const retryableStatus = this.isRetryableError(errorInfo.errorType) ? 0 : refusal.incompatible;
|
|
3425
|
+
const attemptStatus = attempts < maxAttempts ? 0 : refusal.attempts;
|
|
3426
|
+
const capacityStatus = this.capacity >= this.getCapacityCost(errorInfo.errorType) ? 0 : refusal.capacity;
|
|
3427
|
+
return retryableStatus || attemptStatus || capacityStatus;
|
|
3428
|
+
}
|
|
3429
|
+
getCapacityCost(errorType) {
|
|
3430
|
+
return errorType === Retry.modifiedCostType() ? Retry.throttlingCost() : Retry.cost();
|
|
3431
|
+
}
|
|
3432
|
+
isRetryableError(errorType) {
|
|
3433
|
+
return errorType === "THROTTLING" || errorType === "TRANSIENT";
|
|
3434
|
+
}
|
|
3435
|
+
};
|
|
3436
|
+
//#endregion
|
|
3437
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/retry/util-retry/AdaptiveRetryStrategy.js
|
|
3438
|
+
var AdaptiveRetryStrategy = class {
|
|
3439
|
+
mode = RETRY_MODES.ADAPTIVE;
|
|
3440
|
+
rateLimiter;
|
|
3441
|
+
standardRetryStrategy;
|
|
3442
|
+
constructor(maxAttemptsProvider, options) {
|
|
3443
|
+
const { rateLimiter } = options ?? {};
|
|
3444
|
+
this.rateLimiter = rateLimiter ?? new DefaultRateLimiter();
|
|
3445
|
+
this.standardRetryStrategy = options ? new StandardRetryStrategy({
|
|
3446
|
+
maxAttempts: typeof maxAttemptsProvider === "number" ? maxAttemptsProvider : 3,
|
|
3447
|
+
...options
|
|
3448
|
+
}) : new StandardRetryStrategy(maxAttemptsProvider);
|
|
3449
|
+
}
|
|
3450
|
+
async acquireInitialRetryToken(retryTokenScope) {
|
|
3451
|
+
const token = await this.standardRetryStrategy.acquireInitialRetryToken(retryTokenScope);
|
|
3452
|
+
await this.rateLimiter.getSendToken();
|
|
3453
|
+
return token;
|
|
3454
|
+
}
|
|
3455
|
+
async refreshRetryTokenForRetry(tokenToRenew, errorInfo) {
|
|
3456
|
+
this.rateLimiter.updateClientSendingRate(errorInfo);
|
|
3457
|
+
const token = await this.standardRetryStrategy.refreshRetryTokenForRetry(tokenToRenew, errorInfo);
|
|
3458
|
+
await this.rateLimiter.getSendToken();
|
|
3459
|
+
return token;
|
|
3460
|
+
}
|
|
3461
|
+
recordSuccess(token) {
|
|
3462
|
+
this.rateLimiter.updateClientSendingRate({});
|
|
3463
|
+
this.standardRetryStrategy.recordSuccess(token);
|
|
3464
|
+
}
|
|
3465
|
+
async maxAttemptsProvider() {
|
|
3466
|
+
return this.standardRetryStrategy.maxAttempts();
|
|
3467
|
+
}
|
|
3468
|
+
};
|
|
3469
|
+
//#endregion
|
|
3470
|
+
//#region ../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/check-features.js
|
|
3471
|
+
var ACCOUNT_ID_ENDPOINT_REGEX = /\d{12}\.ddb/;
|
|
3472
|
+
async function checkFeatures(context, config, args) {
|
|
3473
|
+
if (args.request?.headers?.["smithy-protocol"] === "rpc-v2-cbor") setFeature$1(context, "PROTOCOL_RPC_V2_CBOR", "M");
|
|
3474
|
+
if (typeof config.retryStrategy === "function") {
|
|
3475
|
+
const retryStrategy = await config.retryStrategy();
|
|
3476
|
+
if (typeof retryStrategy.mode === "string") switch (retryStrategy.mode) {
|
|
3477
|
+
case RETRY_MODES.ADAPTIVE:
|
|
3478
|
+
setFeature$1(context, "RETRY_MODE_ADAPTIVE", "F");
|
|
3479
|
+
break;
|
|
3480
|
+
case RETRY_MODES.STANDARD:
|
|
3481
|
+
setFeature$1(context, "RETRY_MODE_STANDARD", "E");
|
|
3482
|
+
break;
|
|
3483
|
+
}
|
|
3484
|
+
}
|
|
3485
|
+
if (typeof config.accountIdEndpointMode === "function") {
|
|
3486
|
+
const endpointV2 = context.endpointV2;
|
|
3487
|
+
if (String(endpointV2?.url?.hostname).match(ACCOUNT_ID_ENDPOINT_REGEX)) setFeature$1(context, "ACCOUNT_ID_ENDPOINT", "O");
|
|
3488
|
+
switch (await config.accountIdEndpointMode?.()) {
|
|
3489
|
+
case "disabled":
|
|
3490
|
+
setFeature$1(context, "ACCOUNT_ID_MODE_DISABLED", "Q");
|
|
3491
|
+
break;
|
|
3492
|
+
case "preferred":
|
|
3493
|
+
setFeature$1(context, "ACCOUNT_ID_MODE_PREFERRED", "P");
|
|
3494
|
+
break;
|
|
3495
|
+
case "required":
|
|
3496
|
+
setFeature$1(context, "ACCOUNT_ID_MODE_REQUIRED", "R");
|
|
3497
|
+
break;
|
|
3498
|
+
}
|
|
3499
|
+
}
|
|
3500
|
+
const identity = context.__smithy_context?.selectedHttpAuthScheme?.identity;
|
|
3501
|
+
if (identity?.$source) {
|
|
3502
|
+
const credentials = identity;
|
|
3503
|
+
if (credentials.accountId) setFeature$1(context, "RESOLVED_ACCOUNT_ID", "T");
|
|
3504
|
+
for (const [key, value] of Object.entries(credentials.$source ?? {})) setFeature$1(context, key, value);
|
|
3505
|
+
}
|
|
3506
|
+
}
|
|
3507
|
+
//#endregion
|
|
3508
|
+
//#region ../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/constants.js
|
|
3509
|
+
var USER_AGENT = "user-agent";
|
|
3510
|
+
var X_AMZ_USER_AGENT = "x-amz-user-agent";
|
|
3511
|
+
var UA_NAME_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w]/g;
|
|
3512
|
+
var UA_VALUE_ESCAPE_REGEX = /[^!$%&'*+\-.^_`|~\w#]/g;
|
|
3513
|
+
//#endregion
|
|
3514
|
+
//#region ../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/encode-features.js
|
|
3515
|
+
var BYTE_LIMIT = 1024;
|
|
3516
|
+
function encodeFeatures(features) {
|
|
3517
|
+
let buffer = "";
|
|
3518
|
+
for (const key in features) {
|
|
3519
|
+
const val = features[key];
|
|
3520
|
+
if (buffer.length + val.length + 1 <= BYTE_LIMIT) {
|
|
3521
|
+
if (buffer.length) buffer += "," + val;
|
|
3522
|
+
else buffer += val;
|
|
3523
|
+
continue;
|
|
3524
|
+
}
|
|
3525
|
+
break;
|
|
3526
|
+
}
|
|
3527
|
+
return buffer;
|
|
3528
|
+
}
|
|
3529
|
+
//#endregion
|
|
3530
|
+
//#region ../../../node_modules/@aws-sdk/middleware-user-agent/dist-es/user-agent-middleware.js
|
|
3531
|
+
var userAgentMiddleware = (options) => (next, context) => async (args) => {
|
|
3532
|
+
const { request } = args;
|
|
3533
|
+
if (!require_httpRequest.HttpRequest.isInstance(request)) return next(args);
|
|
3534
|
+
const { headers } = request;
|
|
3535
|
+
const userAgent = context?.userAgent?.map(escapeUserAgent) || [];
|
|
3536
|
+
const defaultUserAgent = (await options.defaultUserAgentProvider()).map(escapeUserAgent);
|
|
3537
|
+
await checkFeatures(context, options, args);
|
|
3538
|
+
const awsContext = context;
|
|
3539
|
+
defaultUserAgent.push(`m/${encodeFeatures(Object.assign({}, context.__smithy_context?.features, awsContext.__aws_sdk_context?.features))}`);
|
|
3540
|
+
const customUserAgent = options?.customUserAgent?.map(escapeUserAgent) || [];
|
|
3541
|
+
const appId = await options.userAgentAppId();
|
|
3542
|
+
if (appId) defaultUserAgent.push(escapeUserAgent([`app`, `${appId}`]));
|
|
3543
|
+
const prefix = getUserAgentPrefix();
|
|
3544
|
+
const sdkUserAgentValue = (prefix ? [prefix] : []).concat([
|
|
3545
|
+
...defaultUserAgent,
|
|
3546
|
+
...userAgent,
|
|
3547
|
+
...customUserAgent
|
|
3548
|
+
]).join(" ");
|
|
3549
|
+
const normalUAValue = [...defaultUserAgent.filter((section) => section.startsWith("aws-sdk-")), ...customUserAgent].join(" ");
|
|
3550
|
+
if (options.runtime !== "browser") {
|
|
3551
|
+
if (normalUAValue) headers[X_AMZ_USER_AGENT] = headers["x-amz-user-agent"] ? `${headers[USER_AGENT]} ${normalUAValue}` : normalUAValue;
|
|
3552
|
+
headers[USER_AGENT] = sdkUserAgentValue;
|
|
3553
|
+
} else headers[X_AMZ_USER_AGENT] = sdkUserAgentValue;
|
|
3554
|
+
return next({
|
|
3555
|
+
...args,
|
|
3556
|
+
request
|
|
3557
|
+
});
|
|
3558
|
+
};
|
|
3559
|
+
var escapeUserAgent = (userAgentPair) => {
|
|
3560
|
+
const name = userAgentPair[0].split("/").map((part) => part.replace(UA_NAME_ESCAPE_REGEX, "-")).join("/");
|
|
3561
|
+
const version = userAgentPair[1]?.replace(UA_VALUE_ESCAPE_REGEX, "-");
|
|
3562
|
+
const prefixSeparatorIndex = name.indexOf("/");
|
|
3563
|
+
const prefix = name.substring(0, prefixSeparatorIndex);
|
|
3564
|
+
let uaName = name.substring(prefixSeparatorIndex + 1);
|
|
3565
|
+
if (prefix === "api") uaName = uaName.toLowerCase();
|
|
3566
|
+
return [
|
|
3567
|
+
prefix,
|
|
3568
|
+
uaName,
|
|
3569
|
+
version
|
|
3570
|
+
].filter((item) => item && item.length > 0).reduce((acc, item, index) => {
|
|
3571
|
+
switch (index) {
|
|
3572
|
+
case 0: return item;
|
|
3573
|
+
case 1: return `${acc}/${item}`;
|
|
3574
|
+
default: return `${acc}#${item}`;
|
|
3575
|
+
}
|
|
3576
|
+
}, "");
|
|
3577
|
+
};
|
|
3578
|
+
var getUserAgentMiddlewareOptions = {
|
|
3579
|
+
name: "getUserAgentMiddleware",
|
|
3580
|
+
step: "build",
|
|
3581
|
+
priority: "low",
|
|
3582
|
+
tags: ["SET_USER_AGENT", "USER_AGENT"],
|
|
3583
|
+
override: true
|
|
3584
|
+
};
|
|
3585
|
+
var getUserAgentPlugin = (config) => ({ applyToStack: (clientStack) => {
|
|
3586
|
+
clientStack.add(userAgentMiddleware(config), getUserAgentMiddlewareOptions);
|
|
3587
|
+
} });
|
|
3588
|
+
//#endregion
|
|
3589
|
+
//#region ../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseDualstackEndpointConfigOptions.js
|
|
3590
|
+
var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
|
|
3591
|
+
var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
|
|
3592
|
+
var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
|
|
3593
|
+
environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, SelectorType.ENV),
|
|
3594
|
+
configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, SelectorType.CONFIG),
|
|
3595
|
+
default: false
|
|
3596
|
+
};
|
|
3597
|
+
//#endregion
|
|
3598
|
+
//#region ../../../node_modules/@smithy/config-resolver/dist-es/endpointsConfig/NodeUseFipsEndpointConfigOptions.js
|
|
3599
|
+
var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
|
|
3600
|
+
var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
|
|
3601
|
+
var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
|
|
3602
|
+
environmentVariableSelector: (env) => booleanSelector(env, ENV_USE_FIPS_ENDPOINT, SelectorType.ENV),
|
|
3603
|
+
configFileSelector: (profile) => booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, SelectorType.CONFIG),
|
|
3604
|
+
default: false
|
|
3605
|
+
};
|
|
3606
|
+
//#endregion
|
|
3607
|
+
//#region ../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/config.js
|
|
3608
|
+
var REGION_ENV_NAME = "AWS_REGION";
|
|
3609
|
+
var REGION_INI_NAME = "region";
|
|
3610
|
+
var NODE_REGION_CONFIG_OPTIONS = {
|
|
3611
|
+
environmentVariableSelector: (env) => env[REGION_ENV_NAME],
|
|
3612
|
+
configFileSelector: (profile) => profile[REGION_INI_NAME],
|
|
3613
|
+
default: () => {
|
|
3614
|
+
throw new Error("Region is missing");
|
|
3615
|
+
}
|
|
3616
|
+
};
|
|
3617
|
+
var NODE_REGION_CONFIG_FILE_OPTIONS = { preferredFile: "credentials" };
|
|
3618
|
+
//#endregion
|
|
3619
|
+
//#region ../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js
|
|
3620
|
+
var validRegions = /* @__PURE__ */ new Set();
|
|
3621
|
+
var checkRegion = (region, check = isValidHostLabel) => {
|
|
3622
|
+
if (!validRegions.has(region) && !check(region)) if (region === "*") console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
|
|
3623
|
+
else throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
|
|
3624
|
+
else validRegions.add(region);
|
|
3625
|
+
};
|
|
3626
|
+
//#endregion
|
|
3627
|
+
//#region ../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/isFipsRegion.js
|
|
3628
|
+
var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
|
|
3629
|
+
//#endregion
|
|
3630
|
+
//#region ../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/getRealRegion.js
|
|
3631
|
+
var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
|
|
3632
|
+
//#endregion
|
|
3633
|
+
//#region ../../../node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js
|
|
3634
|
+
var resolveRegionConfig = (input) => {
|
|
3635
|
+
const { region, useFipsEndpoint } = input;
|
|
3636
|
+
if (!region) throw new Error("Region is missing");
|
|
3637
|
+
return Object.assign(input, {
|
|
3638
|
+
region: async () => {
|
|
3639
|
+
const realRegion = getRealRegion(typeof region === "function" ? await region() : region);
|
|
3640
|
+
checkRegion(realRegion);
|
|
3641
|
+
return realRegion;
|
|
3642
|
+
},
|
|
3643
|
+
useFipsEndpoint: async () => {
|
|
3644
|
+
if (isFipsRegion(typeof region === "string" ? region : await region())) return true;
|
|
3645
|
+
return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
|
|
3646
|
+
}
|
|
3647
|
+
});
|
|
3648
|
+
};
|
|
3649
|
+
//#endregion
|
|
3650
|
+
//#region ../../../node_modules/@smithy/middleware-content-length/dist-es/index.js
|
|
3651
|
+
var CONTENT_LENGTH_HEADER = "content-length";
|
|
3652
|
+
function contentLengthMiddleware(bodyLengthChecker) {
|
|
3653
|
+
return (next) => async (args) => {
|
|
3654
|
+
const request = args.request;
|
|
3655
|
+
if (require_httpRequest.HttpRequest.isInstance(request)) {
|
|
3656
|
+
const { body, headers } = request;
|
|
3657
|
+
if (body && Object.keys(headers).map((str) => str.toLowerCase()).indexOf(CONTENT_LENGTH_HEADER) === -1) try {
|
|
3658
|
+
const length = bodyLengthChecker(body);
|
|
3659
|
+
request.headers = {
|
|
3660
|
+
...request.headers,
|
|
3661
|
+
[CONTENT_LENGTH_HEADER]: String(length)
|
|
3662
|
+
};
|
|
3663
|
+
} catch (error) {}
|
|
3664
|
+
}
|
|
3665
|
+
return next({
|
|
3666
|
+
...args,
|
|
3667
|
+
request
|
|
3668
|
+
});
|
|
3669
|
+
};
|
|
3670
|
+
}
|
|
3671
|
+
var contentLengthMiddlewareOptions = {
|
|
3672
|
+
step: "build",
|
|
3673
|
+
tags: ["SET_CONTENT_LENGTH", "CONTENT_LENGTH"],
|
|
3674
|
+
name: "contentLengthMiddleware",
|
|
3675
|
+
override: true
|
|
3676
|
+
};
|
|
3677
|
+
var getContentLengthPlugin = (options) => ({ applyToStack: (clientStack) => {
|
|
3678
|
+
clientStack.add(contentLengthMiddleware(options.bodyLengthChecker), contentLengthMiddlewareOptions);
|
|
3679
|
+
} });
|
|
3680
|
+
//#endregion
|
|
3681
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/service-customizations/s3.js
|
|
3682
|
+
var resolveParamsForS3 = async (endpointParams) => {
|
|
3683
|
+
const bucket = endpointParams?.Bucket || "";
|
|
3684
|
+
if (typeof endpointParams.Bucket === "string") endpointParams.Bucket = bucket.replace(/#/g, encodeURIComponent("#")).replace(/\?/g, encodeURIComponent("?"));
|
|
3685
|
+
if (isArnBucketName(bucket)) {
|
|
3686
|
+
if (endpointParams.ForcePathStyle === true) throw new Error("Path-style addressing cannot be used with ARN buckets");
|
|
3687
|
+
} else if (!isDnsCompatibleBucketName(bucket) || bucket.indexOf(".") !== -1 && !String(endpointParams.Endpoint).startsWith("http:") || bucket.toLowerCase() !== bucket || bucket.length < 3) endpointParams.ForcePathStyle = true;
|
|
3688
|
+
if (endpointParams.DisableMultiRegionAccessPoints) {
|
|
3689
|
+
endpointParams.disableMultiRegionAccessPoints = true;
|
|
3690
|
+
endpointParams.DisableMRAP = true;
|
|
3691
|
+
}
|
|
3692
|
+
return endpointParams;
|
|
3693
|
+
};
|
|
3694
|
+
var DOMAIN_PATTERN = /^[a-z0-9][a-z0-9\.\-]{1,61}[a-z0-9]$/;
|
|
3695
|
+
var IP_ADDRESS_PATTERN = /(\d+\.){3}\d+/;
|
|
3696
|
+
var DOTS_PATTERN = /\.\./;
|
|
3697
|
+
var isDnsCompatibleBucketName = (bucketName) => DOMAIN_PATTERN.test(bucketName) && !IP_ADDRESS_PATTERN.test(bucketName) && !DOTS_PATTERN.test(bucketName);
|
|
3698
|
+
var isArnBucketName = (bucketName) => {
|
|
3699
|
+
const [arn, partition, service, , , bucket] = bucketName.split(":");
|
|
3700
|
+
const isArn = arn === "arn" && bucketName.split(":").length >= 6;
|
|
3701
|
+
const isValidArn = Boolean(isArn && partition && service && bucket);
|
|
3702
|
+
if (isArn && !isValidArn) throw new Error(`Invalid ARN: ${bucketName} was an invalid ARN.`);
|
|
3703
|
+
return isValidArn;
|
|
3704
|
+
};
|
|
3705
|
+
//#endregion
|
|
3706
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/createConfigValueProvider.js
|
|
3707
|
+
var createConfigValueProvider = (configKey, canonicalEndpointParamKey, config, isClientContextParam = false) => {
|
|
3708
|
+
const configProvider = async () => {
|
|
3709
|
+
let configValue;
|
|
3710
|
+
if (isClientContextParam) configValue = config.clientContextParams?.[configKey] ?? config[configKey] ?? config[canonicalEndpointParamKey];
|
|
3711
|
+
else configValue = config[configKey] ?? config[canonicalEndpointParamKey];
|
|
3712
|
+
if (typeof configValue === "function") return configValue();
|
|
3713
|
+
return configValue;
|
|
3714
|
+
};
|
|
3715
|
+
if (configKey === "credentialScope" || canonicalEndpointParamKey === "CredentialScope") return async () => {
|
|
3716
|
+
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
|
|
3717
|
+
return credentials?.credentialScope ?? credentials?.CredentialScope;
|
|
3718
|
+
};
|
|
3719
|
+
if (configKey === "accountId" || canonicalEndpointParamKey === "AccountId") return async () => {
|
|
3720
|
+
const credentials = typeof config.credentials === "function" ? await config.credentials() : config.credentials;
|
|
3721
|
+
return credentials?.accountId ?? credentials?.AccountId;
|
|
3722
|
+
};
|
|
3723
|
+
if (configKey === "endpoint" || canonicalEndpointParamKey === "endpoint") return async () => {
|
|
3724
|
+
if (config.isCustomEndpoint === false) return;
|
|
3725
|
+
const endpoint = await configProvider();
|
|
3726
|
+
if (endpoint && typeof endpoint === "object") {
|
|
3727
|
+
if ("url" in endpoint) return endpoint.url.href;
|
|
3728
|
+
if ("hostname" in endpoint) {
|
|
3729
|
+
const { protocol, hostname, port, path } = endpoint;
|
|
3730
|
+
return `${protocol}//${hostname}${port ? ":" + port : ""}${path}`;
|
|
3731
|
+
}
|
|
3732
|
+
}
|
|
3733
|
+
return endpoint;
|
|
3734
|
+
};
|
|
3735
|
+
return configProvider;
|
|
3736
|
+
};
|
|
3737
|
+
//#endregion
|
|
3738
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointUrlConfig.js
|
|
3739
|
+
var ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
|
|
3740
|
+
var CONFIG_ENDPOINT_URL = "endpoint_url";
|
|
3741
|
+
var getEndpointUrlConfig = (serviceId) => ({
|
|
3742
|
+
environmentVariableSelector: (env) => {
|
|
3743
|
+
const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceId.split(" ").map((w) => w.toUpperCase())].join("_")];
|
|
3744
|
+
if (serviceEndpointUrl) return serviceEndpointUrl;
|
|
3745
|
+
const endpointUrl = env[ENV_ENDPOINT_URL];
|
|
3746
|
+
if (endpointUrl) return endpointUrl;
|
|
3747
|
+
},
|
|
3748
|
+
configFileSelector: (profile, config) => {
|
|
3749
|
+
if (config && profile.services) {
|
|
3750
|
+
const servicesSection = config[["services", profile.services].join(".")];
|
|
3751
|
+
if (servicesSection) {
|
|
3752
|
+
const endpointUrl = servicesSection[[serviceId.split(" ").map((w) => w.toLowerCase()).join("_"), CONFIG_ENDPOINT_URL].join(".")];
|
|
3753
|
+
if (endpointUrl) return endpointUrl;
|
|
3754
|
+
}
|
|
3755
|
+
}
|
|
3756
|
+
const endpointUrl = profile[CONFIG_ENDPOINT_URL];
|
|
3757
|
+
if (endpointUrl) return endpointUrl;
|
|
3758
|
+
},
|
|
3759
|
+
default: void 0
|
|
3760
|
+
});
|
|
3761
|
+
//#endregion
|
|
3762
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromConfig.js
|
|
3763
|
+
var getEndpointFromConfig = async (serviceId) => require_configLoader.loadConfig(getEndpointUrlConfig(serviceId ?? ""))();
|
|
3764
|
+
//#endregion
|
|
3765
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/toEndpointV1.js
|
|
3766
|
+
var toEndpointV1 = (endpoint) => {
|
|
3767
|
+
if (typeof endpoint === "object") {
|
|
3768
|
+
if ("url" in endpoint) {
|
|
3769
|
+
const v1Endpoint = require_configLoader.parseUrl(endpoint.url);
|
|
3770
|
+
if (endpoint.headers) {
|
|
3771
|
+
v1Endpoint.headers = {};
|
|
3772
|
+
for (const [name, values] of Object.entries(endpoint.headers)) v1Endpoint.headers[name.toLowerCase()] = values.join(", ");
|
|
3773
|
+
}
|
|
3774
|
+
return v1Endpoint;
|
|
3775
|
+
}
|
|
3776
|
+
return endpoint;
|
|
3777
|
+
}
|
|
3778
|
+
return require_configLoader.parseUrl(endpoint);
|
|
3779
|
+
};
|
|
3780
|
+
//#endregion
|
|
3781
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/adaptors/getEndpointFromInstructions.js
|
|
3782
|
+
var getEndpointFromInstructions = async (commandInput, instructionsSupplier, clientConfig, context) => {
|
|
3783
|
+
if (!clientConfig.isCustomEndpoint) {
|
|
3784
|
+
let endpointFromConfig;
|
|
3785
|
+
if (clientConfig.serviceConfiguredEndpoint) endpointFromConfig = await clientConfig.serviceConfiguredEndpoint();
|
|
3786
|
+
else endpointFromConfig = await getEndpointFromConfig(clientConfig.serviceId);
|
|
3787
|
+
if (endpointFromConfig) {
|
|
3788
|
+
clientConfig.endpoint = () => Promise.resolve(toEndpointV1(endpointFromConfig));
|
|
3789
|
+
clientConfig.isCustomEndpoint = true;
|
|
3790
|
+
}
|
|
3791
|
+
}
|
|
3792
|
+
const endpointParams = await resolveParams(commandInput, instructionsSupplier, clientConfig);
|
|
3793
|
+
if (typeof clientConfig.endpointProvider !== "function") throw new Error("config.endpointProvider is not set.");
|
|
3794
|
+
const endpoint = clientConfig.endpointProvider(endpointParams, context);
|
|
3795
|
+
if (clientConfig.isCustomEndpoint && clientConfig.endpoint) {
|
|
3796
|
+
const customEndpoint = await clientConfig.endpoint();
|
|
3797
|
+
if (customEndpoint?.headers) {
|
|
3798
|
+
endpoint.headers ??= {};
|
|
3799
|
+
for (const [name, value] of Object.entries(customEndpoint.headers)) endpoint.headers[name] = Array.isArray(value) ? value : [value];
|
|
3800
|
+
}
|
|
3801
|
+
}
|
|
3802
|
+
return endpoint;
|
|
3803
|
+
};
|
|
3804
|
+
var resolveParams = async (commandInput, instructionsSupplier, clientConfig) => {
|
|
3805
|
+
const endpointParams = {};
|
|
3806
|
+
const instructions = instructionsSupplier?.getEndpointParameterInstructions?.() || {};
|
|
3807
|
+
for (const [name, instruction] of Object.entries(instructions)) switch (instruction.type) {
|
|
3808
|
+
case "staticContextParams":
|
|
3809
|
+
endpointParams[name] = instruction.value;
|
|
3810
|
+
break;
|
|
3811
|
+
case "contextParams":
|
|
3812
|
+
endpointParams[name] = commandInput[instruction.name];
|
|
3813
|
+
break;
|
|
3814
|
+
case "clientContextParams":
|
|
3815
|
+
case "builtInParams":
|
|
3816
|
+
endpointParams[name] = await createConfigValueProvider(instruction.name, name, clientConfig, instruction.type !== "builtInParams")();
|
|
3817
|
+
break;
|
|
3818
|
+
case "operationContextParams":
|
|
3819
|
+
endpointParams[name] = instruction.get(commandInput);
|
|
3820
|
+
break;
|
|
3821
|
+
default: throw new Error("Unrecognized endpoint parameter instruction: " + JSON.stringify(instruction));
|
|
3822
|
+
}
|
|
3823
|
+
if (Object.keys(instructions).length === 0) Object.assign(endpointParams, clientConfig);
|
|
3824
|
+
if (String(clientConfig.serviceId).toLowerCase() === "s3") await resolveParamsForS3(endpointParams);
|
|
3825
|
+
return endpointParams;
|
|
3826
|
+
};
|
|
3827
|
+
//#endregion
|
|
3828
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/endpointMiddleware.js
|
|
3829
|
+
var endpointMiddleware = ({ config, instructions }) => {
|
|
3830
|
+
return (next, context) => async (args) => {
|
|
3831
|
+
if (config.isCustomEndpoint) setFeature(context, "ENDPOINT_OVERRIDE", "N");
|
|
3832
|
+
const endpoint = await getEndpointFromInstructions(args.input, { getEndpointParameterInstructions() {
|
|
3833
|
+
return instructions;
|
|
3834
|
+
} }, { ...config }, context);
|
|
3835
|
+
context.endpointV2 = endpoint;
|
|
3836
|
+
context.authSchemes = endpoint.properties?.authSchemes;
|
|
3837
|
+
const authScheme = context.authSchemes?.[0];
|
|
3838
|
+
if (authScheme) {
|
|
3839
|
+
context["signing_region"] = authScheme.signingRegion;
|
|
3840
|
+
context["signing_service"] = authScheme.signingName;
|
|
3841
|
+
const httpAuthOption = getSmithyContext(context)?.selectedHttpAuthScheme?.httpAuthOption;
|
|
3842
|
+
if (httpAuthOption) httpAuthOption.signingProperties = Object.assign(httpAuthOption.signingProperties || {}, {
|
|
3843
|
+
signing_region: authScheme.signingRegion,
|
|
3844
|
+
signingRegion: authScheme.signingRegion,
|
|
3845
|
+
signing_service: authScheme.signingName,
|
|
3846
|
+
signingName: authScheme.signingName,
|
|
3847
|
+
signingRegionSet: authScheme.signingRegionSet
|
|
3848
|
+
}, authScheme.properties);
|
|
3849
|
+
}
|
|
3850
|
+
return next({ ...args });
|
|
3851
|
+
};
|
|
3852
|
+
};
|
|
3853
|
+
//#endregion
|
|
3854
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/getEndpointPlugin.js
|
|
3855
|
+
var endpointMiddlewareOptions = {
|
|
3856
|
+
step: "serialize",
|
|
3857
|
+
tags: [
|
|
3858
|
+
"ENDPOINT_PARAMETERS",
|
|
3859
|
+
"ENDPOINT_V2",
|
|
3860
|
+
"ENDPOINT"
|
|
3861
|
+
],
|
|
3862
|
+
name: "endpointV2Middleware",
|
|
3863
|
+
override: true,
|
|
3864
|
+
relation: "before",
|
|
3865
|
+
toMiddleware: {
|
|
3866
|
+
name: "serializerMiddleware",
|
|
3867
|
+
step: "serialize",
|
|
3868
|
+
tags: ["SERIALIZER"],
|
|
3869
|
+
override: true
|
|
3870
|
+
}.name
|
|
3871
|
+
};
|
|
3872
|
+
var getEndpointPlugin = (config, instructions) => ({ applyToStack: (clientStack) => {
|
|
3873
|
+
clientStack.addRelativeTo(endpointMiddleware({
|
|
3874
|
+
config,
|
|
3875
|
+
instructions
|
|
3876
|
+
}), endpointMiddlewareOptions);
|
|
3877
|
+
} });
|
|
3878
|
+
//#endregion
|
|
3879
|
+
//#region ../../../node_modules/@smithy/middleware-endpoint/dist-es/resolveEndpointConfig.js
|
|
3880
|
+
var resolveEndpointConfig = (input) => {
|
|
3881
|
+
const tls = input.tls ?? true;
|
|
3882
|
+
const { endpoint, useDualstackEndpoint, useFipsEndpoint } = input;
|
|
3883
|
+
const resolvedConfig = Object.assign(input, {
|
|
3884
|
+
endpoint: endpoint != null ? async () => toEndpointV1(await normalizeProvider(endpoint)()) : void 0,
|
|
3885
|
+
tls,
|
|
3886
|
+
isCustomEndpoint: !!endpoint,
|
|
3887
|
+
useDualstackEndpoint: normalizeProvider(useDualstackEndpoint ?? false),
|
|
3888
|
+
useFipsEndpoint: normalizeProvider(useFipsEndpoint ?? false)
|
|
3889
|
+
});
|
|
3890
|
+
let configuredEndpointPromise = void 0;
|
|
3891
|
+
resolvedConfig.serviceConfiguredEndpoint = async () => {
|
|
3892
|
+
if (input.serviceId && !configuredEndpointPromise) configuredEndpointPromise = getEndpointFromConfig(input.serviceId);
|
|
3893
|
+
return configuredEndpointPromise;
|
|
3894
|
+
};
|
|
3895
|
+
return resolvedConfig;
|
|
3896
|
+
};
|
|
3897
|
+
//#endregion
|
|
3898
|
+
//#region ../../../node_modules/@smithy/service-error-classification/dist-es/constants.js
|
|
3899
|
+
var THROTTLING_ERROR_CODES = [
|
|
3900
|
+
"BandwidthLimitExceeded",
|
|
3901
|
+
"EC2ThrottledException",
|
|
3902
|
+
"LimitExceededException",
|
|
3903
|
+
"PriorRequestNotComplete",
|
|
3904
|
+
"ProvisionedThroughputExceededException",
|
|
3905
|
+
"RequestLimitExceeded",
|
|
3906
|
+
"RequestThrottled",
|
|
3907
|
+
"RequestThrottledException",
|
|
3908
|
+
"SlowDown",
|
|
3909
|
+
"ThrottledException",
|
|
3910
|
+
"Throttling",
|
|
3911
|
+
"ThrottlingException",
|
|
3912
|
+
"TooManyRequestsException",
|
|
3913
|
+
"TransactionInProgressException"
|
|
3914
|
+
];
|
|
3915
|
+
var TRANSIENT_ERROR_CODES = [
|
|
3916
|
+
"TimeoutError",
|
|
3917
|
+
"RequestTimeout",
|
|
3918
|
+
"RequestTimeoutException"
|
|
3919
|
+
];
|
|
3920
|
+
var TRANSIENT_ERROR_STATUS_CODES = [
|
|
3921
|
+
500,
|
|
3922
|
+
502,
|
|
3923
|
+
503,
|
|
3924
|
+
504
|
|
3925
|
+
];
|
|
3926
|
+
var NODEJS_TIMEOUT_ERROR_CODES = [
|
|
3927
|
+
"ECONNRESET",
|
|
3928
|
+
"ECONNREFUSED",
|
|
3929
|
+
"EPIPE",
|
|
3930
|
+
"ETIMEDOUT"
|
|
3931
|
+
];
|
|
3932
|
+
var NODEJS_NETWORK_ERROR_CODES = [
|
|
3933
|
+
"EHOSTUNREACH",
|
|
3934
|
+
"ENETUNREACH",
|
|
3935
|
+
"ENOTFOUND"
|
|
3936
|
+
];
|
|
3937
|
+
//#endregion
|
|
3938
|
+
//#region ../../../node_modules/@smithy/service-error-classification/dist-es/index.js
|
|
3939
|
+
var isRetryableByTrait = (error) => error?.$retryable !== void 0;
|
|
3940
|
+
var isClockSkewCorrectedError = (error) => error.$metadata?.clockSkewCorrected;
|
|
3941
|
+
var isBrowserNetworkError = (error) => {
|
|
3942
|
+
const errorMessages = new Set([
|
|
3943
|
+
"Failed to fetch",
|
|
3944
|
+
"NetworkError when attempting to fetch resource",
|
|
3945
|
+
"The Internet connection appears to be offline",
|
|
3946
|
+
"Load failed",
|
|
3947
|
+
"Network request failed"
|
|
3948
|
+
]);
|
|
3949
|
+
if (!(error && error instanceof TypeError)) return false;
|
|
3950
|
+
return errorMessages.has(error.message);
|
|
3951
|
+
};
|
|
3952
|
+
var isThrottlingError = (error) => error.$metadata?.httpStatusCode === 429 || THROTTLING_ERROR_CODES.includes(error.name) || error.$retryable?.throttling == true;
|
|
3953
|
+
var isTransientError = (error, depth = 0) => isRetryableByTrait(error) || isClockSkewCorrectedError(error) || TRANSIENT_ERROR_CODES.includes(error.name) || NODEJS_TIMEOUT_ERROR_CODES.includes(error?.code || "") || NODEJS_NETWORK_ERROR_CODES.includes(error?.code || "") || TRANSIENT_ERROR_STATUS_CODES.includes(error.$metadata?.httpStatusCode || 0) || isBrowserNetworkError(error) || error.cause !== void 0 && depth <= 10 && isTransientError(error.cause, depth + 1);
|
|
3954
|
+
var isServerError = (error) => {
|
|
3955
|
+
if (error.$metadata?.httpStatusCode !== void 0) {
|
|
3956
|
+
const statusCode = error.$metadata.httpStatusCode;
|
|
3957
|
+
if (500 <= statusCode && statusCode <= 599 && !isTransientError(error)) return true;
|
|
3958
|
+
return false;
|
|
3959
|
+
}
|
|
3960
|
+
return false;
|
|
3961
|
+
};
|
|
3962
|
+
//#endregion
|
|
3963
|
+
//#region ../../../node_modules/@smithy/uuid/dist-es/randomUUID.js
|
|
3964
|
+
var randomUUID = crypto$1.default.randomUUID.bind(crypto$1.default);
|
|
3965
|
+
//#endregion
|
|
3966
|
+
//#region ../../../node_modules/@smithy/uuid/dist-es/v4.js
|
|
3967
|
+
var decimalToHex = Array.from({ length: 256 }, (_, i) => i.toString(16).padStart(2, "0"));
|
|
3968
|
+
var v4 = () => {
|
|
3969
|
+
if (randomUUID) return randomUUID();
|
|
3970
|
+
const rnds = new Uint8Array(16);
|
|
3971
|
+
crypto.getRandomValues(rnds);
|
|
3972
|
+
rnds[6] = rnds[6] & 15 | 64;
|
|
3973
|
+
rnds[8] = rnds[8] & 63 | 128;
|
|
3974
|
+
return decimalToHex[rnds[0]] + decimalToHex[rnds[1]] + decimalToHex[rnds[2]] + decimalToHex[rnds[3]] + "-" + decimalToHex[rnds[4]] + decimalToHex[rnds[5]] + "-" + decimalToHex[rnds[6]] + decimalToHex[rnds[7]] + "-" + decimalToHex[rnds[8]] + decimalToHex[rnds[9]] + "-" + decimalToHex[rnds[10]] + decimalToHex[rnds[11]] + decimalToHex[rnds[12]] + decimalToHex[rnds[13]] + decimalToHex[rnds[14]] + decimalToHex[rnds[15]];
|
|
3975
|
+
};
|
|
3976
|
+
//#endregion
|
|
3977
|
+
//#region ../../../node_modules/@smithy/middleware-retry/dist-es/util.js
|
|
3978
|
+
var asSdkError = (error) => {
|
|
3979
|
+
if (error instanceof Error) return error;
|
|
3980
|
+
if (error instanceof Object) return Object.assign(/* @__PURE__ */ new Error(), error);
|
|
3981
|
+
if (typeof error === "string") return new Error(error);
|
|
3982
|
+
return /* @__PURE__ */ new Error(`AWS SDK error wrapper for ${error}`);
|
|
3983
|
+
};
|
|
3984
|
+
//#endregion
|
|
3985
|
+
//#region ../../../node_modules/@smithy/middleware-retry/dist-es/configurations.js
|
|
3986
|
+
var ENV_MAX_ATTEMPTS = "AWS_MAX_ATTEMPTS";
|
|
3987
|
+
var CONFIG_MAX_ATTEMPTS = "max_attempts";
|
|
3988
|
+
var NODE_MAX_ATTEMPT_CONFIG_OPTIONS = {
|
|
3989
|
+
environmentVariableSelector: (env) => {
|
|
3990
|
+
const value = env[ENV_MAX_ATTEMPTS];
|
|
3991
|
+
if (!value) return void 0;
|
|
3992
|
+
const maxAttempt = parseInt(value);
|
|
3993
|
+
if (Number.isNaN(maxAttempt)) throw new Error(`Environment variable ${ENV_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
|
3994
|
+
return maxAttempt;
|
|
3995
|
+
},
|
|
3996
|
+
configFileSelector: (profile) => {
|
|
3997
|
+
const value = profile[CONFIG_MAX_ATTEMPTS];
|
|
3998
|
+
if (!value) return void 0;
|
|
3999
|
+
const maxAttempt = parseInt(value);
|
|
4000
|
+
if (Number.isNaN(maxAttempt)) throw new Error(`Shared config file entry ${CONFIG_MAX_ATTEMPTS} mast be a number, got "${value}"`);
|
|
4001
|
+
return maxAttempt;
|
|
4002
|
+
},
|
|
4003
|
+
default: 3
|
|
4004
|
+
};
|
|
4005
|
+
var resolveRetryConfig = (input) => {
|
|
4006
|
+
const { retryStrategy, retryMode } = input;
|
|
4007
|
+
const maxAttempts = normalizeProvider(input.maxAttempts ?? 3);
|
|
4008
|
+
let controller = retryStrategy ? Promise.resolve(retryStrategy) : void 0;
|
|
4009
|
+
const getDefault = async () => await normalizeProvider(retryMode)() === RETRY_MODES.ADAPTIVE ? new AdaptiveRetryStrategy(maxAttempts) : new StandardRetryStrategy(maxAttempts);
|
|
4010
|
+
return Object.assign(input, {
|
|
4011
|
+
maxAttempts,
|
|
4012
|
+
retryStrategy: () => controller ??= getDefault()
|
|
4013
|
+
});
|
|
4014
|
+
};
|
|
4015
|
+
var ENV_RETRY_MODE = "AWS_RETRY_MODE";
|
|
4016
|
+
var CONFIG_RETRY_MODE = "retry_mode";
|
|
4017
|
+
var NODE_RETRY_MODE_CONFIG_OPTIONS = {
|
|
4018
|
+
environmentVariableSelector: (env) => env[ENV_RETRY_MODE],
|
|
4019
|
+
configFileSelector: (profile) => profile[CONFIG_RETRY_MODE],
|
|
4020
|
+
default: DEFAULT_RETRY_MODE
|
|
4021
|
+
};
|
|
4022
|
+
//#endregion
|
|
4023
|
+
//#region ../../../node_modules/@smithy/middleware-retry/dist-es/isStreamingPayload/isStreamingPayload.js
|
|
4024
|
+
var isStreamingPayload = (request) => request?.body instanceof stream.Readable || typeof ReadableStream !== "undefined" && request?.body instanceof ReadableStream;
|
|
4025
|
+
//#endregion
|
|
4026
|
+
//#region ../../../node_modules/@smithy/middleware-retry/dist-es/retryMiddleware.js
|
|
4027
|
+
var retryMiddleware = (options) => (next, context) => async (args) => {
|
|
4028
|
+
let retryStrategy = await options.retryStrategy();
|
|
4029
|
+
const maxAttempts = await options.maxAttempts();
|
|
4030
|
+
if (isRetryStrategyV2(retryStrategy)) {
|
|
4031
|
+
retryStrategy = retryStrategy;
|
|
4032
|
+
let retryToken = await retryStrategy.acquireInitialRetryToken(context["partition_id"]);
|
|
4033
|
+
let lastError = /* @__PURE__ */ new Error();
|
|
4034
|
+
let attempts = 0;
|
|
4035
|
+
let totalRetryDelay = 0;
|
|
4036
|
+
const { request } = args;
|
|
4037
|
+
const isRequest = require_httpRequest.HttpRequest.isInstance(request);
|
|
4038
|
+
if (isRequest) request.headers[INVOCATION_ID_HEADER] = v4();
|
|
4039
|
+
while (true) try {
|
|
4040
|
+
if (isRequest) request.headers[REQUEST_HEADER] = `attempt=${attempts + 1}; max=${maxAttempts}`;
|
|
4041
|
+
const { response, output } = await next(args);
|
|
4042
|
+
retryStrategy.recordSuccess(retryToken);
|
|
4043
|
+
output.$metadata.attempts = attempts + 1;
|
|
4044
|
+
output.$metadata.totalRetryDelay = totalRetryDelay;
|
|
4045
|
+
return {
|
|
4046
|
+
response,
|
|
4047
|
+
output
|
|
4048
|
+
};
|
|
4049
|
+
} catch (e) {
|
|
4050
|
+
const retryErrorInfo = getRetryErrorInfo(e);
|
|
4051
|
+
lastError = asSdkError(e);
|
|
4052
|
+
if (isRequest && isStreamingPayload(request)) {
|
|
4053
|
+
(context.logger instanceof NoOpLogger ? console : context.logger)?.warn("An error was encountered in a non-retryable streaming request.");
|
|
4054
|
+
throw lastError;
|
|
4055
|
+
}
|
|
4056
|
+
try {
|
|
4057
|
+
retryToken = await retryStrategy.refreshRetryTokenForRetry(retryToken, retryErrorInfo);
|
|
4058
|
+
} catch (refreshError) {
|
|
4059
|
+
if (!lastError.$metadata) lastError.$metadata = {};
|
|
4060
|
+
lastError.$metadata.attempts = attempts + 1;
|
|
4061
|
+
lastError.$metadata.totalRetryDelay = totalRetryDelay;
|
|
4062
|
+
throw lastError;
|
|
4063
|
+
}
|
|
4064
|
+
attempts = retryToken.getRetryCount();
|
|
4065
|
+
const delay = retryToken.getRetryDelay();
|
|
4066
|
+
totalRetryDelay += delay;
|
|
4067
|
+
await new Promise((resolve) => setTimeout(resolve, delay));
|
|
4068
|
+
}
|
|
4069
|
+
} else {
|
|
4070
|
+
retryStrategy = retryStrategy;
|
|
4071
|
+
if (retryStrategy?.mode) context.userAgent = [...context.userAgent || [], ["cfg/retry-mode", retryStrategy.mode]];
|
|
4072
|
+
return retryStrategy.retry(next, args);
|
|
4073
|
+
}
|
|
4074
|
+
};
|
|
4075
|
+
var isRetryStrategyV2 = (retryStrategy) => typeof retryStrategy.acquireInitialRetryToken !== "undefined" && typeof retryStrategy.refreshRetryTokenForRetry !== "undefined" && typeof retryStrategy.recordSuccess !== "undefined";
|
|
4076
|
+
var getRetryErrorInfo = (error) => {
|
|
4077
|
+
const errorInfo = {
|
|
4078
|
+
error,
|
|
4079
|
+
errorType: getRetryErrorType(error)
|
|
4080
|
+
};
|
|
4081
|
+
const retryAfterHint = getRetryAfterHint(error.$response);
|
|
4082
|
+
if (retryAfterHint) errorInfo.retryAfterHint = retryAfterHint;
|
|
4083
|
+
return errorInfo;
|
|
4084
|
+
};
|
|
4085
|
+
var getRetryErrorType = (error) => {
|
|
4086
|
+
if (isThrottlingError(error)) return "THROTTLING";
|
|
4087
|
+
if (isTransientError(error)) return "TRANSIENT";
|
|
4088
|
+
if (isServerError(error)) return "SERVER_ERROR";
|
|
4089
|
+
return "CLIENT_ERROR";
|
|
4090
|
+
};
|
|
4091
|
+
var retryMiddlewareOptions = {
|
|
4092
|
+
name: "retryMiddleware",
|
|
4093
|
+
tags: ["RETRY"],
|
|
4094
|
+
step: "finalizeRequest",
|
|
4095
|
+
priority: "high",
|
|
4096
|
+
override: true
|
|
4097
|
+
};
|
|
4098
|
+
var getRetryPlugin = (options) => ({ applyToStack: (clientStack) => {
|
|
4099
|
+
clientStack.add(retryMiddleware(options), retryMiddlewareOptions);
|
|
4100
|
+
} });
|
|
4101
|
+
var getRetryAfterHint = (response) => {
|
|
4102
|
+
if (!require_stream_collector.HttpResponse.isInstance(response)) return;
|
|
4103
|
+
const retryAfterHeaderName = Object.keys(response.headers).find((key) => key.toLowerCase() === "retry-after");
|
|
4104
|
+
if (!retryAfterHeaderName) return;
|
|
4105
|
+
const retryAfter = response.headers[retryAfterHeaderName];
|
|
4106
|
+
const retryAfterSeconds = Number(retryAfter);
|
|
4107
|
+
if (!Number.isNaN(retryAfterSeconds)) return /* @__PURE__ */ new Date(retryAfterSeconds * 1e3);
|
|
4108
|
+
return new Date(retryAfter);
|
|
4109
|
+
};
|
|
4110
|
+
//#endregion
|
|
4111
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/getRuntimeUserAgentPair.js
|
|
4112
|
+
var getRuntimeUserAgentPair = () => {
|
|
4113
|
+
for (const runtime of [
|
|
4114
|
+
"deno",
|
|
4115
|
+
"bun",
|
|
4116
|
+
"llrt"
|
|
4117
|
+
]) if (node_process.versions[runtime]) return [`md/${runtime}`, node_process.versions[runtime]];
|
|
4118
|
+
return ["md/nodejs", node_process.versions.node];
|
|
4119
|
+
};
|
|
4120
|
+
//#endregion
|
|
4121
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/getNodeModulesParentDirs.js
|
|
4122
|
+
var getNodeModulesParentDirs = (dirname) => {
|
|
4123
|
+
const cwd = process.cwd();
|
|
4124
|
+
if (!dirname) return [cwd];
|
|
4125
|
+
const normalizedPath = (0, node_path.normalize)(dirname);
|
|
4126
|
+
const parts = normalizedPath.split(node_path.sep);
|
|
4127
|
+
const nodeModulesIndex = parts.indexOf("node_modules");
|
|
4128
|
+
const parentDir = nodeModulesIndex !== -1 ? parts.slice(0, nodeModulesIndex).join(node_path.sep) : normalizedPath;
|
|
4129
|
+
if (cwd === parentDir) return [cwd];
|
|
4130
|
+
return [parentDir, cwd];
|
|
4131
|
+
};
|
|
4132
|
+
//#endregion
|
|
4133
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedTypeScriptVersion.js
|
|
4134
|
+
var SEMVER_REGEX = /^(0|[1-9]\d*)\.(0|[1-9]\d*)\.(0|[1-9]\d*)(?:-((?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*)(?:\.(?:0|[1-9]\d*|\d*[a-zA-Z-][0-9a-zA-Z-]*))*))?(?:\+[0-9a-zA-Z-]+(?:\.[0-9a-zA-Z-]+)*)?$/;
|
|
4135
|
+
var getSanitizedTypeScriptVersion = (version = "") => {
|
|
4136
|
+
const match = version.match(SEMVER_REGEX);
|
|
4137
|
+
if (!match) return;
|
|
4138
|
+
const [major, minor, patch, prerelease] = [
|
|
4139
|
+
match[1],
|
|
4140
|
+
match[2],
|
|
4141
|
+
match[3],
|
|
4142
|
+
match[4]
|
|
4143
|
+
];
|
|
4144
|
+
return prerelease ? `${major}.${minor}.${patch}-${prerelease}` : `${major}.${minor}.${patch}`;
|
|
4145
|
+
};
|
|
4146
|
+
//#endregion
|
|
4147
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/getSanitizedDevTypeScriptVersion.js
|
|
4148
|
+
var ALLOWED_PREFIXES = [
|
|
4149
|
+
"^",
|
|
4150
|
+
"~",
|
|
4151
|
+
">=",
|
|
4152
|
+
"<=",
|
|
4153
|
+
">",
|
|
4154
|
+
"<"
|
|
4155
|
+
];
|
|
4156
|
+
var ALLOWED_DIST_TAGS = [
|
|
4157
|
+
"latest",
|
|
4158
|
+
"beta",
|
|
4159
|
+
"dev",
|
|
4160
|
+
"rc",
|
|
4161
|
+
"insiders",
|
|
4162
|
+
"next"
|
|
4163
|
+
];
|
|
4164
|
+
var getSanitizedDevTypeScriptVersion = (version = "") => {
|
|
4165
|
+
if (ALLOWED_DIST_TAGS.includes(version)) return version;
|
|
4166
|
+
const prefix = ALLOWED_PREFIXES.find((p) => version.startsWith(p)) ?? "";
|
|
4167
|
+
const sanitizedTypeScriptVersion = getSanitizedTypeScriptVersion(version.slice(prefix.length));
|
|
4168
|
+
if (!sanitizedTypeScriptVersion) return;
|
|
4169
|
+
return `${prefix}${sanitizedTypeScriptVersion}`;
|
|
4170
|
+
};
|
|
4171
|
+
//#endregion
|
|
4172
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/getTypeScriptUserAgentPair.js
|
|
4173
|
+
var tscVersion;
|
|
4174
|
+
var TS_PACKAGE_JSON = (0, node_path.join)("node_modules", "typescript", "package.json");
|
|
4175
|
+
var getTypeScriptUserAgentPair = async () => {
|
|
4176
|
+
if (tscVersion === null) return;
|
|
4177
|
+
else if (typeof tscVersion === "string") return ["md/tsc", tscVersion];
|
|
4178
|
+
let isTypeScriptDetectionDisabled = false;
|
|
4179
|
+
try {
|
|
4180
|
+
isTypeScriptDetectionDisabled = booleanSelector(process.env, "AWS_SDK_JS_TYPESCRIPT_DETECTION_DISABLED", SelectorType.ENV) || false;
|
|
4181
|
+
} catch {}
|
|
4182
|
+
if (isTypeScriptDetectionDisabled) {
|
|
4183
|
+
tscVersion = null;
|
|
4184
|
+
return;
|
|
4185
|
+
}
|
|
4186
|
+
const nodeModulesParentDirs = getNodeModulesParentDirs(typeof __dirname !== "undefined" ? __dirname : void 0);
|
|
4187
|
+
let versionFromApp;
|
|
4188
|
+
for (const nodeModulesParentDir of nodeModulesParentDirs) try {
|
|
4189
|
+
const packageJson = await (0, node_fs_promises.readFile)((0, node_path.join)(nodeModulesParentDir, "package.json"), "utf-8");
|
|
4190
|
+
const { dependencies, devDependencies } = JSON.parse(packageJson);
|
|
4191
|
+
const version = devDependencies?.typescript ?? dependencies?.typescript;
|
|
4192
|
+
if (typeof version !== "string") continue;
|
|
4193
|
+
versionFromApp = version;
|
|
4194
|
+
break;
|
|
4195
|
+
} catch {}
|
|
4196
|
+
if (!versionFromApp) {
|
|
4197
|
+
tscVersion = null;
|
|
4198
|
+
return;
|
|
4199
|
+
}
|
|
4200
|
+
let versionFromNodeModules;
|
|
4201
|
+
for (const nodeModulesParentDir of nodeModulesParentDirs) try {
|
|
4202
|
+
const packageJson = await (0, node_fs_promises.readFile)((0, node_path.join)(nodeModulesParentDir, TS_PACKAGE_JSON), "utf-8");
|
|
4203
|
+
const { version } = JSON.parse(packageJson);
|
|
4204
|
+
const sanitizedVersion = getSanitizedTypeScriptVersion(version);
|
|
4205
|
+
if (typeof sanitizedVersion !== "string") continue;
|
|
4206
|
+
versionFromNodeModules = sanitizedVersion;
|
|
4207
|
+
break;
|
|
4208
|
+
} catch {}
|
|
4209
|
+
if (versionFromNodeModules) {
|
|
4210
|
+
tscVersion = versionFromNodeModules;
|
|
4211
|
+
return ["md/tsc", tscVersion];
|
|
4212
|
+
}
|
|
4213
|
+
const sanitizedVersion = getSanitizedDevTypeScriptVersion(versionFromApp);
|
|
4214
|
+
if (typeof sanitizedVersion !== "string") {
|
|
4215
|
+
tscVersion = null;
|
|
4216
|
+
return;
|
|
4217
|
+
}
|
|
4218
|
+
tscVersion = `dev_${sanitizedVersion}`;
|
|
4219
|
+
return ["md/tsc", tscVersion];
|
|
4220
|
+
};
|
|
4221
|
+
//#endregion
|
|
4222
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/crt-availability.js
|
|
4223
|
+
var crtAvailability = { isCrtAvailable: false };
|
|
4224
|
+
//#endregion
|
|
4225
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/is-crt-available.js
|
|
4226
|
+
var isCrtAvailable = () => {
|
|
4227
|
+
if (crtAvailability.isCrtAvailable) return ["md/crt-avail"];
|
|
4228
|
+
return null;
|
|
4229
|
+
};
|
|
4230
|
+
//#endregion
|
|
4231
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/defaultUserAgent.js
|
|
4232
|
+
var createDefaultUserAgentProvider = ({ serviceId, clientVersion }) => {
|
|
4233
|
+
const runtimeUserAgentPair = getRuntimeUserAgentPair();
|
|
4234
|
+
return async (config) => {
|
|
4235
|
+
const sections = [
|
|
4236
|
+
["aws-sdk-js", clientVersion],
|
|
4237
|
+
["ua", "2.1"],
|
|
4238
|
+
[`os/${(0, node_os.platform)()}`, (0, node_os.release)()],
|
|
4239
|
+
["lang/js"],
|
|
4240
|
+
runtimeUserAgentPair
|
|
4241
|
+
];
|
|
4242
|
+
const typescriptUserAgentPair = await getTypeScriptUserAgentPair();
|
|
4243
|
+
if (typescriptUserAgentPair) sections.push(typescriptUserAgentPair);
|
|
4244
|
+
const crtAvailable = isCrtAvailable();
|
|
4245
|
+
if (crtAvailable) sections.push(crtAvailable);
|
|
4246
|
+
if (serviceId) sections.push([`api/${serviceId}`, clientVersion]);
|
|
4247
|
+
if (node_process.env.AWS_EXECUTION_ENV) sections.push([`exec-env/${node_process.env.AWS_EXECUTION_ENV}`]);
|
|
4248
|
+
const appId = await config?.userAgentAppId?.();
|
|
4249
|
+
return appId ? [...sections, [`app/${appId}`]] : [...sections];
|
|
4250
|
+
};
|
|
4251
|
+
};
|
|
4252
|
+
//#endregion
|
|
4253
|
+
//#region ../../../node_modules/@aws-sdk/util-user-agent-node/dist-es/nodeAppIdConfigOptions.js
|
|
4254
|
+
var UA_APP_ID_ENV_NAME = "AWS_SDK_UA_APP_ID";
|
|
4255
|
+
var UA_APP_ID_INI_NAME_DEPRECATED = "sdk-ua-app-id";
|
|
4256
|
+
var NODE_APP_ID_CONFIG_OPTIONS = {
|
|
4257
|
+
environmentVariableSelector: (env) => env[UA_APP_ID_ENV_NAME],
|
|
4258
|
+
configFileSelector: (profile) => profile["sdk_ua_app_id"] ?? profile[UA_APP_ID_INI_NAME_DEPRECATED],
|
|
4259
|
+
default: void 0
|
|
4260
|
+
};
|
|
4261
|
+
//#endregion
|
|
4262
|
+
//#region ../../../node_modules/@smithy/hash-node/dist-es/index.js
|
|
4263
|
+
var Hash = class {
|
|
4264
|
+
algorithmIdentifier;
|
|
4265
|
+
secret;
|
|
4266
|
+
hash;
|
|
4267
|
+
constructor(algorithmIdentifier, secret) {
|
|
4268
|
+
this.algorithmIdentifier = algorithmIdentifier;
|
|
4269
|
+
this.secret = secret;
|
|
4270
|
+
this.reset();
|
|
4271
|
+
}
|
|
4272
|
+
update(toHash, encoding) {
|
|
4273
|
+
this.hash.update(require_serde.toUint8Array(castSourceData(toHash, encoding)));
|
|
4274
|
+
}
|
|
4275
|
+
digest() {
|
|
4276
|
+
return Promise.resolve(this.hash.digest());
|
|
4277
|
+
}
|
|
4278
|
+
reset() {
|
|
4279
|
+
this.hash = this.secret ? (0, crypto$1.createHmac)(this.algorithmIdentifier, castSourceData(this.secret)) : (0, crypto$1.createHash)(this.algorithmIdentifier);
|
|
4280
|
+
}
|
|
4281
|
+
};
|
|
4282
|
+
function castSourceData(toCast, encoding) {
|
|
4283
|
+
if (buffer.Buffer.isBuffer(toCast)) return toCast;
|
|
4284
|
+
if (typeof toCast === "string") return require_date_utils.fromString(toCast, encoding);
|
|
4285
|
+
if (ArrayBuffer.isView(toCast)) return require_date_utils.fromArrayBuffer(toCast.buffer, toCast.byteOffset, toCast.byteLength);
|
|
4286
|
+
return require_date_utils.fromArrayBuffer(toCast);
|
|
4287
|
+
}
|
|
4288
|
+
//#endregion
|
|
4289
|
+
//#region ../../../node_modules/@smithy/util-body-length-node/dist-es/calculateBodyLength.js
|
|
4290
|
+
var calculateBodyLength = (body) => {
|
|
4291
|
+
if (!body) return 0;
|
|
4292
|
+
if (typeof body === "string") return Buffer.byteLength(body);
|
|
4293
|
+
else if (typeof body.byteLength === "number") return body.byteLength;
|
|
4294
|
+
else if (typeof body.size === "number") return body.size;
|
|
4295
|
+
else if (typeof body.start === "number" && typeof body.end === "number") return body.end + 1 - body.start;
|
|
4296
|
+
else if (body instanceof node_fs.ReadStream) {
|
|
4297
|
+
if (body.path != null) return (0, node_fs.lstatSync)(body.path).size;
|
|
4298
|
+
else if (typeof body.fd === "number") return (0, node_fs.fstatSync)(body.fd).size;
|
|
4299
|
+
}
|
|
4300
|
+
throw new Error(`Body Length computation failed for ${body}`);
|
|
4301
|
+
};
|
|
4302
|
+
var DEFAULTS_MODE_OPTIONS = [
|
|
4303
|
+
"in-region",
|
|
4304
|
+
"cross-region",
|
|
4305
|
+
"mobile",
|
|
4306
|
+
"standard",
|
|
4307
|
+
"legacy"
|
|
4308
|
+
];
|
|
4309
|
+
var IMDS_REGION_PATH = "/latest/meta-data/placement/region";
|
|
4310
|
+
//#endregion
|
|
4311
|
+
//#region ../../../node_modules/@smithy/util-defaults-mode-node/dist-es/defaultsModeConfig.js
|
|
4312
|
+
var AWS_DEFAULTS_MODE_ENV = "AWS_DEFAULTS_MODE";
|
|
4313
|
+
var AWS_DEFAULTS_MODE_CONFIG = "defaults_mode";
|
|
4314
|
+
var NODE_DEFAULTS_MODE_CONFIG_OPTIONS = {
|
|
4315
|
+
environmentVariableSelector: (env) => {
|
|
4316
|
+
return env[AWS_DEFAULTS_MODE_ENV];
|
|
4317
|
+
},
|
|
4318
|
+
configFileSelector: (profile) => {
|
|
4319
|
+
return profile[AWS_DEFAULTS_MODE_CONFIG];
|
|
4320
|
+
},
|
|
4321
|
+
default: "legacy"
|
|
4322
|
+
};
|
|
4323
|
+
//#endregion
|
|
4324
|
+
//#region ../../../node_modules/@smithy/util-defaults-mode-node/dist-es/resolveDefaultsModeConfig.js
|
|
4325
|
+
var resolveDefaultsModeConfig = ({ region = require_configLoader.loadConfig(NODE_REGION_CONFIG_OPTIONS), defaultsMode = require_configLoader.loadConfig(NODE_DEFAULTS_MODE_CONFIG_OPTIONS) } = {}) => require_configLoader.memoize(async () => {
|
|
4326
|
+
const mode = typeof defaultsMode === "function" ? await defaultsMode() : defaultsMode;
|
|
4327
|
+
switch (mode?.toLowerCase()) {
|
|
4328
|
+
case "auto": return resolveNodeDefaultsModeAuto(region);
|
|
4329
|
+
case "in-region":
|
|
4330
|
+
case "cross-region":
|
|
4331
|
+
case "mobile":
|
|
4332
|
+
case "standard":
|
|
4333
|
+
case "legacy": return Promise.resolve(mode?.toLocaleLowerCase());
|
|
4334
|
+
case void 0: return Promise.resolve("legacy");
|
|
4335
|
+
default: throw new Error(`Invalid parameter for "defaultsMode", expect ${DEFAULTS_MODE_OPTIONS.join(", ")}, got ${mode}`);
|
|
4336
|
+
}
|
|
4337
|
+
});
|
|
4338
|
+
var resolveNodeDefaultsModeAuto = async (clientRegion) => {
|
|
4339
|
+
if (clientRegion) {
|
|
4340
|
+
const resolvedRegion = typeof clientRegion === "function" ? await clientRegion() : clientRegion;
|
|
4341
|
+
const inferredRegion = await inferPhysicalRegion();
|
|
4342
|
+
if (!inferredRegion) return "standard";
|
|
4343
|
+
if (resolvedRegion === inferredRegion) return "in-region";
|
|
4344
|
+
else return "cross-region";
|
|
4345
|
+
}
|
|
4346
|
+
return "standard";
|
|
4347
|
+
};
|
|
4348
|
+
var inferPhysicalRegion = async () => {
|
|
4349
|
+
if (process.env["AWS_EXECUTION_ENV"] && (process.env["AWS_REGION"] || process.env["AWS_DEFAULT_REGION"])) return process.env["AWS_REGION"] ?? process.env["AWS_DEFAULT_REGION"];
|
|
4350
|
+
if (!process.env["AWS_EC2_METADATA_DISABLED"]) try {
|
|
4351
|
+
const { getInstanceMetadataEndpoint, httpRequest } = await Promise.resolve().then(() => require("./dist-es-vq3O1QUl.cjs"));
|
|
4352
|
+
return (await httpRequest({
|
|
4353
|
+
...await getInstanceMetadataEndpoint(),
|
|
4354
|
+
path: IMDS_REGION_PATH
|
|
4355
|
+
})).toString();
|
|
4356
|
+
} catch (e) {}
|
|
4357
|
+
};
|
|
4358
|
+
//#endregion
|
|
4359
|
+
//#region ../../../node_modules/@aws-sdk/region-config-resolver/dist-es/extensions/index.js
|
|
4360
|
+
var getAwsRegionExtensionConfiguration = (runtimeConfig) => {
|
|
4361
|
+
return {
|
|
4362
|
+
setRegion(region) {
|
|
4363
|
+
runtimeConfig.region = region;
|
|
4364
|
+
},
|
|
4365
|
+
region() {
|
|
4366
|
+
return runtimeConfig.region;
|
|
4367
|
+
}
|
|
4368
|
+
};
|
|
4369
|
+
};
|
|
4370
|
+
var resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration) => {
|
|
4371
|
+
return { region: awsRegionExtensionConfiguration.region() };
|
|
4372
|
+
};
|
|
4373
|
+
//#endregion
|
|
4374
|
+
Object.defineProperty(exports, "AwsSdkSigV4Signer", {
|
|
4375
|
+
enumerable: true,
|
|
4376
|
+
get: function() {
|
|
4377
|
+
return AwsSdkSigV4Signer;
|
|
4378
|
+
}
|
|
4379
|
+
});
|
|
4380
|
+
Object.defineProperty(exports, "Client", {
|
|
4381
|
+
enumerable: true,
|
|
4382
|
+
get: function() {
|
|
4383
|
+
return Client;
|
|
4384
|
+
}
|
|
4385
|
+
});
|
|
4386
|
+
Object.defineProperty(exports, "Command", {
|
|
4387
|
+
enumerable: true,
|
|
4388
|
+
get: function() {
|
|
4389
|
+
return Command;
|
|
4390
|
+
}
|
|
4391
|
+
});
|
|
4392
|
+
Object.defineProperty(exports, "DEFAULT_RETRY_MODE", {
|
|
4393
|
+
enumerable: true,
|
|
4394
|
+
get: function() {
|
|
4395
|
+
return DEFAULT_RETRY_MODE;
|
|
4396
|
+
}
|
|
4397
|
+
});
|
|
4398
|
+
Object.defineProperty(exports, "DefaultIdentityProviderConfig", {
|
|
4399
|
+
enumerable: true,
|
|
4400
|
+
get: function() {
|
|
4401
|
+
return DefaultIdentityProviderConfig;
|
|
4402
|
+
}
|
|
4403
|
+
});
|
|
4404
|
+
Object.defineProperty(exports, "EndpointCache", {
|
|
4405
|
+
enumerable: true,
|
|
4406
|
+
get: function() {
|
|
4407
|
+
return EndpointCache;
|
|
4408
|
+
}
|
|
4409
|
+
});
|
|
4410
|
+
Object.defineProperty(exports, "FromStringShapeDeserializer", {
|
|
4411
|
+
enumerable: true,
|
|
4412
|
+
get: function() {
|
|
4413
|
+
return FromStringShapeDeserializer;
|
|
4414
|
+
}
|
|
4415
|
+
});
|
|
4416
|
+
Object.defineProperty(exports, "Hash", {
|
|
4417
|
+
enumerable: true,
|
|
4418
|
+
get: function() {
|
|
4419
|
+
return Hash;
|
|
4420
|
+
}
|
|
4421
|
+
});
|
|
4422
|
+
Object.defineProperty(exports, "HttpProtocol", {
|
|
4423
|
+
enumerable: true,
|
|
4424
|
+
get: function() {
|
|
4425
|
+
return HttpProtocol;
|
|
4426
|
+
}
|
|
4427
|
+
});
|
|
4428
|
+
Object.defineProperty(exports, "HttpRequest", {
|
|
4429
|
+
enumerable: true,
|
|
4430
|
+
get: function() {
|
|
4431
|
+
return HttpRequest;
|
|
4432
|
+
}
|
|
4433
|
+
});
|
|
4434
|
+
Object.defineProperty(exports, "NODE_APP_ID_CONFIG_OPTIONS", {
|
|
4435
|
+
enumerable: true,
|
|
4436
|
+
get: function() {
|
|
4437
|
+
return NODE_APP_ID_CONFIG_OPTIONS;
|
|
4438
|
+
}
|
|
4439
|
+
});
|
|
4440
|
+
Object.defineProperty(exports, "NODE_AUTH_SCHEME_PREFERENCE_OPTIONS", {
|
|
4441
|
+
enumerable: true,
|
|
4442
|
+
get: function() {
|
|
4443
|
+
return NODE_AUTH_SCHEME_PREFERENCE_OPTIONS;
|
|
4444
|
+
}
|
|
4445
|
+
});
|
|
4446
|
+
Object.defineProperty(exports, "NODE_MAX_ATTEMPT_CONFIG_OPTIONS", {
|
|
4447
|
+
enumerable: true,
|
|
4448
|
+
get: function() {
|
|
4449
|
+
return NODE_MAX_ATTEMPT_CONFIG_OPTIONS;
|
|
4450
|
+
}
|
|
4451
|
+
});
|
|
4452
|
+
Object.defineProperty(exports, "NODE_REGION_CONFIG_FILE_OPTIONS", {
|
|
4453
|
+
enumerable: true,
|
|
4454
|
+
get: function() {
|
|
4455
|
+
return NODE_REGION_CONFIG_FILE_OPTIONS;
|
|
4456
|
+
}
|
|
4457
|
+
});
|
|
4458
|
+
Object.defineProperty(exports, "NODE_REGION_CONFIG_OPTIONS", {
|
|
4459
|
+
enumerable: true,
|
|
4460
|
+
get: function() {
|
|
4461
|
+
return NODE_REGION_CONFIG_OPTIONS;
|
|
4462
|
+
}
|
|
4463
|
+
});
|
|
4464
|
+
Object.defineProperty(exports, "NODE_RETRY_MODE_CONFIG_OPTIONS", {
|
|
4465
|
+
enumerable: true,
|
|
4466
|
+
get: function() {
|
|
4467
|
+
return NODE_RETRY_MODE_CONFIG_OPTIONS;
|
|
4468
|
+
}
|
|
4469
|
+
});
|
|
4470
|
+
Object.defineProperty(exports, "NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS", {
|
|
4471
|
+
enumerable: true,
|
|
4472
|
+
get: function() {
|
|
4473
|
+
return NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS;
|
|
4474
|
+
}
|
|
4475
|
+
});
|
|
4476
|
+
Object.defineProperty(exports, "NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS", {
|
|
4477
|
+
enumerable: true,
|
|
4478
|
+
get: function() {
|
|
4479
|
+
return NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS;
|
|
4480
|
+
}
|
|
4481
|
+
});
|
|
4482
|
+
Object.defineProperty(exports, "NoOpLogger", {
|
|
4483
|
+
enumerable: true,
|
|
4484
|
+
get: function() {
|
|
4485
|
+
return NoOpLogger;
|
|
4486
|
+
}
|
|
4487
|
+
});
|
|
4488
|
+
Object.defineProperty(exports, "NormalizedSchema", {
|
|
4489
|
+
enumerable: true,
|
|
4490
|
+
get: function() {
|
|
4491
|
+
return NormalizedSchema;
|
|
4492
|
+
}
|
|
4493
|
+
});
|
|
4494
|
+
Object.defineProperty(exports, "ProtocolLib", {
|
|
4495
|
+
enumerable: true,
|
|
4496
|
+
get: function() {
|
|
4497
|
+
return ProtocolLib;
|
|
4498
|
+
}
|
|
4499
|
+
});
|
|
4500
|
+
Object.defineProperty(exports, "Retry", {
|
|
4501
|
+
enumerable: true,
|
|
4502
|
+
get: function() {
|
|
4503
|
+
return Retry;
|
|
4504
|
+
}
|
|
4505
|
+
});
|
|
4506
|
+
Object.defineProperty(exports, "SelectorType", {
|
|
4507
|
+
enumerable: true,
|
|
4508
|
+
get: function() {
|
|
4509
|
+
return SelectorType;
|
|
4510
|
+
}
|
|
4511
|
+
});
|
|
4512
|
+
Object.defineProperty(exports, "SerdeContext", {
|
|
4513
|
+
enumerable: true,
|
|
4514
|
+
get: function() {
|
|
4515
|
+
return SerdeContext;
|
|
4516
|
+
}
|
|
4517
|
+
});
|
|
4518
|
+
Object.defineProperty(exports, "SerdeContextConfig", {
|
|
4519
|
+
enumerable: true,
|
|
4520
|
+
get: function() {
|
|
4521
|
+
return SerdeContextConfig;
|
|
4522
|
+
}
|
|
4523
|
+
});
|
|
4524
|
+
Object.defineProperty(exports, "ServiceException", {
|
|
4525
|
+
enumerable: true,
|
|
4526
|
+
get: function() {
|
|
4527
|
+
return ServiceException;
|
|
4528
|
+
}
|
|
4529
|
+
});
|
|
4530
|
+
Object.defineProperty(exports, "SignatureV4", {
|
|
4531
|
+
enumerable: true,
|
|
4532
|
+
get: function() {
|
|
4533
|
+
return SignatureV4;
|
|
4534
|
+
}
|
|
4535
|
+
});
|
|
4536
|
+
Object.defineProperty(exports, "StandardRetryStrategy", {
|
|
4537
|
+
enumerable: true,
|
|
4538
|
+
get: function() {
|
|
4539
|
+
return StandardRetryStrategy;
|
|
4540
|
+
}
|
|
4541
|
+
});
|
|
4542
|
+
Object.defineProperty(exports, "TypeRegistry", {
|
|
4543
|
+
enumerable: true,
|
|
4544
|
+
get: function() {
|
|
4545
|
+
return TypeRegistry;
|
|
4546
|
+
}
|
|
4547
|
+
});
|
|
4548
|
+
Object.defineProperty(exports, "UnionSerde", {
|
|
4549
|
+
enumerable: true,
|
|
4550
|
+
get: function() {
|
|
4551
|
+
return UnionSerde;
|
|
4552
|
+
}
|
|
4553
|
+
});
|
|
4554
|
+
Object.defineProperty(exports, "awsEndpointFunctions", {
|
|
4555
|
+
enumerable: true,
|
|
4556
|
+
get: function() {
|
|
4557
|
+
return awsEndpointFunctions;
|
|
4558
|
+
}
|
|
4559
|
+
});
|
|
4560
|
+
Object.defineProperty(exports, "booleanSelector", {
|
|
4561
|
+
enumerable: true,
|
|
4562
|
+
get: function() {
|
|
4563
|
+
return booleanSelector;
|
|
4564
|
+
}
|
|
4565
|
+
});
|
|
4566
|
+
Object.defineProperty(exports, "calculateBodyLength", {
|
|
4567
|
+
enumerable: true,
|
|
4568
|
+
get: function() {
|
|
4569
|
+
return calculateBodyLength;
|
|
4570
|
+
}
|
|
4571
|
+
});
|
|
4572
|
+
Object.defineProperty(exports, "collectBody", {
|
|
4573
|
+
enumerable: true,
|
|
4574
|
+
get: function() {
|
|
4575
|
+
return collectBody;
|
|
4576
|
+
}
|
|
4577
|
+
});
|
|
4578
|
+
Object.defineProperty(exports, "createDefaultUserAgentProvider", {
|
|
4579
|
+
enumerable: true,
|
|
4580
|
+
get: function() {
|
|
4581
|
+
return createDefaultUserAgentProvider;
|
|
4582
|
+
}
|
|
4583
|
+
});
|
|
4584
|
+
Object.defineProperty(exports, "customEndpointFunctions", {
|
|
4585
|
+
enumerable: true,
|
|
4586
|
+
get: function() {
|
|
4587
|
+
return customEndpointFunctions;
|
|
4588
|
+
}
|
|
4589
|
+
});
|
|
4590
|
+
Object.defineProperty(exports, "deref", {
|
|
4591
|
+
enumerable: true,
|
|
4592
|
+
get: function() {
|
|
4593
|
+
return deref;
|
|
4594
|
+
}
|
|
4595
|
+
});
|
|
4596
|
+
Object.defineProperty(exports, "determineTimestampFormat", {
|
|
4597
|
+
enumerable: true,
|
|
4598
|
+
get: function() {
|
|
4599
|
+
return determineTimestampFormat;
|
|
4600
|
+
}
|
|
4601
|
+
});
|
|
4602
|
+
Object.defineProperty(exports, "emitWarningIfUnsupportedVersion", {
|
|
4603
|
+
enumerable: true,
|
|
4604
|
+
get: function() {
|
|
4605
|
+
return emitWarningIfUnsupportedVersion;
|
|
4606
|
+
}
|
|
4607
|
+
});
|
|
4608
|
+
Object.defineProperty(exports, "emitWarningIfUnsupportedVersion$1", {
|
|
4609
|
+
enumerable: true,
|
|
4610
|
+
get: function() {
|
|
4611
|
+
return emitWarningIfUnsupportedVersion$1;
|
|
4612
|
+
}
|
|
4613
|
+
});
|
|
4614
|
+
Object.defineProperty(exports, "extendedEncodeURIComponent", {
|
|
4615
|
+
enumerable: true,
|
|
4616
|
+
get: function() {
|
|
4617
|
+
return extendedEncodeURIComponent;
|
|
4618
|
+
}
|
|
4619
|
+
});
|
|
4620
|
+
Object.defineProperty(exports, "getAwsRegionExtensionConfiguration", {
|
|
4621
|
+
enumerable: true,
|
|
4622
|
+
get: function() {
|
|
4623
|
+
return getAwsRegionExtensionConfiguration;
|
|
4624
|
+
}
|
|
4625
|
+
});
|
|
4626
|
+
Object.defineProperty(exports, "getContentLengthPlugin", {
|
|
4627
|
+
enumerable: true,
|
|
4628
|
+
get: function() {
|
|
4629
|
+
return getContentLengthPlugin;
|
|
4630
|
+
}
|
|
4631
|
+
});
|
|
4632
|
+
Object.defineProperty(exports, "getDefaultExtensionConfiguration", {
|
|
4633
|
+
enumerable: true,
|
|
4634
|
+
get: function() {
|
|
4635
|
+
return getDefaultExtensionConfiguration;
|
|
4636
|
+
}
|
|
4637
|
+
});
|
|
4638
|
+
Object.defineProperty(exports, "getEndpointPlugin", {
|
|
4639
|
+
enumerable: true,
|
|
4640
|
+
get: function() {
|
|
4641
|
+
return getEndpointPlugin;
|
|
4642
|
+
}
|
|
4643
|
+
});
|
|
4644
|
+
Object.defineProperty(exports, "getHostHeaderPlugin", {
|
|
4645
|
+
enumerable: true,
|
|
4646
|
+
get: function() {
|
|
4647
|
+
return getHostHeaderPlugin;
|
|
4648
|
+
}
|
|
4649
|
+
});
|
|
4650
|
+
Object.defineProperty(exports, "getHttpAuthSchemeEndpointRuleSetPlugin", {
|
|
4651
|
+
enumerable: true,
|
|
4652
|
+
get: function() {
|
|
4653
|
+
return getHttpAuthSchemeEndpointRuleSetPlugin;
|
|
4654
|
+
}
|
|
4655
|
+
});
|
|
4656
|
+
Object.defineProperty(exports, "getHttpHandlerExtensionConfiguration", {
|
|
4657
|
+
enumerable: true,
|
|
4658
|
+
get: function() {
|
|
4659
|
+
return getHttpHandlerExtensionConfiguration;
|
|
4660
|
+
}
|
|
4661
|
+
});
|
|
4662
|
+
Object.defineProperty(exports, "getHttpSigningPlugin", {
|
|
4663
|
+
enumerable: true,
|
|
4664
|
+
get: function() {
|
|
4665
|
+
return getHttpSigningPlugin;
|
|
4666
|
+
}
|
|
4667
|
+
});
|
|
4668
|
+
Object.defineProperty(exports, "getLoggerPlugin", {
|
|
4669
|
+
enumerable: true,
|
|
4670
|
+
get: function() {
|
|
4671
|
+
return getLoggerPlugin;
|
|
4672
|
+
}
|
|
4673
|
+
});
|
|
4674
|
+
Object.defineProperty(exports, "getRecursionDetectionPlugin", {
|
|
4675
|
+
enumerable: true,
|
|
4676
|
+
get: function() {
|
|
4677
|
+
return getRecursionDetectionPlugin;
|
|
4678
|
+
}
|
|
4679
|
+
});
|
|
4680
|
+
Object.defineProperty(exports, "getRetryPlugin", {
|
|
4681
|
+
enumerable: true,
|
|
4682
|
+
get: function() {
|
|
4683
|
+
return getRetryPlugin;
|
|
4684
|
+
}
|
|
4685
|
+
});
|
|
4686
|
+
Object.defineProperty(exports, "getSchemaSerdePlugin", {
|
|
4687
|
+
enumerable: true,
|
|
4688
|
+
get: function() {
|
|
4689
|
+
return getSchemaSerdePlugin;
|
|
4690
|
+
}
|
|
4691
|
+
});
|
|
4692
|
+
Object.defineProperty(exports, "getSkewCorrectedDate", {
|
|
4693
|
+
enumerable: true,
|
|
4694
|
+
get: function() {
|
|
4695
|
+
return getSkewCorrectedDate;
|
|
4696
|
+
}
|
|
4697
|
+
});
|
|
4698
|
+
Object.defineProperty(exports, "getSmithyContext", {
|
|
4699
|
+
enumerable: true,
|
|
4700
|
+
get: function() {
|
|
4701
|
+
return getSmithyContext;
|
|
4702
|
+
}
|
|
4703
|
+
});
|
|
4704
|
+
Object.defineProperty(exports, "getUserAgentPlugin", {
|
|
4705
|
+
enumerable: true,
|
|
4706
|
+
get: function() {
|
|
4707
|
+
return getUserAgentPlugin;
|
|
4708
|
+
}
|
|
4709
|
+
});
|
|
4710
|
+
Object.defineProperty(exports, "httpSigningMiddlewareOptions", {
|
|
4711
|
+
enumerable: true,
|
|
4712
|
+
get: function() {
|
|
4713
|
+
return httpSigningMiddlewareOptions;
|
|
4714
|
+
}
|
|
4715
|
+
});
|
|
4716
|
+
Object.defineProperty(exports, "loadConfigsForDefaultMode", {
|
|
4717
|
+
enumerable: true,
|
|
4718
|
+
get: function() {
|
|
4719
|
+
return loadConfigsForDefaultMode;
|
|
4720
|
+
}
|
|
4721
|
+
});
|
|
4722
|
+
Object.defineProperty(exports, "normalizeProvider", {
|
|
4723
|
+
enumerable: true,
|
|
4724
|
+
get: function() {
|
|
4725
|
+
return normalizeProvider;
|
|
4726
|
+
}
|
|
4727
|
+
});
|
|
4728
|
+
Object.defineProperty(exports, "normalizeProvider$1", {
|
|
4729
|
+
enumerable: true,
|
|
4730
|
+
get: function() {
|
|
4731
|
+
return normalizeProvider$1;
|
|
4732
|
+
}
|
|
4733
|
+
});
|
|
4734
|
+
Object.defineProperty(exports, "resolveAwsRegionExtensionConfiguration", {
|
|
4735
|
+
enumerable: true,
|
|
4736
|
+
get: function() {
|
|
4737
|
+
return resolveAwsRegionExtensionConfiguration;
|
|
4738
|
+
}
|
|
4739
|
+
});
|
|
4740
|
+
Object.defineProperty(exports, "resolveAwsSdkSigV4Config", {
|
|
4741
|
+
enumerable: true,
|
|
4742
|
+
get: function() {
|
|
4743
|
+
return resolveAwsSdkSigV4Config;
|
|
4744
|
+
}
|
|
4745
|
+
});
|
|
4746
|
+
Object.defineProperty(exports, "resolveDefaultRuntimeConfig", {
|
|
4747
|
+
enumerable: true,
|
|
4748
|
+
get: function() {
|
|
4749
|
+
return resolveDefaultRuntimeConfig;
|
|
4750
|
+
}
|
|
4751
|
+
});
|
|
4752
|
+
Object.defineProperty(exports, "resolveDefaultsModeConfig", {
|
|
4753
|
+
enumerable: true,
|
|
4754
|
+
get: function() {
|
|
4755
|
+
return resolveDefaultsModeConfig;
|
|
4756
|
+
}
|
|
4757
|
+
});
|
|
4758
|
+
Object.defineProperty(exports, "resolveEndpoint", {
|
|
4759
|
+
enumerable: true,
|
|
4760
|
+
get: function() {
|
|
4761
|
+
return resolveEndpoint;
|
|
4762
|
+
}
|
|
4763
|
+
});
|
|
4764
|
+
Object.defineProperty(exports, "resolveEndpointConfig", {
|
|
4765
|
+
enumerable: true,
|
|
4766
|
+
get: function() {
|
|
4767
|
+
return resolveEndpointConfig;
|
|
4768
|
+
}
|
|
4769
|
+
});
|
|
4770
|
+
Object.defineProperty(exports, "resolveHostHeaderConfig", {
|
|
4771
|
+
enumerable: true,
|
|
4772
|
+
get: function() {
|
|
4773
|
+
return resolveHostHeaderConfig;
|
|
4774
|
+
}
|
|
4775
|
+
});
|
|
4776
|
+
Object.defineProperty(exports, "resolveHttpHandlerRuntimeConfig", {
|
|
4777
|
+
enumerable: true,
|
|
4778
|
+
get: function() {
|
|
4779
|
+
return resolveHttpHandlerRuntimeConfig;
|
|
4780
|
+
}
|
|
4781
|
+
});
|
|
4782
|
+
Object.defineProperty(exports, "resolveParams", {
|
|
4783
|
+
enumerable: true,
|
|
4784
|
+
get: function() {
|
|
4785
|
+
return resolveParams;
|
|
4786
|
+
}
|
|
4787
|
+
});
|
|
4788
|
+
Object.defineProperty(exports, "resolveRegionConfig", {
|
|
4789
|
+
enumerable: true,
|
|
4790
|
+
get: function() {
|
|
4791
|
+
return resolveRegionConfig;
|
|
4792
|
+
}
|
|
4793
|
+
});
|
|
4794
|
+
Object.defineProperty(exports, "resolveRetryConfig", {
|
|
4795
|
+
enumerable: true,
|
|
4796
|
+
get: function() {
|
|
4797
|
+
return resolveRetryConfig;
|
|
4798
|
+
}
|
|
4799
|
+
});
|
|
4800
|
+
Object.defineProperty(exports, "resolveUserAgentConfig", {
|
|
4801
|
+
enumerable: true,
|
|
4802
|
+
get: function() {
|
|
4803
|
+
return resolveUserAgentConfig;
|
|
4804
|
+
}
|
|
4805
|
+
});
|
|
4806
|
+
Object.defineProperty(exports, "setFeature", {
|
|
4807
|
+
enumerable: true,
|
|
4808
|
+
get: function() {
|
|
4809
|
+
return setFeature$1;
|
|
4810
|
+
}
|
|
4811
|
+
});
|
|
4812
|
+
Object.defineProperty(exports, "translateTraits", {
|
|
4813
|
+
enumerable: true,
|
|
4814
|
+
get: function() {
|
|
4815
|
+
return translateTraits;
|
|
4816
|
+
}
|
|
4817
|
+
});
|
|
4818
|
+
Object.defineProperty(exports, "validateSigningProperties", {
|
|
4819
|
+
enumerable: true,
|
|
4820
|
+
get: function() {
|
|
4821
|
+
return validateSigningProperties;
|
|
4822
|
+
}
|
|
4823
|
+
});
|