@aws-sdk/middleware-endpoint-discovery 3.972.18 → 3.972.20

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/index.js CHANGED
@@ -1,7 +1,5 @@
1
- 'use strict';
2
-
3
- var protocols = require('@smithy/core/protocols');
4
- var endpointCache = require('@aws-sdk/endpoint-cache');
1
+ const { HttpRequest } = require("@smithy/core/protocols");
2
+ const { EndpointCache } = require("@aws-sdk/endpoint-cache");
5
3
 
6
4
  const ENV_ENDPOINT_DISCOVERY = ["AWS_ENABLE_ENDPOINT_DISCOVERY", "AWS_ENDPOINT_DISCOVERY_ENABLED"];
7
5
  const CONFIG_ENDPOINT_DISCOVERY = "endpoint_discovery_enabled";
@@ -137,7 +135,7 @@ const endpointDiscoveryMiddleware = (config, middlewareConfig) => (next, context
137
135
  });
138
136
  }
139
137
  const { request } = args;
140
- if (cacheKey && protocols.HttpRequest.isInstance(request)) {
138
+ if (cacheKey && HttpRequest.isInstance(request)) {
141
139
  const endpoint = config.endpointCache.getEndpoint(cacheKey);
142
140
  if (endpoint) {
143
141
  request.hostname = endpoint;
@@ -172,7 +170,7 @@ const resolveEndpointDiscoveryConfig = (input, { endpointDiscoveryCommandCtor })
172
170
  const { endpointCacheSize, endpointDiscoveryEnabled, endpointDiscoveryEnabledProvider } = input;
173
171
  return Object.assign(input, {
174
172
  endpointDiscoveryCommandCtor,
175
- endpointCache: new endpointCache.EndpointCache(endpointCacheSize ?? 1000),
173
+ endpointCache: new EndpointCache(endpointCacheSize ?? 1000),
176
174
  endpointDiscoveryEnabled: endpointDiscoveryEnabled !== undefined
177
175
  ? () => Promise.resolve(endpointDiscoveryEnabled)
178
176
  : endpointDiscoveryEnabledProvider,
package/package.json CHANGED
@@ -1,14 +1,14 @@
1
1
  {
2
2
  "name": "@aws-sdk/middleware-endpoint-discovery",
3
- "version": "3.972.18",
3
+ "version": "3.972.20",
4
4
  "scripts": {
5
5
  "build": "concurrently 'yarn:build:types' 'yarn:build:es' && yarn build:cjs",
6
6
  "build:cjs": "node ../../scripts/compilation/inline",
7
- "build:es": "tsc -p tsconfig.es.json",
7
+ "build:es": "premove dist-es && tsc -p tsconfig.es.json",
8
8
  "build:include:deps": "yarn g:turbo run build -F=\"$npm_package_name\"",
9
- "build:types": "tsc -p tsconfig.types.json",
9
+ "build:types": "premove dist-types && tsc -p tsconfig.types.json",
10
10
  "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
11
- "clean": "premove dist-cjs dist-es dist-types tsconfig.cjs.tsbuildinfo tsconfig.es.tsbuildinfo tsconfig.types.tsbuildinfo",
11
+ "clean": "premove dist-cjs dist-es dist-types",
12
12
  "extract:docs": "api-extractor run --local",
13
13
  "test": "yarn g:vitest run",
14
14
  "test:watch": "yarn g:vitest watch"
@@ -30,10 +30,10 @@
30
30
  "typescript": "~5.8.3"
31
31
  },
32
32
  "dependencies": {
33
- "@aws-sdk/endpoint-cache": "^3.972.7",
34
- "@aws-sdk/types": "^3.973.12",
35
- "@smithy/core": "^3.24.6",
36
- "@smithy/types": "^4.14.3",
33
+ "@aws-sdk/endpoint-cache": "^3.972.8",
34
+ "@aws-sdk/types": "^3.973.14",
35
+ "@smithy/core": "^3.27.0",
36
+ "@smithy/types": "^4.15.0",
37
37
  "tslib": "^2.6.2"
38
38
  },
39
39
  "engines": {