This commit is contained in:
2025-01-04 00:34:03 +01:00
parent 41829408dc
commit 0ca14bbc19
18111 changed files with 1871397 additions and 0 deletions

View File

@@ -0,0 +1 @@
module.exports = require("../index.js");

View File

@@ -0,0 +1,5 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEndpointFromConfig = void 0;
const getEndpointFromConfig = async (serviceId) => undefined;
exports.getEndpointFromConfig = getEndpointFromConfig;

View File

@@ -0,0 +1,7 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEndpointFromConfig = void 0;
const node_config_provider_1 = require("@smithy/node-config-provider");
const getEndpointUrlConfig_1 = require("./getEndpointUrlConfig");
const getEndpointFromConfig = async (serviceId) => (0, node_config_provider_1.loadConfig)((0, getEndpointUrlConfig_1.getEndpointUrlConfig)(serviceId))();
exports.getEndpointFromConfig = getEndpointFromConfig;

View File

@@ -0,0 +1 @@
module.exports = require("../index.js");

View File

@@ -0,0 +1,35 @@
"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
exports.getEndpointUrlConfig = void 0;
const shared_ini_file_loader_1 = require("@smithy/shared-ini-file-loader");
const ENV_ENDPOINT_URL = "AWS_ENDPOINT_URL";
const CONFIG_ENDPOINT_URL = "endpoint_url";
const getEndpointUrlConfig = (serviceId) => ({
environmentVariableSelector: (env) => {
const serviceSuffixParts = serviceId.split(" ").map((w) => w.toUpperCase());
const serviceEndpointUrl = env[[ENV_ENDPOINT_URL, ...serviceSuffixParts].join("_")];
if (serviceEndpointUrl)
return serviceEndpointUrl;
const endpointUrl = env[ENV_ENDPOINT_URL];
if (endpointUrl)
return endpointUrl;
return undefined;
},
configFileSelector: (profile, config) => {
if (config && profile.services) {
const servicesSection = config[["services", profile.services].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
if (servicesSection) {
const servicePrefixParts = serviceId.split(" ").map((w) => w.toLowerCase());
const endpointUrl = servicesSection[[servicePrefixParts.join("_"), CONFIG_ENDPOINT_URL].join(shared_ini_file_loader_1.CONFIG_PREFIX_SEPARATOR)];
if (endpointUrl)
return endpointUrl;
}
}
const endpointUrl = profile[CONFIG_ENDPOINT_URL];
if (endpointUrl)
return endpointUrl;
return undefined;
},
default: undefined,
});
exports.getEndpointUrlConfig = getEndpointUrlConfig;

View File

@@ -0,0 +1 @@
module.exports = require("../index.js");

View File

@@ -0,0 +1 @@
module.exports = require("../index.js");