@cdk8s/awscdk-resolver 0.0.119 → 0.0.121

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 (66) hide show
  1. package/.jsii +4 -4
  2. package/lib/resolve.js +1 -1
  3. package/node_modules/@aws-sdk/client-cloudformation/package.json +4 -4
  4. package/node_modules/@aws-sdk/client-sso-oidc/package.json +3 -3
  5. package/node_modules/@aws-sdk/client-sts/package.json +3 -3
  6. package/node_modules/@aws-sdk/credential-provider-node/README.md +3 -3
  7. package/node_modules/@aws-sdk/credential-provider-node/package.json +1 -1
  8. package/node_modules/@smithy/abort-controller/dist-types/AbortController.d.ts +7 -4
  9. package/node_modules/@smithy/abort-controller/dist-types/AbortSignal.d.ts +6 -3
  10. package/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortController.d.ts +7 -4
  11. package/node_modules/@smithy/abort-controller/dist-types/ts3.4/AbortSignal.d.ts +6 -3
  12. package/node_modules/@smithy/abort-controller/package.json +3 -3
  13. package/node_modules/@smithy/config-resolver/package.json +5 -5
  14. package/node_modules/@smithy/core/package.json +9 -9
  15. package/node_modules/@smithy/credential-provider-imds/package.json +6 -6
  16. package/node_modules/@smithy/fetch-http-handler/dist-cjs/index.js +13 -3
  17. package/node_modules/@smithy/fetch-http-handler/dist-es/fetch-http-handler.js +11 -2
  18. package/node_modules/@smithy/fetch-http-handler/dist-types/fetch-http-handler.d.ts +1 -1
  19. package/node_modules/@smithy/fetch-http-handler/dist-types/ts3.4/fetch-http-handler.d.ts +1 -1
  20. package/node_modules/@smithy/fetch-http-handler/package.json +6 -6
  21. package/node_modules/@smithy/hash-node/package.json +3 -3
  22. package/node_modules/@smithy/invalid-dependency/package.json +3 -3
  23. package/node_modules/@smithy/middleware-content-length/package.json +5 -5
  24. package/node_modules/@smithy/middleware-endpoint/package.json +8 -8
  25. package/node_modules/@smithy/middleware-retry/package.json +10 -10
  26. package/node_modules/@smithy/middleware-serde/package.json +4 -4
  27. package/node_modules/@smithy/middleware-stack/package.json +3 -3
  28. package/node_modules/@smithy/node-config-provider/package.json +5 -5
  29. package/node_modules/@smithy/node-http-handler/dist-cjs/index.js +36 -15
  30. package/node_modules/@smithy/node-http-handler/dist-es/node-http-handler.js +19 -6
  31. package/node_modules/@smithy/node-http-handler/dist-es/node-http2-handler.js +7 -1
  32. package/node_modules/@smithy/node-http-handler/dist-types/node-http-handler.d.ts +4 -2
  33. package/node_modules/@smithy/node-http-handler/dist-types/ts3.4/node-http-handler.d.ts +4 -2
  34. package/node_modules/@smithy/node-http-handler/package.json +6 -6
  35. package/node_modules/@smithy/property-provider/package.json +3 -3
  36. package/node_modules/@smithy/protocol-http/package.json +3 -3
  37. package/node_modules/@smithy/querystring-builder/package.json +3 -3
  38. package/node_modules/@smithy/querystring-parser/package.json +3 -3
  39. package/node_modules/@smithy/service-error-classification/package.json +3 -3
  40. package/node_modules/@smithy/shared-ini-file-loader/package.json +3 -3
  41. package/node_modules/@smithy/signature-v4/package.json +5 -5
  42. package/node_modules/@smithy/smithy-client/package.json +7 -7
  43. package/node_modules/@smithy/types/dist-cjs/abort-handler.js +1 -0
  44. package/node_modules/@smithy/types/dist-es/abort-handler.js +1 -0
  45. package/node_modules/@smithy/types/dist-types/abort-handler.d.ts +7 -0
  46. package/node_modules/@smithy/types/dist-types/abort.d.ts +4 -3
  47. package/node_modules/@smithy/types/dist-types/http/httpHandlerInitialization.d.ts +5 -0
  48. package/node_modules/@smithy/types/dist-types/http.d.ts +2 -2
  49. package/node_modules/@smithy/types/dist-types/ts3.4/abort-handler.d.ts +7 -0
  50. package/node_modules/@smithy/types/dist-types/ts3.4/abort.d.ts +4 -3
  51. package/node_modules/@smithy/types/dist-types/ts3.4/http/httpHandlerInitialization.d.ts +5 -0
  52. package/node_modules/@smithy/types/dist-types/ts3.4/http.d.ts +2 -2
  53. package/node_modules/@smithy/types/dist-types/ts3.4/waiter.d.ts +3 -3
  54. package/node_modules/@smithy/types/dist-types/waiter.d.ts +3 -3
  55. package/node_modules/@smithy/types/package.json +1 -1
  56. package/node_modules/@smithy/url-parser/package.json +4 -4
  57. package/node_modules/@smithy/util-defaults-mode-browser/package.json +5 -5
  58. package/node_modules/@smithy/util-defaults-mode-node/package.json +8 -8
  59. package/node_modules/@smithy/util-endpoints/package.json +4 -4
  60. package/node_modules/@smithy/util-middleware/package.json +3 -3
  61. package/node_modules/@smithy/util-retry/package.json +4 -4
  62. package/node_modules/@smithy/util-stream/package.json +6 -6
  63. package/node_modules/@smithy/util-waiter/dist-cjs/index.js +6 -1
  64. package/node_modules/@smithy/util-waiter/dist-es/createWaiter.js +7 -1
  65. package/node_modules/@smithy/util-waiter/package.json +4 -4
  66. package/package.json +5 -5
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/middleware-retry",
3
- "version": "3.0.4",
3
+ "version": "3.0.6",
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 middleware-retry",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -31,18 +31,18 @@
31
31
  },
32
32
  "license": "Apache-2.0",
33
33
  "dependencies": {
34
- "@smithy/node-config-provider": "^3.1.1",
35
- "@smithy/protocol-http": "^4.0.1",
36
- "@smithy/service-error-classification": "^3.0.1",
37
- "@smithy/smithy-client": "^3.1.2",
38
- "@smithy/types": "^3.1.0",
39
- "@smithy/util-middleware": "^3.0.1",
40
- "@smithy/util-retry": "^3.0.1",
34
+ "@smithy/node-config-provider": "^3.1.2",
35
+ "@smithy/protocol-http": "^4.0.2",
36
+ "@smithy/service-error-classification": "^3.0.2",
37
+ "@smithy/smithy-client": "^3.1.4",
38
+ "@smithy/types": "^3.2.0",
39
+ "@smithy/util-middleware": "^3.0.2",
40
+ "@smithy/util-retry": "^3.0.2",
41
41
  "tslib": "^2.6.2",
42
42
  "uuid": "^9.0.1"
43
43
  },
44
44
  "devDependencies": {
45
- "@smithy/util-test": "^0.2.2",
45
+ "@smithy/util-test": "^0.2.3",
46
46
  "@types/uuid": "^8.3.0",
47
47
  "concurrently": "7.0.0",
48
48
  "downlevel-dts": "0.10.1",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/middleware-serde",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
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 middleware-serde",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/types": "^3.1.0",
26
+ "@smithy/types": "^3.2.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
29
29
  "engines": {
@@ -46,7 +46,7 @@
46
46
  "directory": "packages/middleware-serde"
47
47
  },
48
48
  "devDependencies": {
49
- "@smithy/util-test": "^0.2.2",
49
+ "@smithy/util-test": "^0.2.3",
50
50
  "concurrently": "7.0.0",
51
51
  "downlevel-dts": "0.10.1",
52
52
  "rimraf": "3.0.2",
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@smithy/middleware-stack",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
4
4
  "description": "Provides a means for composing multiple middleware functions into a single handler",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
7
7
  "build:cjs": "node ../../scripts/inline middleware-stack",
8
8
  "build:es": "yarn g:tsc -p tsconfig.es.json",
9
9
  "build:types": "yarn g:tsc -p tsconfig.types.json",
10
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
10
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
11
11
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
12
12
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
13
13
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -25,7 +25,7 @@
25
25
  "module": "./dist-es/index.js",
26
26
  "types": "./dist-types/index.d.ts",
27
27
  "dependencies": {
28
- "@smithy/types": "^3.1.0",
28
+ "@smithy/types": "^3.2.0",
29
29
  "tslib": "^2.6.2"
30
30
  },
31
31
  "devDependencies": {
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@smithy/node-config-provider",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "description": "Load config default values from ini config files and environmental variable",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
7
7
  "build:cjs": "node ../../scripts/inline node-config-provider",
8
8
  "build:es": "yarn g:tsc -p tsconfig.es.json",
9
9
  "build:types": "yarn g:tsc -p tsconfig.types.json",
10
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
10
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
11
11
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
12
12
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
13
13
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -24,9 +24,9 @@
24
24
  "module": "./dist-es/index.js",
25
25
  "types": "./dist-types/index.d.ts",
26
26
  "dependencies": {
27
- "@smithy/property-provider": "^3.1.1",
28
- "@smithy/shared-ini-file-loader": "^3.1.1",
29
- "@smithy/types": "^3.1.0",
27
+ "@smithy/property-provider": "^3.1.2",
28
+ "@smithy/shared-ini-file-loader": "^3.1.2",
29
+ "@smithy/types": "^3.2.0",
30
30
  "tslib": "^2.6.2"
31
31
  },
32
32
  "devDependencies": {
@@ -182,10 +182,12 @@ var _NodeHttpHandler = class _NodeHttpHandler {
182
182
  * @internal
183
183
  *
184
184
  * @param agent - http(s) agent in use by the NodeHttpHandler instance.
185
+ * @param socketWarningTimestamp - last socket usage check timestamp.
186
+ * @param logger - channel for the warning.
185
187
  * @returns timestamp of last emitted warning.
186
188
  */
187
- static checkSocketUsage(agent, socketWarningTimestamp) {
188
- var _a, _b;
189
+ static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {
190
+ var _a, _b, _c;
189
191
  const { sockets, requests, maxSockets } = agent;
190
192
  if (typeof maxSockets !== "number" || maxSockets === Infinity) {
191
193
  return socketWarningTimestamp;
@@ -199,11 +201,11 @@ var _NodeHttpHandler = class _NodeHttpHandler {
199
201
  const socketsInUse = ((_a = sockets[origin]) == null ? void 0 : _a.length) ?? 0;
200
202
  const requestsEnqueued = ((_b = requests[origin]) == null ? void 0 : _b.length) ?? 0;
201
203
  if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
202
- console.warn(
203
- "@smithy/node-http-handler:WARN",
204
- `socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.`,
205
- "See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html",
206
- "or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config."
204
+ (_c = logger == null ? void 0 : logger.warn) == null ? void 0 : _c.call(
205
+ logger,
206
+ `@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
207
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
208
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`
207
209
  );
208
210
  return Date.now();
209
211
  }
@@ -229,7 +231,8 @@ var _NodeHttpHandler = class _NodeHttpHandler {
229
231
  return httpsAgent;
230
232
  }
231
233
  return new import_https.Agent({ keepAlive, maxSockets, ...httpsAgent });
232
- })()
234
+ })(),
235
+ logger: console
233
236
  };
234
237
  }
235
238
  destroy() {
@@ -251,6 +254,7 @@ var _NodeHttpHandler = class _NodeHttpHandler {
251
254
  }, "resolve");
252
255
  const reject = /* @__PURE__ */ __name(async (arg) => {
253
256
  await writeRequestBodyPromise;
257
+ clearTimeout(socketCheckTimeoutId);
254
258
  _reject(arg);
255
259
  }, "reject");
256
260
  if (!this.config) {
@@ -266,7 +270,11 @@ var _NodeHttpHandler = class _NodeHttpHandler {
266
270
  const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;
267
271
  socketCheckTimeoutId = setTimeout(
268
272
  () => {
269
- this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp);
273
+ this.socketWarningTimestamp = _NodeHttpHandler.checkSocketUsage(
274
+ agent,
275
+ this.socketWarningTimestamp,
276
+ this.config.logger
277
+ );
270
278
  },
271
279
  this.config.socketAcquisitionWarningTimeout ?? (this.config.requestTimeout ?? 2e3) + (this.config.connectionTimeout ?? 1e3)
272
280
  );
@@ -313,12 +321,17 @@ var _NodeHttpHandler = class _NodeHttpHandler {
313
321
  setConnectionTimeout(req, reject, this.config.connectionTimeout);
314
322
  setSocketTimeout(req, reject, this.config.requestTimeout);
315
323
  if (abortSignal) {
316
- abortSignal.onabort = () => {
317
- req.abort();
324
+ const onAbort = /* @__PURE__ */ __name(() => {
325
+ req.destroy();
318
326
  const abortError = new Error("Request aborted");
319
327
  abortError.name = "AbortError";
320
328
  reject(abortError);
321
- };
329
+ }, "onAbort");
330
+ if (typeof abortSignal.addEventListener === "function") {
331
+ abortSignal.addEventListener("abort", onAbort);
332
+ } else {
333
+ abortSignal.onabort = onAbort;
334
+ }
322
335
  }
323
336
  const httpAgent = nodeHttpsOptions.agent;
324
337
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
@@ -329,7 +342,10 @@ var _NodeHttpHandler = class _NodeHttpHandler {
329
342
  keepAliveMsecs: httpAgent.keepAliveMsecs
330
343
  });
331
344
  }
332
- writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject);
345
+ writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {
346
+ clearTimeout(socketCheckTimeoutId);
347
+ return _reject(e);
348
+ });
333
349
  });
334
350
  }
335
351
  updateHttpClientConfig(key, value) {
@@ -597,12 +613,17 @@ var _NodeHttp2Handler = class _NodeHttp2Handler {
597
613
  });
598
614
  }
599
615
  if (abortSignal) {
600
- abortSignal.onabort = () => {
616
+ const onAbort = /* @__PURE__ */ __name(() => {
601
617
  req.close();
602
618
  const abortError = new Error("Request aborted");
603
619
  abortError.name = "AbortError";
604
620
  rejectWithDestroy(abortError);
605
- };
621
+ }, "onAbort");
622
+ if (typeof abortSignal.addEventListener === "function") {
623
+ abortSignal.addEventListener("abort", onAbort);
624
+ } else {
625
+ abortSignal.onabort = onAbort;
626
+ }
606
627
  }
607
628
  req.on("frameError", (type, code, id) => {
608
629
  rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
@@ -16,7 +16,7 @@ export class NodeHttpHandler {
16
16
  }
17
17
  return new NodeHttpHandler(instanceOrOptions);
18
18
  }
19
- static checkSocketUsage(agent, socketWarningTimestamp) {
19
+ static checkSocketUsage(agent, socketWarningTimestamp, logger = console) {
20
20
  const { sockets, requests, maxSockets } = agent;
21
21
  if (typeof maxSockets !== "number" || maxSockets === Infinity) {
22
22
  return socketWarningTimestamp;
@@ -30,7 +30,9 @@ export class NodeHttpHandler {
30
30
  const socketsInUse = sockets[origin]?.length ?? 0;
31
31
  const requestsEnqueued = requests[origin]?.length ?? 0;
32
32
  if (socketsInUse >= maxSockets && requestsEnqueued >= 2 * maxSockets) {
33
- console.warn("@smithy/node-http-handler:WARN", `socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.`, "See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html", "or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.");
33
+ logger?.warn?.(`@smithy/node-http-handler:WARN - socket usage at capacity=${socketsInUse} and ${requestsEnqueued} additional requests are enqueued.
34
+ See https://docs.aws.amazon.com/sdk-for-javascript/v3/developer-guide/node-configuring-maxsockets.html
35
+ or increase socketAcquisitionWarningTimeout=(millis) in the NodeHttpHandler config.`);
34
36
  return Date.now();
35
37
  }
36
38
  }
@@ -72,6 +74,7 @@ export class NodeHttpHandler {
72
74
  }
73
75
  return new hsAgent({ keepAlive, maxSockets, ...httpsAgent });
74
76
  })(),
77
+ logger: console,
75
78
  };
76
79
  }
77
80
  destroy() {
@@ -92,6 +95,7 @@ export class NodeHttpHandler {
92
95
  };
93
96
  const reject = async (arg) => {
94
97
  await writeRequestBodyPromise;
98
+ clearTimeout(socketCheckTimeoutId);
95
99
  _reject(arg);
96
100
  };
97
101
  if (!this.config) {
@@ -106,7 +110,7 @@ export class NodeHttpHandler {
106
110
  const isSSL = request.protocol === "https:";
107
111
  const agent = isSSL ? this.config.httpsAgent : this.config.httpAgent;
108
112
  socketCheckTimeoutId = setTimeout(() => {
109
- this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp);
113
+ this.socketWarningTimestamp = NodeHttpHandler.checkSocketUsage(agent, this.socketWarningTimestamp, this.config.logger);
110
114
  }, this.config.socketAcquisitionWarningTimeout ??
111
115
  (this.config.requestTimeout ?? 2000) + (this.config.connectionTimeout ?? 1000));
112
116
  const queryString = buildQueryString(request.query || {});
@@ -153,12 +157,18 @@ export class NodeHttpHandler {
153
157
  setConnectionTimeout(req, reject, this.config.connectionTimeout);
154
158
  setSocketTimeout(req, reject, this.config.requestTimeout);
155
159
  if (abortSignal) {
156
- abortSignal.onabort = () => {
157
- req.abort();
160
+ const onAbort = () => {
161
+ req.destroy();
158
162
  const abortError = new Error("Request aborted");
159
163
  abortError.name = "AbortError";
160
164
  reject(abortError);
161
165
  };
166
+ if (typeof abortSignal.addEventListener === "function") {
167
+ abortSignal.addEventListener("abort", onAbort);
168
+ }
169
+ else {
170
+ abortSignal.onabort = onAbort;
171
+ }
162
172
  }
163
173
  const httpAgent = nodeHttpsOptions.agent;
164
174
  if (typeof httpAgent === "object" && "keepAlive" in httpAgent) {
@@ -167,7 +177,10 @@ export class NodeHttpHandler {
167
177
  keepAliveMsecs: httpAgent.keepAliveMsecs,
168
178
  });
169
179
  }
170
- writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch(_reject);
180
+ writeRequestBodyPromise = writeRequestBody(req, request, this.config.requestTimeout).catch((e) => {
181
+ clearTimeout(socketCheckTimeoutId);
182
+ return _reject(e);
183
+ });
171
184
  });
172
185
  }
173
186
  updateHttpClientConfig(key, value) {
@@ -113,12 +113,18 @@ export class NodeHttp2Handler {
113
113
  });
114
114
  }
115
115
  if (abortSignal) {
116
- abortSignal.onabort = () => {
116
+ const onAbort = () => {
117
117
  req.close();
118
118
  const abortError = new Error("Request aborted");
119
119
  abortError.name = "AbortError";
120
120
  rejectWithDestroy(abortError);
121
121
  };
122
+ if (typeof abortSignal.addEventListener === "function") {
123
+ abortSignal.addEventListener("abort", onAbort);
124
+ }
125
+ else {
126
+ abortSignal.onabort = onAbort;
127
+ }
122
128
  }
123
129
  req.on("frameError", (type, code, id) => {
124
130
  rejectWithDestroy(new Error(`Frame type id ${type} in stream id ${id} has failed with code ${code}.`));
@@ -1,7 +1,7 @@
1
1
  /// <reference types="node" />
2
2
  /// <reference types="node" />
3
3
  import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http";
4
- import type { NodeHttpHandlerOptions } from "@smithy/types";
4
+ import type { Logger, NodeHttpHandlerOptions } from "@smithy/types";
5
5
  import { HttpHandlerOptions, Provider } from "@smithy/types";
6
6
  import { Agent as hAgent } from "http";
7
7
  import { Agent as hsAgent } from "https";
@@ -23,9 +23,11 @@ export declare class NodeHttpHandler implements HttpHandler<NodeHttpHandlerOptio
23
23
  * @internal
24
24
  *
25
25
  * @param agent - http(s) agent in use by the NodeHttpHandler instance.
26
+ * @param socketWarningTimestamp - last socket usage check timestamp.
27
+ * @param logger - channel for the warning.
26
28
  * @returns timestamp of last emitted warning.
27
29
  */
28
- static checkSocketUsage(agent: hAgent | hsAgent, socketWarningTimestamp: number): number;
30
+ static checkSocketUsage(agent: hAgent | hsAgent, socketWarningTimestamp: number, logger?: Logger): number;
29
31
  constructor(options?: NodeHttpHandlerOptions | Provider<NodeHttpHandlerOptions | void>);
30
32
  private resolveDefaultConfig;
31
33
  destroy(): void;
@@ -1,6 +1,6 @@
1
1
  /// <reference types="node" />
2
2
  import { HttpHandler, HttpRequest, HttpResponse } from "@smithy/protocol-http";
3
- import { NodeHttpHandlerOptions } from "@smithy/types";
3
+ import { Logger, NodeHttpHandlerOptions } from "@smithy/types";
4
4
  import { HttpHandlerOptions, Provider } from "@smithy/types";
5
5
  import { Agent as hAgent } from "http";
6
6
  import { Agent as hsAgent } from "https";
@@ -22,9 +22,11 @@ export declare class NodeHttpHandler implements HttpHandler<NodeHttpHandlerOptio
22
22
  * @internal
23
23
  *
24
24
  * @param agent - http(s) agent in use by the NodeHttpHandler instance.
25
+ * @param socketWarningTimestamp - last socket usage check timestamp.
26
+ * @param logger - channel for the warning.
25
27
  * @returns timestamp of last emitted warning.
26
28
  */
27
- static checkSocketUsage(agent: hAgent | hsAgent, socketWarningTimestamp: number): number;
29
+ static checkSocketUsage(agent: hAgent | hsAgent, socketWarningTimestamp: number, logger?: Logger): number;
28
30
  constructor(options?: NodeHttpHandlerOptions | Provider<NodeHttpHandlerOptions | void>);
29
31
  private resolveDefaultConfig;
30
32
  destroy(): void;
@@ -1,13 +1,13 @@
1
1
  {
2
2
  "name": "@smithy/node-http-handler",
3
- "version": "3.0.1",
3
+ "version": "3.1.0",
4
4
  "description": "Provides a way to make requests",
5
5
  "scripts": {
6
6
  "build": "concurrently 'yarn:build:cjs' 'yarn:build:es' 'yarn:build:types && yarn build:types:downlevel'",
7
7
  "build:cjs": "node ../../scripts/inline node-http-handler",
8
8
  "build:es": "yarn g:tsc -p tsconfig.es.json",
9
9
  "build:types": "yarn g:tsc -p tsconfig.types.json",
10
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
10
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
11
11
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
12
12
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
13
13
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -25,10 +25,10 @@
25
25
  "module": "./dist-es/index.js",
26
26
  "types": "./dist-types/index.d.ts",
27
27
  "dependencies": {
28
- "@smithy/abort-controller": "^3.0.1",
29
- "@smithy/protocol-http": "^4.0.1",
30
- "@smithy/querystring-builder": "^3.0.1",
31
- "@smithy/types": "^3.1.0",
28
+ "@smithy/abort-controller": "^3.1.0",
29
+ "@smithy/protocol-http": "^4.0.2",
30
+ "@smithy/querystring-builder": "^3.0.2",
31
+ "@smithy/types": "^3.2.0",
32
32
  "tslib": "^2.6.2"
33
33
  },
34
34
  "devDependencies": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/property-provider",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
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 property-provider",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/types": "^3.1.0",
25
+ "@smithy/types": "^3.2.0",
26
26
  "tslib": "^2.6.2"
27
27
  },
28
28
  "engines": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/protocol-http",
3
- "version": "4.0.1",
3
+ "version": "4.0.2",
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 protocol-http",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -23,7 +23,7 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/types": "^3.1.0",
26
+ "@smithy/types": "^3.2.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
29
29
  "engines": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/querystring-builder",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
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 querystring-builder",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/types": "^3.1.0",
25
+ "@smithy/types": "^3.2.0",
26
26
  "@smithy/util-uri-escape": "^3.0.0",
27
27
  "tslib": "^2.6.2"
28
28
  },
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/querystring-parser",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
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 querystring-parser",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -22,7 +22,7 @@
22
22
  },
23
23
  "license": "Apache-2.0",
24
24
  "dependencies": {
25
- "@smithy/types": "^3.1.0",
25
+ "@smithy/types": "^3.2.0",
26
26
  "tslib": "^2.6.2"
27
27
  },
28
28
  "engines": {
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/service-error-classification",
3
- "version": "3.0.1",
3
+ "version": "3.0.2",
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 service-error-classification",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -53,6 +53,6 @@
53
53
  "directory": ".release/package"
54
54
  },
55
55
  "dependencies": {
56
- "@smithy/types": "^3.1.0"
56
+ "@smithy/types": "^3.2.0"
57
57
  }
58
58
  }
@@ -1,8 +1,8 @@
1
1
  {
2
2
  "name": "@smithy/shared-ini-file-loader",
3
- "version": "3.1.1",
3
+ "version": "3.1.2",
4
4
  "dependencies": {
5
- "@smithy/types": "^3.1.0",
5
+ "@smithy/types": "^3.2.0",
6
6
  "tslib": "^2.6.2"
7
7
  },
8
8
  "devDependencies": {
@@ -17,7 +17,7 @@
17
17
  "build:cjs": "node ../../scripts/inline shared-ini-file-loader",
18
18
  "build:es": "yarn g:tsc -p tsconfig.es.json",
19
19
  "build:types": "yarn g:tsc -p tsconfig.types.json",
20
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
20
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
21
21
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
22
22
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
23
23
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@smithy/signature-v4",
3
- "version": "3.1.0",
3
+ "version": "3.1.1",
4
4
  "description": "A standalone implementation of the AWS Signature V4 request signing algorithm",
5
5
  "main": "./dist-cjs/index.js",
6
6
  "module": "./dist-es/index.js",
@@ -10,7 +10,7 @@
10
10
  "build:cjs": "node ../../scripts/inline signature-v4",
11
11
  "build:es": "yarn g:tsc -p tsconfig.es.json",
12
12
  "build:types": "yarn g:tsc -p tsconfig.types.json",
13
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
13
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
14
14
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
15
15
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
16
16
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -25,16 +25,16 @@
25
25
  "license": "Apache-2.0",
26
26
  "dependencies": {
27
27
  "@smithy/is-array-buffer": "^3.0.0",
28
- "@smithy/types": "^3.1.0",
28
+ "@smithy/types": "^3.2.0",
29
29
  "@smithy/util-hex-encoding": "^3.0.0",
30
- "@smithy/util-middleware": "^3.0.1",
30
+ "@smithy/util-middleware": "^3.0.2",
31
31
  "@smithy/util-uri-escape": "^3.0.0",
32
32
  "@smithy/util-utf8": "^3.0.0",
33
33
  "tslib": "^2.6.2"
34
34
  },
35
35
  "devDependencies": {
36
36
  "@aws-crypto/sha256-js": "5.2.0",
37
- "@smithy/protocol-http": "^4.0.1",
37
+ "@smithy/protocol-http": "^4.0.2",
38
38
  "concurrently": "7.0.0",
39
39
  "downlevel-dts": "0.10.1",
40
40
  "rimraf": "3.0.2",
@@ -1,12 +1,12 @@
1
1
  {
2
2
  "name": "@smithy/smithy-client",
3
- "version": "3.1.2",
3
+ "version": "3.1.4",
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 smithy-client",
7
7
  "build:es": "yarn g:tsc -p tsconfig.es.json",
8
8
  "build:types": "yarn g:tsc -p tsconfig.types.json",
9
- "build:types:downlevel": "downlevel-dts dist-types dist-types/ts3.4",
9
+ "build:types:downlevel": "rimraf dist-types/ts3.4 && downlevel-dts dist-types dist-types/ts3.4",
10
10
  "stage-release": "rimraf ./.release && yarn pack && mkdir ./.release && tar zxvf ./package.tgz --directory ./.release && rm ./package.tgz",
11
11
  "clean": "rimraf ./dist-* && rimraf *.tsbuildinfo || exit 0",
12
12
  "lint": "eslint -c ../../.eslintrc.js \"src/**/*.ts\"",
@@ -23,11 +23,11 @@
23
23
  },
24
24
  "license": "Apache-2.0",
25
25
  "dependencies": {
26
- "@smithy/middleware-endpoint": "^3.0.2",
27
- "@smithy/middleware-stack": "^3.0.1",
28
- "@smithy/protocol-http": "^4.0.1",
29
- "@smithy/types": "^3.1.0",
30
- "@smithy/util-stream": "^3.0.2",
26
+ "@smithy/middleware-endpoint": "^3.0.3",
27
+ "@smithy/middleware-stack": "^3.0.2",
28
+ "@smithy/protocol-http": "^4.0.2",
29
+ "@smithy/types": "^3.2.0",
30
+ "@smithy/util-stream": "^3.0.4",
31
31
  "tslib": "^2.6.2"
32
32
  },
33
33
  "engines": {
@@ -0,0 +1 @@
1
+ module.exports = require("./index.js");