cdk-common 2.0.1198 → 2.0.1200

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 (96) hide show
  1. package/.jsii +8 -2
  2. package/API.md +6 -0
  3. package/lib/main.js +1 -1
  4. package/lib/managed-policies.d.ts +2 -1
  5. package/lib/managed-policies.js +2 -1
  6. package/node_modules/@types/concat-stream/node_modules/@types/node/README.md +1 -1
  7. package/node_modules/@types/concat-stream/node_modules/@types/node/http2.d.ts +69 -1
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +1 -1
  10. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  11. package/node_modules/@types/form-data/node_modules/@types/node/http2.d.ts +69 -1
  12. package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
  13. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +1 -1
  14. package/package.json +1 -1
  15. package/node_modules/@types/form-data/node_modules/undici-types/LICENSE +0 -21
  16. package/node_modules/@types/form-data/node_modules/undici-types/README.md +0 -6
  17. package/node_modules/@types/form-data/node_modules/undici-types/agent.d.ts +0 -31
  18. package/node_modules/@types/form-data/node_modules/undici-types/api.d.ts +0 -43
  19. package/node_modules/@types/form-data/node_modules/undici-types/balanced-pool.d.ts +0 -29
  20. package/node_modules/@types/form-data/node_modules/undici-types/cache.d.ts +0 -36
  21. package/node_modules/@types/form-data/node_modules/undici-types/client.d.ts +0 -108
  22. package/node_modules/@types/form-data/node_modules/undici-types/connector.d.ts +0 -34
  23. package/node_modules/@types/form-data/node_modules/undici-types/content-type.d.ts +0 -21
  24. package/node_modules/@types/form-data/node_modules/undici-types/cookies.d.ts +0 -28
  25. package/node_modules/@types/form-data/node_modules/undici-types/diagnostics-channel.d.ts +0 -66
  26. package/node_modules/@types/form-data/node_modules/undici-types/dispatcher.d.ts +0 -256
  27. package/node_modules/@types/form-data/node_modules/undici-types/env-http-proxy-agent.d.ts +0 -21
  28. package/node_modules/@types/form-data/node_modules/undici-types/errors.d.ts +0 -149
  29. package/node_modules/@types/form-data/node_modules/undici-types/eventsource.d.ts +0 -61
  30. package/node_modules/@types/form-data/node_modules/undici-types/fetch.d.ts +0 -209
  31. package/node_modules/@types/form-data/node_modules/undici-types/file.d.ts +0 -39
  32. package/node_modules/@types/form-data/node_modules/undici-types/filereader.d.ts +0 -54
  33. package/node_modules/@types/form-data/node_modules/undici-types/formdata.d.ts +0 -108
  34. package/node_modules/@types/form-data/node_modules/undici-types/global-dispatcher.d.ts +0 -9
  35. package/node_modules/@types/form-data/node_modules/undici-types/global-origin.d.ts +0 -7
  36. package/node_modules/@types/form-data/node_modules/undici-types/handlers.d.ts +0 -15
  37. package/node_modules/@types/form-data/node_modules/undici-types/header.d.ts +0 -4
  38. package/node_modules/@types/form-data/node_modules/undici-types/index.d.ts +0 -71
  39. package/node_modules/@types/form-data/node_modules/undici-types/interceptors.d.ts +0 -17
  40. package/node_modules/@types/form-data/node_modules/undici-types/mock-agent.d.ts +0 -50
  41. package/node_modules/@types/form-data/node_modules/undici-types/mock-client.d.ts +0 -25
  42. package/node_modules/@types/form-data/node_modules/undici-types/mock-errors.d.ts +0 -12
  43. package/node_modules/@types/form-data/node_modules/undici-types/mock-interceptor.d.ts +0 -93
  44. package/node_modules/@types/form-data/node_modules/undici-types/mock-pool.d.ts +0 -25
  45. package/node_modules/@types/form-data/node_modules/undici-types/package.json +0 -55
  46. package/node_modules/@types/form-data/node_modules/undici-types/patch.d.ts +0 -33
  47. package/node_modules/@types/form-data/node_modules/undici-types/pool-stats.d.ts +0 -19
  48. package/node_modules/@types/form-data/node_modules/undici-types/pool.d.ts +0 -39
  49. package/node_modules/@types/form-data/node_modules/undici-types/proxy-agent.d.ts +0 -28
  50. package/node_modules/@types/form-data/node_modules/undici-types/readable.d.ts +0 -65
  51. package/node_modules/@types/form-data/node_modules/undici-types/retry-agent.d.ts +0 -8
  52. package/node_modules/@types/form-data/node_modules/undici-types/retry-handler.d.ts +0 -116
  53. package/node_modules/@types/form-data/node_modules/undici-types/util.d.ts +0 -18
  54. package/node_modules/@types/form-data/node_modules/undici-types/webidl.d.ts +0 -228
  55. package/node_modules/@types/form-data/node_modules/undici-types/websocket.d.ts +0 -150
  56. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/LICENSE +0 -0
  57. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/README.md +0 -0
  58. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/agent.d.ts +0 -0
  59. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/api.d.ts +0 -0
  60. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/balanced-pool.d.ts +0 -0
  61. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/cache.d.ts +0 -0
  62. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/client.d.ts +0 -0
  63. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/connector.d.ts +0 -0
  64. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/content-type.d.ts +0 -0
  65. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/cookies.d.ts +0 -0
  66. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/diagnostics-channel.d.ts +0 -0
  67. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/dispatcher.d.ts +0 -0
  68. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/env-http-proxy-agent.d.ts +0 -0
  69. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/errors.d.ts +0 -0
  70. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/eventsource.d.ts +0 -0
  71. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/fetch.d.ts +0 -0
  72. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/file.d.ts +0 -0
  73. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/filereader.d.ts +0 -0
  74. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/formdata.d.ts +0 -0
  75. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/global-dispatcher.d.ts +0 -0
  76. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/global-origin.d.ts +0 -0
  77. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/handlers.d.ts +0 -0
  78. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/header.d.ts +0 -0
  79. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/index.d.ts +0 -0
  80. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/interceptors.d.ts +0 -0
  81. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/mock-agent.d.ts +0 -0
  82. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/mock-client.d.ts +0 -0
  83. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/mock-errors.d.ts +0 -0
  84. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/mock-interceptor.d.ts +0 -0
  85. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/mock-pool.d.ts +0 -0
  86. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/package.json +0 -0
  87. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/patch.d.ts +0 -0
  88. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/pool-stats.d.ts +0 -0
  89. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/pool.d.ts +0 -0
  90. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/proxy-agent.d.ts +0 -0
  91. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/readable.d.ts +0 -0
  92. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/retry-agent.d.ts +0 -0
  93. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/retry-handler.d.ts +0 -0
  94. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/util.d.ts +0 -0
  95. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/webidl.d.ts +0 -0
  96. /package/node_modules/{@types/concat-stream/node_modules/undici-types → undici-types}/websocket.d.ts +0 -0
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 30 May 2025 18:40:02 GMT
11
+ * Last updated: Thu, 05 Jun 2025 18:56:28 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1223,14 +1223,66 @@ declare module "http2" {
1223
1223
  }
1224
1224
  // Http2Server
1225
1225
  export interface SessionOptions {
1226
+ /**
1227
+ * Sets the maximum dynamic table size for deflating header fields.
1228
+ * @default 4Kib
1229
+ */
1226
1230
  maxDeflateDynamicTableSize?: number | undefined;
1231
+ /**
1232
+ * Sets the maximum number of settings entries per `SETTINGS` frame.
1233
+ * The minimum value allowed is `1`.
1234
+ * @default 32
1235
+ */
1236
+ maxSettings?: number | undefined;
1237
+ /**
1238
+ * Sets the maximum memory that the `Http2Session` is permitted to use.
1239
+ * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte.
1240
+ * The minimum value allowed is `1`.
1241
+ * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded,
1242
+ * but new `Http2Stream` instances will be rejected while this limit is exceeded.
1243
+ * The current number of `Http2Stream` sessions, the current memory use of the header compression tables,
1244
+ * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit.
1245
+ * @default 10
1246
+ */
1227
1247
  maxSessionMemory?: number | undefined;
1248
+ /**
1249
+ * Sets the maximum number of header entries.
1250
+ * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module.
1251
+ * The minimum value is `1`.
1252
+ * @default 128
1253
+ */
1228
1254
  maxHeaderListPairs?: number | undefined;
1255
+ /**
1256
+ * Sets the maximum number of outstanding, unacknowledged pings.
1257
+ * @default 10
1258
+ */
1229
1259
  maxOutstandingPings?: number | undefined;
1260
+ /**
1261
+ * Sets the maximum allowed size for a serialized, compressed block of headers.
1262
+ * Attempts to send headers that exceed this limit will result in
1263
+ * a `'frameError'` event being emitted and the stream being closed and destroyed.
1264
+ */
1230
1265
  maxSendHeaderBlockLength?: number | undefined;
1266
+ /**
1267
+ * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames.
1268
+ * @default http2.constants.PADDING_STRATEGY_NONE
1269
+ */
1231
1270
  paddingStrategy?: number | undefined;
1271
+ /**
1272
+ * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received.
1273
+ * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`.
1274
+ * @default 100
1275
+ */
1232
1276
  peerMaxConcurrentStreams?: number | undefined;
1277
+ /**
1278
+ * The initial settings to send to the remote peer upon connection.
1279
+ */
1233
1280
  settings?: Settings | undefined;
1281
+ /**
1282
+ * The array of integer values determines the settings types,
1283
+ * which are included in the `CustomSettings`-property of the received remoteSettings.
1284
+ * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types.
1285
+ */
1234
1286
  remoteCustomSettings?: number[] | undefined;
1235
1287
  /**
1236
1288
  * Specifies a timeout in milliseconds that
@@ -1239,11 +1291,27 @@ declare module "http2" {
1239
1291
  * @default 100000
1240
1292
  */
1241
1293
  unknownProtocolTimeout?: number | undefined;
1242
- selectPadding?(frameLen: number, maxFrameLen: number): number;
1243
1294
  }
1244
1295
  export interface ClientSessionOptions extends SessionOptions {
1296
+ /**
1297
+ * Sets the maximum number of reserved push streams the client will accept at any given time.
1298
+ * Once the current number of currently reserved push streams exceeds reaches this limit,
1299
+ * new push streams sent by the server will be automatically rejected.
1300
+ * The minimum allowed value is 0. The maximum allowed value is 2<sup>32</sup>-1.
1301
+ * A negative value sets this option to the maximum allowed value.
1302
+ * @default 200
1303
+ */
1245
1304
  maxReservedRemoteStreams?: number | undefined;
1305
+ /**
1306
+ * An optional callback that receives the `URL` instance passed to `connect` and the `options` object,
1307
+ * and returns any `Duplex` stream that is to be used as the connection for this session.
1308
+ */
1246
1309
  createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
1310
+ /**
1311
+ * The protocol to connect with, if not set in the `authority`.
1312
+ * Value may be either `'http:'` or `'https:'`.
1313
+ * @default 'https:'
1314
+ */
1247
1315
  protocol?: "http:" | "https:" | undefined;
1248
1316
  }
1249
1317
  export interface ServerSessionOptions<
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.29",
3
+ "version": "22.15.30",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~6.21.0"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "98b7a6aabffc6588a0865305b51b9dd48e81a270354b592630e8d37772f1f57a",
223
+ "typesPublisherContentHash": "e608b189ccd6623034719d736dfcdaf6bae11f1e8fe989b19c4a6d3221277a64",
224
224
  "typeScriptVersion": "5.1"
225
225
  }
@@ -1411,7 +1411,7 @@ declare module "util" {
1411
1411
  * @param content The raw contents of a `.env` file.
1412
1412
  * @since v20.12.0
1413
1413
  */
1414
- export function parseEnv(content: string): object;
1414
+ export function parseEnv(content: string): NodeJS.Dict<string>;
1415
1415
  // https://nodejs.org/docs/latest/api/util.html#foreground-colors
1416
1416
  type ForegroundColors =
1417
1417
  | "black"
@@ -8,7 +8,7 @@ This package contains type definitions for node (https://nodejs.org/).
8
8
  Files were exported from https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node.
9
9
 
10
10
  ### Additional Details
11
- * Last updated: Fri, 30 May 2025 18:40:02 GMT
11
+ * Last updated: Thu, 05 Jun 2025 18:56:28 GMT
12
12
  * Dependencies: [undici-types](https://npmjs.com/package/undici-types)
13
13
 
14
14
  # Credits
@@ -1223,14 +1223,66 @@ declare module "http2" {
1223
1223
  }
1224
1224
  // Http2Server
1225
1225
  export interface SessionOptions {
1226
+ /**
1227
+ * Sets the maximum dynamic table size for deflating header fields.
1228
+ * @default 4Kib
1229
+ */
1226
1230
  maxDeflateDynamicTableSize?: number | undefined;
1231
+ /**
1232
+ * Sets the maximum number of settings entries per `SETTINGS` frame.
1233
+ * The minimum value allowed is `1`.
1234
+ * @default 32
1235
+ */
1236
+ maxSettings?: number | undefined;
1237
+ /**
1238
+ * Sets the maximum memory that the `Http2Session` is permitted to use.
1239
+ * The value is expressed in terms of number of megabytes, e.g. `1` equal 1 megabyte.
1240
+ * The minimum value allowed is `1`.
1241
+ * This is a credit based limit, existing `Http2Stream`s may cause this limit to be exceeded,
1242
+ * but new `Http2Stream` instances will be rejected while this limit is exceeded.
1243
+ * The current number of `Http2Stream` sessions, the current memory use of the header compression tables,
1244
+ * current data queued to be sent, and unacknowledged `PING` and `SETTINGS` frames are all counted towards the current limit.
1245
+ * @default 10
1246
+ */
1227
1247
  maxSessionMemory?: number | undefined;
1248
+ /**
1249
+ * Sets the maximum number of header entries.
1250
+ * This is similar to `server.maxHeadersCount` or `request.maxHeadersCount` in the `node:http` module.
1251
+ * The minimum value is `1`.
1252
+ * @default 128
1253
+ */
1228
1254
  maxHeaderListPairs?: number | undefined;
1255
+ /**
1256
+ * Sets the maximum number of outstanding, unacknowledged pings.
1257
+ * @default 10
1258
+ */
1229
1259
  maxOutstandingPings?: number | undefined;
1260
+ /**
1261
+ * Sets the maximum allowed size for a serialized, compressed block of headers.
1262
+ * Attempts to send headers that exceed this limit will result in
1263
+ * a `'frameError'` event being emitted and the stream being closed and destroyed.
1264
+ */
1230
1265
  maxSendHeaderBlockLength?: number | undefined;
1266
+ /**
1267
+ * Strategy used for determining the amount of padding to use for `HEADERS` and `DATA` frames.
1268
+ * @default http2.constants.PADDING_STRATEGY_NONE
1269
+ */
1231
1270
  paddingStrategy?: number | undefined;
1271
+ /**
1272
+ * Sets the maximum number of concurrent streams for the remote peer as if a `SETTINGS` frame had been received.
1273
+ * Will be overridden if the remote peer sets its own value for `maxConcurrentStreams`.
1274
+ * @default 100
1275
+ */
1232
1276
  peerMaxConcurrentStreams?: number | undefined;
1277
+ /**
1278
+ * The initial settings to send to the remote peer upon connection.
1279
+ */
1233
1280
  settings?: Settings | undefined;
1281
+ /**
1282
+ * The array of integer values determines the settings types,
1283
+ * which are included in the `CustomSettings`-property of the received remoteSettings.
1284
+ * Please see the `CustomSettings`-property of the `Http2Settings` object for more information, on the allowed setting types.
1285
+ */
1234
1286
  remoteCustomSettings?: number[] | undefined;
1235
1287
  /**
1236
1288
  * Specifies a timeout in milliseconds that
@@ -1239,11 +1291,27 @@ declare module "http2" {
1239
1291
  * @default 100000
1240
1292
  */
1241
1293
  unknownProtocolTimeout?: number | undefined;
1242
- selectPadding?(frameLen: number, maxFrameLen: number): number;
1243
1294
  }
1244
1295
  export interface ClientSessionOptions extends SessionOptions {
1296
+ /**
1297
+ * Sets the maximum number of reserved push streams the client will accept at any given time.
1298
+ * Once the current number of currently reserved push streams exceeds reaches this limit,
1299
+ * new push streams sent by the server will be automatically rejected.
1300
+ * The minimum allowed value is 0. The maximum allowed value is 2<sup>32</sup>-1.
1301
+ * A negative value sets this option to the maximum allowed value.
1302
+ * @default 200
1303
+ */
1245
1304
  maxReservedRemoteStreams?: number | undefined;
1305
+ /**
1306
+ * An optional callback that receives the `URL` instance passed to `connect` and the `options` object,
1307
+ * and returns any `Duplex` stream that is to be used as the connection for this session.
1308
+ */
1246
1309
  createConnection?: ((authority: url.URL, option: SessionOptions) => stream.Duplex) | undefined;
1310
+ /**
1311
+ * The protocol to connect with, if not set in the `authority`.
1312
+ * Value may be either `'http:'` or `'https:'`.
1313
+ * @default 'https:'
1314
+ */
1247
1315
  protocol?: "http:" | "https:" | undefined;
1248
1316
  }
1249
1317
  export interface ServerSessionOptions<
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "22.15.29",
3
+ "version": "22.15.30",
4
4
  "description": "TypeScript definitions for node",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -220,6 +220,6 @@
220
220
  "undici-types": "~6.21.0"
221
221
  },
222
222
  "peerDependencies": {},
223
- "typesPublisherContentHash": "98b7a6aabffc6588a0865305b51b9dd48e81a270354b592630e8d37772f1f57a",
223
+ "typesPublisherContentHash": "e608b189ccd6623034719d736dfcdaf6bae11f1e8fe989b19c4a6d3221277a64",
224
224
  "typeScriptVersion": "5.1"
225
225
  }
@@ -1411,7 +1411,7 @@ declare module "util" {
1411
1411
  * @param content The raw contents of a `.env` file.
1412
1412
  * @since v20.12.0
1413
1413
  */
1414
- export function parseEnv(content: string): object;
1414
+ export function parseEnv(content: string): NodeJS.Dict<string>;
1415
1415
  // https://nodejs.org/docs/latest/api/util.html#foreground-colors
1416
1416
  type ForegroundColors =
1417
1417
  | "black"
package/package.json CHANGED
@@ -87,7 +87,7 @@
87
87
  "publishConfig": {
88
88
  "access": "public"
89
89
  },
90
- "version": "2.0.1198",
90
+ "version": "2.0.1200",
91
91
  "jest": {
92
92
  "coverageProvider": "v8",
93
93
  "testMatch": [
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) Matteo Collina and Undici contributors
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.
@@ -1,6 +0,0 @@
1
- # undici-types
2
-
3
- This package is a dual-publish of the [undici](https://www.npmjs.com/package/undici) library types. The `undici` package **still contains types**. This package is for users who _only_ need undici types (such as for `@types/node`). It is published alongside every release of `undici`, so you can always use the same version.
4
-
5
- - [GitHub nodejs/undici](https://github.com/nodejs/undici)
6
- - [Undici Documentation](https://undici.nodejs.org/#/)
@@ -1,31 +0,0 @@
1
- import { URL } from 'url'
2
- import Pool from './pool'
3
- import Dispatcher from "./dispatcher";
4
-
5
- export default Agent
6
-
7
- declare class Agent extends Dispatcher{
8
- constructor(opts?: Agent.Options)
9
- /** `true` after `dispatcher.close()` has been called. */
10
- closed: boolean;
11
- /** `true` after `dispatcher.destroyed()` has been called or `dispatcher.close()` has been called and the dispatcher shutdown has completed. */
12
- destroyed: boolean;
13
- /** Dispatches a request. */
14
- dispatch(options: Agent.DispatchOptions, handler: Dispatcher.DispatchHandlers): boolean;
15
- }
16
-
17
- declare namespace Agent {
18
- export interface Options extends Pool.Options {
19
- /** Default: `(origin, opts) => new Pool(origin, opts)`. */
20
- factory?(origin: string | URL, opts: Object): Dispatcher;
21
- /** Integer. Default: `0` */
22
- maxRedirections?: number;
23
-
24
- interceptors?: { Agent?: readonly Dispatcher.DispatchInterceptor[] } & Pool.Options["interceptors"]
25
- }
26
-
27
- export interface DispatchOptions extends Dispatcher.DispatchOptions {
28
- /** Integer. */
29
- maxRedirections?: number;
30
- }
31
- }
@@ -1,43 +0,0 @@
1
- import { URL, UrlObject } from 'url'
2
- import { Duplex } from 'stream'
3
- import Dispatcher from './dispatcher'
4
-
5
- export {
6
- request,
7
- stream,
8
- pipeline,
9
- connect,
10
- upgrade,
11
- }
12
-
13
- /** Performs an HTTP request. */
14
- declare function request(
15
- url: string | URL | UrlObject,
16
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path' | 'method'> & Partial<Pick<Dispatcher.RequestOptions, 'method'>>,
17
- ): Promise<Dispatcher.ResponseData>;
18
-
19
- /** A faster version of `request`. */
20
- declare function stream(
21
- url: string | URL | UrlObject,
22
- options: { dispatcher?: Dispatcher } & Omit<Dispatcher.RequestOptions, 'origin' | 'path'>,
23
- factory: Dispatcher.StreamFactory
24
- ): Promise<Dispatcher.StreamData>;
25
-
26
- /** For easy use with `stream.pipeline`. */
27
- declare function pipeline(
28
- url: string | URL | UrlObject,
29
- options: { dispatcher?: Dispatcher } & Omit<Dispatcher.PipelineOptions, 'origin' | 'path'>,
30
- handler: Dispatcher.PipelineHandler
31
- ): Duplex;
32
-
33
- /** Starts two-way communications with the requested resource. */
34
- declare function connect(
35
- url: string | URL | UrlObject,
36
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.ConnectOptions, 'origin' | 'path'>
37
- ): Promise<Dispatcher.ConnectData>;
38
-
39
- /** Upgrade to a different protocol. */
40
- declare function upgrade(
41
- url: string | URL | UrlObject,
42
- options?: { dispatcher?: Dispatcher } & Omit<Dispatcher.UpgradeOptions, 'origin' | 'path'>
43
- ): Promise<Dispatcher.UpgradeData>;
@@ -1,29 +0,0 @@
1
- import Pool from './pool'
2
- import Dispatcher from './dispatcher'
3
- import { URL } from 'url'
4
-
5
- export default BalancedPool
6
-
7
- type BalancedPoolConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
8
-
9
- declare class BalancedPool extends Dispatcher {
10
- constructor(url: string | string[] | URL | URL[], options?: Pool.Options);
11
-
12
- addUpstream(upstream: string | URL): BalancedPool;
13
- removeUpstream(upstream: string | URL): BalancedPool;
14
- upstreams: Array<string>;
15
-
16
- /** `true` after `pool.close()` has been called. */
17
- closed: boolean;
18
- /** `true` after `pool.destroyed()` has been called or `pool.close()` has been called and the pool shutdown has completed. */
19
- destroyed: boolean;
20
-
21
- // Override dispatcher APIs.
22
- override connect(
23
- options: BalancedPoolConnectOptions
24
- ): Promise<Dispatcher.ConnectData>;
25
- override connect(
26
- options: BalancedPoolConnectOptions,
27
- callback: (err: Error | null, data: Dispatcher.ConnectData) => void
28
- ): void;
29
- }
@@ -1,36 +0,0 @@
1
- import type { RequestInfo, Response, Request } from './fetch'
2
-
3
- export interface CacheStorage {
4
- match (request: RequestInfo, options?: MultiCacheQueryOptions): Promise<Response | undefined>,
5
- has (cacheName: string): Promise<boolean>,
6
- open (cacheName: string): Promise<Cache>,
7
- delete (cacheName: string): Promise<boolean>,
8
- keys (): Promise<string[]>
9
- }
10
-
11
- declare const CacheStorage: {
12
- prototype: CacheStorage
13
- new(): CacheStorage
14
- }
15
-
16
- export interface Cache {
17
- match (request: RequestInfo, options?: CacheQueryOptions): Promise<Response | undefined>,
18
- matchAll (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Response[]>,
19
- add (request: RequestInfo): Promise<undefined>,
20
- addAll (requests: RequestInfo[]): Promise<undefined>,
21
- put (request: RequestInfo, response: Response): Promise<undefined>,
22
- delete (request: RequestInfo, options?: CacheQueryOptions): Promise<boolean>,
23
- keys (request?: RequestInfo, options?: CacheQueryOptions): Promise<readonly Request[]>
24
- }
25
-
26
- export interface CacheQueryOptions {
27
- ignoreSearch?: boolean,
28
- ignoreMethod?: boolean,
29
- ignoreVary?: boolean
30
- }
31
-
32
- export interface MultiCacheQueryOptions extends CacheQueryOptions {
33
- cacheName?: string
34
- }
35
-
36
- export declare const caches: CacheStorage
@@ -1,108 +0,0 @@
1
- import { URL } from 'url'
2
- import { TlsOptions } from 'tls'
3
- import Dispatcher from './dispatcher'
4
- import buildConnector from "./connector";
5
-
6
- type ClientConnectOptions = Omit<Dispatcher.ConnectOptions, "origin">;
7
-
8
- /**
9
- * A basic HTTP/1.1 client, mapped on top a single TCP/TLS connection. Pipelining is disabled by default.
10
- */
11
- export class Client extends Dispatcher {
12
- constructor(url: string | URL, options?: Client.Options);
13
- /** Property to get and set the pipelining factor. */
14
- pipelining: number;
15
- /** `true` after `client.close()` has been called. */
16
- closed: boolean;
17
- /** `true` after `client.destroyed()` has been called or `client.close()` has been called and the client shutdown has completed. */
18
- destroyed: boolean;
19
-
20
- // Override dispatcher APIs.
21
- override connect(
22
- options: ClientConnectOptions
23
- ): Promise<Dispatcher.ConnectData>;
24
- override connect(
25
- options: ClientConnectOptions,
26
- callback: (err: Error | null, data: Dispatcher.ConnectData) => void
27
- ): void;
28
- }
29
-
30
- export declare namespace Client {
31
- export interface OptionsInterceptors {
32
- Client: readonly Dispatcher.DispatchInterceptor[];
33
- }
34
- export interface Options {
35
- /** TODO */
36
- interceptors?: OptionsInterceptors;
37
- /** The maximum length of request headers in bytes. Default: Node.js' `--max-http-header-size` or `16384` (16KiB). */
38
- maxHeaderSize?: number;
39
- /** The amount of time, in milliseconds, the parser will wait to receive the complete HTTP headers (Node 14 and above only). Default: `300e3` milliseconds (300s). */
40
- headersTimeout?: number;
41
- /** @deprecated unsupported socketTimeout, use headersTimeout & bodyTimeout instead */
42
- socketTimeout?: never;
43
- /** @deprecated unsupported requestTimeout, use headersTimeout & bodyTimeout instead */
44
- requestTimeout?: never;
45
- /** TODO */
46
- connectTimeout?: number;
47
- /** The timeout after which a request will time out, in milliseconds. Monitors time between receiving body data. Use `0` to disable it entirely. Default: `300e3` milliseconds (300s). */
48
- bodyTimeout?: number;
49
- /** @deprecated unsupported idleTimeout, use keepAliveTimeout instead */
50
- idleTimeout?: never;
51
- /** @deprecated unsupported keepAlive, use pipelining=0 instead */
52
- keepAlive?: never;
53
- /** the timeout, in milliseconds, after which a socket without active requests will time out. Monitors time between activity on a connected socket. This value may be overridden by *keep-alive* hints from the server. Default: `4e3` milliseconds (4s). */
54
- keepAliveTimeout?: number;
55
- /** @deprecated unsupported maxKeepAliveTimeout, use keepAliveMaxTimeout instead */
56
- maxKeepAliveTimeout?: never;
57
- /** the maximum allowed `idleTimeout`, in milliseconds, when overridden by *keep-alive* hints from the server. Default: `600e3` milliseconds (10min). */
58
- keepAliveMaxTimeout?: number;
59
- /** A number of milliseconds subtracted from server *keep-alive* hints when overriding `idleTimeout` to account for timing inaccuracies caused by e.g. transport latency. Default: `1e3` milliseconds (1s). */
60
- keepAliveTimeoutThreshold?: number;
61
- /** TODO */
62
- socketPath?: string;
63
- /** The amount of concurrent requests to be sent over the single TCP/TLS connection according to [RFC7230](https://tools.ietf.org/html/rfc7230#section-6.3.2). Default: `1`. */
64
- pipelining?: number;
65
- /** @deprecated use the connect option instead */
66
- tls?: never;
67
- /** If `true`, an error is thrown when the request content-length header doesn't match the length of the request body. Default: `true`. */
68
- strictContentLength?: boolean;
69
- /** TODO */
70
- maxCachedSessions?: number;
71
- /** TODO */
72
- maxRedirections?: number;
73
- /** TODO */
74
- connect?: buildConnector.BuildOptions | buildConnector.connector;
75
- /** TODO */
76
- maxRequestsPerClient?: number;
77
- /** TODO */
78
- localAddress?: string;
79
- /** Max response body size in bytes, -1 is disabled */
80
- maxResponseSize?: number;
81
- /** Enables a family autodetection algorithm that loosely implements section 5 of RFC 8305. */
82
- autoSelectFamily?: boolean;
83
- /** The amount of time in milliseconds to wait for a connection attempt to finish before trying the next address when using the `autoSelectFamily` option. */
84
- autoSelectFamilyAttemptTimeout?: number;
85
- /**
86
- * @description Enables support for H2 if the server has assigned bigger priority to it through ALPN negotiation.
87
- * @default false
88
- */
89
- allowH2?: boolean;
90
- /**
91
- * @description Dictates the maximum number of concurrent streams for a single H2 session. It can be overridden by a SETTINGS remote frame.
92
- * @default 100
93
- */
94
- maxConcurrentStreams?: number
95
- }
96
- export interface SocketInfo {
97
- localAddress?: string
98
- localPort?: number
99
- remoteAddress?: string
100
- remotePort?: number
101
- remoteFamily?: string
102
- timeout?: number
103
- bytesWritten?: number
104
- bytesRead?: number
105
- }
106
- }
107
-
108
- export default Client;
@@ -1,34 +0,0 @@
1
- import { TLSSocket, ConnectionOptions } from 'tls'
2
- import { IpcNetConnectOpts, Socket, TcpNetConnectOpts } from 'net'
3
-
4
- export default buildConnector
5
- declare function buildConnector (options?: buildConnector.BuildOptions): buildConnector.connector
6
-
7
- declare namespace buildConnector {
8
- export type BuildOptions = (ConnectionOptions | TcpNetConnectOpts | IpcNetConnectOpts) & {
9
- allowH2?: boolean;
10
- maxCachedSessions?: number | null;
11
- socketPath?: string | null;
12
- timeout?: number | null;
13
- port?: number;
14
- keepAlive?: boolean | null;
15
- keepAliveInitialDelay?: number | null;
16
- }
17
-
18
- export interface Options {
19
- hostname: string
20
- host?: string
21
- protocol: string
22
- port: string
23
- servername?: string
24
- localAddress?: string | null
25
- httpSocket?: Socket
26
- }
27
-
28
- export type Callback = (...args: CallbackArgs) => void
29
- type CallbackArgs = [null, Socket | TLSSocket] | [Error, null]
30
-
31
- export interface connector {
32
- (options: buildConnector.Options, callback: buildConnector.Callback): void
33
- }
34
- }
@@ -1,21 +0,0 @@
1
- /// <reference types="node" />
2
-
3
- interface MIMEType {
4
- type: string
5
- subtype: string
6
- parameters: Map<string, string>
7
- essence: string
8
- }
9
-
10
- /**
11
- * Parse a string to a {@link MIMEType} object. Returns `failure` if the string
12
- * couldn't be parsed.
13
- * @see https://mimesniff.spec.whatwg.org/#parse-a-mime-type
14
- */
15
- export function parseMIMEType (input: string): 'failure' | MIMEType
16
-
17
- /**
18
- * Convert a MIMEType object to a string.
19
- * @see https://mimesniff.spec.whatwg.org/#serialize-a-mime-type
20
- */
21
- export function serializeAMimeType (mimeType: MIMEType): string
@@ -1,28 +0,0 @@
1
- /// <reference types="node" />
2
-
3
- import type { Headers } from './fetch'
4
-
5
- export interface Cookie {
6
- name: string
7
- value: string
8
- expires?: Date | number
9
- maxAge?: number
10
- domain?: string
11
- path?: string
12
- secure?: boolean
13
- httpOnly?: boolean
14
- sameSite?: 'Strict' | 'Lax' | 'None'
15
- unparsed?: string[]
16
- }
17
-
18
- export function deleteCookie (
19
- headers: Headers,
20
- name: string,
21
- attributes?: { name?: string, domain?: string }
22
- ): void
23
-
24
- export function getCookies (headers: Headers): Record<string, string>
25
-
26
- export function getSetCookies (headers: Headers): Cookie[]
27
-
28
- export function setCookie (headers: Headers, cookie: Cookie): void