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