@aws-sdk/client-arc-region-switch 3.1032.0 → 3.1034.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist-cjs/endpoint/bdd.js +42 -0
- package/dist-cjs/endpoint/endpointResolver.js +2 -2
- package/dist-es/endpoint/bdd.js +39 -0
- package/dist-es/endpoint/endpointResolver.js +3 -3
- package/dist-types/endpoint/bdd.d.ts +2 -0
- package/dist-types/ts3.4/endpoint/bdd.d.ts +2 -0
- package/package.json +18 -18
- package/dist-cjs/endpoint/ruleset.js +0 -7
- package/dist-es/endpoint/ruleset.js +0 -4
- package/dist-types/endpoint/ruleset.d.ts +0 -2
- package/dist-types/ts3.4/endpoint/ruleset.d.ts +0 -2
|
@@ -0,0 +1,42 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
+
exports.bdd = void 0;
|
|
4
|
+
const util_endpoints_1 = require("@smithy/util-endpoints");
|
|
5
|
+
const a = "isSet", b = "PartitionResult", c = "booleanEquals", d = "sigv4", e = "arc-region-switch", f = { "ref": "Endpoint" }, g = { "authSchemes": [{ "name": d, "signingName": e, "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, h = [{ "ref": "Region" }];
|
|
6
|
+
const _data = {
|
|
7
|
+
conditions: [
|
|
8
|
+
[a, [f]],
|
|
9
|
+
[a, h],
|
|
10
|
+
["aws.partition", h, b],
|
|
11
|
+
[c, [{ ref: "UseFIPS" }, true]],
|
|
12
|
+
[c, [{ fn: "coalesce", argv: [{ ref: "UseControlPlaneEndpoint" }, false] }, true]],
|
|
13
|
+
["stringEquals", [{ fn: "getAttr", argv: [{ ref: b }, "name"] }, "aws-cn"]]
|
|
14
|
+
],
|
|
15
|
+
results: [
|
|
16
|
+
[-1],
|
|
17
|
+
["https://arc-region-switch-control-plane.cn-north-1.{PartitionResult#dualStackDnsSuffix}", { authSchemes: [{ name: d, signingName: e, signingRegion: "cn-north-1" }] }],
|
|
18
|
+
[-1, "Invalid Configuration: FIPS is not supported in this partition"],
|
|
19
|
+
["https://arc-region-switch-control-plane-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", g],
|
|
20
|
+
["https://arc-region-switch-control-plane.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", g],
|
|
21
|
+
[-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
22
|
+
[f, {}],
|
|
23
|
+
["https://arc-region-switch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
24
|
+
["https://arc-region-switch.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
25
|
+
[-1, "Invalid Configuration: Missing Region"]
|
|
26
|
+
]
|
|
27
|
+
};
|
|
28
|
+
const root = 2;
|
|
29
|
+
const r = 100_000_000;
|
|
30
|
+
const nodes = new Int32Array([
|
|
31
|
+
-1, 1, -1,
|
|
32
|
+
0, 10, 3,
|
|
33
|
+
1, 4, r + 9,
|
|
34
|
+
2, 5, r + 9,
|
|
35
|
+
3, 8, 6,
|
|
36
|
+
4, 7, r + 8,
|
|
37
|
+
5, r + 1, r + 4,
|
|
38
|
+
4, 9, r + 7,
|
|
39
|
+
5, r + 2, r + 3,
|
|
40
|
+
3, r + 5, r + 6,
|
|
41
|
+
]);
|
|
42
|
+
exports.bdd = util_endpoints_1.BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -3,13 +3,13 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
3
3
|
exports.defaultEndpointResolver = void 0;
|
|
4
4
|
const util_endpoints_1 = require("@aws-sdk/util-endpoints");
|
|
5
5
|
const util_endpoints_2 = require("@smithy/util-endpoints");
|
|
6
|
-
const
|
|
6
|
+
const bdd_1 = require("./bdd");
|
|
7
7
|
const cache = new util_endpoints_2.EndpointCache({
|
|
8
8
|
size: 50,
|
|
9
9
|
params: ["Endpoint", "Region", "UseControlPlaneEndpoint", "UseFIPS"],
|
|
10
10
|
});
|
|
11
11
|
const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
12
|
-
return cache.get(endpointParams, () => (0, util_endpoints_2.
|
|
12
|
+
return cache.get(endpointParams, () => (0, util_endpoints_2.decideEndpoint)(bdd_1.bdd, {
|
|
13
13
|
endpointParams: endpointParams,
|
|
14
14
|
logger: context.logger,
|
|
15
15
|
}));
|
|
@@ -0,0 +1,39 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/util-endpoints";
|
|
2
|
+
const a = "isSet", b = "PartitionResult", c = "booleanEquals", d = "sigv4", e = "arc-region-switch", f = { "ref": "Endpoint" }, g = { "authSchemes": [{ "name": d, "signingName": e, "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, h = [{ "ref": "Region" }];
|
|
3
|
+
const _data = {
|
|
4
|
+
conditions: [
|
|
5
|
+
[a, [f]],
|
|
6
|
+
[a, h],
|
|
7
|
+
["aws.partition", h, b],
|
|
8
|
+
[c, [{ ref: "UseFIPS" }, true]],
|
|
9
|
+
[c, [{ fn: "coalesce", argv: [{ ref: "UseControlPlaneEndpoint" }, false] }, true]],
|
|
10
|
+
["stringEquals", [{ fn: "getAttr", argv: [{ ref: b }, "name"] }, "aws-cn"]]
|
|
11
|
+
],
|
|
12
|
+
results: [
|
|
13
|
+
[-1],
|
|
14
|
+
["https://arc-region-switch-control-plane.cn-north-1.{PartitionResult#dualStackDnsSuffix}", { authSchemes: [{ name: d, signingName: e, signingRegion: "cn-north-1" }] }],
|
|
15
|
+
[-1, "Invalid Configuration: FIPS is not supported in this partition"],
|
|
16
|
+
["https://arc-region-switch-control-plane-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", g],
|
|
17
|
+
["https://arc-region-switch-control-plane.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", g],
|
|
18
|
+
[-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
19
|
+
[f, {}],
|
|
20
|
+
["https://arc-region-switch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
21
|
+
["https://arc-region-switch.{Region}.{PartitionResult#dualStackDnsSuffix}", {}],
|
|
22
|
+
[-1, "Invalid Configuration: Missing Region"]
|
|
23
|
+
]
|
|
24
|
+
};
|
|
25
|
+
const root = 2;
|
|
26
|
+
const r = 100_000_000;
|
|
27
|
+
const nodes = new Int32Array([
|
|
28
|
+
-1, 1, -1,
|
|
29
|
+
0, 10, 3,
|
|
30
|
+
1, 4, r + 9,
|
|
31
|
+
2, 5, r + 9,
|
|
32
|
+
3, 8, 6,
|
|
33
|
+
4, 7, r + 8,
|
|
34
|
+
5, r + 1, r + 4,
|
|
35
|
+
4, 9, r + 7,
|
|
36
|
+
5, r + 2, r + 3,
|
|
37
|
+
3, r + 5, r + 6,
|
|
38
|
+
]);
|
|
39
|
+
export const bdd = BinaryDecisionDiagram.from(nodes, root, _data.conditions, _data.results);
|
|
@@ -1,12 +1,12 @@
|
|
|
1
1
|
import { awsEndpointFunctions } from "@aws-sdk/util-endpoints";
|
|
2
|
-
import { customEndpointFunctions,
|
|
3
|
-
import {
|
|
2
|
+
import { customEndpointFunctions, decideEndpoint, EndpointCache } from "@smithy/util-endpoints";
|
|
3
|
+
import { bdd } from "./bdd";
|
|
4
4
|
const cache = new EndpointCache({
|
|
5
5
|
size: 50,
|
|
6
6
|
params: ["Endpoint", "Region", "UseControlPlaneEndpoint", "UseFIPS"],
|
|
7
7
|
});
|
|
8
8
|
export const defaultEndpointResolver = (endpointParams, context = {}) => {
|
|
9
|
-
return cache.get(endpointParams, () =>
|
|
9
|
+
return cache.get(endpointParams, () => decideEndpoint(bdd, {
|
|
10
10
|
endpointParams: endpointParams,
|
|
11
11
|
logger: context.logger,
|
|
12
12
|
}));
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@aws-sdk/client-arc-region-switch",
|
|
3
3
|
"description": "AWS SDK for JavaScript Arc Region Switch Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1034.0",
|
|
5
5
|
"scripts": {
|
|
6
6
|
"build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
|
|
7
7
|
"build:cjs": "node ../../scripts/compilation/inline client-arc-region-switch",
|
|
@@ -21,41 +21,41 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@aws-crypto/sha256-browser": "5.2.0",
|
|
23
23
|
"@aws-crypto/sha256-js": "5.2.0",
|
|
24
|
-
"@aws-sdk/core": "^3.974.
|
|
25
|
-
"@aws-sdk/credential-provider-node": "^3.972.
|
|
24
|
+
"@aws-sdk/core": "^3.974.3",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "^3.972.34",
|
|
26
26
|
"@aws-sdk/middleware-host-header": "^3.972.10",
|
|
27
27
|
"@aws-sdk/middleware-logger": "^3.972.10",
|
|
28
28
|
"@aws-sdk/middleware-recursion-detection": "^3.972.11",
|
|
29
|
-
"@aws-sdk/middleware-user-agent": "^3.972.
|
|
30
|
-
"@aws-sdk/region-config-resolver": "^3.972.
|
|
29
|
+
"@aws-sdk/middleware-user-agent": "^3.972.33",
|
|
30
|
+
"@aws-sdk/region-config-resolver": "^3.972.13",
|
|
31
31
|
"@aws-sdk/types": "^3.973.8",
|
|
32
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
32
|
+
"@aws-sdk/util-endpoints": "^3.996.8",
|
|
33
33
|
"@aws-sdk/util-user-agent-browser": "^3.972.10",
|
|
34
|
-
"@aws-sdk/util-user-agent-node": "^3.973.
|
|
35
|
-
"@smithy/config-resolver": "^4.4.
|
|
36
|
-
"@smithy/core": "^3.23.
|
|
34
|
+
"@aws-sdk/util-user-agent-node": "^3.973.19",
|
|
35
|
+
"@smithy/config-resolver": "^4.4.17",
|
|
36
|
+
"@smithy/core": "^3.23.16",
|
|
37
37
|
"@smithy/fetch-http-handler": "^5.3.17",
|
|
38
38
|
"@smithy/hash-node": "^4.2.14",
|
|
39
39
|
"@smithy/invalid-dependency": "^4.2.14",
|
|
40
40
|
"@smithy/middleware-content-length": "^4.2.14",
|
|
41
|
-
"@smithy/middleware-endpoint": "^4.4.
|
|
42
|
-
"@smithy/middleware-retry": "^4.5.
|
|
43
|
-
"@smithy/middleware-serde": "^4.2.
|
|
41
|
+
"@smithy/middleware-endpoint": "^4.4.31",
|
|
42
|
+
"@smithy/middleware-retry": "^4.5.4",
|
|
43
|
+
"@smithy/middleware-serde": "^4.2.19",
|
|
44
44
|
"@smithy/middleware-stack": "^4.2.14",
|
|
45
45
|
"@smithy/node-config-provider": "^4.3.14",
|
|
46
|
-
"@smithy/node-http-handler": "^4.
|
|
46
|
+
"@smithy/node-http-handler": "^4.6.0",
|
|
47
47
|
"@smithy/protocol-http": "^5.3.14",
|
|
48
|
-
"@smithy/smithy-client": "^4.12.
|
|
48
|
+
"@smithy/smithy-client": "^4.12.12",
|
|
49
49
|
"@smithy/types": "^4.14.1",
|
|
50
50
|
"@smithy/url-parser": "^4.2.14",
|
|
51
51
|
"@smithy/util-base64": "^4.3.2",
|
|
52
52
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
53
53
|
"@smithy/util-body-length-node": "^4.2.3",
|
|
54
|
-
"@smithy/util-defaults-mode-browser": "^4.3.
|
|
55
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
56
|
-
"@smithy/util-endpoints": "^3.4.
|
|
54
|
+
"@smithy/util-defaults-mode-browser": "^4.3.48",
|
|
55
|
+
"@smithy/util-defaults-mode-node": "^4.2.53",
|
|
56
|
+
"@smithy/util-endpoints": "^3.4.2",
|
|
57
57
|
"@smithy/util-middleware": "^4.2.14",
|
|
58
|
-
"@smithy/util-retry": "^4.3.
|
|
58
|
+
"@smithy/util-retry": "^4.3.3",
|
|
59
59
|
"@smithy/util-utf8": "^4.2.2",
|
|
60
60
|
"@smithy/util-waiter": "^4.2.16",
|
|
61
61
|
"tslib": "^2.6.2"
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ruleSet = void 0;
|
|
4
|
-
const w = "fn", x = "argv", y = "ref";
|
|
5
|
-
const a = true, b = false, c = "boolean", d = "sigv4", e = "arc-region-switch", f = "endpoint", g = "tree", h = "error", i = { "required": false, "type": "string" }, j = { [w]: "isSet", [x]: [{ [y]: "UseControlPlaneEndpoint" }] }, k = { [w]: "booleanEquals", [x]: [{ [y]: "UseControlPlaneEndpoint" }, true] }, l = { [w]: "isSet", [x]: [{ [y]: "Region" }] }, m = { [w]: "not", [x]: [{ [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, true] }] }, n = { [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, true] }, o = { [w]: "not", [x]: [{ [w]: "isSet", [x]: [{ [y]: "Endpoint" }] }] }, p = { [y]: "Endpoint" }, q = { [w]: "aws.partition", [x]: [{ [y]: "Region" }], "assign": "PartitionResult" }, r = { [w]: "stringEquals", [x]: [{ [w]: "getAttr", [x]: [{ [y]: "PartitionResult" }, "name"] }, "aws-cn"] }, s = {}, t = { "authSchemes": [{ "name": d, "signingName": e, "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, u = [n], v = [{ [w]: "isSet", [x]: [p] }];
|
|
6
|
-
const _data = { version: "1.0", parameters: { UseFIPS: { required: a, default: b, type: c }, Endpoint: i, Region: i, UseControlPlaneEndpoint: { required: b, type: c } }, rules: [{ conditions: [j, k, l, m, o, q, r], rules: [{ endpoint: { url: "https://arc-region-switch-control-plane.cn-north-1.{PartitionResult#dualStackDnsSuffix}", properties: { authSchemes: [{ name: d, signingName: e, signingRegion: "cn-north-1" }] }, headers: s }, type: f }], type: g }, { conditions: [o, j, k, l, n, q], rules: [{ conditions: [r], error: "Invalid Configuration: FIPS is not supported in this partition", type: h }, { rules: [{ endpoint: { url: "https://arc-region-switch-control-plane-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: t, headers: s }, type: f }], type: g }], type: g }, { conditions: [j, k, l, m, o, q], rules: [{ endpoint: { url: "https://arc-region-switch-control-plane.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: t, headers: s }, type: f }], type: g }, { conditions: v, rules: [{ conditions: u, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: h }, { endpoint: { url: p, properties: s, headers: s }, type: f }], type: g }, { rules: [{ conditions: [l], rules: [{ conditions: [q], rules: [{ conditions: u, endpoint: { url: "https://arc-region-switch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: s }, type: f }, { endpoint: { url: "https://arc-region-switch.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: s }, type: f }], type: g }], type: g }, { error: "Invalid Configuration: Missing Region", type: h }], type: g }] };
|
|
7
|
-
exports.ruleSet = _data;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const w = "fn", x = "argv", y = "ref";
|
|
2
|
-
const a = true, b = false, c = "boolean", d = "sigv4", e = "arc-region-switch", f = "endpoint", g = "tree", h = "error", i = { "required": false, "type": "string" }, j = { [w]: "isSet", [x]: [{ [y]: "UseControlPlaneEndpoint" }] }, k = { [w]: "booleanEquals", [x]: [{ [y]: "UseControlPlaneEndpoint" }, true] }, l = { [w]: "isSet", [x]: [{ [y]: "Region" }] }, m = { [w]: "not", [x]: [{ [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, true] }] }, n = { [w]: "booleanEquals", [x]: [{ [y]: "UseFIPS" }, true] }, o = { [w]: "not", [x]: [{ [w]: "isSet", [x]: [{ [y]: "Endpoint" }] }] }, p = { [y]: "Endpoint" }, q = { [w]: "aws.partition", [x]: [{ [y]: "Region" }], "assign": "PartitionResult" }, r = { [w]: "stringEquals", [x]: [{ [w]: "getAttr", [x]: [{ [y]: "PartitionResult" }, "name"] }, "aws-cn"] }, s = {}, t = { "authSchemes": [{ "name": d, "signingName": e, "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, u = [n], v = [{ [w]: "isSet", [x]: [p] }];
|
|
3
|
-
const _data = { version: "1.0", parameters: { UseFIPS: { required: a, default: b, type: c }, Endpoint: i, Region: i, UseControlPlaneEndpoint: { required: b, type: c } }, rules: [{ conditions: [j, k, l, m, o, q, r], rules: [{ endpoint: { url: "https://arc-region-switch-control-plane.cn-north-1.{PartitionResult#dualStackDnsSuffix}", properties: { authSchemes: [{ name: d, signingName: e, signingRegion: "cn-north-1" }] }, headers: s }, type: f }], type: g }, { conditions: [o, j, k, l, n, q], rules: [{ conditions: [r], error: "Invalid Configuration: FIPS is not supported in this partition", type: h }, { rules: [{ endpoint: { url: "https://arc-region-switch-control-plane-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: t, headers: s }, type: f }], type: g }], type: g }, { conditions: [j, k, l, m, o, q], rules: [{ endpoint: { url: "https://arc-region-switch-control-plane.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: t, headers: s }, type: f }], type: g }, { conditions: v, rules: [{ conditions: u, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: h }, { endpoint: { url: p, properties: s, headers: s }, type: f }], type: g }, { rules: [{ conditions: [l], rules: [{ conditions: [q], rules: [{ conditions: u, endpoint: { url: "https://arc-region-switch-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: s }, type: f }, { endpoint: { url: "https://arc-region-switch.{Region}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: s }, type: f }], type: g }], type: g }, { error: "Invalid Configuration: Missing Region", type: h }], type: g }] };
|
|
4
|
-
export const ruleSet = _data;
|