初始化环境文件
This commit is contained in:
13
node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/EndpointParameters.js
generated
vendored
Normal file
13
node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/EndpointParameters.js
generated
vendored
Normal file
@@ -0,0 +1,13 @@
|
||||
export const resolveClientEndpointParameters = (options) => {
|
||||
return Object.assign(options, {
|
||||
useDualstackEndpoint: options.useDualstackEndpoint ?? false,
|
||||
useFipsEndpoint: options.useFipsEndpoint ?? false,
|
||||
defaultSigningName: "signin",
|
||||
});
|
||||
};
|
||||
export const commonParams = {
|
||||
UseFIPS: { type: "builtInParams", name: "useFipsEndpoint" },
|
||||
Endpoint: { type: "builtInParams", name: "endpoint" },
|
||||
Region: { type: "builtInParams", name: "region" },
|
||||
UseDualStack: { type: "builtInParams", name: "useDualstackEndpoint" },
|
||||
};
|
||||
14
node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js
generated
vendored
Normal file
14
node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/endpointResolver.js
generated
vendored
Normal file
@@ -0,0 +1,14 @@
|
||||
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
|
||||
import { customEndpointFunctions, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
|
||||
import { ruleSet } from "./ruleset";
|
||||
const cache = new EndpointCache({
|
||||
size: 50,
|
||||
params: ["Endpoint", "Region", "UseDualStack", "UseFIPS"],
|
||||
});
|
||||
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
||||
return cache.get(endpointParams, () => resolveEndpoint(ruleSet, {
|
||||
endpointParams: endpointParams,
|
||||
logger: context.logger,
|
||||
}));
|
||||
};
|
||||
customEndpointFunctions.aws = awsEndpointFunctions;
|
||||
130
node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/ruleset.js
generated
vendored
Normal file
130
node_modules/@aws-sdk/nested-clients/dist-es/submodules/signin/endpoint/ruleset.js
generated
vendored
Normal file
@@ -0,0 +1,130 @@
|
||||
const u = "required", v = "fn", w = "argv", x = "ref";
|
||||
const a = true, b = "isSet", c = "booleanEquals", d = "error", e = "endpoint", f = "tree", g = "PartitionResult", h = "stringEquals", i = { [u]: true, default: false, type: "boolean" }, j = { [u]: false, type: "string" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: "getAttr", [w]: [{ [x]: g }, "name"] }, p = { [v]: c, [w]: [{ [x]: "UseFIPS" }, false] }, q = { [v]: c, [w]: [{ [x]: "UseDualStack" }, false] }, r = { [v]: "getAttr", [w]: [{ [x]: g }, "supportsFIPS"] }, s = { [v]: c, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: g }, "supportsDualStack"] }] }, t = [{ [x]: "Region" }];
|
||||
const _data = {
|
||||
version: "1.0",
|
||||
parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j },
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: b, [w]: [k] }],
|
||||
rules: [
|
||||
{ conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
|
||||
{
|
||||
rules: [
|
||||
{
|
||||
conditions: [m],
|
||||
error: "Invalid Configuration: Dualstack and custom endpoint are not supported",
|
||||
type: d,
|
||||
},
|
||||
{ endpoint: { url: k, properties: n, headers: n }, type: e },
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: b, [w]: t }],
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: h, [w]: [o, "aws"] }, p, q],
|
||||
endpoint: { url: "https://{Region}.signin.aws.amazon.com", properties: n, headers: n },
|
||||
type: e,
|
||||
},
|
||||
{
|
||||
conditions: [{ [v]: h, [w]: [o, "aws-cn"] }, p, q],
|
||||
endpoint: { url: "https://{Region}.signin.amazonaws.cn", properties: n, headers: n },
|
||||
type: e,
|
||||
},
|
||||
{
|
||||
conditions: [{ [v]: h, [w]: [o, "aws-us-gov"] }, p, q],
|
||||
endpoint: { url: "https://{Region}.signin.amazonaws-us-gov.com", properties: n, headers: n },
|
||||
type: e,
|
||||
},
|
||||
{
|
||||
conditions: [l, m],
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: c, [w]: [a, r] }, s],
|
||||
rules: [
|
||||
{
|
||||
endpoint: {
|
||||
url: "https://signin-fips.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
||||
properties: n,
|
||||
headers: n,
|
||||
},
|
||||
type: e,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{
|
||||
error: "FIPS and DualStack are enabled, but this partition does not support one or both",
|
||||
type: d,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{
|
||||
conditions: [l, q],
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: c, [w]: [r, a] }],
|
||||
rules: [
|
||||
{
|
||||
endpoint: {
|
||||
url: "https://signin-fips.{Region}.{PartitionResult#dnsSuffix}",
|
||||
properties: n,
|
||||
headers: n,
|
||||
},
|
||||
type: e,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{ error: "FIPS is enabled but this partition does not support FIPS", type: d },
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{
|
||||
conditions: [p, m],
|
||||
rules: [
|
||||
{
|
||||
conditions: [s],
|
||||
rules: [
|
||||
{
|
||||
endpoint: {
|
||||
url: "https://signin.{Region}.{PartitionResult#dualStackDnsSuffix}",
|
||||
properties: n,
|
||||
headers: n,
|
||||
},
|
||||
type: e,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{ error: "DualStack is enabled but this partition does not support DualStack", type: d },
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{
|
||||
endpoint: { url: "https://signin.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
|
||||
type: e,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{ error: "Invalid Configuration: Missing Region", type: d },
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
],
|
||||
};
|
||||
export const ruleSet = _data;
|
||||
Reference in New Issue
Block a user