include node_modules so release .zip is deployable
This commit is contained in:
Generated
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_DUALSTACK_ENDPOINT = exports.CONFIG_USE_DUALSTACK_ENDPOINT = exports.ENV_USE_DUALSTACK_ENDPOINT = void 0;
|
||||
const util_config_provider_1 = require("@smithy/util-config-provider");
|
||||
exports.ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
|
||||
exports.CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
|
||||
exports.DEFAULT_USE_DUALSTACK_ENDPOINT = false;
|
||||
exports.NODE_USE_DUALSTACK_ENDPOINT_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => (0, util_config_provider_1.booleanSelector)(env, exports.ENV_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.ENV),
|
||||
configFileSelector: (profile) => (0, util_config_provider_1.booleanSelector)(profile, exports.CONFIG_USE_DUALSTACK_ENDPOINT, util_config_provider_1.SelectorType.CONFIG),
|
||||
default: false,
|
||||
};
|
||||
Generated
Vendored
+12
@@ -0,0 +1,12 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = exports.DEFAULT_USE_FIPS_ENDPOINT = exports.CONFIG_USE_FIPS_ENDPOINT = exports.ENV_USE_FIPS_ENDPOINT = void 0;
|
||||
const util_config_provider_1 = require("@smithy/util-config-provider");
|
||||
exports.ENV_USE_FIPS_ENDPOINT = "AWS_USE_FIPS_ENDPOINT";
|
||||
exports.CONFIG_USE_FIPS_ENDPOINT = "use_fips_endpoint";
|
||||
exports.DEFAULT_USE_FIPS_ENDPOINT = false;
|
||||
exports.NODE_USE_FIPS_ENDPOINT_CONFIG_OPTIONS = {
|
||||
environmentVariableSelector: (env) => (0, util_config_provider_1.booleanSelector)(env, exports.ENV_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.ENV),
|
||||
configFileSelector: (profile) => (0, util_config_provider_1.booleanSelector)(profile, exports.CONFIG_USE_FIPS_ENDPOINT, util_config_provider_1.SelectorType.CONFIG),
|
||||
default: false,
|
||||
};
|
||||
+7
@@ -0,0 +1,7 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
const tslib_1 = require("tslib");
|
||||
tslib_1.__exportStar(require("./NodeUseDualstackEndpointConfigOptions"), exports);
|
||||
tslib_1.__exportStar(require("./NodeUseFipsEndpointConfigOptions"), exports);
|
||||
tslib_1.__exportStar(require("./resolveCustomEndpointsConfig"), exports);
|
||||
tslib_1.__exportStar(require("./resolveEndpointsConfig"), exports);
|
||||
Generated
Vendored
+16
@@ -0,0 +1,16 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveCustomEndpointsConfig = void 0;
|
||||
const util_middleware_1 = require("@smithy/util-middleware");
|
||||
const resolveCustomEndpointsConfig = (input) => {
|
||||
var _a, _b;
|
||||
const { endpoint, urlParser } = input;
|
||||
return {
|
||||
...input,
|
||||
tls: (_a = input.tls) !== null && _a !== void 0 ? _a : true,
|
||||
endpoint: (0, util_middleware_1.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint),
|
||||
isCustomEndpoint: true,
|
||||
useDualstackEndpoint: (0, util_middleware_1.normalizeProvider)((_b = input.useDualstackEndpoint) !== null && _b !== void 0 ? _b : false),
|
||||
};
|
||||
};
|
||||
exports.resolveCustomEndpointsConfig = resolveCustomEndpointsConfig;
|
||||
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.resolveEndpointsConfig = void 0;
|
||||
const util_middleware_1 = require("@smithy/util-middleware");
|
||||
const getEndpointFromRegion_1 = require("./utils/getEndpointFromRegion");
|
||||
const resolveEndpointsConfig = (input) => {
|
||||
var _a, _b;
|
||||
const useDualstackEndpoint = (0, util_middleware_1.normalizeProvider)((_a = input.useDualstackEndpoint) !== null && _a !== void 0 ? _a : false);
|
||||
const { endpoint, useFipsEndpoint, urlParser } = input;
|
||||
return {
|
||||
...input,
|
||||
tls: (_b = input.tls) !== null && _b !== void 0 ? _b : true,
|
||||
endpoint: endpoint
|
||||
? (0, util_middleware_1.normalizeProvider)(typeof endpoint === "string" ? urlParser(endpoint) : endpoint)
|
||||
: () => (0, getEndpointFromRegion_1.getEndpointFromRegion)({ ...input, useDualstackEndpoint, useFipsEndpoint }),
|
||||
isCustomEndpoint: !!endpoint,
|
||||
useDualstackEndpoint,
|
||||
};
|
||||
};
|
||||
exports.resolveEndpointsConfig = resolveEndpointsConfig;
|
||||
Generated
Vendored
+20
@@ -0,0 +1,20 @@
|
||||
"use strict";
|
||||
Object.defineProperty(exports, "__esModule", { value: true });
|
||||
exports.getEndpointFromRegion = void 0;
|
||||
const getEndpointFromRegion = async (input) => {
|
||||
var _a;
|
||||
const { tls = true } = input;
|
||||
const region = await input.region();
|
||||
const dnsHostRegex = new RegExp(/^([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]{0,61}[a-zA-Z0-9])$/);
|
||||
if (!dnsHostRegex.test(region)) {
|
||||
throw new Error("Invalid region in client config");
|
||||
}
|
||||
const useDualstackEndpoint = await input.useDualstackEndpoint();
|
||||
const useFipsEndpoint = await input.useFipsEndpoint();
|
||||
const { hostname } = (_a = (await input.regionInfoProvider(region, { useDualstackEndpoint, useFipsEndpoint }))) !== null && _a !== void 0 ? _a : {};
|
||||
if (!hostname) {
|
||||
throw new Error("Cannot resolve hostname from client config");
|
||||
}
|
||||
return input.urlParser(`${tls ? "https:" : "http:"}//${hostname}`);
|
||||
};
|
||||
exports.getEndpointFromRegion = getEndpointFromRegion;
|
||||
Reference in New Issue
Block a user