@jr2804/livesync-cli 1.0.0-cli → 1.0.16-cli.1
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +44 -3
- package/dist/AwsRestJsonProtocol-BPmCQzXa.cjs +391 -0
- package/dist/CredentialsProviderError-DQ_v7TCm.cjs +45 -0
- package/dist/XmlShapeDeserializer-B1_gcW92.cjs +2097 -0
- package/dist/chain-D9g13I5f.cjs +21 -0
- package/dist/common-B3KclSP_.cjs +375 -0
- package/dist/configLoader-Cur07c2S.cjs +149 -0
- package/dist/date-utils-Dr5LXq4_.cjs +338 -0
- package/dist/dist-es-BU2b9jKG.cjs +274 -0
- package/dist/dist-es-CaaxKLO9.cjs +52 -0
- package/dist/dist-es-D7nIauPC.cjs +60 -0
- package/dist/dist-es-DhxfSNMj.cjs +128 -0
- package/dist/dist-es-FcX9AtZC.cjs +433 -0
- package/dist/dist-es-vq3O1QUl.cjs +331 -0
- package/dist/{index.browser-DZqJcWQp.cjs → event-streams-DmrxQXpO.cjs} +3 -3
- package/dist/extensions-DkDzTVCO.cjs +4823 -0
- package/dist/externalDataInterceptor-D7DaIG7M.cjs +24 -0
- package/dist/getSSOTokenFromFile-D0KPH2qZ.cjs +36 -0
- package/dist/httpRequest-C7Ex2WeE.cjs +59 -0
- package/dist/index.cjs +5949 -1556
- package/dist/loadSharedConfigFiles-CqEQHuLW.cjs +117 -0
- package/dist/loadSso-Dn78jIWR.cjs +639 -0
- package/dist/package-BC7A0_n0.cjs +158 -0
- package/dist/parseKnownFiles-DLeTaAhg.cjs +21 -0
- package/dist/readFile-B3ey_wDD.cjs +46 -0
- package/dist/sdk-stream-mixin-YBLWtp6l.cjs +146 -0
- package/dist/{index.browser-DbH0tIYi.cjs → serde-DtADB-gG.cjs} +178 -310
- package/dist/setCredentialFeature-qcUbSyqa.cjs +13 -0
- package/dist/signin-DHnd2WFx.cjs +715 -0
- package/dist/sso-oidc-B4fkm2gn.cjs +901 -0
- package/dist/stream-collector-jwXXBEUn.cjs +584 -0
- package/dist/sts-C9aqjeec.cjs +1531 -0
- package/package.json +8 -5
|
@@ -0,0 +1,1531 @@
|
|
|
1
|
+
const require_stream_collector = require("./stream-collector-jwXXBEUn.cjs");
|
|
2
|
+
const require_extensions = require("./extensions-DkDzTVCO.cjs");
|
|
3
|
+
const require_setCredentialFeature = require("./setCredentialFeature-qcUbSyqa.cjs");
|
|
4
|
+
const require_date_utils = require("./date-utils-Dr5LXq4_.cjs");
|
|
5
|
+
const require_serde = require("./serde-DtADB-gG.cjs");
|
|
6
|
+
const require_package = require("./package-BC7A0_n0.cjs");
|
|
7
|
+
const require_configLoader = require("./configLoader-Cur07c2S.cjs");
|
|
8
|
+
const require_XmlShapeDeserializer = require("./XmlShapeDeserializer-B1_gcW92.cjs");
|
|
9
|
+
//#region ../../../node_modules/@smithy/core/dist-es/submodules/protocols/RpcProtocol.js
|
|
10
|
+
var RpcProtocol = class extends require_extensions.HttpProtocol {
|
|
11
|
+
async serializeRequest(operationSchema, _input, context) {
|
|
12
|
+
const serializer = this.serializer;
|
|
13
|
+
const query = {};
|
|
14
|
+
const headers = {};
|
|
15
|
+
const endpoint = await context.endpoint();
|
|
16
|
+
const ns = require_extensions.NormalizedSchema.of(operationSchema?.input);
|
|
17
|
+
const schema = ns.getSchema();
|
|
18
|
+
let payload;
|
|
19
|
+
const input = _input && typeof _input === "object" ? _input : {};
|
|
20
|
+
const request = new require_extensions.HttpRequest({
|
|
21
|
+
protocol: "",
|
|
22
|
+
hostname: "",
|
|
23
|
+
port: void 0,
|
|
24
|
+
path: "/",
|
|
25
|
+
fragment: void 0,
|
|
26
|
+
query,
|
|
27
|
+
headers,
|
|
28
|
+
body: void 0
|
|
29
|
+
});
|
|
30
|
+
if (endpoint) {
|
|
31
|
+
this.updateServiceEndpoint(request, endpoint);
|
|
32
|
+
this.setHostPrefix(request, operationSchema, input);
|
|
33
|
+
}
|
|
34
|
+
if (input) {
|
|
35
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
36
|
+
if (eventStreamMember) {
|
|
37
|
+
if (input[eventStreamMember]) {
|
|
38
|
+
const initialRequest = {};
|
|
39
|
+
for (const [memberName, memberSchema] of ns.structIterator()) if (memberName !== eventStreamMember && input[memberName]) {
|
|
40
|
+
serializer.write(memberSchema, input[memberName]);
|
|
41
|
+
initialRequest[memberName] = serializer.flush();
|
|
42
|
+
}
|
|
43
|
+
payload = await this.serializeEventStream({
|
|
44
|
+
eventStream: input[eventStreamMember],
|
|
45
|
+
requestSchema: ns,
|
|
46
|
+
initialRequest
|
|
47
|
+
});
|
|
48
|
+
}
|
|
49
|
+
} else {
|
|
50
|
+
serializer.write(schema, input);
|
|
51
|
+
payload = serializer.flush();
|
|
52
|
+
}
|
|
53
|
+
}
|
|
54
|
+
request.headers = Object.assign(request.headers, headers);
|
|
55
|
+
request.query = query;
|
|
56
|
+
request.body = payload;
|
|
57
|
+
request.method = "POST";
|
|
58
|
+
return request;
|
|
59
|
+
}
|
|
60
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
61
|
+
const deserializer = this.deserializer;
|
|
62
|
+
const ns = require_extensions.NormalizedSchema.of(operationSchema.output);
|
|
63
|
+
const dataObject = {};
|
|
64
|
+
if (response.statusCode >= 300) {
|
|
65
|
+
const bytes = await require_extensions.collectBody(response.body, context);
|
|
66
|
+
if (bytes.byteLength > 0) Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
67
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
68
|
+
throw new Error("@smithy/core/protocols - RPC Protocol error handler failed to throw.");
|
|
69
|
+
}
|
|
70
|
+
for (const header in response.headers) {
|
|
71
|
+
const value = response.headers[header];
|
|
72
|
+
delete response.headers[header];
|
|
73
|
+
response.headers[header.toLowerCase()] = value;
|
|
74
|
+
}
|
|
75
|
+
const eventStreamMember = ns.getEventStreamMember();
|
|
76
|
+
if (eventStreamMember) dataObject[eventStreamMember] = await this.deserializeEventStream({
|
|
77
|
+
response,
|
|
78
|
+
responseSchema: ns,
|
|
79
|
+
initialResponseContainer: dataObject
|
|
80
|
+
});
|
|
81
|
+
else {
|
|
82
|
+
const bytes = await require_extensions.collectBody(response.body, context);
|
|
83
|
+
if (bytes.byteLength > 0) Object.assign(dataObject, await deserializer.read(ns, bytes));
|
|
84
|
+
}
|
|
85
|
+
dataObject.$metadata = this.deserializeMetadata(response);
|
|
86
|
+
return dataObject;
|
|
87
|
+
}
|
|
88
|
+
};
|
|
89
|
+
//#endregion
|
|
90
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/QueryShapeSerializer.js
|
|
91
|
+
var QueryShapeSerializer = class extends require_extensions.SerdeContextConfig {
|
|
92
|
+
settings;
|
|
93
|
+
buffer;
|
|
94
|
+
constructor(settings) {
|
|
95
|
+
super();
|
|
96
|
+
this.settings = settings;
|
|
97
|
+
}
|
|
98
|
+
write(schema, value, prefix = "") {
|
|
99
|
+
if (this.buffer === void 0) this.buffer = "";
|
|
100
|
+
const ns = require_extensions.NormalizedSchema.of(schema);
|
|
101
|
+
if (prefix && !prefix.endsWith(".")) prefix += ".";
|
|
102
|
+
if (ns.isBlobSchema()) {
|
|
103
|
+
if (typeof value === "string" || value instanceof Uint8Array) {
|
|
104
|
+
this.writeKey(prefix);
|
|
105
|
+
this.writeValue((this.serdeContext?.base64Encoder ?? require_stream_collector.toBase64)(value));
|
|
106
|
+
}
|
|
107
|
+
} else if (ns.isBooleanSchema() || ns.isNumericSchema() || ns.isStringSchema()) {
|
|
108
|
+
if (value != null) {
|
|
109
|
+
this.writeKey(prefix);
|
|
110
|
+
this.writeValue(String(value));
|
|
111
|
+
} else if (ns.isIdempotencyToken()) {
|
|
112
|
+
this.writeKey(prefix);
|
|
113
|
+
this.writeValue(require_serde.generateIdempotencyToken());
|
|
114
|
+
}
|
|
115
|
+
} else if (ns.isBigIntegerSchema()) {
|
|
116
|
+
if (value != null) {
|
|
117
|
+
this.writeKey(prefix);
|
|
118
|
+
this.writeValue(String(value));
|
|
119
|
+
}
|
|
120
|
+
} else if (ns.isBigDecimalSchema()) {
|
|
121
|
+
if (value != null) {
|
|
122
|
+
this.writeKey(prefix);
|
|
123
|
+
this.writeValue(value instanceof require_serde.NumericValue ? value.string : String(value));
|
|
124
|
+
}
|
|
125
|
+
} else if (ns.isTimestampSchema()) {
|
|
126
|
+
if (value instanceof Date) {
|
|
127
|
+
this.writeKey(prefix);
|
|
128
|
+
switch (require_extensions.determineTimestampFormat(ns, this.settings)) {
|
|
129
|
+
case 5:
|
|
130
|
+
this.writeValue(value.toISOString().replace(".000Z", "Z"));
|
|
131
|
+
break;
|
|
132
|
+
case 6:
|
|
133
|
+
this.writeValue(require_date_utils.dateToUtcString(value));
|
|
134
|
+
break;
|
|
135
|
+
case 7:
|
|
136
|
+
this.writeValue(String(value.getTime() / 1e3));
|
|
137
|
+
break;
|
|
138
|
+
}
|
|
139
|
+
}
|
|
140
|
+
} else if (ns.isDocumentSchema()) if (Array.isArray(value)) this.write(79, value, prefix);
|
|
141
|
+
else if (value instanceof Date) this.write(4, value, prefix);
|
|
142
|
+
else if (value instanceof Uint8Array) this.write(21, value, prefix);
|
|
143
|
+
else if (value && typeof value === "object") this.write(143, value, prefix);
|
|
144
|
+
else {
|
|
145
|
+
this.writeKey(prefix);
|
|
146
|
+
this.writeValue(String(value));
|
|
147
|
+
}
|
|
148
|
+
else if (ns.isListSchema()) {
|
|
149
|
+
if (Array.isArray(value)) if (value.length === 0) {
|
|
150
|
+
if (this.settings.serializeEmptyLists) {
|
|
151
|
+
this.writeKey(prefix);
|
|
152
|
+
this.writeValue("");
|
|
153
|
+
}
|
|
154
|
+
} else {
|
|
155
|
+
const member = ns.getValueSchema();
|
|
156
|
+
const flat = this.settings.flattenLists || ns.getMergedTraits().xmlFlattened;
|
|
157
|
+
let i = 1;
|
|
158
|
+
for (const item of value) {
|
|
159
|
+
if (item == null) continue;
|
|
160
|
+
const traits = member.getMergedTraits();
|
|
161
|
+
const suffix = this.getKey("member", traits.xmlName, traits.ec2QueryName);
|
|
162
|
+
const key = flat ? `${prefix}${i}` : `${prefix}${suffix}.${i}`;
|
|
163
|
+
this.write(member, item, key);
|
|
164
|
+
++i;
|
|
165
|
+
}
|
|
166
|
+
}
|
|
167
|
+
} else if (ns.isMapSchema()) {
|
|
168
|
+
if (value && typeof value === "object") {
|
|
169
|
+
const keySchema = ns.getKeySchema();
|
|
170
|
+
const memberSchema = ns.getValueSchema();
|
|
171
|
+
const flat = ns.getMergedTraits().xmlFlattened;
|
|
172
|
+
let i = 1;
|
|
173
|
+
for (const [k, v] of Object.entries(value)) {
|
|
174
|
+
if (v == null) continue;
|
|
175
|
+
const keyTraits = keySchema.getMergedTraits();
|
|
176
|
+
const keySuffix = this.getKey("key", keyTraits.xmlName, keyTraits.ec2QueryName);
|
|
177
|
+
const key = flat ? `${prefix}${i}.${keySuffix}` : `${prefix}entry.${i}.${keySuffix}`;
|
|
178
|
+
const valTraits = memberSchema.getMergedTraits();
|
|
179
|
+
const valueSuffix = this.getKey("value", valTraits.xmlName, valTraits.ec2QueryName);
|
|
180
|
+
const valueKey = flat ? `${prefix}${i}.${valueSuffix}` : `${prefix}entry.${i}.${valueSuffix}`;
|
|
181
|
+
this.write(keySchema, k, key);
|
|
182
|
+
this.write(memberSchema, v, valueKey);
|
|
183
|
+
++i;
|
|
184
|
+
}
|
|
185
|
+
}
|
|
186
|
+
} else if (ns.isStructSchema()) {
|
|
187
|
+
if (value && typeof value === "object") {
|
|
188
|
+
let didWriteMember = false;
|
|
189
|
+
for (const [memberName, member] of ns.structIterator()) {
|
|
190
|
+
if (value[memberName] == null && !member.isIdempotencyToken()) continue;
|
|
191
|
+
const traits = member.getMergedTraits();
|
|
192
|
+
const suffix = this.getKey(memberName, traits.xmlName, traits.ec2QueryName, "struct");
|
|
193
|
+
const key = `${prefix}${suffix}`;
|
|
194
|
+
this.write(member, value[memberName], key);
|
|
195
|
+
didWriteMember = true;
|
|
196
|
+
}
|
|
197
|
+
if (!didWriteMember && ns.isUnionSchema()) {
|
|
198
|
+
const { $unknown } = value;
|
|
199
|
+
if (Array.isArray($unknown)) {
|
|
200
|
+
const [k, v] = $unknown;
|
|
201
|
+
const key = `${prefix}${k}`;
|
|
202
|
+
this.write(15, v, key);
|
|
203
|
+
}
|
|
204
|
+
}
|
|
205
|
+
}
|
|
206
|
+
} else if (ns.isUnitSchema()) {} else throw new Error(`@aws-sdk/core/protocols - QuerySerializer unrecognized schema type ${ns.getName(true)}`);
|
|
207
|
+
}
|
|
208
|
+
flush() {
|
|
209
|
+
if (this.buffer === void 0) throw new Error("@aws-sdk/core/protocols - QuerySerializer cannot flush with nothing written to buffer.");
|
|
210
|
+
const str = this.buffer;
|
|
211
|
+
delete this.buffer;
|
|
212
|
+
return str;
|
|
213
|
+
}
|
|
214
|
+
getKey(memberName, xmlName, ec2QueryName, keySource) {
|
|
215
|
+
const { ec2, capitalizeKeys } = this.settings;
|
|
216
|
+
if (ec2 && ec2QueryName) return ec2QueryName;
|
|
217
|
+
const key = xmlName ?? memberName;
|
|
218
|
+
if (capitalizeKeys && keySource === "struct") return key[0].toUpperCase() + key.slice(1);
|
|
219
|
+
return key;
|
|
220
|
+
}
|
|
221
|
+
writeKey(key) {
|
|
222
|
+
if (key.endsWith(".")) key = key.slice(0, key.length - 1);
|
|
223
|
+
this.buffer += `&${require_extensions.extendedEncodeURIComponent(key)}=`;
|
|
224
|
+
}
|
|
225
|
+
writeValue(value) {
|
|
226
|
+
this.buffer += require_extensions.extendedEncodeURIComponent(value);
|
|
227
|
+
}
|
|
228
|
+
};
|
|
229
|
+
//#endregion
|
|
230
|
+
//#region ../../../node_modules/@aws-sdk/core/dist-es/submodules/protocols/query/AwsQueryProtocol.js
|
|
231
|
+
var AwsQueryProtocol = class extends RpcProtocol {
|
|
232
|
+
options;
|
|
233
|
+
serializer;
|
|
234
|
+
deserializer;
|
|
235
|
+
mixin = new require_extensions.ProtocolLib();
|
|
236
|
+
constructor(options) {
|
|
237
|
+
super({
|
|
238
|
+
defaultNamespace: options.defaultNamespace,
|
|
239
|
+
errorTypeRegistries: options.errorTypeRegistries
|
|
240
|
+
});
|
|
241
|
+
this.options = options;
|
|
242
|
+
const settings = {
|
|
243
|
+
timestampFormat: {
|
|
244
|
+
useTrait: true,
|
|
245
|
+
default: 5
|
|
246
|
+
},
|
|
247
|
+
httpBindings: false,
|
|
248
|
+
xmlNamespace: options.xmlNamespace,
|
|
249
|
+
serviceNamespace: options.defaultNamespace,
|
|
250
|
+
serializeEmptyLists: true
|
|
251
|
+
};
|
|
252
|
+
this.serializer = new QueryShapeSerializer(settings);
|
|
253
|
+
this.deserializer = new require_XmlShapeDeserializer.XmlShapeDeserializer(settings);
|
|
254
|
+
}
|
|
255
|
+
getShapeId() {
|
|
256
|
+
return "aws.protocols#awsQuery";
|
|
257
|
+
}
|
|
258
|
+
setSerdeContext(serdeContext) {
|
|
259
|
+
this.serializer.setSerdeContext(serdeContext);
|
|
260
|
+
this.deserializer.setSerdeContext(serdeContext);
|
|
261
|
+
}
|
|
262
|
+
getPayloadCodec() {
|
|
263
|
+
throw new Error("AWSQuery protocol has no payload codec.");
|
|
264
|
+
}
|
|
265
|
+
async serializeRequest(operationSchema, input, context) {
|
|
266
|
+
const request = await super.serializeRequest(operationSchema, input, context);
|
|
267
|
+
if (!request.path.endsWith("/")) request.path += "/";
|
|
268
|
+
Object.assign(request.headers, { "content-type": `application/x-www-form-urlencoded` });
|
|
269
|
+
if (require_extensions.deref(operationSchema.input) === "unit" || !request.body) request.body = "";
|
|
270
|
+
request.body = `Action=${operationSchema.name.split("#")[1] ?? operationSchema.name}&Version=${this.options.version}` + request.body;
|
|
271
|
+
if (request.body.endsWith("&")) request.body = request.body.slice(-1);
|
|
272
|
+
return request;
|
|
273
|
+
}
|
|
274
|
+
async deserializeResponse(operationSchema, context, response) {
|
|
275
|
+
const deserializer = this.deserializer;
|
|
276
|
+
const ns = require_extensions.NormalizedSchema.of(operationSchema.output);
|
|
277
|
+
const dataObject = {};
|
|
278
|
+
if (response.statusCode >= 300) {
|
|
279
|
+
const bytes = await require_extensions.collectBody(response.body, context);
|
|
280
|
+
if (bytes.byteLength > 0) Object.assign(dataObject, await deserializer.read(15, bytes));
|
|
281
|
+
await this.handleError(operationSchema, context, response, dataObject, this.deserializeMetadata(response));
|
|
282
|
+
}
|
|
283
|
+
for (const header in response.headers) {
|
|
284
|
+
const value = response.headers[header];
|
|
285
|
+
delete response.headers[header];
|
|
286
|
+
response.headers[header.toLowerCase()] = value;
|
|
287
|
+
}
|
|
288
|
+
const shortName = operationSchema.name.split("#")[1] ?? operationSchema.name;
|
|
289
|
+
const awsQueryResultKey = ns.isStructSchema() && this.useNestedResult() ? shortName + "Result" : void 0;
|
|
290
|
+
const bytes = await require_extensions.collectBody(response.body, context);
|
|
291
|
+
if (bytes.byteLength > 0) Object.assign(dataObject, await deserializer.read(ns, bytes, awsQueryResultKey));
|
|
292
|
+
return {
|
|
293
|
+
$metadata: this.deserializeMetadata(response),
|
|
294
|
+
...dataObject
|
|
295
|
+
};
|
|
296
|
+
}
|
|
297
|
+
useNestedResult() {
|
|
298
|
+
return true;
|
|
299
|
+
}
|
|
300
|
+
async handleError(operationSchema, context, response, dataObject, metadata) {
|
|
301
|
+
const errorIdentifier = this.loadQueryErrorCode(response, dataObject) ?? "Unknown";
|
|
302
|
+
this.mixin.compose(this.compositeErrorRegistry, errorIdentifier, this.options.defaultNamespace);
|
|
303
|
+
const errorData = this.loadQueryError(dataObject) ?? {};
|
|
304
|
+
const message = this.loadQueryErrorMessage(dataObject);
|
|
305
|
+
errorData.message = message;
|
|
306
|
+
errorData.Error = {
|
|
307
|
+
Type: errorData.Type,
|
|
308
|
+
Code: errorData.Code,
|
|
309
|
+
Message: message
|
|
310
|
+
};
|
|
311
|
+
const { errorSchema, errorMetadata } = await this.mixin.getErrorSchemaOrThrowBaseException(errorIdentifier, this.options.defaultNamespace, response, errorData, metadata, this.mixin.findQueryCompatibleError);
|
|
312
|
+
const ns = require_extensions.NormalizedSchema.of(errorSchema);
|
|
313
|
+
const exception = new ((this.compositeErrorRegistry.getErrorCtor(errorSchema)) ?? Error)(message);
|
|
314
|
+
const output = {
|
|
315
|
+
Type: errorData.Error.Type,
|
|
316
|
+
Code: errorData.Error.Code,
|
|
317
|
+
Error: errorData.Error
|
|
318
|
+
};
|
|
319
|
+
for (const [name, member] of ns.structIterator()) {
|
|
320
|
+
const target = member.getMergedTraits().xmlName ?? name;
|
|
321
|
+
const value = errorData[target] ?? dataObject[target];
|
|
322
|
+
output[name] = this.deserializer.readSchema(member, value);
|
|
323
|
+
}
|
|
324
|
+
throw this.mixin.decorateServiceException(Object.assign(exception, errorMetadata, {
|
|
325
|
+
$fault: ns.getMergedTraits().error,
|
|
326
|
+
message
|
|
327
|
+
}, output), dataObject);
|
|
328
|
+
}
|
|
329
|
+
loadQueryErrorCode(output, data) {
|
|
330
|
+
const code = (data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error)?.Code;
|
|
331
|
+
if (code !== void 0) return code;
|
|
332
|
+
if (output.statusCode == 404) return "NotFound";
|
|
333
|
+
}
|
|
334
|
+
loadQueryError(data) {
|
|
335
|
+
return data.Errors?.[0]?.Error ?? data.Errors?.Error ?? data.Error;
|
|
336
|
+
}
|
|
337
|
+
loadQueryErrorMessage(data) {
|
|
338
|
+
const errorData = this.loadQueryError(data);
|
|
339
|
+
return errorData?.message ?? errorData?.Message ?? data.message ?? data.Message ?? "Unknown";
|
|
340
|
+
}
|
|
341
|
+
getDefaultContentType() {
|
|
342
|
+
return "application/x-www-form-urlencoded";
|
|
343
|
+
}
|
|
344
|
+
};
|
|
345
|
+
//#endregion
|
|
346
|
+
//#region ../../../node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/stsRegionDefaultResolver.js
|
|
347
|
+
function stsRegionDefaultResolver(loaderConfig = {}) {
|
|
348
|
+
return require_configLoader.loadConfig({
|
|
349
|
+
...require_extensions.NODE_REGION_CONFIG_OPTIONS,
|
|
350
|
+
async default() {
|
|
351
|
+
if (!warning.silence) console.warn("@aws-sdk - WARN - default STS region of us-east-1 used. See @aws-sdk/credential-providers README and set a region explicitly.");
|
|
352
|
+
return "us-east-1";
|
|
353
|
+
}
|
|
354
|
+
}, {
|
|
355
|
+
...require_extensions.NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
356
|
+
...loaderConfig
|
|
357
|
+
});
|
|
358
|
+
}
|
|
359
|
+
var warning = { silence: false };
|
|
360
|
+
//#endregion
|
|
361
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthSchemeProvider.js
|
|
362
|
+
var defaultSTSHttpAuthSchemeParametersProvider = async (config, context, input) => {
|
|
363
|
+
return {
|
|
364
|
+
operation: require_extensions.getSmithyContext(context).operation,
|
|
365
|
+
region: await require_extensions.normalizeProvider(config.region)() || (() => {
|
|
366
|
+
throw new Error("expected `region` to be configured for `aws.auth#sigv4`");
|
|
367
|
+
})()
|
|
368
|
+
};
|
|
369
|
+
};
|
|
370
|
+
function createAwsAuthSigv4HttpAuthOption(authParameters) {
|
|
371
|
+
return {
|
|
372
|
+
schemeId: "aws.auth#sigv4",
|
|
373
|
+
signingProperties: {
|
|
374
|
+
name: "sts",
|
|
375
|
+
region: authParameters.region
|
|
376
|
+
},
|
|
377
|
+
propertiesExtractor: (config, context) => ({ signingProperties: {
|
|
378
|
+
config,
|
|
379
|
+
context
|
|
380
|
+
} })
|
|
381
|
+
};
|
|
382
|
+
}
|
|
383
|
+
function createSmithyApiNoAuthHttpAuthOption(authParameters) {
|
|
384
|
+
return { schemeId: "smithy.api#noAuth" };
|
|
385
|
+
}
|
|
386
|
+
var defaultSTSHttpAuthSchemeProvider = (authParameters) => {
|
|
387
|
+
const options = [];
|
|
388
|
+
switch (authParameters.operation) {
|
|
389
|
+
case "AssumeRoleWithWebIdentity":
|
|
390
|
+
options.push(createSmithyApiNoAuthHttpAuthOption(authParameters));
|
|
391
|
+
break;
|
|
392
|
+
default: options.push(createAwsAuthSigv4HttpAuthOption(authParameters));
|
|
393
|
+
}
|
|
394
|
+
return options;
|
|
395
|
+
};
|
|
396
|
+
var resolveStsAuthConfig = (input) => Object.assign(input, { stsClientCtor: STSClient });
|
|
397
|
+
var resolveHttpAuthSchemeConfig = (config) => {
|
|
398
|
+
const config_1 = require_extensions.resolveAwsSdkSigV4Config(resolveStsAuthConfig(config));
|
|
399
|
+
return Object.assign(config_1, { authSchemePreference: require_extensions.normalizeProvider(config.authSchemePreference ?? []) });
|
|
400
|
+
};
|
|
401
|
+
//#endregion
|
|
402
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/EndpointParameters.js
|
|
403
|
+
var resolveClientEndpointParameters = (options) => {
|
|
404
|
+
return Object.assign(options, {
|
|
405
|
+
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
|
406
|
+
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
|
407
|
+
useGlobalEndpoint: options.useGlobalEndpoint ?? false,
|
|
408
|
+
defaultSigningName: "sts"
|
|
409
|
+
});
|
|
410
|
+
};
|
|
411
|
+
var commonParams = {
|
|
412
|
+
UseGlobalEndpoint: {
|
|
413
|
+
type: "builtInParams",
|
|
414
|
+
name: "useGlobalEndpoint"
|
|
415
|
+
},
|
|
416
|
+
UseFIPS: {
|
|
417
|
+
type: "builtInParams",
|
|
418
|
+
name: "useFipsEndpoint"
|
|
419
|
+
},
|
|
420
|
+
Endpoint: {
|
|
421
|
+
type: "builtInParams",
|
|
422
|
+
name: "endpoint"
|
|
423
|
+
},
|
|
424
|
+
Region: {
|
|
425
|
+
type: "builtInParams",
|
|
426
|
+
name: "region"
|
|
427
|
+
},
|
|
428
|
+
UseDualStack: {
|
|
429
|
+
type: "builtInParams",
|
|
430
|
+
name: "useDualstackEndpoint"
|
|
431
|
+
}
|
|
432
|
+
};
|
|
433
|
+
//#endregion
|
|
434
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/ruleset.js
|
|
435
|
+
var F = "required", G = "type", H = "fn", I = "argv", J = "ref";
|
|
436
|
+
var a = false, b = true, c = "booleanEquals", d = "stringEquals", e = "sigv4", f = "sts", g = "us-east-1", h = "endpoint", i = "https://sts.{Region}.{PartitionResult#dnsSuffix}", j = "tree", k = "error", l = "getAttr", m = {
|
|
437
|
+
[F]: false,
|
|
438
|
+
[G]: "string"
|
|
439
|
+
}, n = {
|
|
440
|
+
[F]: true,
|
|
441
|
+
default: false,
|
|
442
|
+
[G]: "boolean"
|
|
443
|
+
}, o = { [J]: "Endpoint" }, p = {
|
|
444
|
+
[H]: "isSet",
|
|
445
|
+
[I]: [{ [J]: "Region" }]
|
|
446
|
+
}, q = { [J]: "Region" }, r = {
|
|
447
|
+
[H]: "aws.partition",
|
|
448
|
+
[I]: [q],
|
|
449
|
+
assign: "PartitionResult"
|
|
450
|
+
}, s = { [J]: "UseFIPS" }, t = { [J]: "UseDualStack" }, u = {
|
|
451
|
+
url: "https://sts.amazonaws.com",
|
|
452
|
+
properties: { authSchemes: [{
|
|
453
|
+
name: e,
|
|
454
|
+
signingName: f,
|
|
455
|
+
signingRegion: g
|
|
456
|
+
}] },
|
|
457
|
+
headers: {}
|
|
458
|
+
}, v = {}, w = {
|
|
459
|
+
conditions: [{
|
|
460
|
+
[H]: d,
|
|
461
|
+
[I]: [q, "aws-global"]
|
|
462
|
+
}],
|
|
463
|
+
[h]: u,
|
|
464
|
+
[G]: h
|
|
465
|
+
}, x = {
|
|
466
|
+
[H]: c,
|
|
467
|
+
[I]: [s, true]
|
|
468
|
+
}, y = {
|
|
469
|
+
[H]: c,
|
|
470
|
+
[I]: [t, true]
|
|
471
|
+
}, z = {
|
|
472
|
+
[H]: l,
|
|
473
|
+
[I]: [{ [J]: "PartitionResult" }, "supportsFIPS"]
|
|
474
|
+
}, A = { [J]: "PartitionResult" }, B = {
|
|
475
|
+
[H]: c,
|
|
476
|
+
[I]: [true, {
|
|
477
|
+
[H]: l,
|
|
478
|
+
[I]: [A, "supportsDualStack"]
|
|
479
|
+
}]
|
|
480
|
+
}, C = [{
|
|
481
|
+
[H]: "isSet",
|
|
482
|
+
[I]: [o]
|
|
483
|
+
}], D = [x], E = [y];
|
|
484
|
+
var ruleSet = {
|
|
485
|
+
version: "1.0",
|
|
486
|
+
parameters: {
|
|
487
|
+
Region: m,
|
|
488
|
+
UseDualStack: n,
|
|
489
|
+
UseFIPS: n,
|
|
490
|
+
Endpoint: m,
|
|
491
|
+
UseGlobalEndpoint: n
|
|
492
|
+
},
|
|
493
|
+
rules: [
|
|
494
|
+
{
|
|
495
|
+
conditions: [
|
|
496
|
+
{
|
|
497
|
+
[H]: c,
|
|
498
|
+
[I]: [{ [J]: "UseGlobalEndpoint" }, b]
|
|
499
|
+
},
|
|
500
|
+
{
|
|
501
|
+
[H]: "not",
|
|
502
|
+
[I]: C
|
|
503
|
+
},
|
|
504
|
+
p,
|
|
505
|
+
r,
|
|
506
|
+
{
|
|
507
|
+
[H]: c,
|
|
508
|
+
[I]: [s, a]
|
|
509
|
+
},
|
|
510
|
+
{
|
|
511
|
+
[H]: c,
|
|
512
|
+
[I]: [t, a]
|
|
513
|
+
}
|
|
514
|
+
],
|
|
515
|
+
rules: [
|
|
516
|
+
{
|
|
517
|
+
conditions: [{
|
|
518
|
+
[H]: d,
|
|
519
|
+
[I]: [q, "ap-northeast-1"]
|
|
520
|
+
}],
|
|
521
|
+
endpoint: u,
|
|
522
|
+
[G]: h
|
|
523
|
+
},
|
|
524
|
+
{
|
|
525
|
+
conditions: [{
|
|
526
|
+
[H]: d,
|
|
527
|
+
[I]: [q, "ap-south-1"]
|
|
528
|
+
}],
|
|
529
|
+
endpoint: u,
|
|
530
|
+
[G]: h
|
|
531
|
+
},
|
|
532
|
+
{
|
|
533
|
+
conditions: [{
|
|
534
|
+
[H]: d,
|
|
535
|
+
[I]: [q, "ap-southeast-1"]
|
|
536
|
+
}],
|
|
537
|
+
endpoint: u,
|
|
538
|
+
[G]: h
|
|
539
|
+
},
|
|
540
|
+
{
|
|
541
|
+
conditions: [{
|
|
542
|
+
[H]: d,
|
|
543
|
+
[I]: [q, "ap-southeast-2"]
|
|
544
|
+
}],
|
|
545
|
+
endpoint: u,
|
|
546
|
+
[G]: h
|
|
547
|
+
},
|
|
548
|
+
w,
|
|
549
|
+
{
|
|
550
|
+
conditions: [{
|
|
551
|
+
[H]: d,
|
|
552
|
+
[I]: [q, "ca-central-1"]
|
|
553
|
+
}],
|
|
554
|
+
endpoint: u,
|
|
555
|
+
[G]: h
|
|
556
|
+
},
|
|
557
|
+
{
|
|
558
|
+
conditions: [{
|
|
559
|
+
[H]: d,
|
|
560
|
+
[I]: [q, "eu-central-1"]
|
|
561
|
+
}],
|
|
562
|
+
endpoint: u,
|
|
563
|
+
[G]: h
|
|
564
|
+
},
|
|
565
|
+
{
|
|
566
|
+
conditions: [{
|
|
567
|
+
[H]: d,
|
|
568
|
+
[I]: [q, "eu-north-1"]
|
|
569
|
+
}],
|
|
570
|
+
endpoint: u,
|
|
571
|
+
[G]: h
|
|
572
|
+
},
|
|
573
|
+
{
|
|
574
|
+
conditions: [{
|
|
575
|
+
[H]: d,
|
|
576
|
+
[I]: [q, "eu-west-1"]
|
|
577
|
+
}],
|
|
578
|
+
endpoint: u,
|
|
579
|
+
[G]: h
|
|
580
|
+
},
|
|
581
|
+
{
|
|
582
|
+
conditions: [{
|
|
583
|
+
[H]: d,
|
|
584
|
+
[I]: [q, "eu-west-2"]
|
|
585
|
+
}],
|
|
586
|
+
endpoint: u,
|
|
587
|
+
[G]: h
|
|
588
|
+
},
|
|
589
|
+
{
|
|
590
|
+
conditions: [{
|
|
591
|
+
[H]: d,
|
|
592
|
+
[I]: [q, "eu-west-3"]
|
|
593
|
+
}],
|
|
594
|
+
endpoint: u,
|
|
595
|
+
[G]: h
|
|
596
|
+
},
|
|
597
|
+
{
|
|
598
|
+
conditions: [{
|
|
599
|
+
[H]: d,
|
|
600
|
+
[I]: [q, "sa-east-1"]
|
|
601
|
+
}],
|
|
602
|
+
endpoint: u,
|
|
603
|
+
[G]: h
|
|
604
|
+
},
|
|
605
|
+
{
|
|
606
|
+
conditions: [{
|
|
607
|
+
[H]: d,
|
|
608
|
+
[I]: [q, g]
|
|
609
|
+
}],
|
|
610
|
+
endpoint: u,
|
|
611
|
+
[G]: h
|
|
612
|
+
},
|
|
613
|
+
{
|
|
614
|
+
conditions: [{
|
|
615
|
+
[H]: d,
|
|
616
|
+
[I]: [q, "us-east-2"]
|
|
617
|
+
}],
|
|
618
|
+
endpoint: u,
|
|
619
|
+
[G]: h
|
|
620
|
+
},
|
|
621
|
+
{
|
|
622
|
+
conditions: [{
|
|
623
|
+
[H]: d,
|
|
624
|
+
[I]: [q, "us-west-1"]
|
|
625
|
+
}],
|
|
626
|
+
endpoint: u,
|
|
627
|
+
[G]: h
|
|
628
|
+
},
|
|
629
|
+
{
|
|
630
|
+
conditions: [{
|
|
631
|
+
[H]: d,
|
|
632
|
+
[I]: [q, "us-west-2"]
|
|
633
|
+
}],
|
|
634
|
+
endpoint: u,
|
|
635
|
+
[G]: h
|
|
636
|
+
},
|
|
637
|
+
{
|
|
638
|
+
endpoint: {
|
|
639
|
+
url: i,
|
|
640
|
+
properties: { authSchemes: [{
|
|
641
|
+
name: e,
|
|
642
|
+
signingName: f,
|
|
643
|
+
signingRegion: "{Region}"
|
|
644
|
+
}] },
|
|
645
|
+
headers: v
|
|
646
|
+
},
|
|
647
|
+
[G]: h
|
|
648
|
+
}
|
|
649
|
+
],
|
|
650
|
+
[G]: j
|
|
651
|
+
},
|
|
652
|
+
{
|
|
653
|
+
conditions: C,
|
|
654
|
+
rules: [
|
|
655
|
+
{
|
|
656
|
+
conditions: D,
|
|
657
|
+
error: "Invalid Configuration: FIPS and custom endpoint are not supported",
|
|
658
|
+
[G]: k
|
|
659
|
+
},
|
|
660
|
+
{
|
|
661
|
+
conditions: E,
|
|
662
|
+
error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
|
|
663
|
+
[G]: k
|
|
664
|
+
},
|
|
665
|
+
{
|
|
666
|
+
endpoint: {
|
|
667
|
+
url: o,
|
|
668
|
+
properties: v,
|
|
669
|
+
headers: v
|
|
670
|
+
},
|
|
671
|
+
[G]: h
|
|
672
|
+
}
|
|
673
|
+
],
|
|
674
|
+
[G]: j
|
|
675
|
+
},
|
|
676
|
+
{
|
|
677
|
+
conditions: [p],
|
|
678
|
+
rules: [{
|
|
679
|
+
conditions: [r],
|
|
680
|
+
rules: [
|
|
681
|
+
{
|
|
682
|
+
conditions: [x, y],
|
|
683
|
+
rules: [{
|
|
684
|
+
conditions: [{
|
|
685
|
+
[H]: c,
|
|
686
|
+
[I]: [b, z]
|
|
687
|
+
}, B],
|
|
688
|
+
rules: [{
|
|
689
|
+
endpoint: {
|
|
690
|
+
url: "https://sts-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
|
691
|
+
properties: v,
|
|
692
|
+
headers: v
|
|
693
|
+
},
|
|
694
|
+
[G]: h
|
|
695
|
+
}],
|
|
696
|
+
[G]: j
|
|
697
|
+
}, {
|
|
698
|
+
error: "FIPS and DualStack are enabled, but this partition does not support one or both",
|
|
699
|
+
[G]: k
|
|
700
|
+
}],
|
|
701
|
+
[G]: j
|
|
702
|
+
},
|
|
703
|
+
{
|
|
704
|
+
conditions: D,
|
|
705
|
+
rules: [{
|
|
706
|
+
conditions: [{
|
|
707
|
+
[H]: c,
|
|
708
|
+
[I]: [z, b]
|
|
709
|
+
}],
|
|
710
|
+
rules: [{
|
|
711
|
+
conditions: [{
|
|
712
|
+
[H]: d,
|
|
713
|
+
[I]: [{
|
|
714
|
+
[H]: l,
|
|
715
|
+
[I]: [A, "name"]
|
|
716
|
+
}, "aws-us-gov"]
|
|
717
|
+
}],
|
|
718
|
+
endpoint: {
|
|
719
|
+
url: "https://sts.{Region}.amazonaws.com",
|
|
720
|
+
properties: v,
|
|
721
|
+
headers: v
|
|
722
|
+
},
|
|
723
|
+
[G]: h
|
|
724
|
+
}, {
|
|
725
|
+
endpoint: {
|
|
726
|
+
url: "https://sts-fips.{Region}.{PartitionResult#dnsSuffix}",
|
|
727
|
+
properties: v,
|
|
728
|
+
headers: v
|
|
729
|
+
},
|
|
730
|
+
[G]: h
|
|
731
|
+
}],
|
|
732
|
+
[G]: j
|
|
733
|
+
}, {
|
|
734
|
+
error: "FIPS is enabled but this partition does not support FIPS",
|
|
735
|
+
[G]: k
|
|
736
|
+
}],
|
|
737
|
+
[G]: j
|
|
738
|
+
},
|
|
739
|
+
{
|
|
740
|
+
conditions: E,
|
|
741
|
+
rules: [{
|
|
742
|
+
conditions: [B],
|
|
743
|
+
rules: [{
|
|
744
|
+
endpoint: {
|
|
745
|
+
url: "https://sts.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
|
746
|
+
properties: v,
|
|
747
|
+
headers: v
|
|
748
|
+
},
|
|
749
|
+
[G]: h
|
|
750
|
+
}],
|
|
751
|
+
[G]: j
|
|
752
|
+
}, {
|
|
753
|
+
error: "DualStack is enabled but this partition does not support DualStack",
|
|
754
|
+
[G]: k
|
|
755
|
+
}],
|
|
756
|
+
[G]: j
|
|
757
|
+
},
|
|
758
|
+
w,
|
|
759
|
+
{
|
|
760
|
+
endpoint: {
|
|
761
|
+
url: i,
|
|
762
|
+
properties: v,
|
|
763
|
+
headers: v
|
|
764
|
+
},
|
|
765
|
+
[G]: h
|
|
766
|
+
}
|
|
767
|
+
],
|
|
768
|
+
[G]: j
|
|
769
|
+
}],
|
|
770
|
+
[G]: j
|
|
771
|
+
},
|
|
772
|
+
{
|
|
773
|
+
error: "Invalid Configuration: Missing Region",
|
|
774
|
+
[G]: k
|
|
775
|
+
}
|
|
776
|
+
]
|
|
777
|
+
};
|
|
778
|
+
//#endregion
|
|
779
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/endpoint/endpointResolver.js
|
|
780
|
+
var cache = new require_extensions.EndpointCache({
|
|
781
|
+
size: 50,
|
|
782
|
+
params: [
|
|
783
|
+
"Endpoint",
|
|
784
|
+
"Region",
|
|
785
|
+
"UseDualStack",
|
|
786
|
+
"UseFIPS",
|
|
787
|
+
"UseGlobalEndpoint"
|
|
788
|
+
]
|
|
789
|
+
});
|
|
790
|
+
var defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
791
|
+
return cache.get(endpointParams, () => require_extensions.resolveEndpoint(ruleSet, {
|
|
792
|
+
endpointParams,
|
|
793
|
+
logger: context.logger
|
|
794
|
+
}));
|
|
795
|
+
};
|
|
796
|
+
require_extensions.customEndpointFunctions.aws = require_extensions.awsEndpointFunctions;
|
|
797
|
+
//#endregion
|
|
798
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/STSServiceException.js
|
|
799
|
+
var STSServiceException = class STSServiceException extends require_extensions.ServiceException {
|
|
800
|
+
constructor(options) {
|
|
801
|
+
super(options);
|
|
802
|
+
Object.setPrototypeOf(this, STSServiceException.prototype);
|
|
803
|
+
}
|
|
804
|
+
};
|
|
805
|
+
//#endregion
|
|
806
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/models/errors.js
|
|
807
|
+
var ExpiredTokenException = class ExpiredTokenException extends STSServiceException {
|
|
808
|
+
name = "ExpiredTokenException";
|
|
809
|
+
$fault = "client";
|
|
810
|
+
constructor(opts) {
|
|
811
|
+
super({
|
|
812
|
+
name: "ExpiredTokenException",
|
|
813
|
+
$fault: "client",
|
|
814
|
+
...opts
|
|
815
|
+
});
|
|
816
|
+
Object.setPrototypeOf(this, ExpiredTokenException.prototype);
|
|
817
|
+
}
|
|
818
|
+
};
|
|
819
|
+
var MalformedPolicyDocumentException = class MalformedPolicyDocumentException extends STSServiceException {
|
|
820
|
+
name = "MalformedPolicyDocumentException";
|
|
821
|
+
$fault = "client";
|
|
822
|
+
constructor(opts) {
|
|
823
|
+
super({
|
|
824
|
+
name: "MalformedPolicyDocumentException",
|
|
825
|
+
$fault: "client",
|
|
826
|
+
...opts
|
|
827
|
+
});
|
|
828
|
+
Object.setPrototypeOf(this, MalformedPolicyDocumentException.prototype);
|
|
829
|
+
}
|
|
830
|
+
};
|
|
831
|
+
var PackedPolicyTooLargeException = class PackedPolicyTooLargeException extends STSServiceException {
|
|
832
|
+
name = "PackedPolicyTooLargeException";
|
|
833
|
+
$fault = "client";
|
|
834
|
+
constructor(opts) {
|
|
835
|
+
super({
|
|
836
|
+
name: "PackedPolicyTooLargeException",
|
|
837
|
+
$fault: "client",
|
|
838
|
+
...opts
|
|
839
|
+
});
|
|
840
|
+
Object.setPrototypeOf(this, PackedPolicyTooLargeException.prototype);
|
|
841
|
+
}
|
|
842
|
+
};
|
|
843
|
+
var RegionDisabledException = class RegionDisabledException extends STSServiceException {
|
|
844
|
+
name = "RegionDisabledException";
|
|
845
|
+
$fault = "client";
|
|
846
|
+
constructor(opts) {
|
|
847
|
+
super({
|
|
848
|
+
name: "RegionDisabledException",
|
|
849
|
+
$fault: "client",
|
|
850
|
+
...opts
|
|
851
|
+
});
|
|
852
|
+
Object.setPrototypeOf(this, RegionDisabledException.prototype);
|
|
853
|
+
}
|
|
854
|
+
};
|
|
855
|
+
var IDPRejectedClaimException = class IDPRejectedClaimException extends STSServiceException {
|
|
856
|
+
name = "IDPRejectedClaimException";
|
|
857
|
+
$fault = "client";
|
|
858
|
+
constructor(opts) {
|
|
859
|
+
super({
|
|
860
|
+
name: "IDPRejectedClaimException",
|
|
861
|
+
$fault: "client",
|
|
862
|
+
...opts
|
|
863
|
+
});
|
|
864
|
+
Object.setPrototypeOf(this, IDPRejectedClaimException.prototype);
|
|
865
|
+
}
|
|
866
|
+
};
|
|
867
|
+
var InvalidIdentityTokenException = class InvalidIdentityTokenException extends STSServiceException {
|
|
868
|
+
name = "InvalidIdentityTokenException";
|
|
869
|
+
$fault = "client";
|
|
870
|
+
constructor(opts) {
|
|
871
|
+
super({
|
|
872
|
+
name: "InvalidIdentityTokenException",
|
|
873
|
+
$fault: "client",
|
|
874
|
+
...opts
|
|
875
|
+
});
|
|
876
|
+
Object.setPrototypeOf(this, InvalidIdentityTokenException.prototype);
|
|
877
|
+
}
|
|
878
|
+
};
|
|
879
|
+
var IDPCommunicationErrorException = class IDPCommunicationErrorException extends STSServiceException {
|
|
880
|
+
name = "IDPCommunicationErrorException";
|
|
881
|
+
$fault = "client";
|
|
882
|
+
constructor(opts) {
|
|
883
|
+
super({
|
|
884
|
+
name: "IDPCommunicationErrorException",
|
|
885
|
+
$fault: "client",
|
|
886
|
+
...opts
|
|
887
|
+
});
|
|
888
|
+
Object.setPrototypeOf(this, IDPCommunicationErrorException.prototype);
|
|
889
|
+
}
|
|
890
|
+
};
|
|
891
|
+
//#endregion
|
|
892
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/schemas/schemas_0.js
|
|
893
|
+
var _A = "Arn";
|
|
894
|
+
var _AKI = "AccessKeyId";
|
|
895
|
+
var _AR = "AssumeRole";
|
|
896
|
+
var _ARI = "AssumedRoleId";
|
|
897
|
+
var _ARR = "AssumeRoleRequest";
|
|
898
|
+
var _ARRs = "AssumeRoleResponse";
|
|
899
|
+
var _ARU = "AssumedRoleUser";
|
|
900
|
+
var _ARWWI = "AssumeRoleWithWebIdentity";
|
|
901
|
+
var _ARWWIR = "AssumeRoleWithWebIdentityRequest";
|
|
902
|
+
var _ARWWIRs = "AssumeRoleWithWebIdentityResponse";
|
|
903
|
+
var _Au = "Audience";
|
|
904
|
+
var _C = "Credentials";
|
|
905
|
+
var _CA = "ContextAssertion";
|
|
906
|
+
var _DS = "DurationSeconds";
|
|
907
|
+
var _E = "Expiration";
|
|
908
|
+
var _EI = "ExternalId";
|
|
909
|
+
var _ETE = "ExpiredTokenException";
|
|
910
|
+
var _IDPCEE = "IDPCommunicationErrorException";
|
|
911
|
+
var _IDPRCE = "IDPRejectedClaimException";
|
|
912
|
+
var _IITE = "InvalidIdentityTokenException";
|
|
913
|
+
var _K = "Key";
|
|
914
|
+
var _MPDE = "MalformedPolicyDocumentException";
|
|
915
|
+
var _P = "Policy";
|
|
916
|
+
var _PA = "PolicyArns";
|
|
917
|
+
var _PAr = "ProviderArn";
|
|
918
|
+
var _PC = "ProvidedContexts";
|
|
919
|
+
var _PCLT = "ProvidedContextsListType";
|
|
920
|
+
var _PCr = "ProvidedContext";
|
|
921
|
+
var _PDT = "PolicyDescriptorType";
|
|
922
|
+
var _PI = "ProviderId";
|
|
923
|
+
var _PPS = "PackedPolicySize";
|
|
924
|
+
var _PPTLE = "PackedPolicyTooLargeException";
|
|
925
|
+
var _Pr = "Provider";
|
|
926
|
+
var _RA = "RoleArn";
|
|
927
|
+
var _RDE = "RegionDisabledException";
|
|
928
|
+
var _RSN = "RoleSessionName";
|
|
929
|
+
var _SAK = "SecretAccessKey";
|
|
930
|
+
var _SFWIT = "SubjectFromWebIdentityToken";
|
|
931
|
+
var _SI = "SourceIdentity";
|
|
932
|
+
var _SN = "SerialNumber";
|
|
933
|
+
var _ST = "SessionToken";
|
|
934
|
+
var _T = "Tags";
|
|
935
|
+
var _TC = "TokenCode";
|
|
936
|
+
var _TTK = "TransitiveTagKeys";
|
|
937
|
+
var _Ta = "Tag";
|
|
938
|
+
var _V = "Value";
|
|
939
|
+
var _WIT = "WebIdentityToken";
|
|
940
|
+
var _a = "arn";
|
|
941
|
+
var _aKST = "accessKeySecretType";
|
|
942
|
+
var _aQE = "awsQueryError";
|
|
943
|
+
var _c = "client";
|
|
944
|
+
var _cTT = "clientTokenType";
|
|
945
|
+
var _e = "error";
|
|
946
|
+
var _hE = "httpError";
|
|
947
|
+
var _m = "message";
|
|
948
|
+
var _pDLT = "policyDescriptorListType";
|
|
949
|
+
var _s = "smithy.ts.sdk.synthetic.com.amazonaws.sts";
|
|
950
|
+
var _tLT = "tagListType";
|
|
951
|
+
var n0 = "com.amazonaws.sts";
|
|
952
|
+
var _s_registry = require_extensions.TypeRegistry.for(_s);
|
|
953
|
+
var STSServiceException$ = [
|
|
954
|
+
-3,
|
|
955
|
+
_s,
|
|
956
|
+
"STSServiceException",
|
|
957
|
+
0,
|
|
958
|
+
[],
|
|
959
|
+
[]
|
|
960
|
+
];
|
|
961
|
+
_s_registry.registerError(STSServiceException$, STSServiceException);
|
|
962
|
+
var n0_registry = require_extensions.TypeRegistry.for(n0);
|
|
963
|
+
var ExpiredTokenException$ = [
|
|
964
|
+
-3,
|
|
965
|
+
n0,
|
|
966
|
+
_ETE,
|
|
967
|
+
{
|
|
968
|
+
[_aQE]: [`ExpiredTokenException`, 400],
|
|
969
|
+
[_e]: _c,
|
|
970
|
+
[_hE]: 400
|
|
971
|
+
},
|
|
972
|
+
[_m],
|
|
973
|
+
[0]
|
|
974
|
+
];
|
|
975
|
+
n0_registry.registerError(ExpiredTokenException$, ExpiredTokenException);
|
|
976
|
+
var IDPCommunicationErrorException$ = [
|
|
977
|
+
-3,
|
|
978
|
+
n0,
|
|
979
|
+
_IDPCEE,
|
|
980
|
+
{
|
|
981
|
+
[_aQE]: [`IDPCommunicationError`, 400],
|
|
982
|
+
[_e]: _c,
|
|
983
|
+
[_hE]: 400
|
|
984
|
+
},
|
|
985
|
+
[_m],
|
|
986
|
+
[0]
|
|
987
|
+
];
|
|
988
|
+
n0_registry.registerError(IDPCommunicationErrorException$, IDPCommunicationErrorException);
|
|
989
|
+
var IDPRejectedClaimException$ = [
|
|
990
|
+
-3,
|
|
991
|
+
n0,
|
|
992
|
+
_IDPRCE,
|
|
993
|
+
{
|
|
994
|
+
[_aQE]: [`IDPRejectedClaim`, 403],
|
|
995
|
+
[_e]: _c,
|
|
996
|
+
[_hE]: 403
|
|
997
|
+
},
|
|
998
|
+
[_m],
|
|
999
|
+
[0]
|
|
1000
|
+
];
|
|
1001
|
+
n0_registry.registerError(IDPRejectedClaimException$, IDPRejectedClaimException);
|
|
1002
|
+
var InvalidIdentityTokenException$ = [
|
|
1003
|
+
-3,
|
|
1004
|
+
n0,
|
|
1005
|
+
_IITE,
|
|
1006
|
+
{
|
|
1007
|
+
[_aQE]: [`InvalidIdentityToken`, 400],
|
|
1008
|
+
[_e]: _c,
|
|
1009
|
+
[_hE]: 400
|
|
1010
|
+
},
|
|
1011
|
+
[_m],
|
|
1012
|
+
[0]
|
|
1013
|
+
];
|
|
1014
|
+
n0_registry.registerError(InvalidIdentityTokenException$, InvalidIdentityTokenException);
|
|
1015
|
+
var MalformedPolicyDocumentException$ = [
|
|
1016
|
+
-3,
|
|
1017
|
+
n0,
|
|
1018
|
+
_MPDE,
|
|
1019
|
+
{
|
|
1020
|
+
[_aQE]: [`MalformedPolicyDocument`, 400],
|
|
1021
|
+
[_e]: _c,
|
|
1022
|
+
[_hE]: 400
|
|
1023
|
+
},
|
|
1024
|
+
[_m],
|
|
1025
|
+
[0]
|
|
1026
|
+
];
|
|
1027
|
+
n0_registry.registerError(MalformedPolicyDocumentException$, MalformedPolicyDocumentException);
|
|
1028
|
+
var PackedPolicyTooLargeException$ = [
|
|
1029
|
+
-3,
|
|
1030
|
+
n0,
|
|
1031
|
+
_PPTLE,
|
|
1032
|
+
{
|
|
1033
|
+
[_aQE]: [`PackedPolicyTooLarge`, 400],
|
|
1034
|
+
[_e]: _c,
|
|
1035
|
+
[_hE]: 400
|
|
1036
|
+
},
|
|
1037
|
+
[_m],
|
|
1038
|
+
[0]
|
|
1039
|
+
];
|
|
1040
|
+
n0_registry.registerError(PackedPolicyTooLargeException$, PackedPolicyTooLargeException);
|
|
1041
|
+
var RegionDisabledException$ = [
|
|
1042
|
+
-3,
|
|
1043
|
+
n0,
|
|
1044
|
+
_RDE,
|
|
1045
|
+
{
|
|
1046
|
+
[_aQE]: [`RegionDisabledException`, 403],
|
|
1047
|
+
[_e]: _c,
|
|
1048
|
+
[_hE]: 403
|
|
1049
|
+
},
|
|
1050
|
+
[_m],
|
|
1051
|
+
[0]
|
|
1052
|
+
];
|
|
1053
|
+
n0_registry.registerError(RegionDisabledException$, RegionDisabledException);
|
|
1054
|
+
var errorTypeRegistries = [_s_registry, n0_registry];
|
|
1055
|
+
var accessKeySecretType = [
|
|
1056
|
+
0,
|
|
1057
|
+
n0,
|
|
1058
|
+
_aKST,
|
|
1059
|
+
8,
|
|
1060
|
+
0
|
|
1061
|
+
];
|
|
1062
|
+
var clientTokenType = [
|
|
1063
|
+
0,
|
|
1064
|
+
n0,
|
|
1065
|
+
_cTT,
|
|
1066
|
+
8,
|
|
1067
|
+
0
|
|
1068
|
+
];
|
|
1069
|
+
var AssumedRoleUser$ = [
|
|
1070
|
+
3,
|
|
1071
|
+
n0,
|
|
1072
|
+
_ARU,
|
|
1073
|
+
0,
|
|
1074
|
+
[_ARI, _A],
|
|
1075
|
+
[0, 0],
|
|
1076
|
+
2
|
|
1077
|
+
];
|
|
1078
|
+
var AssumeRoleRequest$ = [
|
|
1079
|
+
3,
|
|
1080
|
+
n0,
|
|
1081
|
+
_ARR,
|
|
1082
|
+
0,
|
|
1083
|
+
[
|
|
1084
|
+
_RA,
|
|
1085
|
+
_RSN,
|
|
1086
|
+
_PA,
|
|
1087
|
+
_P,
|
|
1088
|
+
_DS,
|
|
1089
|
+
_T,
|
|
1090
|
+
_TTK,
|
|
1091
|
+
_EI,
|
|
1092
|
+
_SN,
|
|
1093
|
+
_TC,
|
|
1094
|
+
_SI,
|
|
1095
|
+
_PC
|
|
1096
|
+
],
|
|
1097
|
+
[
|
|
1098
|
+
0,
|
|
1099
|
+
0,
|
|
1100
|
+
() => policyDescriptorListType,
|
|
1101
|
+
0,
|
|
1102
|
+
1,
|
|
1103
|
+
() => tagListType,
|
|
1104
|
+
64,
|
|
1105
|
+
0,
|
|
1106
|
+
0,
|
|
1107
|
+
0,
|
|
1108
|
+
0,
|
|
1109
|
+
() => ProvidedContextsListType
|
|
1110
|
+
],
|
|
1111
|
+
2
|
|
1112
|
+
];
|
|
1113
|
+
var AssumeRoleResponse$ = [
|
|
1114
|
+
3,
|
|
1115
|
+
n0,
|
|
1116
|
+
_ARRs,
|
|
1117
|
+
0,
|
|
1118
|
+
[
|
|
1119
|
+
_C,
|
|
1120
|
+
_ARU,
|
|
1121
|
+
_PPS,
|
|
1122
|
+
_SI
|
|
1123
|
+
],
|
|
1124
|
+
[
|
|
1125
|
+
[() => Credentials$, 0],
|
|
1126
|
+
() => AssumedRoleUser$,
|
|
1127
|
+
1,
|
|
1128
|
+
0
|
|
1129
|
+
]
|
|
1130
|
+
];
|
|
1131
|
+
var AssumeRoleWithWebIdentityRequest$ = [
|
|
1132
|
+
3,
|
|
1133
|
+
n0,
|
|
1134
|
+
_ARWWIR,
|
|
1135
|
+
0,
|
|
1136
|
+
[
|
|
1137
|
+
_RA,
|
|
1138
|
+
_RSN,
|
|
1139
|
+
_WIT,
|
|
1140
|
+
_PI,
|
|
1141
|
+
_PA,
|
|
1142
|
+
_P,
|
|
1143
|
+
_DS
|
|
1144
|
+
],
|
|
1145
|
+
[
|
|
1146
|
+
0,
|
|
1147
|
+
0,
|
|
1148
|
+
[() => clientTokenType, 0],
|
|
1149
|
+
0,
|
|
1150
|
+
() => policyDescriptorListType,
|
|
1151
|
+
0,
|
|
1152
|
+
1
|
|
1153
|
+
],
|
|
1154
|
+
3
|
|
1155
|
+
];
|
|
1156
|
+
var AssumeRoleWithWebIdentityResponse$ = [
|
|
1157
|
+
3,
|
|
1158
|
+
n0,
|
|
1159
|
+
_ARWWIRs,
|
|
1160
|
+
0,
|
|
1161
|
+
[
|
|
1162
|
+
_C,
|
|
1163
|
+
_SFWIT,
|
|
1164
|
+
_ARU,
|
|
1165
|
+
_PPS,
|
|
1166
|
+
_Pr,
|
|
1167
|
+
_Au,
|
|
1168
|
+
_SI
|
|
1169
|
+
],
|
|
1170
|
+
[
|
|
1171
|
+
[() => Credentials$, 0],
|
|
1172
|
+
0,
|
|
1173
|
+
() => AssumedRoleUser$,
|
|
1174
|
+
1,
|
|
1175
|
+
0,
|
|
1176
|
+
0,
|
|
1177
|
+
0
|
|
1178
|
+
]
|
|
1179
|
+
];
|
|
1180
|
+
var Credentials$ = [
|
|
1181
|
+
3,
|
|
1182
|
+
n0,
|
|
1183
|
+
_C,
|
|
1184
|
+
0,
|
|
1185
|
+
[
|
|
1186
|
+
_AKI,
|
|
1187
|
+
_SAK,
|
|
1188
|
+
_ST,
|
|
1189
|
+
_E
|
|
1190
|
+
],
|
|
1191
|
+
[
|
|
1192
|
+
0,
|
|
1193
|
+
[() => accessKeySecretType, 0],
|
|
1194
|
+
0,
|
|
1195
|
+
4
|
|
1196
|
+
],
|
|
1197
|
+
4
|
|
1198
|
+
];
|
|
1199
|
+
var PolicyDescriptorType$ = [
|
|
1200
|
+
3,
|
|
1201
|
+
n0,
|
|
1202
|
+
_PDT,
|
|
1203
|
+
0,
|
|
1204
|
+
[_a],
|
|
1205
|
+
[0]
|
|
1206
|
+
];
|
|
1207
|
+
var ProvidedContext$ = [
|
|
1208
|
+
3,
|
|
1209
|
+
n0,
|
|
1210
|
+
_PCr,
|
|
1211
|
+
0,
|
|
1212
|
+
[_PAr, _CA],
|
|
1213
|
+
[0, 0]
|
|
1214
|
+
];
|
|
1215
|
+
var Tag$ = [
|
|
1216
|
+
3,
|
|
1217
|
+
n0,
|
|
1218
|
+
_Ta,
|
|
1219
|
+
0,
|
|
1220
|
+
[_K, _V],
|
|
1221
|
+
[0, 0],
|
|
1222
|
+
2
|
|
1223
|
+
];
|
|
1224
|
+
var policyDescriptorListType = [
|
|
1225
|
+
1,
|
|
1226
|
+
n0,
|
|
1227
|
+
_pDLT,
|
|
1228
|
+
0,
|
|
1229
|
+
() => PolicyDescriptorType$
|
|
1230
|
+
];
|
|
1231
|
+
var ProvidedContextsListType = [
|
|
1232
|
+
1,
|
|
1233
|
+
n0,
|
|
1234
|
+
_PCLT,
|
|
1235
|
+
0,
|
|
1236
|
+
() => ProvidedContext$
|
|
1237
|
+
];
|
|
1238
|
+
var tagListType = [
|
|
1239
|
+
1,
|
|
1240
|
+
n0,
|
|
1241
|
+
_tLT,
|
|
1242
|
+
0,
|
|
1243
|
+
() => Tag$
|
|
1244
|
+
];
|
|
1245
|
+
var AssumeRole$ = [
|
|
1246
|
+
9,
|
|
1247
|
+
n0,
|
|
1248
|
+
_AR,
|
|
1249
|
+
0,
|
|
1250
|
+
() => AssumeRoleRequest$,
|
|
1251
|
+
() => AssumeRoleResponse$
|
|
1252
|
+
];
|
|
1253
|
+
var AssumeRoleWithWebIdentity$ = [
|
|
1254
|
+
9,
|
|
1255
|
+
n0,
|
|
1256
|
+
_ARWWI,
|
|
1257
|
+
0,
|
|
1258
|
+
() => AssumeRoleWithWebIdentityRequest$,
|
|
1259
|
+
() => AssumeRoleWithWebIdentityResponse$
|
|
1260
|
+
];
|
|
1261
|
+
//#endregion
|
|
1262
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.shared.js
|
|
1263
|
+
var getRuntimeConfig$1 = (config) => {
|
|
1264
|
+
return {
|
|
1265
|
+
apiVersion: "2011-06-15",
|
|
1266
|
+
base64Decoder: config?.base64Decoder ?? require_stream_collector.fromBase64,
|
|
1267
|
+
base64Encoder: config?.base64Encoder ?? require_stream_collector.toBase64,
|
|
1268
|
+
disableHostPrefix: config?.disableHostPrefix ?? false,
|
|
1269
|
+
endpointProvider: config?.endpointProvider ?? defaultEndpointResolver,
|
|
1270
|
+
extensions: config?.extensions ?? [],
|
|
1271
|
+
httpAuthSchemeProvider: config?.httpAuthSchemeProvider ?? defaultSTSHttpAuthSchemeProvider,
|
|
1272
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [{
|
|
1273
|
+
schemeId: "aws.auth#sigv4",
|
|
1274
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4"),
|
|
1275
|
+
signer: new require_extensions.AwsSdkSigV4Signer()
|
|
1276
|
+
}, {
|
|
1277
|
+
schemeId: "smithy.api#noAuth",
|
|
1278
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
1279
|
+
signer: new require_package.NoAuthSigner()
|
|
1280
|
+
}],
|
|
1281
|
+
logger: config?.logger ?? new require_extensions.NoOpLogger(),
|
|
1282
|
+
protocol: config?.protocol ?? AwsQueryProtocol,
|
|
1283
|
+
protocolSettings: config?.protocolSettings ?? {
|
|
1284
|
+
defaultNamespace: "com.amazonaws.sts",
|
|
1285
|
+
errorTypeRegistries,
|
|
1286
|
+
xmlNamespace: "https://sts.amazonaws.com/doc/2011-06-15/",
|
|
1287
|
+
version: "2011-06-15",
|
|
1288
|
+
serviceTarget: "AWSSecurityTokenServiceV20110615"
|
|
1289
|
+
},
|
|
1290
|
+
serviceId: config?.serviceId ?? "STS",
|
|
1291
|
+
urlParser: config?.urlParser ?? require_configLoader.parseUrl,
|
|
1292
|
+
utf8Decoder: config?.utf8Decoder ?? require_date_utils.fromUtf8,
|
|
1293
|
+
utf8Encoder: config?.utf8Encoder ?? require_date_utils.toUtf8
|
|
1294
|
+
};
|
|
1295
|
+
};
|
|
1296
|
+
//#endregion
|
|
1297
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeConfig.js
|
|
1298
|
+
var getRuntimeConfig = (config) => {
|
|
1299
|
+
require_extensions.emitWarningIfUnsupportedVersion(process.version);
|
|
1300
|
+
const defaultsMode = require_extensions.resolveDefaultsModeConfig(config);
|
|
1301
|
+
const defaultConfigProvider = () => defaultsMode().then(require_extensions.loadConfigsForDefaultMode);
|
|
1302
|
+
const clientSharedValues = getRuntimeConfig$1(config);
|
|
1303
|
+
require_extensions.emitWarningIfUnsupportedVersion$1(process.version);
|
|
1304
|
+
const loaderConfig = {
|
|
1305
|
+
profile: config?.profile,
|
|
1306
|
+
logger: clientSharedValues.logger
|
|
1307
|
+
};
|
|
1308
|
+
return {
|
|
1309
|
+
...clientSharedValues,
|
|
1310
|
+
...config,
|
|
1311
|
+
runtime: "node",
|
|
1312
|
+
defaultsMode,
|
|
1313
|
+
authSchemePreference: config?.authSchemePreference ?? require_configLoader.loadConfig(require_extensions.NODE_AUTH_SCHEME_PREFERENCE_OPTIONS, loaderConfig),
|
|
1314
|
+
bodyLengthChecker: config?.bodyLengthChecker ?? require_extensions.calculateBodyLength,
|
|
1315
|
+
defaultUserAgentProvider: config?.defaultUserAgentProvider ?? require_extensions.createDefaultUserAgentProvider({
|
|
1316
|
+
serviceId: clientSharedValues.serviceId,
|
|
1317
|
+
clientVersion: require_package.package_default.version
|
|
1318
|
+
}),
|
|
1319
|
+
httpAuthSchemes: config?.httpAuthSchemes ?? [{
|
|
1320
|
+
schemeId: "aws.auth#sigv4",
|
|
1321
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("aws.auth#sigv4") || (async (idProps) => await config.credentialDefaultProvider(idProps?.__config || {})()),
|
|
1322
|
+
signer: new require_extensions.AwsSdkSigV4Signer()
|
|
1323
|
+
}, {
|
|
1324
|
+
schemeId: "smithy.api#noAuth",
|
|
1325
|
+
identityProvider: (ipc) => ipc.getIdentityProvider("smithy.api#noAuth") || (async () => ({})),
|
|
1326
|
+
signer: new require_package.NoAuthSigner()
|
|
1327
|
+
}],
|
|
1328
|
+
maxAttempts: config?.maxAttempts ?? require_configLoader.loadConfig(require_extensions.NODE_MAX_ATTEMPT_CONFIG_OPTIONS, config),
|
|
1329
|
+
region: config?.region ?? require_configLoader.loadConfig(require_extensions.NODE_REGION_CONFIG_OPTIONS, {
|
|
1330
|
+
...require_extensions.NODE_REGION_CONFIG_FILE_OPTIONS,
|
|
1331
|
+
...loaderConfig
|
|
1332
|
+
}),
|
|
1333
|
+
requestHandler: require_stream_collector.NodeHttpHandler.create(config?.requestHandler ?? defaultConfigProvider),
|
|
1334
|
+
retryMode: config?.retryMode ?? require_configLoader.loadConfig({
|
|
1335
|
+
...require_extensions.NODE_RETRY_MODE_CONFIG_OPTIONS,
|
|
1336
|
+
default: async () => (await defaultConfigProvider()).retryMode || require_extensions.DEFAULT_RETRY_MODE
|
|
1337
|
+
}, config),
|
|
1338
|
+
sha256: config?.sha256 ?? require_extensions.Hash.bind(null, "sha256"),
|
|
1339
|
+
streamCollector: config?.streamCollector ?? require_stream_collector.streamCollector,
|
|
1340
|
+
useDualstackEndpoint: config?.useDualstackEndpoint ?? require_configLoader.loadConfig(require_extensions.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
1341
|
+
useFipsEndpoint: config?.useFipsEndpoint ?? require_configLoader.loadConfig(require_extensions.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS, loaderConfig),
|
|
1342
|
+
userAgentAppId: config?.userAgentAppId ?? require_configLoader.loadConfig(require_extensions.NODE_APP_ID_CONFIG_OPTIONS, loaderConfig)
|
|
1343
|
+
};
|
|
1344
|
+
};
|
|
1345
|
+
//#endregion
|
|
1346
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/auth/httpAuthExtensionConfiguration.js
|
|
1347
|
+
var getHttpAuthExtensionConfiguration = (runtimeConfig) => {
|
|
1348
|
+
const _httpAuthSchemes = runtimeConfig.httpAuthSchemes;
|
|
1349
|
+
let _httpAuthSchemeProvider = runtimeConfig.httpAuthSchemeProvider;
|
|
1350
|
+
let _credentials = runtimeConfig.credentials;
|
|
1351
|
+
return {
|
|
1352
|
+
setHttpAuthScheme(httpAuthScheme) {
|
|
1353
|
+
const index = _httpAuthSchemes.findIndex((scheme) => scheme.schemeId === httpAuthScheme.schemeId);
|
|
1354
|
+
if (index === -1) _httpAuthSchemes.push(httpAuthScheme);
|
|
1355
|
+
else _httpAuthSchemes.splice(index, 1, httpAuthScheme);
|
|
1356
|
+
},
|
|
1357
|
+
httpAuthSchemes() {
|
|
1358
|
+
return _httpAuthSchemes;
|
|
1359
|
+
},
|
|
1360
|
+
setHttpAuthSchemeProvider(httpAuthSchemeProvider) {
|
|
1361
|
+
_httpAuthSchemeProvider = httpAuthSchemeProvider;
|
|
1362
|
+
},
|
|
1363
|
+
httpAuthSchemeProvider() {
|
|
1364
|
+
return _httpAuthSchemeProvider;
|
|
1365
|
+
},
|
|
1366
|
+
setCredentials(credentials) {
|
|
1367
|
+
_credentials = credentials;
|
|
1368
|
+
},
|
|
1369
|
+
credentials() {
|
|
1370
|
+
return _credentials;
|
|
1371
|
+
}
|
|
1372
|
+
};
|
|
1373
|
+
};
|
|
1374
|
+
var resolveHttpAuthRuntimeConfig = (config) => {
|
|
1375
|
+
return {
|
|
1376
|
+
httpAuthSchemes: config.httpAuthSchemes(),
|
|
1377
|
+
httpAuthSchemeProvider: config.httpAuthSchemeProvider(),
|
|
1378
|
+
credentials: config.credentials()
|
|
1379
|
+
};
|
|
1380
|
+
};
|
|
1381
|
+
//#endregion
|
|
1382
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/runtimeExtensions.js
|
|
1383
|
+
var resolveRuntimeExtensions = (runtimeConfig, extensions) => {
|
|
1384
|
+
const extensionConfiguration = Object.assign(require_extensions.getAwsRegionExtensionConfiguration(runtimeConfig), require_extensions.getDefaultExtensionConfiguration(runtimeConfig), require_extensions.getHttpHandlerExtensionConfiguration(runtimeConfig), getHttpAuthExtensionConfiguration(runtimeConfig));
|
|
1385
|
+
extensions.forEach((extension) => extension.configure(extensionConfiguration));
|
|
1386
|
+
return Object.assign(runtimeConfig, require_extensions.resolveAwsRegionExtensionConfiguration(extensionConfiguration), require_extensions.resolveDefaultRuntimeConfig(extensionConfiguration), require_extensions.resolveHttpHandlerRuntimeConfig(extensionConfiguration), resolveHttpAuthRuntimeConfig(extensionConfiguration));
|
|
1387
|
+
};
|
|
1388
|
+
//#endregion
|
|
1389
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/STSClient.js
|
|
1390
|
+
var STSClient = class extends require_extensions.Client {
|
|
1391
|
+
config;
|
|
1392
|
+
constructor(...[configuration]) {
|
|
1393
|
+
const _config_0 = getRuntimeConfig(configuration || {});
|
|
1394
|
+
super(_config_0);
|
|
1395
|
+
this.initConfig = _config_0;
|
|
1396
|
+
const _config_8 = resolveRuntimeExtensions(resolveHttpAuthSchemeConfig(require_extensions.resolveEndpointConfig(require_extensions.resolveHostHeaderConfig(require_extensions.resolveRegionConfig(require_extensions.resolveRetryConfig(require_extensions.resolveUserAgentConfig(resolveClientEndpointParameters(_config_0))))))), configuration?.extensions || []);
|
|
1397
|
+
this.config = _config_8;
|
|
1398
|
+
this.middlewareStack.use(require_extensions.getSchemaSerdePlugin(this.config));
|
|
1399
|
+
this.middlewareStack.use(require_extensions.getUserAgentPlugin(this.config));
|
|
1400
|
+
this.middlewareStack.use(require_extensions.getRetryPlugin(this.config));
|
|
1401
|
+
this.middlewareStack.use(require_extensions.getContentLengthPlugin(this.config));
|
|
1402
|
+
this.middlewareStack.use(require_extensions.getHostHeaderPlugin(this.config));
|
|
1403
|
+
this.middlewareStack.use(require_extensions.getLoggerPlugin(this.config));
|
|
1404
|
+
this.middlewareStack.use(require_extensions.getRecursionDetectionPlugin(this.config));
|
|
1405
|
+
this.middlewareStack.use(require_extensions.getHttpAuthSchemeEndpointRuleSetPlugin(this.config, {
|
|
1406
|
+
httpAuthSchemeParametersProvider: defaultSTSHttpAuthSchemeParametersProvider,
|
|
1407
|
+
identityProviderConfigProvider: async (config) => new require_extensions.DefaultIdentityProviderConfig({ "aws.auth#sigv4": config.credentials })
|
|
1408
|
+
}));
|
|
1409
|
+
this.middlewareStack.use(require_extensions.getHttpSigningPlugin(this.config));
|
|
1410
|
+
}
|
|
1411
|
+
destroy() {
|
|
1412
|
+
super.destroy();
|
|
1413
|
+
}
|
|
1414
|
+
};
|
|
1415
|
+
//#endregion
|
|
1416
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleCommand.js
|
|
1417
|
+
var AssumeRoleCommand = class extends require_extensions.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
1418
|
+
return [require_extensions.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1419
|
+
}).s("AWSSecurityTokenServiceV20110615", "AssumeRole", {}).n("STSClient", "AssumeRoleCommand").sc(AssumeRole$).build() {};
|
|
1420
|
+
//#endregion
|
|
1421
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/commands/AssumeRoleWithWebIdentityCommand.js
|
|
1422
|
+
var AssumeRoleWithWebIdentityCommand = class extends require_extensions.Command.classBuilder().ep(commonParams).m(function(Command, cs, config, o) {
|
|
1423
|
+
return [require_extensions.getEndpointPlugin(config, Command.getEndpointParameterInstructions())];
|
|
1424
|
+
}).s("AWSSecurityTokenServiceV20110615", "AssumeRoleWithWebIdentity", {}).n("STSClient", "AssumeRoleWithWebIdentityCommand").sc(AssumeRoleWithWebIdentity$).build() {};
|
|
1425
|
+
//#endregion
|
|
1426
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js
|
|
1427
|
+
var getAccountIdFromAssumedRoleUser = (assumedRoleUser) => {
|
|
1428
|
+
if (typeof assumedRoleUser?.Arn === "string") {
|
|
1429
|
+
const arnComponents = assumedRoleUser.Arn.split(":");
|
|
1430
|
+
if (arnComponents.length > 4 && arnComponents[4] !== "") return arnComponents[4];
|
|
1431
|
+
}
|
|
1432
|
+
};
|
|
1433
|
+
var resolveRegion = async (_region, _parentRegion, credentialProviderLogger, loaderConfig = {}) => {
|
|
1434
|
+
const region = typeof _region === "function" ? await _region() : _region;
|
|
1435
|
+
const parentRegion = typeof _parentRegion === "function" ? await _parentRegion() : _parentRegion;
|
|
1436
|
+
let stsDefaultRegion = "";
|
|
1437
|
+
const resolvedRegion = region ?? parentRegion ?? (stsDefaultRegion = await stsRegionDefaultResolver(loaderConfig)());
|
|
1438
|
+
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)`);
|
|
1439
|
+
return resolvedRegion;
|
|
1440
|
+
};
|
|
1441
|
+
var getDefaultRoleAssumer$1 = (stsOptions, STSClient) => {
|
|
1442
|
+
let stsClient;
|
|
1443
|
+
let closureSourceCreds;
|
|
1444
|
+
return async (sourceCreds, params) => {
|
|
1445
|
+
closureSourceCreds = sourceCreds;
|
|
1446
|
+
if (!stsClient) {
|
|
1447
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
|
|
1448
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
1449
|
+
logger,
|
|
1450
|
+
profile
|
|
1451
|
+
});
|
|
1452
|
+
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1453
|
+
stsClient = new STSClient({
|
|
1454
|
+
...stsOptions,
|
|
1455
|
+
userAgentAppId,
|
|
1456
|
+
profile,
|
|
1457
|
+
credentialDefaultProvider: () => async () => closureSourceCreds,
|
|
1458
|
+
region: resolvedRegion,
|
|
1459
|
+
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1460
|
+
logger
|
|
1461
|
+
});
|
|
1462
|
+
}
|
|
1463
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleCommand(params));
|
|
1464
|
+
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) throw new Error(`Invalid response from STS.assumeRole call with role ${params.RoleArn}`);
|
|
1465
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
1466
|
+
const credentials = {
|
|
1467
|
+
accessKeyId: Credentials.AccessKeyId,
|
|
1468
|
+
secretAccessKey: Credentials.SecretAccessKey,
|
|
1469
|
+
sessionToken: Credentials.SessionToken,
|
|
1470
|
+
expiration: Credentials.Expiration,
|
|
1471
|
+
...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
|
|
1472
|
+
...accountId && { accountId }
|
|
1473
|
+
};
|
|
1474
|
+
require_setCredentialFeature.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE", "i");
|
|
1475
|
+
return credentials;
|
|
1476
|
+
};
|
|
1477
|
+
};
|
|
1478
|
+
var getDefaultRoleAssumerWithWebIdentity$1 = (stsOptions, STSClient) => {
|
|
1479
|
+
let stsClient;
|
|
1480
|
+
return async (params) => {
|
|
1481
|
+
if (!stsClient) {
|
|
1482
|
+
const { logger = stsOptions?.parentClientConfig?.logger, profile = stsOptions?.parentClientConfig?.profile, region, requestHandler = stsOptions?.parentClientConfig?.requestHandler, credentialProviderLogger, userAgentAppId = stsOptions?.parentClientConfig?.userAgentAppId } = stsOptions;
|
|
1483
|
+
const resolvedRegion = await resolveRegion(region, stsOptions?.parentClientConfig?.region, credentialProviderLogger, {
|
|
1484
|
+
logger,
|
|
1485
|
+
profile
|
|
1486
|
+
});
|
|
1487
|
+
const isCompatibleRequestHandler = !isH2(requestHandler);
|
|
1488
|
+
stsClient = new STSClient({
|
|
1489
|
+
...stsOptions,
|
|
1490
|
+
userAgentAppId,
|
|
1491
|
+
profile,
|
|
1492
|
+
region: resolvedRegion,
|
|
1493
|
+
requestHandler: isCompatibleRequestHandler ? requestHandler : void 0,
|
|
1494
|
+
logger
|
|
1495
|
+
});
|
|
1496
|
+
}
|
|
1497
|
+
const { Credentials, AssumedRoleUser } = await stsClient.send(new AssumeRoleWithWebIdentityCommand(params));
|
|
1498
|
+
if (!Credentials || !Credentials.AccessKeyId || !Credentials.SecretAccessKey) throw new Error(`Invalid response from STS.assumeRoleWithWebIdentity call with role ${params.RoleArn}`);
|
|
1499
|
+
const accountId = getAccountIdFromAssumedRoleUser(AssumedRoleUser);
|
|
1500
|
+
const credentials = {
|
|
1501
|
+
accessKeyId: Credentials.AccessKeyId,
|
|
1502
|
+
secretAccessKey: Credentials.SecretAccessKey,
|
|
1503
|
+
sessionToken: Credentials.SessionToken,
|
|
1504
|
+
expiration: Credentials.Expiration,
|
|
1505
|
+
...Credentials.CredentialScope && { credentialScope: Credentials.CredentialScope },
|
|
1506
|
+
...accountId && { accountId }
|
|
1507
|
+
};
|
|
1508
|
+
if (accountId) require_setCredentialFeature.setCredentialFeature(credentials, "RESOLVED_ACCOUNT_ID", "T");
|
|
1509
|
+
require_setCredentialFeature.setCredentialFeature(credentials, "CREDENTIALS_STS_ASSUME_ROLE_WEB_ID", "k");
|
|
1510
|
+
return credentials;
|
|
1511
|
+
};
|
|
1512
|
+
};
|
|
1513
|
+
var isH2 = (requestHandler) => {
|
|
1514
|
+
return requestHandler?.metadata?.handlerProtocol === "h2";
|
|
1515
|
+
};
|
|
1516
|
+
//#endregion
|
|
1517
|
+
//#region ../../../node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultRoleAssumers.js
|
|
1518
|
+
var getCustomizableStsClientCtor = (baseCtor, customizations) => {
|
|
1519
|
+
if (!customizations) return baseCtor;
|
|
1520
|
+
else return class CustomizableSTSClient extends baseCtor {
|
|
1521
|
+
constructor(config) {
|
|
1522
|
+
super(config);
|
|
1523
|
+
for (const customization of customizations) this.middlewareStack.use(customization);
|
|
1524
|
+
}
|
|
1525
|
+
};
|
|
1526
|
+
};
|
|
1527
|
+
var getDefaultRoleAssumer = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumer$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
1528
|
+
var getDefaultRoleAssumerWithWebIdentity = (stsOptions = {}, stsPlugins) => getDefaultRoleAssumerWithWebIdentity$1(stsOptions, getCustomizableStsClientCtor(STSClient, stsPlugins));
|
|
1529
|
+
//#endregion
|
|
1530
|
+
exports.getDefaultRoleAssumer = getDefaultRoleAssumer;
|
|
1531
|
+
exports.getDefaultRoleAssumerWithWebIdentity = getDefaultRoleAssumerWithWebIdentity;
|