cdk-insights 0.5.0 → 0.7.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/aspects/CdkInsightsAspect.js +408 -594
- package/dist/cli/entry.js +5111 -4582
- package/dist/cli/types/cli.types.d.ts +2 -0
- package/dist/constants/config.d.ts +52 -0
- package/dist/helpers/deDuplicateIssues/deDuplicateIssues.d.ts +18 -1
- package/dist/index.d.ts +31 -18
- package/dist/index.js +2079 -1725
- package/dist/shared/enhancedLicenseQuota.d.ts +1 -0
- package/dist/shared/licenseQuota.d.ts +1 -1
- package/dist/shared/terminalOutput.d.ts +152 -53
- package/dist/types/analysis.types.d.ts +144 -0
- package/package.json +1 -1
- package/dist/helpers/deDuplicateIssues/deDuplicateIssues.test.d.ts +0 -1
|
@@ -5965,73 +5965,42 @@ var require_file_transport = __commonJS({
|
|
|
5965
5965
|
|
|
5966
5966
|
// node_modules/@smithy/types/dist-cjs/index.js
|
|
5967
5967
|
var require_dist_cjs = __commonJS({
|
|
5968
|
-
"node_modules/@smithy/types/dist-cjs/index.js"(exports2
|
|
5969
|
-
|
|
5970
|
-
|
|
5971
|
-
|
|
5972
|
-
|
|
5973
|
-
|
|
5974
|
-
|
|
5975
|
-
|
|
5976
|
-
|
|
5977
|
-
|
|
5978
|
-
|
|
5979
|
-
|
|
5980
|
-
|
|
5981
|
-
|
|
5982
|
-
|
|
5983
|
-
|
|
5984
|
-
|
|
5985
|
-
|
|
5986
|
-
|
|
5987
|
-
|
|
5988
|
-
|
|
5989
|
-
AlgorithmId
|
|
5990
|
-
|
|
5991
|
-
|
|
5992
|
-
|
|
5993
|
-
|
|
5994
|
-
IniSectionType: () => IniSectionType,
|
|
5995
|
-
RequestHandlerProtocol: () => RequestHandlerProtocol,
|
|
5996
|
-
SMITHY_CONTEXT_KEY: () => SMITHY_CONTEXT_KEY4,
|
|
5997
|
-
getDefaultClientConfiguration: () => getDefaultClientConfiguration,
|
|
5998
|
-
resolveDefaultRuntimeConfig: () => resolveDefaultRuntimeConfig3
|
|
5999
|
-
});
|
|
6000
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
6001
|
-
var HttpAuthLocation = /* @__PURE__ */ ((HttpAuthLocation2) => {
|
|
6002
|
-
HttpAuthLocation2["HEADER"] = "header";
|
|
6003
|
-
HttpAuthLocation2["QUERY"] = "query";
|
|
6004
|
-
return HttpAuthLocation2;
|
|
6005
|
-
})(HttpAuthLocation || {});
|
|
6006
|
-
var HttpApiKeyAuthLocation2 = /* @__PURE__ */ ((HttpApiKeyAuthLocation22) => {
|
|
6007
|
-
HttpApiKeyAuthLocation22["HEADER"] = "header";
|
|
6008
|
-
HttpApiKeyAuthLocation22["QUERY"] = "query";
|
|
6009
|
-
return HttpApiKeyAuthLocation22;
|
|
6010
|
-
})(HttpApiKeyAuthLocation2 || {});
|
|
6011
|
-
var EndpointURLScheme = /* @__PURE__ */ ((EndpointURLScheme2) => {
|
|
6012
|
-
EndpointURLScheme2["HTTP"] = "http";
|
|
6013
|
-
EndpointURLScheme2["HTTPS"] = "https";
|
|
6014
|
-
return EndpointURLScheme2;
|
|
6015
|
-
})(EndpointURLScheme || {});
|
|
6016
|
-
var AlgorithmId = /* @__PURE__ */ ((AlgorithmId2) => {
|
|
6017
|
-
AlgorithmId2["MD5"] = "md5";
|
|
6018
|
-
AlgorithmId2["CRC32"] = "crc32";
|
|
6019
|
-
AlgorithmId2["CRC32C"] = "crc32c";
|
|
6020
|
-
AlgorithmId2["SHA1"] = "sha1";
|
|
6021
|
-
AlgorithmId2["SHA256"] = "sha256";
|
|
6022
|
-
return AlgorithmId2;
|
|
6023
|
-
})(AlgorithmId || {});
|
|
6024
|
-
var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
|
|
5968
|
+
"node_modules/@smithy/types/dist-cjs/index.js"(exports2) {
|
|
5969
|
+
"use strict";
|
|
5970
|
+
exports2.HttpAuthLocation = void 0;
|
|
5971
|
+
(function(HttpAuthLocation) {
|
|
5972
|
+
HttpAuthLocation["HEADER"] = "header";
|
|
5973
|
+
HttpAuthLocation["QUERY"] = "query";
|
|
5974
|
+
})(exports2.HttpAuthLocation || (exports2.HttpAuthLocation = {}));
|
|
5975
|
+
exports2.HttpApiKeyAuthLocation = void 0;
|
|
5976
|
+
(function(HttpApiKeyAuthLocation2) {
|
|
5977
|
+
HttpApiKeyAuthLocation2["HEADER"] = "header";
|
|
5978
|
+
HttpApiKeyAuthLocation2["QUERY"] = "query";
|
|
5979
|
+
})(exports2.HttpApiKeyAuthLocation || (exports2.HttpApiKeyAuthLocation = {}));
|
|
5980
|
+
exports2.EndpointURLScheme = void 0;
|
|
5981
|
+
(function(EndpointURLScheme) {
|
|
5982
|
+
EndpointURLScheme["HTTP"] = "http";
|
|
5983
|
+
EndpointURLScheme["HTTPS"] = "https";
|
|
5984
|
+
})(exports2.EndpointURLScheme || (exports2.EndpointURLScheme = {}));
|
|
5985
|
+
exports2.AlgorithmId = void 0;
|
|
5986
|
+
(function(AlgorithmId) {
|
|
5987
|
+
AlgorithmId["MD5"] = "md5";
|
|
5988
|
+
AlgorithmId["CRC32"] = "crc32";
|
|
5989
|
+
AlgorithmId["CRC32C"] = "crc32c";
|
|
5990
|
+
AlgorithmId["SHA1"] = "sha1";
|
|
5991
|
+
AlgorithmId["SHA256"] = "sha256";
|
|
5992
|
+
})(exports2.AlgorithmId || (exports2.AlgorithmId = {}));
|
|
5993
|
+
var getChecksumConfiguration = (runtimeConfig) => {
|
|
6025
5994
|
const checksumAlgorithms = [];
|
|
6026
5995
|
if (runtimeConfig.sha256 !== void 0) {
|
|
6027
5996
|
checksumAlgorithms.push({
|
|
6028
|
-
algorithmId: () =>
|
|
5997
|
+
algorithmId: () => exports2.AlgorithmId.SHA256,
|
|
6029
5998
|
checksumConstructor: () => runtimeConfig.sha256
|
|
6030
5999
|
});
|
|
6031
6000
|
}
|
|
6032
6001
|
if (runtimeConfig.md5 != void 0) {
|
|
6033
6002
|
checksumAlgorithms.push({
|
|
6034
|
-
algorithmId: () =>
|
|
6003
|
+
algorithmId: () => exports2.AlgorithmId.MD5,
|
|
6035
6004
|
checksumConstructor: () => runtimeConfig.md5
|
|
6036
6005
|
});
|
|
6037
6006
|
}
|
|
@@ -6043,38 +6012,41 @@ var require_dist_cjs = __commonJS({
|
|
|
6043
6012
|
return checksumAlgorithms;
|
|
6044
6013
|
}
|
|
6045
6014
|
};
|
|
6046
|
-
}
|
|
6047
|
-
var resolveChecksumRuntimeConfig =
|
|
6015
|
+
};
|
|
6016
|
+
var resolveChecksumRuntimeConfig = (clientConfig) => {
|
|
6048
6017
|
const runtimeConfig = {};
|
|
6049
6018
|
clientConfig.checksumAlgorithms().forEach((checksumAlgorithm) => {
|
|
6050
6019
|
runtimeConfig[checksumAlgorithm.algorithmId()] = checksumAlgorithm.checksumConstructor();
|
|
6051
6020
|
});
|
|
6052
6021
|
return runtimeConfig;
|
|
6053
|
-
}
|
|
6054
|
-
var getDefaultClientConfiguration =
|
|
6022
|
+
};
|
|
6023
|
+
var getDefaultClientConfiguration = (runtimeConfig) => {
|
|
6055
6024
|
return getChecksumConfiguration(runtimeConfig);
|
|
6056
|
-
}
|
|
6057
|
-
var resolveDefaultRuntimeConfig3 =
|
|
6025
|
+
};
|
|
6026
|
+
var resolveDefaultRuntimeConfig3 = (config) => {
|
|
6058
6027
|
return resolveChecksumRuntimeConfig(config);
|
|
6059
|
-
}
|
|
6060
|
-
|
|
6061
|
-
|
|
6062
|
-
|
|
6063
|
-
|
|
6064
|
-
})(FieldPosition || {});
|
|
6065
|
-
var
|
|
6066
|
-
|
|
6067
|
-
|
|
6068
|
-
|
|
6069
|
-
|
|
6070
|
-
|
|
6071
|
-
})(IniSectionType || {});
|
|
6072
|
-
|
|
6073
|
-
|
|
6074
|
-
|
|
6075
|
-
|
|
6076
|
-
|
|
6077
|
-
})(RequestHandlerProtocol || {});
|
|
6028
|
+
};
|
|
6029
|
+
exports2.FieldPosition = void 0;
|
|
6030
|
+
(function(FieldPosition) {
|
|
6031
|
+
FieldPosition[FieldPosition["HEADER"] = 0] = "HEADER";
|
|
6032
|
+
FieldPosition[FieldPosition["TRAILER"] = 1] = "TRAILER";
|
|
6033
|
+
})(exports2.FieldPosition || (exports2.FieldPosition = {}));
|
|
6034
|
+
var SMITHY_CONTEXT_KEY2 = "__smithy_context";
|
|
6035
|
+
exports2.IniSectionType = void 0;
|
|
6036
|
+
(function(IniSectionType) {
|
|
6037
|
+
IniSectionType["PROFILE"] = "profile";
|
|
6038
|
+
IniSectionType["SSO_SESSION"] = "sso-session";
|
|
6039
|
+
IniSectionType["SERVICES"] = "services";
|
|
6040
|
+
})(exports2.IniSectionType || (exports2.IniSectionType = {}));
|
|
6041
|
+
exports2.RequestHandlerProtocol = void 0;
|
|
6042
|
+
(function(RequestHandlerProtocol) {
|
|
6043
|
+
RequestHandlerProtocol["HTTP_0_9"] = "http/0.9";
|
|
6044
|
+
RequestHandlerProtocol["HTTP_1_0"] = "http/1.0";
|
|
6045
|
+
RequestHandlerProtocol["TDS_8_0"] = "tds/8.0";
|
|
6046
|
+
})(exports2.RequestHandlerProtocol || (exports2.RequestHandlerProtocol = {}));
|
|
6047
|
+
exports2.SMITHY_CONTEXT_KEY = SMITHY_CONTEXT_KEY2;
|
|
6048
|
+
exports2.getDefaultClientConfiguration = getDefaultClientConfiguration;
|
|
6049
|
+
exports2.resolveDefaultRuntimeConfig = resolveDefaultRuntimeConfig3;
|
|
6078
6050
|
}
|
|
6079
6051
|
});
|
|
6080
6052
|
|
|
@@ -6105,7 +6077,7 @@ var require_dist_cjs2 = __commonJS({
|
|
|
6105
6077
|
Fields: () => Fields,
|
|
6106
6078
|
HttpRequest: () => HttpRequest10,
|
|
6107
6079
|
HttpResponse: () => HttpResponse4,
|
|
6108
|
-
IHttpRequest: () =>
|
|
6080
|
+
IHttpRequest: () => import_types3.HttpRequest,
|
|
6109
6081
|
getHttpHandlerExtensionConfiguration: () => getHttpHandlerExtensionConfiguration3,
|
|
6110
6082
|
isValidHostname: () => isValidHostname,
|
|
6111
6083
|
resolveHttpHandlerRuntimeConfig: () => resolveHttpHandlerRuntimeConfig3
|
|
@@ -6132,12 +6104,12 @@ var require_dist_cjs2 = __commonJS({
|
|
|
6132
6104
|
httpHandler: httpHandlerExtensionConfiguration.httpHandler()
|
|
6133
6105
|
};
|
|
6134
6106
|
}, "resolveHttpHandlerRuntimeConfig");
|
|
6135
|
-
var
|
|
6107
|
+
var import_types3 = require_dist_cjs();
|
|
6136
6108
|
var Field = class {
|
|
6137
6109
|
static {
|
|
6138
6110
|
__name(this, "Field");
|
|
6139
6111
|
}
|
|
6140
|
-
constructor({ name, kind =
|
|
6112
|
+
constructor({ name, kind = import_types3.FieldPosition.HEADER, values = [] }) {
|
|
6141
6113
|
this.name = name;
|
|
6142
6114
|
this.kind = kind;
|
|
6143
6115
|
this.values = values;
|
|
@@ -6535,39 +6507,18 @@ var init_getSmithyContext = __esm({
|
|
|
6535
6507
|
|
|
6536
6508
|
// node_modules/@smithy/util-middleware/dist-cjs/index.js
|
|
6537
6509
|
var require_dist_cjs6 = __commonJS({
|
|
6538
|
-
"node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2
|
|
6539
|
-
|
|
6540
|
-
var
|
|
6541
|
-
var
|
|
6542
|
-
var
|
|
6543
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
6544
|
-
var __export2 = (target, all) => {
|
|
6545
|
-
for (var name in all)
|
|
6546
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
6547
|
-
};
|
|
6548
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
6549
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
6550
|
-
for (let key of __getOwnPropNames2(from))
|
|
6551
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
6552
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
6553
|
-
}
|
|
6554
|
-
return to;
|
|
6555
|
-
};
|
|
6556
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
6557
|
-
var src_exports = {};
|
|
6558
|
-
__export2(src_exports, {
|
|
6559
|
-
getSmithyContext: () => getSmithyContext8,
|
|
6560
|
-
normalizeProvider: () => normalizeProvider4
|
|
6561
|
-
});
|
|
6562
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
6563
|
-
var import_types5 = require_dist_cjs();
|
|
6564
|
-
var getSmithyContext8 = /* @__PURE__ */ __name((context) => context[import_types5.SMITHY_CONTEXT_KEY] || (context[import_types5.SMITHY_CONTEXT_KEY] = {}), "getSmithyContext");
|
|
6565
|
-
var normalizeProvider4 = /* @__PURE__ */ __name((input) => {
|
|
6510
|
+
"node_modules/@smithy/util-middleware/dist-cjs/index.js"(exports2) {
|
|
6511
|
+
"use strict";
|
|
6512
|
+
var types = require_dist_cjs();
|
|
6513
|
+
var getSmithyContext8 = (context) => context[types.SMITHY_CONTEXT_KEY] || (context[types.SMITHY_CONTEXT_KEY] = {});
|
|
6514
|
+
var normalizeProvider4 = (input) => {
|
|
6566
6515
|
if (typeof input === "function")
|
|
6567
6516
|
return input;
|
|
6568
6517
|
const promisified = Promise.resolve(input);
|
|
6569
6518
|
return () => promisified;
|
|
6570
|
-
}
|
|
6519
|
+
};
|
|
6520
|
+
exports2.getSmithyContext = getSmithyContext8;
|
|
6521
|
+
exports2.normalizeProvider = normalizeProvider4;
|
|
6571
6522
|
}
|
|
6572
6523
|
});
|
|
6573
6524
|
|
|
@@ -6606,10 +6557,9 @@ function convertHttpAuthSchemesToMap(httpAuthSchemes) {
|
|
|
6606
6557
|
}
|
|
6607
6558
|
return map3;
|
|
6608
6559
|
}
|
|
6609
|
-
var
|
|
6560
|
+
var import_util_middleware, httpAuthSchemeMiddleware;
|
|
6610
6561
|
var init_httpAuthSchemeMiddleware = __esm({
|
|
6611
6562
|
"node_modules/@smithy/core/dist-es/middleware-http-auth-scheme/httpAuthSchemeMiddleware.js"() {
|
|
6612
|
-
import_types2 = __toESM(require_dist_cjs());
|
|
6613
6563
|
import_util_middleware = __toESM(require_dist_cjs6());
|
|
6614
6564
|
init_resolveAuthOptions();
|
|
6615
6565
|
httpAuthSchemeMiddleware = (config, mwOptions) => (next, context) => async (args) => {
|
|
@@ -6824,11 +6774,10 @@ var init_middleware_http_auth_scheme = __esm({
|
|
|
6824
6774
|
});
|
|
6825
6775
|
|
|
6826
6776
|
// node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js
|
|
6827
|
-
var import_protocol_http,
|
|
6777
|
+
var import_protocol_http, import_util_middleware2, defaultErrorHandler, defaultSuccessHandler, httpSigningMiddleware;
|
|
6828
6778
|
var init_httpSigningMiddleware = __esm({
|
|
6829
6779
|
"node_modules/@smithy/core/dist-es/middleware-http-signing/httpSigningMiddleware.js"() {
|
|
6830
6780
|
import_protocol_http = __toESM(require_dist_cjs2());
|
|
6831
|
-
import_types3 = __toESM(require_dist_cjs());
|
|
6832
6781
|
import_util_middleware2 = __toESM(require_dist_cjs6());
|
|
6833
6782
|
defaultErrorHandler = (signingProperties) => (error2) => {
|
|
6834
6783
|
throw error2;
|
|
@@ -11988,11 +11937,11 @@ var init_DefaultIdentityProviderConfig = __esm({
|
|
|
11988
11937
|
});
|
|
11989
11938
|
|
|
11990
11939
|
// node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js
|
|
11991
|
-
var import_protocol_http7,
|
|
11940
|
+
var import_protocol_http7, import_types2, HttpApiKeyAuthSigner;
|
|
11992
11941
|
var init_httpApiKeyAuth = __esm({
|
|
11993
11942
|
"node_modules/@smithy/core/dist-es/util-identity-and-auth/httpAuthSchemes/httpApiKeyAuth.js"() {
|
|
11994
11943
|
import_protocol_http7 = __toESM(require_dist_cjs2());
|
|
11995
|
-
|
|
11944
|
+
import_types2 = __toESM(require_dist_cjs());
|
|
11996
11945
|
HttpApiKeyAuthSigner = class {
|
|
11997
11946
|
async sign(httpRequest, identity, signingProperties) {
|
|
11998
11947
|
if (!signingProperties) {
|
|
@@ -12008,9 +11957,9 @@ var init_httpApiKeyAuth = __esm({
|
|
|
12008
11957
|
throw new Error("request could not be signed with `apiKey` since the `apiKey` is not defined");
|
|
12009
11958
|
}
|
|
12010
11959
|
const clonedRequest = import_protocol_http7.HttpRequest.clone(httpRequest);
|
|
12011
|
-
if (signingProperties.in ===
|
|
11960
|
+
if (signingProperties.in === import_types2.HttpApiKeyAuthLocation.QUERY) {
|
|
12012
11961
|
clonedRequest.query[signingProperties.name] = identity.apiKey;
|
|
12013
|
-
} else if (signingProperties.in ===
|
|
11962
|
+
} else if (signingProperties.in === import_types2.HttpApiKeyAuthLocation.HEADER) {
|
|
12014
11963
|
clonedRequest.headers[signingProperties.name] = signingProperties.scheme ? `${signingProperties.scheme} ${identity.apiKey}` : identity.apiKey;
|
|
12015
11964
|
} else {
|
|
12016
11965
|
throw new Error("request can only be signed with `apiKey` locations `query` or `header`, but found: `" + signingProperties.in + "`");
|
|
@@ -12169,60 +12118,19 @@ var init_dist_es = __esm({
|
|
|
12169
12118
|
|
|
12170
12119
|
// node_modules/@smithy/util-endpoints/dist-cjs/index.js
|
|
12171
12120
|
var require_dist_cjs18 = __commonJS({
|
|
12172
|
-
"node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2
|
|
12173
|
-
|
|
12174
|
-
var
|
|
12175
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
12176
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
12177
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
12178
|
-
var __export2 = (target, all) => {
|
|
12179
|
-
for (var name in all)
|
|
12180
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
12181
|
-
};
|
|
12182
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
12183
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
12184
|
-
for (let key of __getOwnPropNames2(from))
|
|
12185
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
12186
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
12187
|
-
}
|
|
12188
|
-
return to;
|
|
12189
|
-
};
|
|
12190
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
12191
|
-
var src_exports = {};
|
|
12192
|
-
__export2(src_exports, {
|
|
12193
|
-
EndpointCache: () => EndpointCache3,
|
|
12194
|
-
EndpointError: () => EndpointError2,
|
|
12195
|
-
customEndpointFunctions: () => customEndpointFunctions3,
|
|
12196
|
-
isIpAddress: () => isIpAddress2,
|
|
12197
|
-
isValidHostLabel: () => isValidHostLabel,
|
|
12198
|
-
resolveEndpoint: () => resolveEndpoint4
|
|
12199
|
-
});
|
|
12200
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
12121
|
+
"node_modules/@smithy/util-endpoints/dist-cjs/index.js"(exports2) {
|
|
12122
|
+
"use strict";
|
|
12123
|
+
var types = require_dist_cjs();
|
|
12201
12124
|
var EndpointCache3 = class {
|
|
12202
|
-
|
|
12203
|
-
|
|
12204
|
-
|
|
12205
|
-
* @param [params] - list of params to consider as part of the cache key.
|
|
12206
|
-
*
|
|
12207
|
-
* If the params list is not populated, no caching will happen.
|
|
12208
|
-
* This may be out of order depending on how the object is created and arrives to this class.
|
|
12209
|
-
*/
|
|
12125
|
+
capacity;
|
|
12126
|
+
data = /* @__PURE__ */ new Map();
|
|
12127
|
+
parameters = [];
|
|
12210
12128
|
constructor({ size, params }) {
|
|
12211
|
-
this.data = /* @__PURE__ */ new Map();
|
|
12212
|
-
this.parameters = [];
|
|
12213
12129
|
this.capacity = size ?? 50;
|
|
12214
12130
|
if (params) {
|
|
12215
12131
|
this.parameters = params;
|
|
12216
12132
|
}
|
|
12217
12133
|
}
|
|
12218
|
-
static {
|
|
12219
|
-
__name(this, "EndpointCache");
|
|
12220
|
-
}
|
|
12221
|
-
/**
|
|
12222
|
-
* @param endpointParams - query for endpoint.
|
|
12223
|
-
* @param resolver - provider of the value if not present.
|
|
12224
|
-
* @returns endpoint corresponding to the query.
|
|
12225
|
-
*/
|
|
12226
12134
|
get(endpointParams, resolver) {
|
|
12227
12135
|
const key = this.hash(endpointParams);
|
|
12228
12136
|
if (key === false) {
|
|
@@ -12247,9 +12155,6 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12247
12155
|
size() {
|
|
12248
12156
|
return this.data.size;
|
|
12249
12157
|
}
|
|
12250
|
-
/**
|
|
12251
|
-
* @returns cache key or false if not cachable.
|
|
12252
|
-
*/
|
|
12253
12158
|
hash(endpointParams) {
|
|
12254
12159
|
let buffer = "";
|
|
12255
12160
|
const { parameters } = this;
|
|
@@ -12266,12 +12171,10 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12266
12171
|
return buffer;
|
|
12267
12172
|
}
|
|
12268
12173
|
};
|
|
12269
|
-
var IP_V4_REGEX = new RegExp(
|
|
12270
|
-
|
|
12271
|
-
);
|
|
12272
|
-
var isIpAddress2 = /* @__PURE__ */ __name((value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]"), "isIpAddress");
|
|
12174
|
+
var IP_V4_REGEX = new RegExp(`^(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)(?:\\.(?:25[0-5]|2[0-4]\\d|1\\d\\d|[1-9]\\d|\\d)){3}$`);
|
|
12175
|
+
var isIpAddress2 = (value) => IP_V4_REGEX.test(value) || value.startsWith("[") && value.endsWith("]");
|
|
12273
12176
|
var VALID_HOST_LABEL_REGEX = new RegExp(`^(?!.*-$)(?!-)[a-zA-Z0-9-]{1,63}$`);
|
|
12274
|
-
var isValidHostLabel =
|
|
12177
|
+
var isValidHostLabel = (value, allowSubDomains = false) => {
|
|
12275
12178
|
if (!allowSubDomains) {
|
|
12276
12179
|
return VALID_HOST_LABEL_REGEX.test(value);
|
|
12277
12180
|
}
|
|
@@ -12282,7 +12185,7 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12282
12185
|
}
|
|
12283
12186
|
}
|
|
12284
12187
|
return true;
|
|
12285
|
-
}
|
|
12188
|
+
};
|
|
12286
12189
|
var customEndpointFunctions3 = {};
|
|
12287
12190
|
var debugId = "endpoints";
|
|
12288
12191
|
function toDebugString(input) {
|
|
@@ -12297,18 +12200,14 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12297
12200
|
}
|
|
12298
12201
|
return JSON.stringify(input, null, 2);
|
|
12299
12202
|
}
|
|
12300
|
-
__name(toDebugString, "toDebugString");
|
|
12301
12203
|
var EndpointError2 = class extends Error {
|
|
12302
|
-
static {
|
|
12303
|
-
__name(this, "EndpointError");
|
|
12304
|
-
}
|
|
12305
12204
|
constructor(message) {
|
|
12306
12205
|
super(message);
|
|
12307
12206
|
this.name = "EndpointError";
|
|
12308
12207
|
}
|
|
12309
12208
|
};
|
|
12310
|
-
var booleanEquals =
|
|
12311
|
-
var getAttrPathList =
|
|
12209
|
+
var booleanEquals = (value1, value2) => value1 === value2;
|
|
12210
|
+
var getAttrPathList = (path) => {
|
|
12312
12211
|
const parts = path.split(".");
|
|
12313
12212
|
const pathList = [];
|
|
12314
12213
|
for (const part of parts) {
|
|
@@ -12330,23 +12229,22 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12330
12229
|
}
|
|
12331
12230
|
}
|
|
12332
12231
|
return pathList;
|
|
12333
|
-
}
|
|
12334
|
-
var getAttr =
|
|
12232
|
+
};
|
|
12233
|
+
var getAttr = (value, path) => getAttrPathList(path).reduce((acc, index) => {
|
|
12335
12234
|
if (typeof acc !== "object") {
|
|
12336
12235
|
throw new EndpointError2(`Index '${index}' in '${path}' not found in '${JSON.stringify(value)}'`);
|
|
12337
12236
|
} else if (Array.isArray(acc)) {
|
|
12338
12237
|
return acc[parseInt(index)];
|
|
12339
12238
|
}
|
|
12340
12239
|
return acc[index];
|
|
12341
|
-
}, value)
|
|
12342
|
-
var isSet =
|
|
12343
|
-
var not =
|
|
12344
|
-
var import_types32 = require_dist_cjs();
|
|
12240
|
+
}, value);
|
|
12241
|
+
var isSet = (value) => value != null;
|
|
12242
|
+
var not = (value) => !value;
|
|
12345
12243
|
var DEFAULT_PORTS = {
|
|
12346
|
-
[
|
|
12347
|
-
[
|
|
12244
|
+
[types.EndpointURLScheme.HTTP]: 80,
|
|
12245
|
+
[types.EndpointURLScheme.HTTPS]: 443
|
|
12348
12246
|
};
|
|
12349
|
-
var parseURL =
|
|
12247
|
+
var parseURL = (value) => {
|
|
12350
12248
|
const whatwgURL = (() => {
|
|
12351
12249
|
try {
|
|
12352
12250
|
if (value instanceof URL) {
|
|
@@ -12373,7 +12271,7 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12373
12271
|
return null;
|
|
12374
12272
|
}
|
|
12375
12273
|
const scheme = protocol.slice(0, -1);
|
|
12376
|
-
if (!Object.values(
|
|
12274
|
+
if (!Object.values(types.EndpointURLScheme).includes(scheme)) {
|
|
12377
12275
|
return null;
|
|
12378
12276
|
}
|
|
12379
12277
|
const isIp = isIpAddress2(hostname);
|
|
@@ -12386,9 +12284,9 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12386
12284
|
normalizedPath: pathname.endsWith("/") ? pathname : `${pathname}/`,
|
|
12387
12285
|
isIp
|
|
12388
12286
|
};
|
|
12389
|
-
}
|
|
12390
|
-
var stringEquals =
|
|
12391
|
-
var substring =
|
|
12287
|
+
};
|
|
12288
|
+
var stringEquals = (value1, value2) => value1 === value2;
|
|
12289
|
+
var substring = (input, start, stop, reverse) => {
|
|
12392
12290
|
if (start >= stop || input.length < stop) {
|
|
12393
12291
|
return null;
|
|
12394
12292
|
}
|
|
@@ -12396,8 +12294,8 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12396
12294
|
return input.substring(start, stop);
|
|
12397
12295
|
}
|
|
12398
12296
|
return input.substring(input.length - stop, input.length - start);
|
|
12399
|
-
}
|
|
12400
|
-
var uriEncode =
|
|
12297
|
+
};
|
|
12298
|
+
var uriEncode = (value) => encodeURIComponent(value).replace(/[!*'()]/g, (c3) => `%${c3.charCodeAt(0).toString(16).toUpperCase()}`);
|
|
12401
12299
|
var endpointFunctions = {
|
|
12402
12300
|
booleanEquals,
|
|
12403
12301
|
getAttr,
|
|
@@ -12409,7 +12307,7 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12409
12307
|
substring,
|
|
12410
12308
|
uriEncode
|
|
12411
12309
|
};
|
|
12412
|
-
var evaluateTemplate =
|
|
12310
|
+
var evaluateTemplate = (template, options) => {
|
|
12413
12311
|
const evaluatedTemplateArr = [];
|
|
12414
12312
|
const templateContext = {
|
|
12415
12313
|
...options.endpointParams,
|
|
@@ -12442,35 +12340,37 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12442
12340
|
currentIndex = closingBraceIndex + 1;
|
|
12443
12341
|
}
|
|
12444
12342
|
return evaluatedTemplateArr.join("");
|
|
12445
|
-
}
|
|
12446
|
-
var getReferenceValue =
|
|
12343
|
+
};
|
|
12344
|
+
var getReferenceValue = ({ ref }, options) => {
|
|
12447
12345
|
const referenceRecord = {
|
|
12448
12346
|
...options.endpointParams,
|
|
12449
12347
|
...options.referenceRecord
|
|
12450
12348
|
};
|
|
12451
12349
|
return referenceRecord[ref];
|
|
12452
|
-
}
|
|
12453
|
-
var evaluateExpression =
|
|
12350
|
+
};
|
|
12351
|
+
var evaluateExpression = (obj, keyName, options) => {
|
|
12454
12352
|
if (typeof obj === "string") {
|
|
12455
12353
|
return evaluateTemplate(obj, options);
|
|
12456
12354
|
} else if (obj["fn"]) {
|
|
12457
|
-
return callFunction(obj, options);
|
|
12355
|
+
return group$2.callFunction(obj, options);
|
|
12458
12356
|
} else if (obj["ref"]) {
|
|
12459
12357
|
return getReferenceValue(obj, options);
|
|
12460
12358
|
}
|
|
12461
12359
|
throw new EndpointError2(`'${keyName}': ${String(obj)} is not a string, function or reference.`);
|
|
12462
|
-
}
|
|
12463
|
-
var callFunction =
|
|
12464
|
-
const evaluatedArgs = argv.map(
|
|
12465
|
-
(arg) => ["boolean", "number"].includes(typeof arg) ? arg : evaluateExpression(arg, "arg", options)
|
|
12466
|
-
);
|
|
12360
|
+
};
|
|
12361
|
+
var callFunction = ({ fn, argv }, options) => {
|
|
12362
|
+
const evaluatedArgs = argv.map((arg) => ["boolean", "number"].includes(typeof arg) ? arg : group$2.evaluateExpression(arg, "arg", options));
|
|
12467
12363
|
const fnSegments = fn.split(".");
|
|
12468
12364
|
if (fnSegments[0] in customEndpointFunctions3 && fnSegments[1] != null) {
|
|
12469
12365
|
return customEndpointFunctions3[fnSegments[0]][fnSegments[1]](...evaluatedArgs);
|
|
12470
12366
|
}
|
|
12471
12367
|
return endpointFunctions[fn](...evaluatedArgs);
|
|
12472
|
-
}
|
|
12473
|
-
var
|
|
12368
|
+
};
|
|
12369
|
+
var group$2 = {
|
|
12370
|
+
evaluateExpression,
|
|
12371
|
+
callFunction
|
|
12372
|
+
};
|
|
12373
|
+
var evaluateCondition = ({ assign, ...fnArgs }, options) => {
|
|
12474
12374
|
if (assign && assign in options.referenceRecord) {
|
|
12475
12375
|
throw new EndpointError2(`'${assign}' is already defined in Reference Record.`);
|
|
12476
12376
|
}
|
|
@@ -12480,8 +12380,8 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12480
12380
|
result: value === "" ? true : !!value,
|
|
12481
12381
|
...assign != null && { toAssign: { name: assign, value } }
|
|
12482
12382
|
};
|
|
12483
|
-
}
|
|
12484
|
-
var evaluateConditions =
|
|
12383
|
+
};
|
|
12384
|
+
var evaluateConditions = (conditions = [], options) => {
|
|
12485
12385
|
const conditionsReferenceRecord = {};
|
|
12486
12386
|
for (const condition of conditions) {
|
|
12487
12387
|
const { result, toAssign } = evaluateCondition(condition, {
|
|
@@ -12500,21 +12400,22 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12500
12400
|
}
|
|
12501
12401
|
}
|
|
12502
12402
|
return { result: true, referenceRecord: conditionsReferenceRecord };
|
|
12503
|
-
}
|
|
12504
|
-
var getEndpointHeaders =
|
|
12505
|
-
|
|
12506
|
-
|
|
12507
|
-
|
|
12508
|
-
|
|
12509
|
-
|
|
12510
|
-
|
|
12511
|
-
|
|
12512
|
-
|
|
12513
|
-
|
|
12514
|
-
|
|
12515
|
-
|
|
12516
|
-
|
|
12517
|
-
|
|
12403
|
+
};
|
|
12404
|
+
var getEndpointHeaders = (headers, options) => Object.entries(headers).reduce((acc, [headerKey, headerVal]) => ({
|
|
12405
|
+
...acc,
|
|
12406
|
+
[headerKey]: headerVal.map((headerValEntry) => {
|
|
12407
|
+
const processedExpr = evaluateExpression(headerValEntry, "Header value entry", options);
|
|
12408
|
+
if (typeof processedExpr !== "string") {
|
|
12409
|
+
throw new EndpointError2(`Header '${headerKey}' value '${processedExpr}' is not a string`);
|
|
12410
|
+
}
|
|
12411
|
+
return processedExpr;
|
|
12412
|
+
})
|
|
12413
|
+
}), {});
|
|
12414
|
+
var getEndpointProperties = (properties, options) => Object.entries(properties).reduce((acc, [propertyKey, propertyVal]) => ({
|
|
12415
|
+
...acc,
|
|
12416
|
+
[propertyKey]: group$1.getEndpointProperty(propertyVal, options)
|
|
12417
|
+
}), {});
|
|
12418
|
+
var getEndpointProperty = (property, options) => {
|
|
12518
12419
|
if (Array.isArray(property)) {
|
|
12519
12420
|
return property.map((propertyEntry) => getEndpointProperty(propertyEntry, options));
|
|
12520
12421
|
}
|
|
@@ -12525,21 +12426,18 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12525
12426
|
if (property === null) {
|
|
12526
12427
|
throw new EndpointError2(`Unexpected endpoint property: ${property}`);
|
|
12527
12428
|
}
|
|
12528
|
-
return getEndpointProperties(property, options);
|
|
12429
|
+
return group$1.getEndpointProperties(property, options);
|
|
12529
12430
|
case "boolean":
|
|
12530
12431
|
return property;
|
|
12531
12432
|
default:
|
|
12532
12433
|
throw new EndpointError2(`Unexpected endpoint property type: ${typeof property}`);
|
|
12533
12434
|
}
|
|
12534
|
-
}
|
|
12535
|
-
var
|
|
12536
|
-
|
|
12537
|
-
|
|
12538
|
-
|
|
12539
|
-
|
|
12540
|
-
{}
|
|
12541
|
-
), "getEndpointProperties");
|
|
12542
|
-
var getEndpointUrl = /* @__PURE__ */ __name((endpointUrl, options) => {
|
|
12435
|
+
};
|
|
12436
|
+
var group$1 = {
|
|
12437
|
+
getEndpointProperty,
|
|
12438
|
+
getEndpointProperties
|
|
12439
|
+
};
|
|
12440
|
+
var getEndpointUrl = (endpointUrl, options) => {
|
|
12543
12441
|
const expression = evaluateExpression(endpointUrl, "Endpoint URL", options);
|
|
12544
12442
|
if (typeof expression === "string") {
|
|
12545
12443
|
try {
|
|
@@ -12550,8 +12448,8 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12550
12448
|
}
|
|
12551
12449
|
}
|
|
12552
12450
|
throw new EndpointError2(`Endpoint URL must be a string, got ${typeof expression}`);
|
|
12553
|
-
}
|
|
12554
|
-
var evaluateEndpointRule =
|
|
12451
|
+
};
|
|
12452
|
+
var evaluateEndpointRule = (endpointRule, options) => {
|
|
12555
12453
|
const { conditions, endpoint } = endpointRule;
|
|
12556
12454
|
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
12557
12455
|
if (!result) {
|
|
@@ -12572,32 +12470,19 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12572
12470
|
},
|
|
12573
12471
|
url: getEndpointUrl(url, endpointRuleOptions)
|
|
12574
12472
|
};
|
|
12575
|
-
}
|
|
12576
|
-
var evaluateErrorRule =
|
|
12473
|
+
};
|
|
12474
|
+
var evaluateErrorRule = (errorRule, options) => {
|
|
12577
12475
|
const { conditions, error: error2 } = errorRule;
|
|
12578
12476
|
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
12579
12477
|
if (!result) {
|
|
12580
12478
|
return;
|
|
12581
12479
|
}
|
|
12582
|
-
throw new EndpointError2(
|
|
12583
|
-
evaluateExpression(error2, "Error", {
|
|
12584
|
-
...options,
|
|
12585
|
-
referenceRecord: { ...options.referenceRecord, ...referenceRecord }
|
|
12586
|
-
})
|
|
12587
|
-
);
|
|
12588
|
-
}, "evaluateErrorRule");
|
|
12589
|
-
var evaluateTreeRule = /* @__PURE__ */ __name((treeRule, options) => {
|
|
12590
|
-
const { conditions, rules } = treeRule;
|
|
12591
|
-
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
12592
|
-
if (!result) {
|
|
12593
|
-
return;
|
|
12594
|
-
}
|
|
12595
|
-
return evaluateRules(rules, {
|
|
12480
|
+
throw new EndpointError2(evaluateExpression(error2, "Error", {
|
|
12596
12481
|
...options,
|
|
12597
12482
|
referenceRecord: { ...options.referenceRecord, ...referenceRecord }
|
|
12598
|
-
});
|
|
12599
|
-
}
|
|
12600
|
-
var evaluateRules =
|
|
12483
|
+
}));
|
|
12484
|
+
};
|
|
12485
|
+
var evaluateRules = (rules, options) => {
|
|
12601
12486
|
for (const rule of rules) {
|
|
12602
12487
|
if (rule.type === "endpoint") {
|
|
12603
12488
|
const endpointOrUndefined = evaluateEndpointRule(rule, options);
|
|
@@ -12607,7 +12492,7 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12607
12492
|
} else if (rule.type === "error") {
|
|
12608
12493
|
evaluateErrorRule(rule, options);
|
|
12609
12494
|
} else if (rule.type === "tree") {
|
|
12610
|
-
const endpointOrUndefined = evaluateTreeRule(rule, options);
|
|
12495
|
+
const endpointOrUndefined = group.evaluateTreeRule(rule, options);
|
|
12611
12496
|
if (endpointOrUndefined) {
|
|
12612
12497
|
return endpointOrUndefined;
|
|
12613
12498
|
}
|
|
@@ -12616,8 +12501,23 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12616
12501
|
}
|
|
12617
12502
|
}
|
|
12618
12503
|
throw new EndpointError2(`Rules evaluation failed`);
|
|
12619
|
-
}
|
|
12620
|
-
var
|
|
12504
|
+
};
|
|
12505
|
+
var evaluateTreeRule = (treeRule, options) => {
|
|
12506
|
+
const { conditions, rules } = treeRule;
|
|
12507
|
+
const { result, referenceRecord } = evaluateConditions(conditions, options);
|
|
12508
|
+
if (!result) {
|
|
12509
|
+
return;
|
|
12510
|
+
}
|
|
12511
|
+
return group.evaluateRules(rules, {
|
|
12512
|
+
...options,
|
|
12513
|
+
referenceRecord: { ...options.referenceRecord, ...referenceRecord }
|
|
12514
|
+
});
|
|
12515
|
+
};
|
|
12516
|
+
var group = {
|
|
12517
|
+
evaluateRules,
|
|
12518
|
+
evaluateTreeRule
|
|
12519
|
+
};
|
|
12520
|
+
var resolveEndpoint4 = (ruleSetObject, options) => {
|
|
12621
12521
|
const { endpointParams, logger: logger4 } = options;
|
|
12622
12522
|
const { parameters, rules } = ruleSetObject;
|
|
12623
12523
|
options.logger?.debug?.(`${debugId} Initial EndpointParams: ${toDebugString(endpointParams)}`);
|
|
@@ -12636,7 +12536,13 @@ var require_dist_cjs18 = __commonJS({
|
|
|
12636
12536
|
const endpoint = evaluateRules(rules, { endpointParams, logger: logger4, referenceRecord: {} });
|
|
12637
12537
|
options.logger?.debug?.(`${debugId} Resolved endpoint: ${toDebugString(endpoint)}`);
|
|
12638
12538
|
return endpoint;
|
|
12639
|
-
}
|
|
12539
|
+
};
|
|
12540
|
+
exports2.EndpointCache = EndpointCache3;
|
|
12541
|
+
exports2.EndpointError = EndpointError2;
|
|
12542
|
+
exports2.customEndpointFunctions = customEndpointFunctions3;
|
|
12543
|
+
exports2.isIpAddress = isIpAddress2;
|
|
12544
|
+
exports2.isValidHostLabel = isValidHostLabel;
|
|
12545
|
+
exports2.resolveEndpoint = resolveEndpoint4;
|
|
12640
12546
|
}
|
|
12641
12547
|
});
|
|
12642
12548
|
|
|
@@ -13329,36 +13235,11 @@ var init_NODE_AUTH_SCHEME_PREFERENCE_OPTIONS = __esm({
|
|
|
13329
13235
|
|
|
13330
13236
|
// node_modules/@smithy/property-provider/dist-cjs/index.js
|
|
13331
13237
|
var require_dist_cjs20 = __commonJS({
|
|
13332
|
-
"node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2
|
|
13333
|
-
|
|
13334
|
-
var __getOwnPropDesc2 = Object.getOwnPropertyDescriptor;
|
|
13335
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
13336
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
13337
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
13338
|
-
var __export2 = (target, all) => {
|
|
13339
|
-
for (var name in all)
|
|
13340
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
13341
|
-
};
|
|
13342
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
13343
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
13344
|
-
for (let key of __getOwnPropNames2(from))
|
|
13345
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
13346
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
13347
|
-
}
|
|
13348
|
-
return to;
|
|
13349
|
-
};
|
|
13350
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
13351
|
-
var src_exports = {};
|
|
13352
|
-
__export2(src_exports, {
|
|
13353
|
-
CredentialsProviderError: () => CredentialsProviderError,
|
|
13354
|
-
ProviderError: () => ProviderError2,
|
|
13355
|
-
TokenProviderError: () => TokenProviderError,
|
|
13356
|
-
chain: () => chain,
|
|
13357
|
-
fromStatic: () => fromStatic,
|
|
13358
|
-
memoize: () => memoize
|
|
13359
|
-
});
|
|
13360
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
13238
|
+
"node_modules/@smithy/property-provider/dist-cjs/index.js"(exports2) {
|
|
13239
|
+
"use strict";
|
|
13361
13240
|
var ProviderError2 = class _ProviderError extends Error {
|
|
13241
|
+
name = "ProviderError";
|
|
13242
|
+
tryNextLink;
|
|
13362
13243
|
constructor(message, options = true) {
|
|
13363
13244
|
let logger4;
|
|
13364
13245
|
let tryNextLink = true;
|
|
@@ -13370,48 +13251,29 @@ var require_dist_cjs20 = __commonJS({
|
|
|
13370
13251
|
tryNextLink = options.tryNextLink ?? true;
|
|
13371
13252
|
}
|
|
13372
13253
|
super(message);
|
|
13373
|
-
this.name = "ProviderError";
|
|
13374
13254
|
this.tryNextLink = tryNextLink;
|
|
13375
13255
|
Object.setPrototypeOf(this, _ProviderError.prototype);
|
|
13376
13256
|
logger4?.debug?.(`@smithy/property-provider ${tryNextLink ? "->" : "(!)"} ${message}`);
|
|
13377
13257
|
}
|
|
13378
|
-
static {
|
|
13379
|
-
__name(this, "ProviderError");
|
|
13380
|
-
}
|
|
13381
|
-
/**
|
|
13382
|
-
* @deprecated use new operator.
|
|
13383
|
-
*/
|
|
13384
13258
|
static from(error2, options = true) {
|
|
13385
13259
|
return Object.assign(new this(error2.message, options), error2);
|
|
13386
13260
|
}
|
|
13387
13261
|
};
|
|
13388
13262
|
var CredentialsProviderError = class _CredentialsProviderError extends ProviderError2 {
|
|
13389
|
-
|
|
13390
|
-
* @override
|
|
13391
|
-
*/
|
|
13263
|
+
name = "CredentialsProviderError";
|
|
13392
13264
|
constructor(message, options = true) {
|
|
13393
13265
|
super(message, options);
|
|
13394
|
-
this.name = "CredentialsProviderError";
|
|
13395
13266
|
Object.setPrototypeOf(this, _CredentialsProviderError.prototype);
|
|
13396
13267
|
}
|
|
13397
|
-
static {
|
|
13398
|
-
__name(this, "CredentialsProviderError");
|
|
13399
|
-
}
|
|
13400
13268
|
};
|
|
13401
13269
|
var TokenProviderError = class _TokenProviderError extends ProviderError2 {
|
|
13402
|
-
|
|
13403
|
-
* @override
|
|
13404
|
-
*/
|
|
13270
|
+
name = "TokenProviderError";
|
|
13405
13271
|
constructor(message, options = true) {
|
|
13406
13272
|
super(message, options);
|
|
13407
|
-
this.name = "TokenProviderError";
|
|
13408
13273
|
Object.setPrototypeOf(this, _TokenProviderError.prototype);
|
|
13409
13274
|
}
|
|
13410
|
-
static {
|
|
13411
|
-
__name(this, "TokenProviderError");
|
|
13412
|
-
}
|
|
13413
13275
|
};
|
|
13414
|
-
var chain =
|
|
13276
|
+
var chain = (...providers) => async () => {
|
|
13415
13277
|
if (providers.length === 0) {
|
|
13416
13278
|
throw new ProviderError2("No providers in chain");
|
|
13417
13279
|
}
|
|
@@ -13429,14 +13291,14 @@ var require_dist_cjs20 = __commonJS({
|
|
|
13429
13291
|
}
|
|
13430
13292
|
}
|
|
13431
13293
|
throw lastProviderError;
|
|
13432
|
-
}
|
|
13433
|
-
var fromStatic =
|
|
13434
|
-
var memoize =
|
|
13294
|
+
};
|
|
13295
|
+
var fromStatic = (staticValue) => () => Promise.resolve(staticValue);
|
|
13296
|
+
var memoize = (provider, isExpired, requiresRefresh) => {
|
|
13435
13297
|
let resolved;
|
|
13436
13298
|
let pending;
|
|
13437
13299
|
let hasResult;
|
|
13438
13300
|
let isConstant = false;
|
|
13439
|
-
const coalesceProvider =
|
|
13301
|
+
const coalesceProvider = async () => {
|
|
13440
13302
|
if (!pending) {
|
|
13441
13303
|
pending = provider();
|
|
13442
13304
|
}
|
|
@@ -13448,7 +13310,7 @@ var require_dist_cjs20 = __commonJS({
|
|
|
13448
13310
|
pending = void 0;
|
|
13449
13311
|
}
|
|
13450
13312
|
return resolved;
|
|
13451
|
-
}
|
|
13313
|
+
};
|
|
13452
13314
|
if (isExpired === void 0) {
|
|
13453
13315
|
return async (options) => {
|
|
13454
13316
|
if (!hasResult || options?.forceRefresh) {
|
|
@@ -13474,7 +13336,13 @@ var require_dist_cjs20 = __commonJS({
|
|
|
13474
13336
|
}
|
|
13475
13337
|
return resolved;
|
|
13476
13338
|
};
|
|
13477
|
-
}
|
|
13339
|
+
};
|
|
13340
|
+
exports2.CredentialsProviderError = CredentialsProviderError;
|
|
13341
|
+
exports2.ProviderError = ProviderError2;
|
|
13342
|
+
exports2.TokenProviderError = TokenProviderError;
|
|
13343
|
+
exports2.chain = chain;
|
|
13344
|
+
exports2.fromStatic = fromStatic;
|
|
13345
|
+
exports2.memoize = memoize;
|
|
13478
13346
|
}
|
|
13479
13347
|
});
|
|
13480
13348
|
|
|
@@ -14856,7 +14724,7 @@ var require_dist_cjs24 = __commonJS({
|
|
|
14856
14724
|
}
|
|
14857
14725
|
};
|
|
14858
14726
|
var import_protocols8 = (init_protocols(), __toCommonJS(protocols_exports));
|
|
14859
|
-
var
|
|
14727
|
+
var import_types3 = require_dist_cjs();
|
|
14860
14728
|
var import_schema19 = (init_schema(), __toCommonJS(schema_exports));
|
|
14861
14729
|
var SENSITIVE_STRING3 = "***SensitiveInformation***";
|
|
14862
14730
|
function schemaLogFilter(schema, data) {
|
|
@@ -14928,7 +14796,7 @@ var require_dist_cjs24 = __commonJS({
|
|
|
14928
14796
|
commandName,
|
|
14929
14797
|
inputFilterSensitiveLog,
|
|
14930
14798
|
outputFilterSensitiveLog,
|
|
14931
|
-
[
|
|
14799
|
+
[import_types3.SMITHY_CONTEXT_KEY]: {
|
|
14932
14800
|
commandInstance: this,
|
|
14933
14801
|
...smithyContext
|
|
14934
14802
|
},
|
|
@@ -15205,8 +15073,8 @@ var require_dist_cjs24 = __commonJS({
|
|
|
15205
15073
|
}, "emitWarningIfUnsupportedVersion");
|
|
15206
15074
|
var getChecksumConfiguration = /* @__PURE__ */ __name((runtimeConfig) => {
|
|
15207
15075
|
const checksumAlgorithms = [];
|
|
15208
|
-
for (const id in
|
|
15209
|
-
const algorithmId =
|
|
15076
|
+
for (const id in import_types3.AlgorithmId) {
|
|
15077
|
+
const algorithmId = import_types3.AlgorithmId[id];
|
|
15210
15078
|
if (runtimeConfig[algorithmId] === void 0) {
|
|
15211
15079
|
continue;
|
|
15212
15080
|
}
|
|
@@ -19091,33 +18959,9 @@ var require_dist_cjs26 = __commonJS({
|
|
|
19091
18959
|
|
|
19092
18960
|
// node_modules/@smithy/util-config-provider/dist-cjs/index.js
|
|
19093
18961
|
var require_dist_cjs27 = __commonJS({
|
|
19094
|
-
"node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2
|
|
19095
|
-
|
|
19096
|
-
var
|
|
19097
|
-
var __getOwnPropNames2 = Object.getOwnPropertyNames;
|
|
19098
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
19099
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
19100
|
-
var __export2 = (target, all) => {
|
|
19101
|
-
for (var name in all)
|
|
19102
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
19103
|
-
};
|
|
19104
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
19105
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19106
|
-
for (let key of __getOwnPropNames2(from))
|
|
19107
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
19108
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
19109
|
-
}
|
|
19110
|
-
return to;
|
|
19111
|
-
};
|
|
19112
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
19113
|
-
var src_exports = {};
|
|
19114
|
-
__export2(src_exports, {
|
|
19115
|
-
SelectorType: () => SelectorType,
|
|
19116
|
-
booleanSelector: () => booleanSelector,
|
|
19117
|
-
numberSelector: () => numberSelector
|
|
19118
|
-
});
|
|
19119
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
19120
|
-
var booleanSelector = /* @__PURE__ */ __name((obj, key, type) => {
|
|
18962
|
+
"node_modules/@smithy/util-config-provider/dist-cjs/index.js"(exports2) {
|
|
18963
|
+
"use strict";
|
|
18964
|
+
var booleanSelector = (obj, key, type) => {
|
|
19121
18965
|
if (!(key in obj))
|
|
19122
18966
|
return void 0;
|
|
19123
18967
|
if (obj[key] === "true")
|
|
@@ -19125,8 +18969,8 @@ var require_dist_cjs27 = __commonJS({
|
|
|
19125
18969
|
if (obj[key] === "false")
|
|
19126
18970
|
return false;
|
|
19127
18971
|
throw new Error(`Cannot load ${type} "${key}". Expected "true" or "false", got ${obj[key]}.`);
|
|
19128
|
-
}
|
|
19129
|
-
var numberSelector =
|
|
18972
|
+
};
|
|
18973
|
+
var numberSelector = (obj, key, type) => {
|
|
19130
18974
|
if (!(key in obj))
|
|
19131
18975
|
return void 0;
|
|
19132
18976
|
const numberValue = parseInt(obj[key], 10);
|
|
@@ -19134,84 +18978,50 @@ var require_dist_cjs27 = __commonJS({
|
|
|
19134
18978
|
throw new TypeError(`Cannot load ${type} '${key}'. Expected number, got '${obj[key]}'.`);
|
|
19135
18979
|
}
|
|
19136
18980
|
return numberValue;
|
|
19137
|
-
}
|
|
19138
|
-
|
|
19139
|
-
|
|
19140
|
-
|
|
19141
|
-
|
|
19142
|
-
})(SelectorType || {});
|
|
18981
|
+
};
|
|
18982
|
+
exports2.SelectorType = void 0;
|
|
18983
|
+
(function(SelectorType) {
|
|
18984
|
+
SelectorType["ENV"] = "env";
|
|
18985
|
+
SelectorType["CONFIG"] = "shared config entry";
|
|
18986
|
+
})(exports2.SelectorType || (exports2.SelectorType = {}));
|
|
18987
|
+
exports2.booleanSelector = booleanSelector;
|
|
18988
|
+
exports2.numberSelector = numberSelector;
|
|
19143
18989
|
}
|
|
19144
18990
|
});
|
|
19145
18991
|
|
|
19146
18992
|
// node_modules/@smithy/config-resolver/dist-cjs/index.js
|
|
19147
18993
|
var require_dist_cjs28 = __commonJS({
|
|
19148
|
-
"node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2
|
|
19149
|
-
|
|
19150
|
-
var
|
|
19151
|
-
var
|
|
19152
|
-
var
|
|
19153
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
19154
|
-
var __export2 = (target, all) => {
|
|
19155
|
-
for (var name in all)
|
|
19156
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
19157
|
-
};
|
|
19158
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
19159
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19160
|
-
for (let key of __getOwnPropNames2(from))
|
|
19161
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
19162
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
19163
|
-
}
|
|
19164
|
-
return to;
|
|
19165
|
-
};
|
|
19166
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
19167
|
-
var src_exports = {};
|
|
19168
|
-
__export2(src_exports, {
|
|
19169
|
-
CONFIG_USE_DUALSTACK_ENDPOINT: () => CONFIG_USE_DUALSTACK_ENDPOINT,
|
|
19170
|
-
CONFIG_USE_FIPS_ENDPOINT: () => CONFIG_USE_FIPS_ENDPOINT,
|
|
19171
|
-
DEFAULT_USE_DUALSTACK_ENDPOINT: () => DEFAULT_USE_DUALSTACK_ENDPOINT,
|
|
19172
|
-
DEFAULT_USE_FIPS_ENDPOINT: () => DEFAULT_USE_FIPS_ENDPOINT,
|
|
19173
|
-
ENV_USE_DUALSTACK_ENDPOINT: () => ENV_USE_DUALSTACK_ENDPOINT,
|
|
19174
|
-
ENV_USE_FIPS_ENDPOINT: () => ENV_USE_FIPS_ENDPOINT,
|
|
19175
|
-
NODE_REGION_CONFIG_FILE_OPTIONS: () => NODE_REGION_CONFIG_FILE_OPTIONS3,
|
|
19176
|
-
NODE_REGION_CONFIG_OPTIONS: () => NODE_REGION_CONFIG_OPTIONS3,
|
|
19177
|
-
NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS3,
|
|
19178
|
-
NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS: () => NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS3,
|
|
19179
|
-
REGION_ENV_NAME: () => REGION_ENV_NAME,
|
|
19180
|
-
REGION_INI_NAME: () => REGION_INI_NAME,
|
|
19181
|
-
getRegionInfo: () => getRegionInfo,
|
|
19182
|
-
resolveCustomEndpointsConfig: () => resolveCustomEndpointsConfig,
|
|
19183
|
-
resolveEndpointsConfig: () => resolveEndpointsConfig,
|
|
19184
|
-
resolveRegionConfig: () => resolveRegionConfig3
|
|
19185
|
-
});
|
|
19186
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
19187
|
-
var import_util_config_provider = require_dist_cjs27();
|
|
18994
|
+
"node_modules/@smithy/config-resolver/dist-cjs/index.js"(exports2) {
|
|
18995
|
+
"use strict";
|
|
18996
|
+
var utilConfigProvider = require_dist_cjs27();
|
|
18997
|
+
var utilMiddleware = require_dist_cjs6();
|
|
18998
|
+
var utilEndpoints = require_dist_cjs18();
|
|
19188
18999
|
var ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
|
|
19189
19000
|
var CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
|
|
19190
19001
|
var DEFAULT_USE_DUALSTACK_ENDPOINT = false;
|
|
19191
19002
|
var NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS3 = {
|
|
19192
|
-
environmentVariableSelector: (env) =>
|
|
19193
|
-
configFileSelector: (profile) =>
|
|
19003
|
+
environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.ENV),
|
|
19004
|
+
configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_DUALSTACK_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
|
|
19194
19005
|
default: false
|
|
19195
19006
|
};
|
|
19196
19007
|
var ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
|
|
19197
19008
|
var CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
|
|
19198
19009
|
var DEFAULT_USE_FIPS_ENDPOINT = false;
|
|
19199
19010
|
var NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS3 = {
|
|
19200
|
-
environmentVariableSelector: (env) =>
|
|
19201
|
-
configFileSelector: (profile) =>
|
|
19011
|
+
environmentVariableSelector: (env) => utilConfigProvider.booleanSelector(env, ENV_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.ENV),
|
|
19012
|
+
configFileSelector: (profile) => utilConfigProvider.booleanSelector(profile, CONFIG_USE_FIPS_ENDPOINT, utilConfigProvider.SelectorType.CONFIG),
|
|
19202
19013
|
default: false
|
|
19203
19014
|
};
|
|
19204
|
-
var
|
|
19205
|
-
var resolveCustomEndpointsConfig = /* @__PURE__ */ __name((input) => {
|
|
19015
|
+
var resolveCustomEndpointsConfig = (input) => {
|
|
19206
19016
|
const { tls, endpoint, urlParser, useDualstackEndpoint } = input;
|
|
19207
19017
|
return Object.assign(input, {
|
|
19208
19018
|
tls: tls ?? true,
|
|
19209
|
-
endpoint:
|
|
19019
|
+
endpoint: utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
|
|
19210
19020
|
isCustomEndpoint: true,
|
|
19211
|
-
useDualstackEndpoint:
|
|
19021
|
+
useDualstackEndpoint: utilMiddleware.normalizeProvider(useDualstackEndpoint ?? false)
|
|
19212
19022
|
});
|
|
19213
|
-
}
|
|
19214
|
-
var getEndpointFromRegion =
|
|
19023
|
+
};
|
|
19024
|
+
var getEndpointFromRegion = async (input) => {
|
|
19215
19025
|
const { tls = true } = input;
|
|
19216
19026
|
const region = await input.region();
|
|
19217
19027
|
const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
|
|
@@ -19225,17 +19035,17 @@ var require_dist_cjs28 = __commonJS({
|
|
|
19225
19035
|
throw new Error("Cannot resolve hostname from client config");
|
|
19226
19036
|
}
|
|
19227
19037
|
return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`);
|
|
19228
|
-
}
|
|
19229
|
-
var resolveEndpointsConfig =
|
|
19230
|
-
const useDualstackEndpoint =
|
|
19038
|
+
};
|
|
19039
|
+
var resolveEndpointsConfig = (input) => {
|
|
19040
|
+
const useDualstackEndpoint = utilMiddleware.normalizeProvider(input.useDualstackEndpoint ?? false);
|
|
19231
19041
|
const { endpoint, useFipsEndpoint, urlParser, tls } = input;
|
|
19232
19042
|
return Object.assign(input, {
|
|
19233
19043
|
tls: tls ?? true,
|
|
19234
|
-
endpoint: endpoint ?
|
|
19044
|
+
endpoint: endpoint ? utilMiddleware.normalizeProvider(typeof endpoint === "string" ? urlParser(endpoint) : endpoint) : () => getEndpointFromRegion({ ...input, useDualstackEndpoint, useFipsEndpoint }),
|
|
19235
19045
|
isCustomEndpoint: !!endpoint,
|
|
19236
19046
|
useDualstackEndpoint
|
|
19237
19047
|
});
|
|
19238
|
-
}
|
|
19048
|
+
};
|
|
19239
19049
|
var REGION_ENV_NAME = "AWS_REGION";
|
|
19240
19050
|
var REGION_INI_NAME = "region";
|
|
19241
19051
|
var NODE_REGION_CONFIG_OPTIONS3 = {
|
|
@@ -19248,20 +19058,31 @@ var require_dist_cjs28 = __commonJS({
|
|
|
19248
19058
|
var NODE_REGION_CONFIG_FILE_OPTIONS3 = {
|
|
19249
19059
|
preferredFile: "credentials"
|
|
19250
19060
|
};
|
|
19251
|
-
var
|
|
19252
|
-
var
|
|
19253
|
-
|
|
19061
|
+
var validRegions = /* @__PURE__ */ new Set();
|
|
19062
|
+
var checkRegion = (region, check = utilEndpoints.isValidHostLabel) => {
|
|
19063
|
+
if (!validRegions.has(region) && !check(region)) {
|
|
19064
|
+
if (region === "*") {
|
|
19065
|
+
console.warn(`@smithy/config-resolver WARN - Please use the caller region instead of "*". See "sigv4a" in https://github.com/aws/aws-sdk-js-v3/blob/main/supplemental-docs/CLIENTS.md.`);
|
|
19066
|
+
} else {
|
|
19067
|
+
throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
|
|
19068
|
+
}
|
|
19069
|
+
} else {
|
|
19070
|
+
validRegions.add(region);
|
|
19071
|
+
}
|
|
19072
|
+
};
|
|
19073
|
+
var isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
|
|
19074
|
+
var getRealRegion = (region) => isFipsRegion(region) ? ["fips-aws-global", "aws-fips"].includes(region) ? "us-east-1" : region.replace(/fips-(dkr-|prod-)?|-fips/, "") : region;
|
|
19075
|
+
var resolveRegionConfig3 = (input) => {
|
|
19254
19076
|
const { region, useFipsEndpoint } = input;
|
|
19255
19077
|
if (!region) {
|
|
19256
19078
|
throw new Error("Region is missing");
|
|
19257
19079
|
}
|
|
19258
19080
|
return Object.assign(input, {
|
|
19259
19081
|
region: async () => {
|
|
19260
|
-
|
|
19261
|
-
|
|
19262
|
-
|
|
19263
|
-
|
|
19264
|
-
return getRealRegion(providedRegion);
|
|
19082
|
+
const providedRegion = typeof region === "function" ? await region() : region;
|
|
19083
|
+
const realRegion = getRealRegion(providedRegion);
|
|
19084
|
+
checkRegion(realRegion);
|
|
19085
|
+
return realRegion;
|
|
19265
19086
|
},
|
|
19266
19087
|
useFipsEndpoint: async () => {
|
|
19267
19088
|
const providedRegion = typeof region === "string" ? region : await region();
|
|
@@ -19271,13 +19092,11 @@ var require_dist_cjs28 = __commonJS({
|
|
|
19271
19092
|
return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
|
|
19272
19093
|
}
|
|
19273
19094
|
});
|
|
19274
|
-
}
|
|
19275
|
-
var getHostnameFromVariants =
|
|
19276
|
-
|
|
19277
|
-
|
|
19278
|
-
var
|
|
19279
|
-
var getResolvedPartition = /* @__PURE__ */ __name((region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws", "getResolvedPartition");
|
|
19280
|
-
var getResolvedSigningRegion = /* @__PURE__ */ __name((hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {
|
|
19095
|
+
};
|
|
19096
|
+
var getHostnameFromVariants = (variants = [], { useFipsEndpoint, useDualstackEndpoint }) => variants.find(({ tags }) => useFipsEndpoint === tags.includes("fips") && useDualstackEndpoint === tags.includes("dualstack"))?.hostname;
|
|
19097
|
+
var getResolvedHostname = (resolvedRegion, { regionHostname, partitionHostname }) => regionHostname ? regionHostname : partitionHostname ? partitionHostname.replace("{region}", resolvedRegion) : void 0;
|
|
19098
|
+
var getResolvedPartition = (region, { partitionHash }) => Object.keys(partitionHash || {}).find((key) => partitionHash[key].regions.includes(region)) ?? "aws";
|
|
19099
|
+
var getResolvedSigningRegion = (hostname, { signingRegion, regionRegex, useFipsEndpoint }) => {
|
|
19281
19100
|
if (signingRegion) {
|
|
19282
19101
|
return signingRegion;
|
|
19283
19102
|
} else if (useFipsEndpoint) {
|
|
@@ -19287,14 +19106,8 @@ var require_dist_cjs28 = __commonJS({
|
|
|
19287
19106
|
return regionRegexmatchArray[0].slice(1, -1);
|
|
19288
19107
|
}
|
|
19289
19108
|
}
|
|
19290
|
-
}
|
|
19291
|
-
var getRegionInfo =
|
|
19292
|
-
useFipsEndpoint = false,
|
|
19293
|
-
useDualstackEndpoint = false,
|
|
19294
|
-
signingService,
|
|
19295
|
-
regionHash,
|
|
19296
|
-
partitionHash
|
|
19297
|
-
}) => {
|
|
19109
|
+
};
|
|
19110
|
+
var getRegionInfo = (region, { useFipsEndpoint = false, useDualstackEndpoint = false, signingService, regionHash, partitionHash }) => {
|
|
19298
19111
|
const partition = getResolvedPartition(region, { partitionHash });
|
|
19299
19112
|
const resolvedRegion = region in regionHash ? region : partitionHash[partition]?.endpoint ?? region;
|
|
19300
19113
|
const hostnameOptions = { useFipsEndpoint, useDualstackEndpoint };
|
|
@@ -19318,7 +19131,23 @@ var require_dist_cjs28 = __commonJS({
|
|
|
19318
19131
|
signingService: regionHash[resolvedRegion].signingService
|
|
19319
19132
|
}
|
|
19320
19133
|
};
|
|
19321
|
-
}
|
|
19134
|
+
};
|
|
19135
|
+
exports2.CONFIG_USE_DUALSTACK_ENDPOINT = CONFIG_USE_DUALSTACK_ENDPOINT;
|
|
19136
|
+
exports2.CONFIG_USE_FIPS_ENDPOINT = CONFIG_USE_FIPS_ENDPOINT;
|
|
19137
|
+
exports2.DEFAULT_USE_DUALSTACK_ENDPOINT = DEFAULT_USE_DUALSTACK_ENDPOINT;
|
|
19138
|
+
exports2.DEFAULT_USE_FIPS_ENDPOINT = DEFAULT_USE_FIPS_ENDPOINT;
|
|
19139
|
+
exports2.ENV_USE_DUALSTACK_ENDPOINT = ENV_USE_DUALSTACK_ENDPOINT;
|
|
19140
|
+
exports2.ENV_USE_FIPS_ENDPOINT = ENV_USE_FIPS_ENDPOINT;
|
|
19141
|
+
exports2.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS3;
|
|
19142
|
+
exports2.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS3;
|
|
19143
|
+
exports2.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS3;
|
|
19144
|
+
exports2.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS3;
|
|
19145
|
+
exports2.REGION_ENV_NAME = REGION_ENV_NAME;
|
|
19146
|
+
exports2.REGION_INI_NAME = REGION_INI_NAME;
|
|
19147
|
+
exports2.getRegionInfo = getRegionInfo;
|
|
19148
|
+
exports2.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
|
|
19149
|
+
exports2.resolveEndpointsConfig = resolveEndpointsConfig;
|
|
19150
|
+
exports2.resolveRegionConfig = resolveRegionConfig3;
|
|
19322
19151
|
}
|
|
19323
19152
|
});
|
|
19324
19153
|
|
|
@@ -19436,7 +19265,7 @@ var require_getHomeDir = __commonJS({
|
|
|
19436
19265
|
}
|
|
19437
19266
|
return "DEFAULT";
|
|
19438
19267
|
};
|
|
19439
|
-
var
|
|
19268
|
+
var getHomeDir = () => {
|
|
19440
19269
|
const { HOME, USERPROFILE, HOMEPATH, HOMEDRIVE = `C:${path_1.sep}` } = process.env;
|
|
19441
19270
|
if (HOME)
|
|
19442
19271
|
return HOME;
|
|
@@ -19449,7 +19278,7 @@ var require_getHomeDir = __commonJS({
|
|
|
19449
19278
|
homeDirCache[homeDirCacheKey] = (0, os_1.homedir)();
|
|
19450
19279
|
return homeDirCache[homeDirCacheKey];
|
|
19451
19280
|
};
|
|
19452
|
-
exports2.getHomeDir =
|
|
19281
|
+
exports2.getHomeDir = getHomeDir;
|
|
19453
19282
|
}
|
|
19454
19283
|
});
|
|
19455
19284
|
|
|
@@ -19462,12 +19291,12 @@ var require_getSSOTokenFilepath = __commonJS({
|
|
|
19462
19291
|
var crypto_1 = require("crypto");
|
|
19463
19292
|
var path_1 = require("path");
|
|
19464
19293
|
var getHomeDir_1 = require_getHomeDir();
|
|
19465
|
-
var
|
|
19294
|
+
var getSSOTokenFilepath = (id) => {
|
|
19466
19295
|
const hasher = (0, crypto_1.createHash)("sha1");
|
|
19467
19296
|
const cacheName = hasher.update(id).digest("hex");
|
|
19468
19297
|
return (0, path_1.join)((0, getHomeDir_1.getHomeDir)(), ".aws", "sso", "cache", `${cacheName}.json`);
|
|
19469
19298
|
};
|
|
19470
|
-
exports2.getSSOTokenFilepath =
|
|
19299
|
+
exports2.getSSOTokenFilepath = getSSOTokenFilepath;
|
|
19471
19300
|
}
|
|
19472
19301
|
});
|
|
19473
19302
|
|
|
@@ -19476,107 +19305,79 @@ var require_getSSOTokenFromFile = __commonJS({
|
|
|
19476
19305
|
"node_modules/@smithy/shared-ini-file-loader/dist-cjs/getSSOTokenFromFile.js"(exports2) {
|
|
19477
19306
|
"use strict";
|
|
19478
19307
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19479
|
-
exports2.getSSOTokenFromFile = void 0;
|
|
19480
|
-
var
|
|
19308
|
+
exports2.getSSOTokenFromFile = exports2.tokenIntercept = void 0;
|
|
19309
|
+
var promises_1 = require("fs/promises");
|
|
19481
19310
|
var getSSOTokenFilepath_1 = require_getSSOTokenFilepath();
|
|
19482
|
-
|
|
19483
|
-
var
|
|
19311
|
+
exports2.tokenIntercept = {};
|
|
19312
|
+
var getSSOTokenFromFile = async (id) => {
|
|
19313
|
+
if (exports2.tokenIntercept[id]) {
|
|
19314
|
+
return exports2.tokenIntercept[id];
|
|
19315
|
+
}
|
|
19484
19316
|
const ssoTokenFilepath = (0, getSSOTokenFilepath_1.getSSOTokenFilepath)(id);
|
|
19485
|
-
const ssoTokenText = await readFile(ssoTokenFilepath, "utf8");
|
|
19317
|
+
const ssoTokenText = await (0, promises_1.readFile)(ssoTokenFilepath, "utf8");
|
|
19486
19318
|
return JSON.parse(ssoTokenText);
|
|
19487
19319
|
};
|
|
19488
|
-
exports2.getSSOTokenFromFile =
|
|
19320
|
+
exports2.getSSOTokenFromFile = getSSOTokenFromFile;
|
|
19489
19321
|
}
|
|
19490
19322
|
});
|
|
19491
19323
|
|
|
19492
|
-
// node_modules/@smithy/shared-ini-file-loader/dist-cjs/
|
|
19493
|
-
var
|
|
19494
|
-
"node_modules/@smithy/shared-ini-file-loader/dist-cjs/
|
|
19324
|
+
// node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js
|
|
19325
|
+
var require_readFile = __commonJS({
|
|
19326
|
+
"node_modules/@smithy/shared-ini-file-loader/dist-cjs/readFile.js"(exports2) {
|
|
19495
19327
|
"use strict";
|
|
19496
19328
|
Object.defineProperty(exports2, "__esModule", { value: true });
|
|
19497
|
-
exports2.
|
|
19498
|
-
var
|
|
19499
|
-
|
|
19500
|
-
|
|
19501
|
-
var
|
|
19502
|
-
if (
|
|
19503
|
-
|
|
19329
|
+
exports2.readFile = exports2.fileIntercept = exports2.filePromises = void 0;
|
|
19330
|
+
var promises_1 = require("node:fs/promises");
|
|
19331
|
+
exports2.filePromises = {};
|
|
19332
|
+
exports2.fileIntercept = {};
|
|
19333
|
+
var readFile = (path, options) => {
|
|
19334
|
+
if (exports2.fileIntercept[path] !== void 0) {
|
|
19335
|
+
return exports2.fileIntercept[path];
|
|
19504
19336
|
}
|
|
19505
|
-
|
|
19337
|
+
if (!exports2.filePromises[path] || options?.ignoreCache) {
|
|
19338
|
+
exports2.filePromises[path] = (0, promises_1.readFile)(path, "utf8");
|
|
19339
|
+
}
|
|
19340
|
+
return exports2.filePromises[path];
|
|
19506
19341
|
};
|
|
19507
|
-
exports2.
|
|
19342
|
+
exports2.readFile = readFile;
|
|
19508
19343
|
}
|
|
19509
19344
|
});
|
|
19510
19345
|
|
|
19511
19346
|
// node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js
|
|
19512
19347
|
var require_dist_cjs31 = __commonJS({
|
|
19513
|
-
"node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2
|
|
19514
|
-
|
|
19515
|
-
var
|
|
19516
|
-
var
|
|
19517
|
-
var
|
|
19518
|
-
var
|
|
19519
|
-
var
|
|
19520
|
-
|
|
19521
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
19522
|
-
};
|
|
19523
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
19524
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19525
|
-
for (let key of __getOwnPropNames2(from))
|
|
19526
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
19527
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
19528
|
-
}
|
|
19529
|
-
return to;
|
|
19530
|
-
};
|
|
19531
|
-
var __reExport = (target, mod, secondTarget) => (__copyProps2(target, mod, "default"), secondTarget && __copyProps2(secondTarget, mod, "default"));
|
|
19532
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
19533
|
-
var src_exports = {};
|
|
19534
|
-
__export2(src_exports, {
|
|
19535
|
-
CONFIG_PREFIX_SEPARATOR: () => CONFIG_PREFIX_SEPARATOR,
|
|
19536
|
-
DEFAULT_PROFILE: () => DEFAULT_PROFILE,
|
|
19537
|
-
ENV_PROFILE: () => ENV_PROFILE,
|
|
19538
|
-
getProfileName: () => getProfileName,
|
|
19539
|
-
loadSharedConfigFiles: () => loadSharedConfigFiles,
|
|
19540
|
-
loadSsoSessionData: () => loadSsoSessionData,
|
|
19541
|
-
parseKnownFiles: () => parseKnownFiles
|
|
19542
|
-
});
|
|
19543
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
19544
|
-
__reExport(src_exports, require_getHomeDir(), module2.exports);
|
|
19348
|
+
"node_modules/@smithy/shared-ini-file-loader/dist-cjs/index.js"(exports2) {
|
|
19349
|
+
"use strict";
|
|
19350
|
+
var getHomeDir = require_getHomeDir();
|
|
19351
|
+
var getSSOTokenFilepath = require_getSSOTokenFilepath();
|
|
19352
|
+
var getSSOTokenFromFile = require_getSSOTokenFromFile();
|
|
19353
|
+
var path = require("path");
|
|
19354
|
+
var types = require_dist_cjs();
|
|
19355
|
+
var readFile = require_readFile();
|
|
19545
19356
|
var ENV_PROFILE = "AWS_PROFILE";
|
|
19546
19357
|
var DEFAULT_PROFILE = "default";
|
|
19547
|
-
var getProfileName =
|
|
19548
|
-
|
|
19549
|
-
|
|
19550
|
-
var import_types5 = require_dist_cjs();
|
|
19551
|
-
var getConfigData = /* @__PURE__ */ __name((data) => Object.entries(data).filter(([key]) => {
|
|
19358
|
+
var getProfileName = (init) => init.profile || process.env[ENV_PROFILE] || DEFAULT_PROFILE;
|
|
19359
|
+
var CONFIG_PREFIX_SEPARATOR = ".";
|
|
19360
|
+
var getConfigData = (data) => Object.entries(data).filter(([key]) => {
|
|
19552
19361
|
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
19553
19362
|
if (indexOfSeparator === -1) {
|
|
19554
19363
|
return false;
|
|
19555
19364
|
}
|
|
19556
|
-
return Object.values(
|
|
19557
|
-
}).reduce(
|
|
19558
|
-
|
|
19559
|
-
|
|
19560
|
-
|
|
19561
|
-
|
|
19562
|
-
|
|
19563
|
-
}
|
|
19564
|
-
|
|
19565
|
-
// Populate default profile, if present.
|
|
19566
|
-
...data.default && { default: data.default }
|
|
19567
|
-
}
|
|
19568
|
-
), "getConfigData");
|
|
19569
|
-
var import_path = require("path");
|
|
19570
|
-
var import_getHomeDir = require_getHomeDir();
|
|
19365
|
+
return Object.values(types.IniSectionType).includes(key.substring(0, indexOfSeparator));
|
|
19366
|
+
}).reduce((acc, [key, value]) => {
|
|
19367
|
+
const indexOfSeparator = key.indexOf(CONFIG_PREFIX_SEPARATOR);
|
|
19368
|
+
const updatedKey = key.substring(0, indexOfSeparator) === types.IniSectionType.PROFILE ? key.substring(indexOfSeparator + 1) : key;
|
|
19369
|
+
acc[updatedKey] = value;
|
|
19370
|
+
return acc;
|
|
19371
|
+
}, {
|
|
19372
|
+
...data.default && { default: data.default }
|
|
19373
|
+
});
|
|
19571
19374
|
var ENV_CONFIG_PATH = "AWS_CONFIG_FILE";
|
|
19572
|
-
var getConfigFilepath =
|
|
19573
|
-
var import_getHomeDir2 = require_getHomeDir();
|
|
19375
|
+
var getConfigFilepath = () => process.env[ENV_CONFIG_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "config");
|
|
19574
19376
|
var ENV_CREDENTIALS_PATH = "AWS_SHARED_CREDENTIALS_FILE";
|
|
19575
|
-
var getCredentialsFilepath =
|
|
19576
|
-
var import_getHomeDir3 = require_getHomeDir();
|
|
19377
|
+
var getCredentialsFilepath = () => process.env[ENV_CREDENTIALS_PATH] || path.join(getHomeDir.getHomeDir(), ".aws", "credentials");
|
|
19577
19378
|
var prefixKeyRegex = /^([\w-]+)\s(["'])?([\w-@\+\.%:/]+)\2$/;
|
|
19578
19379
|
var profileNameBlockList = ["__proto__", "profile __proto__"];
|
|
19579
|
-
var parseIni =
|
|
19380
|
+
var parseIni = (iniData) => {
|
|
19580
19381
|
const map3 = {};
|
|
19581
19382
|
let currentSection;
|
|
19582
19383
|
let currentSubSection;
|
|
@@ -19590,7 +19391,7 @@ var require_dist_cjs31 = __commonJS({
|
|
|
19590
19391
|
const matches = prefixKeyRegex.exec(sectionName);
|
|
19591
19392
|
if (matches) {
|
|
19592
19393
|
const [, prefix, , name] = matches;
|
|
19593
|
-
if (Object.values(
|
|
19394
|
+
if (Object.values(types.IniSectionType).includes(prefix)) {
|
|
19594
19395
|
currentSection = [prefix, name].join(CONFIG_PREFIX_SEPARATOR);
|
|
19595
19396
|
}
|
|
19596
19397
|
} else {
|
|
@@ -19620,40 +19421,37 @@ var require_dist_cjs31 = __commonJS({
|
|
|
19620
19421
|
}
|
|
19621
19422
|
}
|
|
19622
19423
|
return map3;
|
|
19623
|
-
}
|
|
19624
|
-
var
|
|
19625
|
-
var
|
|
19626
|
-
var CONFIG_PREFIX_SEPARATOR = ".";
|
|
19627
|
-
var loadSharedConfigFiles = /* @__PURE__ */ __name(async (init = {}) => {
|
|
19424
|
+
};
|
|
19425
|
+
var swallowError$1 = () => ({});
|
|
19426
|
+
var loadSharedConfigFiles = async (init = {}) => {
|
|
19628
19427
|
const { filepath = getCredentialsFilepath(), configFilepath = getConfigFilepath() } = init;
|
|
19629
|
-
const homeDir =
|
|
19428
|
+
const homeDir = getHomeDir.getHomeDir();
|
|
19630
19429
|
const relativeHomeDirPrefix = "~/";
|
|
19631
19430
|
let resolvedFilepath = filepath;
|
|
19632
19431
|
if (filepath.startsWith(relativeHomeDirPrefix)) {
|
|
19633
|
-
resolvedFilepath =
|
|
19432
|
+
resolvedFilepath = path.join(homeDir, filepath.slice(2));
|
|
19634
19433
|
}
|
|
19635
19434
|
let resolvedConfigFilepath = configFilepath;
|
|
19636
19435
|
if (configFilepath.startsWith(relativeHomeDirPrefix)) {
|
|
19637
|
-
resolvedConfigFilepath =
|
|
19436
|
+
resolvedConfigFilepath = path.join(homeDir, configFilepath.slice(2));
|
|
19638
19437
|
}
|
|
19639
19438
|
const parsedFiles = await Promise.all([
|
|
19640
|
-
|
|
19439
|
+
readFile.readFile(resolvedConfigFilepath, {
|
|
19641
19440
|
ignoreCache: init.ignoreCache
|
|
19642
|
-
}).then(parseIni).then(getConfigData).catch(swallowError),
|
|
19643
|
-
|
|
19441
|
+
}).then(parseIni).then(getConfigData).catch(swallowError$1),
|
|
19442
|
+
readFile.readFile(resolvedFilepath, {
|
|
19644
19443
|
ignoreCache: init.ignoreCache
|
|
19645
|
-
}).then(parseIni).catch(swallowError)
|
|
19444
|
+
}).then(parseIni).catch(swallowError$1)
|
|
19646
19445
|
]);
|
|
19647
19446
|
return {
|
|
19648
19447
|
configFile: parsedFiles[0],
|
|
19649
19448
|
credentialsFile: parsedFiles[1]
|
|
19650
19449
|
};
|
|
19651
|
-
}
|
|
19652
|
-
var getSsoSessionData =
|
|
19653
|
-
var
|
|
19654
|
-
var
|
|
19655
|
-
var
|
|
19656
|
-
var mergeConfigFiles = /* @__PURE__ */ __name((...files) => {
|
|
19450
|
+
};
|
|
19451
|
+
var getSsoSessionData = (data) => Object.entries(data).filter(([key]) => key.startsWith(types.IniSectionType.SSO_SESSION + CONFIG_PREFIX_SEPARATOR)).reduce((acc, [key, value]) => ({ ...acc, [key.substring(key.indexOf(CONFIG_PREFIX_SEPARATOR) + 1)]: value }), {});
|
|
19452
|
+
var swallowError = () => ({});
|
|
19453
|
+
var loadSsoSessionData = async (init = {}) => readFile.readFile(init.configFilepath ?? getConfigFilepath()).then(parseIni).then(getSsoSessionData).catch(swallowError);
|
|
19454
|
+
var mergeConfigFiles = (...files) => {
|
|
19657
19455
|
const merged = {};
|
|
19658
19456
|
for (const file of files) {
|
|
19659
19457
|
for (const [key, values] of Object.entries(file)) {
|
|
@@ -19665,41 +19463,70 @@ var require_dist_cjs31 = __commonJS({
|
|
|
19665
19463
|
}
|
|
19666
19464
|
}
|
|
19667
19465
|
return merged;
|
|
19668
|
-
}
|
|
19669
|
-
var parseKnownFiles =
|
|
19466
|
+
};
|
|
19467
|
+
var parseKnownFiles = async (init) => {
|
|
19670
19468
|
const parsedFiles = await loadSharedConfigFiles(init);
|
|
19671
19469
|
return mergeConfigFiles(parsedFiles.configFile, parsedFiles.credentialsFile);
|
|
19672
|
-
}
|
|
19470
|
+
};
|
|
19471
|
+
var externalDataInterceptor = {
|
|
19472
|
+
getFileRecord() {
|
|
19473
|
+
return readFile.fileIntercept;
|
|
19474
|
+
},
|
|
19475
|
+
interceptFile(path2, contents) {
|
|
19476
|
+
readFile.fileIntercept[path2] = Promise.resolve(contents);
|
|
19477
|
+
},
|
|
19478
|
+
getTokenRecord() {
|
|
19479
|
+
return getSSOTokenFromFile.tokenIntercept;
|
|
19480
|
+
},
|
|
19481
|
+
interceptToken(id, contents) {
|
|
19482
|
+
getSSOTokenFromFile.tokenIntercept[id] = contents;
|
|
19483
|
+
}
|
|
19484
|
+
};
|
|
19485
|
+
Object.defineProperty(exports2, "getSSOTokenFromFile", {
|
|
19486
|
+
enumerable: true,
|
|
19487
|
+
get: function() {
|
|
19488
|
+
return getSSOTokenFromFile.getSSOTokenFromFile;
|
|
19489
|
+
}
|
|
19490
|
+
});
|
|
19491
|
+
Object.defineProperty(exports2, "readFile", {
|
|
19492
|
+
enumerable: true,
|
|
19493
|
+
get: function() {
|
|
19494
|
+
return readFile.readFile;
|
|
19495
|
+
}
|
|
19496
|
+
});
|
|
19497
|
+
exports2.CONFIG_PREFIX_SEPARATOR = CONFIG_PREFIX_SEPARATOR;
|
|
19498
|
+
exports2.DEFAULT_PROFILE = DEFAULT_PROFILE;
|
|
19499
|
+
exports2.ENV_PROFILE = ENV_PROFILE;
|
|
19500
|
+
exports2.externalDataInterceptor = externalDataInterceptor;
|
|
19501
|
+
exports2.getProfileName = getProfileName;
|
|
19502
|
+
exports2.loadSharedConfigFiles = loadSharedConfigFiles;
|
|
19503
|
+
exports2.loadSsoSessionData = loadSsoSessionData;
|
|
19504
|
+
exports2.parseKnownFiles = parseKnownFiles;
|
|
19505
|
+
Object.keys(getHomeDir).forEach(function(k3) {
|
|
19506
|
+
if (k3 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k3)) Object.defineProperty(exports2, k3, {
|
|
19507
|
+
enumerable: true,
|
|
19508
|
+
get: function() {
|
|
19509
|
+
return getHomeDir[k3];
|
|
19510
|
+
}
|
|
19511
|
+
});
|
|
19512
|
+
});
|
|
19513
|
+
Object.keys(getSSOTokenFilepath).forEach(function(k3) {
|
|
19514
|
+
if (k3 !== "default" && !Object.prototype.hasOwnProperty.call(exports2, k3)) Object.defineProperty(exports2, k3, {
|
|
19515
|
+
enumerable: true,
|
|
19516
|
+
get: function() {
|
|
19517
|
+
return getSSOTokenFilepath[k3];
|
|
19518
|
+
}
|
|
19519
|
+
});
|
|
19520
|
+
});
|
|
19673
19521
|
}
|
|
19674
19522
|
});
|
|
19675
19523
|
|
|
19676
19524
|
// node_modules/@smithy/node-config-provider/dist-cjs/index.js
|
|
19677
19525
|
var require_dist_cjs32 = __commonJS({
|
|
19678
|
-
"node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2
|
|
19679
|
-
|
|
19680
|
-
var
|
|
19681
|
-
var
|
|
19682
|
-
var __hasOwnProp2 = Object.prototype.hasOwnProperty;
|
|
19683
|
-
var __name = (target, value) => __defProp2(target, "name", { value, configurable: true });
|
|
19684
|
-
var __export2 = (target, all) => {
|
|
19685
|
-
for (var name in all)
|
|
19686
|
-
__defProp2(target, name, { get: all[name], enumerable: true });
|
|
19687
|
-
};
|
|
19688
|
-
var __copyProps2 = (to, from, except, desc) => {
|
|
19689
|
-
if (from && typeof from === "object" || typeof from === "function") {
|
|
19690
|
-
for (let key of __getOwnPropNames2(from))
|
|
19691
|
-
if (!__hasOwnProp2.call(to, key) && key !== except)
|
|
19692
|
-
__defProp2(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc2(from, key)) || desc.enumerable });
|
|
19693
|
-
}
|
|
19694
|
-
return to;
|
|
19695
|
-
};
|
|
19696
|
-
var __toCommonJS2 = (mod) => __copyProps2(__defProp2({}, "__esModule", { value: true }), mod);
|
|
19697
|
-
var src_exports = {};
|
|
19698
|
-
__export2(src_exports, {
|
|
19699
|
-
loadConfig: () => loadConfig
|
|
19700
|
-
});
|
|
19701
|
-
module2.exports = __toCommonJS2(src_exports);
|
|
19702
|
-
var import_property_provider2 = require_dist_cjs20();
|
|
19526
|
+
"node_modules/@smithy/node-config-provider/dist-cjs/index.js"(exports2) {
|
|
19527
|
+
"use strict";
|
|
19528
|
+
var propertyProvider = require_dist_cjs20();
|
|
19529
|
+
var sharedIniFileLoader = require_dist_cjs31();
|
|
19703
19530
|
function getSelectorName(functionString) {
|
|
19704
19531
|
try {
|
|
19705
19532
|
const constants = new Set(Array.from(functionString.match(/([A-Z_]){3,}/g) ?? []));
|
|
@@ -19711,8 +19538,7 @@ var require_dist_cjs32 = __commonJS({
|
|
|
19711
19538
|
return functionString;
|
|
19712
19539
|
}
|
|
19713
19540
|
}
|
|
19714
|
-
|
|
19715
|
-
var fromEnv = /* @__PURE__ */ __name((envVarSelector, options) => async () => {
|
|
19541
|
+
var fromEnv = (envVarSelector, options) => async () => {
|
|
19716
19542
|
try {
|
|
19717
19543
|
const config = envVarSelector(process.env, options);
|
|
19718
19544
|
if (config === void 0) {
|
|
@@ -19720,16 +19546,12 @@ var require_dist_cjs32 = __commonJS({
|
|
|
19720
19546
|
}
|
|
19721
19547
|
return config;
|
|
19722
19548
|
} catch (e3) {
|
|
19723
|
-
throw new
|
|
19724
|
-
e3.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`,
|
|
19725
|
-
{ logger: options?.logger }
|
|
19726
|
-
);
|
|
19549
|
+
throw new propertyProvider.CredentialsProviderError(e3.message || `Not found in ENV: ${getSelectorName(envVarSelector.toString())}`, { logger: options?.logger });
|
|
19727
19550
|
}
|
|
19728
|
-
}
|
|
19729
|
-
var
|
|
19730
|
-
|
|
19731
|
-
const
|
|
19732
|
-
const { configFile, credentialsFile } = await (0, import_shared_ini_file_loader.loadSharedConfigFiles)(init);
|
|
19551
|
+
};
|
|
19552
|
+
var fromSharedConfigFiles = (configSelector, { preferredFile = "config", ...init } = {}) => async () => {
|
|
19553
|
+
const profile = sharedIniFileLoader.getProfileName(init);
|
|
19554
|
+
const { configFile, credentialsFile } = await sharedIniFileLoader.loadSharedConfigFiles(init);
|
|
19733
19555
|
const profileFromCredentials = credentialsFile[profile] || {};
|
|
19734
19556
|
const profileFromConfig = configFile[profile] || {};
|
|
19735
19557
|
const mergedProfile = preferredFile === "config" ? { ...profileFromCredentials, ...profileFromConfig } : { ...profileFromConfig, ...profileFromCredentials };
|
|
@@ -19741,25 +19563,17 @@ var require_dist_cjs32 = __commonJS({
|
|
|
19741
19563
|
}
|
|
19742
19564
|
return configValue;
|
|
19743
19565
|
} catch (e3) {
|
|
19744
|
-
throw new
|
|
19745
|
-
e3.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`,
|
|
19746
|
-
{ logger: init.logger }
|
|
19747
|
-
);
|
|
19566
|
+
throw new propertyProvider.CredentialsProviderError(e3.message || `Not found in config files w/ profile [${profile}]: ${getSelectorName(configSelector.toString())}`, { logger: init.logger });
|
|
19748
19567
|
}
|
|
19749
|
-
}
|
|
19750
|
-
var isFunction =
|
|
19751
|
-
var fromStatic =
|
|
19752
|
-
var loadConfig =
|
|
19568
|
+
};
|
|
19569
|
+
var isFunction = (func) => typeof func === "function";
|
|
19570
|
+
var fromStatic = (defaultValue) => isFunction(defaultValue) ? async () => await defaultValue() : propertyProvider.fromStatic(defaultValue);
|
|
19571
|
+
var loadConfig = ({ environmentVariableSelector, configFileSelector, default: defaultValue }, configuration = {}) => {
|
|
19753
19572
|
const { signingName, logger: logger4 } = configuration;
|
|
19754
19573
|
const envOptions = { signingName, logger: logger4 };
|
|
19755
|
-
return (
|
|
19756
|
-
|
|
19757
|
-
|
|
19758
|
-
fromSharedConfigFiles(configFileSelector, configuration),
|
|
19759
|
-
fromStatic(defaultValue)
|
|
19760
|
-
)
|
|
19761
|
-
);
|
|
19762
|
-
}, "loadConfig");
|
|
19574
|
+
return propertyProvider.memoize(propertyProvider.chain(fromEnv(environmentVariableSelector, envOptions), fromSharedConfigFiles(configFileSelector, configuration), fromStatic(defaultValue)));
|
|
19575
|
+
};
|
|
19576
|
+
exports2.loadConfig = loadConfig;
|
|
19763
19577
|
}
|
|
19764
19578
|
});
|
|
19765
19579
|
|