@aws-sdk/client-account 3.1032.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.
@@ -0,0 +1,49 @@
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 k = "ref";
6
+ const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = { "authSchemes": [{ "name": "sigv4", "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, j = [{ [k]: "Region" }];
7
+ const _data = {
8
+ conditions: [
9
+ [c, [g]],
10
+ [c, j],
11
+ ["aws.partition", j, d],
12
+ [e, [{ [k]: "UseFIPS" }, b]],
13
+ [e, [{ [k]: "UseDualStack" }, b]],
14
+ [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
15
+ [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]]
16
+ ],
17
+ results: [
18
+ [a],
19
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
20
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
21
+ [g, {}],
22
+ ["https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", i],
23
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
24
+ ["https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", i],
25
+ [a, "FIPS is enabled but this partition does not support FIPS"],
26
+ ["https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", i],
27
+ [a, "DualStack is enabled but this partition does not support DualStack"],
28
+ ["https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", i],
29
+ [a, "Invalid Configuration: Missing Region"]
30
+ ]
31
+ };
32
+ const root = 2;
33
+ const r = 100_000_000;
34
+ const nodes = new Int32Array([
35
+ -1, 1, -1,
36
+ 0, 12, 3,
37
+ 1, 4, r + 11,
38
+ 2, 5, r + 11,
39
+ 3, 8, 6,
40
+ 4, 7, r + 10,
41
+ 5, r + 8, r + 9,
42
+ 4, 10, 9,
43
+ 6, r + 6, r + 7,
44
+ 5, 11, r + 5,
45
+ 6, r + 4, r + 5,
46
+ 3, r + 1, 13,
47
+ 4, r + 2, r + 3,
48
+ ]);
49
+ 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 ruleset_1 = require("./ruleset");
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.resolveEndpoint)(ruleset_1.ruleSet, {
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,46 @@
1
+ import { BinaryDecisionDiagram } from "@smithy/util-endpoints";
2
+ const k = "ref";
3
+ const a = -1, b = true, c = "isSet", d = "PartitionResult", e = "booleanEquals", f = "getAttr", g = { [k]: "Endpoint" }, h = { [k]: d }, i = { "authSchemes": [{ "name": "sigv4", "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, j = [{ [k]: "Region" }];
4
+ const _data = {
5
+ conditions: [
6
+ [c, [g]],
7
+ [c, j],
8
+ ["aws.partition", j, d],
9
+ [e, [{ [k]: "UseFIPS" }, b]],
10
+ [e, [{ [k]: "UseDualStack" }, b]],
11
+ [e, [{ fn: f, argv: [h, "supportsDualStack"] }, b]],
12
+ [e, [{ fn: f, argv: [h, "supportsFIPS"] }, b]]
13
+ ],
14
+ results: [
15
+ [a],
16
+ [a, "Invalid Configuration: FIPS and custom endpoint are not supported"],
17
+ [a, "Invalid Configuration: Dualstack and custom endpoint are not supported"],
18
+ [g, {}],
19
+ ["https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", i],
20
+ [a, "FIPS and DualStack are enabled, but this partition does not support one or both"],
21
+ ["https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", i],
22
+ [a, "FIPS is enabled but this partition does not support FIPS"],
23
+ ["https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", i],
24
+ [a, "DualStack is enabled but this partition does not support DualStack"],
25
+ ["https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", i],
26
+ [a, "Invalid Configuration: Missing Region"]
27
+ ]
28
+ };
29
+ const root = 2;
30
+ const r = 100_000_000;
31
+ const nodes = new Int32Array([
32
+ -1, 1, -1,
33
+ 0, 12, 3,
34
+ 1, 4, r + 11,
35
+ 2, 5, r + 11,
36
+ 3, 8, 6,
37
+ 4, 7, r + 10,
38
+ 5, r + 8, r + 9,
39
+ 4, 10, 9,
40
+ 6, r + 6, r + 7,
41
+ 5, 11, r + 5,
42
+ 6, r + 4, r + 5,
43
+ 3, r + 1, 13,
44
+ 4, r + 2, r + 3,
45
+ ]);
46
+ 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, EndpointCache, resolveEndpoint } from "@smithy/util-endpoints";
3
- import { ruleSet } from "./ruleset";
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, () => resolveEndpoint(ruleSet, {
9
+ return cache.get(endpointParams, () => decideEndpoint(bdd, {
10
10
  endpointParams: endpointParams,
11
11
  logger: context.logger,
12
12
  }));
@@ -0,0 +1,2 @@
1
+ import { BinaryDecisionDiagram } from "@smithy/util-endpoints";
2
+ export declare const bdd: BinaryDecisionDiagram;
@@ -0,0 +1,2 @@
1
+ import { BinaryDecisionDiagram } from "@smithy/util-endpoints";
2
+ export declare const bdd: BinaryDecisionDiagram;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@aws-sdk/client-account",
3
3
  "description": "AWS SDK for JavaScript Account Client for Node.js, Browser and React Native",
4
- "version": "3.1032.0",
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-account",
@@ -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.1",
25
- "@aws-sdk/credential-provider-node": "^3.972.32",
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.31",
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.17",
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 u = "required", v = "fn", w = "argv", x = "ref";
5
- const a = true, b = false, c = "isSet", d = "booleanEquals", e = "error", f = "endpoint", g = "tree", h = "PartitionResult", i = { [u]: true, "default": false, "type": "boolean" }, j = { [u]: false, "type": "string" }, k = { [x]: "Endpoint" }, l = { [v]: d, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [x]: "UseFIPS" }, n = { [v]: d, [w]: [{ [x]: "UseDualStack" }, true] }, o = { [x]: "UseDualStack" }, p = {}, q = { [v]: "getAttr", [w]: [{ [x]: h }, "supportsFIPS"] }, r = { [v]: d, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: h }, "supportsDualStack"] }] }, s = { "authSchemes": [{ "name": "sigv4", "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, t = [{ [x]: "Region" }];
6
- const _data = { version: "1.0", parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j }, rules: [{ conditions: [{ [v]: c, [w]: [k] }], rules: [{ conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: e }, { rules: [{ conditions: [n], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: e }, { endpoint: { url: k, properties: p, headers: p }, type: f }], type: g }], type: g }, { rules: [{ conditions: [{ [v]: c, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: h }], rules: [{ conditions: [l, n], rules: [{ conditions: [{ [v]: d, [w]: [a, q] }, r], rules: [{ endpoint: { url: "https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: p }, type: f }], type: g }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: e }], type: g }, { conditions: [l, { [v]: d, [w]: [o, b] }], rules: [{ conditions: [{ [v]: d, [w]: [q, a] }], rules: [{ endpoint: { url: "https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", properties: s, headers: p }, type: f }], type: g }, { error: "FIPS is enabled but this partition does not support FIPS", type: e }], type: g }, { conditions: [{ [v]: d, [w]: [m, b] }, n], rules: [{ conditions: [r], rules: [{ endpoint: { url: "https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: p }, type: f }], type: g }, { error: "DualStack is enabled but this partition does not support DualStack", type: e }], type: g }, { endpoint: { url: "https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", properties: s, headers: p }, type: f }], type: g }], type: g }, { error: "Invalid Configuration: Missing Region", type: e }], type: g }] };
7
- exports.ruleSet = _data;
@@ -1,4 +0,0 @@
1
- const u = "required", v = "fn", w = "argv", x = "ref";
2
- const a = true, b = false, c = "isSet", d = "booleanEquals", e = "error", f = "endpoint", g = "tree", h = "PartitionResult", i = { [u]: true, "default": false, "type": "boolean" }, j = { [u]: false, "type": "string" }, k = { [x]: "Endpoint" }, l = { [v]: d, [w]: [{ [x]: "UseFIPS" }, true] }, m = { [x]: "UseFIPS" }, n = { [v]: d, [w]: [{ [x]: "UseDualStack" }, true] }, o = { [x]: "UseDualStack" }, p = {}, q = { [v]: "getAttr", [w]: [{ [x]: h }, "supportsFIPS"] }, r = { [v]: d, [w]: [true, { [v]: "getAttr", [w]: [{ [x]: h }, "supportsDualStack"] }] }, s = { "authSchemes": [{ "name": "sigv4", "signingRegion": "{PartitionResult#implicitGlobalRegion}" }] }, t = [{ [x]: "Region" }];
3
- const _data = { version: "1.0", parameters: { UseDualStack: i, UseFIPS: i, Endpoint: j, Region: j }, rules: [{ conditions: [{ [v]: c, [w]: [k] }], rules: [{ conditions: [l], error: "Invalid Configuration: FIPS and custom endpoint are not supported", type: e }, { rules: [{ conditions: [n], error: "Invalid Configuration: Dualstack and custom endpoint are not supported", type: e }, { endpoint: { url: k, properties: p, headers: p }, type: f }], type: g }], type: g }, { rules: [{ conditions: [{ [v]: c, [w]: t }], rules: [{ conditions: [{ [v]: "aws.partition", [w]: t, assign: h }], rules: [{ conditions: [l, n], rules: [{ conditions: [{ [v]: d, [w]: [a, q] }, r], rules: [{ endpoint: { url: "https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: p }, type: f }], type: g }, { error: "FIPS and DualStack are enabled, but this partition does not support one or both", type: e }], type: g }, { conditions: [l, { [v]: d, [w]: [o, b] }], rules: [{ conditions: [{ [v]: d, [w]: [q, a] }], rules: [{ endpoint: { url: "https://account-fips.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", properties: s, headers: p }, type: f }], type: g }, { error: "FIPS is enabled but this partition does not support FIPS", type: e }], type: g }, { conditions: [{ [v]: d, [w]: [m, b] }, n], rules: [{ conditions: [r], rules: [{ endpoint: { url: "https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dualStackDnsSuffix}", properties: s, headers: p }, type: f }], type: g }, { error: "DualStack is enabled but this partition does not support DualStack", type: e }], type: g }, { endpoint: { url: "https://account.{PartitionResult#implicitGlobalRegion}.{PartitionResult#dnsSuffix}", properties: s, headers: p }, type: f }], type: g }], type: g }, { error: "Invalid Configuration: Missing Region", type: e }], type: g }] };
4
- export const ruleSet = _data;
@@ -1,2 +0,0 @@
1
- import { RuleSetObject } from "@smithy/types";
2
- export declare const ruleSet: RuleSetObject;
@@ -1,2 +0,0 @@
1
- import { RuleSetObject } from "@smithy/types";
2
- export declare const ruleSet: RuleSetObject;