@sisense/mcp-server 0.2.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.
Files changed (37) hide show
  1. package/LICENSE.md +35 -0
  2. package/README.md +121 -0
  3. package/dist/ai-hspmgr2c.js +3148 -0
  4. package/dist/fileFromPath-s6ap5vrh.js +128 -0
  5. package/dist/index-29n08mw7.js +95 -0
  6. package/dist/index-atgbxy7h.js +98603 -0
  7. package/dist/index-d6843g0v.js +372 -0
  8. package/dist/index-dcrjg3fk.js +207 -0
  9. package/dist/index-dxfb3krz.js +1489 -0
  10. package/dist/index-er0yspcy.js +918 -0
  11. package/dist/index-g8bgq79c.js +53 -0
  12. package/dist/index-p1pxtmwn.js +162 -0
  13. package/dist/index-qdth51hx.js +250 -0
  14. package/dist/index-tqba2rwh.js +603 -0
  15. package/dist/index-vrapm0b4.js +765 -0
  16. package/dist/index-vx54d05h.js +475 -0
  17. package/dist/sse-server-3343e7xh.js +117 -0
  18. package/dist/sse-server-36t17nga.js +12127 -0
  19. package/dist/sse-server-3e0efmg2.js +6276 -0
  20. package/dist/sse-server-4b60tg0c.js +136 -0
  21. package/dist/sse-server-4g9za0qq.js +89 -0
  22. package/dist/sse-server-4jjec4fz.js +9753 -0
  23. package/dist/sse-server-5tmgacdx.js +62 -0
  24. package/dist/sse-server-7wcvyxyj.js +31 -0
  25. package/dist/sse-server-brx9qtyd.js +2131 -0
  26. package/dist/sse-server-epd916s3.js +167 -0
  27. package/dist/sse-server-gt7tx6n2.js +2240 -0
  28. package/dist/sse-server-mkesh468.js +53 -0
  29. package/dist/sse-server-nwjjjz6x.js +113 -0
  30. package/dist/sse-server-qj4zxq0f.js +267 -0
  31. package/dist/sse-server-rr3dp62e.js +116721 -0
  32. package/dist/sse-server-ss0mydv4.js +3980 -0
  33. package/dist/sse-server-txz5g5t0.js +5328 -0
  34. package/dist/sse-server.js +30432 -0
  35. package/dist/view.html +3016 -0
  36. package/dist/widget-renderer-66ws3xtk.js +312 -0
  37. package/package.json +82 -0
@@ -0,0 +1,918 @@
1
+ import {
2
+ require_package
3
+ } from "./sse-server-4b60tg0c.js";
4
+ import {
5
+ require_dist_cjs as require_dist_cjs6,
6
+ require_dist_cjs10 as require_dist_cjs16,
7
+ require_dist_cjs11 as require_dist_cjs17,
8
+ require_dist_cjs12 as require_dist_cjs19,
9
+ require_dist_cjs13 as require_dist_cjs20,
10
+ require_dist_cjs14 as require_dist_cjs21,
11
+ require_dist_cjs15 as require_dist_cjs22,
12
+ require_dist_cjs16 as require_dist_cjs23,
13
+ require_dist_cjs17 as require_dist_cjs24,
14
+ require_dist_cjs18 as require_dist_cjs25,
15
+ require_dist_cjs19 as require_dist_cjs26,
16
+ require_dist_cjs2 as require_dist_cjs8,
17
+ require_dist_cjs3 as require_dist_cjs9,
18
+ require_dist_cjs4 as require_dist_cjs10,
19
+ require_dist_cjs5 as require_dist_cjs11,
20
+ require_dist_cjs7 as require_dist_cjs12,
21
+ require_dist_cjs8 as require_dist_cjs14,
22
+ require_dist_cjs9 as require_dist_cjs15,
23
+ require_protocols
24
+ } from "./sse-server-4jjec4fz.js";
25
+ import {
26
+ require_dist_cjs as require_dist_cjs13,
27
+ require_dist_cjs1 as require_dist_cjs18
28
+ } from "./sse-server-nwjjjz6x.js";
29
+ import"./sse-server-qj4zxq0f.js";
30
+ import {
31
+ require_dist_cjs as require_dist_cjs2,
32
+ require_dist_cjs1 as require_dist_cjs4,
33
+ require_dist_cjs3 as require_dist_cjs5,
34
+ require_dist_cjs7,
35
+ require_schema,
36
+ require_tslib
37
+ } from "./sse-server-txz5g5t0.js";
38
+ import {
39
+ require_dist_cjs
40
+ } from "./sse-server-epd916s3.js";
41
+ import {
42
+ require_dist_cjs2 as require_dist_cjs3
43
+ } from "./sse-server-5tmgacdx.js";
44
+ import"./sse-server-4g9za0qq.js";
45
+ import {
46
+ require_client
47
+ } from "./sse-server-mkesh468.js";
48
+ import"./sse-server-3343e7xh.js";
49
+ import {
50
+ __commonJS
51
+ } from "./sse-server-7wcvyxyj.js";
52
+
53
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthSchemeProvider.js
54
+ var require_httpAuthSchemeProvider = __commonJS((exports) => {
55
+ Object.defineProperty(exports, "__esModule", { value: true });
56
+ exports.resolveHttpAuthSchemeConfig = exports.resolveStsAuthConfig = exports.defaultSTSHttpAuthSchemeProvider = exports.defaultSTSHttpAuthSchemeParametersProvider = undefined;
57
+ var core_1 = require_dist_cjs8();
58
+ var util_middleware_1 = require_dist_cjs2();
59
+ var STSClient_1 = require_STSClient();
60
+ var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
61
+ return {
62
+ operation: (0, util_middleware_1.getSmithyContext)(context).operation,
63
+ region: await (0, util_middleware_1.normalizeProvider)(config.region)() || (() => {
64
+ throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
65
+ })()
66
+ };
67
+ };
68
+ exports.defaultSTSHttpAuthSchemeParametersProvider = defaultSTSHttpAuthSchemeParametersProvider;
69
+ function createAwsAuthSigv4HttpAuthOption(authParameters) {
70
+ return {
71
+ schemeId: "aws.auth#sigv4",
72
+ signingProperties: {
73
+ name: "sts",
74
+ region: authParameters.region
75
+ },
76
+ propertiesExtractor: (config, context) => ({
77
+ signingProperties: {
78
+ config,
79
+ context
80
+ }
81
+ })
82
+ };
83
+ }
84
+ function createSmithyApiNoAuthHttpAuthOption(authParameters) {
85
+ return {
86
+ schemeId: "smithy.api#noAuth"
87
+ };
88
+ }
89
+ var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
90
+ const options = [];
91
+ switch (authParameters.operation) {
92
+ case "AssumeRoleWithWebIdentity": {
93
+ options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
94
+ break;
95
+ }
96
+ default: {
97
+ options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
98
+ }
99
+ }
100
+ return options;
101
+ };
102
+ exports.defaultSTSHttpAuthSchemeProvider = defaultSTSHttpAuthSchemeProvider;
103
+ var resolveStsAuthConfig = (input) => Object.assign(input, {
104
+ stsClientCtor: STSClient_1.STSClient
105
+ });
106
+ exports.resolveStsAuthConfig = resolveStsAuthConfig;
107
+ var resolveHttpAuthSchemeConfig = (config) => {
108
+ const config_0 = (0, exports.resolveStsAuthConfig)(config);
109
+ const config_1 = (0, core_1.resolveAwsSdkSigV4Config)(config_0);
110
+ return Object.assign(config_1, {
111
+ authSchemePreference: (0, util_middleware_1.normalizeProvider)(config.authSchemePreference ?? [])
112
+ });
113
+ };
114
+ exports.resolveHttpAuthSchemeConfig = resolveHttpAuthSchemeConfig;
115
+ });
116
+
117
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/EndpointParameters.js
118
+ var require_EndpointParameters = __commonJS((exports) => {
119
+ Object.defineProperty(exports, "__esModule", { value: true });
120
+ exports.commonParams = exports.resolveClientEndpointParameters = undefined;
121
+ var resolveClientEndpointParameters = (options) => {
122
+ return Object.assign(options, {
123
+ useDualstackEndpoint: options.useDualstackEndpoint ?? false,
124
+ useFipsEndpoint: options.useFipsEndpoint ?? false,
125
+ useGlobalEndpoint: options.useGlobalEndpoint ?? false,
126
+ defaultSigningName: "sts"
127
+ });
128
+ };
129
+ exports.resolveClientEndpointParameters = resolveClientEndpointParameters;
130
+ exports.commonParams = {
131
+ UseGlobalEndpoint: { type: "builtInParams", name: "useGlobalEndpoint" },
132
+ UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
133
+ Endpoint: { type: "builtInParams", name: "endpoint" },
134
+ Region: { type: "builtInParams", name: "region" },
135
+ UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" }
136
+ };
137
+ });
138
+
139
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/ruleset.js
140
+ var require_ruleset = __commonJS((exports) => {
141
+ Object.defineProperty(exports, "__esModule", { value: true });
142
+ exports.ruleSet = undefined;
143
+ var F = "required";
144
+ var G = "type";
145
+ var H = "fn";
146
+ var I = "argv";
147
+ var J = "ref";
148
+ var a = false;
149
+ var b = true;
150
+ var c = "booleanEquals";
151
+ var d = "stringEquals";
152
+ var e = "sigv4";
153
+ var f = "sts";
154
+ var g = "us-east-1";
155
+ var h = "endpoint";
156
+ var i = "https://sts.{Region}.{PartitionResult#dnsSuffix}";
157
+ var j = "tree";
158
+ var k = "error";
159
+ var l = "getAttr";
160
+ var m = { [F]: false, [G]: "string" };
161
+ var n = { [F]: true, default: false, [G]: "boolean" };
162
+ var o = { [J]: "Endpoint" };
163
+ var p = { [H]: "isSet", [I]: [{ [J]: "Region" }] };
164
+ var q = { [J]: "Region" };
165
+ var r = { [H]: "aws.partition", [I]: [q], assign: "PartitionResult" };
166
+ var s = { [J]: "UseFIPS" };
167
+ var t = { [J]: "UseDualStack" };
168
+ var u = { url: "https://sts.amazonaws.com", properties: { authSchemes: [{ name: e, signingName: f, signingRegion: g }] }, headers: {} };
169
+ var v = {};
170
+ var w = { conditions: [{ [H]: d, [I]: [q, "aws-global"] }], [h]: u, [G]: h };
171
+ var x = { [H]: c, [I]: [s, true] };
172
+ var y = { [H]: c, [I]: [t, true] };
173
+ var z = { [H]: l, [I]: [{ [J]: "PartitionResult" }, "supportsFIPS"] };
174
+ var A = { [J]: "PartitionResult" };
175
+ var B = { [H]: c, [I]: [true, { [H]: l, [I]: [A, "supportsDualStack"] }] };
176
+ var C = [{ [H]: "isSet", [I]: [o] }];
177
+ var D = [x];
178
+ var E = [y];
179
+ 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 }] };
180
+ exports.ruleSet = _data;
181
+ });
182
+
183
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/endpoint/endpointResolver.js
184
+ var require_endpointResolver = __commonJS((exports) => {
185
+ Object.defineProperty(exports, "__esModule", { value: true });
186
+ exports.defaultEndpointResolver = undefined;
187
+ var util_endpoints_1 = require_dist_cjs14();
188
+ var util_endpoints_2 = require_dist_cjs12();
189
+ var ruleset_1 = require_ruleset();
190
+ var cache = new util_endpoints_2.EndpointCache({
191
+ size: 50,
192
+ params: ["Endpoint", "Region", "UseDualStack", "UseFIPS", "UseGlobalEndpoint"]
193
+ });
194
+ var defaultEndpointResolver = (endpointParams, context = {}) => {
195
+ return cache.get(endpointParams, () => (0, util_endpoints_2.resolveEndpoint)(ruleset_1.ruleSet, {
196
+ endpointParams,
197
+ logger: context.logger
198
+ }));
199
+ };
200
+ exports.defaultEndpointResolver = defaultEndpointResolver;
201
+ util_endpoints_2.customEndpointFunctions.aws = util_endpoints_1.awsEndpointFunctions;
202
+ });
203
+
204
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.shared.js
205
+ var require_runtimeConfig_shared = __commonJS((exports) => {
206
+ Object.defineProperty(exports, "__esModule", { value: true });
207
+ exports.getRuntimeConfig = undefined;
208
+ var core_1 = require_dist_cjs8();
209
+ var protocols_1 = require_protocols();
210
+ var core_2 = require_dist_cjs6();
211
+ var smithy_client_1 = require_dist_cjs7();
212
+ var url_parser_1 = require_dist_cjs13();
213
+ var util_base64_1 = require_dist_cjs4();
214
+ var util_utf8_1 = require_dist_cjs3();
215
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
216
+ var endpointResolver_1 = require_endpointResolver();
217
+ var getRuntimeConfig = (config) => {
218
+ return {
219
+ apiVersion: "2011-06-15",
220
+ base64Decoder: config?.base64Decoder ?? util_base64_1.fromBase64,
221
+ base64Encoder: config?.base64Encoder ?? util_base64_1.toBase64,
222
+ disableHostPrefix: config?.disableHostPrefix ?? false,
223
+ endpointProvider: config?.endpointProvider ?? endpointResolver_1.defaultEndpointResolver,
224
+ extensions: config?.extensions ?? [],
225
+ httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeProvider,
226
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
227
+ {
228
+ schemeId: "aws.auth#sigv4",
229
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
230
+ signer: new core_1.AwsSdkSigV4Signer
231
+ },
232
+ {
233
+ schemeId: "smithy.api#noAuth",
234
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
235
+ signer: new core_2.NoAuthSigner
236
+ }
237
+ ],
238
+ logger: config?.logger ?? new smithy_client_1.NoOpLogger,
239
+ protocol: config?.protocol ?? protocols_1.AwsQueryProtocol,
240
+ protocolSettings: config?.protocolSettings ?? {
241
+ defaultNamespace: "com.amazonaws.sts",
242
+ xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
243
+ version: "2011-06-15",
244
+ serviceTarget: "AWSSecurityTokenServiceV20110615"
245
+ },
246
+ serviceId: config?.serviceId ?? "STS",
247
+ urlParser: config?.urlParser ?? url_parser_1.parseUrl,
248
+ utf8Decoder: config?.utf8Decoder ?? util_utf8_1.fromUtf8,
249
+ utf8Encoder: config?.utf8Encoder ?? util_utf8_1.toUtf8
250
+ };
251
+ };
252
+ exports.getRuntimeConfig = getRuntimeConfig;
253
+ });
254
+
255
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeConfig.js
256
+ var require_runtimeConfig = __commonJS((exports) => {
257
+ Object.defineProperty(exports, "__esModule", { value: true });
258
+ exports.getRuntimeConfig = undefined;
259
+ var tslib_1 = require_tslib();
260
+ var package_json_1 = tslib_1.__importDefault(require_package());
261
+ var core_1 = require_dist_cjs8();
262
+ var util_user_agent_node_1 = require_dist_cjs22();
263
+ var config_resolver_1 = require_dist_cjs16();
264
+ var core_2 = require_dist_cjs6();
265
+ var hash_node_1 = require_dist_cjs23();
266
+ var middleware_retry_1 = require_dist_cjs21();
267
+ var node_config_provider_1 = require_dist_cjs18();
268
+ var node_http_handler_1 = require_dist_cjs5();
269
+ var smithy_client_1 = require_dist_cjs7();
270
+ var util_body_length_node_1 = require_dist_cjs24();
271
+ var util_defaults_mode_node_1 = require_dist_cjs25();
272
+ var util_retry_1 = require_dist_cjs20();
273
+ var runtimeConfig_shared_1 = require_runtimeConfig_shared();
274
+ var getRuntimeConfig = (config) => {
275
+ (0, smithy_client_1.emitWarningIfUnsupportedVersion)(process.version);
276
+ const defaultsMode = (0, util_defaults_mode_node_1.resolveDefaultsModeConfig)(config);
277
+ const defaultConfigProvider = () => defaultsMode().then(smithy_client_1.loadConfigsForDefaultMode);
278
+ const clientSharedValues = (0, runtimeConfig_shared_1.getRuntimeConfig)(config);
279
+ (0, core_1.emitWarningIfUnsupportedVersion)(process.version);
280
+ const loaderConfig = {
281
+ profile: config?.profile,
282
+ logger: clientSharedValues.logger
283
+ };
284
+ return {
285
+ ...clientSharedValues,
286
+ ...config,
287
+ runtime: "node",
288
+ defaultsMode,
289
+ authSchemePreference: config?.authSchemePreference ?? (0, node_config_provider_1.loadConfig)(core_1.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
290
+ bodyLengthChecker: config?.bodyLengthChecker ?? util_body_length_node_1.calculateBodyLength,
291
+ defaultUserAgentProvider: config?.defaultUserAgentProvider ?? (0, util_user_agent_node_1.createDefaultUserAgentProvider)({ serviceId: clientSharedValues.serviceId, clientVersion: package_json_1.default.version }),
292
+ httpAuthSchemes: config?.httpAuthSchemes ?? [
293
+ {
294
+ schemeId: "aws.auth#sigv4",
295
+ identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
296
+ signer: new core_1.AwsSdkSigV4Signer
297
+ },
298
+ {
299
+ schemeId: "smithy.api#noAuth",
300
+ identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
301
+ signer: new core_2.NoAuthSigner
302
+ }
303
+ ],
304
+ maxAttempts: config?.maxAttempts ?? (0, node_config_provider_1.loadConfig)(middleware_retry_1.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
305
+ region: config?.region ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_REGION_CONFIG_OPTIONS, { ...config_resolver_1.NODE_REGION_CONFIG_FILE_OPTIONS, ...loaderConfig }),
306
+ requestHandler: node_http_handler_1.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
307
+ retryMode: config?.retryMode ?? (0, node_config_provider_1.loadConfig)({
308
+ ...middleware_retry_1.NODE_RETRY_MODE_CONFIG_OPTIONS,
309
+ default: async () => (await defaultConfigProvider()).retryMode || util_retry_1.DEFAULT_RETRY_MODE
310
+ }, config),
311
+ sha256: config?.sha256 ?? hash_node_1.Hash.bind(null, "sha256"),
312
+ streamCollector: config?.streamCollector ?? node_http_handler_1.streamCollector,
313
+ useDualstackEndpoint: config?.useDualstackEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
314
+ useFipsEndpoint: config?.useFipsEndpoint ?? (0, node_config_provider_1.loadConfig)(config_resolver_1.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
315
+ userAgentAppId: config?.userAgentAppId ?? (0, node_config_provider_1.loadConfig)(util_user_agent_node_1.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
316
+ };
317
+ };
318
+ exports.getRuntimeConfig = getRuntimeConfig;
319
+ });
320
+
321
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/auth/httpAuthExtensionConfiguration.js
322
+ var require_httpAuthExtensionConfiguration = __commonJS((exports) => {
323
+ Object.defineProperty(exports, "__esModule", { value: true });
324
+ exports.resolveHttpAuthRuntimeConfig = exports.getHttpAuthExtensionConfiguration = undefined;
325
+ var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
326
+ const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
327
+ let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
328
+ let _credentials = runtimeConfig.credentials;
329
+ return {
330
+ setHttpAuthScheme(httpAuthScheme) {
331
+ const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
332
+ if (index === -1) {
333
+ _httpAuthSchemes.push(httpAuthScheme);
334
+ } else {
335
+ _httpAuthSchemes.splice(index, 1, httpAuthScheme);
336
+ }
337
+ },
338
+ httpAuthSchemes() {
339
+ return _httpAuthSchemes;
340
+ },
341
+ setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
342
+ _httpAuthSchemeProvider = httpAuthSchemeProvider;
343
+ },
344
+ httpAuthSchemeProvider() {
345
+ return _httpAuthSchemeProvider;
346
+ },
347
+ setCredentials(credentials) {
348
+ _credentials = credentials;
349
+ },
350
+ credentials() {
351
+ return _credentials;
352
+ }
353
+ };
354
+ };
355
+ exports.getHttpAuthExtensionConfiguration = getHttpAuthExtensionConfiguration;
356
+ var resolveHttpAuthRuntimeConfig = (config) => {
357
+ return {
358
+ httpAuthSchemes: config.httpAuthSchemes(),
359
+ httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
360
+ credentials: config.credentials()
361
+ };
362
+ };
363
+ exports.resolveHttpAuthRuntimeConfig = resolveHttpAuthRuntimeConfig;
364
+ });
365
+
366
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/runtimeExtensions.js
367
+ var require_runtimeExtensions = __commonJS((exports) => {
368
+ Object.defineProperty(exports, "__esModule", { value: true });
369
+ exports.resolveRuntimeExtensions = undefined;
370
+ var region_config_resolver_1 = require_dist_cjs26();
371
+ var protocol_http_1 = require_dist_cjs();
372
+ var smithy_client_1 = require_dist_cjs7();
373
+ var httpAuthExtensionConfiguration_1 = require_httpAuthExtensionConfiguration();
374
+ var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
375
+ const extensionConfiguration = Object.assign((0, region_config_resolver_1.getAwsRegionExtensionConfiguration)(runtimeConfig), (0, smithy_client_1.getDefaultExtensionConfiguration)(runtimeConfig), (0, protocol_http_1.getHttpHandlerExtensionConfiguration)(runtimeConfig), (0, httpAuthExtensionConfiguration_1.getHttpAuthExtensionConfiguration)(runtimeConfig));
376
+ extensions.forEach((extension) => extension.configure(extensionConfiguration));
377
+ return Object.assign(runtimeConfig, (0, region_config_resolver_1.resolveAwsRegionExtensionConfiguration)(extensionConfiguration), (0, smithy_client_1.resolveDefaultRuntimeConfig)(extensionConfiguration), (0, protocol_http_1.resolveHttpHandlerRuntimeConfig)(extensionConfiguration), (0, httpAuthExtensionConfiguration_1.resolveHttpAuthRuntimeConfig)(extensionConfiguration));
378
+ };
379
+ exports.resolveRuntimeExtensions = resolveRuntimeExtensions;
380
+ });
381
+
382
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/STSClient.js
383
+ var require_STSClient = __commonJS((exports) => {
384
+ Object.defineProperty(exports, "__esModule", { value: true });
385
+ exports.STSClient = exports.__Client = undefined;
386
+ var middleware_host_header_1 = require_dist_cjs9();
387
+ var middleware_logger_1 = require_dist_cjs10();
388
+ var middleware_recursion_detection_1 = require_dist_cjs11();
389
+ var middleware_user_agent_1 = require_dist_cjs15();
390
+ var config_resolver_1 = require_dist_cjs16();
391
+ var core_1 = require_dist_cjs6();
392
+ var schema_1 = require_schema();
393
+ var middleware_content_length_1 = require_dist_cjs17();
394
+ var middleware_endpoint_1 = require_dist_cjs19();
395
+ var middleware_retry_1 = require_dist_cjs21();
396
+ var smithy_client_1 = require_dist_cjs7();
397
+ Object.defineProperty(exports, "__Client", { enumerable: true, get: function() {
398
+ return smithy_client_1.Client;
399
+ } });
400
+ var httpAuthSchemeProvider_1 = require_httpAuthSchemeProvider();
401
+ var EndpointParameters_1 = require_EndpointParameters();
402
+ var runtimeConfig_1 = require_runtimeConfig();
403
+ var runtimeExtensions_1 = require_runtimeExtensions();
404
+
405
+ class STSClient extends smithy_client_1.Client {
406
+ config;
407
+ constructor(...[configuration]) {
408
+ const _config_0 = (0, runtimeConfig_1.getRuntimeConfig)(configuration || {});
409
+ super(_config_0);
410
+ this.initConfig = _config_0;
411
+ const _config_1 = (0, EndpointParameters_1.resolveClientEndpointParameters)(_config_0);
412
+ const _config_2 = (0, middleware_user_agent_1.resolveUserAgentConfig)(_config_1);
413
+ const _config_3 = (0, middleware_retry_1.resolveRetryConfig)(_config_2);
414
+ const _config_4 = (0, config_resolver_1.resolveRegionConfig)(_config_3);
415
+ const _config_5 = (0, middleware_host_header_1.resolveHostHeaderConfig)(_config_4);
416
+ const _config_6 = (0, middleware_endpoint_1.resolveEndpointConfig)(_config_5);
417
+ const _config_7 = (0, httpAuthSchemeProvider_1.resolveHttpAuthSchemeConfig)(_config_6);
418
+ const _config_8 = (0, runtimeExtensions_1.resolveRuntimeExtensions)(_config_7, configuration?.extensions || []);
419
+ this.config = _config_8;
420
+ this.middlewareStack.use((0, schema_1.getSchemaSerdePlugin)(this.config));
421
+ this.middlewareStack.use((0, middleware_user_agent_1.getUserAgentPlugin)(this.config));
422
+ this.middlewareStack.use((0, middleware_retry_1.getRetryPlugin)(this.config));
423
+ this.middlewareStack.use((0, middleware_content_length_1.getContentLengthPlugin)(this.config));
424
+ this.middlewareStack.use((0, middleware_host_header_1.getHostHeaderPlugin)(this.config));
425
+ this.middlewareStack.use((0, middleware_logger_1.getLoggerPlugin)(this.config));
426
+ this.middlewareStack.use((0, middleware_recursion_detection_1.getRecursionDetectionPlugin)(this.config));
427
+ this.middlewareStack.use((0, core_1.getHttpAuthSchemeEndpointRuleSetPlugin)(this.config, {
428
+ httpAuthSchemeParametersProvider: httpAuthSchemeProvider_1.defaultSTSHttpAuthSchemeParametersProvider,
429
+ identityProviderConfigProvider: async (config) => new core_1.DefaultIdentityProviderConfig({
430
+ "aws.auth#sigv4": config.credentials
431
+ })
432
+ }));
433
+ this.middlewareStack.use((0, core_1.getHttpSigningPlugin)(this.config));
434
+ }
435
+ destroy() {
436
+ super.destroy();
437
+ }
438
+ }
439
+ exports.STSClient = STSClient;
440
+ });
441
+
442
+ // node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js
443
+ var require_sts = __commonJS((exports) => {
444
+ var STSClient = require_STSClient();
445
+ var smithyClient = require_dist_cjs7();
446
+ var middlewareEndpoint = require_dist_cjs19();
447
+ var EndpointParameters = require_EndpointParameters();
448
+ var schema = require_schema();
449
+ var client = require_client();
450
+ var regionConfigResolver = require_dist_cjs26();
451
+
452
+ class STSServiceException extends smithyClient.ServiceException {
453
+ constructor(options) {
454
+ super(options);
455
+ Object.setPrototypeOf(this, STSServiceException.prototype);
456
+ }
457
+ }
458
+
459
+ class ExpiredTokenException extends STSServiceException {
460
+ name = "ExpiredTokenException";
461
+ $fault = "client";
462
+ constructor(opts) {
463
+ super({
464
+ name: "ExpiredTokenException",
465
+ $fault: "client",
466
+ ...opts
467
+ });
468
+ Object.setPrototypeOf(this, ExpiredTokenException.prototype);
469
+ }
470
+ }
471
+
472
+ class MalformedPolicyDocumentException extends STSServiceException {
473
+ name = "MalformedPolicyDocumentException";
474
+ $fault = "client";
475
+ constructor(opts) {
476
+ super({
477
+ name: "MalformedPolicyDocumentException",
478
+ $fault: "client",
479
+ ...opts
480
+ });
481
+ Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
482
+ }
483
+ }
484
+
485
+ class PackedPolicyTooLargeException extends STSServiceException {
486
+ name = "PackedPolicyTooLargeException";
487
+ $fault = "client";
488
+ constructor(opts) {
489
+ super({
490
+ name: "PackedPolicyTooLargeException",
491
+ $fault: "client",
492
+ ...opts
493
+ });
494
+ Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
495
+ }
496
+ }
497
+
498
+ class RegionDisabledException extends STSServiceException {
499
+ name = "RegionDisabledException";
500
+ $fault = "client";
501
+ constructor(opts) {
502
+ super({
503
+ name: "RegionDisabledException",
504
+ $fault: "client",
505
+ ...opts
506
+ });
507
+ Object.setPrototypeOf(this, RegionDisabledException.prototype);
508
+ }
509
+ }
510
+
511
+ class IDPRejectedClaimException extends STSServiceException {
512
+ name = "IDPRejectedClaimException";
513
+ $fault = "client";
514
+ constructor(opts) {
515
+ super({
516
+ name: "IDPRejectedClaimException",
517
+ $fault: "client",
518
+ ...opts
519
+ });
520
+ Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
521
+ }
522
+ }
523
+
524
+ class InvalidIdentityTokenException extends STSServiceException {
525
+ name = "InvalidIdentityTokenException";
526
+ $fault = "client";
527
+ constructor(opts) {
528
+ super({
529
+ name: "InvalidIdentityTokenException",
530
+ $fault: "client",
531
+ ...opts
532
+ });
533
+ Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
534
+ }
535
+ }
536
+
537
+ class IDPCommunicationErrorException extends STSServiceException {
538
+ name = "IDPCommunicationErrorException";
539
+ $fault = "client";
540
+ constructor(opts) {
541
+ super({
542
+ name: "IDPCommunicationErrorException",
543
+ $fault: "client",
544
+ ...opts
545
+ });
546
+ Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
547
+ }
548
+ }
549
+ var _A = "Arn";
550
+ var _AKI = "AccessKeyId";
551
+ var _AR = "AssumeRole";
552
+ var _ARI = "AssumedRoleId";
553
+ var _ARR = "AssumeRoleRequest";
554
+ var _ARRs = "AssumeRoleResponse";
555
+ var _ARU = "AssumedRoleUser";
556
+ var _ARWWI = "AssumeRoleWithWebIdentity";
557
+ var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
558
+ var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
559
+ var _Au = "Audience";
560
+ var _C = "Credentials";
561
+ var _CA = "ContextAssertion";
562
+ var _DS = "DurationSeconds";
563
+ var _E = "Expiration";
564
+ var _EI = "ExternalId";
565
+ var _ETE = "ExpiredTokenException";
566
+ var _IDPCEE = "IDPCommunicationErrorException";
567
+ var _IDPRCE = "IDPRejectedClaimException";
568
+ var _IITE = "InvalidIdentityTokenException";
569
+ var _K = "Key";
570
+ var _MPDE = "MalformedPolicyDocumentException";
571
+ var _P = "Policy";
572
+ var _PA = "PolicyArns";
573
+ var _PAr = "ProviderArn";
574
+ var _PC = "ProvidedContexts";
575
+ var _PCLT = "ProvidedContextsListType";
576
+ var _PCr = "ProvidedContext";
577
+ var _PDT = "PolicyDescriptorType";
578
+ var _PI = "ProviderId";
579
+ var _PPS = "PackedPolicySize";
580
+ var _PPTLE = "PackedPolicyTooLargeException";
581
+ var _Pr = "Provider";
582
+ var _RA = "RoleArn";
583
+ var _RDE = "RegionDisabledException";
584
+ var _RSN = "RoleSessionName";
585
+ var _SAK = "SecretAccessKey";
586
+ var _SFWIT = "SubjectFromWebIdentityToken";
587
+ var _SI = "SourceIdentity";
588
+ var _SN = "SerialNumber";
589
+ var _ST = "SessionToken";
590
+ var _T = "Tags";
591
+ var _TC = "TokenCode";
592
+ var _TTK = "TransitiveTagKeys";
593
+ var _Ta = "Tag";
594
+ var _V = "Value";
595
+ var _WIT = "WebIdentityToken";
596
+ var _a = "arn";
597
+ var _aKST = "accessKeySecretType";
598
+ var _aQE = "awsQueryError";
599
+ var _c = "client";
600
+ var _cTT = "clientTokenType";
601
+ var _e = "error";
602
+ var _hE = "httpError";
603
+ var _m = "message";
604
+ var _pDLT = "policyDescriptorListType";
605
+ var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
606
+ var _tLT = "tagListType";
607
+ var n0 = "com.amazonaws.sts";
608
+ var accessKeySecretType = [0, n0, _aKST, 8, 0];
609
+ var clientTokenType = [0, n0, _cTT, 8, 0];
610
+ var AssumedRoleUser$ = [3, n0, _ARU, 0, [_ARI, _A], [0, 0]];
611
+ var AssumeRoleRequest$ = [
612
+ 3,
613
+ n0,
614
+ _ARR,
615
+ 0,
616
+ [_RA, _RSN, _PA, _P, _DS, _T, _TTK, _EI, _SN, _TC, _SI, _PC],
617
+ [0, 0, () => policyDescriptorListType, 0, 1, () => tagListType, 64 | 0, 0, 0, 0, 0, () => ProvidedContextsListType]
618
+ ];
619
+ var AssumeRoleResponse$ = [
620
+ 3,
621
+ n0,
622
+ _ARRs,
623
+ 0,
624
+ [_C, _ARU, _PPS, _SI],
625
+ [[() => Credentials$, 0], () => AssumedRoleUser$, 1, 0]
626
+ ];
627
+ var AssumeRoleWithWebIdentityRequest$ = [
628
+ 3,
629
+ n0,
630
+ _ARWWIR,
631
+ 0,
632
+ [_RA, _RSN, _WIT, _PI, _PA, _P, _DS],
633
+ [0, 0, [() => clientTokenType, 0], 0, () => policyDescriptorListType, 0, 1]
634
+ ];
635
+ var AssumeRoleWithWebIdentityResponse$ = [
636
+ 3,
637
+ n0,
638
+ _ARWWIRs,
639
+ 0,
640
+ [_C, _SFWIT, _ARU, _PPS, _Pr, _Au, _SI],
641
+ [[() => Credentials$, 0], 0, () => AssumedRoleUser$, 1, 0, 0, 0]
642
+ ];
643
+ var Credentials$ = [
644
+ 3,
645
+ n0,
646
+ _C,
647
+ 0,
648
+ [_AKI, _SAK, _ST, _E],
649
+ [0, [() => accessKeySecretType, 0], 0, 4]
650
+ ];
651
+ var ExpiredTokenException$ = [
652
+ -3,
653
+ n0,
654
+ _ETE,
655
+ { [_aQE]: [`ExpiredTokenException`, 400], [_e]: _c, [_hE]: 400 },
656
+ [_m],
657
+ [0]
658
+ ];
659
+ schema.TypeRegistry.for(n0).registerError(ExpiredTokenException$, ExpiredTokenException);
660
+ var IDPCommunicationErrorException$ = [
661
+ -3,
662
+ n0,
663
+ _IDPCEE,
664
+ { [_aQE]: [`IDPCommunicationError`, 400], [_e]: _c, [_hE]: 400 },
665
+ [_m],
666
+ [0]
667
+ ];
668
+ schema.TypeRegistry.for(n0).registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
669
+ var IDPRejectedClaimException$ = [
670
+ -3,
671
+ n0,
672
+ _IDPRCE,
673
+ { [_aQE]: [`IDPRejectedClaim`, 403], [_e]: _c, [_hE]: 403 },
674
+ [_m],
675
+ [0]
676
+ ];
677
+ schema.TypeRegistry.for(n0).registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
678
+ var InvalidIdentityTokenException$ = [
679
+ -3,
680
+ n0,
681
+ _IITE,
682
+ { [_aQE]: [`InvalidIdentityToken`, 400], [_e]: _c, [_hE]: 400 },
683
+ [_m],
684
+ [0]
685
+ ];
686
+ schema.TypeRegistry.for(n0).registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
687
+ var MalformedPolicyDocumentException$ = [
688
+ -3,
689
+ n0,
690
+ _MPDE,
691
+ { [_aQE]: [`MalformedPolicyDocument`, 400], [_e]: _c, [_hE]: 400 },
692
+ [_m],
693
+ [0]
694
+ ];
695
+ schema.TypeRegistry.for(n0).registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
696
+ var PackedPolicyTooLargeException$ = [
697
+ -3,
698
+ n0,
699
+ _PPTLE,
700
+ { [_aQE]: [`PackedPolicyTooLarge`, 400], [_e]: _c, [_hE]: 400 },
701
+ [_m],
702
+ [0]
703
+ ];
704
+ schema.TypeRegistry.for(n0).registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
705
+ var PolicyDescriptorType$ = [3, n0, _PDT, 0, [_a], [0]];
706
+ var ProvidedContext$ = [3, n0, _PCr, 0, [_PAr, _CA], [0, 0]];
707
+ var RegionDisabledException$ = [
708
+ -3,
709
+ n0,
710
+ _RDE,
711
+ { [_aQE]: [`RegionDisabledException`, 403], [_e]: _c, [_hE]: 403 },
712
+ [_m],
713
+ [0]
714
+ ];
715
+ schema.TypeRegistry.for(n0).registerError(RegionDisabledException$, RegionDisabledException);
716
+ var Tag$ = [3, n0, _Ta, 0, [_K, _V], [0, 0]];
717
+ var STSServiceException$ = [-3, _s, "STSServiceException", 0, [], []];
718
+ schema.TypeRegistry.for(_s).registerError(STSServiceException$, STSServiceException);
719
+ var policyDescriptorListType = [1, n0, _pDLT, 0, () => PolicyDescriptorType$];
720
+ var ProvidedContextsListType = [1, n0, _PCLT, 0, () => ProvidedContext$];
721
+ var tagListType = [1, n0, _tLT, 0, () => Tag$];
722
+ var AssumeRole$ = [9, n0, _AR, 0, () => AssumeRoleRequest$, () => AssumeRoleResponse$];
723
+ var AssumeRoleWithWebIdentity$ = [
724
+ 9,
725
+ n0,
726
+ _ARWWI,
727
+ 0,
728
+ () => AssumeRoleWithWebIdentityRequest$,
729
+ () => AssumeRoleWithWebIdentityResponse$
730
+ ];
731
+
732
+ class AssumeRoleCommand extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o) {
733
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
734
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {
735
+ }
736
+
737
+ class AssumeRoleWithWebIdentityCommand extends smithyClient.Command.classBuilder().ep(EndpointParameters.commonParams).m(function(Command, cs, config, o) {
738
+ return [middlewareEndpoint.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
739
+ }).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {
740
+ }
741
+ var commands = {
742
+ AssumeRoleCommand,
743
+ AssumeRoleWithWebIdentityCommand
744
+ };
745
+
746
+ class STS extends STSClient.STSClient {
747
+ }
748
+ smithyClient.createAggregatedClient(commands, STS);
749
+ var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
750
+ if (typeof assumedRoleUser?.Arn === "string") {
751
+ const arnComponents = assumedRoleUser.Arn.split(":");
752
+ if (arnComponents.length > 4 && arnComponents[4] !== "") {
753
+ return arnComponents[4];
754
+ }
755
+ }
756
+ return;
757
+ };
758
+ var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
759
+ const region = typeof _region === "function" ? await _region() : _region;
760
+ const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
761
+ let stsDefaultRegion = "";
762
+ const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await regionConfigResolver.stsRegionDefaultResolver(loaderConfig)());
763
+ credentialProviderLogger?.debug?.("@aws-sdk/client-sts::resolveRegion", "accepting first of:", `${region} (credential provider clientConfig)`, `${parentRegion} (contextual client)`, `${stsDefaultRegion} (STS default: AWS_REGION, profile region, or us-east-1)`);
764
+ return resolvedRegion;
765
+ };
766
+ var getDefaultRoleAssumer$1 = (stsOptions, STSClient2) => {
767
+ let stsClient;
768
+ let closureSourceCreds;
769
+ return async (sourceCreds, params) => {
770
+ closureSourceCreds = sourceCreds;
771
+ if (!stsClient) {
772
+ const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
773
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
774
+ logger,
775
+ profile
776
+ });
777
+ const isCompatibleRequestHandler = !isH2(requestHandler);
778
+ stsClient = new STSClient2({
779
+ ...stsOptions,
780
+ userAgentAppId,
781
+ profile,
782
+ credentialDefaultProvider: () => async () => closureSourceCreds,
783
+ region: resolvedRegion,
784
+ requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
785
+ logger
786
+ });
787
+ }
788
+ const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
789
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
790
+ throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
791
+ }
792
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
793
+ const credentials = {
794
+ accessKeyId: Credentials.AccessKeyId,
795
+ secretAccessKey: Credentials.SecretAccessKey,
796
+ sessionToken: Credentials.SessionToken,
797
+ expiration: Credentials.Expiration,
798
+ ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
799
+ ...accountId && { accountId }
800
+ };
801
+ client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
802
+ return credentials;
803
+ };
804
+ };
805
+ var getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient2) => {
806
+ let stsClient;
807
+ return async (params) => {
808
+ if (!stsClient) {
809
+ const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
810
+ const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
811
+ logger,
812
+ profile
813
+ });
814
+ const isCompatibleRequestHandler = !isH2(requestHandler);
815
+ stsClient = new STSClient2({
816
+ ...stsOptions,
817
+ userAgentAppId,
818
+ profile,
819
+ region: resolvedRegion,
820
+ requestHandler: isCompatibleRequestHandler ? requestHandler : undefined,
821
+ logger
822
+ });
823
+ }
824
+ const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
825
+ if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) {
826
+ throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
827
+ }
828
+ const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
829
+ const credentials = {
830
+ accessKeyId: Credentials.AccessKeyId,
831
+ secretAccessKey: Credentials.SecretAccessKey,
832
+ sessionToken: Credentials.SessionToken,
833
+ expiration: Credentials.Expiration,
834
+ ...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
835
+ ...accountId && { accountId }
836
+ };
837
+ if (accountId) {
838
+ client.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
839
+ }
840
+ client.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
841
+ return credentials;
842
+ };
843
+ };
844
+ var isH2 = (requestHandler) => {
845
+ return requestHandler?.metadata?.handlerProtocol === "h2";
846
+ };
847
+ var getCustomizableStsClientCtor = (baseCtor, customizations) => {
848
+ if (!customizations)
849
+ return baseCtor;
850
+ else
851
+ return class CustomizableSTSClient extends baseCtor {
852
+ constructor(config) {
853
+ super(config);
854
+ for (const customization of customizations) {
855
+ this.middlewareStack.use(customization);
856
+ }
857
+ }
858
+ };
859
+ };
860
+ var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
861
+ var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient.STSClient, stsPlugins));
862
+ var decorateDefaultCredentialProvider = (provider) => (input) => provider({
863
+ roleAssumer: getDefaultRoleAssumer(input),
864
+ roleAssumerWithWebIdentity: getDefaultRoleAssumerWithWebIdentity(input),
865
+ ...input
866
+ });
867
+ Object.defineProperty(exports, "$Command", {
868
+ enumerable: true,
869
+ get: function() {
870
+ return smithyClient.Command;
871
+ }
872
+ });
873
+ exports.AssumeRole$ = AssumeRole$;
874
+ exports.AssumeRoleCommand = AssumeRoleCommand;
875
+ exports.AssumeRoleRequest$ = AssumeRoleRequest$;
876
+ exports.AssumeRoleResponse$ = AssumeRoleResponse$;
877
+ exports.AssumeRoleWithWebIdentity$ = AssumeRoleWithWebIdentity$;
878
+ exports.AssumeRoleWithWebIdentityCommand = AssumeRoleWithWebIdentityCommand;
879
+ exports.AssumeRoleWithWebIdentityRequest$ = AssumeRoleWithWebIdentityRequest$;
880
+ exports.AssumeRoleWithWebIdentityResponse$ = AssumeRoleWithWebIdentityResponse$;
881
+ exports.AssumedRoleUser$ = AssumedRoleUser$;
882
+ exports.Credentials$ = Credentials$;
883
+ exports.ExpiredTokenException = ExpiredTokenException;
884
+ exports.ExpiredTokenException$ = ExpiredTokenException$;
885
+ exports.IDPCommunicationErrorException = IDPCommunicationErrorException;
886
+ exports.IDPCommunicationErrorException$ = IDPCommunicationErrorException$;
887
+ exports.IDPRejectedClaimException = IDPRejectedClaimException;
888
+ exports.IDPRejectedClaimException$ = IDPRejectedClaimException$;
889
+ exports.InvalidIdentityTokenException = InvalidIdentityTokenException;
890
+ exports.InvalidIdentityTokenException$ = InvalidIdentityTokenException$;
891
+ exports.MalformedPolicyDocumentException = MalformedPolicyDocumentException;
892
+ exports.MalformedPolicyDocumentException$ = MalformedPolicyDocumentException$;
893
+ exports.PackedPolicyTooLargeException = PackedPolicyTooLargeException;
894
+ exports.PackedPolicyTooLargeException$ = PackedPolicyTooLargeException$;
895
+ exports.PolicyDescriptorType$ = PolicyDescriptorType$;
896
+ exports.ProvidedContext$ = ProvidedContext$;
897
+ exports.RegionDisabledException = RegionDisabledException;
898
+ exports.RegionDisabledException$ = RegionDisabledException$;
899
+ exports.STS = STS;
900
+ exports.STSServiceException = STSServiceException;
901
+ exports.STSServiceException$ = STSServiceException$;
902
+ exports.Tag$ = Tag$;
903
+ exports.decorateDefaultCredentialProvider = decorateDefaultCredentialProvider;
904
+ exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
905
+ exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
906
+ Object.keys(STSClient).forEach(function(k) {
907
+ if (k !== "default" && !Object.prototype.hasOwnProperty.call(exports, k))
908
+ Object.defineProperty(exports, k, {
909
+ enumerable: true,
910
+ get: function() {
911
+ return STSClient[k];
912
+ }
913
+ });
914
+ });
915
+ });
916
+ export default require_sts();
917
+
918
+ export { require_sts };