@aws-sdk/client-partnercentral-channel 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 +38 -0
- package/dist-cjs/endpoint/endpointResolver.js +2 -2
- package/dist-es/endpoint/bdd.js +35 -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 +19 -19
- 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,38 @@
|
|
|
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 i = "authSchemes", j = "name", k = "signingRegion";
|
|
6
|
+
const a = "isSet", b = "PartitionResult", c = "sigv4", d = { "ref": "Endpoint" }, e = { [j]: "sigv4a", "signingRegionSet": ["*"] }, f = { [i]: [e, { [j]: c, [k]: "us-gov-west-1" }] }, g = { [i]: [e, { [j]: c, [k]: "{PartitionResult#implicitGlobalRegion}" }] }, h = [{ "ref": "Region" }];
|
|
7
|
+
const _data = {
|
|
8
|
+
conditions: [
|
|
9
|
+
[a, [d]],
|
|
10
|
+
[a, h],
|
|
11
|
+
["aws.partition", h, b],
|
|
12
|
+
["stringEquals", [{ fn: "getAttr", argv: [{ ref: b }, "name"] }, "aws-us-gov"]],
|
|
13
|
+
["booleanEquals", [{ ref: "UseFIPS" }, true]]
|
|
14
|
+
],
|
|
15
|
+
results: [
|
|
16
|
+
[-1],
|
|
17
|
+
[-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
18
|
+
[d, { [i]: [e, { [j]: c }] }],
|
|
19
|
+
["https://partnercentral-channel.us-gov.{PartitionResult#dualStackDnsSuffix}", f],
|
|
20
|
+
["https://partnercentral-channel-fips.us-gov.{PartitionResult#dualStackDnsSuffix}", f],
|
|
21
|
+
["https://partnercentral-channel-fips.global.{PartitionResult#dualStackDnsSuffix}", g],
|
|
22
|
+
["https://partnercentral-channel.global.{PartitionResult#dualStackDnsSuffix}", g],
|
|
23
|
+
[-1, "Invalid Configuration: Missing Region"]
|
|
24
|
+
]
|
|
25
|
+
};
|
|
26
|
+
const root = 2;
|
|
27
|
+
const r = 100_000_000;
|
|
28
|
+
const nodes = new Int32Array([
|
|
29
|
+
-1, 1, -1,
|
|
30
|
+
0, 8, 3,
|
|
31
|
+
1, 4, r + 7,
|
|
32
|
+
2, 5, r + 7,
|
|
33
|
+
3, 7, 6,
|
|
34
|
+
4, r + 5, r + 6,
|
|
35
|
+
4, r + 4, r + 3,
|
|
36
|
+
4, r + 1, r + 2,
|
|
37
|
+
]);
|
|
38
|
+
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", "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,35 @@
|
|
|
1
|
+
import { BinaryDecisionDiagram } from "@smithy/util-endpoints";
|
|
2
|
+
const i = "authSchemes", j = "name", k = "signingRegion";
|
|
3
|
+
const a = "isSet", b = "PartitionResult", c = "sigv4", d = { "ref": "Endpoint" }, e = { [j]: "sigv4a", "signingRegionSet": ["*"] }, f = { [i]: [e, { [j]: c, [k]: "us-gov-west-1" }] }, g = { [i]: [e, { [j]: c, [k]: "{PartitionResult#implicitGlobalRegion}" }] }, h = [{ "ref": "Region" }];
|
|
4
|
+
const _data = {
|
|
5
|
+
conditions: [
|
|
6
|
+
[a, [d]],
|
|
7
|
+
[a, h],
|
|
8
|
+
["aws.partition", h, b],
|
|
9
|
+
["stringEquals", [{ fn: "getAttr", argv: [{ ref: b }, "name"] }, "aws-us-gov"]],
|
|
10
|
+
["booleanEquals", [{ ref: "UseFIPS" }, true]]
|
|
11
|
+
],
|
|
12
|
+
results: [
|
|
13
|
+
[-1],
|
|
14
|
+
[-1, "Invalid Configuration: FIPS and custom endpoint are not supported"],
|
|
15
|
+
[d, { [i]: [e, { [j]: c }] }],
|
|
16
|
+
["https://partnercentral-channel.us-gov.{PartitionResult#dualStackDnsSuffix}", f],
|
|
17
|
+
["https://partnercentral-channel-fips.us-gov.{PartitionResult#dualStackDnsSuffix}", f],
|
|
18
|
+
["https://partnercentral-channel-fips.global.{PartitionResult#dualStackDnsSuffix}", g],
|
|
19
|
+
["https://partnercentral-channel.global.{PartitionResult#dualStackDnsSuffix}", g],
|
|
20
|
+
[-1, "Invalid Configuration: Missing Region"]
|
|
21
|
+
]
|
|
22
|
+
};
|
|
23
|
+
const root = 2;
|
|
24
|
+
const r = 100_000_000;
|
|
25
|
+
const nodes = new Int32Array([
|
|
26
|
+
-1, 1, -1,
|
|
27
|
+
0, 8, 3,
|
|
28
|
+
1, 4, r + 7,
|
|
29
|
+
2, 5, r + 7,
|
|
30
|
+
3, 7, 6,
|
|
31
|
+
4, r + 5, r + 6,
|
|
32
|
+
4, r + 4, r + 3,
|
|
33
|
+
4, r + 1, r + 2,
|
|
34
|
+
]);
|
|
35
|
+
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", "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-partnercentral-channel",
|
|
3
3
|
"description": "AWS SDK for JavaScript Partnercentral Channel 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-partnercentral-channel",
|
|
@@ -21,42 +21,42 @@
|
|
|
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.
|
|
31
|
-
"@aws-sdk/signature-v4-multi-region": "^3.996.
|
|
29
|
+
"@aws-sdk/middleware-user-agent": "^3.972.33",
|
|
30
|
+
"@aws-sdk/region-config-resolver": "^3.972.13",
|
|
31
|
+
"@aws-sdk/signature-v4-multi-region": "^3.996.20",
|
|
32
32
|
"@aws-sdk/types": "^3.973.8",
|
|
33
|
-
"@aws-sdk/util-endpoints": "^3.996.
|
|
33
|
+
"@aws-sdk/util-endpoints": "^3.996.8",
|
|
34
34
|
"@aws-sdk/util-user-agent-browser": "^3.972.10",
|
|
35
|
-
"@aws-sdk/util-user-agent-node": "^3.973.
|
|
36
|
-
"@smithy/config-resolver": "^4.4.
|
|
37
|
-
"@smithy/core": "^3.23.
|
|
35
|
+
"@aws-sdk/util-user-agent-node": "^3.973.19",
|
|
36
|
+
"@smithy/config-resolver": "^4.4.17",
|
|
37
|
+
"@smithy/core": "^3.23.16",
|
|
38
38
|
"@smithy/fetch-http-handler": "^5.3.17",
|
|
39
39
|
"@smithy/hash-node": "^4.2.14",
|
|
40
40
|
"@smithy/invalid-dependency": "^4.2.14",
|
|
41
41
|
"@smithy/middleware-content-length": "^4.2.14",
|
|
42
|
-
"@smithy/middleware-endpoint": "^4.4.
|
|
43
|
-
"@smithy/middleware-retry": "^4.5.
|
|
44
|
-
"@smithy/middleware-serde": "^4.2.
|
|
42
|
+
"@smithy/middleware-endpoint": "^4.4.31",
|
|
43
|
+
"@smithy/middleware-retry": "^4.5.4",
|
|
44
|
+
"@smithy/middleware-serde": "^4.2.19",
|
|
45
45
|
"@smithy/middleware-stack": "^4.2.14",
|
|
46
46
|
"@smithy/node-config-provider": "^4.3.14",
|
|
47
|
-
"@smithy/node-http-handler": "^4.
|
|
47
|
+
"@smithy/node-http-handler": "^4.6.0",
|
|
48
48
|
"@smithy/protocol-http": "^5.3.14",
|
|
49
|
-
"@smithy/smithy-client": "^4.12.
|
|
49
|
+
"@smithy/smithy-client": "^4.12.12",
|
|
50
50
|
"@smithy/types": "^4.14.1",
|
|
51
51
|
"@smithy/url-parser": "^4.2.14",
|
|
52
52
|
"@smithy/util-base64": "^4.3.2",
|
|
53
53
|
"@smithy/util-body-length-browser": "^4.2.2",
|
|
54
54
|
"@smithy/util-body-length-node": "^4.2.3",
|
|
55
|
-
"@smithy/util-defaults-mode-browser": "^4.3.
|
|
56
|
-
"@smithy/util-defaults-mode-node": "^4.2.
|
|
57
|
-
"@smithy/util-endpoints": "^3.4.
|
|
55
|
+
"@smithy/util-defaults-mode-browser": "^4.3.48",
|
|
56
|
+
"@smithy/util-defaults-mode-node": "^4.2.53",
|
|
57
|
+
"@smithy/util-endpoints": "^3.4.2",
|
|
58
58
|
"@smithy/util-middleware": "^4.2.14",
|
|
59
|
-
"@smithy/util-retry": "^4.3.
|
|
59
|
+
"@smithy/util-retry": "^4.3.3",
|
|
60
60
|
"@smithy/util-utf8": "^4.2.2",
|
|
61
61
|
"tslib": "^2.6.2"
|
|
62
62
|
},
|
|
@@ -1,7 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.ruleSet = void 0;
|
|
4
|
-
const u = "argv", v = "ref", w = "authSchemes", x = "name", y = "signingRegion";
|
|
5
|
-
const a = true, b = false, c = "isSet", d = "booleanEquals", e = "error", f = "sigv4", g = "endpoint", h = "tree", i = "PartitionResult", j = { "required": false, "type": "string" }, k = { [v]: "Endpoint" }, l = { "fn": d, [u]: [{ [v]: "UseFIPS" }, true] }, m = { [v]: "UseFIPS" }, n = { [x]: "sigv4a", "signingRegionSet": ["*"] }, o = {}, p = { "fn": "stringEquals", [u]: [{ "fn": "getAttr", [u]: [{ [v]: i }, "name"] }, "aws-us-gov"] }, q = { [w]: [n, { [x]: f, [y]: "us-gov-west-1" }] }, r = { [w]: [n, { [x]: f, [y]: "{PartitionResult#implicitGlobalRegion}" }] }, s = [l], t = [{ [v]: "Region" }];
|
|
6
|
-
const _data = { version: "1.0", parameters: { UseFIPS: { required: a, default: b, type: "boolean" }, Endpoint: j, Region: j }, rules: [{ conditions: [{ fn: c, [u]: [k] }], rules: [{ conditions: s, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: e }, { endpoint: { url: k, properties: { [w]: [n, { [x]: f }] }, headers: o }, type: g }], type: h }, { rules: [{ conditions: [{ fn: c, [u]: t }], rules: [{ conditions: [{ fn: "aws.partition", [u]: t, assign: i }], rules: [{ conditions: [p, { fn: d, [u]: [m, b] }], endpoint: { url: "https://partnercentral-channel.us-gov.{PartitionResult#dualStackDnsSuffix}", properties: q, headers: o }, type: g }, { conditions: [p, l], endpoint: { url: "https://partnercentral-channel-fips.us-gov.{PartitionResult#dualStackDnsSuffix}", properties: q, headers: o }, type: g }, { conditions: s, endpoint: { url: "https://partnercentral-channel-fips.global.{PartitionResult#dualStackDnsSuffix}", properties: r, headers: o }, type: g }, { endpoint: { url: "https://partnercentral-channel.global.{PartitionResult#dualStackDnsSuffix}", properties: r, headers: o }, type: g }], type: h }], type: h }, { error: "Invalid Configuration: Missing Region", type: e }], type: h }] };
|
|
7
|
-
exports.ruleSet = _data;
|
|
@@ -1,4 +0,0 @@
|
|
|
1
|
-
const u = "argv", v = "ref", w = "authSchemes", x = "name", y = "signingRegion";
|
|
2
|
-
const a = true, b = false, c = "isSet", d = "booleanEquals", e = "error", f = "sigv4", g = "endpoint", h = "tree", i = "PartitionResult", j = { "required": false, "type": "string" }, k = { [v]: "Endpoint" }, l = { "fn": d, [u]: [{ [v]: "UseFIPS" }, true] }, m = { [v]: "UseFIPS" }, n = { [x]: "sigv4a", "signingRegionSet": ["*"] }, o = {}, p = { "fn": "stringEquals", [u]: [{ "fn": "getAttr", [u]: [{ [v]: i }, "name"] }, "aws-us-gov"] }, q = { [w]: [n, { [x]: f, [y]: "us-gov-west-1" }] }, r = { [w]: [n, { [x]: f, [y]: "{PartitionResult#implicitGlobalRegion}" }] }, s = [l], t = [{ [v]: "Region" }];
|
|
3
|
-
const _data = { version: "1.0", parameters: { UseFIPS: { required: a, default: b, type: "boolean" }, Endpoint: j, Region: j }, rules: [{ conditions: [{ fn: c, [u]: [k] }], rules: [{ conditions: s, error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: e }, { endpoint: { url: k, properties: { [w]: [n, { [x]: f }] }, headers: o }, type: g }], type: h }, { rules: [{ conditions: [{ fn: c, [u]: t }], rules: [{ conditions: [{ fn: "aws.partition", [u]: t, assign: i }], rules: [{ conditions: [p, { fn: d, [u]: [m, b] }], endpoint: { url: "https://partnercentral-channel.us-gov.{PartitionResult#dualStackDnsSuffix}", properties: q, headers: o }, type: g }, { conditions: [p, l], endpoint: { url: "https://partnercentral-channel-fips.us-gov.{PartitionResult#dualStackDnsSuffix}", properties: q, headers: o }, type: g }, { conditions: s, endpoint: { url: "https://partnercentral-channel-fips.global.{PartitionResult#dualStackDnsSuffix}", properties: r, headers: o }, type: g }, { endpoint: { url: "https://partnercentral-channel.global.{PartitionResult#dualStackDnsSuffix}", properties: r, headers: o }, type: g }], type: h }], type: h }, { error: "Invalid Configuration: Missing Region", type: e }], type: h }] };
|
|
4
|
-
export const ruleSet = _data;
|