cdk-common 2.0.628 → 2.0.631

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 (50) hide show
  1. package/.jsii +8 -2
  2. package/API.md +5 -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/buffer.d.ts +2 -1
  8. package/node_modules/@types/concat-stream/node_modules/@types/node/crypto.d.ts +1 -1
  9. package/node_modules/@types/concat-stream/node_modules/@types/node/http.d.ts +167 -87
  10. package/node_modules/@types/concat-stream/node_modules/@types/node/index.d.ts +1 -1
  11. package/node_modules/@types/concat-stream/node_modules/@types/node/module.d.ts +11 -11
  12. package/node_modules/@types/concat-stream/node_modules/@types/node/net.d.ts +19 -0
  13. package/node_modules/@types/concat-stream/node_modules/@types/node/os.d.ts +1 -1
  14. package/node_modules/@types/concat-stream/node_modules/@types/node/package.json +2 -2
  15. package/node_modules/@types/concat-stream/node_modules/@types/node/stream/web.d.ts +14 -0
  16. package/node_modules/@types/concat-stream/node_modules/@types/node/test.d.ts +11 -1
  17. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/buffer.d.ts +3 -2
  18. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/crypto.d.ts +1 -1
  19. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/http.d.ts +81 -1
  20. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/module.d.ts +39 -11
  21. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/net.d.ts +31 -0
  22. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/os.d.ts +1 -1
  23. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/stream/web.d.ts +14 -0
  24. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/stream.d.ts +164 -0
  25. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/test.d.ts +28 -3
  26. package/node_modules/@types/concat-stream/node_modules/@types/node/ts4.8/util.d.ts +11 -3
  27. package/node_modules/@types/concat-stream/node_modules/@types/node/util.d.ts +11 -3
  28. package/node_modules/@types/form-data/node_modules/@types/node/README.md +1 -1
  29. package/node_modules/@types/form-data/node_modules/@types/node/buffer.d.ts +2 -1
  30. package/node_modules/@types/form-data/node_modules/@types/node/crypto.d.ts +1 -1
  31. package/node_modules/@types/form-data/node_modules/@types/node/http.d.ts +167 -87
  32. package/node_modules/@types/form-data/node_modules/@types/node/index.d.ts +1 -1
  33. package/node_modules/@types/form-data/node_modules/@types/node/module.d.ts +11 -11
  34. package/node_modules/@types/form-data/node_modules/@types/node/net.d.ts +19 -0
  35. package/node_modules/@types/form-data/node_modules/@types/node/os.d.ts +1 -1
  36. package/node_modules/@types/form-data/node_modules/@types/node/package.json +2 -2
  37. package/node_modules/@types/form-data/node_modules/@types/node/stream/web.d.ts +14 -0
  38. package/node_modules/@types/form-data/node_modules/@types/node/test.d.ts +11 -1
  39. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/buffer.d.ts +3 -2
  40. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/crypto.d.ts +1 -1
  41. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/http.d.ts +81 -1
  42. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/module.d.ts +39 -11
  43. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/net.d.ts +31 -0
  44. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/os.d.ts +1 -1
  45. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/stream/web.d.ts +14 -0
  46. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/stream.d.ts +164 -0
  47. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/test.d.ts +28 -3
  48. package/node_modules/@types/form-data/node_modules/@types/node/ts4.8/util.d.ts +11 -3
  49. package/node_modules/@types/form-data/node_modules/@types/node/util.d.ts +11 -3
  50. package/package.json +2 -2
@@ -113,7 +113,87 @@ declare module "http" {
113
113
  }
114
114
  // outgoing headers allows numbers (as they are converted internally to strings)
115
115
  type OutgoingHttpHeader = number | string | string[];
116
- interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {}
116
+ interface OutgoingHttpHeaders extends NodeJS.Dict<OutgoingHttpHeader> {
117
+ accept?: string | string[] | undefined;
118
+ 'accept-charset'?: string | string[] | undefined;
119
+ 'accept-encoding'?: string | string[] | undefined;
120
+ 'accept-language'?: string | string[] | undefined;
121
+ 'accept-ranges'?: string | undefined;
122
+ 'access-control-allow-credentials'?: string | undefined;
123
+ 'access-control-allow-headers'?: string | undefined;
124
+ 'access-control-allow-methods'?: string | undefined;
125
+ 'access-control-allow-origin'?: string | undefined;
126
+ 'access-control-expose-headers'?: string | undefined;
127
+ 'access-control-max-age'?: string | undefined;
128
+ 'access-control-request-headers'?: string | undefined;
129
+ 'access-control-request-method'?: string | undefined;
130
+ age?: string | undefined;
131
+ allow?: string | undefined;
132
+ authorization?: string | undefined;
133
+ 'cache-control'?: string | undefined;
134
+ 'cdn-cache-control'?: string | undefined;
135
+ connection?: string | string[] | undefined;
136
+ 'content-disposition'?: string | undefined;
137
+ 'content-encoding'?: string | undefined;
138
+ 'content-language'?: string | undefined;
139
+ 'content-length'?: string | number | undefined;
140
+ 'content-location'?: string | undefined;
141
+ 'content-range'?: string | undefined;
142
+ 'content-security-policy'?: string | undefined;
143
+ 'content-security-policy-report-only'?: string | undefined;
144
+ cookie?: string | string[] | undefined;
145
+ dav?: string | string[] | undefined;
146
+ dnt?: string | undefined;
147
+ date?: string | undefined;
148
+ etag?: string | undefined;
149
+ expect?: string | undefined;
150
+ expires?: string | undefined;
151
+ forwarded?: string | undefined;
152
+ from?: string | undefined;
153
+ host?: string | undefined;
154
+ 'if-match'?: string | undefined;
155
+ 'if-modified-since'?: string | undefined;
156
+ 'if-none-match'?: string | undefined;
157
+ 'if-range'?: string | undefined;
158
+ 'if-unmodified-since'?: string | undefined;
159
+ 'last-modified'?: string | undefined;
160
+ link?: string | string[] | undefined;
161
+ location?: string | undefined;
162
+ 'max-forwards'?: string | undefined;
163
+ origin?: string | undefined;
164
+ prgama?: string | string[] | undefined;
165
+ 'proxy-authenticate'?: string | string[] | undefined;
166
+ 'proxy-authorization'?: string | undefined;
167
+ 'public-key-pins'?: string | undefined;
168
+ 'public-key-pins-report-only'?: string | undefined;
169
+ range?: string | undefined;
170
+ referer?: string | undefined;
171
+ 'referrer-policy'?: string | undefined;
172
+ refresh?: string | undefined;
173
+ 'retry-after'?: string | undefined;
174
+ 'sec-websocket-accept'?: string | undefined;
175
+ 'sec-websocket-extensions'?: string | string[] | undefined;
176
+ 'sec-websocket-key'?: string | undefined;
177
+ 'sec-websocket-protocol'?: string | string[] | undefined;
178
+ 'sec-websocket-version'?: string | undefined;
179
+ server?: string | undefined;
180
+ 'set-cookie'?: string | string[] | undefined;
181
+ 'strict-transport-security'?: string | undefined;
182
+ te?: string | undefined;
183
+ trailer?: string | undefined;
184
+ 'transfer-encoding'?: string | undefined;
185
+ 'user-agent'?: string | undefined;
186
+ upgrade?: string | undefined;
187
+ 'upgrade-insecure-requests'?: string | undefined;
188
+ vary?: string | undefined;
189
+ via?: string | string[] | undefined;
190
+ warning?: string | undefined;
191
+ 'www-authenticate'?: string | string[] | undefined;
192
+ 'x-content-type-options'?: string | undefined;
193
+ 'x-dns-prefetch-control'?: string | undefined;
194
+ 'x-frame-options'?: string | undefined;
195
+ 'x-xss-protection'?: string | undefined;
196
+ }
117
197
  interface ClientRequestArgs {
118
198
  _defaultAgent?: Agent | undefined;
119
199
  agent?: Agent | boolean | undefined;
@@ -343,21 +423,21 @@ declare module "http" {
343
423
  */
344
424
  closeIdleConnections(): void;
345
425
  addListener(event: string, listener: (...args: any[]) => void): this;
346
- addListener(event: "close", listener: () => void): this;
347
- addListener(event: "connection", listener: (socket: Socket) => void): this;
348
- addListener(event: "error", listener: (err: Error) => void): this;
349
- addListener(event: "listening", listener: () => void): this;
350
- addListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
351
- addListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
352
- addListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
426
+ addListener(event: 'close', listener: () => void): this;
427
+ addListener(event: 'connection', listener: (socket: Socket) => void): this;
428
+ addListener(event: 'error', listener: (err: Error) => void): this;
429
+ addListener(event: 'listening', listener: () => void): this;
430
+ addListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
431
+ addListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
432
+ addListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
353
433
  addListener(
354
- event: "connect",
434
+ event: 'connect',
355
435
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
356
436
  ): this;
357
- addListener(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
358
- addListener(event: "request", listener: RequestListener<Request, Response>): this;
437
+ addListener(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
438
+ addListener(event: 'request', listener: RequestListener<Request, Response>): this;
359
439
  addListener(
360
- event: "upgrade",
440
+ event: 'upgrade',
361
441
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
362
442
  ): this;
363
443
  emit(event: string, ...args: any[]): boolean;
@@ -397,63 +477,63 @@ declare module "http" {
397
477
  on(event: "request", listener: RequestListener<Request, Response>): this;
398
478
  on(event: "upgrade", listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void): this;
399
479
  once(event: string, listener: (...args: any[]) => void): this;
400
- once(event: "close", listener: () => void): this;
401
- once(event: "connection", listener: (socket: Socket) => void): this;
402
- once(event: "error", listener: (err: Error) => void): this;
403
- once(event: "listening", listener: () => void): this;
404
- once(event: "checkContinue", listener: RequestListener<Request, Response>): this;
405
- once(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
406
- once(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
480
+ once(event: 'close', listener: () => void): this;
481
+ once(event: 'connection', listener: (socket: Socket) => void): this;
482
+ once(event: 'error', listener: (err: Error) => void): this;
483
+ once(event: 'listening', listener: () => void): this;
484
+ once(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
485
+ once(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
486
+ once(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
407
487
  once(
408
- event: "connect",
488
+ event: 'connect',
409
489
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
410
490
  ): this;
411
- once(event: "dropRequest", listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
412
- once(event: "request", listener: RequestListener<Request, Response>): this;
491
+ once(event: 'dropRequest', listener: (req: InstanceType<Request>, socket: stream.Duplex) => void): this;
492
+ once(event: 'request', listener: RequestListener<Request, Response>): this;
413
493
  once(
414
- event: "upgrade",
494
+ event: 'upgrade',
415
495
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
416
496
  ): this;
417
497
  prependListener(event: string, listener: (...args: any[]) => void): this;
418
- prependListener(event: "close", listener: () => void): this;
419
- prependListener(event: "connection", listener: (socket: Socket) => void): this;
420
- prependListener(event: "error", listener: (err: Error) => void): this;
421
- prependListener(event: "listening", listener: () => void): this;
422
- prependListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
423
- prependListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
424
- prependListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
498
+ prependListener(event: 'close', listener: () => void): this;
499
+ prependListener(event: 'connection', listener: (socket: Socket) => void): this;
500
+ prependListener(event: 'error', listener: (err: Error) => void): this;
501
+ prependListener(event: 'listening', listener: () => void): this;
502
+ prependListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
503
+ prependListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
504
+ prependListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
425
505
  prependListener(
426
- event: "connect",
506
+ event: 'connect',
427
507
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
428
508
  ): this;
429
509
  prependListener(
430
- event: "dropRequest",
510
+ event: 'dropRequest',
431
511
  listener: (req: InstanceType<Request>, socket: stream.Duplex) => void,
432
512
  ): this;
433
- prependListener(event: "request", listener: RequestListener<Request, Response>): this;
513
+ prependListener(event: 'request', listener: RequestListener<Request, Response>): this;
434
514
  prependListener(
435
- event: "upgrade",
515
+ event: 'upgrade',
436
516
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
437
517
  ): this;
438
518
  prependOnceListener(event: string, listener: (...args: any[]) => void): this;
439
- prependOnceListener(event: "close", listener: () => void): this;
440
- prependOnceListener(event: "connection", listener: (socket: Socket) => void): this;
441
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
442
- prependOnceListener(event: "listening", listener: () => void): this;
443
- prependOnceListener(event: "checkContinue", listener: RequestListener<Request, Response>): this;
444
- prependOnceListener(event: "checkExpectation", listener: RequestListener<Request, Response>): this;
445
- prependOnceListener(event: "clientError", listener: (err: Error, socket: stream.Duplex) => void): this;
519
+ prependOnceListener(event: 'close', listener: () => void): this;
520
+ prependOnceListener(event: 'connection', listener: (socket: Socket) => void): this;
521
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
522
+ prependOnceListener(event: 'listening', listener: () => void): this;
523
+ prependOnceListener(event: 'checkContinue', listener: RequestListener<Request, Response>): this;
524
+ prependOnceListener(event: 'checkExpectation', listener: RequestListener<Request, Response>): this;
525
+ prependOnceListener(event: 'clientError', listener: (err: Error, socket: stream.Duplex) => void): this;
446
526
  prependOnceListener(
447
- event: "connect",
527
+ event: 'connect',
448
528
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
449
529
  ): this;
450
530
  prependOnceListener(
451
- event: "dropRequest",
531
+ event: 'dropRequest',
452
532
  listener: (req: InstanceType<Request>, socket: stream.Duplex) => void,
453
533
  ): this;
454
- prependOnceListener(event: "request", listener: RequestListener<Request, Response>): this;
534
+ prependOnceListener(event: 'request', listener: RequestListener<Request, Response>): this;
455
535
  prependOnceListener(
456
- event: "upgrade",
536
+ event: 'upgrade',
457
537
  listener: (req: InstanceType<Request>, socket: stream.Duplex, head: Buffer) => void,
458
538
  ): this;
459
539
  }
@@ -935,26 +1015,26 @@ declare module "http" {
935
1015
  /**
936
1016
  * @deprecated
937
1017
  */
938
- addListener(event: "abort", listener: () => void): this;
1018
+ addListener(event: 'abort', listener: () => void): this;
939
1019
  addListener(
940
- event: "connect",
1020
+ event: 'connect',
941
1021
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
942
1022
  ): this;
943
- addListener(event: "continue", listener: () => void): this;
944
- addListener(event: "information", listener: (info: InformationEvent) => void): this;
945
- addListener(event: "response", listener: (response: IncomingMessage) => void): this;
946
- addListener(event: "socket", listener: (socket: Socket) => void): this;
947
- addListener(event: "timeout", listener: () => void): this;
1023
+ addListener(event: 'continue', listener: () => void): this;
1024
+ addListener(event: 'information', listener: (info: InformationEvent) => void): this;
1025
+ addListener(event: 'response', listener: (response: IncomingMessage) => void): this;
1026
+ addListener(event: 'socket', listener: (socket: Socket) => void): this;
1027
+ addListener(event: 'timeout', listener: () => void): this;
948
1028
  addListener(
949
- event: "upgrade",
1029
+ event: 'upgrade',
950
1030
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
951
1031
  ): this;
952
- addListener(event: "close", listener: () => void): this;
953
- addListener(event: "drain", listener: () => void): this;
954
- addListener(event: "error", listener: (err: Error) => void): this;
955
- addListener(event: "finish", listener: () => void): this;
956
- addListener(event: "pipe", listener: (src: stream.Readable) => void): this;
957
- addListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
1032
+ addListener(event: 'close', listener: () => void): this;
1033
+ addListener(event: 'drain', listener: () => void): this;
1034
+ addListener(event: 'error', listener: (err: Error) => void): this;
1035
+ addListener(event: 'finish', listener: () => void): this;
1036
+ addListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
1037
+ addListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
958
1038
  addListener(event: string | symbol, listener: (...args: any[]) => void): this;
959
1039
  /**
960
1040
  * @deprecated
@@ -995,50 +1075,50 @@ declare module "http" {
995
1075
  /**
996
1076
  * @deprecated
997
1077
  */
998
- prependListener(event: "abort", listener: () => void): this;
1078
+ prependListener(event: 'abort', listener: () => void): this;
999
1079
  prependListener(
1000
- event: "connect",
1080
+ event: 'connect',
1001
1081
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1002
1082
  ): this;
1003
- prependListener(event: "continue", listener: () => void): this;
1004
- prependListener(event: "information", listener: (info: InformationEvent) => void): this;
1005
- prependListener(event: "response", listener: (response: IncomingMessage) => void): this;
1006
- prependListener(event: "socket", listener: (socket: Socket) => void): this;
1007
- prependListener(event: "timeout", listener: () => void): this;
1083
+ prependListener(event: 'continue', listener: () => void): this;
1084
+ prependListener(event: 'information', listener: (info: InformationEvent) => void): this;
1085
+ prependListener(event: 'response', listener: (response: IncomingMessage) => void): this;
1086
+ prependListener(event: 'socket', listener: (socket: Socket) => void): this;
1087
+ prependListener(event: 'timeout', listener: () => void): this;
1008
1088
  prependListener(
1009
- event: "upgrade",
1089
+ event: 'upgrade',
1010
1090
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1011
1091
  ): this;
1012
- prependListener(event: "close", listener: () => void): this;
1013
- prependListener(event: "drain", listener: () => void): this;
1014
- prependListener(event: "error", listener: (err: Error) => void): this;
1015
- prependListener(event: "finish", listener: () => void): this;
1016
- prependListener(event: "pipe", listener: (src: stream.Readable) => void): this;
1017
- prependListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
1092
+ prependListener(event: 'close', listener: () => void): this;
1093
+ prependListener(event: 'drain', listener: () => void): this;
1094
+ prependListener(event: 'error', listener: (err: Error) => void): this;
1095
+ prependListener(event: 'finish', listener: () => void): this;
1096
+ prependListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
1097
+ prependListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
1018
1098
  prependListener(event: string | symbol, listener: (...args: any[]) => void): this;
1019
1099
  /**
1020
1100
  * @deprecated
1021
1101
  */
1022
- prependOnceListener(event: "abort", listener: () => void): this;
1102
+ prependOnceListener(event: 'abort', listener: () => void): this;
1023
1103
  prependOnceListener(
1024
- event: "connect",
1104
+ event: 'connect',
1025
1105
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1026
1106
  ): this;
1027
- prependOnceListener(event: "continue", listener: () => void): this;
1028
- prependOnceListener(event: "information", listener: (info: InformationEvent) => void): this;
1029
- prependOnceListener(event: "response", listener: (response: IncomingMessage) => void): this;
1030
- prependOnceListener(event: "socket", listener: (socket: Socket) => void): this;
1031
- prependOnceListener(event: "timeout", listener: () => void): this;
1107
+ prependOnceListener(event: 'continue', listener: () => void): this;
1108
+ prependOnceListener(event: 'information', listener: (info: InformationEvent) => void): this;
1109
+ prependOnceListener(event: 'response', listener: (response: IncomingMessage) => void): this;
1110
+ prependOnceListener(event: 'socket', listener: (socket: Socket) => void): this;
1111
+ prependOnceListener(event: 'timeout', listener: () => void): this;
1032
1112
  prependOnceListener(
1033
- event: "upgrade",
1113
+ event: 'upgrade',
1034
1114
  listener: (response: IncomingMessage, socket: Socket, head: Buffer) => void,
1035
1115
  ): this;
1036
- prependOnceListener(event: "close", listener: () => void): this;
1037
- prependOnceListener(event: "drain", listener: () => void): this;
1038
- prependOnceListener(event: "error", listener: (err: Error) => void): this;
1039
- prependOnceListener(event: "finish", listener: () => void): this;
1040
- prependOnceListener(event: "pipe", listener: (src: stream.Readable) => void): this;
1041
- prependOnceListener(event: "unpipe", listener: (src: stream.Readable) => void): this;
1116
+ prependOnceListener(event: 'close', listener: () => void): this;
1117
+ prependOnceListener(event: 'drain', listener: () => void): this;
1118
+ prependOnceListener(event: 'error', listener: (err: Error) => void): this;
1119
+ prependOnceListener(event: 'finish', listener: () => void): this;
1120
+ prependOnceListener(event: 'pipe', listener: (src: stream.Readable) => void): this;
1121
+ prependOnceListener(event: 'unpipe', listener: (src: stream.Readable) => void): this;
1042
1122
  prependOnceListener(event: string | symbol, listener: (...args: any[]) => void): this;
1043
1123
  }
1044
1124
  /**
@@ -1,4 +1,4 @@
1
- // Type definitions for non-npm package Node.js 20.7
1
+ // Type definitions for non-npm package Node.js 20.8
2
2
  // Project: https://nodejs.org/
3
3
  // Definitions by: Microsoft TypeScript <https://github.com/Microsoft>
4
4
  // DefinitelyTyped <https://github.com/DefinitelyTyped>
@@ -142,13 +142,13 @@ declare module "module" {
142
142
  */
143
143
  type GlobalPreloadHook = (context: GlobalPreloadContext) => string;
144
144
  /**
145
- * The `initialize` hook provides a way to define a custom function that runs in the loader's thread
146
- * when the loader is initialized. Initialization happens when the loader is registered via `register`
147
- * or registered via the `--experimental-loader` command line option.
145
+ * The `initialize` hook provides a way to define a custom function that runs in the hooks thread
146
+ * when the hooks module is initialized. Initialization happens when the hooks module is registered via `register`.
148
147
  *
149
- * This hook can send and receive data from a `register` invocation, including ports and other transferrable objects.
148
+ * This hook can receive data from a `register` invocation, including ports and other transferrable objects.
149
+ * The return value of `initialize` can be a `Promise`, in which case it will be awaited before the main application thread execution resumes.
150
150
  */
151
- type InitializeHook<Data = any, ReturnType = any> = (data: Data) => ReturnType;
151
+ type InitializeHook<Data = any> = (data: Data) => void | Promise<void>;
152
152
  interface ResolveHookContext {
153
153
  /**
154
154
  * Export conditions of the relevant `package.json`
@@ -240,7 +240,7 @@ declare module "module" {
240
240
  ) => LoadFnOutput | Promise<LoadFnOutput>;
241
241
  }
242
242
  interface RegisterOptions<Data> {
243
- parentURL: string;
243
+ parentURL: string | URL;
244
244
  data?: Data | undefined;
245
245
  transferList?: any[] | undefined;
246
246
  }
@@ -252,12 +252,12 @@ declare module "module" {
252
252
  static builtinModules: string[];
253
253
  static isBuiltin(moduleName: string): boolean;
254
254
  static Module: typeof Module;
255
- static register<Data = any, ReturnType = any>(
256
- specifier: string,
257
- parentURL?: string,
255
+ static register<Data = any>(
256
+ specifier: string | URL,
257
+ parentURL?: string | URL,
258
258
  options?: RegisterOptions<Data>,
259
- ): ReturnType;
260
- static register<Data = any, ReturnType = any>(specifier: string, options?: RegisterOptions<Data>): ReturnType;
259
+ ): void;
260
+ static register<Data = any>(specifier: string | URL, options?: RegisterOptions<Data>): void;
261
261
  constructor(id: string, parent?: Module);
262
262
  }
263
263
  global {
@@ -240,6 +240,7 @@ declare module "net" {
240
240
  *
241
241
  * Each address is a string in the form of `$IP:$PORT`.
242
242
  * If the connection was successful, then the last address is the one that the socket is currently connected to.
243
+ * @since v19.4.0
243
244
  */
244
245
  readonly autoSelectFamilyAttemptedAddresses: string[];
245
246
  /**
@@ -832,9 +833,27 @@ declare module "net" {
832
833
  function createConnection(options: NetConnectOpts, connectionListener?: () => void): Socket;
833
834
  function createConnection(port: number, host?: string, connectionListener?: () => void): Socket;
834
835
  function createConnection(path: string, connectionListener?: () => void): Socket;
836
+ /**
837
+ * Gets the current default value of the `autoSelectFamily` option of `socket.connect(options)`.
838
+ * The initial default value is `true`, unless the command line option`--no-network-family-autoselection` is provided.
839
+ * @since v19.4.0
840
+ */
835
841
  function getDefaultAutoSelectFamily(): boolean;
842
+ /**
843
+ * Sets the default value of the `autoSelectFamily` option of `socket.connect(options)`.
844
+ * @since v19.4.0
845
+ */
836
846
  function setDefaultAutoSelectFamily(value: boolean): void;
847
+ /**
848
+ * Gets the current default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
849
+ * The initial default value is `250`.
850
+ * @since v19.8.0
851
+ */
837
852
  function getDefaultAutoSelectFamilyAttemptTimeout(): number;
853
+ /**
854
+ * Sets the default value of the `autoSelectFamilyAttemptTimeout` option of `socket.connect(options)`.
855
+ * @since v19.8.0
856
+ */
838
857
  function setDefaultAutoSelectFamilyAttemptTimeout(value: number): void;
839
858
  /**
840
859
  * Returns `6` if `input` is an IPv6 address. Returns `4` if `input` is an IPv4
@@ -400,7 +400,7 @@ declare module "os" {
400
400
  const EOL: string;
401
401
  /**
402
402
  * Returns the operating system CPU architecture for which the Node.js binary was
403
- * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'s390'`, `'s390x'`, and `'x64'`.
403
+ * compiled. Possible values are `'arm'`, `'arm64'`, `'ia32'`, `'mips'`,`'mipsel'`, `'ppc'`, `'ppc64'`, `'riscv64'`, `'s390'`, `'s390x'`, and `'x64'`.
404
404
  *
405
405
  * The return value is equivalent to `process.arch`.
406
406
  * @since v0.5.0
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@types/node",
3
- "version": "20.7.1",
3
+ "version": "20.8.0",
4
4
  "description": "TypeScript definitions for Node.js",
5
5
  "homepage": "https://github.com/DefinitelyTyped/DefinitelyTyped/tree/master/types/node",
6
6
  "license": "MIT",
@@ -227,6 +227,6 @@
227
227
  },
228
228
  "scripts": {},
229
229
  "dependencies": {},
230
- "typesPublisherContentHash": "4619e9f05c4b3ece54c50232ef1f73d47265431ca489080efc47c46a264555da",
230
+ "typesPublisherContentHash": "7637ed07b3e4b1806d0b4b3e38bd788c3004f33c9700b8b65432d5894164b46f",
231
231
  "typeScriptVersion": "4.5"
232
232
  }
@@ -77,6 +77,15 @@ declare module "stream/web" {
77
77
  type ReadableStreamDefaultReadResult<T> =
78
78
  | ReadableStreamDefaultReadValueResult<T>
79
79
  | ReadableStreamDefaultReadDoneResult;
80
+ interface ReadableStreamReadValueResult<T> {
81
+ done: false;
82
+ value: T;
83
+ }
84
+ interface ReadableStreamReadDoneResult<T> {
85
+ done: true;
86
+ value?: T;
87
+ }
88
+ type ReadableStreamReadResult<T> = ReadableStreamReadValueResult<T> | ReadableStreamReadDoneResult<T>;
80
89
  interface ReadableByteStreamControllerCallback {
81
90
  (controller: ReadableByteStreamController): void | PromiseLike<void>;
82
91
  }
@@ -138,6 +147,7 @@ declare module "stream/web" {
138
147
  readonly locked: boolean;
139
148
  cancel(reason?: any): Promise<void>;
140
149
  getReader(): ReadableStreamDefaultReader<R>;
150
+ getReader(options: { mode: "byob" }): ReadableStreamBYOBReader;
141
151
  pipeThrough<T>(transform: ReadableWritablePair<T, R>, options?: StreamPipeOptions): ReadableStream<T>;
142
152
  pipeTo(destination: WritableStream<R>, options?: StreamPipeOptions): Promise<void>;
143
153
  tee(): [ReadableStream<R>, ReadableStream<R>];
@@ -153,6 +163,10 @@ declare module "stream/web" {
153
163
  read(): Promise<ReadableStreamDefaultReadResult<R>>;
154
164
  releaseLock(): void;
155
165
  }
166
+ interface ReadableStreamBYOBReader extends ReadableStreamGenericReader {
167
+ read<T extends ArrayBufferView>(view: T): Promise<ReadableStreamReadResult<T>>;
168
+ releaseLock(): void;
169
+ }
156
170
  const ReadableStreamDefaultReader: {
157
171
  prototype: ReadableStreamDefaultReader;
158
172
  new<R = any>(stream: ReadableStream<R>): ReadableStreamDefaultReader<R>;
@@ -84,7 +84,9 @@ declare module "node:test" {
84
84
  /**
85
85
  * ```js
86
86
  * import { tap } from 'node:test/reporters';
87
+ * import { run } from 'node:test';
87
88
  * import process from 'node:process';
89
+ * import path from 'node:path';
88
90
  *
89
91
  * run({ files: [path.resolve('./tests/test.js')] })
90
92
  * .compose(tap)
@@ -292,6 +294,10 @@ declare module "node:test" {
292
294
  * For each test that is executed, any corresponding test hooks, such as `beforeEach()`, are also run.
293
295
  */
294
296
  testNamePatterns?: string | RegExp | string[] | RegExp[];
297
+ /**
298
+ * If truthy, the test context will only run tests that have the `only` option set
299
+ */
300
+ only?: boolean;
295
301
  /**
296
302
  * A function that accepts the TestsStream instance and can be used to setup listeners before any tests are run.
297
303
  */
@@ -1368,5 +1374,9 @@ declare module "node:test/reporters" {
1368
1374
  class Spec extends Transform {
1369
1375
  constructor();
1370
1376
  }
1371
- export { dot, Spec as spec, tap, TestEvent };
1377
+ /**
1378
+ * The `junit` reporter outputs test results in a jUnit XML format
1379
+ */
1380
+ function junit(source: TestEventGenerator): AsyncGenerator<string, void>;
1381
+ export { dot, Spec as spec, tap, junit, TestEvent };
1372
1382
  }
@@ -71,7 +71,7 @@ declare module "buffer" {
71
71
  MAX_LENGTH: number;
72
72
  MAX_STRING_LENGTH: number;
73
73
  };
74
- export type TranscodeEncoding = "ascii" | "utf8" | "utf16le" | "ucs2" | "latin1" | "binary";
74
+ export type TranscodeEncoding = "ascii" | "utf8" | "utf-8" | "utf16le" | "utf-16le" | "ucs2" | "ucs-2" | "latin1" | "binary";
75
75
  /**
76
76
  * Re-encodes the given `Buffer` or `Uint8Array` instance from one character
77
77
  * encoding to another. Returns a new `Buffer` instance.
@@ -225,6 +225,7 @@ declare module "buffer" {
225
225
  | "utf8"
226
226
  | "utf-8"
227
227
  | "utf16le"
228
+ | "utf-16le"
228
229
  | "ucs2"
229
230
  | "ucs-2"
230
231
  | "base64"
@@ -529,7 +530,7 @@ declare module "buffer" {
529
530
  * @param [fill=0] A value to pre-fill the new `Buffer` with.
530
531
  * @param [encoding='utf8'] If `fill` is a string, this is its encoding.
531
532
  */
532
- alloc(size: number, fill?: string | Buffer | number, encoding?: BufferEncoding): Buffer;
533
+ alloc(size: number, fill?: string | Uint8Array | number, encoding?: BufferEncoding): Buffer;
533
534
  /**
534
535
  * Allocates a new `Buffer` of `size` bytes. If `size` is larger than {@link constants.MAX_LENGTH} or smaller than 0, `ERR_OUT_OF_RANGE` is thrown.
535
536
  *
@@ -260,7 +260,7 @@ declare module "crypto" {
260
260
  function createHmac(algorithm: string, key: BinaryLike | KeyObject, options?: stream.TransformOptions): Hmac;
261
261
  // https://nodejs.org/api/buffer.html#buffer_buffers_and_character_encodings
262
262
  type BinaryToTextEncoding = "base64" | "base64url" | "hex" | "binary";
263
- type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "latin1";
263
+ type CharacterEncoding = "utf8" | "utf-8" | "utf16le" | "utf-16le" | "latin1";
264
264
  type LegacyCharacterEncoding = "ascii" | "binary" | "ucs2" | "ucs-2";
265
265
  type Encoding = BinaryToTextEncoding | CharacterEncoding | LegacyCharacterEncoding;
266
266
  type ECDHKeyFormat = "compressed" | "uncompressed" | "hybrid";