初始化环境文件
This commit is contained in:
13
node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/EndpointParameters.js
generated
vendored
Normal file
13
node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/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: "awsssoportal",
|
||||
});
|
||||
};
|
||||
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/sso/endpoint/endpointResolver.js
generated
vendored
Normal file
14
node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/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;
|
||||
103
node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/ruleset.js
generated
vendored
Normal file
103
node_modules/@aws-sdk/nested-clients/dist-es/submodules/sso/endpoint/ruleset.js
generated
vendored
Normal file
@@ -0,0 +1,103 @@
|
||||
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 = "getAttr", i = { [u]: false, type: "string" }, j = { [u]: true, default: false, type: "boolean" }, k = { [x]: "Endpoint" }, l = { [v]: c, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [v]: c, [w]: [{ [x]: "UseDualStack" }, true] }, n = {}, o = { [v]: h, [w]: [{ [x]: g }, "supportsFIPS"] }, p = { [x]: g }, q = { [v]: c, [w]: [true, { [v]: h, [w]: [p, "supportsDualStack"] }] }, r = [l], s = [m], t = [{ [x]: "Region" }];
|
||||
const _data = {
|
||||
version: "1.0",
|
||||
parameters: { Region: i, UseDualStack: j, UseFIPS: j, Endpoint: i },
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: b, [w]: [k] }],
|
||||
rules: [
|
||||
{ conditions: r, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: d },
|
||||
{ conditions: s, error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: d },
|
||||
{ endpoint: { url: k, properties: n, headers: n }, type: e },
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{
|
||||
conditions: [{ [v]: b, [w]: t }],
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: "aws.partition", [w]: t, assign: g }],
|
||||
rules: [
|
||||
{
|
||||
conditions: [l, m],
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: c, [w]: [a, o] }, q],
|
||||
rules: [
|
||||
{
|
||||
endpoint: {
|
||||
url: "https://portal.sso-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: r,
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: c, [w]: [o, a] }],
|
||||
rules: [
|
||||
{
|
||||
conditions: [{ [v]: "stringEquals", [w]: [{ [v]: h, [w]: [p, "name"] }, "aws-us-gov"] }],
|
||||
endpoint: { url: "https://portal.sso.{Region}.amazonaws.com", properties: n, headers: n },
|
||||
type: e,
|
||||
},
|
||||
{
|
||||
endpoint: {
|
||||
url: "https://portal.sso-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: s,
|
||||
rules: [
|
||||
{
|
||||
conditions: [q],
|
||||
rules: [
|
||||
{
|
||||
endpoint: {
|
||||
url: "https://portal.sso.{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://portal.sso.{Region}.{PartitionResult#dnsSuffix}", properties: n, headers: n },
|
||||
type: e,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
],
|
||||
type: f,
|
||||
},
|
||||
{ error: "Invalid Configuration: Missing Region", type: d },
|
||||
],
|
||||
};
|
||||
export const ruleSet = _data;
|
||||
Reference in New Issue
Block a user