@monolayer/sdk 1.2.5 → 1.3.0-canary.2

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.
Files changed (47) hide show
  1. package/dist/bin/chunk-2DM36AIF.js +60 -0
  2. package/dist/bin/chunk-3TV5KLB7.js +105 -0
  3. package/dist/bin/chunk-54HDPH52.js +116 -0
  4. package/dist/bin/chunk-AKHG66MJ.js +2359 -0
  5. package/dist/bin/chunk-ASIK3ESJ.js +37 -0
  6. package/dist/bin/chunk-AV7FB56K.js +14 -0
  7. package/dist/bin/chunk-D6MRFOU6.js +62 -0
  8. package/dist/bin/chunk-DQ2PXUF5.js +44 -0
  9. package/dist/bin/chunk-GE4ESXBP.js +57 -0
  10. package/dist/bin/chunk-K4XCYO2X.js +1637 -0
  11. package/dist/bin/chunk-KHQQRHZY.js +969 -0
  12. package/dist/bin/chunk-KSHJCBUY.js +938 -0
  13. package/dist/bin/chunk-KW25ZB6Z.js +14 -0
  14. package/dist/bin/chunk-SYAMBCRY.js +54 -0
  15. package/dist/bin/chunk-T4MZMT2A.js +122 -0
  16. package/dist/bin/chunk-U43L2J36.js +1875 -0
  17. package/dist/bin/chunk-UKX3KEC2.js +37 -0
  18. package/dist/bin/chunk-X7GJVU6X.js +182 -0
  19. package/dist/bin/cli.js +23 -61
  20. package/dist/bin/dist-es-4LCK4BMD.js +81 -0
  21. package/dist/bin/dist-es-4ULGGWP4.js +361 -0
  22. package/dist/bin/dist-es-7BYCFULM.js +7 -0
  23. package/dist/bin/dist-es-A2JHLMIV.js +154 -0
  24. package/dist/bin/dist-es-AWY666YH.js +292 -0
  25. package/dist/bin/dist-es-KUMQWKJB.js +194 -0
  26. package/dist/bin/dist-es-TNZXIBKF.js +292 -0
  27. package/dist/bin/dist-es-TV7F3ZAE.js +7 -0
  28. package/dist/bin/dist-es-XD3WAN5D.js +154 -0
  29. package/dist/bin/dist-es-YGJKPYIO.js +81 -0
  30. package/dist/bin/dist-es-YYROUSP5.js +62 -0
  31. package/dist/bin/dist-es-ZOY57CKU.js +62 -0
  32. package/dist/bin/dist-es-ZVXNFAFI.js +194 -0
  33. package/dist/bin/esm-ID5USS7G.js +4773 -0
  34. package/dist/bin/loadSso-55OGDGPY.js +484 -0
  35. package/dist/bin/loadSso-UYOIOSOA.js +480 -0
  36. package/dist/bin/sso-oidc-BHBT6MBW.js +732 -0
  37. package/dist/bin/sso-oidc-WOAY6JEM.js +733 -0
  38. package/dist/bin/sts-22SIO74C.js +1109 -0
  39. package/dist/bin/sts-SCV3QXFF.js +1064 -0
  40. package/dist/bin/sts-YWYJ3LVJ.js +1064 -0
  41. package/dist/cjs/workloads/stateless/broadcast/client/provider.d.ts +3 -1
  42. package/dist/cjs/workloads/stateless/broadcast/client/provider.js +16 -5
  43. package/dist/cjs/workloads/stateless/task/dispatcher.js +31 -0
  44. package/dist/esm/workloads/stateless/broadcast/client/provider.d.ts +3 -1
  45. package/dist/esm/workloads/stateless/broadcast/client/provider.js +16 -5
  46. package/dist/esm/workloads/stateless/task/dispatcher.js +8 -0
  47. package/package.json +1 -1
@@ -0,0 +1,1109 @@
1
+ import { createRequire } from 'module';
2
+ import { package_default } from './chunk-T4MZMT2A.js';
3
+ import { awsEndpointFunctions, collectBodyString, resolveUserAgentConfig, resolveHostHeaderConfig, getUserAgentPlugin, getHostHeaderPlugin, getLoggerPlugin, getRecursionDetectionPlugin, emitWarningIfUnsupportedVersion as emitWarningIfUnsupportedVersion$1, AwsSdkSigV4Signer, NODE_APP_ID_CONFIG_OPTIONS, createDefaultUserAgentProvider, NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, resolveAwsSdkSigV4Config, getAwsRegionExtensionConfiguration, resolveAwsRegionExtensionConfiguration } from './chunk-KHQQRHZY.js';
4
+ import { setCredentialFeature } from './chunk-KW25ZB6Z.js';
5
+ import { require_fxp } from './chunk-K4XCYO2X.js';
6
+ import { EndpointCache, customEndpointFunctions, getSerdePlugin, getEndpointPlugin, resolveRetryConfig, resolveRegionConfig, resolveEndpointConfig, getRetryPlugin, getContentLengthPlugin, getHttpAuthSchemeEndpointRuleSetPlugin, DefaultIdentityProviderConfig, getHttpSigningPlugin, resolveDefaultsModeConfig, NoAuthSigner, calculateBodyLength, NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, Hash, DEFAULT_RETRY_MODE, NODE_RETRY_MODE_CONFIG_OPTIONS, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, NODE_MAX_ATTEMPT_CONFIG_OPTIONS, normalizeProvider, getSmithyContext, resolveEndpoint } from './chunk-AKHG66MJ.js';
7
+ import { loadConfig, parseUrl } from './chunk-3TV5KLB7.js';
8
+ import { withBaseException, Command, SENSITIVE_STRING, createAggregatedClient, ServiceException, extendedEncodeURIComponent, HttpRequest, getValueFromTextNode, strictParseInt32, expectString, Client, decorateServiceException, expectNonNull, parseRfc3339DateTimeWithOffset, emitWarningIfUnsupportedVersion, streamCollector, NodeHttpHandler, getDefaultExtensionConfiguration, getHttpHandlerExtensionConfiguration, resolveDefaultRuntimeConfig, resolveHttpHandlerRuntimeConfig, toUtf8, fromUtf8, NoOpLogger, toBase64, fromBase64, loadConfigsForDefaultMode } from './chunk-U43L2J36.js';
9
+ export { Command as $Command, Client as __Client } from './chunk-U43L2J36.js';
10
+ import './chunk-X7GJVU6X.js';
11
+ import './chunk-D6MRFOU6.js';
12
+ import './chunk-54HDPH52.js';
13
+ import { __toESM } from './chunk-DQ2PXUF5.js';
14
+
15
+ createRequire(import.meta.url);
16
+
17
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/core/dist-es/submodules/protocols/xml/parseXmlBody.js
18
+ var import_fast_xml_parser = __toESM(require_fxp());
19
+ var parseXmlBody = (streamBody, context) => collectBodyString(streamBody, context).then((encoded) => {
20
+ if (encoded.length) {
21
+ const parser = new import_fast_xml_parser.XMLParser({
22
+ attributeNamePrefix: "",
23
+ htmlEntities: true,
24
+ ignoreAttributes: false,
25
+ ignoreDeclaration: true,
26
+ parseTagValue: false,
27
+ trimValues: false,
28
+ tagValueProcessor: (_2, val) => val.trim() === "" && val.includes("\n") ? "" : void 0
29
+ });
30
+ parser.addEntity("#xD", "\r");
31
+ parser.addEntity("#10", "\n");
32
+ let parsedObj;
33
+ try {
34
+ parsedObj = parser.parse(encoded, true);
35
+ } catch (e2) {
36
+ if (e2 && typeof e2 === "object") {
37
+ Object.defineProperty(e2, "$responseBodyText", {
38
+ value: encoded
39
+ });
40
+ }
41
+ throw e2;
42
+ }
43
+ const textNodeName = "#text";
44
+ const key = Object.keys(parsedObj)[0];
45
+ const parsedObjToReturn = parsedObj[key];
46
+ if (parsedObjToReturn[textNodeName]) {
47
+ parsedObjToReturn[key] = parsedObjToReturn[textNodeName];
48
+ delete parsedObjToReturn[textNodeName];
49
+ }
50
+ return getValueFromTextNode(parsedObjToReturn);
51
+ }
52
+ return {};
53
+ });
54
+ var parseXmlErrorBody = async (errorBody, context) => {
55
+ const value = await parseXmlBody(errorBody, context);
56
+ if (value.Error) {
57
+ value.Error.message = value.Error.message ?? value.Error.Message;
58
+ }
59
+ return value;
60
+ };
61
+
62
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js
63
+ var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
64
+ return {
65
+ operation: getSmithyContext(context).operation,
66
+ region: await normalizeProvider(config.region)() || (() => {
67
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
68
+ })()
69
+ };
70
+ };
71
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
72
+ return {
73
+ schemeId: "aws.auth#sigv4",
74
+ signingProperties: {
75
+ name: "sts",
76
+ region: authParameters.region
77
+ },
78
+ propertiesExtractor: (config, context) => ({
79
+ signingProperties: {
80
+ config,
81
+ context
82
+ }
83
+ })
84
+ };
85
+ }
86
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
87
+ return {
88
+ schemeId: "smithy.api#noAuth"
89
+ };
90
+ }
91
+ var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
92
+ const options = [];
93
+ switch (authParameters.operation) {
94
+ case "AssumeRoleWithWebIdentity": {
95
+ options.push(createSmithyApiNoAuthHttpAuthOption());
96
+ break;
97
+ }
98
+ default: {
99
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
100
+ }
101
+ }
102
+ return options;
103
+ };
104
+ var resolveStsAuthConfig = (input) => Object.assign(input, {
105
+ stsClientCtor: STSClient
106
+ });
107
+ var resolveHttpAuthSchemeConfig = (config) => {
108
+ const config_0 = resolveStsAuthConfig(config);
109
+ const config_1 = resolveAwsSdkSigV4Config(config_0);
110
+ return Object.assign(config_1, {
111
+ authSchemePreference: normalizeProvider(config.authSchemePreference ?? [])
112
+ });
113
+ };
114
+
115
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js
116
+ var resolveClientEndpointParameters = (options) => {
117
+ return Object.assign(options, {
118
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
119
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
120
+ useGlobalEndpoint: options.useGlobalEndpoint ?? false,
121
+ defaultSigningName: "sts"
122
+ });
123
+ };
124
+ var commonParams = {
125
+ UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
126
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
127
+ Endpoint: { type: "builtInParams", name: "endpoint" },
128
+ Region: { type: "builtInParams", name: "region" },
129
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
130
+ };
131
+
132
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js
133
+ var F = "required";
134
+ var G = "type";
135
+ var H = "fn";
136
+ var I = "argv";
137
+ var J = "ref";
138
+ var a = false;
139
+ var b = true;
140
+ var c = "booleanEquals";
141
+ var d = "stringEquals";
142
+ var e = "sigv4";
143
+ var f = "sts";
144
+ var g = "us-east-1";
145
+ var h = "endpoint";
146
+ var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
147
+ var j = "tree";
148
+ var k = "error";
149
+ var l = "getAttr";
150
+ var m = { [F]: false, [G]: "String" };
151
+ var n = { [F]: true, "default": false, [G]: "Boolean" };
152
+ var o = { [J]: "Endpoint" };
153
+ var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
154
+ var q = { [J]: "Region" };
155
+ var r = { [H]: "aws.partition", [I]: [q], "assign": "PartitionResult" };
156
+ var s = { [J]: "UseFIPS" };
157
+ var t = { [J]: "UseDualStack" };
158
+ var u = { "url": "https://sts.amazonaws.com", "properties": { "authSchemes": [{ "name": e, "signingName": f, "signingRegion": g }] }, "headers": {} };
159
+ var v = {};
160
+ var w = { "conditions": [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h };
161
+ var x = { [H]: c, [I]: [s, true] };
162
+ var y = { [H]: c, [I]: [t, true] };
163
+ var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
164
+ var A = { [J]: "PartitionResult" };
165
+ var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] };
166
+ var C = [{ [H]: "isSet", [I]: [o] }];
167
+ var D = [x];
168
+ var E = [y];
169
+ var _data = { version: "1.0", parameters: { Region: m, UseDualStack: n, UseFIPS: n, Endpoint: m, UseGlobalEndpoint: n }, rules: [{ conditions: [{ [H]: c, [I]: [{ [J]: "UseGlobalEndpoint" }, b] }, { [H]: "not", [I]: C }, p, r, { [H]: c, [I]: [s, a] }, { [H]: c, [I]: [t, a] }], rules: [{ conditions: [{ [H]: d, [I]: [q, "ap-northeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-south-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "ap-southeast-2"] }], endpoint: u, [G]: h }, w, { conditions: [{ [H]: d, [I]: [q, "ca-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-central-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-north-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "eu-west-3"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "sa-east-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, g] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-east-2"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-1"] }], endpoint: u, [G]: h }, { conditions: [{ [H]: d, [I]: [q, "us-west-2"] }], endpoint: u, [G]: h }, { endpoint: { url: i, properties: { authSchemes: [{ name: e, signingName: f, signingRegion: "{Region}" }] }, headers: v }, [G]: h }], [G]: j }, { conditions: C, rules: [{ conditions: D, error: "Invalid Configuration: FIPS and custom endpoint are not supported", [G]: k }, { conditions: E, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", [G]: k }, { endpoint: { url: o, properties: v, headers: v }, [G]: h }], [G]: j }, { conditions: [p], rules: [{ conditions: [r], rules: [{ conditions: [x, y], rules: [{ conditions: [{ [H]: c, [I]: [b, z] }, B], rules: [{ endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", [G]: k }], [G]: j }, { conditions: D, rules: [{ conditions: [{ [H]: c, [I]: [z, b] }], rules: [{ conditions: [{ [H]: d, [I]: [{ [H]: l, [I]: [A, "name"] }, "aws-us-gov"] }], endpoint: { url: "https://sts.{Region}.amazonaws.com", properties: v, headers: v }, [G]: h }, { endpoint: { url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "FIPS is enabled but this partition does not support FIPS", [G]: k }], [G]: j }, { conditions: E, rules: [{ conditions: [B], rules: [{ endpoint: { url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: v, headers: v }, [G]: h }], [G]: j }, { error: "DualStack is enabled but this partition does not support DualStack", [G]: k }], [G]: j }, w, { endpoint: { url: i, properties: v, headers: v }, [G]: h }], [G]: j }], [G]: j }, { error: "Invalid Configuration: Missing Region", [G]: k }] };
170
+ var ruleSet = _data;
171
+
172
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js
173
+ var cache = new EndpointCache({
174
+ size: 50,
175
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
176
+ });
177
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
178
+ return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
179
+ endpointParams,
180
+ logger: context.logger
181
+ }));
182
+ };
183
+ customEndpointFunctions.aws = awsEndpointFunctions;
184
+
185
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js
186
+ var getRuntimeConfig = (config) => {
187
+ return {
188
+ apiVersion: "2011-06-15",
189
+ base64Decoder: config?.base64Decoder ?? fromBase64,
190
+ base64Encoder: config?.base64Encoder ?? toBase64,
191
+ disableHostPrefix: config?.disableHostPrefix ?? false,
192
+ endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
193
+ extensions: config?.extensions ?? [],
194
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
195
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
196
+ {
197
+ schemeId: "aws.auth#sigv4",
198
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
199
+ signer: new AwsSdkSigV4Signer()
200
+ },
201
+ {
202
+ schemeId: "smithy.api#noAuth",
203
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
204
+ signer: new NoAuthSigner()
205
+ }
206
+ ],
207
+ logger: config?.logger ?? new NoOpLogger(),
208
+ serviceId: config?.serviceId ?? "STS",
209
+ urlParser: config?.urlParser ?? parseUrl,
210
+ utf8Decoder: config?.utf8Decoder ?? fromUtf8,
211
+ utf8Encoder: config?.utf8Encoder ?? toUtf8
212
+ };
213
+ };
214
+
215
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js
216
+ var getRuntimeConfig2 = (config) => {
217
+ emitWarningIfUnsupportedVersion(process.version);
218
+ const defaultsMode = resolveDefaultsModeConfig(config);
219
+ const defaultConfigProvider = () => defaultsMode().then(loadConfigsForDefaultMode);
220
+ const clientSharedValues = getRuntimeConfig(config);
221
+ emitWarningIfUnsupportedVersion$1(process.version);
222
+ const loaderConfig = {
223
+ profile: config?.profile,
224
+ logger: clientSharedValues.logger
225
+ };
226
+ return {
227
+ ...clientSharedValues,
228
+ ...config,
229
+ runtime: "node",
230
+ defaultsMode,
231
+ authSchemePreference: config?.authSchemePreference ?? loadConfig(NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
232
+ bodyLengthChecker: config?.bodyLengthChecker ?? calculateBodyLength,
233
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? createDefaultUserAgentProvider({ serviceId: clientSharedValues.serviceId, clientVersion: package_default.version }),
234
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
235
+ {
236
+ schemeId: "aws.auth#sigv4",
237
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
238
+ signer: new AwsSdkSigV4Signer()
239
+ },
240
+ {
241
+ schemeId: "smithy.api#noAuth",
242
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
243
+ signer: new NoAuthSigner()
244
+ }
245
+ ],
246
+ maxAttempts: config?.maxAttempts ?? loadConfig(NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
247
+ region: config?.region ?? loadConfig(NODE_REGION_CONFIG_OPTIONS, { ...NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
248
+ requestHandler: NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
249
+ retryMode: config?.retryMode ?? loadConfig({
250
+ ...NODE_RETRY_MODE_CONFIG_OPTIONS,
251
+ default: async () => (await defaultConfigProvider()).retryMode || DEFAULT_RETRY_MODE
252
+ }, config),
253
+ sha256: config?.sha256 ?? Hash.bind(null, "sha256"),
254
+ streamCollector: config?.streamCollector ?? streamCollector,
255
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? loadConfig(NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
256
+ useFipsEndpoint: config?.useFipsEndpoint ?? loadConfig(NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
257
+ userAgentAppId: config?.userAgentAppId ?? loadConfig(NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
258
+ };
259
+ };
260
+
261
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js
262
+ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
263
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
264
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
265
+ let _credentials = runtimeConfig.credentials;
266
+ return {
267
+ setHttpAuthScheme(httpAuthScheme) {
268
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
269
+ if (index === -1) {
270
+ _httpAuthSchemes.push(httpAuthScheme);
271
+ } else {
272
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
273
+ }
274
+ },
275
+ httpAuthSchemes() {
276
+ return _httpAuthSchemes;
277
+ },
278
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
279
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
280
+ },
281
+ httpAuthSchemeProvider() {
282
+ return _httpAuthSchemeProvider;
283
+ },
284
+ setCredentials(credentials) {
285
+ _credentials = credentials;
286
+ },
287
+ credentials() {
288
+ return _credentials;
289
+ }
290
+ };
291
+ };
292
+ var resolveHttpAuthRuntimeConfig = (config) => {
293
+ return {
294
+ httpAuthSchemes: config.httpAuthSchemes(),
295
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
296
+ credentials: config.credentials()
297
+ };
298
+ };
299
+
300
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js
301
+ var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
302
+ const extensionConfiguration = Object.assign(getAwsRegionExtensionConfiguration(runtimeConfig), getDefaultExtensionConfiguration(runtimeConfig), getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
303
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
304
+ return Object.assign(runtimeConfig, resolveAwsRegionExtensionConfiguration(extensionConfiguration), resolveDefaultRuntimeConfig(extensionConfiguration), resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
305
+ };
306
+
307
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js
308
+ var STSClient = class extends Client {
309
+ config;
310
+ constructor(...[configuration]) {
311
+ const _config_0 = getRuntimeConfig2(configuration || {});
312
+ super(_config_0);
313
+ this.initConfig = _config_0;
314
+ const _config_1 = resolveClientEndpointParameters(_config_0);
315
+ const _config_2 = resolveUserAgentConfig(_config_1);
316
+ const _config_3 = resolveRetryConfig(_config_2);
317
+ const _config_4 = resolveRegionConfig(_config_3);
318
+ const _config_5 = resolveHostHeaderConfig(_config_4);
319
+ const _config_6 = resolveEndpointConfig(_config_5);
320
+ const _config_7 = resolveHttpAuthSchemeConfig(_config_6);
321
+ const _config_8 = resolveRuntimeExtensions(_config_7, configuration?.extensions || []);
322
+ this.config = _config_8;
323
+ this.middlewareStack.use(getUserAgentPlugin(this.config));
324
+ this.middlewareStack.use(getRetryPlugin(this.config));
325
+ this.middlewareStack.use(getContentLengthPlugin(this.config));
326
+ this.middlewareStack.use(getHostHeaderPlugin(this.config));
327
+ this.middlewareStack.use(getLoggerPlugin(this.config));
328
+ this.middlewareStack.use(getRecursionDetectionPlugin(this.config));
329
+ this.middlewareStack.use(getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
330
+ httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
331
+ identityProviderConfigProvider: async (config) => new DefaultIdentityProviderConfig({
332
+ "aws.auth#sigv4": config.credentials
333
+ })
334
+ }));
335
+ this.middlewareStack.use(getHttpSigningPlugin(this.config));
336
+ }
337
+ destroy() {
338
+ super.destroy();
339
+ }
340
+ };
341
+
342
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js
343
+ var STSServiceException = class _STSServiceException extends ServiceException {
344
+ constructor(options) {
345
+ super(options);
346
+ Object.setPrototypeOf(this, _STSServiceException.prototype);
347
+ }
348
+ };
349
+
350
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/models_0.js
351
+ var CredentialsFilterSensitiveLog = (obj) => ({
352
+ ...obj,
353
+ ...obj.SecretAccessKey && { SecretAccessKey: SENSITIVE_STRING }
354
+ });
355
+ var AssumeRoleResponseFilterSensitiveLog = (obj) => ({
356
+ ...obj,
357
+ ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
358
+ });
359
+ var ExpiredTokenException = class _ExpiredTokenException extends STSServiceException {
360
+ name = "ExpiredTokenException";
361
+ $fault = "client";
362
+ constructor(opts) {
363
+ super({
364
+ name: "ExpiredTokenException",
365
+ $fault: "client",
366
+ ...opts
367
+ });
368
+ Object.setPrototypeOf(this, _ExpiredTokenException.prototype);
369
+ }
370
+ };
371
+ var MalformedPolicyDocumentException = class _MalformedPolicyDocumentException extends STSServiceException {
372
+ name = "MalformedPolicyDocumentException";
373
+ $fault = "client";
374
+ constructor(opts) {
375
+ super({
376
+ name: "MalformedPolicyDocumentException",
377
+ $fault: "client",
378
+ ...opts
379
+ });
380
+ Object.setPrototypeOf(this, _MalformedPolicyDocumentException.prototype);
381
+ }
382
+ };
383
+ var PackedPolicyTooLargeException = class _PackedPolicyTooLargeException extends STSServiceException {
384
+ name = "PackedPolicyTooLargeException";
385
+ $fault = "client";
386
+ constructor(opts) {
387
+ super({
388
+ name: "PackedPolicyTooLargeException",
389
+ $fault: "client",
390
+ ...opts
391
+ });
392
+ Object.setPrototypeOf(this, _PackedPolicyTooLargeException.prototype);
393
+ }
394
+ };
395
+ var RegionDisabledException = class _RegionDisabledException extends STSServiceException {
396
+ name = "RegionDisabledException";
397
+ $fault = "client";
398
+ constructor(opts) {
399
+ super({
400
+ name: "RegionDisabledException",
401
+ $fault: "client",
402
+ ...opts
403
+ });
404
+ Object.setPrototypeOf(this, _RegionDisabledException.prototype);
405
+ }
406
+ };
407
+ var IDPRejectedClaimException = class _IDPRejectedClaimException extends STSServiceException {
408
+ name = "IDPRejectedClaimException";
409
+ $fault = "client";
410
+ constructor(opts) {
411
+ super({
412
+ name: "IDPRejectedClaimException",
413
+ $fault: "client",
414
+ ...opts
415
+ });
416
+ Object.setPrototypeOf(this, _IDPRejectedClaimException.prototype);
417
+ }
418
+ };
419
+ var InvalidIdentityTokenException = class _InvalidIdentityTokenException extends STSServiceException {
420
+ name = "InvalidIdentityTokenException";
421
+ $fault = "client";
422
+ constructor(opts) {
423
+ super({
424
+ name: "InvalidIdentityTokenException",
425
+ $fault: "client",
426
+ ...opts
427
+ });
428
+ Object.setPrototypeOf(this, _InvalidIdentityTokenException.prototype);
429
+ }
430
+ };
431
+ var AssumeRoleWithWebIdentityRequestFilterSensitiveLog = (obj) => ({
432
+ ...obj,
433
+ ...obj.WebIdentityToken && { WebIdentityToken: SENSITIVE_STRING }
434
+ });
435
+ var AssumeRoleWithWebIdentityResponseFilterSensitiveLog = (obj) => ({
436
+ ...obj,
437
+ ...obj.Credentials && { Credentials: CredentialsFilterSensitiveLog(obj.Credentials) }
438
+ });
439
+ var IDPCommunicationErrorException = class _IDPCommunicationErrorException extends STSServiceException {
440
+ name = "IDPCommunicationErrorException";
441
+ $fault = "client";
442
+ constructor(opts) {
443
+ super({
444
+ name: "IDPCommunicationErrorException",
445
+ $fault: "client",
446
+ ...opts
447
+ });
448
+ Object.setPrototypeOf(this, _IDPCommunicationErrorException.prototype);
449
+ }
450
+ };
451
+
452
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/protocols/Aws_query.js
453
+ var se_AssumeRoleCommand = async (input, context) => {
454
+ const headers = SHARED_HEADERS;
455
+ let body;
456
+ body = buildFormUrlencodedString({
457
+ ...se_AssumeRoleRequest(input),
458
+ [_A]: _AR,
459
+ [_V]: _
460
+ });
461
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
462
+ };
463
+ var se_AssumeRoleWithWebIdentityCommand = async (input, context) => {
464
+ const headers = SHARED_HEADERS;
465
+ let body;
466
+ body = buildFormUrlencodedString({
467
+ ...se_AssumeRoleWithWebIdentityRequest(input),
468
+ [_A]: _ARWWI,
469
+ [_V]: _
470
+ });
471
+ return buildHttpRpcRequest(context, headers, "/", void 0, body);
472
+ };
473
+ var de_AssumeRoleCommand = async (output, context) => {
474
+ if (output.statusCode >= 300) {
475
+ return de_CommandError(output, context);
476
+ }
477
+ const data = await parseXmlBody(output.body, context);
478
+ let contents = {};
479
+ contents = de_AssumeRoleResponse(data.AssumeRoleResult);
480
+ const response = {
481
+ $metadata: deserializeMetadata(output),
482
+ ...contents
483
+ };
484
+ return response;
485
+ };
486
+ var de_AssumeRoleWithWebIdentityCommand = async (output, context) => {
487
+ if (output.statusCode >= 300) {
488
+ return de_CommandError(output, context);
489
+ }
490
+ const data = await parseXmlBody(output.body, context);
491
+ let contents = {};
492
+ contents = de_AssumeRoleWithWebIdentityResponse(data.AssumeRoleWithWebIdentityResult);
493
+ const response = {
494
+ $metadata: deserializeMetadata(output),
495
+ ...contents
496
+ };
497
+ return response;
498
+ };
499
+ var de_CommandError = async (output, context) => {
500
+ const parsedOutput = {
501
+ ...output,
502
+ body: await parseXmlErrorBody(output.body, context)
503
+ };
504
+ const errorCode = loadQueryErrorCode(output, parsedOutput.body);
505
+ switch (errorCode) {
506
+ case "ExpiredTokenException":
507
+ case "com.amazonaws.sts#ExpiredTokenException":
508
+ throw await de_ExpiredTokenExceptionRes(parsedOutput);
509
+ case "MalformedPolicyDocument":
510
+ case "com.amazonaws.sts#MalformedPolicyDocumentException":
511
+ throw await de_MalformedPolicyDocumentExceptionRes(parsedOutput);
512
+ case "PackedPolicyTooLarge":
513
+ case "com.amazonaws.sts#PackedPolicyTooLargeException":
514
+ throw await de_PackedPolicyTooLargeExceptionRes(parsedOutput);
515
+ case "RegionDisabledException":
516
+ case "com.amazonaws.sts#RegionDisabledException":
517
+ throw await de_RegionDisabledExceptionRes(parsedOutput);
518
+ case "IDPCommunicationError":
519
+ case "com.amazonaws.sts#IDPCommunicationErrorException":
520
+ throw await de_IDPCommunicationErrorExceptionRes(parsedOutput);
521
+ case "IDPRejectedClaim":
522
+ case "com.amazonaws.sts#IDPRejectedClaimException":
523
+ throw await de_IDPRejectedClaimExceptionRes(parsedOutput);
524
+ case "InvalidIdentityToken":
525
+ case "com.amazonaws.sts#InvalidIdentityTokenException":
526
+ throw await de_InvalidIdentityTokenExceptionRes(parsedOutput);
527
+ default:
528
+ const parsedBody = parsedOutput.body;
529
+ return throwDefaultError({
530
+ output,
531
+ parsedBody: parsedBody.Error,
532
+ errorCode
533
+ });
534
+ }
535
+ };
536
+ var de_ExpiredTokenExceptionRes = async (parsedOutput, context) => {
537
+ const body = parsedOutput.body;
538
+ const deserialized = de_ExpiredTokenException(body.Error);
539
+ const exception = new ExpiredTokenException({
540
+ $metadata: deserializeMetadata(parsedOutput),
541
+ ...deserialized
542
+ });
543
+ return decorateServiceException(exception, body);
544
+ };
545
+ var de_IDPCommunicationErrorExceptionRes = async (parsedOutput, context) => {
546
+ const body = parsedOutput.body;
547
+ const deserialized = de_IDPCommunicationErrorException(body.Error);
548
+ const exception = new IDPCommunicationErrorException({
549
+ $metadata: deserializeMetadata(parsedOutput),
550
+ ...deserialized
551
+ });
552
+ return decorateServiceException(exception, body);
553
+ };
554
+ var de_IDPRejectedClaimExceptionRes = async (parsedOutput, context) => {
555
+ const body = parsedOutput.body;
556
+ const deserialized = de_IDPRejectedClaimException(body.Error);
557
+ const exception = new IDPRejectedClaimException({
558
+ $metadata: deserializeMetadata(parsedOutput),
559
+ ...deserialized
560
+ });
561
+ return decorateServiceException(exception, body);
562
+ };
563
+ var de_InvalidIdentityTokenExceptionRes = async (parsedOutput, context) => {
564
+ const body = parsedOutput.body;
565
+ const deserialized = de_InvalidIdentityTokenException(body.Error);
566
+ const exception = new InvalidIdentityTokenException({
567
+ $metadata: deserializeMetadata(parsedOutput),
568
+ ...deserialized
569
+ });
570
+ return decorateServiceException(exception, body);
571
+ };
572
+ var de_MalformedPolicyDocumentExceptionRes = async (parsedOutput, context) => {
573
+ const body = parsedOutput.body;
574
+ const deserialized = de_MalformedPolicyDocumentException(body.Error);
575
+ const exception = new MalformedPolicyDocumentException({
576
+ $metadata: deserializeMetadata(parsedOutput),
577
+ ...deserialized
578
+ });
579
+ return decorateServiceException(exception, body);
580
+ };
581
+ var de_PackedPolicyTooLargeExceptionRes = async (parsedOutput, context) => {
582
+ const body = parsedOutput.body;
583
+ const deserialized = de_PackedPolicyTooLargeException(body.Error);
584
+ const exception = new PackedPolicyTooLargeException({
585
+ $metadata: deserializeMetadata(parsedOutput),
586
+ ...deserialized
587
+ });
588
+ return decorateServiceException(exception, body);
589
+ };
590
+ var de_RegionDisabledExceptionRes = async (parsedOutput, context) => {
591
+ const body = parsedOutput.body;
592
+ const deserialized = de_RegionDisabledException(body.Error);
593
+ const exception = new RegionDisabledException({
594
+ $metadata: deserializeMetadata(parsedOutput),
595
+ ...deserialized
596
+ });
597
+ return decorateServiceException(exception, body);
598
+ };
599
+ var se_AssumeRoleRequest = (input, context) => {
600
+ const entries = {};
601
+ if (input[_RA] != null) {
602
+ entries[_RA] = input[_RA];
603
+ }
604
+ if (input[_RSN] != null) {
605
+ entries[_RSN] = input[_RSN];
606
+ }
607
+ if (input[_PA] != null) {
608
+ const memberEntries = se_policyDescriptorListType(input[_PA]);
609
+ if (input[_PA]?.length === 0) {
610
+ entries.PolicyArns = [];
611
+ }
612
+ Object.entries(memberEntries).forEach(([key, value]) => {
613
+ const loc = `PolicyArns.${key}`;
614
+ entries[loc] = value;
615
+ });
616
+ }
617
+ if (input[_P] != null) {
618
+ entries[_P] = input[_P];
619
+ }
620
+ if (input[_DS] != null) {
621
+ entries[_DS] = input[_DS];
622
+ }
623
+ if (input[_T] != null) {
624
+ const memberEntries = se_tagListType(input[_T]);
625
+ if (input[_T]?.length === 0) {
626
+ entries.Tags = [];
627
+ }
628
+ Object.entries(memberEntries).forEach(([key, value]) => {
629
+ const loc = `Tags.${key}`;
630
+ entries[loc] = value;
631
+ });
632
+ }
633
+ if (input[_TTK] != null) {
634
+ const memberEntries = se_tagKeyListType(input[_TTK]);
635
+ if (input[_TTK]?.length === 0) {
636
+ entries.TransitiveTagKeys = [];
637
+ }
638
+ Object.entries(memberEntries).forEach(([key, value]) => {
639
+ const loc = `TransitiveTagKeys.${key}`;
640
+ entries[loc] = value;
641
+ });
642
+ }
643
+ if (input[_EI] != null) {
644
+ entries[_EI] = input[_EI];
645
+ }
646
+ if (input[_SN] != null) {
647
+ entries[_SN] = input[_SN];
648
+ }
649
+ if (input[_TC] != null) {
650
+ entries[_TC] = input[_TC];
651
+ }
652
+ if (input[_SI] != null) {
653
+ entries[_SI] = input[_SI];
654
+ }
655
+ if (input[_PC] != null) {
656
+ const memberEntries = se_ProvidedContextsListType(input[_PC]);
657
+ if (input[_PC]?.length === 0) {
658
+ entries.ProvidedContexts = [];
659
+ }
660
+ Object.entries(memberEntries).forEach(([key, value]) => {
661
+ const loc = `ProvidedContexts.${key}`;
662
+ entries[loc] = value;
663
+ });
664
+ }
665
+ return entries;
666
+ };
667
+ var se_AssumeRoleWithWebIdentityRequest = (input, context) => {
668
+ const entries = {};
669
+ if (input[_RA] != null) {
670
+ entries[_RA] = input[_RA];
671
+ }
672
+ if (input[_RSN] != null) {
673
+ entries[_RSN] = input[_RSN];
674
+ }
675
+ if (input[_WIT] != null) {
676
+ entries[_WIT] = input[_WIT];
677
+ }
678
+ if (input[_PI] != null) {
679
+ entries[_PI] = input[_PI];
680
+ }
681
+ if (input[_PA] != null) {
682
+ const memberEntries = se_policyDescriptorListType(input[_PA]);
683
+ if (input[_PA]?.length === 0) {
684
+ entries.PolicyArns = [];
685
+ }
686
+ Object.entries(memberEntries).forEach(([key, value]) => {
687
+ const loc = `PolicyArns.${key}`;
688
+ entries[loc] = value;
689
+ });
690
+ }
691
+ if (input[_P] != null) {
692
+ entries[_P] = input[_P];
693
+ }
694
+ if (input[_DS] != null) {
695
+ entries[_DS] = input[_DS];
696
+ }
697
+ return entries;
698
+ };
699
+ var se_policyDescriptorListType = (input, context) => {
700
+ const entries = {};
701
+ let counter = 1;
702
+ for (const entry of input) {
703
+ if (entry === null) {
704
+ continue;
705
+ }
706
+ const memberEntries = se_PolicyDescriptorType(entry);
707
+ Object.entries(memberEntries).forEach(([key, value]) => {
708
+ entries[`member.${counter}.${key}`] = value;
709
+ });
710
+ counter++;
711
+ }
712
+ return entries;
713
+ };
714
+ var se_PolicyDescriptorType = (input, context) => {
715
+ const entries = {};
716
+ if (input[_a] != null) {
717
+ entries[_a] = input[_a];
718
+ }
719
+ return entries;
720
+ };
721
+ var se_ProvidedContext = (input, context) => {
722
+ const entries = {};
723
+ if (input[_PAr] != null) {
724
+ entries[_PAr] = input[_PAr];
725
+ }
726
+ if (input[_CA] != null) {
727
+ entries[_CA] = input[_CA];
728
+ }
729
+ return entries;
730
+ };
731
+ var se_ProvidedContextsListType = (input, context) => {
732
+ const entries = {};
733
+ let counter = 1;
734
+ for (const entry of input) {
735
+ if (entry === null) {
736
+ continue;
737
+ }
738
+ const memberEntries = se_ProvidedContext(entry);
739
+ Object.entries(memberEntries).forEach(([key, value]) => {
740
+ entries[`member.${counter}.${key}`] = value;
741
+ });
742
+ counter++;
743
+ }
744
+ return entries;
745
+ };
746
+ var se_Tag = (input, context) => {
747
+ const entries = {};
748
+ if (input[_K] != null) {
749
+ entries[_K] = input[_K];
750
+ }
751
+ if (input[_Va] != null) {
752
+ entries[_Va] = input[_Va];
753
+ }
754
+ return entries;
755
+ };
756
+ var se_tagKeyListType = (input, context) => {
757
+ const entries = {};
758
+ let counter = 1;
759
+ for (const entry of input) {
760
+ if (entry === null) {
761
+ continue;
762
+ }
763
+ entries[`member.${counter}`] = entry;
764
+ counter++;
765
+ }
766
+ return entries;
767
+ };
768
+ var se_tagListType = (input, context) => {
769
+ const entries = {};
770
+ let counter = 1;
771
+ for (const entry of input) {
772
+ if (entry === null) {
773
+ continue;
774
+ }
775
+ const memberEntries = se_Tag(entry);
776
+ Object.entries(memberEntries).forEach(([key, value]) => {
777
+ entries[`member.${counter}.${key}`] = value;
778
+ });
779
+ counter++;
780
+ }
781
+ return entries;
782
+ };
783
+ var de_AssumedRoleUser = (output, context) => {
784
+ const contents = {};
785
+ if (output[_ARI] != null) {
786
+ contents[_ARI] = expectString(output[_ARI]);
787
+ }
788
+ if (output[_Ar] != null) {
789
+ contents[_Ar] = expectString(output[_Ar]);
790
+ }
791
+ return contents;
792
+ };
793
+ var de_AssumeRoleResponse = (output, context) => {
794
+ const contents = {};
795
+ if (output[_C] != null) {
796
+ contents[_C] = de_Credentials(output[_C]);
797
+ }
798
+ if (output[_ARU] != null) {
799
+ contents[_ARU] = de_AssumedRoleUser(output[_ARU]);
800
+ }
801
+ if (output[_PPS] != null) {
802
+ contents[_PPS] = strictParseInt32(output[_PPS]);
803
+ }
804
+ if (output[_SI] != null) {
805
+ contents[_SI] = expectString(output[_SI]);
806
+ }
807
+ return contents;
808
+ };
809
+ var de_AssumeRoleWithWebIdentityResponse = (output, context) => {
810
+ const contents = {};
811
+ if (output[_C] != null) {
812
+ contents[_C] = de_Credentials(output[_C]);
813
+ }
814
+ if (output[_SFWIT] != null) {
815
+ contents[_SFWIT] = expectString(output[_SFWIT]);
816
+ }
817
+ if (output[_ARU] != null) {
818
+ contents[_ARU] = de_AssumedRoleUser(output[_ARU]);
819
+ }
820
+ if (output[_PPS] != null) {
821
+ contents[_PPS] = strictParseInt32(output[_PPS]);
822
+ }
823
+ if (output[_Pr] != null) {
824
+ contents[_Pr] = expectString(output[_Pr]);
825
+ }
826
+ if (output[_Au] != null) {
827
+ contents[_Au] = expectString(output[_Au]);
828
+ }
829
+ if (output[_SI] != null) {
830
+ contents[_SI] = expectString(output[_SI]);
831
+ }
832
+ return contents;
833
+ };
834
+ var de_Credentials = (output, context) => {
835
+ const contents = {};
836
+ if (output[_AKI] != null) {
837
+ contents[_AKI] = expectString(output[_AKI]);
838
+ }
839
+ if (output[_SAK] != null) {
840
+ contents[_SAK] = expectString(output[_SAK]);
841
+ }
842
+ if (output[_ST] != null) {
843
+ contents[_ST] = expectString(output[_ST]);
844
+ }
845
+ if (output[_E] != null) {
846
+ contents[_E] = expectNonNull(parseRfc3339DateTimeWithOffset(output[_E]));
847
+ }
848
+ return contents;
849
+ };
850
+ var de_ExpiredTokenException = (output, context) => {
851
+ const contents = {};
852
+ if (output[_m] != null) {
853
+ contents[_m] = expectString(output[_m]);
854
+ }
855
+ return contents;
856
+ };
857
+ var de_IDPCommunicationErrorException = (output, context) => {
858
+ const contents = {};
859
+ if (output[_m] != null) {
860
+ contents[_m] = expectString(output[_m]);
861
+ }
862
+ return contents;
863
+ };
864
+ var de_IDPRejectedClaimException = (output, context) => {
865
+ const contents = {};
866
+ if (output[_m] != null) {
867
+ contents[_m] = expectString(output[_m]);
868
+ }
869
+ return contents;
870
+ };
871
+ var de_InvalidIdentityTokenException = (output, context) => {
872
+ const contents = {};
873
+ if (output[_m] != null) {
874
+ contents[_m] = expectString(output[_m]);
875
+ }
876
+ return contents;
877
+ };
878
+ var de_MalformedPolicyDocumentException = (output, context) => {
879
+ const contents = {};
880
+ if (output[_m] != null) {
881
+ contents[_m] = expectString(output[_m]);
882
+ }
883
+ return contents;
884
+ };
885
+ var de_PackedPolicyTooLargeException = (output, context) => {
886
+ const contents = {};
887
+ if (output[_m] != null) {
888
+ contents[_m] = expectString(output[_m]);
889
+ }
890
+ return contents;
891
+ };
892
+ var de_RegionDisabledException = (output, context) => {
893
+ const contents = {};
894
+ if (output[_m] != null) {
895
+ contents[_m] = expectString(output[_m]);
896
+ }
897
+ return contents;
898
+ };
899
+ var deserializeMetadata = (output) => ({
900
+ httpStatusCode: output.statusCode,
901
+ requestId: output.headers["x-amzn-requestid"] ?? output.headers["x-amzn-request-id"] ?? output.headers["x-amz-request-id"],
902
+ extendedRequestId: output.headers["x-amz-id-2"],
903
+ cfId: output.headers["x-amz-cf-id"]
904
+ });
905
+ var throwDefaultError = withBaseException(STSServiceException);
906
+ var buildHttpRpcRequest = async (context, headers, path, resolvedHostname, body) => {
907
+ const { hostname, protocol = "https", port, path: basePath } = await context.endpoint();
908
+ const contents = {
909
+ protocol,
910
+ hostname,
911
+ port,
912
+ method: "POST",
913
+ path: basePath.endsWith("/") ? basePath.slice(0, -1) + path : basePath + path,
914
+ headers
915
+ };
916
+ if (body !== void 0) {
917
+ contents.body = body;
918
+ }
919
+ return new HttpRequest(contents);
920
+ };
921
+ var SHARED_HEADERS = {
922
+ "content-type": "application/x-www-form-urlencoded"
923
+ };
924
+ var _ = "2011-06-15";
925
+ var _A = "Action";
926
+ var _AKI = "AccessKeyId";
927
+ var _AR = "AssumeRole";
928
+ var _ARI = "AssumedRoleId";
929
+ var _ARU = "AssumedRoleUser";
930
+ var _ARWWI = "AssumeRoleWithWebIdentity";
931
+ var _Ar = "Arn";
932
+ var _Au = "Audience";
933
+ var _C = "Credentials";
934
+ var _CA = "ContextAssertion";
935
+ var _DS = "DurationSeconds";
936
+ var _E = "Expiration";
937
+ var _EI = "ExternalId";
938
+ var _K = "Key";
939
+ var _P = "Policy";
940
+ var _PA = "PolicyArns";
941
+ var _PAr = "ProviderArn";
942
+ var _PC = "ProvidedContexts";
943
+ var _PI = "ProviderId";
944
+ var _PPS = "PackedPolicySize";
945
+ var _Pr = "Provider";
946
+ var _RA = "RoleArn";
947
+ var _RSN = "RoleSessionName";
948
+ var _SAK = "SecretAccessKey";
949
+ var _SFWIT = "SubjectFromWebIdentityToken";
950
+ var _SI = "SourceIdentity";
951
+ var _SN = "SerialNumber";
952
+ var _ST = "SessionToken";
953
+ var _T = "Tags";
954
+ var _TC = "TokenCode";
955
+ var _TTK = "TransitiveTagKeys";
956
+ var _V = "Version";
957
+ var _Va = "Value";
958
+ var _WIT = "WebIdentityToken";
959
+ var _a = "arn";
960
+ var _m = "message";
961
+ var buildFormUrlencodedString = (formEntries) => Object.entries(formEntries).map(([key, value]) => extendedEncodeURIComponent(key) + "=" + extendedEncodeURIComponent(value)).join("&");
962
+ var loadQueryErrorCode = (output, data) => {
963
+ if (data.Error?.Code !== void 0) {
964
+ return data.Error.Code;
965
+ }
966
+ if (output.statusCode == 404) {
967
+ return "NotFound";
968
+ }
969
+ };
970
+
971
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js
972
+ var AssumeRoleCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
973
+ return [
974
+ getSerdePlugin(config, this.serialize, this.deserialize),
975
+ getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
976
+ ];
977
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").f(void 0, AssumeRoleResponseFilterSensitiveLog).ser(se_AssumeRoleCommand).de(de_AssumeRoleCommand).build() {
978
+ };
979
+
980
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js
981
+ var AssumeRoleWithWebIdentityCommand = class extends Command.classBuilder().ep(commonParams).m(function(Command2, cs, config, o2) {
982
+ return [
983
+ getSerdePlugin(config, this.serialize, this.deserialize),
984
+ getEndpointPlugin(config, Command2.getEndpointParameterInstructions())
985
+ ];
986
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").f(AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog).ser(se_AssumeRoleWithWebIdentityCommand).de(de_AssumeRoleWithWebIdentityCommand).build() {
987
+ };
988
+
989
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STS.js
990
+ var commands = {
991
+ AssumeRoleCommand,
992
+ AssumeRoleWithWebIdentityCommand
993
+ };
994
+ var STS = class extends STSClient {
995
+ };
996
+ createAggregatedClient(commands, STS);
997
+
998
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js
999
+ var ASSUME_ROLE_DEFAULT_REGION = "us-east-1";
1000
+ var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
1001
+ if (typeof assumedRoleUser?.Arn === "string") {
1002
+ const arnComponents = assumedRoleUser.Arn.split(":");
1003
+ if (arnComponents.length > 4 && arnComponents[4] !== "") {
1004
+ return arnComponents[4];
1005
+ }
1006
+ }
1007
+ return void 0;
1008
+ };
1009
+ var resolveRegion = async (_region, _parentRegion, credentialProviderLogger) => {
1010
+ const region = typeof _region === "function" ? await _region() : _region;
1011
+ const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
1012
+ credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (provider)`, `${parentRegion} (parent client)`, `${ASSUME_ROLE_DEFAULT_REGION} (STS default)`);
1013
+ return region ?? parentRegion ?? ASSUME_ROLE_DEFAULT_REGION;
1014
+ };
1015
+ var getDefaultRoleAssumer = (stsOptions, STSClient2) => {
1016
+ let stsClient;
1017
+ let closureSourceCreds;
1018
+ return async (sourceCreds, params) => {
1019
+ closureSourceCreds = sourceCreds;
1020
+ if (!stsClient) {
1021
+ const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions;
1022
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
1023
+ const isCompatibleRequestHandler = !isH2(requestHandler);
1024
+ stsClient = new STSClient2({
1025
+ profile: stsOptions?.parentClientConfig?.profile,
1026
+ credentialDefaultProvider: () => async () => closureSourceCreds,
1027
+ region: resolvedRegion,
1028
+ requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
1029
+ logger
1030
+ });
1031
+ }
1032
+ const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
1033
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
1034
+ throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
1035
+ }
1036
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
1037
+ const credentials = {
1038
+ accessKeyId: Credentials.AccessKeyId,
1039
+ secretAccessKey: Credentials.SecretAccessKey,
1040
+ sessionToken: Credentials.SessionToken,
1041
+ expiration: Credentials.Expiration,
1042
+ ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
1043
+ ...accountId && { accountId }
1044
+ };
1045
+ setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
1046
+ return credentials;
1047
+ };
1048
+ };
1049
+ var getDefaultRoleAssumerWithWebIdentity = (stsOptions, STSClient2) => {
1050
+ let stsClient;
1051
+ return async (params) => {
1052
+ if (!stsClient) {
1053
+ const { logger = stsOptions?.parentClientConfig?.logger, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger } = stsOptions;
1054
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger);
1055
+ const isCompatibleRequestHandler = !isH2(requestHandler);
1056
+ stsClient = new STSClient2({
1057
+ profile: stsOptions?.parentClientConfig?.profile,
1058
+ region: resolvedRegion,
1059
+ requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
1060
+ logger
1061
+ });
1062
+ }
1063
+ const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
1064
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
1065
+ throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
1066
+ }
1067
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
1068
+ const credentials = {
1069
+ accessKeyId: Credentials.AccessKeyId,
1070
+ secretAccessKey: Credentials.SecretAccessKey,
1071
+ sessionToken: Credentials.SessionToken,
1072
+ expiration: Credentials.Expiration,
1073
+ ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
1074
+ ...accountId && { accountId }
1075
+ };
1076
+ if (accountId) {
1077
+ setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
1078
+ }
1079
+ setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
1080
+ return credentials;
1081
+ };
1082
+ };
1083
+ var isH2 = (requestHandler) => {
1084
+ return requestHandler?.metadata?.handlerProtocol === "h2";
1085
+ };
1086
+
1087
+ // ../../node_modules/@aws-sdk/client-dynamodb/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js
1088
+ var getCustomizableStsClientCtor = (baseCtor, customizations) => {
1089
+ if (!customizations)
1090
+ return baseCtor;
1091
+ else
1092
+ return class CustomizableSTSClient extends baseCtor {
1093
+ constructor(config) {
1094
+ super(config);
1095
+ for (const customization of customizations) {
1096
+ this.middlewareStack.use(customization);
1097
+ }
1098
+ }
1099
+ };
1100
+ };
1101
+ var getDefaultRoleAssumer2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
1102
+ var getDefaultRoleAssumerWithWebIdentity2 = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
1103
+ var decorateDefaultCredentialProvider = (provider) => (input) => provider({
1104
+ roleAssumer: getDefaultRoleAssumer2(input),
1105
+ roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity2(input),
1106
+ ...input
1107
+ });
1108
+
1109
+ export { AssumeRoleCommand, AssumeRoleResponseFilterSensitiveLog, AssumeRoleWithWebIdentityCommand, AssumeRoleWithWebIdentityRequestFilterSensitiveLog, AssumeRoleWithWebIdentityResponseFilterSensitiveLog, CredentialsFilterSensitiveLog, ExpiredTokenException, IDPCommunicationErrorException, IDPRejectedClaimException, InvalidIdentityTokenException, MalformedPolicyDocumentException, PackedPolicyTooLargeException, RegionDisabledException, STS, STSClient, STSServiceException, decorateDefaultCredentialProvider, getDefaultRoleAssumer2 as getDefaultRoleAssumer, getDefaultRoleAssumerWithWebIdentity2 as getDefaultRoleAssumerWithWebIdentity };