@aws-sdk/client-signer-data 3.1031.0 → 3.1033.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 +32 -0
- package/dist-cjs/endpoint/endpointResolver.js +2 -2
- package/dist-es/endpoint/bdd.js +29 -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 +5 -5
- 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,32 @@
|
|
|
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 = "booleanEquals", b = { "ref": "Endpoint" }, c = {};
|
|
6
|
+
const _data = {
|
|
7
|
+
conditions: [
|
|
8
|
+
["isSet", [b]],
|
|
9
|
+
["aws.partition", [{ ref: "Region" }], "PartitionResult"],
|
|
10
|
+
[a, [{ ref: "UseFIPS" }, true]],
|
|
11
|
+
[a, [{ ref: "UseDualStack" }, true]]
|
|
12
|
+
],
|
|
13
|
+
results: [
|
|
14
|
+
[-1],
|
|
15
|
+
[b, c],
|
|
16
|
+
["https://data-signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
|
|
17
|
+
["https://data-signer-fips.{Region}.{PartitionResult#dnsSuffix}", c],
|
|
18
|
+
["https://data-signer.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
|
|
19
|
+
["https://data-signer.{Region}.{PartitionResult#dnsSuffix}", c]
|
|
20
|
+
]
|
|
21
|
+
};
|
|
22
|
+
const root = 2;
|
|
23
|
+
const r = 100_000_000;
|
|
24
|
+
const nodes = new Int32Array([
|
|
25
|
+
-1, 1, -1,
|
|
26
|
+
0, r + 1, 3,
|
|
27
|
+
1, 4, r + 0,
|
|
28
|
+
2, 6, 5,
|
|
29
|
+
3, r + 4, r + 5,
|
|
30
|
+
3, r + 2, r + 3,
|
|
31
|
+
]);
|
|
32
|
+
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", "UseDualStack", "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,29 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/util-endpoints";
|
|
2
|
+
const a = "booleanEquals", b = { "ref": "Endpoint" }, c = {};
|
|
3
|
+
const _data = {
|
|
4
|
+
conditions: [
|
|
5
|
+
["isSet", [b]],
|
|
6
|
+
["aws.partition", [{ ref: "Region" }], "PartitionResult"],
|
|
7
|
+
[a, [{ ref: "UseFIPS" }, true]],
|
|
8
|
+
[a, [{ ref: "UseDualStack" }, true]]
|
|
9
|
+
],
|
|
10
|
+
results: [
|
|
11
|
+
[-1],
|
|
12
|
+
[b, c],
|
|
13
|
+
["https://data-signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
|
|
14
|
+
["https://data-signer-fips.{Region}.{PartitionResult#dnsSuffix}", c],
|
|
15
|
+
["https://data-signer.{Region}.{PartitionResult#dualStackDnsSuffix}", c],
|
|
16
|
+
["https://data-signer.{Region}.{PartitionResult#dnsSuffix}", c]
|
|
17
|
+
]
|
|
18
|
+
};
|
|
19
|
+
const root = 2;
|
|
20
|
+
const r = 100_000_000;
|
|
21
|
+
const nodes = new Int32Array([
|
|
22
|
+
-1, 1, -1,
|
|
23
|
+
0, r + 1, 3,
|
|
24
|
+
1, 4, r + 0,
|
|
25
|
+
2, 6, 5,
|
|
26
|
+
3, r + 4, r + 5,
|
|
27
|
+
3, r + 2, r + 3,
|
|
28
|
+
]);
|
|
29
|
+
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", "UseDualStack", "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-signer-data",
|
|
3
3
|
"description": "AWS SDK for JavaScript Signer Data Client for Node.js, Browser and React Native",
|
|
4
|
-
"version": "3.
|
|
4
|
+
"version": "3.1033.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-signer-data",
|
|
@@ -21,17 +21,17 @@
|
|
|
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.2",
|
|
25
|
+
"@aws-sdk/credential-provider-node": "^3.972.33",
|
|
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.
|
|
29
|
+
"@aws-sdk/middleware-user-agent": "^3.972.32",
|
|
30
30
|
"@aws-sdk/region-config-resolver": "^3.972.12",
|
|
31
31
|
"@aws-sdk/types": "^3.973.8",
|
|
32
32
|
"@aws-sdk/util-endpoints": "^3.996.7",
|
|
33
33
|
"@aws-sdk/util-user-agent-browser": "^3.972.10",
|
|
34
|
-
"@aws-sdk/util-user-agent-node": "^3.973.
|
|
34
|
+
"@aws-sdk/util-user-agent-node": "^3.973.18",
|
|
35
35
|
"@smithy/config-resolver": "^4.4.16",
|
|
36
36
|
"@smithy/core": "^3.23.15",
|
|
37
37
|
"@smithy/fetch-http-handler": "^5.3.17",
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ruleSet = void 0;
|
|
4
|
-
const i = "ref";
|
|
5
|
-
const a = true, b = false, c = "String", d = "endpoint", e = { "required": true, "type": "Boolean", "default": false }, f = { [i]: "Endpoint" }, g = { "fn": "booleanEquals", "argv": [{ [i]: "UseFIPS" }, true] }, h = { "fn": "booleanEquals", "argv": [{ [i]: "UseDualStack" }, true] };
|
|
6
|
-
const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseFIPS: e, UseDualStack: e, Endpoint: { required: b, type: c } }, rules: [{ type: d, conditions: [{ fn: "isSet", argv: [f] }], endpoint: { url: f } }, { type: "tree", conditions: [{ fn: "aws.partition", argv: [{ [i]: "Region" }], assign: "PartitionResult" }], rules: [{ type: d, conditions: [g, h], endpoint: { url: "https://data-signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}" } }, { type: d, conditions: [g], endpoint: { url: "https://data-signer-fips.{Region}.{PartitionResult#dnsSuffix}" } }, { type: d, conditions: [h], endpoint: { url: "https://data-signer.{Region}.{PartitionResult#dualStackDnsSuffix}" } }, { type: d, endpoint: { url: "https://data-signer.{Region}.{PartitionResult#dnsSuffix}" } }] }] };
|
|
7
|
-
exports.ruleSet = _data;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const i = "ref";
|
|
2
|
-
const a = true, b = false, c = "String", d = "endpoint", e = { "required": true, "type": "Boolean", "default": false }, f = { [i]: "Endpoint" }, g = { "fn": "booleanEquals", "argv": [{ [i]: "UseFIPS" }, true] }, h = { "fn": "booleanEquals", "argv": [{ [i]: "UseDualStack" }, true] };
|
|
3
|
-
const _data = { version: "1.0", parameters: { Region: { required: a, type: c }, UseFIPS: e, UseDualStack: e, Endpoint: { required: b, type: c } }, rules: [{ type: d, conditions: [{ fn: "isSet", argv: [f] }], endpoint: { url: f } }, { type: "tree", conditions: [{ fn: "aws.partition", argv: [{ [i]: "Region" }], assign: "PartitionResult" }], rules: [{ type: d, conditions: [g, h], endpoint: { url: "https://data-signer-fips.{Region}.{PartitionResult#dualStackDnsSuffix}" } }, { type: d, conditions: [g], endpoint: { url: "https://data-signer-fips.{Region}.{PartitionResult#dnsSuffix}" } }, { type: d, conditions: [h], endpoint: { url: "https://data-signer.{Region}.{PartitionResult#dualStackDnsSuffix}" } }, { type: d, endpoint: { url: "https://data-signer.{Region}.{PartitionResult#dnsSuffix}" } }] }] };
|
|
4
|
-
export const ruleSet = _data;
|