@cdk8s/awscdk-resolver 0.0.393 → 0.0.394

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.
Files changed (59) hide show
  1. package/.jsii +3 -3
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +34 -34
  4. package/node_modules/@aws-sdk/client-sso/package.json +32 -32
  5. package/node_modules/@aws-sdk/core/package.json +11 -11
  6. package/node_modules/@aws-sdk/credential-provider-env/package.json +5 -5
  7. package/node_modules/@aws-sdk/credential-provider-http/package.json +10 -10
  8. package/node_modules/@aws-sdk/credential-provider-ini/package.json +13 -13
  9. package/node_modules/@aws-sdk/credential-provider-node/package.json +12 -12
  10. package/node_modules/@aws-sdk/credential-provider-process/package.json +6 -6
  11. package/node_modules/@aws-sdk/credential-provider-sso/package.json +8 -8
  12. package/node_modules/@aws-sdk/credential-provider-web-identity/package.json +7 -7
  13. package/node_modules/@aws-sdk/middleware-host-header/package.json +4 -4
  14. package/node_modules/@aws-sdk/middleware-logger/package.json +3 -3
  15. package/node_modules/@aws-sdk/middleware-recursion-detection/package.json +4 -4
  16. package/node_modules/@aws-sdk/middleware-user-agent/package.json +7 -7
  17. package/node_modules/@aws-sdk/nested-clients/dist-cjs/submodules/sts/index.js +6 -4
  18. package/node_modules/@aws-sdk/nested-clients/dist-es/submodules/sts/defaultStsRoleAssumers.js +6 -4
  19. package/node_modules/@aws-sdk/nested-clients/dist-types/submodules/sts/defaultStsRoleAssumers.d.ts +1 -1
  20. package/node_modules/@aws-sdk/nested-clients/dist-types/ts3.4/submodules/sts/defaultStsRoleAssumers.d.ts +1 -1
  21. package/node_modules/@aws-sdk/nested-clients/package.json +32 -32
  22. package/node_modules/@aws-sdk/region-config-resolver/dist-cjs/index.js +22 -49
  23. package/node_modules/@aws-sdk/region-config-resolver/dist-es/index.js +1 -1
  24. package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/awsRegionConfig.js +2 -0
  25. package/node_modules/@aws-sdk/region-config-resolver/dist-types/extensions/index.d.ts +2 -2
  26. package/node_modules/@aws-sdk/region-config-resolver/dist-types/index.d.ts +1 -1
  27. package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/awsRegionConfig.d.ts +15 -0
  28. package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/index.d.ts +1 -1
  29. package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/awsRegionConfig.d.ts +11 -0
  30. package/node_modules/@aws-sdk/region-config-resolver/package.json +4 -7
  31. package/node_modules/@aws-sdk/token-providers/package.json +7 -7
  32. package/node_modules/@aws-sdk/types/package.json +2 -2
  33. package/node_modules/@aws-sdk/util-endpoints/package.json +5 -5
  34. package/node_modules/@aws-sdk/util-user-agent-browser/package.json +3 -3
  35. package/node_modules/@aws-sdk/util-user-agent-node/package.json +5 -5
  36. package/node_modules/@aws-sdk/xml-builder/package.json +2 -2
  37. package/node_modules/@smithy/config-resolver/dist-cjs/index.js +15 -5
  38. package/node_modules/@smithy/config-resolver/dist-es/regionConfig/checkRegion.js +10 -0
  39. package/node_modules/@smithy/config-resolver/dist-es/regionConfig/resolveRegionConfig.js +5 -5
  40. package/node_modules/@smithy/config-resolver/dist-types/regionConfig/checkRegion.d.ts +9 -0
  41. package/node_modules/@smithy/config-resolver/dist-types/ts3.4/regionConfig/checkRegion.d.ts +9 -0
  42. package/node_modules/@smithy/config-resolver/package.json +2 -1
  43. package/node_modules/@smithy/util-defaults-mode-node/package.json +2 -2
  44. package/package.json +4 -4
  45. package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/config.js +0 -12
  46. package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/getRealRegion.js +0 -6
  47. package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/index.js +0 -2
  48. package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/isFipsRegion.js +0 -1
  49. package/node_modules/@aws-sdk/region-config-resolver/dist-es/regionConfig/resolveRegionConfig.js +0 -24
  50. package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/config.d.ts +0 -17
  51. package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/getRealRegion.d.ts +0 -4
  52. package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/index.d.ts +0 -8
  53. package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/isFipsRegion.d.ts +0 -4
  54. package/node_modules/@aws-sdk/region-config-resolver/dist-types/regionConfig/resolveRegionConfig.d.ts +0 -37
  55. package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/config.d.ts +0 -8
  56. package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/getRealRegion.d.ts +0 -1
  57. package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/index.d.ts +0 -2
  58. package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/isFipsRegion.d.ts +0 -1
  59. package/node_modules/@aws-sdk/region-config-resolver/dist-types/ts3.4/regionConfig/resolveRegionConfig.d.ts +0 -14
@@ -6,7 +6,7 @@ import type { STSClient, STSClientConfig } from "./STSClient";
6
6
  /**
7
7
  * @public
8
8
  */
9
- export type STSRoleAssumerOptions = Pick<STSClientConfig, "logger" | "region" | "requestHandler"> & {
9
+ export type STSRoleAssumerOptions = Pick<STSClientConfig, "logger" | "region" | "requestHandler" | "profile"> & {
10
10
  credentialProviderLogger?: Logger;
11
11
  parentClientConfig?: CredentialProviderOptions["parentClientConfig"];
12
12
  };
@@ -5,7 +5,7 @@ import { AssumeRoleWithWebIdentityCommandInput } from "./commands/AssumeRoleWith
5
5
  import { STSClient, STSClientConfig } from "./STSClient";
6
6
  export type STSRoleAssumerOptions = Pick<
7
7
  STSClientConfig,
8
- "logger" | "region" | "requestHandler"
8
+ "logger" | "region" | "requestHandler" | "profile"
9
9
  > & {
10
10
  credentialProviderLogger?: Logger;
11
11
  parentClientConfig?: CredentialProviderOptions["parentClientConfig"];
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/nested-clients",
3
- "version": "3.911.0",
3
+ "version": "3.914.0",
4
4
  "description": "Nested clients for AWS SDK packages.",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -29,40 +29,40 @@
29
29
  "dependencies": {
30
30
  "@aws-crypto/sha256-browser": "5.2.0",
31
31
  "@aws-crypto/sha256-js": "5.2.0",
32
- "@aws-sdk/core": "3.911.0",
33
- "@aws-sdk/middleware-host-header": "3.910.0",
34
- "@aws-sdk/middleware-logger": "3.910.0",
35
- "@aws-sdk/middleware-recursion-detection": "3.910.0",
36
- "@aws-sdk/middleware-user-agent": "3.911.0",
37
- "@aws-sdk/region-config-resolver": "3.910.0",
38
- "@aws-sdk/types": "3.910.0",
39
- "@aws-sdk/util-endpoints": "3.910.0",
40
- "@aws-sdk/util-user-agent-browser": "3.910.0",
41
- "@aws-sdk/util-user-agent-node": "3.911.0",
42
- "@smithy/config-resolver": "^4.3.2",
43
- "@smithy/core": "^3.16.1",
44
- "@smithy/fetch-http-handler": "^5.3.3",
45
- "@smithy/hash-node": "^4.2.2",
46
- "@smithy/invalid-dependency": "^4.2.2",
47
- "@smithy/middleware-content-length": "^4.2.2",
48
- "@smithy/middleware-endpoint": "^4.3.3",
49
- "@smithy/middleware-retry": "^4.4.3",
50
- "@smithy/middleware-serde": "^4.2.2",
51
- "@smithy/middleware-stack": "^4.2.2",
52
- "@smithy/node-config-provider": "^4.3.2",
53
- "@smithy/node-http-handler": "^4.4.1",
54
- "@smithy/protocol-http": "^5.3.2",
55
- "@smithy/smithy-client": "^4.8.1",
56
- "@smithy/types": "^4.7.1",
57
- "@smithy/url-parser": "^4.2.2",
32
+ "@aws-sdk/core": "3.914.0",
33
+ "@aws-sdk/middleware-host-header": "3.914.0",
34
+ "@aws-sdk/middleware-logger": "3.914.0",
35
+ "@aws-sdk/middleware-recursion-detection": "3.914.0",
36
+ "@aws-sdk/middleware-user-agent": "3.914.0",
37
+ "@aws-sdk/region-config-resolver": "3.914.0",
38
+ "@aws-sdk/types": "3.914.0",
39
+ "@aws-sdk/util-endpoints": "3.914.0",
40
+ "@aws-sdk/util-user-agent-browser": "3.914.0",
41
+ "@aws-sdk/util-user-agent-node": "3.914.0",
42
+ "@smithy/config-resolver": "^4.4.0",
43
+ "@smithy/core": "^3.17.0",
44
+ "@smithy/fetch-http-handler": "^5.3.4",
45
+ "@smithy/hash-node": "^4.2.3",
46
+ "@smithy/invalid-dependency": "^4.2.3",
47
+ "@smithy/middleware-content-length": "^4.2.3",
48
+ "@smithy/middleware-endpoint": "^4.3.4",
49
+ "@smithy/middleware-retry": "^4.4.4",
50
+ "@smithy/middleware-serde": "^4.2.3",
51
+ "@smithy/middleware-stack": "^4.2.3",
52
+ "@smithy/node-config-provider": "^4.3.3",
53
+ "@smithy/node-http-handler": "^4.4.2",
54
+ "@smithy/protocol-http": "^5.3.3",
55
+ "@smithy/smithy-client": "^4.9.0",
56
+ "@smithy/types": "^4.8.0",
57
+ "@smithy/url-parser": "^4.2.3",
58
58
  "@smithy/util-base64": "^4.3.0",
59
59
  "@smithy/util-body-length-browser": "^4.2.0",
60
60
  "@smithy/util-body-length-node": "^4.2.1",
61
- "@smithy/util-defaults-mode-browser": "^4.3.2",
62
- "@smithy/util-defaults-mode-node": "^4.2.3",
63
- "@smithy/util-endpoints": "^3.2.2",
64
- "@smithy/util-middleware": "^4.2.2",
65
- "@smithy/util-retry": "^4.2.2",
61
+ "@smithy/util-defaults-mode-browser": "^4.3.3",
62
+ "@smithy/util-defaults-mode-node": "^4.2.5",
63
+ "@smithy/util-endpoints": "^3.2.3",
64
+ "@smithy/util-middleware": "^4.2.3",
65
+ "@smithy/util-retry": "^4.2.3",
66
66
  "@smithy/util-utf8": "^4.2.0",
67
67
  "tslib": "^2.6.2"
68
68
  },
@@ -1,5 +1,7 @@
1
1
  'use strict';
2
2
 
3
+ var configResolver = require('@smithy/config-resolver');
4
+
3
5
  const getAwsRegionExtensionConfiguration = (runtimeConfig) => {
4
6
  return {
5
7
  setRegion(region) {
@@ -16,54 +18,25 @@ const resolveAwsRegionExtensionConfiguration = (awsRegionExtensionConfiguration)
16
18
  };
17
19
  };
18
20
 
19
- const REGION_ENV_NAME = "AWS_REGION";
20
- const REGION_INI_NAME = "region";
21
- const NODE_REGION_CONFIG_OPTIONS = {
22
- environmentVariableSelector: (env) => env[REGION_ENV_NAME],
23
- configFileSelector: (profile) => profile[REGION_INI_NAME],
24
- default: () => {
25
- throw new Error("Region is missing");
26
- },
27
- };
28
- const NODE_REGION_CONFIG_FILE_OPTIONS = {
29
- preferredFile: "credentials",
30
- };
31
-
32
- const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
33
-
34
- const getRealRegion = (region) => isFipsRegion(region)
35
- ? ["fips-aws-global", "aws-fips"].includes(region)
36
- ? "us-east-1"
37
- : region.replace(/fips-(dkr-|prod-)?|-fips/, "")
38
- : region;
39
-
40
- const resolveRegionConfig = (input) => {
41
- const { region, useFipsEndpoint } = input;
42
- if (!region) {
43
- throw new Error("Region is missing");
44
- }
45
- return Object.assign(input, {
46
- region: async () => {
47
- if (typeof region === "string") {
48
- return getRealRegion(region);
49
- }
50
- const providedRegion = await region();
51
- return getRealRegion(providedRegion);
52
- },
53
- useFipsEndpoint: async () => {
54
- const providedRegion = typeof region === "string" ? region : await region();
55
- if (isFipsRegion(providedRegion)) {
56
- return true;
57
- }
58
- return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
59
- },
60
- });
61
- };
62
-
63
- exports.NODE_REGION_CONFIG_FILE_OPTIONS = NODE_REGION_CONFIG_FILE_OPTIONS;
64
- exports.NODE_REGION_CONFIG_OPTIONS = NODE_REGION_CONFIG_OPTIONS;
65
- exports.REGION_ENV_NAME = REGION_ENV_NAME;
66
- exports.REGION_INI_NAME = REGION_INI_NAME;
21
+ Object.defineProperty(exports, "NODE_REGION_CONFIG_FILE_OPTIONS", {
22
+ enumerable: true,
23
+ get: function () { return configResolver.NODE_REGION_CONFIG_FILE_OPTIONS; }
24
+ });
25
+ Object.defineProperty(exports, "NODE_REGION_CONFIG_OPTIONS", {
26
+ enumerable: true,
27
+ get: function () { return configResolver.NODE_REGION_CONFIG_OPTIONS; }
28
+ });
29
+ Object.defineProperty(exports, "REGION_ENV_NAME", {
30
+ enumerable: true,
31
+ get: function () { return configResolver.REGION_ENV_NAME; }
32
+ });
33
+ Object.defineProperty(exports, "REGION_INI_NAME", {
34
+ enumerable: true,
35
+ get: function () { return configResolver.REGION_INI_NAME; }
36
+ });
37
+ Object.defineProperty(exports, "resolveRegionConfig", {
38
+ enumerable: true,
39
+ get: function () { return configResolver.resolveRegionConfig; }
40
+ });
67
41
  exports.getAwsRegionExtensionConfiguration = getAwsRegionExtensionConfiguration;
68
42
  exports.resolveAwsRegionExtensionConfiguration = resolveAwsRegionExtensionConfiguration;
69
- exports.resolveRegionConfig = resolveRegionConfig;
@@ -1,2 +1,2 @@
1
1
  export * from "./extensions";
2
- export * from "./regionConfig";
2
+ export * from "./regionConfig/awsRegionConfig";
@@ -0,0 +1,2 @@
1
+ export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from "@smithy/config-resolver";
2
+ export { resolveRegionConfig } from "@smithy/config-resolver";
@@ -1,5 +1,5 @@
1
- import { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
2
- import { Provider } from "@smithy/types";
1
+ import type { AwsRegionExtensionConfiguration } from "@aws-sdk/types";
2
+ import type { Provider } from "@smithy/types";
3
3
  export type RegionExtensionRuntimeConfigType = Partial<{
4
4
  region: string | Provider<string>;
5
5
  }>;
@@ -1,2 +1,2 @@
1
1
  export * from "./extensions";
2
- export * from "./regionConfig";
2
+ export * from "./regionConfig/awsRegionConfig";
@@ -0,0 +1,15 @@
1
+ /**
2
+ * Backward compatibility re-export alias.
3
+ * @internal
4
+ */
5
+ export { REGION_ENV_NAME, REGION_INI_NAME, NODE_REGION_CONFIG_OPTIONS, NODE_REGION_CONFIG_FILE_OPTIONS, } from "@smithy/config-resolver";
6
+ /**
7
+ * Backward compatibility re-export alias.
8
+ * @internal
9
+ */
10
+ export type { RegionInputConfig, RegionResolvedConfig } from "@smithy/config-resolver";
11
+ /**
12
+ * Backward compatibility re-export alias.
13
+ * @internal
14
+ */
15
+ export { resolveRegionConfig } from "@smithy/config-resolver";
@@ -1,2 +1,2 @@
1
1
  export * from "./extensions";
2
- export * from "./regionConfig";
2
+ export * from "./regionConfig/awsRegionConfig";
@@ -0,0 +1,11 @@
1
+ export {
2
+ REGION_ENV_NAME,
3
+ REGION_INI_NAME,
4
+ NODE_REGION_CONFIG_OPTIONS,
5
+ NODE_REGION_CONFIG_FILE_OPTIONS,
6
+ } from "@smithy/config-resolver";
7
+ export {
8
+ RegionInputConfig,
9
+ RegionResolvedConfig,
10
+ } from "@smithy/config-resolver";
11
+ export { resolveRegionConfig } from "@smithy/config-resolver";
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/region-config-resolver",
3
- "version": "3.910.0",
3
+ "version": "3.914.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline region-config-resolver",
@@ -23,18 +23,15 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@aws-sdk/types": "3.910.0",
27
- "@smithy/node-config-provider": "^4.3.2",
28
- "@smithy/types": "^4.7.1",
29
- "@smithy/util-config-provider": "^4.2.0",
30
- "@smithy/util-middleware": "^4.2.2",
26
+ "@aws-sdk/types": "3.914.0",
27
+ "@smithy/config-resolver": "^4.4.0",
28
+ "@smithy/types": "^4.8.0",
31
29
  "tslib": "^2.6.2"
32
30
  },
33
31
  "devDependencies": {
34
32
  "@tsconfig/recommended": "1.0.1",
35
33
  "concurrently": "7.0.0",
36
34
  "downlevel-dts": "0.10.1",
37
- "jest": "28.1.1",
38
35
  "rimraf": "3.0.2",
39
36
  "typescript": "~5.8.3"
40
37
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/token-providers",
3
- "version": "3.911.0",
3
+ "version": "3.914.0",
4
4
  "description": "A collection of token providers",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -29,12 +29,12 @@
29
29
  },
30
30
  "license": "Apache-2.0",
31
31
  "dependencies": {
32
- "@aws-sdk/core": "3.911.0",
33
- "@aws-sdk/nested-clients": "3.911.0",
34
- "@aws-sdk/types": "3.910.0",
35
- "@smithy/property-provider": "^4.2.2",
36
- "@smithy/shared-ini-file-loader": "^4.3.2",
37
- "@smithy/types": "^4.7.1",
32
+ "@aws-sdk/core": "3.914.0",
33
+ "@aws-sdk/nested-clients": "3.914.0",
34
+ "@aws-sdk/types": "3.914.0",
35
+ "@smithy/property-provider": "^4.2.3",
36
+ "@smithy/shared-ini-file-loader": "^4.3.3",
37
+ "@smithy/types": "^4.8.0",
38
38
  "tslib": "^2.6.2"
39
39
  },
40
40
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/types",
3
- "version": "3.910.0",
3
+ "version": "3.914.0",
4
4
  "main": "./dist-cjs/index.js",
5
5
  "module": "./dist-es/index.js",
6
6
  "types": "./dist-types/index.d.ts",
@@ -42,7 +42,7 @@
42
42
  "directory": "packages/types"
43
43
  },
44
44
  "dependencies": {
45
- "@smithy/types": "^4.7.1",
45
+ "@smithy/types": "^4.8.0",
46
46
  "tslib": "^2.6.2"
47
47
  },
48
48
  "devDependencies": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-endpoints",
3
- "version": "3.910.0",
3
+ "version": "3.914.0",
4
4
  "description": "Utilities to help with endpoint resolution",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -25,10 +25,10 @@
25
25
  },
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
- "@aws-sdk/types": "3.910.0",
29
- "@smithy/types": "^4.7.1",
30
- "@smithy/url-parser": "^4.2.2",
31
- "@smithy/util-endpoints": "^3.2.2",
28
+ "@aws-sdk/types": "3.914.0",
29
+ "@smithy/types": "^4.8.0",
30
+ "@smithy/url-parser": "^4.2.3",
31
+ "@smithy/util-endpoints": "^3.2.3",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "engines": {
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-user-agent-browser",
3
- "version": "3.910.0",
3
+ "version": "3.914.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline util-user-agent-browser",
@@ -24,8 +24,8 @@
24
24
  "license": "Apache-2.0",
25
25
  "react-native": "dist-es/index.native.js",
26
26
  "dependencies": {
27
- "@aws-sdk/types": "3.910.0",
28
- "@smithy/types": "^4.7.1",
27
+ "@aws-sdk/types": "3.914.0",
28
+ "@smithy/types": "^4.8.0",
29
29
  "bowser": "^2.11.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/util-user-agent-node",
3
- "version": "3.911.0",
3
+ "version": "3.914.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "node ../../scripts/compilation/inline util-user-agent-node",
@@ -22,10 +22,10 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@aws-sdk/middleware-user-agent": "3.911.0",
26
- "@aws-sdk/types": "3.910.0",
27
- "@smithy/node-config-provider": "^4.3.2",
28
- "@smithy/types": "^4.7.1",
25
+ "@aws-sdk/middleware-user-agent": "3.914.0",
26
+ "@aws-sdk/types": "3.914.0",
27
+ "@smithy/node-config-provider": "^4.3.3",
28
+ "@smithy/types": "^4.8.0",
29
29
  "tslib": "^2.6.2"
30
30
  },
31
31
  "devDependencies": {
@@ -1,9 +1,9 @@
1
1
  {
2
2
  "name": "@aws-sdk/xml-builder",
3
- "version": "3.911.0",
3
+ "version": "3.914.0",
4
4
  "description": "XML builder for the AWS SDK",
5
5
  "dependencies": {
6
- "@smithy/types": "^4.7.1",
6
+ "@smithy/types": "^4.8.0",
7
7
  "fast-xml-parser": "5.2.5",
8
8
  "tslib": "^2.6.2"
9
9
  },
@@ -2,6 +2,7 @@
2
2
 
3
3
  var utilConfigProvider = require('@smithy/util-config-provider');
4
4
  var utilMiddleware = require('@smithy/util-middleware');
5
+ var utilEndpoints = require('@smithy/util-endpoints');
5
6
 
6
7
  const ENV_USE_DUALSTACK_ENDPOINT = "AWS_USE_DUALSTACK_ENDPOINT";
7
8
  const CONFIG_USE_DUALSTACK_ENDPOINT = "use_dualstack_endpoint";
@@ -73,6 +74,16 @@ const NODE_REGION_CONFIG_FILE_OPTIONS = {
73
74
  preferredFile: "credentials",
74
75
  };
75
76
 
77
+ const validRegions = new Set();
78
+ const checkRegion = (region, check = utilEndpoints.isValidHostLabel) => {
79
+ if (!validRegions.has(region) && !check(region)) {
80
+ throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
81
+ }
82
+ else {
83
+ validRegions.add(region);
84
+ }
85
+ };
86
+
76
87
  const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
77
88
 
78
89
  const getRealRegion = (region) => isFipsRegion(region)
@@ -88,11 +99,10 @@ const resolveRegionConfig = (input) => {
88
99
  }
89
100
  return Object.assign(input, {
90
101
  region: async () => {
91
- if (typeof region === "string") {
92
- return getRealRegion(region);
93
- }
94
- const providedRegion = await region();
95
- return getRealRegion(providedRegion);
102
+ const providedRegion = typeof region === "function" ? await region() : region;
103
+ const realRegion = getRealRegion(providedRegion);
104
+ checkRegion(realRegion);
105
+ return realRegion;
96
106
  },
97
107
  useFipsEndpoint: async () => {
98
108
  const providedRegion = typeof region === "string" ? region : await region();
@@ -0,0 +1,10 @@
1
+ import { isValidHostLabel } from "@smithy/util-endpoints";
2
+ const validRegions = new Set();
3
+ export const checkRegion = (region, check = isValidHostLabel) => {
4
+ if (!validRegions.has(region) && !check(region)) {
5
+ throw new Error(`Region not accepted: region="${region}" is not a valid hostname component.`);
6
+ }
7
+ else {
8
+ validRegions.add(region);
9
+ }
10
+ };
@@ -1,3 +1,4 @@
1
+ import { checkRegion } from "./checkRegion";
1
2
  import { getRealRegion } from "./getRealRegion";
2
3
  import { isFipsRegion } from "./isFipsRegion";
3
4
  export const resolveRegionConfig = (input) => {
@@ -7,11 +8,10 @@ export const resolveRegionConfig = (input) => {
7
8
  }
8
9
  return Object.assign(input, {
9
10
  region: async () => {
10
- if (typeof region === "string") {
11
- return getRealRegion(region);
12
- }
13
- const providedRegion = await region();
14
- return getRealRegion(providedRegion);
11
+ const providedRegion = typeof region === "function" ? await region() : region;
12
+ const realRegion = getRealRegion(providedRegion);
13
+ checkRegion(realRegion);
14
+ return realRegion;
15
15
  },
16
16
  useFipsEndpoint: async () => {
17
17
  const providedRegion = typeof region === "string" ? region : await region();
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks whether region can be a host component.
3
+ *
4
+ * @param region - to check.
5
+ * @param check - checking function.
6
+ *
7
+ * @internal
8
+ */
9
+ export declare const checkRegion: (region: string, check?: (value: string, allowSubDomains?: boolean) => boolean) => void;
@@ -0,0 +1,9 @@
1
+ /**
2
+ * Checks whether region can be a host component.
3
+ *
4
+ * @param region - to check.
5
+ * @param check - checking function.
6
+ *
7
+ * @internal
8
+ */
9
+ export declare const checkRegion: (region: string, check?: (value: string, allowSubDomains?: boolean) => boolean) => void;
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/config-resolver",
3
- "version": "4.3.3",
3
+ "version": "4.4.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline config-resolver",
@@ -28,6 +28,7 @@
28
28
  "@smithy/node-config-provider": "^4.3.3",
29
29
  "@smithy/types": "^4.8.0",
30
30
  "@smithy/util-config-provider": "^4.2.0",
31
+ "@smithy/util-endpoints": "^3.2.3",
31
32
  "@smithy/util-middleware": "^4.2.3",
32
33
  "tslib": "^2.6.2"
33
34
  },
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/util-defaults-mode-node",
3
- "version": "4.2.4",
3
+ "version": "4.2.5",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
6
6
  "build:cjs": "node ../../scripts/inline util-defaults-mode-node",
@@ -24,7 +24,7 @@
24
24
  "license": "Apache-2.0",
25
25
  "sideEffects": false,
26
26
  "dependencies": {
27
- "@smithy/config-resolver": "^4.3.3",
27
+ "@smithy/config-resolver": "^4.4.0",
28
28
  "@smithy/credential-provider-imds": "^4.2.3",
29
29
  "@smithy/node-config-provider": "^4.3.3",
30
30
  "@smithy/property-provider": "^4.2.3",
package/package.json CHANGED
@@ -42,7 +42,7 @@
42
42
  "organization": false
43
43
  },
44
44
  "devDependencies": {
45
- "@cdk8s/projen-common": "0.0.630",
45
+ "@cdk8s/projen-common": "0.0.631",
46
46
  "@stylistic/eslint-plugin": "^2",
47
47
  "@types/fs-extra": "^11.0.4",
48
48
  "@types/jest": "^27",
@@ -66,7 +66,7 @@
66
66
  "jsii-docgen": "^10.5.0",
67
67
  "jsii-pacmak": "^1.116.0",
68
68
  "jsii-rosetta": "^5",
69
- "projen": "^0.98.2",
69
+ "projen": "^0.98.3",
70
70
  "ts-jest": "^27",
71
71
  "ts-node": "^10.9.2",
72
72
  "typescript": "^5.9.3"
@@ -77,7 +77,7 @@
77
77
  "constructs": "^10.3.0"
78
78
  },
79
79
  "dependencies": {
80
- "@aws-sdk/client-cloudformation": "^3.913.0"
80
+ "@aws-sdk/client-cloudformation": "^3.914.0"
81
81
  },
82
82
  "bundledDependencies": [
83
83
  "@aws-sdk/client-cloudformation"
@@ -93,7 +93,7 @@
93
93
  "publishConfig": {
94
94
  "access": "public"
95
95
  },
96
- "version": "0.0.393",
96
+ "version": "0.0.394",
97
97
  "jest": {
98
98
  "coverageProvider": "v8",
99
99
  "testMatch": [
@@ -1,12 +0,0 @@
1
- export const REGION_ENV_NAME = "AWS_REGION";
2
- export const REGION_INI_NAME = "region";
3
- export const NODE_REGION_CONFIG_OPTIONS = {
4
- environmentVariableSelector: (env) => env[REGION_ENV_NAME],
5
- configFileSelector: (profile) => profile[REGION_INI_NAME],
6
- default: () => {
7
- throw new Error("Region is missing");
8
- },
9
- };
10
- export const NODE_REGION_CONFIG_FILE_OPTIONS = {
11
- preferredFile: "credentials",
12
- };
@@ -1,6 +0,0 @@
1
- import { isFipsRegion } from "./isFipsRegion";
2
- export const getRealRegion = (region) => isFipsRegion(region)
3
- ? ["fips-aws-global", "aws-fips"].includes(region)
4
- ? "us-east-1"
5
- : region.replace(/fips-(dkr-|prod-)?|-fips/, "")
6
- : region;
@@ -1,2 +0,0 @@
1
- export * from "./config";
2
- export * from "./resolveRegionConfig";
@@ -1 +0,0 @@
1
- export const isFipsRegion = (region) => typeof region === "string" && (region.startsWith("fips-") || region.endsWith("-fips"));
@@ -1,24 +0,0 @@
1
- import { getRealRegion } from "./getRealRegion";
2
- import { isFipsRegion } from "./isFipsRegion";
3
- export const resolveRegionConfig = (input) => {
4
- const { region, useFipsEndpoint } = input;
5
- if (!region) {
6
- throw new Error("Region is missing");
7
- }
8
- return Object.assign(input, {
9
- region: async () => {
10
- if (typeof region === "string") {
11
- return getRealRegion(region);
12
- }
13
- const providedRegion = await region();
14
- return getRealRegion(providedRegion);
15
- },
16
- useFipsEndpoint: async () => {
17
- const providedRegion = typeof region === "string" ? region : await region();
18
- if (isFipsRegion(providedRegion)) {
19
- return true;
20
- }
21
- return typeof useFipsEndpoint !== "function" ? Promise.resolve(!!useFipsEndpoint) : useFipsEndpoint();
22
- },
23
- });
24
- };
@@ -1,17 +0,0 @@
1
- import { LoadedConfigSelectors, LocalConfigOptions } from "@smithy/node-config-provider";
2
- /**
3
- * @internal
4
- */
5
- export declare const REGION_ENV_NAME = "AWS_REGION";
6
- /**
7
- * @internal
8
- */
9
- export declare const REGION_INI_NAME = "region";
10
- /**
11
- * @internal
12
- */
13
- export declare const NODE_REGION_CONFIG_OPTIONS: LoadedConfigSelectors<string>;
14
- /**
15
- * @internal
16
- */
17
- export declare const NODE_REGION_CONFIG_FILE_OPTIONS: LocalConfigOptions;