@aws-sdk/middleware-endpoint-discovery 3.54.1 → 3.58.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/CHANGELOG.md CHANGED
@@ -3,6 +3,33 @@
3
3
  All notable changes to this project will be documented in this file.
4
4
  See [Conventional Commits](https://conventionalcommits.org) for commit guidelines.
5
5
 
6
+ # [3.58.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.57.0...v3.58.0) (2022-03-28)
7
+
8
+ **Note:** Version bump only for package @aws-sdk/middleware-endpoint-discovery
9
+
10
+
11
+
12
+
13
+
14
+ # [3.56.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.55.0...v3.56.0) (2022-03-24)
15
+
16
+ **Note:** Version bump only for package @aws-sdk/middleware-endpoint-discovery
17
+
18
+
19
+
20
+
21
+
22
+ # [3.55.0](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.1...v3.55.0) (2022-03-21)
23
+
24
+
25
+ ### Features
26
+
27
+ * **property-provider:** memoize() supports force refresh ([#3413](https://github.com/aws/aws-sdk-js-v3/issues/3413)) ([a79f962](https://github.com/aws/aws-sdk-js-v3/commit/a79f962873ff11a3d6f98199224155bd2ddc0b1e))
28
+
29
+
30
+
31
+
32
+
6
33
  ## [3.54.1](https://github.com/aws/aws-sdk-js-v3/compare/v3.54.0...v3.54.1) (2022-03-15)
7
34
 
8
35
  **Note:** Version bump only for package @aws-sdk/middleware-endpoint-discovery
@@ -15,13 +15,13 @@ const endpointDiscoveryMiddleware = (config, middlewareConfig) => (next, context
15
15
  const { isDiscoveredEndpointRequired, identifiers } = middlewareConfig;
16
16
  const { clientName, commandName } = context;
17
17
  const isEndpointDiscoveryEnabled = await config.endpointDiscoveryEnabled();
18
- const cacheKey = await getCacheKey_1.getCacheKey(commandName, config, { identifiers });
18
+ const cacheKey = await (0, getCacheKey_1.getCacheKey)(commandName, config, { identifiers });
19
19
  if (isDiscoveredEndpointRequired) {
20
20
  if (isEndpointDiscoveryEnabled === false) {
21
21
  throw new Error(`Endpoint Discovery is disabled but ${commandName} on ${clientName} requires it.` +
22
22
  ` Please check your configurations.`);
23
23
  }
24
- await updateDiscoveredEndpointInCache_1.updateDiscoveredEndpointInCache(config, {
24
+ await (0, updateDiscoveredEndpointInCache_1.updateDiscoveredEndpointInCache)(config, {
25
25
  ...middlewareConfig,
26
26
  commandName,
27
27
  cacheKey,
@@ -29,7 +29,7 @@ const endpointDiscoveryMiddleware = (config, middlewareConfig) => (next, context
29
29
  });
30
30
  }
31
31
  else if (isEndpointDiscoveryEnabled) {
32
- updateDiscoveredEndpointInCache_1.updateDiscoveredEndpointInCache(config, {
32
+ (0, updateDiscoveredEndpointInCache_1.updateDiscoveredEndpointInCache)(config, {
33
33
  ...middlewareConfig,
34
34
  commandName,
35
35
  cacheKey,
@@ -10,19 +10,19 @@ exports.endpointDiscoveryMiddlewareOptions = {
10
10
  };
11
11
  const getEndpointDiscoveryPlugin = (pluginConfig, middlewareConfig) => ({
12
12
  applyToStack: (commandStack) => {
13
- commandStack.add(endpointDiscoveryMiddleware_1.endpointDiscoveryMiddleware(pluginConfig, middlewareConfig), exports.endpointDiscoveryMiddlewareOptions);
13
+ commandStack.add((0, endpointDiscoveryMiddleware_1.endpointDiscoveryMiddleware)(pluginConfig, middlewareConfig), exports.endpointDiscoveryMiddlewareOptions);
14
14
  },
15
15
  });
16
16
  exports.getEndpointDiscoveryPlugin = getEndpointDiscoveryPlugin;
17
17
  const getEndpointDiscoveryRequiredPlugin = (pluginConfig, middlewareConfig) => ({
18
18
  applyToStack: (commandStack) => {
19
- commandStack.add(endpointDiscoveryMiddleware_1.endpointDiscoveryMiddleware(pluginConfig, { ...middlewareConfig, isDiscoveredEndpointRequired: true }), exports.endpointDiscoveryMiddlewareOptions);
19
+ commandStack.add((0, endpointDiscoveryMiddleware_1.endpointDiscoveryMiddleware)(pluginConfig, { ...middlewareConfig, isDiscoveredEndpointRequired: true }), exports.endpointDiscoveryMiddlewareOptions);
20
20
  },
21
21
  });
22
22
  exports.getEndpointDiscoveryRequiredPlugin = getEndpointDiscoveryRequiredPlugin;
23
23
  const getEndpointDiscoveryOptionalPlugin = (pluginConfig, middlewareConfig) => ({
24
24
  applyToStack: (commandStack) => {
25
- commandStack.add(endpointDiscoveryMiddleware_1.endpointDiscoveryMiddleware(pluginConfig, { ...middlewareConfig, isDiscoveredEndpointRequired: false }), exports.endpointDiscoveryMiddlewareOptions);
25
+ commandStack.add((0, endpointDiscoveryMiddleware_1.endpointDiscoveryMiddleware)(pluginConfig, { ...middlewareConfig, isDiscoveredEndpointRequired: false }), exports.endpointDiscoveryMiddlewareOptions);
26
26
  },
27
27
  });
28
28
  exports.getEndpointDiscoveryOptionalPlugin = getEndpointDiscoveryOptionalPlugin;
@@ -23,7 +23,7 @@ const updateDiscoveredEndpointInCache = async (config, options) => new Promise((
23
23
  const placeholderEndpoints = [{ Address: "", CachePeriodInMinutes: 1 }];
24
24
  endpointCache.set(cacheKey, placeholderEndpoints);
25
25
  const command = new options.endpointDiscoveryCommandCtor({
26
- Operation: commandName.substr(0, commandName.length - 7),
26
+ Operation: commandName.slice(0, -7),
27
27
  Identifiers: identifiers,
28
28
  });
29
29
  const handler = command.resolveMiddleware(options.clientStack, config, options.options);
@@ -8,7 +8,7 @@ export var NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS = {
8
8
  if (envKey in env) {
9
9
  var value = env[envKey];
10
10
  if (value === "") {
11
- throw Error("Environment variable " + envKey + " can't be empty of undefined, got \"" + value + "\"");
11
+ throw Error("Environment variable ".concat(envKey, " can't be empty of undefined, got \"").concat(value, "\""));
12
12
  }
13
13
  return !isFalsy(value);
14
14
  }
@@ -18,7 +18,7 @@ export var NODE_ENDPOINT_DISCOVERY_CONFIG_OPTIONS = {
18
18
  if (CONFIG_ENDPOINT_DISCOVERY in profile) {
19
19
  var value = profile[CONFIG_ENDPOINT_DISCOVERY];
20
20
  if (value === undefined) {
21
- throw Error("Shared config entry " + CONFIG_ENDPOINT_DISCOVERY + " can't be undefined, got \"" + value + "\"");
21
+ throw Error("Shared config entry ".concat(CONFIG_ENDPOINT_DISCOVERY, " can't be undefined, got \"").concat(value, "\""));
22
22
  }
23
23
  return !isFalsy(value);
24
24
  }
@@ -26,7 +26,7 @@ export var endpointDiscoveryMiddleware = function (config, middlewareConfig) {
26
26
  cacheKey = _a.sent();
27
27
  if (!isDiscoveredEndpointRequired) return [3, 4];
28
28
  if (isEndpointDiscoveryEnabled === false) {
29
- throw new Error("Endpoint Discovery is disabled but " + commandName + " on " + clientName + " requires it." +
29
+ throw new Error("Endpoint Discovery is disabled but ".concat(commandName, " on ").concat(clientName, " requires it.") +
30
30
  " Please check your configurations.");
31
31
  }
32
32
  return [4, updateDiscoveredEndpointInCache(config, __assign(__assign({}, middlewareConfig), { commandName: commandName, cacheKey: cacheKey, endpointDiscoveryCommandCtor: endpointDiscoveryCommandCtor }))];
@@ -23,7 +23,7 @@ export var updateDiscoveredEndpointInCache = function (config, options) { return
23
23
  var placeholderEndpoints_1 = [{ Address: "", CachePeriodInMinutes: 1 }];
24
24
  endpointCache.set(cacheKey, placeholderEndpoints_1);
25
25
  var command = new options.endpointDiscoveryCommandCtor({
26
- Operation: commandName.substr(0, commandName.length - 7),
26
+ Operation: commandName.slice(0, -7),
27
27
  Identifiers: identifiers,
28
28
  });
29
29
  var handler = command.resolveMiddleware(options.clientStack, config, options.options);
@@ -1,10 +1,10 @@
1
1
  import { EndpointCache } from "@aws-sdk/endpoint-cache";
2
- import { Credentials, Provider } from "@aws-sdk/types";
2
+ import { Credentials, MemoizedProvider, Provider } from "@aws-sdk/types";
3
3
  export interface EndpointDiscoveryInputConfig {
4
4
  }
5
5
  export interface PreviouslyResolved {
6
6
  isCustomEndpoint: boolean;
7
- credentials: Provider<Credentials>;
7
+ credentials: MemoizedProvider<Credentials>;
8
8
  endpointDiscoveryEnabledProvider: Provider<boolean | undefined>;
9
9
  }
10
10
  export interface EndpointDiscoveryInputConfig {
@@ -1,10 +1,10 @@
1
1
  import { EndpointCache } from "@aws-sdk/endpoint-cache";
2
- import { Credentials, Provider } from "@aws-sdk/types";
2
+ import { Credentials, MemoizedProvider, Provider } from "@aws-sdk/types";
3
3
  export interface EndpointDiscoveryInputConfig {
4
4
  }
5
5
  export interface PreviouslyResolved {
6
6
  isCustomEndpoint: boolean;
7
- credentials: Provider<Credentials>;
7
+ credentials: MemoizedProvider<Credentials>;
8
8
  endpointDiscoveryEnabledProvider: Provider<boolean | undefined>;
9
9
  }
10
10
  export interface EndpointDiscoveryInputConfig {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-endpoint-discovery",
3
- "version": "3.54.1",
3
+ "version": "3.58.0",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types'",
6
6
  "build:cjs": "tsc -p tsconfig.cjs.json",
@@ -19,20 +19,20 @@
19
19
  },
20
20
  "license": "Apache-2.0",
21
21
  "devDependencies": {
22
- "@aws-sdk/node-config-provider": "3.54.1",
22
+ "@aws-sdk/node-config-provider": "3.58.0",
23
23
  "@tsconfig/recommended": "1.0.1",
24
24
  "concurrently": "7.0.0",
25
25
  "downlevel-dts": "0.7.0",
26
26
  "rimraf": "3.0.2",
27
27
  "typedoc": "0.19.2",
28
- "typescript": "~4.3.5"
28
+ "typescript": "~4.6.2"
29
29
  },
30
30
  "dependencies": {
31
- "@aws-sdk/config-resolver": "3.54.1",
32
- "@aws-sdk/endpoint-cache": "3.52.0",
33
- "@aws-sdk/protocol-http": "3.54.1",
34
- "@aws-sdk/types": "3.54.1",
35
- "tslib": "^2.3.0"
31
+ "@aws-sdk/config-resolver": "3.58.0",
32
+ "@aws-sdk/endpoint-cache": "3.55.0",
33
+ "@aws-sdk/protocol-http": "3.58.0",
34
+ "@aws-sdk/types": "3.55.0",
35
+ "tslib": "^2.3.1"
36
36
  },
37
37
  "engines": {
38
38
  "node": ">= 12.0.0"